@samanhappy/mcphub 0.8.2 → 0.8.3
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/dist/services/mcpService.js +182 -117
- package/dist/services/mcpService.js.map +1 -1
- package/frontend/dist/assets/index-B-VTc3wu.css +1 -0
- package/frontend/dist/assets/index-BjnGlIAs.js +187 -0
- package/frontend/dist/assets/index-BjnGlIAs.js.map +1 -0
- package/frontend/dist/index.html +8 -2
- package/package.json +1 -1
- package/frontend/dist/assets/index-BS_54XZ9.js +0 -186
- package/frontend/dist/assets/index-BS_54XZ9.js.map +0 -1
- package/frontend/dist/assets/index-DVcFHJ6u.css +0 -1
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const m of f.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&c(m)}).observe(document,{childList:!0,subtree:!0});function r(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function c(d){if(d.ep)return;d.ep=!0;const f=r(d);fetch(d.href,f)}})();function Bh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Tc={exports:{}},Cl={};/**
|
|
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 Zm;function J0(){if(Zm)return Cl;Zm=1;var s=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(c,d,f){var m=null;if(f!==void 0&&(m=""+f),d.key!==void 0&&(m=""+d.key),"key"in d){f={};for(var p in d)p!=="key"&&(f[p]=d[p])}else f=d;return d=f.ref,{$$typeof:s,type:c,key:m,ref:d!==void 0?d:null,props:f}}return Cl.Fragment=i,Cl.jsx=r,Cl.jsxs=r,Cl}var Fm;function I0(){return Fm||(Fm=1,Tc.exports=J0()),Tc.exports}var l=I0(),Ac={exports:{}},Ce={};/**
|
|
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 W0(){if(Jm)return Ce;Jm=1;var s=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),m=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),j=Symbol.iterator;function v(N){return N===null||typeof N!="object"?null:(N=j&&N[j]||N["@@iterator"],typeof N=="function"?N:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,E={};function O(N,G,te){this.props=N,this.context=G,this.refs=E,this.updater=te||T}O.prototype.isReactComponent={},O.prototype.setState=function(N,G){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,G,"setState")},O.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function R(){}R.prototype=O.prototype;function A(N,G,te){this.props=N,this.context=G,this.refs=E,this.updater=te||T}var $=A.prototype=new R;$.constructor=A,S($,O.prototype),$.isPureReactComponent=!0;var Z=Array.isArray,B={H:null,A:null,T:null,S:null,V:null},oe=Object.prototype.hasOwnProperty;function P(N,G,te,ae,de,we){return te=we.ref,{$$typeof:s,type:N,key:G,ref:te!==void 0?te:null,props:we}}function H(N,G){return P(N.type,G,void 0,void 0,void 0,N.props)}function I(N){return typeof N=="object"&&N!==null&&N.$$typeof===s}function ne(N){var G={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(te){return G[te]})}var L=/\/+/g;function V(N,G){return typeof N=="object"&&N!==null&&N.key!=null?ne(""+N.key):G.toString(36)}function se(){}function Q(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(se,se):(N.status="pending",N.then(function(G){N.status==="pending"&&(N.status="fulfilled",N.value=G)},function(G){N.status==="pending"&&(N.status="rejected",N.reason=G)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function Y(N,G,te,ae,de){var we=typeof N;(we==="undefined"||we==="boolean")&&(N=null);var ee=!1;if(N===null)ee=!0;else switch(we){case"bigint":case"string":case"number":ee=!0;break;case"object":switch(N.$$typeof){case s:case i:ee=!0;break;case y:return ee=N._init,Y(ee(N._payload),G,te,ae,de)}}if(ee)return de=de(N),ee=ae===""?"."+V(N,0):ae,Z(de)?(te="",ee!=null&&(te=ee.replace(L,"$&/")+"/"),Y(de,G,te,"",function(xe){return xe})):de!=null&&(I(de)&&(de=H(de,te+(de.key==null||N&&N.key===de.key?"":(""+de.key).replace(L,"$&/")+"/")+ee)),G.push(de)),1;ee=0;var le=ae===""?".":ae+":";if(Z(N))for(var ce=0;ce<N.length;ce++)ae=N[ce],we=le+V(ae,ce),ee+=Y(ae,G,te,we,de);else if(ce=v(N),typeof ce=="function")for(N=ce.call(N),ce=0;!(ae=N.next()).done;)ae=ae.value,we=le+V(ae,ce++),ee+=Y(ae,G,te,we,de);else if(we==="object"){if(typeof N.then=="function")return Y(Q(N),G,te,ae,de);throw G=String(N),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return ee}function k(N,G,te){if(N==null)return N;var ae=[],de=0;return Y(N,ae,"","",function(we){return G.call(te,we,de++)}),ae}function q(N){if(N._status===-1){var G=N._result;G=G(),G.then(function(te){(N._status===0||N._status===-1)&&(N._status=1,N._result=te)},function(te){(N._status===0||N._status===-1)&&(N._status=2,N._result=te)}),N._status===-1&&(N._status=0,N._result=G)}if(N._status===1)return N._result.default;throw N._result}var z=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)};function re(){}return Ce.Children={map:k,forEach:function(N,G,te){k(N,function(){G.apply(this,arguments)},te)},count:function(N){var G=0;return k(N,function(){G++}),G},toArray:function(N){return k(N,function(G){return G})||[]},only:function(N){if(!I(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},Ce.Component=O,Ce.Fragment=r,Ce.Profiler=d,Ce.PureComponent=A,Ce.StrictMode=c,Ce.Suspense=g,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(N){return B.H.useMemoCache(N)}},Ce.cache=function(N){return function(){return N.apply(null,arguments)}},Ce.cloneElement=function(N,G,te){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var ae=S({},N.props),de=N.key,we=void 0;if(G!=null)for(ee in G.ref!==void 0&&(we=void 0),G.key!==void 0&&(de=""+G.key),G)!oe.call(G,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&G.ref===void 0||(ae[ee]=G[ee]);var ee=arguments.length-2;if(ee===1)ae.children=te;else if(1<ee){for(var le=Array(ee),ce=0;ce<ee;ce++)le[ce]=arguments[ce+2];ae.children=le}return P(N.type,de,void 0,void 0,we,ae)},Ce.createContext=function(N){return N={$$typeof:m,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:f,_context:N},N},Ce.createElement=function(N,G,te){var ae,de={},we=null;if(G!=null)for(ae in G.key!==void 0&&(we=""+G.key),G)oe.call(G,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(de[ae]=G[ae]);var ee=arguments.length-2;if(ee===1)de.children=te;else if(1<ee){for(var le=Array(ee),ce=0;ce<ee;ce++)le[ce]=arguments[ce+2];de.children=le}if(N&&N.defaultProps)for(ae in ee=N.defaultProps,ee)de[ae]===void 0&&(de[ae]=ee[ae]);return P(N,we,void 0,void 0,null,de)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(N){return{$$typeof:p,render:N}},Ce.isValidElement=I,Ce.lazy=function(N){return{$$typeof:y,_payload:{_status:-1,_result:N},_init:q}},Ce.memo=function(N,G){return{$$typeof:h,type:N,compare:G===void 0?null:G}},Ce.startTransition=function(N){var G=B.T,te={};B.T=te;try{var ae=N(),de=B.S;de!==null&&de(te,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(re,z)}catch(we){z(we)}finally{B.T=G}},Ce.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},Ce.use=function(N){return B.H.use(N)},Ce.useActionState=function(N,G,te){return B.H.useActionState(N,G,te)},Ce.useCallback=function(N,G){return B.H.useCallback(N,G)},Ce.useContext=function(N){return B.H.useContext(N)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(N,G){return B.H.useDeferredValue(N,G)},Ce.useEffect=function(N,G,te){var ae=B.H;if(typeof te=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return ae.useEffect(N,G)},Ce.useId=function(){return B.H.useId()},Ce.useImperativeHandle=function(N,G,te){return B.H.useImperativeHandle(N,G,te)},Ce.useInsertionEffect=function(N,G){return B.H.useInsertionEffect(N,G)},Ce.useLayoutEffect=function(N,G){return B.H.useLayoutEffect(N,G)},Ce.useMemo=function(N,G){return B.H.useMemo(N,G)},Ce.useOptimistic=function(N,G){return B.H.useOptimistic(N,G)},Ce.useReducer=function(N,G,te){return B.H.useReducer(N,G,te)},Ce.useRef=function(N){return B.H.useRef(N)},Ce.useState=function(N){return B.H.useState(N)},Ce.useSyncExternalStore=function(N,G,te){return B.H.useSyncExternalStore(N,G,te)},Ce.useTransition=function(){return B.H.useTransition()},Ce.version="19.1.0",Ce}var Im;function Fc(){return Im||(Im=1,Ac.exports=W0()),Ac.exports}var w=Fc();const Bc=Bh(w);var Rc={exports:{}},El={},Oc={exports:{}},Mc={};/**
|
|
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 Wm;function ex(){return Wm||(Wm=1,function(s){function i(k,q){var z=k.length;k.push(q);e:for(;0<z;){var re=z-1>>>1,N=k[re];if(0<d(N,q))k[re]=q,k[z]=N,z=re;else break e}}function r(k){return k.length===0?null:k[0]}function c(k){if(k.length===0)return null;var q=k[0],z=k.pop();if(z!==q){k[0]=z;e:for(var re=0,N=k.length,G=N>>>1;re<G;){var te=2*(re+1)-1,ae=k[te],de=te+1,we=k[de];if(0>d(ae,z))de<N&&0>d(we,ae)?(k[re]=we,k[de]=z,re=de):(k[re]=ae,k[te]=z,re=te);else if(de<N&&0>d(we,z))k[re]=we,k[de]=z,re=de;else break e}}return q}function d(k,q){var z=k.sortIndex-q.sortIndex;return z!==0?z:k.id-q.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;s.unstable_now=function(){return f.now()}}else{var m=Date,p=m.now();s.unstable_now=function(){return m.now()-p}}var g=[],h=[],y=1,j=null,v=3,T=!1,S=!1,E=!1,O=!1,R=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function Z(k){for(var q=r(h);q!==null;){if(q.callback===null)c(h);else if(q.startTime<=k)c(h),q.sortIndex=q.expirationTime,i(g,q);else break;q=r(h)}}function B(k){if(E=!1,Z(k),!S)if(r(g)!==null)S=!0,oe||(oe=!0,V());else{var q=r(h);q!==null&&Y(B,q.startTime-k)}}var oe=!1,P=-1,H=5,I=-1;function ne(){return O?!0:!(s.unstable_now()-I<H)}function L(){if(O=!1,oe){var k=s.unstable_now();I=k;var q=!0;try{e:{S=!1,E&&(E=!1,A(P),P=-1),T=!0;var z=v;try{t:{for(Z(k),j=r(g);j!==null&&!(j.expirationTime>k&&ne());){var re=j.callback;if(typeof re=="function"){j.callback=null,v=j.priorityLevel;var N=re(j.expirationTime<=k);if(k=s.unstable_now(),typeof N=="function"){j.callback=N,Z(k),q=!0;break t}j===r(g)&&c(g),Z(k)}else c(g);j=r(g)}if(j!==null)q=!0;else{var G=r(h);G!==null&&Y(B,G.startTime-k),q=!1}}break e}finally{j=null,v=z,T=!1}q=void 0}}finally{q?V():oe=!1}}}var V;if(typeof $=="function")V=function(){$(L)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,Q=se.port2;se.port1.onmessage=L,V=function(){Q.postMessage(null)}}else V=function(){R(L,0)};function Y(k,q){P=R(function(){k(s.unstable_now())},q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(k){k.callback=null},s.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<k?Math.floor(1e3/k):5},s.unstable_getCurrentPriorityLevel=function(){return v},s.unstable_next=function(k){switch(v){case 1:case 2:case 3:var q=3;break;default:q=v}var z=v;v=q;try{return k()}finally{v=z}},s.unstable_requestPaint=function(){O=!0},s.unstable_runWithPriority=function(k,q){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var z=v;v=k;try{return q()}finally{v=z}},s.unstable_scheduleCallback=function(k,q,z){var re=s.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?re+z:re):z=re,k){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=z+N,k={id:y++,callback:q,priorityLevel:k,startTime:z,expirationTime:N,sortIndex:-1},z>re?(k.sortIndex=z,i(h,k),r(g)===null&&k===r(h)&&(E?(A(P),P=-1):E=!0,Y(B,z-re))):(k.sortIndex=N,i(g,k),S||T||(S=!0,oe||(oe=!0,V()))),k},s.unstable_shouldYield=ne,s.unstable_wrapCallback=function(k){var q=v;return function(){var z=v;v=q;try{return k.apply(this,arguments)}finally{v=z}}}}(Mc)),Mc}var eh;function tx(){return eh||(eh=1,Oc.exports=ex()),Oc.exports}var zc={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 th;function ax(){if(th)return pt;th=1;var s=Fc();function i(g){var h="https://react.dev/errors/"+g;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var c={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(g,h,y){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:j==null?null:""+j,children:g,containerInfo:h,implementation:y}}var m=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,pt.createPortal=function(g,h){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(i(299));return f(g,h,null,y)},pt.flushSync=function(g){var h=m.T,y=c.p;try{if(m.T=null,c.p=2,g)return g()}finally{m.T=h,c.p=y,c.d.f()}},pt.preconnect=function(g,h){typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,c.d.C(g,h))},pt.prefetchDNS=function(g){typeof g=="string"&&c.d.D(g)},pt.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var y=h.as,j=p(y,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,T=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;y==="style"?c.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:j,integrity:v,fetchPriority:T}):y==="script"&&c.d.X(g,{crossOrigin:j,integrity:v,fetchPriority:T,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},pt.preinitModule=function(g,h){if(typeof g=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=p(h.as,h.crossOrigin);c.d.M(g,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&c.d.M(g)},pt.preload=function(g,h){if(typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,j=p(y,h.crossOrigin);c.d.L(g,y,{crossOrigin:j,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},pt.preloadModule=function(g,h){if(typeof g=="string")if(h){var y=p(h.as,h.crossOrigin);c.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else c.d.m(g)},pt.requestFormReset=function(g){c.d.r(g)},pt.unstable_batchedUpdates=function(g,h){return g(h)},pt.useFormState=function(g,h,y){return m.H.useFormState(g,h,y)},pt.useFormStatus=function(){return m.H.useHostTransitionStatus()},pt.version="19.1.0",pt}var ah;function nx(){if(ah)return zc.exports;ah=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(i){console.error(i)}}return s(),zc.exports=ax(),zc.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 nh;function sx(){if(nh)return El;nh=1;var s=tx(),i=Fc(),r=nx();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 d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(f(e)!==e)throw Error(c(188))}function g(e){var t=e.alternate;if(!t){if(t=f(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 p(o),e;if(u===n)return p(o),t;u=u.sibling}throw Error(c(188))}if(a.return!==n.return)a=o,n=u;else{for(var x=!1,b=o.child;b;){if(b===a){x=!0,a=o,n=u;break}if(b===n){x=!0,n=o,a=u;break}b=b.sibling}if(!x){for(b=u.child;b;){if(b===a){x=!0,a=u,n=o;break}if(b===n){x=!0,n=u,a=o;break}b=b.sibling}if(!x)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 h(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=h(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,j=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),A=Symbol.for("react.consumer"),$=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function V(e){return e===null||typeof e!="object"?null:(e=L&&e[L]||e["@@iterator"],typeof e=="function"?e:null)}var se=Symbol.for("react.client.reference");function Q(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===se?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case S:return"Fragment";case O:return"Profiler";case E:return"StrictMode";case B:return"Suspense";case oe:return"SuspenseList";case I:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case $:return(e.displayName||"Context")+".Provider";case A:return(e._context.displayName||"Context")+".Consumer";case Z:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:Q(e.type)||"Memo";case H:t=e._payload,e=e._init;try{return Q(e(t))}catch{}}return null}var Y=Array.isArray,k=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z={pending:!1,data:null,method:null,action:null},re=[],N=-1;function G(e){return{current:e}}function te(e){0>N||(e.current=re[N],re[N]=null,N--)}function ae(e,t){N++,re[N]=e.current,e.current=t}var de=G(null),we=G(null),ee=G(null),le=G(null);function ce(e,t){switch(ae(ee,t),ae(we,e),ae(de,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=Nm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}te(de),ae(de,e)}function xe(){te(de),te(we),te(ee)}function Be(e){e.memoizedState!==null&&ae(le,e);var t=de.current,a=Nm(t,e.type);t!==a&&(ae(we,e),ae(de,a))}function je(e){we.current===e&&(te(de),te(we)),le.current===e&&(te(le),vl._currentValue=z)}var De=Object.prototype.hasOwnProperty,Fe=s.unstable_scheduleCallback,Ct=s.unstable_cancelCallback,ua=s.unstable_shouldYield,rn=s.unstable_requestPaint,Le=s.unstable_now,vt=s.unstable_getCurrentPriorityLevel,Ra=s.unstable_ImmediatePriority,Oa=s.unstable_UserBlockingPriority,da=s.unstable_NormalPriority,Ma=s.unstable_LowPriority,As=s.unstable_IdlePriority,Bl=s.log,Vl=s.unstable_setDisableYieldValue,za=null,mt=null;function Yt(e){if(typeof Bl=="function"&&Vl(e),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(za,e)}catch{}}var ht=Math.clz32?Math.clz32:$l,ql=Math.log,Gl=Math.LN2;function $l(e){return e>>>=0,e===0?32:31-(ql(e)/Gl|0)|0}var on=256,cn=4194304;function ta(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072: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 un(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var o=0,u=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var b=n&134217727;return b!==0?(n=b&~u,n!==0?o=ta(n):(x&=b,x!==0?o=ta(x):a||(a=b&~e,a!==0&&(o=ta(a))))):(b=n&~u,b!==0?o=ta(b):x!==0?o=ta(x):a||(a=n&~e,a!==0&&(o=ta(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 ue(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ie(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 pe(){var e=on;return on<<=1,(on&4194048)===0&&(on=256),e}function Xt(){var e=cn;return cn<<=1,(cn&62914560)===0&&(cn=4194304),e}function Qt(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Pt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dn(e,t,a,n,o,u){var x=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,C=e.expirationTimes,_=e.hiddenUpdates;for(a=x&~a;0<a;){var F=31-ht(a),W=1<<F;b[F]=0,C[F]=-1;var K=_[F];if(K!==null)for(_[F]=null,F=0;F<K.length;F++){var X=K[F];X!==null&&(X.lane&=-536870913)}a&=~W}n!==0&&Kl(e,n,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(x&~t))}function Kl(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 aa(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 Mn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Rs(){var e=q.p;return e!==0?e:(e=window.event,e===void 0?32:$m(e.type))}function Yl(e,t){var a=q.p;try{return q.p=e,t()}finally{q.p=a}}var Zt=Math.random().toString(36).slice(2),tt="__reactFiber$"+Zt,yt="__reactProps$"+Zt,zn="__reactContainer$"+Zt,bi="__reactEvents$"+Zt,qg="__reactListeners$"+Zt,Gg="__reactHandles$"+Zt,uu="__reactResources$"+Zt,Os="__reactMarker$"+Zt;function vi(e){delete e[tt],delete e[yt],delete e[bi],delete e[qg],delete e[Gg]}function Dn(e){var t=e[tt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[zn]||a[tt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Tm(e);e!==null;){if(a=e[tt])return a;e=Tm(e)}return t}e=a,a=e.parentNode}return null}function Un(e){if(e=e[tt]||e[zn]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Ms(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function Ln(e){var t=e[uu];return t||(t=e[uu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function rt(e){e[Os]=!0}var du=new Set,fu={};function fn(e,t){_n(e,t),_n(e+"Capture",t)}function _n(e,t){for(fu[e]=t,e=0;e<t.length;e++)du.add(t[e])}var $g=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),mu={},hu={};function Kg(e){return De.call(hu,e)?!0:De.call(mu,e)?!1:$g.test(e)?hu[e]=!0:(mu[e]=!0,!1)}function Xl(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 Ql(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 fa(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 wi,gu;function Hn(e){if(wi===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);wi=t&&t[1]||"",gu=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+wi+e+gu}var ji=!1;function Si(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 W=function(){throw Error()};if(Object.defineProperty(W.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(W,[])}catch(X){var K=X}Reflect.construct(e,[],W)}else{try{W.call()}catch(X){K=X}e.call(W.prototype)}}else{try{throw Error()}catch(X){K=X}(W=e())&&typeof W.catch=="function"&&W.catch(function(){})}}catch(X){if(X&&K&&typeof X.stack=="string")return[X.stack,K.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(),x=u[0],b=u[1];if(x&&b){var C=x.split(`
|
|
44
|
+
`),_=b.split(`
|
|
45
|
+
`);for(o=n=0;n<C.length&&!C[n].includes("DetermineComponentFrameRoot");)n++;for(;o<_.length&&!_[o].includes("DetermineComponentFrameRoot");)o++;if(n===C.length||o===_.length)for(n=C.length-1,o=_.length-1;1<=n&&0<=o&&C[n]!==_[o];)o--;for(;1<=n&&0<=o;n--,o--)if(C[n]!==_[o]){if(n!==1||o!==1)do if(n--,o--,0>o||C[n]!==_[o]){var F=`
|
|
46
|
+
`+C[n].replace(" at new "," at ");return e.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",e.displayName)),F}while(1<=n&&0<=o);break}}}finally{ji=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Hn(a):""}function Yg(e){switch(e.tag){case 26:case 27:case 5:return Hn(e.type);case 16:return Hn("Lazy");case 13:return Hn("Suspense");case 19:return Hn("SuspenseList");case 0:case 15:return Si(e.type,!1);case 11:return Si(e.type.render,!1);case 1:return Si(e.type,!0);case 31:return Hn("Activity");default:return""}}function pu(e){try{var t="";do t+=Yg(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 xu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Xg(e){var t=xu(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(x){n=""+x,u.call(this,x)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(x){n=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pl(e){e._valueTracker||(e._valueTracker=Xg(e))}function yu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=xu(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Zl(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 Ni(e,t,a,n,o,u,x,b){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Dt(t)):e.value!==""+Dt(t)&&(e.value=""+Dt(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Ci(e,x,Dt(t)):a!=null?Ci(e,x,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 bu(e,t,a,n,o,u,x,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,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x)}function Ci(e,t,a){t==="number"&&Zl(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Bn(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 vu(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 wu(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(c(92));if(Y(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 Vn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Pg=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 ju(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||Pg.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&&ju(e,o,n)}else for(var u in t)t.hasOwnProperty(u)&&ju(e,u,t[u])}function Ei(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 Zg=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"]]),Fg=/^[\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 Fl(e){return Fg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var ki=null;function Ti(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qn=null,Gn=null;function Nu(e){var t=Un(e);if(t&&(e=t.stateNode)){var a=e[yt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ni(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));Ni(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&&yu(n)}break e;case"textarea":vu(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Bn(e,!!a.multiple,t,!1)}}}var Ai=!1;function Cu(e,t,a){if(Ai)return e(t,a);Ai=!0;try{var n=e(t);return n}finally{if(Ai=!1,(qn!==null||Gn!==null)&&(Ur(),qn&&(t=qn,e=Gn,Gn=qn=null,Nu(t),e)))for(t=0;t<e.length;t++)Nu(e[t])}}function zs(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 ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ri=!1;if(ma)try{var Ds={};Object.defineProperty(Ds,"passive",{get:function(){Ri=!0}}),window.addEventListener("test",Ds,Ds),window.removeEventListener("test",Ds,Ds)}catch{Ri=!1}var Da=null,Oi=null,Jl=null;function Eu(){if(Jl)return Jl;var e,t=Oi,a=t.length,n,o="value"in Da?Da.value:Da.textContent,u=o.length;for(e=0;e<a&&t[e]===o[e];e++);var x=a-e;for(n=1;n<=x&&t[a-n]===o[u-n];n++);return Jl=o.slice(e,1<n?1-n:void 0)}function Il(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Wl(){return!0}function ku(){return!1}function wt(e){function t(a,n,o,u,x){this._reactName=a,this._targetInst=o,this.type=n,this.nativeEvent=u,this.target=x,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)?Wl:ku,this.isPropagationStopped=ku,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=Wl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Wl)},persist:function(){},isPersistent:Wl}),t}var mn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},er=wt(mn),Us=y({},mn,{view:0,detail:0}),Jg=wt(Us),Mi,zi,Ls,tr=y({},Us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ui,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ls&&(Ls&&e.type==="mousemove"?(Mi=e.screenX-Ls.screenX,zi=e.screenY-Ls.screenY):zi=Mi=0,Ls=e),Mi)},movementY:function(e){return"movementY"in e?e.movementY:zi}}),Tu=wt(tr),Ig=y({},tr,{dataTransfer:0}),Wg=wt(Ig),ep=y({},Us,{relatedTarget:0}),Di=wt(ep),tp=y({},mn,{animationName:0,elapsedTime:0,pseudoElement:0}),ap=wt(tp),np=y({},mn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),sp=wt(np),lp=y({},mn,{data:0}),Au=wt(lp),rp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ip={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"},op={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=op[e])?!!t[e]:!1}function Ui(){return cp}var up=y({},Us,{key:function(e){if(e.key){var t=rp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Il(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ip[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ui,charCode:function(e){return e.type==="keypress"?Il(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Il(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),dp=wt(up),fp=y({},tr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ru=wt(fp),mp=y({},Us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ui}),hp=wt(mp),gp=y({},mn,{propertyName:0,elapsedTime:0,pseudoElement:0}),pp=wt(gp),xp=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}),yp=wt(xp),bp=y({},mn,{newState:0,oldState:0}),vp=wt(bp),wp=[9,13,27,32],Li=ma&&"CompositionEvent"in window,_s=null;ma&&"documentMode"in document&&(_s=document.documentMode);var jp=ma&&"TextEvent"in window&&!_s,Ou=ma&&(!Li||_s&&8<_s&&11>=_s),Mu=" ",zu=!1;function Du(e,t){switch(e){case"keyup":return wp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $n=!1;function Sp(e,t){switch(e){case"compositionend":return Uu(t);case"keypress":return t.which!==32?null:(zu=!0,Mu);case"textInput":return e=t.data,e===Mu&&zu?null:e;default:return null}}function Np(e,t){if($n)return e==="compositionend"||!Li&&Du(e,t)?(e=Eu(),Jl=Oi=Da=null,$n=!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 Ou&&t.locale!=="ko"?null:t.data;default:return null}}var Cp={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 Lu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Cp[e.type]:t==="textarea"}function _u(e,t,a,n){qn?Gn?Gn.push(n):Gn=[n]:qn=n,t=qr(t,"onChange"),0<t.length&&(a=new er("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var Hs=null,Bs=null;function Ep(e){ym(e,0)}function ar(e){var t=Ms(e);if(yu(t))return e}function Hu(e,t){if(e==="change")return t}var Bu=!1;if(ma){var _i;if(ma){var Hi="oninput"in document;if(!Hi){var Vu=document.createElement("div");Vu.setAttribute("oninput","return;"),Hi=typeof Vu.oninput=="function"}_i=Hi}else _i=!1;Bu=_i&&(!document.documentMode||9<document.documentMode)}function qu(){Hs&&(Hs.detachEvent("onpropertychange",Gu),Bs=Hs=null)}function Gu(e){if(e.propertyName==="value"&&ar(Bs)){var t=[];_u(t,Bs,e,Ti(e)),Cu(Ep,t)}}function kp(e,t,a){e==="focusin"?(qu(),Hs=t,Bs=a,Hs.attachEvent("onpropertychange",Gu)):e==="focusout"&&qu()}function Tp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ar(Bs)}function Ap(e,t){if(e==="click")return ar(t)}function Rp(e,t){if(e==="input"||e==="change")return ar(t)}function Op(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:Op;function Vs(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(!De.call(t,o)||!kt(e[o],t[o]))return!1}return!0}function $u(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ku(e,t){var a=$u(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=$u(a)}}function Yu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Zl(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=Zl(e.document)}return t}function Bi(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 Mp=ma&&"documentMode"in document&&11>=document.documentMode,Kn=null,Vi=null,qs=null,qi=!1;function Qu(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;qi||Kn==null||Kn!==Zl(n)||(n=Kn,"selectionStart"in n&&Bi(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}),qs&&Vs(qs,n)||(qs=n,n=qr(Vi,"onSelect"),0<n.length&&(t=new er("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=Kn)))}function hn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Yn={animationend:hn("Animation","AnimationEnd"),animationiteration:hn("Animation","AnimationIteration"),animationstart:hn("Animation","AnimationStart"),transitionrun:hn("Transition","TransitionRun"),transitionstart:hn("Transition","TransitionStart"),transitioncancel:hn("Transition","TransitionCancel"),transitionend:hn("Transition","TransitionEnd")},Gi={},Pu={};ma&&(Pu=document.createElement("div").style,"AnimationEvent"in window||(delete Yn.animationend.animation,delete Yn.animationiteration.animation,delete Yn.animationstart.animation),"TransitionEvent"in window||delete Yn.transitionend.transition);function gn(e){if(Gi[e])return Gi[e];if(!Yn[e])return e;var t=Yn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Pu)return Gi[e]=t[a];return e}var Zu=gn("animationend"),Fu=gn("animationiteration"),Ju=gn("animationstart"),zp=gn("transitionrun"),Dp=gn("transitionstart"),Up=gn("transitioncancel"),Iu=gn("transitionend"),Wu=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){Wu.set(e,t),fn(t,[e])}var ed=new WeakMap;function Lt(e,t){if(typeof e=="object"&&e!==null){var a=ed.get(e);return a!==void 0?a:(t={value:e,source:t,stack:pu(t)},ed.set(e,t),t)}return{value:e,source:t,stack:pu(t)}}var _t=[],Xn=0,Ki=0;function nr(){for(var e=Xn,t=Ki=Xn=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 x=n.pending;x===null?o.next=o:(o.next=x.next,x.next=o),n.pending=o}u!==0&&td(a,o,u)}}function sr(e,t,a,n){_t[Xn++]=e,_t[Xn++]=t,_t[Xn++]=a,_t[Xn++]=n,Ki|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Yi(e,t,a,n){return sr(e,t,a,n),lr(e)}function Qn(e,t){return sr(e,null,null,t),lr(e)}function td(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 lr(e){if(50<fl)throw fl=0,Io=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Pn={};function Lp(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 Lp(e,t,a,n)}function Xi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ha(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 ad(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 x=0;if(n=e,typeof e=="function")Xi(e)&&(x=1);else if(typeof e=="string")x=H0(e,a,de.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 S:return pn(a.children,o,u,t);case E:x=8,o|=24;break;case O:return e=Tt(12,a,t,o|2),e.elementType=O,e.lanes=u,e;case B:return e=Tt(13,a,t,o),e.elementType=B,e.lanes=u,e;case oe:return e=Tt(19,a,t,o),e.elementType=oe,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R:case $:x=10;break e;case A:x=9;break e;case Z:x=11;break e;case P:x=14;break e;case H:x=16,n=null;break e}x=29,a=Error(c(130,e===null?"null":typeof e,"")),n=null}return t=Tt(x,a,t,o),t.elementType=e,t.type=n,t.lanes=u,t}function pn(e,t,a,n){return e=Tt(7,e,n,t),e.lanes=a,e}function Qi(e,t,a){return e=Tt(6,e,null,t),e.lanes=a,e}function Pi(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 Zn=[],Fn=0,ir=null,or=0,Ht=[],Bt=0,xn=null,ga=1,pa="";function yn(e,t){Zn[Fn++]=or,Zn[Fn++]=ir,ir=e,or=t}function nd(e,t,a){Ht[Bt++]=ga,Ht[Bt++]=pa,Ht[Bt++]=xn,xn=e;var n=ga;e=pa;var o=32-ht(n)-1;n&=~(1<<o),a+=1;var u=32-ht(t)+o;if(30<u){var x=o-o%5;u=(n&(1<<x)-1).toString(32),n>>=x,o-=x,ga=1<<32-ht(t)+o|a<<o|n,pa=u+e}else ga=1<<u|a<<o|n,pa=e}function Zi(e){e.return!==null&&(yn(e,1),nd(e,1,0))}function Fi(e){for(;e===ir;)ir=Zn[--Fn],Zn[Fn]=null,or=Zn[--Fn],Zn[Fn]=null;for(;e===xn;)xn=Ht[--Bt],Ht[Bt]=null,pa=Ht[--Bt],Ht[Bt]=null,ga=Ht[--Bt],Ht[Bt]=null}var bt=null,Pe=null,Ue=!1,bn=null,na=!1,Ji=Error(c(519));function vn(e){var t=Error(c(418,""));throw Ks(Lt(t,e)),Ji}function sd(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<hl.length;a++)Re(hl[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),bu(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0),Pl(t);break;case"select":Re("invalid",t);break;case"textarea":Re("invalid",t),wu(t,n.value,n.defaultValue,n.children),Pl(t)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||jm(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||vn(e)}function ld(e){for(bt=e.return;bt;)switch(bt.tag){case 5:case 13:na=!1;return;case 27:case 3:na=!0;return;default:bt=bt.return}}function Gs(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")||hc(e.type,e.memoizedProps)),a=!a),a&&Pe&&vn(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=It(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}Pe=null}}else t===27?(t=Pe,Fa(e.type)?(e=yc,yc=null,Pe=e):Pe=t):Pe=bt?It(e.stateNode.nextSibling):null;return!0}function $s(){Pe=bt=null,Ue=!1}function rd(){var e=bn;return e!==null&&(Nt===null?Nt=e:Nt.push.apply(Nt,e),bn=null),e}function Ks(e){bn===null?bn=[e]:bn.push(e)}var Ii=G(null),wn=null,xa=null;function Ua(e,t,a){ae(Ii,t._currentValue),t._currentValue=a}function ya(e){e._currentValue=Ii.current,te(Ii)}function Wi(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 eo(e,t,a,n){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var x=o.child;u=u.firstContext;e:for(;u!==null;){var b=u;u=o;for(var C=0;C<t.length;C++)if(b.context===t[C]){u.lanes|=a,b=u.alternate,b!==null&&(b.lanes|=a),Wi(u.return,a,e),n||(x=null);break e}u=b.next}}else if(o.tag===18){if(x=o.return,x===null)throw Error(c(341));x.lanes|=a,u=x.alternate,u!==null&&(u.lanes|=a),Wi(x,a,e),x=null}else x=o.child;if(x!==null)x.return=o;else for(x=o;x!==null;){if(x===e){x=null;break}if(o=x.sibling,o!==null){o.return=x.return,x=o;break}x=x.return}o=x}}function Ys(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 x=o.alternate;if(x===null)throw Error(c(387));if(x=x.memoizedProps,x!==null){var b=o.type;kt(o.pendingProps.value,x.value)||(e!==null?e.push(b):e=[b])}}else if(o===le.current){if(x=o.alternate,x===null)throw Error(c(387));x.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(vl):e=[vl])}o=o.return}e!==null&&eo(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 jn(e){wn=e,xa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function gt(e){return id(wn,e)}function ur(e,t){return wn===null&&jn(e),id(e,t)}function id(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},xa===null){if(e===null)throw Error(c(308));xa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else xa=xa.next=t;return a}var _p=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()})}},Hp=s.unstable_scheduleCallback,Bp=s.unstable_NormalPriority,at={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function to(){return{controller:new _p,data:new Map,refCount:0}}function Xs(e){e.refCount--,e.refCount===0&&Hp(Bp,function(){e.controller.abort()})}var Qs=null,ao=0,Jn=0,In=null;function Vp(e,t){if(Qs===null){var a=Qs=[];ao=0,Jn=lc(),In={status:"pending",value:void 0,then:function(n){a.push(n)}}}return ao++,t.then(od,od),t}function od(){if(--ao===0&&Qs!==null){In!==null&&(In.status="fulfilled");var e=Qs;Qs=null,Jn=0,In=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 cd=k.S;k.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&Vp(e,t),cd!==null&&cd(e,t)};var Sn=G(null);function no(){var e=Sn.current;return e!==null?e:Ke.pooledCache}function dr(e,t){t===null?ae(Sn,Sn.current):ae(Sn,t.pool)}function ud(){var e=no();return e===null?null:{parent:at._currentValue,pool:e}}var Ps=Error(c(460)),dd=Error(c(474)),fr=Error(c(542)),so={then:function(){}};function fd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function mr(){}function md(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,gd(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,gd(e),e}throw Zs=t,Ps}}var Zs=null;function hd(){if(Zs===null)throw Error(c(459));var e=Zs;return Zs=null,e}function gd(e){if(e===Ps||e===fr)throw Error(c(483))}var La=!1;function lo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ro(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 _a(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ha(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(_e&2)!==0){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,t=lr(e),td(e,null,a),t}return sr(e,n,t,a),lr(e)}function Fs(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 io(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 x={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?o=u=x:u=u.next=x,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 oo=!1;function Js(){if(oo){var e=In;if(e!==null)throw e}}function Is(e,t,a,n){oo=!1;var o=e.updateQueue;La=!1;var u=o.firstBaseUpdate,x=o.lastBaseUpdate,b=o.shared.pending;if(b!==null){o.shared.pending=null;var C=b,_=C.next;C.next=null,x===null?u=_:x.next=_,x=C;var F=e.alternate;F!==null&&(F=F.updateQueue,b=F.lastBaseUpdate,b!==x&&(b===null?F.firstBaseUpdate=_:b.next=_,F.lastBaseUpdate=C))}if(u!==null){var W=o.baseState;x=0,F=_=C=null,b=u;do{var K=b.lane&-536870913,X=K!==b.lane;if(X?(Me&K)===K:(n&K)===K){K!==0&&K===Jn&&(oo=!0),F!==null&&(F=F.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ve=e,ye=b;K=t;var Ge=a;switch(ye.tag){case 1:if(ve=ye.payload,typeof ve=="function"){W=ve.call(Ge,W,K);break e}W=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=ye.payload,K=typeof ve=="function"?ve.call(Ge,W,K):ve,K==null)break e;W=y({},W,K);break e;case 2:La=!0}}K=b.callback,K!==null&&(e.flags|=64,X&&(e.flags|=8192),X=o.callbacks,X===null?o.callbacks=[K]:X.push(K))}else X={lane:K,tag:b.tag,payload:b.payload,callback:b.callback,next:null},F===null?(_=F=X,C=W):F=F.next=X,x|=K;if(b=b.next,b===null){if(b=o.shared.pending,b===null)break;X=b,b=X.next,X.next=null,o.lastBaseUpdate=X,o.shared.pending=null}}while(!0);F===null&&(C=W),o.baseState=C,o.firstBaseUpdate=_,o.lastBaseUpdate=F,u===null&&(o.shared.lanes=0),Xa|=x,e.lanes=x,e.memoizedState=W}}function pd(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function xd(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)pd(a[e],t)}var Wn=G(null),hr=G(0);function yd(e,t){e=Ca,ae(hr,e),ae(Wn,t),Ca=e|t.baseLanes}function co(){ae(hr,Ca),ae(Wn,Wn.current)}function uo(){Ca=hr.current,te(Wn),te(hr)}var Ba=0,Ee=null,Ve=null,We=null,gr=!1,es=!1,Nn=!1,pr=0,Ws=0,ts=null,Gp=0;function Je(){throw Error(c(321))}function fo(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 mo(e,t,a,n,o,u){return Ba=u,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?tf:af,Nn=!1,u=a(n,o),Nn=!1,es&&(u=vd(t,a,n,o)),bd(e),u}function bd(e){k.H=jr;var t=Ve!==null&&Ve.next!==null;if(Ba=0,We=Ve=Ee=null,gr=!1,Ws=0,ts=null,t)throw Error(c(300));e===null||it||(e=e.dependencies,e!==null&&cr(e)&&(it=!0))}function vd(e,t,a,n){Ee=e;var o=0;do{if(es&&(ts=null),Ws=0,es=!1,25<=o)throw Error(c(301));if(o+=1,We=Ve=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}k.H=Zp,u=t(a,n)}while(es);return u}function $p(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?el(t):t,e=e.useState()[0],(Ve!==null?Ve.memoizedState:null)!==e&&(Ee.flags|=1024),t}function ho(){var e=pr!==0;return pr=0,e}function go(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function po(e){if(gr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}gr=!1}Ba=0,We=Ve=Ee=null,es=!1,Ws=pr=0,ts=null}function jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?Ee.memoizedState=We=e:We=We.next=e,We}function et(){if(Ve===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=Ve.next;var t=We===null?Ee.memoizedState:We.next;if(t!==null)We=t,Ve=e;else{if(e===null)throw Ee.alternate===null?Error(c(467)):Error(c(310));Ve=e,e={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},We===null?Ee.memoizedState=We=e:We=We.next=e}return We}function xo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function el(e){var t=Ws;return Ws+=1,ts===null&&(ts=[]),e=md(ts,e,t),t=Ee,(We===null?t.memoizedState:We.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?tf:af),e}function xr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return el(e);if(e.$$typeof===$)return gt(e)}throw Error(c(438,String(e)))}function yo(e){var t=null,a=Ee.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=Ee.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=xo(),Ee.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]=ne;return t.index++,a}function ba(e,t){return typeof t=="function"?t(e):t}function yr(e){var t=et();return bo(t,Ve,e)}function bo(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 x=o.next;o.next=u.next,u.next=x}t.baseQueue=o=u,n.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var b=x=null,C=null,_=t,F=!1;do{var W=_.lane&-536870913;if(W!==_.lane?(Me&W)===W:(Ba&W)===W){var K=_.revertLane;if(K===0)C!==null&&(C=C.next={lane:0,revertLane:0,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),W===Jn&&(F=!0);else if((Ba&K)===K){_=_.next,K===Jn&&(F=!0);continue}else W={lane:0,revertLane:_.revertLane,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},C===null?(b=C=W,x=u):C=C.next=W,Ee.lanes|=K,Xa|=K;W=_.action,Nn&&a(u,W),u=_.hasEagerState?_.eagerState:a(u,W)}else K={lane:W,revertLane:_.revertLane,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},C===null?(b=C=K,x=u):C=C.next=K,Ee.lanes|=W,Xa|=W;_=_.next}while(_!==null&&_!==t);if(C===null?x=u:C.next=b,!kt(u,e.memoizedState)&&(it=!0,F&&(a=In,a!==null)))throw a;e.memoizedState=u,e.baseState=x,e.baseQueue=C,n.lastRenderedState=u}return o===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function vo(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 x=o=o.next;do u=e(u,x.action),x=x.next;while(x!==o);kt(u,t.memoizedState)||(it=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,n]}function wd(e,t,a){var n=Ee,o=et(),u=Ue;if(u){if(a===void 0)throw Error(c(407));a=a()}else a=t();var x=!kt((Ve||o).memoizedState,a);x&&(o.memoizedState=a,it=!0),o=o.queue;var b=Nd.bind(null,n,o,e);if(tl(2048,8,b,[e]),o.getSnapshot!==t||x||We!==null&&We.memoizedState.tag&1){if(n.flags|=2048,as(9,br(),Sd.bind(null,n,o,a,t),null),Ke===null)throw Error(c(349));u||(Ba&124)!==0||jd(n,t,a)}return a}function jd(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ee.updateQueue,t===null?(t=xo(),Ee.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,Cd(t)&&Ed(e)}function Nd(e,t,a){return a(function(){Cd(t)&&Ed(e)})}function Cd(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!kt(e,a)}catch{return!0}}function Ed(e){var t=Qn(e,2);t!==null&&zt(t,e,2)}function wo(e){var t=jt();if(typeof e=="function"){var a=e;if(e=a(),Nn){Yt(!0);try{a()}finally{Yt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:e},t}function kd(e,t,a,n){return e.baseState=a,bo(e,Ve,typeof n=="function"?n:ba)}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(x){u.listeners.push(x)}};k.T!==null?a(!0):u.isTransition=!1,n(u),a=t.pending,a===null?(u.next=t.pending=u,Td(t,u)):(u.next=a.next,t.pending=a.next=u)}}function Td(e,t){var a=t.action,n=t.payload,o=e.state;if(t.isTransition){var u=k.T,x={};k.T=x;try{var b=a(o,n),C=k.S;C!==null&&C(x,b),Ad(e,t,b)}catch(_){jo(e,t,_)}finally{k.T=u}}else try{u=a(o,n),Ad(e,t,u)}catch(_){jo(e,t,_)}}function Ad(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){Rd(e,t,n)},function(n){return jo(e,t,n)}):Rd(e,t,a)}function Rd(e,t,a){t.status="fulfilled",t.value=a,Od(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Td(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,Od(t),t=t.next;while(t!==n)}e.action=null}function Od(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Md(e,t){return t}function zd(e,t){if(Ue){var a=Ke.formState;if(a!==null){e:{var n=Ee;if(Ue){if(Pe){t:{for(var o=Pe,u=na;o.nodeType!==8;){if(!u){o=null;break t}if(o=It(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){Pe=It(o.nextSibling),n=o.data==="F!";break e}}vn(n)}n=!1}n&&(t=a[0])}}return a=jt(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Md,lastRenderedState:t},a.queue=n,a=Id.bind(null,Ee,n),n.dispatch=a,n=wo(!1),u=ko.bind(null,Ee,!1,n.queue),n=jt(),o={state:t,dispatch:null,action:e,pending:null},n.queue=o,a=Kp.bind(null,Ee,o,u,a),o.dispatch=a,n.memoizedState=e,[t,a,!1]}function Dd(e){var t=et();return Ud(t,Ve,e)}function Ud(e,t,a){if(t=bo(e,t,Md)[0],e=yr(ba)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=el(t)}catch(x){throw x===Ps?fr:x}else n=t;t=et();var o=t.queue,u=o.dispatch;return a!==t.memoizedState&&(Ee.flags|=2048,as(9,br(),Yp.bind(null,o,a),null)),[n,u,e]}function Yp(e,t){e.action=t}function Ld(e){var t=et(),a=Ve;if(a!==null)return Ud(t,a,e);et(),t=t.memoizedState,a=et();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function as(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=xo(),Ee.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 _d(){return et().memoizedState}function vr(e,t,a,n){var o=jt();n=n===void 0?null:n,Ee.flags|=e,o.memoizedState=as(1|t,br(),a,n)}function tl(e,t,a,n){var o=et();n=n===void 0?null:n;var u=o.memoizedState.inst;Ve!==null&&n!==null&&fo(n,Ve.memoizedState.deps)?o.memoizedState=as(t,u,a,n):(Ee.flags|=e,o.memoizedState=as(1|t,u,a,n))}function Hd(e,t){vr(8390656,8,e,t)}function Bd(e,t){tl(2048,8,e,t)}function Vd(e,t){return tl(4,2,e,t)}function qd(e,t){return tl(4,4,e,t)}function Gd(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 $d(e,t,a){a=a!=null?a.concat([e]):null,tl(4,4,Gd.bind(null,t,e),a)}function So(){}function Kd(e,t){var a=et();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&fo(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Yd(e,t){var a=et();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&fo(t,n[1]))return n[0];if(n=e(),Nn){Yt(!0);try{e()}finally{Yt(!1)}}return a.memoizedState=[n,t],n}function No(e,t,a){return a===void 0||(Ba&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=Zf(),Ee.lanes|=e,Xa|=e,a)}function Xd(e,t,a,n){return kt(a,t)?a:Wn.current!==null?(e=No(e,a,n),kt(e,t)||(it=!0),e):(Ba&42)===0?(it=!0,e.memoizedState=a):(e=Zf(),Ee.lanes|=e,Xa|=e,t)}function Qd(e,t,a,n,o){var u=q.p;q.p=u!==0&&8>u?u:8;var x=k.T,b={};k.T=b,ko(e,!1,t,a);try{var C=o(),_=k.S;if(_!==null&&_(b,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var F=qp(C,n);al(e,t,F,Mt(e))}else al(e,t,n,Mt(e))}catch(W){al(e,t,{then:function(){},status:"rejected",reason:W},Mt())}finally{q.p=u,k.T=x}}function Xp(){}function Co(e,t,a,n){if(e.tag!==5)throw Error(c(476));var o=Pd(e).queue;Qd(e,o,t,z,a===null?Xp:function(){return Zd(e),a(n)})}function Pd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:z,baseState:z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:z},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Zd(e){var t=Pd(e).next.queue;al(e,t,{},Mt())}function Eo(){return gt(vl)}function Fd(){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=_a(a);var n=Ha(t,e,a);n!==null&&(zt(n,t,a),Fs(n,t,a)),t={cache:to()},e.payload=t;return}t=t.return}}function Pp(e,t,a){var n=Mt();a={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},wr(e)?Wd(t,a):(a=Yi(e,t,a,n),a!==null&&(zt(a,e,n),ef(a,t,n)))}function Id(e,t,a){var n=Mt();al(e,t,a,n)}function al(e,t,a,n){var o={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(wr(e))Wd(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var x=t.lastRenderedState,b=u(x,a);if(o.hasEagerState=!0,o.eagerState=b,kt(b,x))return sr(e,t,o,0),Ke===null&&nr(),!1}catch{}finally{}if(a=Yi(e,t,o,n),a!==null)return zt(a,e,n),ef(a,t,n),!0}return!1}function ko(e,t,a,n){if(n={lane:2,revertLane:lc(),action:n,hasEagerState:!1,eagerState:null,next:null},wr(e)){if(t)throw Error(c(479))}else t=Yi(e,a,n,2),t!==null&&zt(t,e,2)}function wr(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Wd(e,t){es=gr=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function ef(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Et(e,a)}}var jr={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},tf={readContext:gt,use:xr,useCallback:function(e,t){return jt().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Hd,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,vr(4194308,4,Gd.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=jt();t=t===void 0?null:t;var n=e();if(Nn){Yt(!0);try{e()}finally{Yt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=jt();if(a!==void 0){var o=a(t);if(Nn){Yt(!0);try{a(t)}finally{Yt(!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=Pp.bind(null,Ee,e),[n.memoizedState,e]},useRef:function(e){var t=jt();return e={current:e},t.memoizedState=e},useState:function(e){e=wo(e);var t=e.queue,a=Id.bind(null,Ee,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:So,useDeferredValue:function(e,t){var a=jt();return No(a,e,t)},useTransition:function(){var e=wo(!1);return e=Qd.bind(null,Ee,e.queue,!0,!1),jt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Ee,o=jt();if(Ue){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),Ke===null)throw Error(c(349));(Me&124)!==0||jd(n,t,a)}o.memoizedState=a;var u={value:a,getSnapshot:t};return o.queue=u,Hd(Nd.bind(null,n,u,e),[e]),n.flags|=2048,as(9,br(),Sd.bind(null,n,u,a,t),null),a},useId:function(){var e=jt(),t=Ke.identifierPrefix;if(Ue){var a=pa,n=ga;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=Gp++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Eo,useFormState:zd,useActionState:zd,useOptimistic:function(e){var t=jt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=ko.bind(null,Ee,!0,a),a.dispatch=t,[e,t]},useMemoCache:yo,useCacheRefresh:function(){return jt().memoizedState=Qp.bind(null,Ee)}},af={readContext:gt,use:xr,useCallback:Kd,useContext:gt,useEffect:Bd,useImperativeHandle:$d,useInsertionEffect:Vd,useLayoutEffect:qd,useMemo:Yd,useReducer:yr,useRef:_d,useState:function(){return yr(ba)},useDebugValue:So,useDeferredValue:function(e,t){var a=et();return Xd(a,Ve.memoizedState,e,t)},useTransition:function(){var e=yr(ba)[0],t=et().memoizedState;return[typeof e=="boolean"?e:el(e),t]},useSyncExternalStore:wd,useId:Fd,useHostTransitionStatus:Eo,useFormState:Dd,useActionState:Dd,useOptimistic:function(e,t){var a=et();return kd(a,Ve,e,t)},useMemoCache:yo,useCacheRefresh:Jd},Zp={readContext:gt,use:xr,useCallback:Kd,useContext:gt,useEffect:Bd,useImperativeHandle:$d,useInsertionEffect:Vd,useLayoutEffect:qd,useMemo:Yd,useReducer:vo,useRef:_d,useState:function(){return vo(ba)},useDebugValue:So,useDeferredValue:function(e,t){var a=et();return Ve===null?No(a,e,t):Xd(a,Ve.memoizedState,e,t)},useTransition:function(){var e=vo(ba)[0],t=et().memoizedState;return[typeof e=="boolean"?e:el(e),t]},useSyncExternalStore:wd,useId:Fd,useHostTransitionStatus:Eo,useFormState:Ld,useActionState:Ld,useOptimistic:function(e,t){var a=et();return Ve!==null?kd(a,Ve,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:yo,useCacheRefresh:Jd},ns=null,nl=0;function Sr(e){var t=nl;return nl+=1,ns===null&&(ns=[]),md(ns,e,t)}function sl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Nr(e,t){throw t.$$typeof===j?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function nf(e){var t=e._init;return t(e._payload)}function sf(e){function t(D,M){if(e){var U=D.deletions;U===null?(D.deletions=[M],D.flags|=16):U.push(M)}}function a(D,M){if(!e)return null;for(;M!==null;)t(D,M),M=M.sibling;return null}function n(D){for(var M=new Map;D!==null;)D.key!==null?M.set(D.key,D):M.set(D.index,D),D=D.sibling;return M}function o(D,M){return D=ha(D,M),D.index=0,D.sibling=null,D}function u(D,M,U){return D.index=U,e?(U=D.alternate,U!==null?(U=U.index,U<M?(D.flags|=67108866,M):U):(D.flags|=67108866,M)):(D.flags|=1048576,M)}function x(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function b(D,M,U,J){return M===null||M.tag!==6?(M=Qi(U,D.mode,J),M.return=D,M):(M=o(M,U),M.return=D,M)}function C(D,M,U,J){var fe=U.type;return fe===S?F(D,M,U.props.children,J,U.key):M!==null&&(M.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===H&&nf(fe)===M.type)?(M=o(M,U.props),sl(M,U),M.return=D,M):(M=rr(U.type,U.key,U.props,null,D.mode,J),sl(M,U),M.return=D,M)}function _(D,M,U,J){return M===null||M.tag!==4||M.stateNode.containerInfo!==U.containerInfo||M.stateNode.implementation!==U.implementation?(M=Pi(U,D.mode,J),M.return=D,M):(M=o(M,U.children||[]),M.return=D,M)}function F(D,M,U,J,fe){return M===null||M.tag!==7?(M=pn(U,D.mode,J,fe),M.return=D,M):(M=o(M,U),M.return=D,M)}function W(D,M,U){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Qi(""+M,D.mode,U),M.return=D,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case v:return U=rr(M.type,M.key,M.props,null,D.mode,U),sl(U,M),U.return=D,U;case T:return M=Pi(M,D.mode,U),M.return=D,M;case H:var J=M._init;return M=J(M._payload),W(D,M,U)}if(Y(M)||V(M))return M=pn(M,D.mode,U,null),M.return=D,M;if(typeof M.then=="function")return W(D,Sr(M),U);if(M.$$typeof===$)return W(D,ur(D,M),U);Nr(D,M)}return null}function K(D,M,U,J){var fe=M!==null?M.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return fe!==null?null:b(D,M,""+U,J);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case v:return U.key===fe?C(D,M,U,J):null;case T:return U.key===fe?_(D,M,U,J):null;case H:return fe=U._init,U=fe(U._payload),K(D,M,U,J)}if(Y(U)||V(U))return fe!==null?null:F(D,M,U,J,null);if(typeof U.then=="function")return K(D,M,Sr(U),J);if(U.$$typeof===$)return K(D,M,ur(D,U),J);Nr(D,U)}return null}function X(D,M,U,J,fe){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return D=D.get(U)||null,b(M,D,""+J,fe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case v:return D=D.get(J.key===null?U:J.key)||null,C(M,D,J,fe);case T:return D=D.get(J.key===null?U:J.key)||null,_(M,D,J,fe);case H:var Te=J._init;return J=Te(J._payload),X(D,M,U,J,fe)}if(Y(J)||V(J))return D=D.get(U)||null,F(M,D,J,fe,null);if(typeof J.then=="function")return X(D,M,U,Sr(J),fe);if(J.$$typeof===$)return X(D,M,U,ur(M,J),fe);Nr(M,J)}return null}function ve(D,M,U,J){for(var fe=null,Te=null,ge=M,be=M=0,ct=null;ge!==null&&be<U.length;be++){ge.index>be?(ct=ge,ge=null):ct=ge.sibling;var ze=K(D,ge,U[be],J);if(ze===null){ge===null&&(ge=ct);break}e&&ge&&ze.alternate===null&&t(D,ge),M=u(ze,M,be),Te===null?fe=ze:Te.sibling=ze,Te=ze,ge=ct}if(be===U.length)return a(D,ge),Ue&&yn(D,be),fe;if(ge===null){for(;be<U.length;be++)ge=W(D,U[be],J),ge!==null&&(M=u(ge,M,be),Te===null?fe=ge:Te.sibling=ge,Te=ge);return Ue&&yn(D,be),fe}for(ge=n(ge);be<U.length;be++)ct=X(ge,D,be,U[be],J),ct!==null&&(e&&ct.alternate!==null&&ge.delete(ct.key===null?be:ct.key),M=u(ct,M,be),Te===null?fe=ct:Te.sibling=ct,Te=ct);return e&&ge.forEach(function(tn){return t(D,tn)}),Ue&&yn(D,be),fe}function ye(D,M,U,J){if(U==null)throw Error(c(151));for(var fe=null,Te=null,ge=M,be=M=0,ct=null,ze=U.next();ge!==null&&!ze.done;be++,ze=U.next()){ge.index>be?(ct=ge,ge=null):ct=ge.sibling;var tn=K(D,ge,ze.value,J);if(tn===null){ge===null&&(ge=ct);break}e&&ge&&tn.alternate===null&&t(D,ge),M=u(tn,M,be),Te===null?fe=tn:Te.sibling=tn,Te=tn,ge=ct}if(ze.done)return a(D,ge),Ue&&yn(D,be),fe;if(ge===null){for(;!ze.done;be++,ze=U.next())ze=W(D,ze.value,J),ze!==null&&(M=u(ze,M,be),Te===null?fe=ze:Te.sibling=ze,Te=ze);return Ue&&yn(D,be),fe}for(ge=n(ge);!ze.done;be++,ze=U.next())ze=X(ge,D,be,ze.value,J),ze!==null&&(e&&ze.alternate!==null&&ge.delete(ze.key===null?be:ze.key),M=u(ze,M,be),Te===null?fe=ze:Te.sibling=ze,Te=ze);return e&&ge.forEach(function(F0){return t(D,F0)}),Ue&&yn(D,be),fe}function Ge(D,M,U,J){if(typeof U=="object"&&U!==null&&U.type===S&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case v:e:{for(var fe=U.key;M!==null;){if(M.key===fe){if(fe=U.type,fe===S){if(M.tag===7){a(D,M.sibling),J=o(M,U.props.children),J.return=D,D=J;break e}}else if(M.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===H&&nf(fe)===M.type){a(D,M.sibling),J=o(M,U.props),sl(J,U),J.return=D,D=J;break e}a(D,M);break}else t(D,M);M=M.sibling}U.type===S?(J=pn(U.props.children,D.mode,J,U.key),J.return=D,D=J):(J=rr(U.type,U.key,U.props,null,D.mode,J),sl(J,U),J.return=D,D=J)}return x(D);case T:e:{for(fe=U.key;M!==null;){if(M.key===fe)if(M.tag===4&&M.stateNode.containerInfo===U.containerInfo&&M.stateNode.implementation===U.implementation){a(D,M.sibling),J=o(M,U.children||[]),J.return=D,D=J;break e}else{a(D,M);break}else t(D,M);M=M.sibling}J=Pi(U,D.mode,J),J.return=D,D=J}return x(D);case H:return fe=U._init,U=fe(U._payload),Ge(D,M,U,J)}if(Y(U))return ve(D,M,U,J);if(V(U)){if(fe=V(U),typeof fe!="function")throw Error(c(150));return U=fe.call(U),ye(D,M,U,J)}if(typeof U.then=="function")return Ge(D,M,Sr(U),J);if(U.$$typeof===$)return Ge(D,M,ur(D,U),J);Nr(D,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,M!==null&&M.tag===6?(a(D,M.sibling),J=o(M,U),J.return=D,D=J):(a(D,M),J=Qi(U,D.mode,J),J.return=D,D=J),x(D)):a(D,M)}return function(D,M,U,J){try{nl=0;var fe=Ge(D,M,U,J);return ns=null,fe}catch(ge){if(ge===Ps||ge===fr)throw ge;var Te=Tt(29,ge,null,D.mode);return Te.lanes=J,Te.return=D,Te}finally{}}}var ss=sf(!0),lf=sf(!1),Vt=G(null),sa=null;function Va(e){var t=e.alternate;ae(nt,nt.current&1),ae(Vt,e),sa===null&&(t===null||Wn.current!==null||t.memoizedState!==null)&&(sa=e)}function rf(e){if(e.tag===22){if(ae(nt,nt.current),ae(Vt,e),sa===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(sa=e)}}else qa()}function qa(){ae(nt,nt.current),ae(Vt,Vt.current)}function va(e){te(Vt),sa===e&&(sa=null),te(nt)}var nt=G(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==="$?"||xc(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 To(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 Ao={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Mt(),o=_a(n);o.payload=t,a!=null&&(o.callback=a),t=Ha(e,o,n),t!==null&&(zt(t,e,n),Fs(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Mt(),o=_a(n);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=Ha(e,o,n),t!==null&&(zt(t,e,n),Fs(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Mt(),n=_a(a);n.tag=2,t!=null&&(n.callback=t),t=Ha(e,n,a),t!==null&&(zt(t,e,a),Fs(t,e,a))}};function of(e,t,a,n,o,u,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,u,x):t.prototype&&t.prototype.isPureReactComponent?!Vs(a,n)||!Vs(o,u):!0}function cf(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&&Ao.enqueueReplaceState(t,t.state,null)}function Cn(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 uf(e){Er(e)}function df(e){console.error(e)}function ff(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 mf(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 Ro(e,t,a){return a=_a(a),a.tag=3,a.payload={element:null},a.callback=function(){kr(e,t)},a}function hf(e){return e=_a(e),e.tag=3,e}function gf(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(){mf(t,a,n)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){mf(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 Fp(e,t,a,n,o){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Ys(t,a,o,!0),a=Vt.current,a!==null){switch(a.tag){case 13:return sa===null?ec():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),ac(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)),ac(e,n,o)),!1}throw Error(c(435,a.tag))}return ac(e,n,o),ec(),!1}if(Ue)return t=Vt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,n!==Ji&&(e=Error(c(422),{cause:n}),Ks(Lt(e,a)))):(n!==Ji&&(t=Error(c(423),{cause:n}),Ks(Lt(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,n=Lt(n,a),o=Ro(e.stateNode,n,o),io(e,o),Ze!==4&&(Ze=2)),!1;var u=Error(c(520),{cause:n});if(u=Lt(u,a),dl===null?dl=[u]:dl.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=Ro(a.stateNode,n,e),io(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=hf(o),gf(o,e,a,n),io(a,o),!1}a=a.return}while(a!==null);return!1}var pf=Error(c(461)),it=!1;function ut(e,t,a,n){t.child=e===null?lf(t,null,a,n):ss(t,e.child,a,n)}function xf(e,t,a,n,o){a=a.render;var u=t.ref;if("ref"in n){var x={};for(var b in n)b!=="ref"&&(x[b]=n[b])}else x=n;return jn(t),n=mo(e,t,a,x,u,o),b=ho(),e!==null&&!it?(go(e,t,o),wa(e,t,o)):(Ue&&b&&Zi(t),t.flags|=1,ut(e,t,n,o),t.child)}function yf(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,bf(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,!Ho(e,o)){var x=u.memoizedProps;if(a=a.compare,a=a!==null?a:Vs,a(x,n)&&e.ref===t.ref)return wa(e,t,o)}return t.flags|=1,e=ha(u,n),e.ref=t.ref,e.return=t,t.child=e}function bf(e,t,a,n,o){if(e!==null){var u=e.memoizedProps;if(Vs(u,n)&&e.ref===t.ref)if(it=!1,t.pendingProps=n=u,Ho(e,o))(e.flags&131072)!==0&&(it=!0);else return t.lanes=e.lanes,wa(e,t,o)}return Oo(e,t,a,n,o)}function vf(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 wf(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?yd(t,u):co(),rf(t);else return t.lanes=t.childLanes=536870912,wf(e,t,u!==null?u.baseLanes|a:a,a)}else u!==null?(dr(t,u.cachePool),yd(t,u),qa(),t.memoizedState=null):(e!==null&&dr(t,null),co(),qa());return ut(e,t,o,a),t.child}function wf(e,t,a,n){var o=no();return o=o===null?null:{parent:at._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&dr(t,null),co(),rf(t),e!==null&&Ys(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 Oo(e,t,a,n,o){return jn(t),a=mo(e,t,a,n,void 0,o),n=ho(),e!==null&&!it?(go(e,t,o),wa(e,t,o)):(Ue&&n&&Zi(t),t.flags|=1,ut(e,t,a,o),t.child)}function jf(e,t,a,n,o,u){return jn(t),t.updateQueue=null,a=vd(t,n,a,o),bd(e),n=ho(),e!==null&&!it?(go(e,t,u),wa(e,t,u)):(Ue&&n&&Zi(t),t.flags|=1,ut(e,t,a,u),t.child)}function Sf(e,t,a,n,o){if(jn(t),t.stateNode===null){var u=Pn,x=a.contextType;typeof x=="object"&&x!==null&&(u=gt(x)),u=new a(n,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Ao,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=n,u.state=t.memoizedState,u.refs={},lo(t),x=a.contextType,u.context=typeof x=="object"&&x!==null?gt(x):Pn,u.state=t.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(To(t,a,x,n),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(x=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),x!==u.state&&Ao.enqueueReplaceState(u,u.state,null),Is(t,n,u,o),Js(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){u=t.stateNode;var b=t.memoizedProps,C=Cn(a,b);u.props=C;var _=u.context,F=a.contextType;x=Pn,typeof F=="object"&&F!==null&&(x=gt(F));var W=a.getDerivedStateFromProps;F=typeof W=="function"||typeof u.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,F||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(b||_!==x)&&cf(t,u,n,x),La=!1;var K=t.memoizedState;u.state=K,Is(t,n,u,o),Js(),_=t.memoizedState,b||K!==_||La?(typeof W=="function"&&(To(t,a,W,n),_=t.memoizedState),(C=La||of(t,a,C,n,K,_,x))?(F||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=x,n=C):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{u=t.stateNode,ro(e,t),x=t.memoizedProps,F=Cn(a,x),u.props=F,W=t.pendingProps,K=u.context,_=a.contextType,C=Pn,typeof _=="object"&&_!==null&&(C=gt(_)),b=a.getDerivedStateFromProps,(_=typeof b=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(x!==W||K!==C)&&cf(t,u,n,C),La=!1,K=t.memoizedState,u.state=K,Is(t,n,u,o),Js();var X=t.memoizedState;x!==W||K!==X||La||e!==null&&e.dependencies!==null&&cr(e.dependencies)?(typeof b=="function"&&(To(t,a,b,n),X=t.memoizedState),(F=La||of(t,a,F,n,K,X,C)||e!==null&&e.dependencies!==null&&cr(e.dependencies))?(_||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(n,X,C),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(n,X,C)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||x===e.memoizedProps&&K===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&K===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=X),u.props=n,u.state=X,u.context=C,n=F):(typeof u.componentDidUpdate!="function"||x===e.memoizedProps&&K===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&K===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=ss(t,e.child,null,o),t.child=ss(t,null,a,o)):ut(e,t,a,o),t.memoizedState=u.state,e=t.child):e=wa(e,t,o),e}function Nf(e,t,a,n){return $s(),t.flags|=256,ut(e,t,a,n),t.child}var Mo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function zo(e){return{baseLanes:e,cachePool:ud()}}function Do(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=qt),e}function Cf(e,t,a){var n=t.pendingProps,o=!1,u=(t.flags&128)!==0,x;if((x=u)||(x=e!==null&&e.memoizedState===null?!1:(nt.current&2)!==0),x&&(o=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ue){if(o?Va(t):qa(),Ue){var b=Pe,C;if(C=b){e:{for(C=b,b=na;C.nodeType!==8;){if(!b){b=null;break e}if(C=It(C.nextSibling),C===null){b=null;break e}}b=C}b!==null?(t.memoizedState={dehydrated:b,treeContext:xn!==null?{id:ga,overflow:pa}:null,retryLane:536870912,hydrationErrors:null},C=Tt(18,null,null,0),C.stateNode=b,C.return=t,t.child=C,bt=t,Pe=null,C=!0):C=!1}C||vn(t)}if(b=t.memoizedState,b!==null&&(b=b.dehydrated,b!==null))return xc(b)?t.lanes=32:t.lanes=536870912,null;va(t)}return b=n.children,n=n.fallback,o?(qa(),o=t.mode,b=Ar({mode:"hidden",children:b},o),n=pn(n,o,a,null),b.return=t,n.return=t,b.sibling=n,t.child=b,o=t.child,o.memoizedState=zo(a),o.childLanes=Do(e,x,a),t.memoizedState=Mo,n):(Va(t),Uo(t,b))}if(C=e.memoizedState,C!==null&&(b=C.dehydrated,b!==null)){if(u)t.flags&256?(Va(t),t.flags&=-257,t=Lo(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=pn(o,b,a,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,ss(t,e.child,null,a),n=t.child,n.memoizedState=zo(a),n.childLanes=Do(e,x,a),t.memoizedState=Mo,t=o);else if(Va(t),xc(b)){if(x=b.nextSibling&&b.nextSibling.dataset,x)var _=x.dgst;x=_,n=Error(c(419)),n.stack="",n.digest=x,Ks({value:n,source:null,stack:null}),t=Lo(e,t,a)}else if(it||Ys(e,t,a,!1),x=(a&e.childLanes)!==0,it||x){if(x=Ke,x!==null&&(n=a&-a,n=(n&42)!==0?1:aa(n),n=(n&(x.suspendedLanes|a))!==0?0:n,n!==0&&n!==C.retryLane))throw C.retryLane=n,Qn(e,n),zt(x,e,n),pf;b.data==="$?"||ec(),t=Lo(e,t,a)}else b.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=C.treeContext,Pe=It(b.nextSibling),bt=t,Ue=!0,bn=null,na=!1,e!==null&&(Ht[Bt++]=ga,Ht[Bt++]=pa,Ht[Bt++]=xn,ga=e.id,pa=e.overflow,xn=t),t=Uo(t,n.children),t.flags|=4096);return t}return o?(qa(),o=n.fallback,b=t.mode,C=e.child,_=C.sibling,n=ha(C,{mode:"hidden",children:n.children}),n.subtreeFlags=C.subtreeFlags&65011712,_!==null?o=ha(_,o):(o=pn(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=zo(a):(C=b.cachePool,C!==null?(_=at._currentValue,C=C.parent!==_?{parent:_,pool:_}:C):C=ud(),b={baseLanes:b.baseLanes|a,cachePool:C}),o.memoizedState=b,o.childLanes=Do(e,x,a),t.memoizedState=Mo,n):(Va(t),a=e.child,e=a.sibling,a=ha(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=a,t.memoizedState=null,a)}function Uo(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 Lo(e,t,a){return ss(t,e.child,null,a),e=Uo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ef(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Wi(e.return,t,a)}function _o(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 kf(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&&Ef(e,a,t);else if(e.tag===19)Ef(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(ae(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),_o(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}_o(t,!0,a,null,u);break;case"together":_o(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function wa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Xa|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ys(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=ha(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ha(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Ho(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:ce(t,t.stateNode.containerInfo),Ua(t,at,e.memoizedState.cache),$s();break;case 27:case 5:Be(t);break;case 4:ce(t,t.stateNode.containerInfo);break;case 10:Ua(t,t.type,t.memoizedProps.value);break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Va(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Cf(e,t,a):(Va(t),e=wa(e,t,a),e!==null?e.sibling:null);Va(t);break;case 19:var o=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Ys(e,t,a,!1),n=(a&t.childLanes)!==0),o){if(n)return kf(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ae(nt,nt.current),n)break;return null;case 22:case 23:return t.lanes=0,vf(e,t,a);case 24:Ua(t,at,e.memoizedState.cache)}return wa(e,t,a)}function Tf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)it=!0;else{if(!Ho(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&&nd(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=Cn(n,e),t.tag=1,t=Sf(null,t,n,e,a)):(t.tag=0,t=Oo(null,t,n,e,a));else{if(n!=null){if(o=n.$$typeof,o===Z){t.tag=11,t=xf(null,t,n,e,a);break e}else if(o===P){t.tag=14,t=yf(null,t,n,e,a);break e}}throw t=Q(n)||n,Error(c(306,t,""))}}return t;case 0:return Oo(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,o=Cn(n,t.pendingProps),Sf(e,t,n,o,a);case 3:e:{if(ce(t,t.stateNode.containerInfo),e===null)throw Error(c(387));n=t.pendingProps;var u=t.memoizedState;o=u.element,ro(e,t),Is(t,n,null,a);var x=t.memoizedState;if(n=x.cache,Ua(t,at,n),n!==u.cache&&eo(t,[at],a,!0),Js(),n=x.element,u.isDehydrated)if(u={element:n,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Nf(e,t,n,a);break e}else if(n!==o){o=Lt(Error(c(424)),t),Ks(o),t=Nf(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=It(e.firstChild),bt=t,Ue=!0,bn=null,na=!0,a=lf(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if($s(),n===o){t=wa(e,t,a);break e}ut(e,t,n,a)}t=t.child}return t;case 26:return Tr(e,t),e===null?(a=Mm(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ue||(a=t.type,e=t.pendingProps,n=$r(ee.current).createElement(a),n[tt]=t,n[yt]=e,ft(n,a,e),rt(n),t.stateNode=n):t.memoizedState=Mm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Be(t),e===null&&Ue&&(n=t.stateNode=Am(t.type,t.pendingProps,ee.current),bt=t,na=!0,o=Pe,Fa(t.type)?(yc=o,Pe=It(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=C0(n,t.type,t.pendingProps,na),n!==null?(t.stateNode=n,bt=t,Pe=It(n.firstChild),na=!1,o=!0):o=!1),o||vn(t)),Be(t),o=t.type,u=t.pendingProps,x=e!==null?e.memoizedProps:null,n=u.children,hc(o,u)?n=null:x!==null&&hc(o,x)&&(t.flags|=32),t.memoizedState!==null&&(o=mo(e,t,$p,null,null,a),vl._currentValue=o),Tr(e,t),ut(e,t,n,a),t.child;case 6:return e===null&&Ue&&((e=a=Pe)&&(a=E0(a,t.pendingProps,na),a!==null?(t.stateNode=a,bt=t,Pe=null,e=!0):e=!1),e||vn(t)),null;case 13:return Cf(e,t,a);case 4:return ce(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ss(t,null,n,a):ut(e,t,n,a),t.child;case 11:return xf(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,Ua(t,t.type,n.value),ut(e,t,n.children,a),t.child;case 9:return o=t.type._context,n=t.pendingProps.children,jn(t),o=gt(o),n=n(o),t.flags|=1,ut(e,t,n,a),t.child;case 14:return yf(e,t,t.type,t.pendingProps,a);case 15:return bf(e,t,t.type,t.pendingProps,a);case 19:return kf(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=ha(e.child,n),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return vf(e,t,a);case 24:return jn(t),n=gt(at),e===null?(o=no(),o===null&&(o=Ke,u=to(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=a),o=u),t.memoizedState={parent:n,cache:o},lo(t),Ua(t,at,o)):((e.lanes&a)!==0&&(ro(e,t),Is(t,null,null,a),Js()),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),Ua(t,at,n)):(n=u.cache,Ua(t,at,n),n!==o.cache&&eo(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 Af(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!_m(t)){if(t=Vt.current,t!==null&&((Me&4194048)===Me?sa!==null:(Me&62914560)!==Me&&(Me&536870912)===0||t!==sa))throw Zs=so,dd;e.flags|=8192}}function Rr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Xt():536870912,e.lanes|=t,os|=t)}function ll(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 Qe(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 Ip(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 Qe(t),null;case 1:return Qe(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ya(at),xe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Gs(t)?ja(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,rd())),Qe(t),null;case 26:return a=t.memoizedState,e===null?(ja(t),a!==null?(Qe(t),Af(t,a)):(Qe(t),t.flags&=-16777217)):a?a!==e.memoizedState?(ja(t),Qe(t),Af(t,a)):(Qe(t),t.flags&=-16777217):(e.memoizedProps!==n&&ja(t),Qe(t),t.flags&=-16777217),null;case 27:je(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 Qe(t),null}e=de.current,Gs(t)?sd(t):(e=Am(o,n,a),t.stateNode=e,ja(t))}return Qe(t),null;case 5:if(je(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 Qe(t),null}if(e=de.current,Gs(t))sd(t);else{switch(o=$r(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 Qe(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,Gs(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||jm(e.nodeValue,a)),e||vn(t)}else e=$r(e).createTextNode(n),e[tt]=t,t.stateNode=e}return Qe(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Gs(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 $s(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Qe(t),o=!1}else o=rd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(va(t),t):(va(t),null)}if(va(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),Qe(t),null;case 4:return xe(),e===null&&cc(t.stateNode.containerInfo),Qe(t),null;case 10:return ya(t.type),Qe(t),null;case 19:if(te(nt),o=t.memoizedState,o===null)return Qe(t),null;if(n=(t.flags&128)!==0,u=o.rendering,u===null)if(n)ll(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,ll(o,!1),e=u.updateQueue,t.updateQueue=e,Rr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)ad(a,e),a=a.sibling;return ae(nt,nt.current&1|2),t.child}e=e.sibling}o.tail!==null&&Le()>zr&&(t.flags|=128,n=!0,ll(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),ll(o,!0),o.tail===null&&o.tailMode==="hidden"&&!u.alternate&&!Ue)return Qe(t),null}else 2*Le()-o.renderingStartTime>zr&&a!==536870912&&(t.flags|=128,n=!0,ll(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=Le(),t.sibling=null,e=nt.current,ae(nt,n?e&1|2:e&1),t):(Qe(t),null);case 22:case 23:return va(t),uo(),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&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(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&&te(Sn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ya(at),Qe(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Wp(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 ya(at),xe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return je(t),null;case 13:if(va(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));$s()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return te(nt),null;case 4:return xe(),null;case 10:return ya(t.type),null;case 22:case 23:return va(t),uo(),e!==null&&te(Sn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ya(at),null;case 25:return null;default:return null}}function Rf(e,t){switch(Fi(t),t.tag){case 3:ya(at),xe();break;case 26:case 27:case 5:je(t);break;case 4:xe();break;case 13:va(t);break;case 19:te(nt);break;case 10:ya(t.type);break;case 22:case 23:va(t),uo(),e!==null&&te(Sn);break;case 24:ya(at)}}function rl(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,x=a.inst;n=u(),x.destroy=n}a=a.next}while(a!==o)}}catch(b){$e(t,t.return,b)}}function Ga(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 x=n.inst,b=x.destroy;if(b!==void 0){x.destroy=void 0,o=t;var C=a,_=b;try{_()}catch(F){$e(o,C,F)}}}n=n.next}while(n!==u)}}catch(F){$e(t,t.return,F)}}function Of(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{xd(t,a)}catch(n){$e(e,e.return,n)}}}function Mf(e,t,a){a.props=Cn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){$e(e,t,n)}}function il(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){$e(e,t,o)}}function la(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(o){$e(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){$e(e,t,o)}else a.current=null}function zf(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){$e(e,e.return,o)}}function Bo(e,t,a){try{var n=e.stateNode;v0(n,e.type,a,t),n[yt]=t}catch(o){$e(e,e.return,o)}}function Df(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Fa(e.type)||e.tag===4}function Vo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Df(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&&Fa(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 qo(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&&Fa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(qo(e,t,a),e=e.sibling;e!==null;)qo(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&&Fa(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 Uf(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){$e(e,e.return,u)}}var Sa=!1,Ie=!1,Go=!1,Lf=typeof WeakSet=="function"?WeakSet:Set,ot=null;function e0(e,t){if(e=e.containerInfo,fc=Zr,e=Xu(e),Bi(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 x=0,b=-1,C=-1,_=0,F=0,W=e,K=null;t:for(;;){for(var X;W!==a||o!==0&&W.nodeType!==3||(b=x+o),W!==u||n!==0&&W.nodeType!==3||(C=x+n),W.nodeType===3&&(x+=W.nodeValue.length),(X=W.firstChild)!==null;)K=W,W=X;for(;;){if(W===e)break t;if(K===a&&++_===o&&(b=x),K===u&&++F===n&&(C=x),(X=W.nextSibling)!==null)break;W=K,K=W.parentNode}W=X}a=b===-1||C===-1?null:{start:b,end:C}}else a=null}a=a||{start:0,end:0}}else a=null;for(mc={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 ve=Cn(a.type,o,a.elementType===a.type);e=n.getSnapshotBeforeUpdate(ve,u),n.__reactInternalSnapshotBeforeUpdate=e}catch(ye){$e(a,a.return,ye)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)pc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":pc(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 _f(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:$a(e,a),n&4&&rl(5,a);break;case 1:if($a(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(x){$e(a,a.return,x)}else{var o=Cn(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){$e(a,a.return,x)}}n&64&&Of(a),n&512&&il(a,a.return);break;case 3:if($a(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{xd(e,t)}catch(x){$e(a,a.return,x)}}break;case 27:t===null&&n&4&&Uf(a);case 26:case 5:$a(e,a),t===null&&n&4&&zf(a),n&512&&il(a,a.return);break;case 12:$a(e,a);break;case 13:$a(e,a),n&4&&Vf(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=c0.bind(null,a),k0(e,a))));break;case 22:if(n=a.memoizedState!==null||Sa,!n){t=t!==null&&t.memoizedState!==null||Ie,o=Sa;var u=Ie;Sa=n,(Ie=t)&&!u?Ka(e,a,(a.subtreeFlags&8772)!==0):$a(e,a),Sa=o,Ie=u}break;case 30:break;default:$a(e,a)}}function Hf(e){var t=e.alternate;t!==null&&(e.alternate=null,Hf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&vi(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 Ye=null,St=!1;function Na(e,t,a){for(a=a.child;a!==null;)Bf(e,t,a),a=a.sibling}function Bf(e,t,a){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(za,a)}catch{}switch(a.tag){case 26:Ie||la(a,t),Na(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ie||la(a,t);var n=Ye,o=St;Fa(a.type)&&(Ye=a.stateNode,St=!1),Na(e,t,a),pl(a.stateNode),Ye=n,St=o;break;case 5:Ie||la(a,t);case 6:if(n=Ye,o=St,Ye=null,Na(e,t,a),Ye=n,St=o,Ye!==null)if(St)try{(Ye.nodeType===9?Ye.body:Ye.nodeName==="HTML"?Ye.ownerDocument.body:Ye).removeChild(a.stateNode)}catch(u){$e(a,t,u)}else try{Ye.removeChild(a.stateNode)}catch(u){$e(a,t,u)}break;case 18:Ye!==null&&(St?(e=Ye,km(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Nl(e)):km(Ye,a.stateNode));break;case 4:n=Ye,o=St,Ye=a.stateNode.containerInfo,St=!0,Na(e,t,a),Ye=n,St=o;break;case 0:case 11:case 14:case 15:Ie||Ga(2,a,t),Ie||Ga(4,a,t),Na(e,t,a);break;case 1:Ie||(la(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Mf(a,t,n)),Na(e,t,a);break;case 21:Na(e,t,a);break;case 22:Ie=(n=Ie)||a.memoizedState!==null,Na(e,t,a),Ie=n;break;default:Na(e,t,a)}}function Vf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Nl(e)}catch(a){$e(t,t.return,a)}}function t0(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Lf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Lf),t;default:throw Error(c(435,e.tag))}}function $o(e,t){var a=t0(e);t.forEach(function(n){var o=u0.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,x=t,b=x;e:for(;b!==null;){switch(b.tag){case 27:if(Fa(b.type)){Ye=b.stateNode,St=!1;break e}break;case 5:Ye=b.stateNode,St=!1;break e;case 3:case 4:Ye=b.stateNode.containerInfo,St=!0;break e}b=b.return}if(Ye===null)throw Error(c(160));Bf(u,x,o),Ye=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 Jt=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&&(Ga(3,e,e.return),rl(3,e),Ga(5,e,e.return));break;case 1:At(t,e),Rt(e),n&512&&(Ie||a===null||la(a,a.return)),n&64&&Sa&&(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=Jt;if(At(t,e),Rt(e),n&512&&(Ie||a===null||la(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[Os]||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 x=Um("link","href",o).get(n+(a.href||""));if(x){for(var b=0;b<x.length;b++)if(u=x[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)){x.splice(b,1);break t}}u=o.createElement(n),ft(u,n,a),o.head.appendChild(u);break;case"meta":if(x=Um("meta","content",o).get(n+(a.content||""))){for(b=0;b<x.length;b++)if(u=x[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)){x.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 Lm(o,e.type,e.stateNode);else e.stateNode=Dm(o,n,e.memoizedProps);else u!==n?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,n===null?Lm(o,e.type,e.stateNode):Dm(o,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Bo(e,e.memoizedProps,a.memoizedProps)}break;case 27:At(t,e),Rt(e),n&512&&(Ie||a===null||la(a,a.return)),a!==null&&n&4&&Bo(e,e.memoizedProps,a.memoizedProps);break;case 5:if(At(t,e),Rt(e),n&512&&(Ie||a===null||la(a,a.return)),e.flags&32){o=e.stateNode;try{Vn(o,"")}catch(X){$e(e,e.return,X)}}n&4&&e.stateNode!=null&&(o=e.memoizedProps,Bo(e,o,a!==null?a.memoizedProps:o)),n&1024&&(Go=!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(X){$e(e,e.return,X)}}break;case 3:if(Xr=null,o=Jt,Jt=Kr(t.containerInfo),At(t,e),Jt=o,Rt(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Nl(t.containerInfo)}catch(X){$e(e,e.return,X)}Go&&(Go=!1,Gf(e));break;case 4:n=Jt,Jt=Kr(e.stateNode.containerInfo),At(t,e),Rt(e),Jt=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)&&(Zo=Le()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,$o(e,n)));break;case 22:o=e.memoizedState!==null;var C=a!==null&&a.memoizedState!==null,_=Sa,F=Ie;if(Sa=_||o,Ie=F||C,At(t,e),Ie=F,Sa=_,Rt(e),n&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||C||Sa||Ie||En(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){C=a=t;try{if(u=C.stateNode,o)x=u.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{b=C.stateNode;var W=C.memoizedProps.style,K=W!=null&&W.hasOwnProperty("display")?W.display:null;b.style.display=K==null||typeof K=="boolean"?"":(""+K).trim()}}catch(X){$e(C,C.return,X)}}}else if(t.tag===6){if(a===null){C=t;try{C.stateNode.nodeValue=o?"":C.memoizedProps}catch(X){$e(C,C.return,X)}}}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(Df(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 x=a.stateNode;a.flags&32&&(Vn(x,""),a.flags&=-33);var b=Vo(e);Or(e,b,x);break;case 3:case 4:var C=a.stateNode.containerInfo,_=Vo(e);qo(e,_,C);break;default:throw Error(c(161))}}catch(F){$e(e,e.return,F)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Gf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Gf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function $a(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)_f(e,t.alternate,t),t=t.sibling}function En(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ga(4,t,t.return),En(t);break;case 1:la(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Mf(t,t.return,a),En(t);break;case 27:pl(t.stateNode);case 26:case 5:la(t,t.return),En(t);break;case 22:t.memoizedState===null&&En(t);break;case 30:En(t);break;default:En(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,x=u.flags;switch(u.tag){case 0:case 11:case 15:Ka(o,u,a),rl(4,u);break;case 1:if(Ka(o,u,a),n=u,o=n.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(_){$e(n,n.return,_)}if(n=u,o=n.updateQueue,o!==null){var b=n.stateNode;try{var C=o.shared.hiddenCallbacks;if(C!==null)for(o.shared.hiddenCallbacks=null,o=0;o<C.length;o++)pd(C[o],b)}catch(_){$e(n,n.return,_)}}a&&x&64&&Of(u),il(u,u.return);break;case 27:Uf(u);case 26:case 5:Ka(o,u,a),a&&n===null&&x&4&&zf(u),il(u,u.return);break;case 12:Ka(o,u,a);break;case 13:Ka(o,u,a),a&&x&4&&Vf(o,u);break;case 22:u.memoizedState===null&&Ka(o,u,a),il(u,u.return);break;case 30:break;default:Ka(o,u,a)}t=t.sibling}}function Ko(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&&Xs(a))}function Yo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Xs(e))}function ra(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)$f(e,t,a,n),t=t.sibling}function $f(e,t,a,n){var o=t.flags;switch(t.tag){case 0:case 11:case 15:ra(e,t,a,n),o&2048&&rl(9,t);break;case 1:ra(e,t,a,n);break;case 3:ra(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&&Xs(e)));break;case 12:if(o&2048){ra(e,t,a,n),e=t.stateNode;try{var u=t.memoizedProps,x=u.id,b=u.onPostCommit;typeof b=="function"&&b(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){$e(t,t.return,C)}}else ra(e,t,a,n);break;case 13:ra(e,t,a,n);break;case 23:break;case 22:u=t.stateNode,x=t.alternate,t.memoizedState!==null?u._visibility&2?ra(e,t,a,n):ol(e,t):u._visibility&2?ra(e,t,a,n):(u._visibility|=2,ls(e,t,a,n,(t.subtreeFlags&10256)!==0)),o&2048&&Ko(x,t);break;case 24:ra(e,t,a,n),o&2048&&Yo(t.alternate,t);break;default:ra(e,t,a,n)}}function ls(e,t,a,n,o){for(o=o&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var u=e,x=t,b=a,C=n,_=x.flags;switch(x.tag){case 0:case 11:case 15:ls(u,x,b,C,o),rl(8,x);break;case 23:break;case 22:var F=x.stateNode;x.memoizedState!==null?F._visibility&2?ls(u,x,b,C,o):ol(u,x):(F._visibility|=2,ls(u,x,b,C,o)),o&&_&2048&&Ko(x.alternate,x);break;case 24:ls(u,x,b,C,o),o&&_&2048&&Yo(x.alternate,x);break;default:ls(u,x,b,C,o)}t=t.sibling}}function ol(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:ol(a,n),o&2048&&Ko(n.alternate,n);break;case 24:ol(a,n),o&2048&&Yo(n.alternate,n);break;default:ol(a,n)}t=t.sibling}}var cl=8192;function rs(e){if(e.subtreeFlags&cl)for(e=e.child;e!==null;)Kf(e),e=e.sibling}function Kf(e){switch(e.tag){case 26:rs(e),e.flags&cl&&e.memoizedState!==null&&V0(Jt,e.memoizedState,e.memoizedProps);break;case 5:rs(e);break;case 3:case 4:var t=Jt;Jt=Kr(e.stateNode.containerInfo),rs(e),Jt=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=cl,cl=16777216,rs(e),cl=t):rs(e));break;default:rs(e)}}function Yf(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 ul(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)}Yf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Xf(e),e=e.sibling}function Xf(e){switch(e.tag){case 0:case 11:case 15:ul(e),e.flags&2048&&Ga(9,e,e.return);break;case 3:ul(e);break;case 12:ul(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)):ul(e);break;default:ul(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)}Yf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ga(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:Ga(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:Xs(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(Hf(n),n===a){ot=null;break e}if(o!==null){o.return=u,ot=o;break e}ot=u}}}var a0={getCacheForType:function(e){var t=gt(at),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},n0=typeof WeakMap=="function"?WeakMap:Map,_e=0,Ke=null,Ae=null,Me=0,He=0,Ot=null,Ya=!1,is=!1,Xo=!1,Ca=0,Ze=0,Xa=0,kn=0,Qo=0,qt=0,os=0,dl=null,Nt=null,Po=!1,Zo=0,zr=1/0,Dr=null,Qa=null,dt=0,Pa=null,cs=null,us=0,Fo=0,Jo=null,Pf=null,fl=0,Io=null;function Mt(){if((_e&2)!==0&&Me!==0)return Me&-Me;if(k.T!==null){var e=Jn;return e!==0?e:lc()}return Rs()}function Zf(){qt===0&&(qt=(Me&536870912)===0||Ue?pe():536870912);var e=Vt.current;return e!==null&&(e.flags|=32),qt}function zt(e,t,a){(e===Ke&&(He===2||He===9)||e.cancelPendingCommit!==null)&&(ds(e,0),Za(e,Me,qt,!1)),Pt(e,a),((_e&2)===0||e!==Ke)&&(e===Ke&&((_e&2)===0&&(kn|=a),Ze===4&&Za(e,Me,qt,!1)),ia(e))}function Ff(e,t,a){if((_e&6)!==0)throw Error(c(327));var n=!a&&(t&124)===0&&(t&e.expiredLanes)===0||ue(e,t),o=n?r0(e,t):tc(e,t,!0),u=n;do{if(o===0){is&&!n&&Za(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!s0(a)){o=tc(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var b=e;o=dl;var C=b.current.memoizedState.isDehydrated;if(C&&(ds(b,x).flags|=256),x=tc(b,x,!1),x!==2){if(Xo&&!C){b.errorRecoveryDisabledLanes|=u,kn|=u,o=4;break e}u=Nt,Nt=o,u!==null&&(Nt===null?Nt=u:Nt.push.apply(Nt,u))}o=x}if(u=!1,o!==2)continue}}if(o===1){ds(e,0),Za(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:Za(n,t,qt,!Ya);break e;case 2:Nt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(o=Zo+300-Le(),10<o)){if(Za(n,t,qt,!Ya),un(n,0,!0)!==0)break e;n.timeoutHandle=Cm(Jf.bind(null,n,a,Nt,Dr,Po,t,qt,kn,os,Ya,u,2,-0,0),o);break e}Jf(n,a,Nt,Dr,Po,t,qt,kn,os,Ya,u,0,-0,0)}}break}while(!0);ia(e)}function Jf(e,t,a,n,o,u,x,b,C,_,F,W,K,X){if(e.timeoutHandle=-1,W=t.subtreeFlags,(W&8192||(W&16785408)===16785408)&&(bl={stylesheets:null,count:0,unsuspend:B0},Kf(t),W=q0(),W!==null)){e.cancelPendingCommit=W(sm.bind(null,e,t,u,a,n,o,x,b,C,F,1,K,X)),Za(e,u,x,!_);return}sm(e,t,u,a,n,o,x,b,C)}function s0(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 Za(e,t,a,n){t&=~Qo,t&=~kn,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var o=t;0<o;){var u=31-ht(o),x=1<<u;n[u]=-1,o&=~x}a!==0&&Kl(e,a,t)}function Ur(){return(_e&6)===0?(ml(0),!1):!0}function Wo(){if(Ae!==null){if(He===0)var e=Ae.return;else e=Ae,xa=wn=null,po(e),ns=null,nl=0,e=Ae;for(;e!==null;)Rf(e.alternate,e),e=e.return;Ae=null}}function ds(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,j0(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Wo(),Ke=e,Ae=a=ha(e.current,null),Me=t,He=0,Ot=null,Ya=!1,is=ue(e,t),Xo=!1,os=qt=Qo=kn=Xa=Ze=0,Nt=dl=null,Po=!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 Ca=t,nr(),a}function If(e,t){Ee=null,k.H=jr,t===Ps||t===fr?(t=hd(),He=3):t===dd?(t=hd(),He=4):He=t===pf?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 Wf(){var e=k.H;return k.H=jr,e===null?jr:e}function em(){var e=k.A;return k.A=a0,e}function ec(){Ze=4,Ya||(Me&4194048)!==Me&&Vt.current!==null||(is=!0),(Xa&134217727)===0&&(kn&134217727)===0||Ke===null||Za(Ke,Me,qt,!1)}function tc(e,t,a){var n=_e;_e|=2;var o=Wf(),u=em();(Ke!==e||Me!==t)&&(Dr=null,ds(e,t)),t=!1;var x=Ze;e:do try{if(He!==0&&Ae!==null){var b=Ae,C=Ot;switch(He){case 8:Wo(),x=6;break e;case 3:case 2:case 9:case 6:Vt.current===null&&(t=!0);var _=He;if(He=0,Ot=null,fs(e,b,C,_),a&&is){x=0;break e}break;default:_=He,He=0,Ot=null,fs(e,b,C,_)}}l0(),x=Ze;break}catch(F){If(e,F)}while(!0);return t&&e.shellSuspendCounter++,xa=wn=null,_e=n,k.H=o,k.A=u,Ae===null&&(Ke=null,Me=0,nr()),x}function l0(){for(;Ae!==null;)tm(Ae)}function r0(e,t){var a=_e;_e|=2;var n=Wf(),o=em();Ke!==e||Me!==t?(Dr=null,zr=Le()+500,ds(e,t)):is=ue(e,t);e:do try{if(He!==0&&Ae!==null){t=Ae;var u=Ot;t:switch(He){case 1:He=0,Ot=null,fs(e,t,u,1);break;case 2:case 9:if(fd(u)){He=0,Ot=null,am(t);break}t=function(){He!==2&&He!==9||Ke!==e||(He=7),ia(e)},u.then(t,t);break e;case 3:He=7;break e;case 4:He=5;break e;case 7:fd(u)?(He=0,Ot=null,am(t)):(He=0,Ot=null,fs(e,t,u,7));break;case 5:var x=null;switch(Ae.tag){case 26:x=Ae.memoizedState;case 5:case 27:var b=Ae;if(!x||_m(x)){He=0,Ot=null;var C=b.sibling;if(C!==null)Ae=C;else{var _=b.return;_!==null?(Ae=_,Lr(_)):Ae=null}break t}}He=0,Ot=null,fs(e,t,u,5);break;case 6:He=0,Ot=null,fs(e,t,u,6);break;case 8:Wo(),Ze=6;break e;default:throw Error(c(462))}}i0();break}catch(F){If(e,F)}while(!0);return xa=wn=null,k.H=n,k.A=o,_e=a,Ae!==null?0:(Ke=null,Me=0,nr(),Ze)}function i0(){for(;Ae!==null&&!ua();)tm(Ae)}function tm(e){var t=Tf(e.alternate,e,Ca);e.memoizedProps=e.pendingProps,t===null?Lr(e):Ae=t}function am(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=jf(a,t,t.pendingProps,t.type,void 0,Me);break;case 11:t=jf(a,t,t.pendingProps,t.type.render,t.ref,Me);break;case 5:po(t);default:Rf(a,t),t=Ae=ad(t,Ca),t=Tf(a,t,Ca)}e.memoizedProps=e.pendingProps,t===null?Lr(e):Ae=t}function fs(e,t,a,n){xa=wn=null,po(t),ns=null,nl=0;var o=t.return;try{if(Fp(e,o,t,a,Me)){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:is||(Me&536870912)!==0?e=!1:(Ya=e=!0,(n===2||n===9||n===3||n===6)&&(n=Vt.current,n!==null&&n.tag===13&&(n.flags|=16384))),nm(t,e)):Lr(t)}function Lr(e){var t=e;do{if((t.flags&32768)!==0){nm(t,Ya);return}e=t.return;var a=Ip(t.alternate,t,Ca);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 nm(e,t){do{var a=Wp(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 sm(e,t,a,n,o,u,x,b,C){e.cancelPendingCommit=null;do _r();while(dt!==0);if((_e&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(u=t.lanes|t.childLanes,u|=Ki,dn(e,a,u,x,b,C),e===Ke&&(Ae=Ke=null,Me=0),cs=t,Pa=e,us=a,Fo=u,Jo=o,Pf=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,d0(da,function(){return cm(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=k.T,k.T=null,o=q.p,q.p=2,x=_e,_e|=4;try{e0(e,t,a)}finally{_e=x,q.p=o,k.T=n}}dt=1,lm(),rm(),im()}}function lm(){if(dt===1){dt=0;var e=Pa,t=cs,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=k.T,k.T=null;var n=q.p;q.p=2;var o=_e;_e|=4;try{qf(t,e);var u=mc,x=Xu(e.containerInfo),b=u.focusedElem,C=u.selectionRange;if(x!==b&&b&&b.ownerDocument&&Yu(b.ownerDocument.documentElement,b)){if(C!==null&&Bi(b)){var _=C.start,F=C.end;if(F===void 0&&(F=_),"selectionStart"in b)b.selectionStart=_,b.selectionEnd=Math.min(F,b.value.length);else{var W=b.ownerDocument||document,K=W&&W.defaultView||window;if(K.getSelection){var X=K.getSelection(),ve=b.textContent.length,ye=Math.min(C.start,ve),Ge=C.end===void 0?ye:Math.min(C.end,ve);!X.extend&&ye>Ge&&(x=Ge,Ge=ye,ye=x);var D=Ku(b,ye),M=Ku(b,Ge);if(D&&M&&(X.rangeCount!==1||X.anchorNode!==D.node||X.anchorOffset!==D.offset||X.focusNode!==M.node||X.focusOffset!==M.offset)){var U=W.createRange();U.setStart(D.node,D.offset),X.removeAllRanges(),ye>Ge?(X.addRange(U),X.extend(M.node,M.offset)):(U.setEnd(M.node,M.offset),X.addRange(U))}}}}for(W=[],X=b;X=X.parentNode;)X.nodeType===1&&W.push({element:X,left:X.scrollLeft,top:X.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<W.length;b++){var J=W[b];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}Zr=!!fc,mc=fc=null}finally{_e=o,q.p=n,k.T=a}}e.current=t,dt=2}}function rm(){if(dt===2){dt=0;var e=Pa,t=cs,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=k.T,k.T=null;var n=q.p;q.p=2;var o=_e;_e|=4;try{_f(e,t.alternate,t)}finally{_e=o,q.p=n,k.T=a}}dt=3}}function im(){if(dt===4||dt===3){dt=0,rn();var e=Pa,t=cs,a=us,n=Pf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?dt=5:(dt=0,cs=Pa=null,om(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Qa=null),Mn(a),t=t.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot(za,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=k.T,o=q.p,q.p=2,k.T=null;try{for(var u=e.onRecoverableError,x=0;x<n.length;x++){var b=n[x];u(b.value,{componentStack:b.stack})}}finally{k.T=t,q.p=o}}(us&3)!==0&&_r(),ia(e),o=e.pendingLanes,(a&4194090)!==0&&(o&42)!==0?e===Io?fl++:(fl=0,Io=e):fl=0,ml(0)}}function om(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Xs(t)))}function _r(e){return lm(),rm(),im(),cm()}function cm(){if(dt!==5)return!1;var e=Pa,t=Fo;Fo=0;var a=Mn(us),n=k.T,o=q.p;try{q.p=32>a?32:a,k.T=null,a=Jo,Jo=null;var u=Pa,x=us;if(dt=0,cs=Pa=null,us=0,(_e&6)!==0)throw Error(c(331));var b=_e;if(_e|=4,Xf(u.current),$f(u,u.current,x,a),_e=b,ml(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(za,u)}catch{}return!0}finally{q.p=o,k.T=n,om(e,t)}}function um(e,t,a){t=Lt(a,t),t=Ro(e.stateNode,t,2),e=Ha(e,t,2),e!==null&&(Pt(e,2),ia(e))}function $e(e,t,a){if(e.tag===3)um(e,e,a);else for(;t!==null;){if(t.tag===3){um(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=hf(2),n=Ha(t,a,2),n!==null&&(gf(a,n,t,e),Pt(n,2),ia(n));break}}t=t.return}}function ac(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new n0;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=o0.bind(null,e,t,a),t.then(e,e))}function o0(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ke===e&&(Me&a)===a&&(Ze===4||Ze===3&&(Me&62914560)===Me&&300>Le()-Zo?(_e&2)===0&&ds(e,0):Qo|=a,os===Me&&(os=0)),ia(e)}function dm(e,t){t===0&&(t=Xt()),e=Qn(e,t),e!==null&&(Pt(e,t),ia(e))}function c0(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),dm(e,a)}function u0(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),dm(e,a)}function d0(e,t){return Fe(e,t)}var Hr=null,ms=null,nc=!1,Br=!1,sc=!1,Tn=0;function ia(e){e!==ms&&e.next===null&&(ms===null?Hr=ms=e:ms=ms.next=e),Br=!0,nc||(nc=!0,m0())}function ml(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 x=n.suspendedLanes,b=n.pingedLanes;u=(1<<31-ht(42|e)+1)-1,u&=o&~(x&~b),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,gm(n,u))}else u=Me,u=un(n,n===Ke?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||ue(n,u)||(a=!0,gm(n,u));n=n.next}while(a);sc=!1}}function f0(){fm()}function fm(){Br=nc=!1;var e=0;Tn!==0&&(w0()&&(e=Tn),Tn=0);for(var t=Le(),a=null,n=Hr;n!==null;){var o=n.next,u=mm(n,t);u===0?(n.next=null,a===null?Hr=o:a.next=o,o===null&&(ms=a)):(a=n,(e!==0||(u&3)!==0)&&(Br=!0)),n=o}ml(e)}function mm(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var x=31-ht(u),b=1<<x,C=o[x];C===-1?((b&a)===0||(b&n)!==0)&&(o[x]=ie(b,t)):C<=t&&(e.expiredLanes|=b),u&=~b}if(t=Ke,a=Me,a=un(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(He===2||He===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Ct(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ue(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Ct(n),Mn(a)){case 2:case 8:a=Oa;break;case 32:a=da;break;case 268435456:a=As;break;default:a=da}return n=hm.bind(null,e),a=Fe(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Ct(n),e.callbackPriority=2,e.callbackNode=null,2}function hm(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=Me;return n=un(e,e===Ke?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Ff(e,n,t),mm(e,Le()),e.callbackNode!=null&&e.callbackNode===a?hm.bind(null,e):null)}function gm(e,t){if(_r())return null;Ff(e,t,!0)}function m0(){S0(function(){(_e&6)!==0?Fe(Ra,f0):fm()})}function lc(){return Tn===0&&(Tn=pe()),Tn}function pm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Fl(""+e)}function xm(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 h0(e,t,a,n,o){if(t==="submit"&&a&&a.stateNode===o){var u=pm((o[yt]||null).action),x=n.submitter;x&&(t=(t=x[yt]||null)?pm(t.formAction):x.getAttribute("formAction"),t!==null&&(u=t,x=null));var b=new er("action","action",null,n,o);e.push({event:b,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Tn!==0){var C=x?xm(o,x):new FormData(o);Co(a,{pending:!0,data:C,method:o.method,action:u},null,C)}}else typeof u=="function"&&(b.preventDefault(),C=x?xm(o,x):new FormData(o),Co(a,{pending:!0,data:C,method:o.method,action:u},u,C))},currentTarget:o}]})}}for(var rc=0;rc<$i.length;rc++){var ic=$i[rc],g0=ic.toLowerCase(),p0=ic[0].toUpperCase()+ic.slice(1);Ft(g0,"on"+p0)}Ft(Zu,"onAnimationEnd"),Ft(Fu,"onAnimationIteration"),Ft(Ju,"onAnimationStart"),Ft("dblclick","onDoubleClick"),Ft("focusin","onFocus"),Ft("focusout","onBlur"),Ft(zp,"onTransitionRun"),Ft(Dp,"onTransitionStart"),Ft(Up,"onTransitionCancel"),Ft(Iu,"onTransitionEnd"),_n("onMouseEnter",["mouseout","mouseover"]),_n("onMouseLeave",["mouseout","mouseover"]),_n("onPointerEnter",["pointerout","pointerover"]),_n("onPointerLeave",["pointerout","pointerover"]),fn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fn("onBeforeInput",["compositionend","keypress","textInput","paste"]),fn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hl="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(" "),x0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hl));function ym(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 x=n.length-1;0<=x;x--){var b=n[x],C=b.instance,_=b.currentTarget;if(b=b.listener,C!==u&&o.isPropagationStopped())break e;u=b,o.currentTarget=_;try{u(o)}catch(F){Er(F)}o.currentTarget=null,u=C}else for(x=0;x<n.length;x++){if(b=n[x],C=b.instance,_=b.currentTarget,b=b.listener,C!==u&&o.isPropagationStopped())break e;u=b,o.currentTarget=_;try{u(o)}catch(F){Er(F)}o.currentTarget=null,u=C}}}}function Re(e,t){var a=t[bi];a===void 0&&(a=t[bi]=new Set);var n=e+"__bubble";a.has(n)||(bm(t,e,2,!1),a.add(n))}function oc(e,t,a){var n=0;t&&(n|=4),bm(a,e,n,t)}var Vr="_reactListening"+Math.random().toString(36).slice(2);function cc(e){if(!e[Vr]){e[Vr]=!0,du.forEach(function(a){a!=="selectionchange"&&(x0.has(a)||oc(a,!1,e),oc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Vr]||(t[Vr]=!0,oc("selectionchange",!1,t))}}function bm(e,t,a,n){switch($m(t)){case 2:var o=K0;break;case 8:o=Y0;break;default:o=Sc}a=o.bind(null,t,a,e),o=void 0,!Ri||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 uc(e,t,a,n,o){var u=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var x=n.tag;if(x===3||x===4){var b=n.stateNode.containerInfo;if(b===o)break;if(x===4)for(x=n.return;x!==null;){var C=x.tag;if((C===3||C===4)&&x.stateNode.containerInfo===o)return;x=x.return}for(;b!==null;){if(x=Dn(b),x===null)return;if(C=x.tag,C===5||C===6||C===26||C===27){n=u=x;continue e}b=b.parentNode}}n=n.return}Cu(function(){var _=u,F=Ti(a),W=[];e:{var K=Wu.get(e);if(K!==void 0){var X=er,ve=e;switch(e){case"keypress":if(Il(a)===0)break e;case"keydown":case"keyup":X=dp;break;case"focusin":ve="focus",X=Di;break;case"focusout":ve="blur",X=Di;break;case"beforeblur":case"afterblur":X=Di;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":X=Tu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=Wg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=hp;break;case Zu:case Fu:case Ju:X=ap;break;case Iu:X=pp;break;case"scroll":case"scrollend":X=Jg;break;case"wheel":X=yp;break;case"copy":case"cut":case"paste":X=sp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=Ru;break;case"toggle":case"beforetoggle":X=vp}var ye=(t&4)!==0,Ge=!ye&&(e==="scroll"||e==="scrollend"),D=ye?K!==null?K+"Capture":null:K;ye=[];for(var M=_,U;M!==null;){var J=M;if(U=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||U===null||D===null||(J=zs(M,D),J!=null&&ye.push(gl(M,J,U))),Ge)break;M=M.return}0<ye.length&&(K=new X(K,ve,null,a,F),W.push({event:K,listeners:ye}))}}if((t&7)===0){e:{if(K=e==="mouseover"||e==="pointerover",X=e==="mouseout"||e==="pointerout",K&&a!==ki&&(ve=a.relatedTarget||a.fromElement)&&(Dn(ve)||ve[zn]))break e;if((X||K)&&(K=F.window===F?F:(K=F.ownerDocument)?K.defaultView||K.parentWindow:window,X?(ve=a.relatedTarget||a.toElement,X=_,ve=ve?Dn(ve):null,ve!==null&&(Ge=f(ve),ye=ve.tag,ve!==Ge||ye!==5&&ye!==27&&ye!==6)&&(ve=null)):(X=null,ve=_),X!==ve)){if(ye=Tu,J="onMouseLeave",D="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(ye=Ru,J="onPointerLeave",D="onPointerEnter",M="pointer"),Ge=X==null?K:Ms(X),U=ve==null?K:Ms(ve),K=new ye(J,M+"leave",X,a,F),K.target=Ge,K.relatedTarget=U,J=null,Dn(F)===_&&(ye=new ye(D,M+"enter",ve,a,F),ye.target=U,ye.relatedTarget=Ge,J=ye),Ge=J,X&&ve)t:{for(ye=X,D=ve,M=0,U=ye;U;U=hs(U))M++;for(U=0,J=D;J;J=hs(J))U++;for(;0<M-U;)ye=hs(ye),M--;for(;0<U-M;)D=hs(D),U--;for(;M--;){if(ye===D||D!==null&&ye===D.alternate)break t;ye=hs(ye),D=hs(D)}ye=null}else ye=null;X!==null&&vm(W,K,X,ye,!1),ve!==null&&Ge!==null&&vm(W,Ge,ve,ye,!0)}}e:{if(K=_?Ms(_):window,X=K.nodeName&&K.nodeName.toLowerCase(),X==="select"||X==="input"&&K.type==="file")var fe=Hu;else if(Lu(K))if(Bu)fe=Rp;else{fe=Tp;var Te=kp}else X=K.nodeName,!X||X.toLowerCase()!=="input"||K.type!=="checkbox"&&K.type!=="radio"?_&&Ei(_.elementType)&&(fe=Hu):fe=Ap;if(fe&&(fe=fe(e,_))){_u(W,fe,a,F);break e}Te&&Te(e,K,_),e==="focusout"&&_&&K.type==="number"&&_.memoizedProps.value!=null&&Ci(K,"number",K.value)}switch(Te=_?Ms(_):window,e){case"focusin":(Lu(Te)||Te.contentEditable==="true")&&(Kn=Te,Vi=_,qs=null);break;case"focusout":qs=Vi=Kn=null;break;case"mousedown":qi=!0;break;case"contextmenu":case"mouseup":case"dragend":qi=!1,Qu(W,a,F);break;case"selectionchange":if(Mp)break;case"keydown":case"keyup":Qu(W,a,F)}var ge;if(Li)e:{switch(e){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else $n?Du(e,a)&&(be="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(be="onCompositionStart");be&&(Ou&&a.locale!=="ko"&&($n||be!=="onCompositionStart"?be==="onCompositionEnd"&&$n&&(ge=Eu()):(Da=F,Oi="value"in Da?Da.value:Da.textContent,$n=!0)),Te=qr(_,be),0<Te.length&&(be=new Au(be,e,null,a,F),W.push({event:be,listeners:Te}),ge?be.data=ge:(ge=Uu(a),ge!==null&&(be.data=ge)))),(ge=jp?Sp(e,a):Np(e,a))&&(be=qr(_,"onBeforeInput"),0<be.length&&(Te=new Au("onBeforeInput","beforeinput",null,a,F),W.push({event:Te,listeners:be}),Te.data=ge)),h0(W,e,_,a,F)}ym(W,t)})}function gl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function qr(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=zs(e,a),o!=null&&n.unshift(gl(e,o,u)),o=zs(e,t),o!=null&&n.push(gl(e,o,u))),e.tag===3)return n;e=e.return}return[]}function hs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function vm(e,t,a,n,o){for(var u=t._reactName,x=[];a!==null&&a!==n;){var b=a,C=b.alternate,_=b.stateNode;if(b=b.tag,C!==null&&C===n)break;b!==5&&b!==26&&b!==27||_===null||(C=_,o?(_=zs(a,u),_!=null&&x.unshift(gl(a,_,C))):o||(_=zs(a,u),_!=null&&x.push(gl(a,_,C)))),a=a.return}x.length!==0&&e.push({event:t,listeners:x})}var y0=/\r\n?/g,b0=/\u0000|\uFFFD/g;function wm(e){return(typeof e=="string"?e:""+e).replace(y0,`
|
|
49
|
+
`).replace(b0,"")}function jm(e,t){return t=wm(t),wm(e)===t}function Gr(){}function qe(e,t,a,n,o,u){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Vn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Vn(e,""+n);break;case"className":Ql(e,"class",n);break;case"tabIndex":Ql(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ql(e,a,n);break;case"style":Su(e,n,u);break;case"data":if(t!=="object"){Ql(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=Fl(""+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"&&qe(e,t,"name",o.name,o,null),qe(e,t,"formEncType",o.formEncType,o,null),qe(e,t,"formMethod",o.formMethod,o,null),qe(e,t,"formTarget",o.formTarget,o,null)):(qe(e,t,"encType",o.encType,o,null),qe(e,t,"method",o.method,o,null),qe(e,t,"target",o.target,o,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Fl(""+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=Fl(""+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),Xl(e,"popover",n);break;case"xlinkActuate":fa(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":fa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":fa(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":fa(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":fa(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":fa(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":fa(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":fa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":fa(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Xl(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=Zg.get(a)||a,Xl(e,a,n))}}function dc(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"?Vn(e,n):(typeof n=="number"||typeof n=="bigint")&&Vn(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(!fu.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,""):Xl(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 x=a[u];if(x!=null)switch(u){case"src":n=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:qe(e,t,u,x,a,null)}}o&&qe(e,t,"srcSet",a.srcSet,a,null),n&&qe(e,t,"src",a.src,a,null);return;case"input":Re("invalid",e);var b=u=x=o=null,C=null,_=null;for(n in a)if(a.hasOwnProperty(n)){var F=a[n];if(F!=null)switch(n){case"name":o=F;break;case"type":x=F;break;case"checked":C=F;break;case"defaultChecked":_=F;break;case"value":u=F;break;case"defaultValue":b=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(c(137,t));break;default:qe(e,t,n,F,a,null)}}bu(e,u,b,C,_,x,o,!1),Pl(e);return;case"select":Re("invalid",e),n=x=u=null;for(o in a)if(a.hasOwnProperty(o)&&(b=a[o],b!=null))switch(o){case"value":u=b;break;case"defaultValue":x=b;break;case"multiple":n=b;default:qe(e,t,o,b,a,null)}t=u,a=x,e.multiple=!!n,t!=null?Bn(e,!!n,t,!1):a!=null&&Bn(e,!!n,a,!0);return;case"textarea":Re("invalid",e),u=o=n=null;for(x in a)if(a.hasOwnProperty(x)&&(b=a[x],b!=null))switch(x){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:qe(e,t,x,b,a,null)}wu(e,n,o,u),Pl(e);return;case"option":for(C in a)if(a.hasOwnProperty(C)&&(n=a[C],n!=null))switch(C){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:qe(e,t,C,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<hl.length;n++)Re(hl[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:qe(e,t,_,n,a,null)}return;default:if(Ei(t)){for(F in a)a.hasOwnProperty(F)&&(n=a[F],n!==void 0&&dc(e,t,F,n,a,void 0));return}}for(b in a)a.hasOwnProperty(b)&&(n=a[b],n!=null&&qe(e,t,b,n,a,null))}function v0(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,x=null,b=null,C=null,_=null,F=null;for(X in a){var W=a[X];if(a.hasOwnProperty(X)&&W!=null)switch(X){case"checked":break;case"value":break;case"defaultValue":C=W;default:n.hasOwnProperty(X)||qe(e,t,X,null,n,W)}}for(var K in n){var X=n[K];if(W=a[K],n.hasOwnProperty(K)&&(X!=null||W!=null))switch(K){case"type":u=X;break;case"name":o=X;break;case"checked":_=X;break;case"defaultChecked":F=X;break;case"value":x=X;break;case"defaultValue":b=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(c(137,t));break;default:X!==W&&qe(e,t,K,X,n,W)}}Ni(e,x,b,C,_,F,u,o);return;case"select":X=x=b=K=null;for(u in a)if(C=a[u],a.hasOwnProperty(u)&&C!=null)switch(u){case"value":break;case"multiple":X=C;default:n.hasOwnProperty(u)||qe(e,t,u,null,n,C)}for(o in n)if(u=n[o],C=a[o],n.hasOwnProperty(o)&&(u!=null||C!=null))switch(o){case"value":K=u;break;case"defaultValue":b=u;break;case"multiple":x=u;default:u!==C&&qe(e,t,o,u,n,C)}t=b,a=x,n=X,K!=null?Bn(e,!!a,K,!1):!!n!=!!a&&(t!=null?Bn(e,!!a,t,!0):Bn(e,!!a,a?[]:"",!1));return;case"textarea":X=K=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:qe(e,t,b,null,n,o)}for(x in n)if(o=n[x],u=a[x],n.hasOwnProperty(x)&&(o!=null||u!=null))switch(x){case"value":K=o;break;case"defaultValue":X=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(c(91));break;default:o!==u&&qe(e,t,x,o,n,u)}vu(e,K,X);return;case"option":for(var ve in a)if(K=a[ve],a.hasOwnProperty(ve)&&K!=null&&!n.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:qe(e,t,ve,null,n,K)}for(C in n)if(K=n[C],X=a[C],n.hasOwnProperty(C)&&K!==X&&(K!=null||X!=null))switch(C){case"selected":e.selected=K&&typeof K!="function"&&typeof K!="symbol";break;default:qe(e,t,C,K,n,X)}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 ye in a)K=a[ye],a.hasOwnProperty(ye)&&K!=null&&!n.hasOwnProperty(ye)&&qe(e,t,ye,null,n,K);for(_ in n)if(K=n[_],X=a[_],n.hasOwnProperty(_)&&K!==X&&(K!=null||X!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(c(137,t));break;default:qe(e,t,_,K,n,X)}return;default:if(Ei(t)){for(var Ge in a)K=a[Ge],a.hasOwnProperty(Ge)&&K!==void 0&&!n.hasOwnProperty(Ge)&&dc(e,t,Ge,void 0,n,K);for(F in n)K=n[F],X=a[F],!n.hasOwnProperty(F)||K===X||K===void 0&&X===void 0||dc(e,t,F,K,n,X);return}}for(var D in a)K=a[D],a.hasOwnProperty(D)&&K!=null&&!n.hasOwnProperty(D)&&qe(e,t,D,null,n,K);for(W in n)K=n[W],X=a[W],!n.hasOwnProperty(W)||K===X||K==null&&X==null||qe(e,t,W,K,n,X)}var fc=null,mc=null;function $r(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 Nm(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 hc(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 gc=null;function w0(){var e=window.event;return e&&e.type==="popstate"?e===gc?!1:(gc=e,!0):(gc=null,!1)}var Cm=typeof setTimeout=="function"?setTimeout:void 0,j0=typeof clearTimeout=="function"?clearTimeout:void 0,Em=typeof Promise=="function"?Promise:void 0,S0=typeof queueMicrotask=="function"?queueMicrotask:typeof Em<"u"?function(e){return Em.resolve(null).then(e).catch(N0)}:Cm;function N0(e){setTimeout(function(){throw e})}function Fa(e){return e==="head"}function km(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 x=e.ownerDocument;if(a&1&&pl(x.documentElement),a&2&&pl(x.body),a&4)for(a=x.head,pl(a),x=a.firstChild;x;){var b=x.nextSibling,C=x.nodeName;x[Os]||C==="SCRIPT"||C==="STYLE"||C==="LINK"&&x.rel.toLowerCase()==="stylesheet"||a.removeChild(x),x=b}}if(o===0){e.removeChild(u),Nl(t);return}o--}else a==="$"||a==="$?"||a==="$!"?o++:n=a.charCodeAt(0)-48;else n=0;a=u}while(a);Nl(t)}function pc(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":pc(a),vi(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function C0(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[Os])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=It(e.nextSibling),e===null)break}return null}function E0(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=It(e.nextSibling),e===null))return null;return e}function xc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function k0(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 It(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 yc=null;function Tm(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 Am(e,t,a){switch(t=$r(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 pl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);vi(e)}var Gt=new Map,Rm=new Set;function Kr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ea=q.d;q.d={f:T0,r:A0,D:R0,C:O0,L:M0,m:z0,X:U0,S:D0,M:L0};function T0(){var e=Ea.f(),t=Ur();return e||t}function A0(e){var t=Un(e);t!==null&&t.tag===5&&t.type==="form"?Zd(t):Ea.r(e)}var gs=typeof document>"u"?null:document;function Om(e,t,a){var n=gs;if(n&&typeof t=="string"&&t){var o=Ut(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),Rm.has(o)||(Rm.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 R0(e){Ea.D(e),Om("dns-prefetch",e,null)}function O0(e,t){Ea.C(e,t),Om("preconnect",e,t)}function M0(e,t,a){Ea.L(e,t,a);var n=gs;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=ps(e);break;case"script":u=xs(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(xl(u))||t==="script"&&n.querySelector(yl(u))||(t=n.createElement("link"),ft(t,"link",e),rt(t),n.head.appendChild(t)))}}function z0(e,t){Ea.m(e,t);var a=gs;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=xs(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(yl(u)))return}n=a.createElement("link"),ft(n,"link",e),rt(n),a.head.appendChild(n)}}}function D0(e,t,a){Ea.S(e,t,a);var n=gs;if(n&&e){var o=Ln(n).hoistableStyles,u=ps(e);t=t||"default";var x=o.get(u);if(!x){var b={loading:0,preload:null};if(x=n.querySelector(xl(u)))b.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Gt.get(u))&&bc(e,a);var C=x=n.createElement("link");rt(C),ft(C,"link",e),C._p=new Promise(function(_,F){C.onload=_,C.onerror=F}),C.addEventListener("load",function(){b.loading|=1}),C.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Yr(x,t,n)}x={type:"stylesheet",instance:x,count:1,state:b},o.set(u,x)}}}function U0(e,t){Ea.X(e,t);var a=gs;if(a&&e){var n=Ln(a).hoistableScripts,o=xs(e),u=n.get(o);u||(u=a.querySelector(yl(o)),u||(e=y({src:e,async:!0},t),(t=Gt.get(o))&&vc(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 L0(e,t){Ea.M(e,t);var a=gs;if(a&&e){var n=Ln(a).hoistableScripts,o=xs(e),u=n.get(o);u||(u=a.querySelector(yl(o)),u||(e=y({src:e,async:!0,type:"module"},t),(t=Gt.get(o))&&vc(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 Mm(e,t,a,n){var o=(o=ee.current)?Kr(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=ps(a.href),a=Ln(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=ps(a.href);var u=Ln(o).hoistableStyles,x=u.get(e);if(x||(o=o.ownerDocument||o,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,x),(u=o.querySelector(xl(e)))&&!u._p&&(x.instance=u,x.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||_0(o,e,a,x.state))),t&&n===null)throw Error(c(528,""));return x}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=xs(a),a=Ln(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 ps(e){return'href="'+Ut(e)+'"'}function xl(e){return'link[rel="stylesheet"]['+e+"]"}function zm(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function _0(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 xs(e){return'[src="'+Ut(e)+'"]'}function yl(e){return"script[async]"+e}function Dm(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=ps(a.href);var u=e.querySelector(xl(o));if(u)return t.state.loading|=4,t.instance=u,rt(u),u;n=zm(a),(o=Gt.get(o))&&bc(n,o),u=(e.ownerDocument||e).createElement("link"),rt(u);var x=u;return x._p=new Promise(function(b,C){x.onload=b,x.onerror=C}),ft(u,"link",n),t.state.loading|=4,Yr(u,a.precedence,e),t.instance=u;case"script":return u=xs(a.src),(o=e.querySelector(yl(u)))?(t.instance=o,rt(o),o):(n=a,(o=Gt.get(u))&&(n=y({},a),vc(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,x=0;x<n.length;x++){var b=n[x];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 bc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function vc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Xr=null;function Um(e,t,a){if(Xr===null){var n=new Map,o=Xr=new Map;o.set(a,n)}else o=Xr,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[Os]||u[tt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var x=u.getAttribute(t)||"";x=e+x;var b=n.get(x);b?b.push(u):n.set(x,[u])}}return n}function Lm(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function H0(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 _m(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var bl=null;function B0(){}function V0(e,t,a){if(bl===null)throw Error(c(475));var n=bl;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var o=ps(a.href),u=e.querySelector(xl(o));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(n.count++,n=Qr.bind(n),e.then(n,n)),t.state.loading|=4,t.instance=u,rt(u);return}u=e.ownerDocument||e,a=zm(a),(o=Gt.get(o))&&bc(a,o),u=u.createElement("link"),rt(u);var x=u;x._p=new Promise(function(b,C){x.onload=b,x.onerror=C}),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=Qr.bind(n),e.addEventListener("load",t),e.addEventListener("error",t))}}function q0(){if(bl===null)throw Error(c(475));var e=bl;return e.stylesheets&&e.count===0&&wc(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&wc(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 Qr(){if(this.count--,this.count===0){if(this.stylesheets)wc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Pr=null;function wc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Pr=new Map,t.forEach(G0,e),Pr=null,Qr.call(e))}function G0(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 x=o[u];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(a.set(x.dataset.precedence,x),n=x)}n&&a.set(null,n)}o=t.instance,x=o.getAttribute("data-precedence"),u=a.get(x)||n,u===n&&a.set(null,o),a.set(x,o),this.count++,n=Qr.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 vl={$$typeof:$,Provider:null,Consumer:null,_currentValue:z,_currentValue2:z,_threadCount:0};function $0(e,t,a,n,o,u,x,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=Qt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qt(0),this.hiddenUpdates=Qt(null),this.identifierPrefix=n,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function Hm(e,t,a,n,o,u,x,b,C,_,F,W){return e=new $0(e,t,a,x,b,C,_,W),t=1,u===!0&&(t|=24),u=Tt(3,null,null,t),e.current=u,u.stateNode=e,t=to(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:n,isDehydrated:a,cache:t},lo(u),e}function Bm(e){return e?(e=Pn,e):Pn}function Vm(e,t,a,n,o,u){o=Bm(o),n.context===null?n.context=o:n.pendingContext=o,n=_a(t),n.payload={element:a},u=u===void 0?null:u,u!==null&&(n.callback=u),a=Ha(e,n,t),a!==null&&(zt(a,e,t),Fs(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 Gm(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=k.T;k.T=null;var u=q.p;try{q.p=2,Sc(e,t,a,n)}finally{q.p=u,k.T=o}}function Y0(e,t,a,n){var o=k.T;k.T=null;var u=q.p;try{q.p=8,Sc(e,t,a,n)}finally{q.p=u,k.T=o}}function Sc(e,t,a,n){if(Zr){var o=Nc(n);if(o===null)uc(e,t,n,Fr,a),Km(e,n);else if(Q0(o,e,t,a,n))n.stopPropagation();else if(Km(e,n),t&4&&-1<X0.indexOf(e)){for(;o!==null;){var u=Un(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var x=ta(u.pendingLanes);if(x!==0){var b=u;for(b.pendingLanes|=2,b.entangledLanes|=2;x;){var C=1<<31-ht(x);b.entanglements[1]|=C,x&=~C}ia(u),(_e&6)===0&&(zr=Le()+500,ml(0))}}break;case 13:b=Qn(u,2),b!==null&&zt(b,u,2),Ur(),jc(u,2)}if(u=Nc(n),u===null&&uc(e,t,n,Fr,a),u===o)break;o=u}o!==null&&n.stopPropagation()}else uc(e,t,n,null,a)}}function Nc(e){return e=Ti(e),Cc(e)}var Fr=null;function Cc(e){if(Fr=null,e=Dn(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Fr=e,null}function $m(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(vt()){case Ra:return 2;case Oa:return 8;case da:case Ma:return 32;case As:return 268435456;default:return 32}default:return 32}}var Ec=!1,Ja=null,Ia=null,Wa=null,wl=new Map,jl=new Map,en=[],X0="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":Ia=null;break;case"mouseover":case"mouseout":Wa=null;break;case"pointerover":case"pointerout":wl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":jl.delete(t.pointerId)}}function Sl(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=Un(t),t!==null&&Gm(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=Sl(Ja,e,t,a,n,o),!0;case"dragenter":return Ia=Sl(Ia,e,t,a,n,o),!0;case"mouseover":return Wa=Sl(Wa,e,t,a,n,o),!0;case"pointerover":var u=o.pointerId;return wl.set(u,Sl(wl.get(u)||null,e,t,a,n,o)),!0;case"gotpointercapture":return u=o.pointerId,jl.set(u,Sl(jl.get(u)||null,e,t,a,n,o)),!0}return!1}function Ym(e){var t=Dn(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=m(a),t!==null){e.blockedOn=t,Yl(e.priority,function(){if(a.tag===13){var n=Mt();n=aa(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 Jr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Nc(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);ki=n,a.target.dispatchEvent(n),ki=null}else return t=Un(a),t!==null&&Gm(t),e.blockedOn=a,!1;t.shift()}return!0}function Xm(e,t,a){Jr(e)&&a.delete(t)}function P0(){Ec=!1,Ja!==null&&Jr(Ja)&&(Ja=null),Ia!==null&&Jr(Ia)&&(Ia=null),Wa!==null&&Jr(Wa)&&(Wa=null),wl.forEach(Xm),jl.forEach(Xm)}function Ir(e,t){e.blockedOn===t&&(e.blockedOn=null,Ec||(Ec=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,P0)))}var Wr=null;function Qm(e){Wr!==e&&(Wr=e,s.unstable_scheduleCallback(s.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(Cc(n||a)===null)continue;break}var u=Un(a);u!==null&&(e.splice(t,3),t-=3,Co(u,{pending:!0,data:o,method:a.method,action:n},n,o))}}))}function Nl(e){function t(C){return Ir(C,e)}Ja!==null&&Ir(Ja,e),Ia!==null&&Ir(Ia,e),Wa!==null&&Ir(Wa,e),wl.forEach(t),jl.forEach(t);for(var a=0;a<en.length;a++){var n=en[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<en.length&&(a=en[0],a.blockedOn===null);)Ym(a),a.blockedOn===null&&en.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],x=o[yt]||null;if(typeof u=="function")x||Qm(a);else if(x){var b=null;if(u&&u.hasAttribute("formAction")){if(o=u,x=u[yt]||null)b=x.formAction;else if(Cc(o)!==null)continue}else b=x.action;typeof b=="function"?a[n+1]=b:(a.splice(n,3),n-=3),Qm(a)}}}function kc(e){this._internalRoot=e}ei.prototype.render=kc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,n=Mt();Vm(a,n,e,t,null,null)},ei.prototype.unmount=kc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Vm(e.current,2,null,e,null,null),Ur(),t[zn]=null}};function ei(e){this._internalRoot=e}ei.prototype.unstable_scheduleHydration=function(e){if(e){var t=Rs();e={blockedOn:null,target:e,priority:t};for(var a=0;a<en.length&&t!==0&&t<en[a].priority;a++);en.splice(a,0,e),a===0&&Ym(e)}};var Pm=i.version;if(Pm!=="19.1.0")throw Error(c(527,Pm,"19.1.0"));q.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?h(e):null,e=e===null?null:e.stateNode,e};var Z0={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ti=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ti.isDisabled&&ti.supportsFiber)try{za=ti.inject(Z0),mt=ti}catch{}}return El.createRoot=function(e,t){if(!d(e))throw Error(c(299));var a=!1,n="",o=uf,u=df,x=ff,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&&(x=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(b=t.unstable_transitionCallbacks)),t=Hm(e,1,!1,null,null,a,n,o,u,x,b,null),e[zn]=t.current,cc(e),new kc(t)},El.hydrateRoot=function(e,t,a){if(!d(e))throw Error(c(299));var n=!1,o="",u=uf,x=df,b=ff,C=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&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(C=a.unstable_transitionCallbacks),a.formState!==void 0&&(_=a.formState)),t=Hm(e,1,!0,t,a??null,n,o,u,x,b,C,_),t.context=Bm(null),a=t.current,n=Mt(),n=aa(n),o=_a(n),o.callback=null,Ha(a,o,n),a=n,t.current.lanes=a,Pt(t,a),ia(t),e[zn]=t.current,cc(e),new ei(t)},El.version="19.1.0",El}var sh;function lx(){if(sh)return Rc.exports;sh=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(i){console.error(i)}}return s(),Rc.exports=sx(),Rc.exports}var rx=lx();const lh=Bh(rx);var kl={},rh;function ix(){if(rh)return kl;rh=1,Object.defineProperty(kl,"__esModule",{value:!0}),kl.parse=m,kl.serialize=h;const s=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,i=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[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]*$/,d=Object.prototype.toString,f=(()=>{const v=function(){};return v.prototype=Object.create(null),v})();function m(v,T){const S=new f,E=v.length;if(E<2)return S;const O=(T==null?void 0:T.decode)||y;let R=0;do{const A=v.indexOf("=",R);if(A===-1)break;const $=v.indexOf(";",R),Z=$===-1?E:$;if(A>Z){R=v.lastIndexOf(";",A-1)+1;continue}const B=p(v,R,A),oe=g(v,A,B),P=v.slice(B,oe);if(S[P]===void 0){let H=p(v,A+1,Z),I=g(v,Z,H);const ne=O(v.slice(H,I));S[P]=ne}R=Z+1}while(R<E);return S}function p(v,T,S){do{const E=v.charCodeAt(T);if(E!==32&&E!==9)return T}while(++T<S);return S}function g(v,T,S){for(;T>S;){const E=v.charCodeAt(--T);if(E!==32&&E!==9)return T+1}return S}function h(v,T,S){const E=(S==null?void 0:S.encode)||encodeURIComponent;if(!s.test(v))throw new TypeError(`argument name is invalid: ${v}`);const O=E(T);if(!i.test(O))throw new TypeError(`argument val is invalid: ${T}`);let R=v+"="+O;if(!S)return R;if(S.maxAge!==void 0){if(!Number.isInteger(S.maxAge))throw new TypeError(`option maxAge is invalid: ${S.maxAge}`);R+="; Max-Age="+S.maxAge}if(S.domain){if(!r.test(S.domain))throw new TypeError(`option domain is invalid: ${S.domain}`);R+="; Domain="+S.domain}if(S.path){if(!c.test(S.path))throw new TypeError(`option path is invalid: ${S.path}`);R+="; Path="+S.path}if(S.expires){if(!j(S.expires)||!Number.isFinite(S.expires.valueOf()))throw new TypeError(`option expires is invalid: ${S.expires}`);R+="; Expires="+S.expires.toUTCString()}if(S.httpOnly&&(R+="; HttpOnly"),S.secure&&(R+="; Secure"),S.partitioned&&(R+="; Partitioned"),S.priority)switch(typeof S.priority=="string"?S.priority.toLowerCase():void 0){case"low":R+="; Priority=Low";break;case"medium":R+="; Priority=Medium";break;case"high":R+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${S.priority}`)}if(S.sameSite)switch(typeof S.sameSite=="string"?S.sameSite.toLowerCase():S.sameSite){case!0:case"strict":R+="; SameSite=Strict";break;case"lax":R+="; SameSite=Lax";break;case"none":R+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${S.sameSite}`)}return R}function y(v){if(v.indexOf("%")===-1)return v;try{return decodeURIComponent(v)}catch{return v}}function j(v){return d.call(v)==="[object Date]"}return kl}ix();var ih="popstate";function ox(s={}){function i(c,d){let{pathname:f,search:m,hash:p}=c.location;return Vc("",{pathname:f,search:m,hash:p},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function r(c,d){return typeof d=="string"?d:Ml(d)}return ux(i,r,null,s)}function Xe(s,i){if(s===!1||s===null||typeof s>"u")throw new Error(i)}function Wt(s,i){if(!s){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function cx(){return Math.random().toString(36).substring(2,10)}function oh(s,i){return{usr:s.state,key:s.key,idx:i}}function Vc(s,i,r=null,c){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof i=="string"?Ns(i):i,state:r,key:i&&i.key||c||cx()}}function Ml({pathname:s="/",search:i="",hash:r=""}){return i&&i!=="?"&&(s+=i.charAt(0)==="?"?i:"?"+i),r&&r!=="#"&&(s+=r.charAt(0)==="#"?r:"#"+r),s}function Ns(s){let i={};if(s){let r=s.indexOf("#");r>=0&&(i.hash=s.substring(r),s=s.substring(0,r));let c=s.indexOf("?");c>=0&&(i.search=s.substring(c),s=s.substring(0,c)),s&&(i.pathname=s)}return i}function ux(s,i,r,c={}){let{window:d=document.defaultView,v5Compat:f=!1}=c,m=d.history,p="POP",g=null,h=y();h==null&&(h=0,m.replaceState({...m.state,idx:h},""));function y(){return(m.state||{idx:null}).idx}function j(){p="POP";let O=y(),R=O==null?null:O-h;h=O,g&&g({action:p,location:E.location,delta:R})}function v(O,R){p="PUSH";let A=Vc(E.location,O,R);h=y()+1;let $=oh(A,h),Z=E.createHref(A);try{m.pushState($,"",Z)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;d.location.assign(Z)}f&&g&&g({action:p,location:E.location,delta:1})}function T(O,R){p="REPLACE";let A=Vc(E.location,O,R);h=y();let $=oh(A,h),Z=E.createHref(A);m.replaceState($,"",Z),f&&g&&g({action:p,location:E.location,delta:0})}function S(O){return dx(O)}let E={get action(){return p},get location(){return s(d,m)},listen(O){if(g)throw new Error("A history only accepts one active listener");return d.addEventListener(ih,j),g=O,()=>{d.removeEventListener(ih,j),g=null}},createHref(O){return i(d,O)},createURL:S,encodeLocation(O){let R=S(O);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:v,replace:T,go(O){return m.go(O)}};return E}function dx(s,i=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Xe(r,"No window.location.(origin|href) available to create URL");let c=typeof s=="string"?s:Ml(s);return c=c.replace(/ $/,"%20"),!i&&c.startsWith("//")&&(c=r+c),new URL(c,r)}function Vh(s,i,r="/"){return fx(s,i,r,!1)}function fx(s,i,r,c){let d=typeof i=="string"?Ns(i):i,f=Aa(d.pathname||"/",r);if(f==null)return null;let m=qh(s);mx(m);let p=null;for(let g=0;p==null&&g<m.length;++g){let h=Nx(f);p=jx(m[g],h,c)}return p}function qh(s,i=[],r=[],c=""){let d=(f,m,p)=>{let g={relativePath:p===void 0?f.path||"":p,caseSensitive:f.caseSensitive===!0,childrenIndex:m,route:f};g.relativePath.startsWith("/")&&(Xe(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 h=Ta([c,g.relativePath]),y=r.concat(g);f.children&&f.children.length>0&&(Xe(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),qh(f.children,i,y,h)),!(f.path==null&&!f.index)&&i.push({path:h,score:vx(h,f.index),routesMeta:y})};return s.forEach((f,m)=>{var p;if(f.path===""||!((p=f.path)!=null&&p.includes("?")))d(f,m);else for(let g of Gh(f.path))d(f,m,g)}),i}function Gh(s){let i=s.split("/");if(i.length===0)return[];let[r,...c]=i,d=r.endsWith("?"),f=r.replace(/\?$/,"");if(c.length===0)return d?[f,""]:[f];let m=Gh(c.join("/")),p=[];return p.push(...m.map(g=>g===""?f:[f,g].join("/"))),d&&p.push(...m),p.map(g=>s.startsWith("/")&&g===""?"/":g)}function mx(s){s.sort((i,r)=>i.score!==r.score?r.score-i.score:wx(i.routesMeta.map(c=>c.childrenIndex),r.routesMeta.map(c=>c.childrenIndex)))}var hx=/^:[\w-]+$/,gx=3,px=2,xx=1,yx=10,bx=-2,ch=s=>s==="*";function vx(s,i){let r=s.split("/"),c=r.length;return r.some(ch)&&(c+=bx),i&&(c+=px),r.filter(d=>!ch(d)).reduce((d,f)=>d+(hx.test(f)?gx:f===""?xx:yx),c)}function wx(s,i){return s.length===i.length&&s.slice(0,-1).every((c,d)=>c===i[d])?s[s.length-1]-i[i.length-1]:0}function jx(s,i,r=!1){let{routesMeta:c}=s,d={},f="/",m=[];for(let p=0;p<c.length;++p){let g=c[p],h=p===c.length-1,y=f==="/"?i:i.slice(f.length)||"/",j=ui({path:g.relativePath,caseSensitive:g.caseSensitive,end:h},y),v=g.route;if(!j&&h&&r&&!c[c.length-1].route.index&&(j=ui({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},y)),!j)return null;Object.assign(d,j.params),m.push({params:d,pathname:Ta([f,j.pathname]),pathnameBase:Tx(Ta([f,j.pathnameBase])),route:v}),j.pathnameBase!=="/"&&(f=Ta([f,j.pathnameBase]))}return m}function ui(s,i){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[r,c]=Sx(s.path,s.caseSensitive,s.end),d=i.match(r);if(!d)return null;let f=d[0],m=f.replace(/(.)\/+$/,"$1"),p=d.slice(1);return{params:c.reduce((h,{paramName:y,isOptional:j},v)=>{if(y==="*"){let S=p[v]||"";m=f.slice(0,f.length-S.length).replace(/(.)\/+$/,"$1")}const T=p[v];return j&&!T?h[y]=void 0:h[y]=(T||"").replace(/%2F/g,"/"),h},{}),pathname:f,pathnameBase:m,pattern:s}}function Sx(s,i=!1,r=!0){Wt(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let c=[],d="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,p,g)=>(c.push({paramName:p,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)"));return s.endsWith("*")?(c.push({paramName:"*"}),d+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?d+="\\/*$":s!==""&&s!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,i?void 0:"i"),c]}function Nx(s){try{return s.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return Wt(!1,`The URL path "${s}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),s}}function Aa(s,i){if(i==="/")return s;if(!s.toLowerCase().startsWith(i.toLowerCase()))return null;let r=i.endsWith("/")?i.length-1:i.length,c=s.charAt(r);return c&&c!=="/"?null:s.slice(r)||"/"}function Cx(s,i="/"){let{pathname:r,search:c="",hash:d=""}=typeof s=="string"?Ns(s):s;return{pathname:r?r.startsWith("/")?r:Ex(r,i):i,search:Ax(c),hash:Rx(d)}}function Ex(s,i){let r=i.replace(/\/+$/,"").split("/");return s.split("/").forEach(d=>{d===".."?r.length>1&&r.pop():d!=="."&&r.push(d)}),r.length>1?r.join("/"):"/"}function Dc(s,i,r,c){return`Cannot include a '${s}' character in a manually specified \`to.${i}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function kx(s){return s.filter((i,r)=>r===0||i.route.path&&i.route.path.length>0)}function Jc(s){let i=kx(s);return i.map((r,c)=>c===i.length-1?r.pathname:r.pathnameBase)}function Ic(s,i,r,c=!1){let d;typeof s=="string"?d=Ns(s):(d={...s},Xe(!d.pathname||!d.pathname.includes("?"),Dc("?","pathname","search",d)),Xe(!d.pathname||!d.pathname.includes("#"),Dc("#","pathname","hash",d)),Xe(!d.search||!d.search.includes("#"),Dc("#","search","hash",d)));let f=s===""||d.pathname==="",m=f?"/":d.pathname,p;if(m==null)p=r;else{let j=i.length-1;if(!c&&m.startsWith("..")){let v=m.split("/");for(;v[0]==="..";)v.shift(),j-=1;d.pathname=v.join("/")}p=j>=0?i[j]:"/"}let g=Cx(d,p),h=m&&m!=="/"&&m.endsWith("/"),y=(f||m===".")&&r.endsWith("/");return!g.pathname.endsWith("/")&&(h||y)&&(g.pathname+="/"),g}var Ta=s=>s.join("/").replace(/\/\/+/g,"/"),Tx=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),Ax=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,Rx=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s;function Ox(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}var $h=["POST","PUT","PATCH","DELETE"];new Set($h);var Mx=["GET",...$h];new Set(Mx);var Cs=w.createContext(null);Cs.displayName="DataRouter";var gi=w.createContext(null);gi.displayName="DataRouterState";var Kh=w.createContext({isTransitioning:!1});Kh.displayName="ViewTransition";var zx=w.createContext(new Map);zx.displayName="Fetchers";var Dx=w.createContext(null);Dx.displayName="Await";var ea=w.createContext(null);ea.displayName="Navigation";var Ul=w.createContext(null);Ul.displayName="Location";var Kt=w.createContext({outlet:null,matches:[],isDataRoute:!1});Kt.displayName="Route";var Wc=w.createContext(null);Wc.displayName="RouteError";function Ux(s,{relative:i}={}){Xe(Es(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:c}=w.useContext(ea),{hash:d,pathname:f,search:m}=Ll(s,{relative:i}),p=f;return r!=="/"&&(p=f==="/"?r:Ta([r,f])),c.createHref({pathname:p,search:m,hash:d})}function Es(){return w.useContext(Ul)!=null}function sn(){return Xe(Es(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(Ul).location}var Yh="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Xh(s){w.useContext(ea).static||w.useLayoutEffect(s)}function On(){let{isDataRoute:s}=w.useContext(Kt);return s?Jx():Lx()}function Lx(){Xe(Es(),"useNavigate() may be used only in the context of a <Router> component.");let s=w.useContext(Cs),{basename:i,navigator:r}=w.useContext(ea),{matches:c}=w.useContext(Kt),{pathname:d}=sn(),f=JSON.stringify(Jc(c)),m=w.useRef(!1);return Xh(()=>{m.current=!0}),w.useCallback((g,h={})=>{if(Wt(m.current,Yh),!m.current)return;if(typeof g=="number"){r.go(g);return}let y=Ic(g,JSON.parse(f),d,h.relative==="path");s==null&&i!=="/"&&(y.pathname=y.pathname==="/"?i:Ta([i,y.pathname])),(h.replace?r.replace:r.push)(y,h.state,h)},[i,r,f,d,s])}var _x=w.createContext(null);function Hx(s){let i=w.useContext(Kt).outlet;return i&&w.createElement(_x.Provider,{value:s},i)}function Bx(){let{matches:s}=w.useContext(Kt),i=s[s.length-1];return i?i.params:{}}function Ll(s,{relative:i}={}){let{matches:r}=w.useContext(Kt),{pathname:c}=sn(),d=JSON.stringify(Jc(r));return w.useMemo(()=>Ic(s,JSON.parse(d),c,i==="path"),[s,d,c,i])}function Vx(s,i){return Qh(s,i)}function Qh(s,i,r,c){var R;Xe(Es(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d}=w.useContext(ea),{matches:f}=w.useContext(Kt),m=f[f.length-1],p=m?m.params:{},g=m?m.pathname:"/",h=m?m.pathnameBase:"/",y=m&&m.route;{let A=y&&y.path||"";Ph(g,!y||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
50
|
+
|
|
51
|
+
Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let j=sn(),v;if(i){let A=typeof i=="string"?Ns(i):i;Xe(h==="/"||((R=A.pathname)==null?void 0:R.startsWith(h)),`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 "${h}" but pathname "${A.pathname}" was given in the \`location\` prop.`),v=A}else v=j;let T=v.pathname||"/",S=T;if(h!=="/"){let A=h.replace(/^\//,"").split("/");S="/"+T.replace(/^\//,"").split("/").slice(A.length).join("/")}let E=Vh(s,{pathname:S});Wt(y||E!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Wt(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.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 O=Yx(E&&E.map(A=>Object.assign({},A,{params:Object.assign({},p,A.params),pathname:Ta([h,d.encodeLocation?d.encodeLocation(A.pathname).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?h:Ta([h,d.encodeLocation?d.encodeLocation(A.pathnameBase).pathname:A.pathnameBase])})),f,r,c);return i&&O?w.createElement(Ul.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},O):O}function qx(){let s=Fx(),i=Ox(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),r=s instanceof Error?s.stack:null,c="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:c},f={padding:"2px 4px",backgroundColor:c},m=null;return console.error("Error handled by React Router default ErrorBoundary:",s),m=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:f},"ErrorBoundary")," or"," ",w.createElement("code",{style:f},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},i),r?w.createElement("pre",{style:d},r):null,m)}var Gx=w.createElement(qx,null),$x=class extends w.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,i){return i.location!==s.location||i.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:i.error,location:i.location,revalidation:s.revalidation||i.revalidation}}componentDidCatch(s,i){console.error("React Router caught the following error during render",s,i)}render(){return this.state.error!==void 0?w.createElement(Kt.Provider,{value:this.props.routeContext},w.createElement(Wc.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Kx({routeContext:s,match:i,children:r}){let c=w.useContext(Cs);return c&&c.static&&c.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=i.route.id),w.createElement(Kt.Provider,{value:s},r)}function Yx(s,i=[],r=null,c=null){if(s==null){if(!r)return null;if(r.errors)s=r.matches;else if(i.length===0&&!r.initialized&&r.matches.length>0)s=r.matches;else return null}let d=s,f=r==null?void 0:r.errors;if(f!=null){let g=d.findIndex(h=>h.route.id&&(f==null?void 0:f[h.route.id])!==void 0);Xe(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),d=d.slice(0,Math.min(d.length,g+1))}let m=!1,p=-1;if(r)for(let g=0;g<d.length;g++){let h=d[g];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(p=g),h.route.id){let{loaderData:y,errors:j}=r,v=h.route.loader&&!y.hasOwnProperty(h.route.id)&&(!j||j[h.route.id]===void 0);if(h.route.lazy||v){m=!0,p>=0?d=d.slice(0,p+1):d=[d[0]];break}}}return d.reduceRight((g,h,y)=>{let j,v=!1,T=null,S=null;r&&(j=f&&h.route.id?f[h.route.id]:void 0,T=h.route.errorElement||Gx,m&&(p<0&&y===0?(Ph("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,S=null):p===y&&(v=!0,S=h.route.hydrateFallbackElement||null)));let E=i.concat(d.slice(0,y+1)),O=()=>{let R;return j?R=T:v?R=S:h.route.Component?R=w.createElement(h.route.Component,null):h.route.element?R=h.route.element:R=g,w.createElement(Kx,{match:h,routeContext:{outlet:g,matches:E,isDataRoute:r!=null},children:R})};return r&&(h.route.ErrorBoundary||h.route.errorElement||y===0)?w.createElement($x,{location:r.location,revalidation:r.revalidation,component:T,error:j,children:O(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):O()},null)}function eu(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Xx(s){let i=w.useContext(Cs);return Xe(i,eu(s)),i}function Qx(s){let i=w.useContext(gi);return Xe(i,eu(s)),i}function Px(s){let i=w.useContext(Kt);return Xe(i,eu(s)),i}function tu(s){let i=Px(s),r=i.matches[i.matches.length-1];return Xe(r.route.id,`${s} can only be used on routes that contain a unique "id"`),r.route.id}function Zx(){return tu("useRouteId")}function Fx(){var c;let s=w.useContext(Wc),i=Qx("useRouteError"),r=tu("useRouteError");return s!==void 0?s:(c=i.errors)==null?void 0:c[r]}function Jx(){let{router:s}=Xx("useNavigate"),i=tu("useNavigate"),r=w.useRef(!1);return Xh(()=>{r.current=!0}),w.useCallback(async(d,f={})=>{Wt(r.current,Yh),r.current&&(typeof d=="number"?s.navigate(d):await s.navigate(d,{fromRouteId:i,...f}))},[s,i])}var uh={};function Ph(s,i,r){!i&&!uh[s]&&(uh[s]=!0,Wt(!1,r))}w.memo(Ix);function Ix({routes:s,future:i,state:r}){return Qh(s,void 0,r,i)}function Zh({to:s,replace:i,state:r,relative:c}){Xe(Es(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=w.useContext(ea);Wt(!d,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=w.useContext(Kt),{pathname:m}=sn(),p=On(),g=Ic(s,Jc(f),m,c==="path"),h=JSON.stringify(g);return w.useEffect(()=>{p(JSON.parse(h),{replace:i,state:r,relative:c})},[p,h,c,i,r]),null}function Fh(s){return Hx(s.context)}function $t(s){Xe(!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 Wx({basename:s="/",children:i=null,location:r,navigationType:c="POP",navigator:d,static:f=!1}){Xe(!Es(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=s.replace(/^\/*/,"/"),p=w.useMemo(()=>({basename:m,navigator:d,static:f,future:{}}),[m,d,f]);typeof r=="string"&&(r=Ns(r));let{pathname:g="/",search:h="",hash:y="",state:j=null,key:v="default"}=r,T=w.useMemo(()=>{let S=Aa(g,m);return S==null?null:{location:{pathname:S,search:h,hash:y,state:j,key:v},navigationType:c}},[m,g,h,y,j,v,c]);return Wt(T!=null,`<Router basename="${m}"> is not able to match the URL "${g}${h}${y}" because it does not start with the basename, so the <Router> won't render anything.`),T==null?null:w.createElement(ea.Provider,{value:p},w.createElement(Ul.Provider,{children:i,value:T}))}function ey({children:s,location:i}){return Vx(qc(s),i)}function qc(s,i=[]){let r=[];return w.Children.forEach(s,(c,d)=>{if(!w.isValidElement(c))return;let f=[...i,d];if(c.type===w.Fragment){r.push.apply(r,qc(c.props.children,f));return}Xe(c.type===$t,`[${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>`),Xe(!c.props.index||!c.props.children,"An index route cannot have child routes.");let m={id:c.props.id||f.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&&(m.children=qc(c.props.children,f)),r.push(m)}),r}var oi="get",ci="application/x-www-form-urlencoded";function pi(s){return s!=null&&typeof s.tagName=="string"}function ty(s){return pi(s)&&s.tagName.toLowerCase()==="button"}function ay(s){return pi(s)&&s.tagName.toLowerCase()==="form"}function ny(s){return pi(s)&&s.tagName.toLowerCase()==="input"}function sy(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function ly(s,i){return s.button===0&&(!i||i==="_self")&&!sy(s)}var ai=null;function ry(){if(ai===null)try{new FormData(document.createElement("form"),0),ai=!1}catch{ai=!0}return ai}var iy=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Uc(s){return s!=null&&!iy.has(s)?(Wt(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ci}"`),null):s}function oy(s,i){let r,c,d,f,m;if(ay(s)){let p=s.getAttribute("action");c=p?Aa(p,i):null,r=s.getAttribute("method")||oi,d=Uc(s.getAttribute("enctype"))||ci,f=new FormData(s)}else if(ty(s)||ny(s)&&(s.type==="submit"||s.type==="image")){let p=s.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=s.getAttribute("formaction")||p.getAttribute("action");if(c=g?Aa(g,i):null,r=s.getAttribute("formmethod")||p.getAttribute("method")||oi,d=Uc(s.getAttribute("formenctype"))||Uc(p.getAttribute("enctype"))||ci,f=new FormData(p,s),!ry()){let{name:h,type:y,value:j}=s;if(y==="image"){let v=h?`${h}.`:"";f.append(`${v}x`,"0"),f.append(`${v}y`,"0")}else h&&f.append(h,j)}}else{if(pi(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=oi,c=null,d=ci,m=s}return f&&d==="text/plain"&&(m=f,f=void 0),{action:c,method:r.toLowerCase(),encType:d,formData:f,body:m}}function au(s,i){if(s===!1||s===null||typeof s>"u")throw new Error(i)}async function cy(s,i){if(s.id in i)return i[s.id];try{let r=await import(s.module);return i[s.id]=r,r}catch(r){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function uy(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function dy(s,i,r){let c=await Promise.all(s.map(async d=>{let f=i.routes[d.route.id];if(f){let m=await cy(f,r);return m.links?m.links():[]}return[]}));return gy(c.flat(1).filter(uy).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function dh(s,i,r,c,d,f){let m=(g,h)=>r[h]?g.route.id!==r[h].route.id:!0,p=(g,h)=>{var y;return r[h].pathname!==g.pathname||((y=r[h].route.path)==null?void 0:y.endsWith("*"))&&r[h].params["*"]!==g.params["*"]};return f==="assets"?i.filter((g,h)=>m(g,h)||p(g,h)):f==="data"?i.filter((g,h)=>{var j;let y=c.routes[g.route.id];if(!y||!y.hasLoader)return!1;if(m(g,h)||p(g,h))return!0;if(g.route.shouldRevalidate){let v=g.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((j=r[0])==null?void 0:j.params)||{},nextUrl:new URL(s,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function fy(s,i,{includeHydrateFallback:r}={}){return my(s.map(c=>{let d=i.routes[c.route.id];if(!d)return[];let f=[d.module];return d.clientActionModule&&(f=f.concat(d.clientActionModule)),d.clientLoaderModule&&(f=f.concat(d.clientLoaderModule)),r&&d.hydrateFallbackModule&&(f=f.concat(d.hydrateFallbackModule)),d.imports&&(f=f.concat(d.imports)),f}).flat(1))}function my(s){return[...new Set(s)]}function hy(s){let i={},r=Object.keys(s).sort();for(let c of r)i[c]=s[c];return i}function gy(s,i){let r=new Set;return new Set(i),s.reduce((c,d)=>{let f=JSON.stringify(hy(d));return r.has(f)||(r.add(f),c.push({key:f,link:d})),c},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var py=new Set([100,101,204,205]);function xy(s,i){let r=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return r.pathname==="/"?r.pathname="_root.data":i&&Aa(r.pathname,i)==="/"?r.pathname=`${i.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function Jh(){let s=w.useContext(Cs);return au(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function yy(){let s=w.useContext(gi);return au(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var nu=w.createContext(void 0);nu.displayName="FrameworkContext";function Ih(){let s=w.useContext(nu);return au(s,"You must render this element inside a <HydratedRouter> element"),s}function by(s,i){let r=w.useContext(nu),[c,d]=w.useState(!1),[f,m]=w.useState(!1),{onFocus:p,onBlur:g,onMouseEnter:h,onMouseLeave:y,onTouchStart:j}=i,v=w.useRef(null);w.useEffect(()=>{if(s==="render"&&m(!0),s==="viewport"){let E=R=>{R.forEach(A=>{m(A.isIntersecting)})},O=new IntersectionObserver(E,{threshold:.5});return v.current&&O.observe(v.current),()=>{O.disconnect()}}},[s]),w.useEffect(()=>{if(c){let E=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(E)}}},[c]);let T=()=>{d(!0)},S=()=>{d(!1),m(!1)};return r?s!=="intent"?[f,v,{}]:[f,v,{onFocus:Tl(p,T),onBlur:Tl(g,S),onMouseEnter:Tl(h,T),onMouseLeave:Tl(y,S),onTouchStart:Tl(j,T)}]:[!1,v,{}]}function Tl(s,i){return r=>{s&&s(r),r.defaultPrevented||i(r)}}function vy({page:s,...i}){let{router:r}=Jh(),c=w.useMemo(()=>Vh(r.routes,s,r.basename),[r.routes,s,r.basename]);return c?w.createElement(jy,{page:s,matches:c,...i}):null}function wy(s){let{manifest:i,routeModules:r}=Ih(),[c,d]=w.useState([]);return w.useEffect(()=>{let f=!1;return dy(s,i,r).then(m=>{f||d(m)}),()=>{f=!0}},[s,i,r]),c}function jy({page:s,matches:i,...r}){let c=sn(),{manifest:d,routeModules:f}=Ih(),{basename:m}=Jh(),{loaderData:p,matches:g}=yy(),h=w.useMemo(()=>dh(s,i,g,d,c,"data"),[s,i,g,d,c]),y=w.useMemo(()=>dh(s,i,g,d,c,"assets"),[s,i,g,d,c]),j=w.useMemo(()=>{if(s===c.pathname+c.search+c.hash)return[];let S=new Set,E=!1;if(i.forEach(R=>{var $;let A=d.routes[R.route.id];!A||!A.hasLoader||(!h.some(Z=>Z.route.id===R.route.id)&&R.route.id in p&&(($=f[R.route.id])!=null&&$.shouldRevalidate)||A.hasClientLoader?E=!0:S.add(R.route.id))}),S.size===0)return[];let O=xy(s,m);return E&&S.size>0&&O.searchParams.set("_routes",i.filter(R=>S.has(R.route.id)).map(R=>R.route.id).join(",")),[O.pathname+O.search]},[m,p,c,d,h,i,s,f]),v=w.useMemo(()=>fy(y,d),[y,d]),T=wy(y);return w.createElement(w.Fragment,null,j.map(S=>w.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...r})),v.map(S=>w.createElement("link",{key:S,rel:"modulepreload",href:S,...r})),T.map(({key:S,link:E})=>w.createElement("link",{key:S,...E})))}function Sy(...s){return i=>{s.forEach(r=>{typeof r=="function"?r(i):r!=null&&(r.current=i)})}}var Wh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Wh&&(window.__reactRouterVersion="7.6.1")}catch{}function Ny({basename:s,children:i,window:r}){let c=w.useRef();c.current==null&&(c.current=ox({window:r,v5Compat:!0}));let d=c.current,[f,m]=w.useState({action:d.action,location:d.location}),p=w.useCallback(g=>{w.startTransition(()=>m(g))},[m]);return w.useLayoutEffect(()=>d.listen(p),[d,p]),w.createElement(Wx,{basename:s,children:i,location:f.location,navigationType:f.action,navigator:d})}var eg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tg=w.forwardRef(function({onClick:i,discover:r="render",prefetch:c="none",relative:d,reloadDocument:f,replace:m,state:p,target:g,to:h,preventScrollReset:y,viewTransition:j,...v},T){let{basename:S}=w.useContext(ea),E=typeof h=="string"&&eg.test(h),O,R=!1;if(typeof h=="string"&&E&&(O=h,Wh))try{let I=new URL(window.location.href),ne=h.startsWith("//")?new URL(I.protocol+h):new URL(h),L=Aa(ne.pathname,S);ne.origin===I.origin&&L!=null?h=L+ne.search+ne.hash:R=!0}catch{Wt(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let A=Ux(h,{relative:d}),[$,Z,B]=by(c,v),oe=ky(h,{replace:m,state:p,target:g,preventScrollReset:y,relative:d,viewTransition:j});function P(I){i&&i(I),I.defaultPrevented||oe(I)}let H=w.createElement("a",{...v,...B,href:O||A,onClick:R||f?i:P,ref:Sy(T,Z),target:g,"data-discover":!E&&r==="render"?"true":void 0});return $&&!E?w.createElement(w.Fragment,null,H,w.createElement(vy,{page:A})):H});tg.displayName="Link";var ag=w.forwardRef(function({"aria-current":i="page",caseSensitive:r=!1,className:c="",end:d=!1,style:f,to:m,viewTransition:p,children:g,...h},y){let j=Ll(m,{relative:h.relative}),v=sn(),T=w.useContext(gi),{navigator:S,basename:E}=w.useContext(ea),O=T!=null&&My(j)&&p===!0,R=S.encodeLocation?S.encodeLocation(j).pathname:j.pathname,A=v.pathname,$=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;r||(A=A.toLowerCase(),$=$?$.toLowerCase():null,R=R.toLowerCase()),$&&E&&($=Aa($,E)||$);const Z=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let B=A===R||!d&&A.startsWith(R)&&A.charAt(Z)==="/",oe=$!=null&&($===R||!d&&$.startsWith(R)&&$.charAt(R.length)==="/"),P={isActive:B,isPending:oe,isTransitioning:O},H=B?i:void 0,I;typeof c=="function"?I=c(P):I=[c,B?"active":null,oe?"pending":null,O?"transitioning":null].filter(Boolean).join(" ");let ne=typeof f=="function"?f(P):f;return w.createElement(tg,{...h,"aria-current":H,className:I,ref:y,style:ne,to:m,viewTransition:p},typeof g=="function"?g(P):g)});ag.displayName="NavLink";var Cy=w.forwardRef(({discover:s="render",fetcherKey:i,navigate:r,reloadDocument:c,replace:d,state:f,method:m=oi,action:p,onSubmit:g,relative:h,preventScrollReset:y,viewTransition:j,...v},T)=>{let S=Ry(),E=Oy(p,{relative:h}),O=m.toLowerCase()==="get"?"get":"post",R=typeof p=="string"&&eg.test(p),A=$=>{if(g&&g($),$.defaultPrevented)return;$.preventDefault();let Z=$.nativeEvent.submitter,B=(Z==null?void 0:Z.getAttribute("formmethod"))||m;S(Z||$.currentTarget,{fetcherKey:i,method:B,navigate:r,replace:d,state:f,relative:h,preventScrollReset:y,viewTransition:j})};return w.createElement("form",{ref:T,method:O,action:E,onSubmit:c?g:A,...v,"data-discover":!R&&s==="render"?"true":void 0})});Cy.displayName="Form";function Ey(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ng(s){let i=w.useContext(Cs);return Xe(i,Ey(s)),i}function ky(s,{target:i,replace:r,state:c,preventScrollReset:d,relative:f,viewTransition:m}={}){let p=On(),g=sn(),h=Ll(s,{relative:f});return w.useCallback(y=>{if(ly(y,i)){y.preventDefault();let j=r!==void 0?r:Ml(g)===Ml(h);p(s,{replace:j,state:c,preventScrollReset:d,relative:f,viewTransition:m})}},[g,p,h,r,c,i,s,d,f,m])}var Ty=0,Ay=()=>`__${String(++Ty)}__`;function Ry(){let{router:s}=ng("useSubmit"),{basename:i}=w.useContext(ea),r=Zx();return w.useCallback(async(c,d={})=>{let{action:f,method:m,encType:p,formData:g,body:h}=oy(c,i);if(d.navigate===!1){let y=d.fetcherKey||Ay();await s.fetch(y,r,d.action||f,{preventScrollReset:d.preventScrollReset,formData:g,body:h,formMethod:d.method||m,formEncType:d.encType||p,flushSync:d.flushSync})}else await s.navigate(d.action||f,{preventScrollReset:d.preventScrollReset,formData:g,body:h,formMethod:d.method||m,formEncType:d.encType||p,replace:d.replace,state:d.state,fromRouteId:r,flushSync:d.flushSync,viewTransition:d.viewTransition})},[s,i,r])}function Oy(s,{relative:i}={}){let{basename:r}=w.useContext(ea),c=w.useContext(Kt);Xe(c,"useFormAction must be used inside a RouteContext");let[d]=c.matches.slice(-1),f={...Ll(s||".",{relative:i})},m=sn();if(s==null){f.search=m.search;let p=new URLSearchParams(f.search),g=p.getAll("index");if(g.some(y=>y==="")){p.delete("index"),g.filter(j=>j).forEach(j=>p.append("index",j));let y=p.toString();f.search=y?`?${y}`:""}}return(!s||s===".")&&d.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:Ta([r,f.pathname])),Ml(f)}function My(s,i={}){let r=w.useContext(Kh);Xe(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=ng("useViewTransitionState"),d=Ll(s,{relative:i.relative});if(!r.isTransitioning)return!1;let f=Aa(r.currentLocation.pathname,c)||r.currentLocation.pathname,m=Aa(r.nextLocation.pathname,c)||r.nextLocation.pathname;return ui(d.pathname,m)!=null||ui(d.pathname,f)!=null}[...py];const zy=()=>window.__MCPHUB_CONFIG__||{basePath:"",version:"dev",name:"mcphub"},su=()=>{const i=zy().basePath||"";return i&&!i.startsWith("/")?"/"+i:i},Dy=()=>su()+"/api",Ne=s=>{const i=Dy(),r=s.startsWith("/")?s:"/"+s;return i+r},Uy=async()=>{try{const s=window.location.pathname,i=[s.replace(/\/[^/]*$/,"")+"/config","/config",...s.includes("/")?[s.split("/")[1]?`/${s.split("/")[1]}/config`:"/config"]:["/config"]];for(const r of i)try{const c=await fetch(r,{method:"GET",headers:{Accept:"application/json","Cache-Control":"no-cache"}});if(c.ok){const d=await c.json();if(d.success&&d.data)return d.data}}catch(c){console.debug(`Failed to load config from ${r}:`,c)}return console.warn("Could not load runtime config from server, using defaults"),{basePath:"",version:"dev",name:"mcphub"}}catch(s){return console.error("Error loading runtime config:",s),{basePath:"",version:"dev",name:"mcphub"}}},lu="mcphub_token",ln=()=>localStorage.getItem(lu),sg=s=>{localStorage.setItem(lu,s)},Gc=()=>{localStorage.removeItem(lu)},Ly=async s=>{try{console.log(Ne("/auth/login"));const r=await(await fetch(Ne("/auth/login"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})).json();return r.success&&r.token&&sg(r.token),r}catch(i){return console.error("Login error:",i),{success:!1,message:"An error occurred during login"}}},_y=async s=>{try{const r=await(await fetch(Ne("/auth/register"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})).json();return r.success&&r.token&&sg(r.token),r}catch(i){return console.error("Register error:",i),{success:!1,message:"An error occurred during registration"}}},Hy=async()=>{const s=ln();if(!s)return{success:!1,message:"No authentication token"};try{return await(await fetch(Ne("/auth/user"),{method:"GET",headers:{"x-auth-token":s}})).json()}catch(i){return console.error("Get current user error:",i),{success:!1,message:"An error occurred while fetching user data"}}},By=async s=>{const i=ln();if(!i)return{success:!1,message:"No authentication token"};try{return await(await fetch(Ne("/auth/change-password"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":i},body:JSON.stringify(s)})).json()}catch(r){return console.error("Change password error:",r),{success:!1,message:"An error occurred while changing password"}}},Vy=()=>{Gc()},qy=async()=>{var s;try{const i=su(),r=await fetch(`${i}/public-config`,{method:"GET",headers:{"Content-Type":"application/json"}});return r.ok?{skipAuth:((s=(await r.json()).data)==null?void 0:s.skipAuth)===!0}:{skipAuth:!1}}catch(i){return console.debug("Failed to get public config:",i),{skipAuth:!1}}},Gy=async()=>{try{return(await qy()).skipAuth}catch(s){return console.debug("Failed to check skipAuth setting:",s),!1}},oa={isAuthenticated:!1,loading:!0,user:null,error:null},lg=w.createContext({auth:oa,login:async()=>!1,register:async()=>!1,logout:()=>{}}),$y=({children:s})=>{const[i,r]=w.useState(oa);w.useEffect(()=>{(async()=>{if(await Gy()){r({isAuthenticated:!0,loading:!1,user:{username:"guest",isAdmin:!0},error:null});return}if(!ln()){r({...oa,loading:!1});return}try{const h=await Hy();h.success&&h.user?r({isAuthenticated:!0,loading:!1,user:h.user,error:null}):(Gc(),r({...oa,loading:!1}))}catch{Gc(),r({...oa,loading:!1})}})()},[]);const c=async(m,p)=>{try{const g=await Ly({username:m,password:p});return g.success&&g.token&&g.user?(r({isAuthenticated:!0,loading:!1,user:g.user,error:null}),!0):(r({...oa,loading:!1,error:g.message||"Authentication failed"}),!1)}catch{return r({...oa,loading:!1,error:"Authentication failed"}),!1}},d=async(m,p,g=!1)=>{try{const h=await _y({username:m,password:p,isAdmin:g});return h.success&&h.token&&h.user?(r({isAuthenticated:!0,loading:!1,user:h.user,error:null}),!0):(r({...oa,loading:!1,error:h.message||"Registration failed"}),!1)}catch{return r({...oa,loading:!1,error:"Registration failed"}),!1}},f=()=>{Vy(),r({...oa,loading:!1})};return l.jsx(lg.Provider,{value:{auth:i,login:c,register:d,logout:f},children:s})},ru=()=>w.useContext(lg);/**
|
|
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 Ky=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Yy=s=>s.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,c)=>c?c.toUpperCase():r.toLowerCase()),fh=s=>{const i=Yy(s);return i.charAt(0).toUpperCase()+i.slice(1)},rg=(...s)=>s.filter((i,r,c)=>!!i&&i.trim()!==""&&c.indexOf(i)===r).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 Xy={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 Qy=w.forwardRef(({color:s="currentColor",size:i=24,strokeWidth:r=2,absoluteStrokeWidth:c,className:d="",children:f,iconNode:m,...p},g)=>w.createElement("svg",{ref:g,...Xy,width:i,height:i,stroke:s,strokeWidth:c?Number(r)*24/Number(i):r,className:rg("lucide",d),...p},[...m.map(([h,y])=>w.createElement(h,y)),...Array.isArray(f)?f:[f]]));/**
|
|
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 lt=(s,i)=>{const r=w.forwardRef(({className:c,...d},f)=>w.createElement(Qy,{ref:f,iconNode:i,className:rg(`lucide-${Ky(fh(s))}`,`lucide-${s}`,c),...d}));return r.displayName=fh(s),r};/**
|
|
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 Py=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],xi=lt("check",Py);/**
|
|
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 Zy=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ig=lt("chevron-down",Zy);/**
|
|
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 Fy=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],og=lt("chevron-right",Fy);/**
|
|
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 Jy=[["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=lt("circle-alert",Jy);/**
|
|
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 Iy=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Wy=lt("circle-check-big",Iy);/**
|
|
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 eb=[["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"}]],tb=lt("circle-x",eb);/**
|
|
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 ab=[["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=lt("copy",ab);/**
|
|
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 nb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],sb=lt("info",nb);/**
|
|
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 lb=[["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"}]],rb=lt("loader",lb);/**
|
|
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 ib=[["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"}]],ob=lt("log-out",ib);/**
|
|
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 cb=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],ub=lt("moon",cb);/**
|
|
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 db=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],fb=lt("play",db);/**
|
|
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 mb=[["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"}]],hb=lt("refresh-cw",mb);/**
|
|
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 gb=[["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"}]],pb=lt("settings",gb);/**
|
|
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 xb=[["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=lt("square-pen",xb);/**
|
|
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 yb=[["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"}]],bb=lt("sun",yb);/**
|
|
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 vb=[["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"}]],wb=lt("trash",vb);/**
|
|
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 jb=[["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"}]],Sb=lt("user",jb);/**
|
|
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 Nb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],zl=lt("x",Nb);function fg(s){var i,r,c="";if(typeof s=="string"||typeof s=="number")c+=s;else if(typeof s=="object")if(Array.isArray(s)){var d=s.length;for(i=0;i<d;i++)s[i]&&(r=fg(s[i]))&&(c&&(c+=" "),c+=r)}else for(r in s)s[r]&&(c&&(c+=" "),c+=r);return c}function Cb(){for(var s,i,r=0,c="",d=arguments.length;r<d;r++)(s=arguments[r])&&(i=fg(s))&&(c&&(c+=" "),c+=i);return c}const iu="-",Eb=s=>{const i=Tb(s),{conflictingClassGroups:r,conflictingClassGroupModifiers:c}=s;return{getClassGroupId:m=>{const p=m.split(iu);return p[0]===""&&p.length!==1&&p.shift(),mg(p,i)||kb(m)},getConflictingClassGroupIds:(m,p)=>{const g=r[m]||[];return p&&c[m]?[...g,...c[m]]:g}}},mg=(s,i)=>{var m;if(s.length===0)return i.classGroupId;const r=s[0],c=i.nextPart.get(r),d=c?mg(s.slice(1),c):void 0;if(d)return d;if(i.validators.length===0)return;const f=s.join(iu);return(m=i.validators.find(({validator:p})=>p(f)))==null?void 0:m.classGroupId},mh=/^\[(.+)\]$/,kb=s=>{if(mh.test(s)){const i=mh.exec(s)[1],r=i==null?void 0:i.substring(0,i.indexOf(":"));if(r)return"arbitrary.."+r}},Tb=s=>{const{theme:i,classGroups:r}=s,c={nextPart:new Map,validators:[]};for(const d in r)$c(r[d],c,d,i);return c},$c=(s,i,r,c)=>{s.forEach(d=>{if(typeof d=="string"){const f=d===""?i:hh(i,d);f.classGroupId=r;return}if(typeof d=="function"){if(Ab(d)){$c(d(c),i,r,c);return}i.validators.push({validator:d,classGroupId:r});return}Object.entries(d).forEach(([f,m])=>{$c(m,hh(i,f),r,c)})})},hh=(s,i)=>{let r=s;return i.split(iu).forEach(c=>{r.nextPart.has(c)||r.nextPart.set(c,{nextPart:new Map,validators:[]}),r=r.nextPart.get(c)}),r},Ab=s=>s.isThemeGetter,Rb=s=>{if(s<1)return{get:()=>{},set:()=>{}};let i=0,r=new Map,c=new Map;const d=(f,m)=>{r.set(f,m),i++,i>s&&(i=0,c=r,r=new Map)};return{get(f){let m=r.get(f);if(m!==void 0)return m;if((m=c.get(f))!==void 0)return d(f,m),m},set(f,m){r.has(f)?r.set(f,m):d(f,m)}}},Kc="!",Yc=":",Ob=Yc.length,Mb=s=>{const{prefix:i,experimentalParseClassName:r}=s;let c=d=>{const f=[];let m=0,p=0,g=0,h;for(let S=0;S<d.length;S++){let E=d[S];if(m===0&&p===0){if(E===Yc){f.push(d.slice(g,S)),g=S+Ob;continue}if(E==="/"){h=S;continue}}E==="["?m++:E==="]"?m--:E==="("?p++:E===")"&&p--}const y=f.length===0?d:d.substring(g),j=zb(y),v=j!==y,T=h&&h>g?h-g:void 0;return{modifiers:f,hasImportantModifier:v,baseClassName:j,maybePostfixModifierPosition:T}};if(i){const d=i+Yc,f=c;c=m=>m.startsWith(d)?f(m.substring(d.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:m,maybePostfixModifierPosition:void 0}}if(r){const d=c;c=f=>r({className:f,parseClassName:d})}return c},zb=s=>s.endsWith(Kc)?s.substring(0,s.length-1):s.startsWith(Kc)?s.substring(1):s,Db=s=>{const i=Object.fromEntries(s.orderSensitiveModifiers.map(c=>[c,!0]));return c=>{if(c.length<=1)return c;const d=[];let f=[];return c.forEach(m=>{m[0]==="["||i[m]?(d.push(...f.sort(),m),f=[]):f.push(m)}),d.push(...f.sort()),d}},Ub=s=>({cache:Rb(s.cacheSize),parseClassName:Mb(s),sortModifiers:Db(s),...Eb(s)}),Lb=/\s+/,_b=(s,i)=>{const{parseClassName:r,getClassGroupId:c,getConflictingClassGroupIds:d,sortModifiers:f}=i,m=[],p=s.trim().split(Lb);let g="";for(let h=p.length-1;h>=0;h-=1){const y=p[h],{isExternal:j,modifiers:v,hasImportantModifier:T,baseClassName:S,maybePostfixModifierPosition:E}=r(y);if(j){g=y+(g.length>0?" "+g:g);continue}let O=!!E,R=c(O?S.substring(0,E):S);if(!R){if(!O){g=y+(g.length>0?" "+g:g);continue}if(R=c(S),!R){g=y+(g.length>0?" "+g:g);continue}O=!1}const A=f(v).join(":"),$=T?A+Kc:A,Z=$+R;if(m.includes(Z))continue;m.push(Z);const B=d(R,O);for(let oe=0;oe<B.length;++oe){const P=B[oe];m.push($+P)}g=y+(g.length>0?" "+g:g)}return g};function Hb(){let s=0,i,r,c="";for(;s<arguments.length;)(i=arguments[s++])&&(r=hg(i))&&(c&&(c+=" "),c+=r);return c}const hg=s=>{if(typeof s=="string")return s;let i,r="";for(let c=0;c<s.length;c++)s[c]&&(i=hg(s[c]))&&(r&&(r+=" "),r+=i);return r};function Bb(s,...i){let r,c,d,f=m;function m(g){const h=i.reduce((y,j)=>j(y),s());return r=Ub(h),c=r.cache.get,d=r.cache.set,f=p,p(g)}function p(g){const h=c(g);if(h)return h;const y=_b(g,r);return d(g,y),y}return function(){return f(Hb.apply(null,arguments))}}const st=s=>{const i=r=>r[s]||[];return i.isThemeGetter=!0,i},gg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,pg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Vb=/^\d+\/\d+$/,qb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Gb=/\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$/,$b=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Kb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Yb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ys=s=>Vb.test(s),ke=s=>!!s&&!Number.isNaN(Number(s)),an=s=>!!s&&Number.isInteger(Number(s)),Lc=s=>s.endsWith("%")&&ke(s.slice(0,-1)),ka=s=>qb.test(s),Xb=()=>!0,Qb=s=>Gb.test(s)&&!$b.test(s),xg=()=>!1,Pb=s=>Kb.test(s),Zb=s=>Yb.test(s),Fb=s=>!me(s)&&!he(s),Jb=s=>ks(s,vg,xg),me=s=>gg.test(s),An=s=>ks(s,wg,Qb),_c=s=>ks(s,av,ke),gh=s=>ks(s,yg,xg),Ib=s=>ks(s,bg,Zb),ni=s=>ks(s,jg,Pb),he=s=>pg.test(s),Al=s=>Ts(s,wg),Wb=s=>Ts(s,nv),ph=s=>Ts(s,yg),ev=s=>Ts(s,vg),tv=s=>Ts(s,bg),si=s=>Ts(s,jg,!0),ks=(s,i,r)=>{const c=gg.exec(s);return c?c[1]?i(c[1]):r(c[2]):!1},Ts=(s,i,r=!1)=>{const c=pg.exec(s);return c?c[1]?i(c[1]):r:!1},yg=s=>s==="position"||s==="percentage",bg=s=>s==="image"||s==="url",vg=s=>s==="length"||s==="size"||s==="bg-size",wg=s=>s==="length",av=s=>s==="number",nv=s=>s==="family-name",jg=s=>s==="shadow",sv=()=>{const s=st("color"),i=st("font"),r=st("text"),c=st("font-weight"),d=st("tracking"),f=st("leading"),m=st("breakpoint"),p=st("container"),g=st("spacing"),h=st("radius"),y=st("shadow"),j=st("inset-shadow"),v=st("text-shadow"),T=st("drop-shadow"),S=st("blur"),E=st("perspective"),O=st("aspect"),R=st("ease"),A=st("animate"),$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...Z(),he,me],oe=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],H=()=>[he,me,g],I=()=>[ys,"full","auto",...H()],ne=()=>[an,"none","subgrid",he,me],L=()=>["auto",{span:["full",an,he,me]},an,he,me],V=()=>[an,"auto",he,me],se=()=>["auto","min","max","fr",he,me],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...H()],q=()=>[ys,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...H()],z=()=>[s,he,me],re=()=>[...Z(),ph,gh,{position:[he,me]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",ev,Jb,{size:[he,me]}],te=()=>[Lc,Al,An],ae=()=>["","none","full",h,he,me],de=()=>["",ke,Al,An],we=()=>["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"],le=()=>[ke,Lc,ph,gh],ce=()=>["","none",S,he,me],xe=()=>["none",ke,he,me],Be=()=>["none",ke,he,me],je=()=>[ke,he,me],De=()=>[ys,"full",...H()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ka],breakpoint:[ka],color:[Xb],container:[ka],"drop-shadow":[ka],ease:["in","out","in-out"],font:[Fb],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ka],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ka],shadow:[ka],spacing:["px",ke],text:[ka],"text-shadow":[ka],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ys,me,he,O]}],container:["container"],columns:[{columns:[ke,me,he,p]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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:B()}],overflow:[{overflow:oe()}],"overflow-x":[{"overflow-x":oe()}],"overflow-y":[{"overflow-y":oe()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],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:[an,"auto",he,me]}],basis:[{basis:[ys,"full","auto",p,...H()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,ys,"auto","initial","none",me]}],grow:[{grow:["",ke,he,me]}],shrink:[{shrink:["",ke,he,me]}],order:[{order:[an,"first","last","none",he,me]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":se()}],"auto-rows":[{"auto-rows":se()}],gap:[{gap:H()}],"gap-x":[{"gap-x":H()}],"gap-y":[{"gap-y":H()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:H()}],px:[{px:H()}],py:[{py:H()}],ps:[{ps:H()}],pe:[{pe:H()}],pt:[{pt:H()}],pr:[{pr:H()}],pb:[{pb:H()}],pl:[{pl:H()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":H()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":H()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[p,"screen",...q()]}],"min-w":[{"min-w":[p,"screen","none",...q()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[m]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",r,Al,An]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[c,he,_c]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Lc,me]}],"font-family":[{font:[Wb,me,i]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[d,he,me]}],"line-clamp":[{"line-clamp":[ke,"none",he,_c]}],leading:[{leading:[f,...H()]}],"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:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",he,An]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[ke,"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:H()}],"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:re()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},an,he,me],radial:["",he,me],conic:[an,he,me]},tv,Ib]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,he,me]}],"outline-w":[{outline:["",ke,Al,An]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",y,si,ni]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",j,si,ni]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[ke,An]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",v,si,ni]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[ke,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":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[he,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":Z()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,me]}],filter:[{filter:["","none",he,me]}],blur:[{blur:ce()}],brightness:[{brightness:[ke,he,me]}],contrast:[{contrast:[ke,he,me]}],"drop-shadow":[{"drop-shadow":["","none",T,si,ni]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",ke,he,me]}],"hue-rotate":[{"hue-rotate":[ke,he,me]}],invert:[{invert:["",ke,he,me]}],saturate:[{saturate:[ke,he,me]}],sepia:[{sepia:["",ke,he,me]}],"backdrop-filter":[{"backdrop-filter":["","none",he,me]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[ke,he,me]}],"backdrop-contrast":[{"backdrop-contrast":[ke,he,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,he,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,he,me]}],"backdrop-invert":[{"backdrop-invert":["",ke,he,me]}],"backdrop-opacity":[{"backdrop-opacity":[ke,he,me]}],"backdrop-saturate":[{"backdrop-saturate":[ke,he,me]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,he,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":H()}],"border-spacing-x":[{"border-spacing-x":H()}],"border-spacing-y":[{"border-spacing-y":H()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",he,me]}],ease:[{ease:["linear","initial",R,he,me]}],delay:[{delay:[ke,he,me]}],animate:[{animate:["none",A,he,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,he,me]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:xe()}],"rotate-x":[{"rotate-x":xe()}],"rotate-y":[{"rotate-y":xe()}],"rotate-z":[{"rotate-z":xe()}],scale:[{scale:Be()}],"scale-x":[{"scale-x":Be()}],"scale-y":[{"scale-y":Be()}],"scale-z":[{"scale-z":Be()}],"scale-3d":["scale-3d"],skew:[{skew:je()}],"skew-x":[{"skew-x":je()}],"skew-y":[{"skew-y":je()}],transform:[{transform:[he,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:De()}],"translate-x":[{"translate-x":De()}],"translate-y":[{"translate-y":De()}],"translate-z":[{"translate-z":De()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",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":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"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",...z()]}],"stroke-w":[{stroke:[ke,Al,An,_c]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},lv=Bb(sv);function nn(...s){return lv(Cb(s))}const rv=({message:s,type:i="info",duration:r=3e3,onClose:c,visible:d})=>{w.useEffect(()=>{if(d){const g=setTimeout(()=>{c()},r);return()=>clearTimeout(g)}},[d,r,c]);const f={success:l.jsx(xi,{className:"w-5 h-5 text-green-500"}),error:l.jsx(zl,{className:"w-5 h-5 text-red-500"}),info:l.jsx("svg",{className:"w-5 h-5 text-blue-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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:l.jsx("svg",{className:"w-5 h-5 text-yellow-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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"})})},m={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"},p={success:"text-green-800",error:"text-red-800",info:"text-blue-800",warning:"text-yellow-800"};return l.jsx("div",{className:nn("fixed top-4 right-4 z-50 max-w-sm p-4 rounded-md shadow-lg border",m[i],"transform transition-all duration-300 ease-in-out",d?"translate-x-0 opacity-100":"translate-x-full opacity-0"),children:l.jsxs("div",{className:"flex items-start",children:[l.jsx("div",{className:"flex-shrink-0",children:f[i]}),l.jsx("div",{className:"ml-3",children:l.jsx("p",{className:nn("text-sm font-medium",p[i]),children:s})}),l.jsx("div",{className:"ml-auto pl-3",children:l.jsx("div",{className:"-mx-1.5 -my-1.5",children:l.jsxs("button",{onClick:c,className:nn("inline-flex rounded-md p-1.5",`hover:bg-${i}-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-${i}-500`),children:[l.jsx("span",{className:"sr-only",children:"Dismiss"}),l.jsx(zl,{className:"h-5 w-5"})]})})})]})})},Sg=w.createContext(void 0),_l=()=>{const s=w.useContext(Sg);if(!s)throw new Error("useToast must be used within a ToastProvider");return s},iv=({children:s})=>{const[i,r]=w.useState({message:"",type:"info",visible:!1,duration:3e3}),c=w.useCallback((f,m="info",p=3e3)=>{r({message:f,type:m,visible:!0,duration:p})},[]),d=w.useCallback(()=>{r(f=>({...f,visible:!1}))},[]);return l.jsxs(Sg.Provider,{value:{showToast:c},children:[s,l.jsx(rv,{message:i.message,type:i.type,duration:i.duration,onClose:d,visible:i.visible})]})},Ng=w.createContext(void 0),ov=()=>{const s=w.useContext(Ng);if(!s)throw new Error("useTheme must be used within a ThemeProvider");return s},cv=({children:s})=>{const[i,r]=w.useState(()=>localStorage.getItem("theme")||"system"),[c,d]=w.useState("light"),f=m=>{r(m),localStorage.setItem("theme",m)};return w.useEffect(()=>{const m=()=>{const g=window.document.documentElement,h=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",y=i==="system"?h:i;d(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="")},p=window.matchMedia("(prefers-color-scheme: dark)");return p.addEventListener("change",m),m(),()=>{p.removeEventListener("change",m)}},[i]),l.jsx(Ng.Provider,{value:{theme:i,setTheme:f,resolvedTheme:c},children:s})},uv=(s,i,r,c)=>{var f,m,p,g;const d=[r,{code:i,...c||{}}];if((m=(f=s==null?void 0:s.services)==null?void 0:f.logger)!=null&&m.forward)return s.services.logger.forward(d,"warn","react-i18next::",!0);Rn(d[0])&&(d[0]=`react-i18next:: ${d[0]}`),(g=(p=s==null?void 0:s.services)==null?void 0:p.logger)!=null&&g.warn?s.services.logger.warn(...d):console!=null&&console.warn&&console.warn(...d)},xh={},Xc=(s,i,r,c)=>{Rn(r)&&xh[r]||(Rn(r)&&(xh[r]=new Date),uv(s,i,r,c))},Cg=(s,i)=>()=>{if(s.isInitialized)i();else{const r=()=>{setTimeout(()=>{s.off("initialized",r)},0),i()};s.on("initialized",r)}},Qc=(s,i,r)=>{s.loadNamespaces(i,Cg(s,r))},yh=(s,i,r,c)=>{if(Rn(r)&&(r=[r]),s.options.preload&&s.options.preload.indexOf(i)>-1)return Qc(s,r,c);r.forEach(d=>{s.options.ns.indexOf(d)<0&&s.options.ns.push(d)}),s.loadLanguages(i,Cg(s,c))},dv=(s,i,r={})=>!i.languages||!i.languages.length?(Xc(i,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:i.languages}),!0):i.hasLoadedNamespace(s,{lng:r.lng,precheck:(c,d)=>{var f;if(((f=r.bindI18n)==null?void 0:f.indexOf("languageChanging"))>-1&&c.services.backendConnector.backend&&c.isLanguageChangingTo&&!d(c.isLanguageChangingTo,s))return!1}}),Rn=s=>typeof s=="string",fv=s=>typeof s=="object"&&s!==null,mv=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,hv={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},gv=s=>hv[s],pv=s=>s.replace(mv,gv);let Pc={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:pv};const xv=(s={})=>{Pc={...Pc,...s}},yv=()=>Pc;let Eg;const bv=s=>{Eg=s},vv=()=>Eg,wv={type:"3rdParty",init(s){xv(s.options.react),bv(s)}},jv=w.createContext();class Sv{constructor(){this.usedNamespaces={}}addUsedNamespaces(i){i.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Nv=(s,i)=>{const r=w.useRef();return w.useEffect(()=>{r.current=s},[s,i]),r.current},kg=(s,i,r,c)=>s.getFixedT(i,r,c),Cv=(s,i,r,c)=>w.useCallback(kg(s,i,r,c),[s,i,r,c]),Oe=(s,i={})=>{var Z,B,oe,P;const{i18n:r}=i,{i18n:c,defaultNS:d}=w.useContext(jv)||{},f=r||c||vv();if(f&&!f.reportNamespaces&&(f.reportNamespaces=new Sv),!f){Xc(f,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const H=(ne,L)=>Rn(L)?L:fv(L)&&Rn(L.defaultValue)?L.defaultValue:Array.isArray(ne)?ne[ne.length-1]:ne,I=[H,{},!1];return I.t=H,I.i18n={},I.ready=!1,I}(Z=f.options.react)!=null&&Z.wait&&Xc(f,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const m={...yv(),...f.options.react,...i},{useSuspense:p,keyPrefix:g}=m;let h=d||((B=f.options)==null?void 0:B.defaultNS);h=Rn(h)?[h]:h||["translation"],(P=(oe=f.reportNamespaces).addUsedNamespaces)==null||P.call(oe,h);const y=(f.isInitialized||f.initializedStoreOnce)&&h.every(H=>dv(H,f,m)),j=Cv(f,i.lng||null,m.nsMode==="fallback"?h:h[0],g),v=()=>j,T=()=>kg(f,i.lng||null,m.nsMode==="fallback"?h:h[0],g),[S,E]=w.useState(v);let O=h.join();i.lng&&(O=`${i.lng}${O}`);const R=Nv(O),A=w.useRef(!0);w.useEffect(()=>{const{bindI18n:H,bindI18nStore:I}=m;A.current=!0,!y&&!p&&(i.lng?yh(f,i.lng,h,()=>{A.current&&E(T)}):Qc(f,h,()=>{A.current&&E(T)})),y&&R&&R!==O&&A.current&&E(T);const ne=()=>{A.current&&E(T)};return H&&(f==null||f.on(H,ne)),I&&(f==null||f.store.on(I,ne)),()=>{A.current=!1,f&&(H==null||H.split(" ").forEach(L=>f.off(L,ne))),I&&f&&I.split(" ").forEach(L=>f.store.off(L,ne))}},[f,O]),w.useEffect(()=>{A.current&&y&&E(v)},[f,g,y]);const $=[S,f,y];if($.t=S,$.i18n=f,$.ready=y,y||!y&&!p)return $;throw new Promise(H=>{i.lng?yh(f,i.lng,h,()=>H()):Qc(f,h,()=>H())})},Tg=()=>{const{t:s}=Oe(),{theme:i,setTheme:r}=ov();return l.jsx("div",{className:"flex items-center space-x-2",children:l.jsxs("div",{className:"flex bg-gray-100 dark:bg-gray-700 rounded-lg p-1",children:[l.jsx("button",{onClick:()=>r("light"),className:`flex items-center justify-center rounded-md p-1.5 ${i==="light"?"bg-white text-yellow-600 shadow":"text-black dark:text-gray-300 hover:text-yellow-600 dark:hover:text-yellow-500"}`,title:s("theme.light"),"aria-label":s("theme.light"),children:l.jsx(bb,{size:18})}),l.jsx("button",{onClick:()=>r("dark"),className:`flex items-center justify-center rounded-md p-1.5 ${i==="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:s("theme.dark"),"aria-label":s("theme.dark"),children:l.jsx(ub,{size:18})})]})})},Ev=s=>l.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...s,children:[l.jsx("title",{children:"GitHub"}),l.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"})]}),kv=s=>l.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...s,children:[l.jsx("title",{children:"Sponsor"}),l.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"})]}),Tv=s=>l.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...s,children:[l.jsx("title",{children:"WeChat"}),l.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"})]}),Av=s=>l.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...s,children:[l.jsx("title",{children:"Discord"}),l.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"})]}),Rv=({open:s,onOpenChange:i})=>{const{i18n:r,t:c}=Oe();return s?l.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:l.jsxs("div",{className:"p-6 relative",children:[l.jsx("button",{onClick:()=>i(!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:l.jsx(zl,{className:"h-5 w-5"})}),l.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:c("sponsor.title")}),l.jsx("div",{className:"flex flex-col items-center justify-center py-4",children:r.language==="zh"?l.jsx("img",{src:"./assets/reward.png",alt:c("sponsor.rewardAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}):l.jsxs("div",{className:"text-center",children:[l.jsx("p",{className:"mb-4 text-gray-700 dark:text-gray-300",children:c("sponsor.supportMessage")}),l.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},Ov=({open:s,onOpenChange:i})=>{const{t:r}=Oe();return s?l.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:l.jsxs("div",{className:"p-6 relative",children:[l.jsx("button",{onClick:()=>i(!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":r("common.close"),children:l.jsx(zl,{className:"h-5 w-5"})}),l.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:r("wechat.title")}),l.jsxs("div",{className:"flex flex-col items-center justify-center py-4",children:[l.jsx("img",{src:"./assets/wexin.png",alt:r("wechat.qrCodeAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}),l.jsx("p",{className:"mt-4 text-center text-gray-700 dark:text-gray-300",children:r("wechat.scanMessage")})]})]})})}):null},Mv=({onToggleSidebar:s})=>{const{t:i,i18n:r}=Oe(),[c,d]=w.useState(!1),[f,m]=w.useState(!1);return l.jsxs("header",{className:"bg-white dark:bg-gray-800 shadow-sm z-10",children:[l.jsxs("div",{className:"flex justify-between items-center px-3 py-3",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("button",{onClick:s,className:"p-2 rounded-md text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none","aria-label":i("app.toggleSidebar"),children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),l.jsx("h1",{className:"ml-4 text-xl font-bold text-gray-900 dark:text-white",children:i("app.title")})]}),l.jsxs("div",{className:"flex items-center space-x-4",children:[l.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"v0.8.3"}),l.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:l.jsx(Ev,{className:"h-5 w-5"})}),r.language==="zh"?l.jsx("button",{onClick:()=>m(!0),className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 focus:outline-none","aria-label":i("wechat.label"),children:l.jsx(Tv,{className:"h-5 w-5"})}):l.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":i("discord.label"),children:l.jsx(Av,{className:"h-5 w-5"})}),l.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":i("sponsor.label"),children:l.jsx(kv,{className:"h-5 w-5"})}),l.jsx(Tg,{})]})]}),l.jsx(Rv,{open:c,onOpenChange:d}),l.jsx(Ov,{open:f,onOpenChange:m})]})},zv="https://registry.npmjs.org",Dv="@samanhappy/mcphub",Ag=async()=>{try{const s=await fetch(`${zv}/${Dv}/latest`);if(!s.ok)throw new Error(`Failed to fetch latest version: ${s.status}`);return(await s.json()).version||null}catch(s){return console.error("Error checking for latest version:",s),null}},Rg=(s,i)=>{if(s==="dev")return-1;const r=s.split(".").map(Number),c=i.split(".").map(Number);for(let d=0;d<3;d++){const f=r[d]||0,m=c[d]||0;if(f>m)return-1;if(f<m)return 1}return 0},Uv=({isOpen:s,onClose:i,version:r})=>{const{t:c}=Oe(),[d,f]=w.useState(!1),[m,p]=w.useState(""),[g,h]=w.useState(!1),y=async()=>{h(!0);try{const j=await Ag();j&&(p(j),f(Rg(r,j)>0))}catch(j){console.error("Failed to check for updates:",j)}finally{h(!1)}};return w.useEffect(()=>{s&&y()},[s,r]),s?l.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-30 z-50 flex items-center justify-center p-4",children:l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:l.jsxs("div",{className:"p-6 relative",children:[l.jsx("button",{onClick:i,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:l.jsx(zl,{className:"h-5 w-5"})}),l.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:c("about.title")}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("span",{className:"text-gray-700 dark:text-gray-300",children:[c("about.currentVersion"),":"]}),l.jsx("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:r})]}),d&&m&&l.jsx("div",{className:"bg-blue-50 dark:bg-blue-900 p-3 rounded",children:l.jsxs("div",{className:"flex items-start",children:[l.jsx("div",{className:"flex-shrink-0",children:l.jsx("svg",{className:"h-5 w-5 text-blue-600 dark:text-blue-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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"})})}),l.jsxs("div",{className:"ml-3 flex-1 text-sm text-blue-700 dark:text-blue-300",children:[l.jsx("p",{children:c("about.newVersionAvailable",{version:m})}),l.jsx("p",{className:"mt-1",children:l.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")})})]})]})}),l.jsxs("button",{onClick:y,disabled:g,className:`mt-4 inline-flex items-center px-4 py-2 border border-gray-200 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium btn-secondary
|
|
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:[l.jsx(hb,{className:`h-4 w-4 mr-2 ${g?"animate-spin":""}`}),c(g?"about.checking":"about.checkForUpdates")]})]})]})})}):null},Lv=({collapsed:s,version:i})=>{var O;const{t:r}=Oe(),c=On(),{auth:d,logout:f}=ru(),[m,p]=w.useState(!1),[g,h]=w.useState(!1),[y,j]=w.useState(!1),v=w.useRef(null);w.useEffect(()=>{(async()=>{try{const A=await Ag();A&&h(Rg(i,A)>0)}catch(A){console.error("Error checking for new version:",A)}})()},[i]),w.useEffect(()=>{const R=A=>{v.current&&!v.current.contains(A.target)&&p(!1)};return document.addEventListener("mousedown",R),()=>{document.removeEventListener("mousedown",R)}},[]);const T=()=>{c("/settings"),p(!1)},S=()=>{f(),c("/login")},E=()=>{j(!0),p(!1)};return l.jsxs("div",{ref:v,className:"relative",children:[l.jsxs("button",{onClick:()=>p(!m),className:`flex ${s?"justify-center":"items-center"} w-full p-2 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors rounded-md ${m?"bg-gray-100 dark:bg-gray-700":""}`,children:[l.jsxs("div",{className:"flex-shrink-0 relative",children:[l.jsx("div",{className:"w-5 h-5 flex items-center justify-center rounded-full border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700",children:l.jsx(Sb,{className:"h-4 w-4 text-gray-700 dark:text-gray-300"})}),g&&l.jsx("span",{className:"absolute -top-1 -right-1 block w-2 h-2 bg-red-500 rounded-full"})]}),!s&&l.jsx("div",{className:"ml-3 flex flex-col items-start",children:l.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:((O=d.user)==null?void 0:O.username)||r("auth.user")})})]}),m&&l.jsxs("div",{className:"absolute top-0 transform -translate-y-full left-0 w-full min-w-max bg-white border border-gray-200 dark:bg-gray-800 py-1 z-50",children:[l.jsxs("button",{onClick:T,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:[l.jsx(pb,{className:"h-4 w-4 mr-2"}),r("nav.settings")]}),l.jsxs("button",{onClick:E,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:[l.jsx(sb,{className:"h-4 w-4 mr-2"}),r("about.title"),g&&l.jsx("span",{className:"absolute top-2 right-4 block w-2 h-2 bg-red-500 rounded-full"})]}),l.jsxs("button",{onClick:S,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:[l.jsx(ob,{className:"h-4 w-4 mr-2"}),r("app.logout")]})]}),l.jsx(Uv,{isOpen:y,onClose:()=>j(!1),version:i})]})},_v=({collapsed:s})=>{const{t:i}=Oe(),r="0.8.3",c=[{path:"/",label:i("nav.dashboard"),icon:l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[l.jsx("path",{d:"M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"}),l.jsx("path",{d:"M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"})]})},{path:"/servers",label:i("nav.servers"),icon:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:l.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:i("nav.groups"),icon:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:l.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:i("nav.market"),icon:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:l.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:i("nav.logs"),icon:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:l.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 l.jsxs("aside",{className:`bg-white dark:bg-gray-800 shadow-sm transition-all duration-300 ease-in-out flex flex-col h-full relative ${s?"w-16":"w-64"}`,children:[l.jsx("div",{className:"overflow-y-auto flex-grow",children:l.jsx("nav",{className:"p-3 space-y-1",children:c.map(d=>l.jsxs(ag,{to:d.path,className:({isActive:f})=>`flex items-center px-2.5 py-2 rounded-lg transition-colors duration-200
|
|
168
|
+
${f?"bg-blue-50 text-blue-700":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-100"}`,end:d.path==="/",children:[l.jsx("span",{className:"flex-shrink-0",children:d.icon}),!s&&l.jsx("span",{className:"ml-3",children:d.label})]},d.path))})}),l.jsx("div",{className:"p-3 bg-white dark:bg-gray-800",children:l.jsx(Lv,{collapsed:s,version:r})})]})},Hv=({children:s})=>l.jsx("main",{className:"flex-1 overflow-auto p-6 bg-gray-100 dark:bg-gray-900",children:l.jsx("div",{className:"container mx-auto",children:s})}),Bv=()=>{const[s,i]=Bc.useState(!1),r=()=>{i(!s)};return l.jsxs("div",{className:"flex flex-col h-screen bg-gray-100 dark:bg-gray-900",children:[l.jsx(Mv,{onToggleSidebar:r}),l.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[l.jsx(_v,{collapsed:s}),l.jsx(Hv,{children:l.jsx(Fh,{})})]})]})},Vv=({redirectPath:s="/login"})=>{const{t:i}=Oe(),{auth:r}=ru();return r.loading?l.jsx("div",{className:"flex items-center justify-center h-screen",children:i("app.loading")}):r.isAuthenticated?l.jsx(Fh,{}):l.jsx(Zh,{to:s,replace:!0})},qv=()=>{const{t:s}=Oe(),[i,r]=w.useState(""),[c,d]=w.useState(""),[f,m]=w.useState(null),[p,g]=w.useState(!1),{login:h}=ru(),y=On(),j=async v=>{v.preventDefault(),m(null),g(!0);try{if(!i||!c){m(s("auth.emptyFields")),g(!1);return}await h(i,c)?y("/"):m(s("auth.loginFailed"))}catch{m(s("auth.loginError"))}finally{g(!1)}};return l.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 login-container",children:[l.jsx("div",{className:"absolute top-4 right-4",children:l.jsx(Tg,{})}),l.jsxs("div",{className:"max-w-md w-full space-y-8 login-card p-8",children:[l.jsx("div",{children:l.jsx("h2",{className:"mt-6 text-center text-3xl font-extrabold text-gray-900 dark:text-white",children:s("auth.loginTitle")})}),l.jsxs("form",{className:"mt-8 space-y-6",onSubmit:j,children:[l.jsxs("div",{className:"rounded-md -space-y-px",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"username",className:"sr-only",children:s("auth.username")}),l.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-200 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 transition-all duration-200 form-input",placeholder:s("auth.username"),value:i,onChange:v=>r(v.target.value)})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"password",className:"sr-only",children:s("auth.password")}),l.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 login-input transition-all duration-200 form-input",placeholder:s("auth.password"),value:c,onChange:v=>d(v.target.value)})]})]}),f&&l.jsx("div",{className:"text-red-500 dark:text-red-400 text-sm text-center error-box p-2 rounded",children:f}),l.jsx("div",{children:l.jsx("button",{type:"submit",disabled:p,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 login-button transition-all duration-200 btn-primary",children:s(p?"auth.loggingIn":"auth.login")})})]})]})]})},li={startup:{maxAttempts:60,pollingInterval:3e3},normal:{pollingInterval:1e4}},Hl=()=>{const{t:s}=Oe(),[i,r]=w.useState([]),[c,d]=w.useState(null),[f,m]=w.useState(0),[p,g]=w.useState(!0),[h,y]=w.useState(0),j=w.useRef(null),v=w.useRef(0),T=()=>{j.current&&(clearInterval(j.current),j.current=null)},S=w.useCallback(()=>{T();const Z=async()=>{try{const B=localStorage.getItem("mcphub_token"),P=await(await fetch(Ne("/servers"),{headers:{"x-auth-token":B||""}})).json();P&&P.success&&Array.isArray(P.data)?r(P.data):P&&Array.isArray(P)?r(P):(console.error("Invalid server data format:",P),r([])),d(null)}catch(B){console.error("Error fetching servers during normal polling:",B),navigator.onLine?B instanceof TypeError&&(B.message.includes("NetworkError")||B.message.includes("Failed to fetch"))?d(s("errors.serverConnection")):d(s("errors.serverFetch")):d(s("errors.network"))}};Z(),j.current=setInterval(Z,li.normal.pollingInterval)},[s]);return w.useEffect(()=>{f>0&&(v.current=0,y(0));const Z=async()=>{try{const B=localStorage.getItem("mcphub_token"),P=await(await fetch(Ne("/servers"),{headers:{"x-auth-token":B||""}})).json();return P&&P.success&&Array.isArray(P.data)?(r(P.data),g(!1),S(),!0):P&&Array.isArray(P)?(r(P),g(!1),S(),!0):(console.error("Invalid server data format:",P),r([]),g(!1),S(),!0)}catch(B){return v.current+=1,console.error(`Initial loading attempt ${v.current} failed:`,B),y(v.current),navigator.onLine?d(s("errors.initialStartup")):d(s("errors.network")),v.current>=li.startup.maxAttempts&&(console.log("Maximum startup attempts reached, switching to normal polling"),g(!1),T(),S()),!1}};return p?(T(),Z(),j.current=setInterval(Z,li.startup.pollingInterval),console.log(`Started initial polling with interval: ${li.startup.pollingInterval}ms`)):S(),()=>{T()}},[f,s,p,S]),{servers:i,error:c,setError:d,isLoading:p,fetchAttempts:h,triggerRefresh:()=>{T(),p&&(g(!0),v.current=0,y(0)),m(Z=>Z+1)},handleServerAdd:()=>{m(Z=>Z+1)},handleServerEdit:async Z=>{try{const B=localStorage.getItem("mcphub_token"),P=await(await fetch(Ne("/settings"),{headers:{"x-auth-token":B||""}})).json();if(P&&P.success&&P.data&&P.data.mcpServers&&P.data.mcpServers[Z.name]){const H=P.data.mcpServers[Z.name];return{name:Z.name,status:Z.status,tools:Z.tools||[],config:H}}else return console.error("Failed to get server config from settings:",P),d(s("server.invalidConfig",{serverName:Z.name})),null}catch(B){return console.error("Error fetching server settings:",B),d(B instanceof Error?B.message:String(B)),null}},handleServerRemove:async Z=>{try{const B=localStorage.getItem("mcphub_token"),oe=await fetch(Ne(`/servers/${Z}`),{method:"DELETE",headers:{"x-auth-token":B||""}}),P=await oe.json();return oe.ok?(m(H=>H+1),!0):(d(P.message||s("server.deleteError",{serverName:Z})),!1)}catch(B){return d(s("errors.general")+": "+(B instanceof Error?B.message:String(B))),!1}},handleServerToggle:async(Z,B)=>{try{const oe=localStorage.getItem("mcphub_token"),P=await fetch(Ne(`/servers/${Z.name}/toggle`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":oe||""},body:JSON.stringify({enabled:B})}),H=await P.json();return P.ok?(m(I=>I+1),!0):(console.error("Failed to toggle server:",H),d(s("server.toggleError",{serverName:Z.name})),!1)}catch(oe){return console.error("Error toggling server:",oe),d(oe instanceof Error?oe.message:String(oe)),!1}}}},Gv=()=>{const{t:s}=Oe(),{servers:i,error:r,setError:c,isLoading:d}=Hl(),f={total:i.length,online:i.filter(p=>p.status==="connected").length,offline:i.filter(p=>p.status==="disconnected").length,connecting:i.filter(p=>p.status==="connecting").length},m={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting"};return l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:s("pages.dashboard.title")}),r&&l.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm error-box",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-status-red text-lg font-medium",children:s("app.error")}),l.jsx("p",{className:"text-gray-600 mt-1",children:r})]}),l.jsx("button",{onClick:()=>c(null),className:"ml-4 text-gray-500 hover:text-gray-700 transition-colors duration-200","aria-label":s("app.closeButton"),children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:l.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&&l.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center loading-container",children:l.jsxs("div",{className:"flex flex-col items-center",children:[l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"})]}),l.jsx("p",{className:"text-gray-600",children:s("app.loading")})]})}),!d&&l.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4",children:[l.jsx("div",{className:"bg-white rounded-lg shadow p-6 dashboard-card",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"p-3 rounded-full bg-blue-100 text-blue-800 icon-container status-icon-blue",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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"})})}),l.jsxs("div",{className:"ml-4",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:s("pages.dashboard.totalServers")}),l.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.total})]})]})}),l.jsx("div",{className:"bg-white rounded-lg shadow p-6 dashboard-card",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"p-3 rounded-full bg-green-100 text-green-800 icon-container status-icon-green",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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"})})}),l.jsxs("div",{className:"ml-4",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:s("pages.dashboard.onlineServers")}),l.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.online})]})]})}),l.jsx("div",{className:"bg-white rounded-lg shadow p-6 dashboard-card",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"p-3 rounded-full bg-red-100 text-red-800 icon-container status-icon-red",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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"})})}),l.jsxs("div",{className:"ml-4",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:s("pages.dashboard.offlineServers")}),l.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.offline})]})]})}),l.jsx("div",{className:"bg-white rounded-lg shadow p-6 dashboard-card",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"p-3 rounded-full bg-yellow-100 text-yellow-800 icon-container status-icon-yellow",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),l.jsxs("div",{className:"ml-4",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:s("pages.dashboard.connectingServers")}),l.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.connecting})]})]})})]}),i.length>0&&!d&&l.jsxs("div",{className:"mt-8",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:s("pages.dashboard.recentServers")}),l.jsx("div",{className:"bg-white shadow rounded-lg overflow-hidden table-container",children:l.jsxs("table",{className:"min-w-full",children:[l.jsx("thead",{className:"bg-gray-50 border-b border-gray-200",children:l.jsxs("tr",{children:[l.jsx("th",{scope:"col",className:"px-6 py-5 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:s("server.name")}),l.jsx("th",{scope:"col",className:"px-6 py-5 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:s("server.status")}),l.jsx("th",{scope:"col",className:"px-6 py-5 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:s("server.tools")}),l.jsx("th",{scope:"col",className:"px-6 py-5 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:s("server.enabled")})]})}),l.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:i.slice(0,5).map((p,g)=>{var h;return l.jsxs("tr",{children:[l.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:p.name}),l.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:l.jsx("span",{className:`px-2 py-1 inline-flex text-xs leading-5 font-semibold rounded-full ${p.status==="connected"?"status-badge-online":p.status==="disconnected"?"status-badge-offline":"status-badge-connecting"}`,children:s(m[p.status]||p.status)})}),l.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:((h=p.tools)==null?void 0:h.length)||0}),l.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:p.enabled!==!1?l.jsx("span",{className:"text-green-600",children:"✓"}):l.jsx("span",{className:"text-status-red",children:"✗"})})]},g)})})]})})]})]})},$v="modulepreload",Kv=function(s,i){return new URL(s,i).href},bh={},Yv=function(i,r,c){let d=Promise.resolve();if(r&&r.length>0){let m=function(y){return Promise.all(y.map(j=>Promise.resolve(j).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const p=document.getElementsByTagName("link"),g=document.querySelector("meta[property=csp-nonce]"),h=(g==null?void 0:g.nonce)||(g==null?void 0:g.getAttribute("nonce"));d=m(r.map(y=>{if(y=Kv(y,c),y in bh)return;bh[y]=!0;const j=y.endsWith(".css"),v=j?'[rel="stylesheet"]':"";if(!!c)for(let E=p.length-1;E>=0;E--){const O=p[E];if(O.href===y&&(!j||O.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${v}`))return;const S=document.createElement("link");if(S.rel=j?"stylesheet":$v,j||(S.as="script"),S.crossOrigin="",S.href=y,h&&S.setAttribute("nonce",h),document.head.appendChild(S),j)return new Promise((E,O)=>{S.addEventListener("load",E),S.addEventListener("error",()=>O(new Error(`Unable to preload CSS for ${y}`)))})}))}function f(m){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=m,window.dispatchEvent(p),!p.defaultPrevented)throw m}return d.then(m=>{for(const p of m||[])p.status==="rejected"&&f(p.reason);return i().catch(f)})},Xv={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:s,variant:i="default",className:r,onClick:c}){return l.jsx("span",{className:nn("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors",Xv[i],c?"cursor-pointer":"",r),onClick:c,children:s})}const Qv=({status:s})=>{const{t:i}=Oe(),r={connecting:"status-badge-connecting",connected:"status-badge-online",disconnected:"status-badge-offline"},c={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting"};return l.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${r[s]}`,children:i(c[s]||s)})},Og=async(s,i)=>{try{const r=ln(),c=i?`/tools/call/${i}`:"/tools/call",d=await fetch(Ne(c),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":r||"",Authorization:`Bearer ${r}`},body:JSON.stringify({toolName:s.toolName,arguments:s.arguments})});if(!d.ok)throw new Error(`HTTP ${d.status}: ${d.statusText}`);const f=await d.json();return f.success?{success:!0,content:f.data.content||[]}:{success:!1,error:f.message||"Tool call failed"}}catch(r){return console.error("Error calling tool:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}},Pv=async(s,i,r)=>{try{const c=ln(),d=await fetch(Ne(`/servers/${s}/tools/${i}/toggle`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":c||"",Authorization:`Bearer ${c}`},body:JSON.stringify({enabled:r})});if(!d.ok)throw new Error(`HTTP ${d.status}: ${d.statusText}`);const f=await d.json();return{success:f.success,error:f.success?void 0:f.message}}catch(c){return console.error("Error toggling tool:",c),{success:!1,error:c instanceof Error?c.message:"Unknown error occurred"}}},Mg=async(s,i,r)=>{try{const c=ln(),d=await fetch(Ne(`/servers/${s}/tools/${i}/description`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":c||"",Authorization:`Bearer ${c||""}`},body:JSON.stringify({description:r})});if(!d.ok)throw new Error(`HTTP ${d.status}: ${d.statusText}`);const f=await d.json();return{success:f.success,error:f.success?void 0:f.message}}catch(c){return console.error("Error updating tool description:",c),{success:!1,error:c instanceof Error?c.message:"Unknown error occurred"}}},Zv=Object.freeze(Object.defineProperty({__proto__:null,callTool:Og,toggleTool:Pv,updateToolDescription:Mg},Symbol.toStringTag,{value:"Module"})),Fv=({isSelected:s,onClick:i,children:r})=>l.jsxs("button",{type:"button",role:"checkbox","aria-checked":s,className:nn("flex w-full items-center justify-between p-2 rounded transition-colors cursor-pointer",s?"bg-blue-50 text-blue-700 hover:bg-blue-100 border-l-4 border-blue-500":"hover:bg-gray-50 text-gray-700"),onClick:i,children:[l.jsx("span",{className:"flex items-center",children:r}),s&&l.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:l.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:s,helpText:i,noOptionsText:r="No options available",values:c,options:d,onChange:f,className:m})=>{const p=g=>{const h=c.includes(g);f(h?c.filter(y=>y!==g):[...c,g])};return l.jsxs("div",{className:m,children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:s}),l.jsx("div",{className:"border border-gray-200 rounded shadow max-h-60 overflow-y-auto",children:d.length===0?l.jsx("p",{className:"text-gray-500 text-sm p-3",children:r}):l.jsx("div",{className:"space-y-1 p-1",children:d.map(g=>l.jsx(Fv,{value:g.value,isSelected:c.includes(g.value),onClick:()=>p(g.value),children:g.label},g.value))})}),i&&l.jsx("p",{className:"text-xs text-gray-500 mt-1",children:i})]})},Ss=({checked:s,onCheckedChange:i,disabled:r=!1})=>l.jsx("button",{type:"button",role:"switch","aria-checked":s,disabled:r,className:nn("relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",s?"bg-blue-200":"bg-gray-100",r?"opacity-50 cursor-not-allowed":"cursor-pointer"),onClick:()=>!r&&i(!s),children:l.jsx("span",{className:nn("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",s?"translate-x-6":"translate-x-1")})}),Jv=({schema:s,onSubmit:i,onCancel:r,loading:c=!1,storageKey:d,title:f})=>{const{t:m}=Oe(),[p,g]=w.useState({}),[h,y]=w.useState({}),[j,v]=w.useState(!1),[T,S]=w.useState(""),[E,O]=w.useState(""),R=w.useMemo(()=>(V=>{const se=Q=>{if(typeof Q=="object"&&Q!==null){const Y=Q;return{type:Y.type||"string",description:Y.description,enum:Y.enum,default:Y.default,properties:Y.properties?Object.fromEntries(Object.entries(Y.properties).map(([k,q])=>[k,se(q)])):void 0,required:Y.required,items:Y.items?se(Y.items):void 0}}return{type:"string"}};return{type:V.type,properties:V.properties?Object.fromEntries(Object.entries(V.properties).map(([Q,Y])=>[Q,se(Y)])):void 0,required:V.required}})(s),[s]);w.useEffect(()=>{const L=(se,Q="")=>{const Y={};return se.type==="object"&&se.properties&&Object.entries(se.properties).forEach(([k,q])=>{const z=Q?`${Q}.${k}`:k;q.default!==void 0?Y[k]=q.default:q.type==="string"?Y[k]="":q.type==="number"||q.type==="integer"?Y[k]=0:q.type==="boolean"?Y[k]=!1:q.type==="array"?Y[k]=[]:q.type==="object"&&(q.properties?Y[k]=L(q,z):Y[k]={})}),Y};let V=L(R);if(d)try{const se=localStorage.getItem(d);if(se){const Q=JSON.parse(se);V={...V,...Q}}}catch(se){console.warn("Failed to load saved form data:",se)}g(V)},[R,d]),w.useEffect(()=>{j&&Object.keys(p).length>0&&(S(JSON.stringify(p,null,2)),O(""))},[j,p]);const A=L=>{S(L),O("");try{const V=JSON.parse(L);if(g(V),d)try{localStorage.setItem(d,JSON.stringify(V))}catch(se){console.warn("Failed to save form data to localStorage:",se)}}catch{O(m("tool.invalidJsonFormat"))}},$=()=>{S(JSON.stringify(p,null,2)),O(""),v(!0)},Z=()=>{if(T.trim())try{const L=JSON.parse(T);g(L),O(""),v(!1)}catch{O(m("tool.fixJsonBeforeSwitching"));return}else v(!1)},B=(L,V)=>{g(se=>{const Q={...se},Y=L.split(".");let k=Q;for(let q=0;q<Y.length-1;q++)k[Y[q]]||(k[Y[q]]={}),k=k[Y[q]];if(k[Y[Y.length-1]]=V,d)try{localStorage.setItem(d,JSON.stringify(Q))}catch(q){console.warn("Failed to save form data to localStorage:",q)}return Q}),h[L]&&y(se=>{const Q={...se};return delete Q[L],Q})},oe=()=>{const L={},V=(se,Q,Y="")=>{se.type==="object"&&se.properties&&Object.entries(se.properties).forEach(([k,q])=>{var N;const z=Y?`${Y}.${k}`:k,re=H(Q,z);if((N=se.required)!=null&&N.includes(k)&&(re==null||re==="")){L[z]=`${k} is required`;return}re!=null&&re!==""&&(q.type==="string"&&typeof re!="string"?L[z]=`${k} must be a string`:q.type==="number"&&typeof re!="number"?L[z]=`${k} must be a number`:q.type==="integer"&&(!Number.isInteger(re)||typeof re!="number")?L[z]=`${k} must be an integer`:q.type==="boolean"&&typeof re!="boolean"?L[z]=`${k} must be a boolean`:q.type==="array"&&Array.isArray(re)?q.items&&re.forEach((G,te)=>{var ae;((ae=q.items)==null?void 0:ae.type)==="object"&&q.items.properties&&V(q.items,G,`${z}.${te}`)}):q.type==="object"&&typeof re=="object"&&V(q,re,z))})};return V(R,p),y(L),Object.keys(L).length===0},P=L=>{L.preventDefault(),oe()&&i(p)},H=(L,V)=>V.split(".").reduce((se,Q)=>se==null?void 0:se[Q],L),I=(L,V,se,Q)=>{const Y=se==null?void 0:se[L];return V.type==="string"?V.enum?l.jsxs("select",{value:Y||"",onChange:k=>Q(k.target.value),className:"w-full border rounded-md px-2 py-1 text-sm border-gray-300 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[l.jsx("option",{value:"",children:m("tool.selectOption")}),V.enum.map((k,q)=>l.jsx("option",{value:k,children:k},q))]}):l.jsx("input",{type:"text",value:Y||"",onChange:k=>Q(k.target.value),className:"w-full border rounded-md px-2 py-1 text-sm border-gray-300 focus:outline-none focus:ring-1 focus:ring-blue-500 form-input",placeholder:V.description||m("tool.enterKey",{key:L})}):V.type==="number"||V.type==="integer"?l.jsx("input",{type:"number",step:V.type==="integer"?"1":"any",value:Y||"",onChange:k=>{const q=k.target.value===""?"":V.type==="integer"?parseInt(k.target.value):parseFloat(k.target.value);Q(q)},className:"w-full border rounded-md px-2 py-1 text-sm border-gray-300 focus:outline-none focus:ring-1 focus:ring-blue-500 form-input"}):V.type==="boolean"?l.jsx("input",{type:"checkbox",checked:Y||!1,onChange:k=>Q(k.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}):l.jsx("input",{type:"text",value:Y||"",onChange:k=>Q(k.target.value),className:"w-full border rounded-md px-2 py-1 text-sm border-gray-300 focus:outline-none focus:ring-1 focus:ring-blue-500 form-input",placeholder:V.description||m("tool.enterKey",{key:L})})},ne=(L,V,se="")=>{var q,z,re,N,G,te,ae,de,we,ee,le,ce,xe,Be;const Q=se?`${se}.${L}`:L,Y=H(p,Q),k=h[Q];if(V.type==="array"){const je=H(p,Q)||[];return l.jsxs("div",{className:"mb-6",children:[l.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[L,(se?(z=(q=H(R,se))==null?void 0:q.required)==null?void 0:z.includes(L):(re=R.required)==null?void 0:re.includes(L))&&l.jsx("span",{className:"text-status-red ml-1",children:"*"})]}),V.description&&l.jsx("p",{className:"text-xs text-gray-500 mb-2",children:V.description}),l.jsxs("div",{className:"border border-gray-200 rounded-md p-3 bg-gray-50",children:[je.map((De,Fe)=>{var Ct,ua,rn;return l.jsxs("div",{className:"mb-3 p-3 bg-white border rounded-md",children:[l.jsxs("div",{className:"flex justify-between items-center mb-2",children:[l.jsx("span",{className:"text-sm font-medium text-gray-600",children:m("tool.item",{index:Fe+1})}),l.jsx("button",{type:"button",onClick:()=>{const Le=[...je];Le.splice(Fe,1),B(Q,Le)},className:"text-status-red hover:text-red-700 text-sm",children:m("common.remove")})]}),((Ct=V.items)==null?void 0:Ct.type)==="string"&&V.items.enum?l.jsxs("select",{value:De||"",onChange:Le=>{const vt=[...je];vt[Fe]=Le.target.value,B(Q,vt)},className:"w-full border rounded-md px-3 py-2 border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500",children:[l.jsx("option",{value:"",children:m("tool.selectOption")}),V.items.enum.map((Le,vt)=>l.jsx("option",{value:Le,children:Le},vt))]}):((ua=V.items)==null?void 0:ua.type)==="object"&&V.items.properties?l.jsx("div",{className:"space-y-3",children:Object.entries(V.items.properties).map(([Le,vt])=>{var Ra,Oa;return l.jsxs("div",{children:[l.jsxs("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:[Le,((Oa=(Ra=V.items)==null?void 0:Ra.required)==null?void 0:Oa.includes(Le))&&l.jsx("span",{className:"text-status-red ml-1",children:"*"})]}),I(Le,vt,De,da=>{const Ma=[...je];Ma[Fe]={...Ma[Fe],[Le]:da},B(Q,Ma)})]},Le)})}):l.jsx("input",{type:"text",value:De||"",onChange:Le=>{const vt=[...je];vt[Fe]=Le.target.value,B(Q,vt)},className:"w-full border rounded-md px-3 py-2 border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 form-input",placeholder:m("tool.enterValue",{type:((rn=V.items)==null?void 0:rn.type)||"value"})})]},Fe)}),l.jsx("button",{type:"button",onClick:()=>{var Fe;const De=((Fe=V.items)==null?void 0:Fe.type)==="object"?{}:"";B(Q,[...je,De])},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:m("tool.addItem",{key:L})})]}),k&&l.jsx("p",{className:"text-status-red text-xs mt-1",children:k})]},Q)}return V.type==="object"?V.properties?l.jsxs("div",{className:"mb-6",children:[l.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[L,(se?(G=(N=H(R,se))==null?void 0:N.required)==null?void 0:G.includes(L):(te=R.required)==null?void 0:te.includes(L))&&l.jsx("span",{className:"text-status-red ml-1",children:"*"})]}),V.description&&l.jsx("p",{className:"text-xs text-gray-500 mb-2",children:V.description}),l.jsx("div",{className:"border border-gray-200 rounded-md p-4 bg-gray-50",children:Object.entries(V.properties).map(([je,De])=>ne(je,De,Q))}),k&&l.jsx("p",{className:"text-status-red text-xs mt-1",children:k})]},Q):l.jsxs("div",{className:"mb-4",children:[l.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[L,(se?(de=(ae=H(R,se))==null?void 0:ae.required)==null?void 0:de.includes(L):(we=R.required)==null?void 0:we.includes(L))&&l.jsx("span",{className:"text-status-red ml-1",children:"*"}),l.jsx("span",{className:"text-xs text-gray-500 ml-1",children:"(JSON object)"})]}),V.description&&l.jsx("p",{className:"text-xs text-gray-500 mb-2",children:V.description}),l.jsx("textarea",{value:typeof Y=="object"?JSON.stringify(Y,null,2):Y||"{}",onChange:je=>{try{const De=JSON.parse(je.target.value);B(Q,De)}catch{B(Q,je.target.value)}},placeholder:`{
|
|
169
|
+
"key": "value"
|
|
170
|
+
}`,className:`w-full border rounded-md px-3 py-2 font-mono text-sm ${k?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`,rows:4}),k&&l.jsx("p",{className:"text-status-red text-xs mt-1",children:k})]},Q):V.type==="string"?V.enum?l.jsxs("div",{className:"mb-4",children:[l.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[L,(se?!1:(ee=R.required)==null?void 0:ee.includes(L))&&l.jsx("span",{className:"text-status-red ml-1",children:"*"})]}),V.description&&l.jsx("p",{className:"text-xs text-gray-500 mb-2",children:V.description}),l.jsxs("select",{value:Y||"",onChange:je=>B(Q,je.target.value),className:`w-full border rounded-md px-3 py-2 ${k?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[l.jsx("option",{value:"",children:m("tool.selectOption")}),V.enum.map((je,De)=>l.jsx("option",{value:je,children:je},De))]}),k&&l.jsx("p",{className:"text-status-red text-xs mt-1",children:k})]},Q):l.jsxs("div",{className:"mb-4",children:[l.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[L,(se?!1:(le=R.required)==null?void 0:le.includes(L))&&l.jsx("span",{className:"text-status-red ml-1",children:"*"})]}),V.description&&l.jsx("p",{className:"text-xs text-gray-500 mb-2",children:V.description}),l.jsx("input",{type:"text",value:Y||"",onChange:je=>B(Q,je.target.value),className:`w-full border rounded-md px-3 py-2 ${k?"border-red":"border-gray-200"} focus:outline-none form-input`}),k&&l.jsx("p",{className:"text-status-red text-xs mt-1",children:k})]},Q):V.type==="number"||V.type==="integer"?l.jsxs("div",{className:"mb-4",children:[l.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[L,(se?!1:(ce=R.required)==null?void 0:ce.includes(L))&&l.jsx("span",{className:"text-status-red ml-1",children:"*"})]}),V.description&&l.jsx("p",{className:"text-xs text-gray-500 mb-2",children:V.description}),l.jsx("input",{type:"number",step:V.type==="integer"?"1":"any",value:Y||"",onChange:je=>{const De=je.target.value===""?"":V.type==="integer"?parseInt(je.target.value):parseFloat(je.target.value);B(Q,De)},className:`w-full border rounded-md px-3 py-2 form-input ${k?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),k&&l.jsx("p",{className:"text-status-red text-xs mt-1",children:k})]},Q):V.type==="boolean"?l.jsxs("div",{className:"mb-4",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("input",{type:"checkbox",checked:Y||!1,onChange:je=>B(Q,je.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),l.jsxs("label",{className:"ml-2 block text-sm text-gray-700",children:[L,(se?!1:(xe=R.required)==null?void 0:xe.includes(L))&&l.jsx("span",{className:"text-status-red ml-1",children:"*"})]})]}),V.description&&l.jsx("p",{className:"text-xs text-gray-500 mt-1",children:V.description}),k&&l.jsx("p",{className:"text-status-red text-xs mt-1",children:k})]},Q):l.jsxs("div",{className:"mb-4",children:[l.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[L,(se?!1:(Be=R.required)==null?void 0:Be.includes(L))&&l.jsx("span",{className:"text-status-red ml-1",children:"*"}),l.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",V.type,")"]})]}),V.description&&l.jsx("p",{className:"text-xs text-gray-500 mb-2",children:V.description}),l.jsx("input",{type:"text",value:Y||"",onChange:je=>B(Q,je.target.value),placeholder:m("tool.enterValue",{type:V.type}),className:`w-full border rounded-md px-3 py-2 ${k?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500 form-input`}),k&&l.jsx("p",{className:"text-status-red text-xs mt-1",children:k})]},Q)};return R.properties?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex justify-between items-center pb-3",children:[l.jsx("h6",{className:"text-md font-medium text-gray-900",children:f}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx("button",{type:"button",onClick:Z,className:`px-3 py-1 text-sm rounded-md transition-colors ${j?"text-sm text-gray-600 bg-gray-200 rounded hover:bg-gray-300 btn-secondary":"bg-blue-100 text-blue-800 rounded hover:bg-blue-200 text-sm btn-primary"}`,children:m("tool.formMode")}),l.jsx("button",{type:"button",onClick:$,className:`px-3 py-1 text-sm rounded-md transition-colors ${j?"px-4 py-1 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 text-sm btn-primary":"text-sm text-gray-600 bg-gray-200 rounded hover:bg-gray-300 btn-secondary"}`,children:m("tool.jsonMode")})]})]}),j?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:m("tool.jsonConfiguration")}),l.jsx("textarea",{value:T,onChange:L=>A(L.target.value),placeholder:`{
|
|
171
|
+
"key": "value"
|
|
172
|
+
}`,className:`w-full h-64 border rounded-md px-3 py-2 font-mono text-sm resize-y form-input ${E?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),E&&l.jsx("p",{className:"text-status-red text-xs mt-1",children:E})]}),l.jsxs("div",{className:"flex justify-end space-x-2 pt-4",children:[l.jsx("button",{type:"button",onClick:r,className:"px-4 py-1 text-sm text-gray-600 bg-gray-200 rounded hover:bg-gray-300 btn-secondary",children:m("tool.cancel")}),l.jsx("button",{onClick:()=>{try{const L=JSON.parse(T);i(L)}catch{O(m("tool.invalidJsonFormat"))}},disabled:c||!!E,className:"px-4 py-1 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 text-sm btn-primary",children:m(c?"tool.running":"tool.runTool")})]})]}):l.jsxs("form",{onSubmit:P,className:"space-y-4",children:[Object.entries(R.properties||{}).map(([L,V])=>ne(L,V)),l.jsxs("div",{className:"flex justify-end space-x-2 pt-4",children:[l.jsx("button",{type:"button",onClick:r,className:"px-4 py-1 text-sm text-gray-600 bg-gray-200 rounded hover:bg-gray-300 btn-secondary",children:m("tool.cancel")}),l.jsx("button",{type:"submit",disabled:c,className:"px-4 py-1 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 text-sm btn-primary",children:m(c?"tool.running":"tool.runTool")})]})]})]}):l.jsxs("div",{className:"p-4 bg-gray-50 rounded-md",children:[l.jsx("p",{className:"text-sm text-gray-600",children:m("tool.noParameters")}),l.jsxs("div",{className:"flex justify-end space-x-2 mt-4",children:[l.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-sm text-gray-600 bg-gray-100 rounded-md hover:bg-gray-200",children:m("tool.cancel")}),l.jsx("button",{onClick:()=>i({}),disabled:c,className:"px-4 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50",children:m(c?"tool.running":"tool.runTool")})]})]})},Iv=({result:s,onClose:i})=>{const{t:r}=Oe(),c=s.content,d=m=>Array.isArray(m)?m.map((p,g)=>l.jsx("div",{className:"mb-3 last:mb-0",children:f(p)},g)):f(m),f=m=>{if(typeof m=="string")return l.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:l.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:m})});if(typeof m=="object"&&m!==null){if(m.type==="text"&&m.text)return l.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:l.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:m.text})});if(m.type==="image"&&m.data)return l.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:l.jsx("img",{src:`data:${m.mimeType||"image/png"};base64,${m.data}`,alt:r("tool.toolResult"),className:"max-w-full h-auto rounded-md"})});try{const p=typeof m=="string"?JSON.parse(m):m;return l.jsxs("div",{className:"bg-gray-50 rounded-md p-3",children:[l.jsx("div",{className:"text-xs text-gray-500 mb-2",children:r("tool.jsonResponse")}),l.jsx("pre",{className:"text-sm text-gray-800 overflow-auto",children:JSON.stringify(p,null,2)})]})}catch{return l.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:l.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:String(m)})})}}return l.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:l.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:String(m)})})};return l.jsxs("div",{className:"border border-gray-300 rounded-lg bg-white shadow-sm",children:[l.jsx("div",{className:"border-b border-gray-300 px-4 py-3 bg-gray-50 rounded-t-lg",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[s.success?l.jsx(Wy,{size:20,className:"text-status-green"}):l.jsx(tb,{size:20,className:"text-status-red"}),l.jsx("div",{children:l.jsxs("h4",{className:"text-sm font-medium text-gray-900",children:[r("tool.execution")," ",s.success?r("tool.successful"):r("tool.failed")]})})]}),l.jsx("button",{onClick:i,className:"text-gray-400 hover:text-gray-600 text-sm",children:"✕"})]})}),l.jsx("div",{className:"p-4",children:s.success?l.jsx("div",{children:s.content&&s.content.length>0?l.jsxs("div",{children:[l.jsx("div",{className:"text-sm text-gray-600 mb-3",children:r("tool.result")}),d(s.content)]}):l.jsx("div",{className:"text-sm text-gray-500 italic",children:r("tool.noContent")})}):l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center space-x-2 mb-3",children:[l.jsx(cg,{size:16,className:"text-red-500"}),l.jsx("span",{className:"text-sm font-medium text-red-700",children:r("tool.error")})]}),c&&c.length>0?l.jsxs("div",{children:[l.jsx("div",{className:"text-sm text-gray-600 mb-3",children:r("tool.errorDetails")}),d(c)]}):l.jsx("div",{className:"bg-red-50 border border-red-300 rounded-md p-3",children:l.jsx("pre",{className:"text-sm text-red-800 whitespace-pre-wrap",children:s.error||s.message||r("tool.unknownError")})})]})})]})},Wv=({tool:s,server:i,onToggle:r,onDescriptionUpdate:c})=>{const{t:d}=Oe(),[f,m]=w.useState(!1),[p,g]=w.useState(!1),[h,y]=w.useState(!1),[j,v]=w.useState(null),[T,S]=w.useState(!1),[E,O]=w.useState(s.description||""),R=w.useRef(null),A=w.useRef(null),[$,Z]=w.useState(0);w.useEffect(()=>{T&&R.current&&(R.current.focus(),$>0&&(R.current.style.width=`${$+20}px`))},[T,$]),w.useEffect(()=>{!T&&A.current&&Z(A.current.offsetWidth)},[T,E]);const B=w.useCallback(()=>`mcphub_tool_form_${i?`${i}_`:""}${s.name}`,[s.name,i]),oe=w.useCallback(()=>{localStorage.removeItem(B())},[B]),P=Y=>{r&&r(s.name,Y)},H=()=>{S(!0)},I=async()=>{try{const Y=await Mg(i,s.name,E);Y.success?(S(!1),c&&c(s.name,E)):(O(s.description||""),console.error("Failed to update tool description:",Y.error))}catch(Y){console.error("Error updating tool description:",Y),O(s.description||""),S(!1)}},ne=Y=>{O(Y.target.value)},L=Y=>{Y.key==="Enter"?I():Y.key==="Escape"&&(O(s.description||""),S(!1))},V=async Y=>{y(!0);try{const k=await Og({toolName:s.name,arguments:Y},i);v(k)}catch(k){v({success:!1,error:k instanceof Error?k.message:"Unknown error occurred"})}finally{y(!1)}},se=()=>{g(!1),oe(),v(null)},Q=()=>{v(null)};return l.jsxs("div",{className:"bg-white border border-gray-200 shadow rounded-lg p-4 mb-4",children:[l.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>m(!f),children:[l.jsx("div",{className:"flex-1",children:l.jsxs("h3",{className:"text-lg font-medium text-gray-900",children:[s.name.replace(i+"-",""),l.jsx("span",{className:"ml-2 text-sm font-normal text-gray-600 inline-flex items-center",children:T?l.jsxs(l.Fragment,{children:[l.jsx("input",{ref:R,type:"text",className:"px-2 py-1 border border-blue-300 rounded bg-white text-sm focus:outline-none form-input",value:E,onChange:ne,onKeyDown:L,onClick:Y=>Y.stopPropagation(),style:{minWidth:"100px",width:$>0?`${$+20}px`:"auto"}}),l.jsx("button",{className:"ml-2 p-1 text-green-600 hover:text-green-800 cursor-pointer transition-colors",onClick:Y=>{Y.stopPropagation(),I()},children:l.jsx(xi,{size:16})})]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{ref:A,children:E||d("tool.noDescription")}),l.jsx("button",{className:"ml-2 p-1 text-gray-500 hover:text-blue-600 cursor-pointer transition-colors",onClick:Y=>{Y.stopPropagation(),H()},children:l.jsx(dg,{size:14})})]})})]})}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("div",{className:"flex items-center space-x-2",onClick:Y=>Y.stopPropagation(),children:l.jsx(Ss,{checked:s.enabled??!0,onCheckedChange:P,disabled:h})}),l.jsxs("button",{onClick:Y=>{Y.stopPropagation(),m(!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 btn-primary",disabled:h||!s.enabled,children:[h?l.jsx(rb,{size:14,className:"animate-spin"}):l.jsx(fb,{size:14}),l.jsx("span",{children:d(h?"tool.running":"tool.run")})]}),l.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:f?l.jsx(ig,{size:18}):l.jsx(og,{size:18})})]})]}),f&&l.jsxs("div",{className:"mt-4 space-y-4",children:[!p&&l.jsxs("div",{className:"bg-gray-50 rounded p-3 border border-gray-300",children:[l.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:d("tool.inputSchema")}),l.jsx("pre",{className:"text-xs text-gray-600 overflow-auto",children:JSON.stringify(s.inputSchema,null,2)})]}),p&&l.jsxs("div",{className:"border border-gray-300 rounded-lg p-4",children:[l.jsx(Jv,{schema:s.inputSchema||{type:"object"},onSubmit:V,onCancel:se,loading:h,storageKey:B(),title:d("tool.runToolWithName",{name:s.name.replace(i+"-","")})}),j&&l.jsx("div",{className:"mt-4",children:l.jsx(Iv,{result:j,onClose:Q})})]})]})]})},Dg=({isOpen:s,onClose:i,onConfirm:r,serverName:c,isGroup:d=!1})=>{const{t:f}=Oe();return s?l.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-30 z-50 flex items-center justify-center p-4",children:l.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:l.jsxs("div",{className:"p-6",children:[l.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-3",children:f(d?"groups.confirmDelete":"server.confirmDelete")}),l.jsx("p",{className:"text-gray-500 mb-6",children:d?f("groups.deleteWarning",{name:c}):f("server.deleteWarning",{name:c})}),l.jsxs("div",{className:"flex justify-end space-x-3",children:[l.jsx("button",{onClick:i,className:"px-4 py-2 text-gray-600 hover:text-gray-800 btn-secondary",children:f("common.cancel")}),l.jsx("button",{onClick:r,className:"px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600 btn-danger",children:f("common.delete")})]})]})})}):null},e1=({server:s,onRemove:i,onEdit:r,onToggle:c,onRefresh:d})=>{var I;const{t:f}=Oe(),{showToast:m}=_l(),[p,g]=w.useState(!1),[h,y]=w.useState(!1),[j,v]=w.useState(!1),[T,S]=w.useState(!1),[E,O]=w.useState(!1),R=w.useRef(null);w.useEffect(()=>{const ne=L=>{R.current&&!R.current.contains(L.target)&&S(!1)};return document.addEventListener("mousedown",ne),()=>{document.removeEventListener("mousedown",ne)}},[]);const A=ne=>{ne.stopPropagation(),y(!0)},$=ne=>{ne.stopPropagation(),r(s)},Z=async ne=>{if(ne.stopPropagation(),!(j||!c)){v(!0);try{await c(s,s.enabled===!1)}finally{v(!1)}}},B=ne=>{ne.stopPropagation(),S(!T)},oe=ne=>{if(ne.stopPropagation(),!!s.error)if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(s.error).then(()=>{O(!0),m(f("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>O(!1),2e3)});else{const L=document.createElement("textarea");L.value=s.error,L.style.position="fixed",L.style.left="-9999px",document.body.appendChild(L),L.focus(),L.select();try{document.execCommand("copy"),O(!0),m(f("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>O(!1),2e3)}catch(V){m(f("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",V)}document.body.removeChild(L)}},P=()=>{i(s.name),y(!1)},H=async(ne,L)=>{try{const{toggleTool:V}=await Yv(async()=>{const{toggleTool:Q}=await Promise.resolve().then(()=>Zv);return{toggleTool:Q}},[],import.meta.url),se=await V(s.name,ne,L);se.success?(m(f(L?"tool.enableSuccess":"tool.disableSuccess",{name:ne}),"success"),d&&d()):m(se.error||f("tool.toggleFailed"),"error")}catch(V){console.error("Error toggling tool:",V),m(f("tool.toggleFailed"),"error")}};return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:`bg-white shadow rounded-lg p-6 mb-6 page-card transition-all duration-200 ${s.enabled===!1?"opacity-60":""}`,children:[l.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>g(!p),children:[l.jsxs("div",{className:"flex items-center space-x-3",children:[l.jsx("h2",{className:`text-xl font-semibold ${s.enabled===!1?"text-gray-600":"text-gray-900"}`,children:s.name}),l.jsx(Qv,{status:s.status}),l.jsxs("div",{className:"flex items-center px-2 py-1 bg-blue-50 text-blue-700 rounded-full text-sm btn-primary",children:[l.jsx("svg",{className:"w-4 h-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20",children:l.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"})}),l.jsxs("span",{children:[((I=s.tools)==null?void 0:I.length)||0," ",f("server.tools")]})]}),s.error&&l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"cursor-pointer",onClick:B,"aria-label":f("server.viewErrorDetails"),children:l.jsx(cg,{className:"text-red-500 hover:text-red-600",size:18})}),T&&l.jsxs("div",{ref:R,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:ne=>ne.stopPropagation(),children:[l.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:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("h4",{className:"text-sm font-medium text-red-600",children:f("server.errorDetails")}),l.jsx("button",{onClick:oe,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors btn-secondary",title:f("common.copy"),children:E?l.jsx(xi,{size:14,className:"text-green-500"}):l.jsx(ug,{size:14})})]}),l.jsx("button",{onClick:ne=>{ne.stopPropagation(),S(!1)},className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),l.jsx("div",{className:"p-4 pt-2",children:l.jsx("pre",{className:"text-sm text-gray-700 break-words whitespace-pre-wrap",children:s.error})})]})]})]}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx("button",{onClick:$,className:"px-3 py-1 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 text-sm btn-primary",children:f("server.edit")}),l.jsx("div",{className:"flex items-center",children:l.jsx("button",{onClick:Z,className:`px-3 py-1 text-sm rounded transition-colors ${j?"bg-gray-200 text-gray-500":s.enabled!==!1?"bg-green-100 text-green-800 hover:bg-green-200 btn-secondary":"bg-gray-100 text-gray-800 hover:bg-gray-200 btn-primary"}`,disabled:j,children:j?f("common.processing"):s.enabled!==!1?f("server.disable"):f("server.enable")})}),l.jsx("button",{onClick:A,className:"px-3 py-1 bg-red-100 text-red-800 rounded hover:bg-red-200 text-sm btn-danger",children:f("server.delete")}),l.jsx("button",{className:"text-gray-400 hover:text-gray-600 btn-secondary",children:p?l.jsx(ig,{size:18}):l.jsx(og,{size:18})})]})]}),p&&s.tools&&l.jsxs("div",{className:"mt-6",children:[l.jsx("h6",{className:`font-medium ${s.enabled===!1?"text-gray-600":"text-gray-900"} mb-4`,children:f("server.tools")}),l.jsx("div",{className:"space-y-4",children:s.tools.map((ne,L)=>l.jsx(Wv,{server:s.name,tool:ne,onToggle:H},L))})]})]}),l.jsx(Dg,{isOpen:h,onClose:()=>y(!1),onConfirm:P,serverName:s.name})]})},ou=({onSubmit:s,onCancel:i,initialData:r=null,modalTitle:c,formError:d=null})=>{var Y,k,q,z,re,N,G,te,ae,de,we,ee,le,ce,xe,Be,je,De,Fe,Ct,ua,rn,Le,vt,Ra,Oa,da,Ma,As,Bl,Vl,za,mt,Yt,ht,ql,Gl,$l,on,cn,ta,un;const{t:f}=Oe(),m=()=>!r||!r.config?"stdio":r.config.type?r.config.type:r.config.url?"sse":"stdio",[p,g]=w.useState(m()),[h,y]=w.useState({name:r&&r.name||"",url:r&&r.config&&r.config.url||"",command:r&&r.config&&r.config.command||"",arguments:r&&r.config&&r.config.args?Array.isArray(r.config.args)?r.config.args.join(" "):String(r.config.args):"",args:r&&r.config&&r.config.args||[],type:m(),env:[],headers:[],options:{timeout:r&&r.config&&r.config.options&&r.config.options.timeout||6e4,resetTimeoutOnProgress:r&&r.config&&r.config.options&&r.config.options.resetTimeoutOnProgress||!1,maxTotalTimeout:r&&r.config&&r.config.options&&r.config.options.maxTotalTimeout||void 0},openapi:r&&r.config&&r.config.openapi?{url:r.config.openapi.url||"",schema:r.config.openapi.schema?JSON.stringify(r.config.openapi.schema,null,2):"",inputMode:r.config.openapi.url?"url":r.config.openapi.schema?"schema":"url",version:r.config.openapi.version||"3.1.0",securityType:((Y=r.config.openapi.security)==null?void 0:Y.type)||"none",apiKeyName:((q=(k=r.config.openapi.security)==null?void 0:k.apiKey)==null?void 0:q.name)||"",apiKeyIn:((re=(z=r.config.openapi.security)==null?void 0:z.apiKey)==null?void 0:re.in)||"header",apiKeyValue:((G=(N=r.config.openapi.security)==null?void 0:N.apiKey)==null?void 0:G.value)||"",httpScheme:((ae=(te=r.config.openapi.security)==null?void 0:te.http)==null?void 0:ae.scheme)||"bearer",httpCredentials:((we=(de=r.config.openapi.security)==null?void 0:de.http)==null?void 0:we.credentials)||"",oauth2Token:((le=(ee=r.config.openapi.security)==null?void 0:ee.oauth2)==null?void 0:le.token)||"",openIdConnectUrl:((xe=(ce=r.config.openapi.security)==null?void 0:ce.openIdConnect)==null?void 0:xe.url)||"",openIdConnectToken:((je=(Be=r.config.openapi.security)==null?void 0:Be.openIdConnect)==null?void 0:je.token)||""}:{inputMode:"url",url:"",schema:"",version:"3.1.0",securityType:"none"}}),[j,v]=w.useState(r&&r.config&&r.config.env?Object.entries(r.config.env).map(([ue,ie])=>({key:ue,value:ie})):[]),[T,S]=w.useState(r&&r.config&&r.config.headers?Object.entries(r.config.headers).map(([ue,ie])=>({key:ue,value:ie})):[]),[E,O]=w.useState(!1),[R,A]=w.useState(null),$=!!r,Z=ue=>{const{name:ie,value:pe}=ue.target;y({...h,[ie]:pe})},B=ue=>{const ie=ue.split(" ").filter(pe=>pe.trim()!=="");y({...h,arguments:ue,args:ie})},oe=ue=>{g(ue),y(ie=>({...ie,type:ue}))},P=(ue,ie,pe)=>{const Xt=[...j];Xt[ue][ie]=pe,v(Xt)},H=()=>{v([...j,{key:"",value:""}])},I=ue=>{const ie=[...j];ie.splice(ue,1),v(ie)},ne=(ue,ie,pe)=>{const Xt=[...T];Xt[ue][ie]=pe,S(Xt)},L=()=>{S([...T,{key:"",value:""}])},V=ue=>{const ie=[...T];ie.splice(ue,1),S(ie)},se=(ue,ie)=>{y(pe=>({...pe,options:{...pe.options,[ue]:ie}}))},Q=async ue=>{var ie,pe,Xt;ue.preventDefault(),A(null);try{const Qt={};j.forEach(({key:Et,value:aa})=>{Et.trim()&&(Qt[Et.trim()]=aa)});const Pt={};T.forEach(({key:Et,value:aa})=>{Et.trim()&&(Pt[Et.trim()]=aa)});const dn={};(ie=h.options)!=null&&ie.timeout&&h.options.timeout!==6e4&&(dn.timeout=h.options.timeout),(pe=h.options)!=null&&pe.resetTimeoutOnProgress&&(dn.resetTimeoutOnProgress=h.options.resetTimeoutOnProgress),(Xt=h.options)!=null&&Xt.maxTotalTimeout&&(dn.maxTotalTimeout=h.options.maxTotalTimeout);const Kl={name:h.name,config:{type:p,...p==="openapi"?{openapi:(()=>{var aa,Mn,Rs,Yl,Zt,tt;const Et={version:((aa=h.openapi)==null?void 0:aa.version)||"3.1.0"};if(((Mn=h.openapi)==null?void 0:Mn.inputMode)==="url")Et.url=((Rs=h.openapi)==null?void 0:Rs.url)||"";else if(((Yl=h.openapi)==null?void 0:Yl.inputMode)==="schema"&&((Zt=h.openapi)!=null&&Zt.schema))try{Et.schema=JSON.parse(h.openapi.schema)}catch{throw new Error("Invalid JSON schema format")}return(tt=h.openapi)!=null&&tt.securityType&&h.openapi.securityType!=="none"&&(Et.security={type:h.openapi.securityType,...h.openapi.securityType==="apiKey"&&{apiKey:{name:h.openapi.apiKeyName||"",in:h.openapi.apiKeyIn||"header",value:h.openapi.apiKeyValue||""}},...h.openapi.securityType==="http"&&{http:{scheme:h.openapi.httpScheme||"bearer",credentials:h.openapi.httpCredentials||""}},...h.openapi.securityType==="oauth2"&&{oauth2:{token:h.openapi.oauth2Token||""}},...h.openapi.securityType==="openIdConnect"&&{openIdConnect:{url:h.openapi.openIdConnectUrl||"",token:h.openapi.openIdConnectToken||""}}}),Et})(),...Object.keys(Pt).length>0?{headers:Pt}:{}}:p==="sse"||p==="streamable-http"?{url:h.url,...Object.keys(Pt).length>0?{headers:Pt}:{}}:{command:h.command,args:h.args,env:Object.keys(Qt).length>0?Qt:void 0},...Object.keys(dn).length>0?{options:dn}:{}}};s(Kl)}catch(Qt){A(`Error: ${Qt instanceof Error?Qt.message:String(Qt)}`)}};return l.jsxs("div",{className:"bg-white shadow rounded-lg p-6 w-full max-w-xl max-h-screen overflow-y-auto",children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:c}),l.jsx("button",{onClick:i,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),(R||d)&&l.jsx("div",{className:"bg-red-50 text-red-700 p-3 rounded mb-4",children:d||R}),l.jsxs("form",{onSubmit:Q,children:[l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:f("server.name")}),l.jsx("input",{type:"text",name:"name",id:"name",value:h.name,onChange:Z,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline form-input",placeholder:"e.g.: time-mcp",required:!0,disabled:$})]}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:f("server.type")}),l.jsxs("div",{className:"flex space-x-4",children:[l.jsxs("div",{children:[l.jsx("input",{type:"radio",id:"command",name:"serverType",value:"command",checked:p==="stdio",onChange:()=>oe("stdio"),className:"mr-1"}),l.jsx("label",{htmlFor:"command",children:"STDIO"})]}),l.jsxs("div",{children:[l.jsx("input",{type:"radio",id:"url",name:"serverType",value:"url",checked:p==="sse",onChange:()=>oe("sse"),className:"mr-1"}),l.jsx("label",{htmlFor:"url",children:"SSE"})]}),l.jsxs("div",{children:[l.jsx("input",{type:"radio",id:"streamable-http",name:"serverType",value:"streamable-http",checked:p==="streamable-http",onChange:()=>oe("streamable-http"),className:"mr-1"}),l.jsx("label",{htmlFor:"streamable-http",children:"Streamable HTTP"})]}),l.jsxs("div",{children:[l.jsx("input",{type:"radio",id:"openapi",name:"serverType",value:"openapi",checked:p==="openapi",onChange:()=>oe("openapi"),className:"mr-1"}),l.jsx("label",{htmlFor:"openapi",children:"OpenAPI"})]})]})]}),p==="openapi"?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:f("server.openapi.inputMode")}),l.jsxs("div",{className:"flex space-x-4",children:[l.jsxs("div",{children:[l.jsx("input",{type:"radio",id:"input-mode-url",name:"inputMode",value:"url",checked:((De=h.openapi)==null?void 0:De.inputMode)==="url",onChange:()=>y(ue=>({...ue,openapi:{...ue.openapi,inputMode:"url"}})),className:"mr-1"}),l.jsx("label",{htmlFor:"input-mode-url",children:f("server.openapi.inputModeUrl")})]}),l.jsxs("div",{children:[l.jsx("input",{type:"radio",id:"input-mode-schema",name:"inputMode",value:"schema",checked:((Fe=h.openapi)==null?void 0:Fe.inputMode)==="schema",onChange:()=>y(ue=>({...ue,openapi:{...ue.openapi,inputMode:"schema"}})),className:"mr-1"}),l.jsx("label",{htmlFor:"input-mode-schema",children:f("server.openapi.inputModeSchema")})]})]})]}),((Ct=h.openapi)==null?void 0:Ct.inputMode)==="url"&&l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"openapi-url",children:f("server.openapi.specUrl")}),l.jsx("input",{type:"url",name:"openapi-url",id:"openapi-url",value:((ua=h.openapi)==null?void 0:ua.url)||"",onChange:ue=>y(ie=>({...ie,openapi:{...ie.openapi,url:ue.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 form-input",placeholder:"e.g.: https://api.example.com/openapi.json",required:p==="openapi"&&((rn=h.openapi)==null?void 0:rn.inputMode)==="url"})]}),((Le=h.openapi)==null?void 0:Le.inputMode)==="schema"&&l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"openapi-schema",children:f("server.openapi.schema")}),l.jsx("textarea",{name:"openapi-schema",id:"openapi-schema",rows:10,value:((vt=h.openapi)==null?void 0:vt.schema)||"",onChange:ue=>y(ie=>({...ie,openapi:{...ie.openapi,schema:ue.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:`{
|
|
173
|
+
"openapi": "3.1.0",
|
|
174
|
+
"info": {
|
|
175
|
+
"title": "API",
|
|
176
|
+
"version": "1.0.0"
|
|
177
|
+
},
|
|
178
|
+
"servers": [
|
|
179
|
+
{
|
|
180
|
+
"url": "https://api.example.com"
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
"paths": {
|
|
184
|
+
...
|
|
185
|
+
}
|
|
186
|
+
}`,required:p==="openapi"&&((Ra=h.openapi)==null?void 0:Ra.inputMode)==="schema"}),l.jsx("p",{className:"text-xs text-gray-500 mt-1",children:f("server.openapi.schemaHelp")})]}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:f("server.openapi.security")}),l.jsxs("select",{value:((Oa=h.openapi)==null?void 0:Oa.securityType)||"none",onChange:ue=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,securityType:ue.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline form-input",children:[l.jsx("option",{value:"none",children:f("server.openapi.securityNone")}),l.jsx("option",{value:"apiKey",children:f("server.openapi.securityApiKey")}),l.jsx("option",{value:"http",children:f("server.openapi.securityHttp")}),l.jsx("option",{value:"oauth2",children:f("server.openapi.securityOAuth2")}),l.jsx("option",{value:"openIdConnect",children:f("server.openapi.securityOpenIdConnect")})]})]}),((da=h.openapi)==null?void 0:da.securityType)==="apiKey"&&l.jsxs("div",{className:"mb-4 p-4 border border-gray-200 rounded bg-gray-50",children:[l.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:f("server.openapi.apiKeyConfig")}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:f("server.openapi.apiKeyName")}),l.jsx("input",{type:"text",value:((Ma=h.openapi)==null?void 0:Ma.apiKeyName)||"",onChange:ue=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,apiKeyName:ue.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm form-input focus:outline-none",placeholder:"Authorization"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:f("server.openapi.apiKeyIn")}),l.jsxs("select",{value:((As=h.openapi)==null?void 0:As.apiKeyIn)||"header",onChange:ue=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,apiKeyIn:ue.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm focus:outline-none form-input",children:[l.jsx("option",{value:"header",children:"Header"}),l.jsx("option",{value:"query",children:"Query"}),l.jsx("option",{value:"cookie",children:"Cookie"})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:f("server.openapi.apiKeyValue")}),l.jsx("input",{type:"password",value:((Bl=h.openapi)==null?void 0:Bl.apiKeyValue)||"",onChange:ue=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,apiKeyValue:ue.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm focus:outline-none form-input",placeholder:"your-api-key"})]})]})]}),((Vl=h.openapi)==null?void 0:Vl.securityType)==="http"&&l.jsxs("div",{className:"mb-4 p-4 border border-gray-200 rounded bg-gray-50",children:[l.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:f("server.openapi.httpAuthConfig")}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:f("server.openapi.httpScheme")}),l.jsxs("select",{value:((za=h.openapi)==null?void 0:za.httpScheme)||"bearer",onChange:ue=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,httpScheme:ue.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm focus:outline-none form-input",children:[l.jsx("option",{value:"basic",children:"Basic"}),l.jsx("option",{value:"bearer",children:"Bearer"}),l.jsx("option",{value:"digest",children:"Digest"})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:f("server.openapi.httpCredentials")}),l.jsx("input",{type:"password",value:((mt=h.openapi)==null?void 0:mt.httpCredentials)||"",onChange:ue=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,httpCredentials:ue.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm focus:outline-none form-input",placeholder:((Yt=h.openapi)==null?void 0:Yt.httpScheme)==="basic"?"base64-encoded-credentials":"bearer-token"})]})]})]}),((ht=h.openapi)==null?void 0:ht.securityType)==="oauth2"&&l.jsxs("div",{className:"mb-4 p-4 border border-gray-200 rounded bg-gray-50",children:[l.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:f("server.openapi.oauth2Config")}),l.jsx("div",{className:"grid grid-cols-1 gap-3",children:l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:f("server.openapi.oauth2Token")}),l.jsx("input",{type:"password",value:((ql=h.openapi)==null?void 0:ql.oauth2Token)||"",onChange:ue=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,oauth2Token:ue.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm focus:outline-none form-input",placeholder:"access-token"})]})})]}),((Gl=h.openapi)==null?void 0:Gl.securityType)==="openIdConnect"&&l.jsxs("div",{className:"mb-4 p-4 border border-gray-200 rounded bg-gray-50",children:[l.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:f("server.openapi.openIdConnectConfig")}),l.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:f("server.openapi.openIdConnectUrl")}),l.jsx("input",{type:"url",value:(($l=h.openapi)==null?void 0:$l.openIdConnectUrl)||"",onChange:ue=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,openIdConnectUrl:ue.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm focus:outline-none form-input",placeholder:"https://example.com/.well-known/openid_configuration"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:f("server.openapi.openIdConnectToken")}),l.jsx("input",{type:"password",value:((on=h.openapi)==null?void 0:on.openIdConnectToken)||"",onChange:ue=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,openIdConnectToken:ue.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm focus:outline-none form-input",placeholder:"id-token"})]})]})]}),l.jsxs("div",{className:"mb-4",children:[l.jsxs("div",{className:"flex justify-between items-center mb-2",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold",children:f("server.headers")}),l.jsxs("button",{type:"button",onClick:L,className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center btn-primary",children:["+ ",f("server.add")]})]}),T.map((ue,ie)=>l.jsxs("div",{className:"flex items-center mb-2",children:[l.jsxs("div",{className:"flex items-center space-x-2 flex-grow",children:[l.jsx("input",{type:"text",value:ue.key,onChange:pe=>ne(ie,"key",pe.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 form-input",placeholder:"Authorization"}),l.jsx("span",{className:"flex items-center",children:":"}),l.jsx("input",{type:"text",value:ue.value,onChange:pe=>ne(ie,"value",pe.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 form-input",placeholder:"Bearer token..."})]}),l.jsxs("button",{type:"button",onClick:()=>V(ie),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 btn-danger",children:["- ",f("server.remove")]})]},ie))]})]}):p==="sse"||p==="streamable-http"?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"url",children:f("server.url")}),l.jsx("input",{type:"url",name:"url",id:"url",value:h.url,onChange:Z,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline form-input",placeholder:p==="streamable-http"?"e.g.: http://localhost:3000/mcp":"e.g.: http://localhost:3000/sse",required:p==="sse"||p==="streamable-http"})]}),l.jsxs("div",{className:"mb-4",children:[l.jsxs("div",{className:"flex justify-between items-center mb-2",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold",children:f("server.headers")}),l.jsxs("button",{type:"button",onClick:L,className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center btn-primary",children:["+ ",f("server.add")]})]}),T.map((ue,ie)=>l.jsxs("div",{className:"flex items-center mb-2",children:[l.jsxs("div",{className:"flex items-center space-x-2 flex-grow",children:[l.jsx("input",{type:"text",value:ue.key,onChange:pe=>ne(ie,"key",pe.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 form-input",placeholder:"Authorization"}),l.jsx("span",{className:"flex items-center",children:":"}),l.jsx("input",{type:"text",value:ue.value,onChange:pe=>ne(ie,"value",pe.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 form-input",placeholder:"Bearer token..."})]}),l.jsxs("button",{type:"button",onClick:()=>V(ie),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 btn-danger",children:["- ",f("server.remove")]})]},ie))]})]}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"command",children:f("server.command")}),l.jsx("input",{type:"text",name:"command",id:"command",value:h.command,onChange:Z,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline form-input",placeholder:"e.g.: npx",required:p==="stdio"})]}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"arguments",children:f("server.arguments")}),l.jsx("input",{type:"text",name:"arguments",id:"arguments",value:h.arguments,onChange:ue=>B(ue.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 form-input",placeholder:"e.g.: -y time-mcp",required:p==="stdio"})]}),l.jsxs("div",{className:"mb-4",children:[l.jsxs("div",{className:"flex justify-between items-center mb-2",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold",children:f("server.envVars")}),l.jsxs("button",{type:"button",onClick:H,className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center btn-primary",children:["+ ",f("server.add")]})]}),j.map((ue,ie)=>l.jsxs("div",{className:"flex items-center mb-2",children:[l.jsxs("div",{className:"flex items-center space-x-2 flex-grow",children:[l.jsx("input",{type:"text",value:ue.key,onChange:pe=>P(ie,"key",pe.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 form-input",placeholder:f("server.key")}),l.jsx("span",{className:"flex items-center",children:":"}),l.jsx("input",{type:"text",value:ue.value,onChange:pe=>P(ie,"value",pe.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 form-input",placeholder:f("server.value")})]}),l.jsxs("button",{type:"button",onClick:()=>I(ie),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 btn-danger",children:["- ",f("server.remove")]})]},ie))]})]}),p!=="openapi"&&l.jsxs("div",{className:"mb-4",children:[l.jsxs("div",{className:"flex items-center justify-between cursor-pointer bg-gray-50 hover:bg-gray-100 p-3 rounded border border-gray-200",onClick:()=>O(!E),children:[l.jsx("label",{className:"text-gray-700 text-sm font-bold",children:f("server.requestOptions")}),l.jsx("span",{className:"text-gray-500 text-sm",children:E?"▼":"▶"})]}),E&&l.jsxs("div",{className:"border border-gray-200 rounded-b p-4 bg-gray-50 border-t-0",children:[l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-gray-600 text-sm font-medium mb-1",htmlFor:"timeout",children:f("server.timeout")}),l.jsx("input",{type:"number",id:"timeout",value:((cn=h.options)==null?void 0:cn.timeout)||6e4,onChange:ue=>se("timeout",parseInt(ue.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 form-input",placeholder:"30000",min:"1000",max:"300000"}),l.jsx("p",{className:"text-xs text-gray-500 mt-1",children:f("server.timeoutDescription")})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-gray-600 text-sm font-medium mb-1",htmlFor:"maxTotalTimeout",children:f("server.maxTotalTimeout")}),l.jsx("input",{type:"number",id:"maxTotalTimeout",value:((ta=h.options)==null?void 0:ta.maxTotalTimeout)||"",onChange:ue=>se("maxTotalTimeout",ue.target.value?parseInt(ue.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 form-input",placeholder:"Optional",min:"1000"}),l.jsx("p",{className:"text-xs text-gray-500 mt-1",children:f("server.maxTotalTimeoutDescription")})]})]}),l.jsxs("div",{className:"mt-3",children:[l.jsxs("label",{className:"flex items-center",children:[l.jsx("input",{type:"checkbox",checked:((un=h.options)==null?void 0:un.resetTimeoutOnProgress)||!1,onChange:ue=>se("resetTimeoutOnProgress",ue.target.checked),className:"mr-2"}),l.jsx("span",{className:"text-gray-600 text-sm",children:f("server.resetTimeoutOnProgress")})]}),l.jsx("p",{className:"text-xs text-gray-500 mt-1 ml-6",children:f("server.resetTimeoutOnProgressDescription")})]})]})]}),l.jsxs("div",{className:"flex justify-end mt-6",children:[l.jsx("button",{type:"button",onClick:i,className:"bg-gray-300 hover:bg-gray-400 text-gray-800 font-medium py-2 px-4 rounded mr-2 btn-secondary",children:f("server.cancel")}),l.jsx("button",{type:"submit",className:"bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded btn-primary",children:f($?"server.save":"server.add")})]})]})]})},Ug=s=>{const i=new Set,r=/\$\{([^}]+)\}/g,c=f=>{let m;for(;(m=r.exec(f))!==null;)i.add(m[1])},d=(f,m="")=>{typeof f=="string"?c(f):Array.isArray(f)?f.forEach((p,g)=>d(p,`${m}[${g}]`)):f&&typeof f=="object"&&Object.entries(f).forEach(([p,g])=>{d(g,m?`${m}.${p}`:p)})};return d(s),Array.from(i)},t1=({onAdd:s})=>{const{t:i}=Oe(),[r,c]=w.useState(!1),[d,f]=w.useState(null),[m,p]=w.useState(!1),[g,h]=w.useState(null),[y,j]=w.useState([]),v=()=>{c(!r),f(null),p(!1),h(null)},T=async()=>{g&&(await S(g),p(!1),h(null))},S=async O=>{try{f(null);const R=localStorage.getItem("mcphub_token"),A=await fetch(Ne("/servers"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":R||""},body:JSON.stringify(O)}),$=await A.json();if(!A.ok){$&&$.message?f($.message):A.status===400?f(i("server.invalidData")):A.status===409?f(i("server.alreadyExists",{serverName:O.name})):f(i("server.addError"));return}c(!1),s()}catch(R){console.error("Error adding server:",R),navigator.onLine?R instanceof TypeError&&(R.message.includes("NetworkError")||R.message.includes("Failed to fetch"))?f(i("errors.serverConnection")):f(i("errors.serverAdd")):f(i("errors.network"))}},E=async O=>{try{const R=Ug(O);R.length>0?(j(R),h(O),p(!0)):await S(O)}catch(R){console.error("Error processing server submission:",R),f(i("errors.serverAdd"))}};return l.jsxs("div",{children:[l.jsxs("button",{onClick:v,className:"w-full bg-blue-100 text-blue-800 rounded hover:bg-blue-200 py-2 px-4 flex items-center justify-center btn-primary",children:[l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:l.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"})}),i("server.add")]}),r&&l.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:l.jsx(ou,{onSubmit:E,onCancel:v,modalTitle:i("server.addServer"),formError:d})}),m&&l.jsx("div",{className:"fixed inset-0 bg-black/50 z-[60] flex items-center justify-center p-4",children:l.jsxs("div",{className:"bg-white rounded-lg p-6 w-full max-w-md",children:[l.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:i("server.confirmVariables")}),l.jsx("p",{className:"text-gray-600 mb-4",children:i("server.variablesDetected")}),l.jsx("div",{className:"bg-yellow-50 border border-yellow-200 rounded p-3 mb-4",children:l.jsxs("div",{className:"flex items-start",children:[l.jsx("div",{className:"flex-shrink-0",children:l.jsx("svg",{className:"h-5 w-5 text-yellow-400",viewBox:"0 0 20 20",fill:"currentColor",children:l.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})})}),l.jsxs("div",{className:"ml-3",children:[l.jsxs("h4",{className:"text-sm font-medium text-yellow-800",children:[i("server.detectedVariables"),":"]}),l.jsx("ul",{className:"mt-1 text-sm text-yellow-700",children:y.map((O,R)=>l.jsxs("li",{className:"font-mono",children:["$",`{${O}}`]},R))})]})]})}),l.jsx("p",{className:"text-gray-600 text-sm mb-6",children:i("server.confirmVariablesMessage")}),l.jsxs("div",{className:"flex justify-end space-x-3",children:[l.jsx("button",{onClick:()=>{p(!1),h(null)},className:"px-4 py-2 text-gray-600 border border-gray-300 rounded hover:bg-gray-50 btn-secondary",children:i("common.cancel")}),l.jsx("button",{onClick:T,className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 btn-primary",children:i("server.confirmAndAdd")})]})]})})]})},a1=({server:s,onEdit:i,onCancel:r})=>{const{t:c}=Oe(),[d,f]=w.useState(null),m=async p=>{try{f(null);const g=localStorage.getItem("mcphub_token"),h=await fetch(Ne(`/servers/${s.name}`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":g||""},body:JSON.stringify(p)}),y=await h.json();if(!h.ok){y&&y.message?f(y.message):h.status===404?f(c("server.notFound",{serverName:s.name})):h.status===400?f(c("server.invalidData")):f(c("server.updateError",{serverName:s.name}));return}i()}catch(g){console.error("Error updating server:",g),navigator.onLine?g instanceof TypeError&&(g.message.includes("NetworkError")||g.message.includes("Failed to fetch"))?f(c("errors.serverConnection")):f(c("errors.serverUpdate",{serverName:s.name})):f(c("errors.network"))}};return l.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:l.jsx(ou,{onSubmit:m,onCancel:r,initialData:s,modalTitle:c("server.editTitle",{serverName:s.name}),formError:d})})},n1=({isOpen:s,onClose:i,onConfirm:r,title:c,message:d,confirmText:f,cancelText:m,variant:p="warning"})=>{const{t:g}=Oe();if(!s)return null;const h=()=>{switch(p){case"danger":return{icon:l.jsx("svg",{className:"w-6 h-6 text-red-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})}),confirmClass:"bg-red-600 hover:bg-red-700 text-white"};case"warning":return{icon:l.jsx("svg",{className:"w-6 h-6 text-yellow-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})}),confirmClass:"bg-yellow-600 hover:bg-yellow-700 text-white"};case"info":return{icon:l.jsx("svg",{className:"w-6 h-6 text-blue-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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"})}),confirmClass:"bg-blue-600 hover:bg-blue-700 text-white"};default:return{icon:null,confirmClass:"bg-blue-600 hover:bg-blue-700 text-white"}}},{icon:y,confirmClass:j}=h(),v=S=>{S.target===S.currentTarget&&i()},T=S=>{S.key==="Escape"?i():S.key==="Enter"&&r()};return l.jsx("div",{className:"fixed inset-0 bg-black/50 z-[100] flex items-center justify-center p-4",onClick:v,onKeyDown:T,tabIndex:-1,children:l.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-md w-full transform transition-all duration-200 ease-out",role:"dialog","aria-modal":"true","aria-labelledby":"confirm-dialog-title","aria-describedby":"confirm-dialog-message",children:l.jsxs("div",{className:"p-6",children:[l.jsxs("div",{className:"flex items-start space-x-3",children:[y&&l.jsx("div",{className:"flex-shrink-0",children:y}),l.jsxs("div",{className:"flex-1",children:[c&&l.jsx("h3",{id:"confirm-dialog-title",className:"text-lg font-medium text-gray-900 mb-2",children:c}),l.jsx("p",{id:"confirm-dialog-message",className:"text-gray-600 leading-relaxed",children:d})]})]}),l.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[l.jsx("button",{onClick:i,className:"px-4 py-2 text-gray-600 hover:text-gray-800 hover:bg-gray-100 rounded-md transition-colors duration-150 btn-secondary",autoFocus:!0,children:m||g("common.cancel")}),l.jsx("button",{onClick:r,className:`px-4 py-2 rounded-md transition-colors duration-150 focus:outline-none focus:ring-2 focus:ring-offset-2 ${j} ${p==="danger"?"btn-danger":p==="warning"?"btn-warning":"btn-primary"}`,children:f||g("common.confirm")})]})]})})})},s1=({onSuccess:s,onCancel:i})=>{const{t:r}=Oe(),[c,d]=w.useState(!1),[f,m]=w.useState(!1),[p,g]=w.useState(null),[h,y]=w.useState(null),[j,v]=w.useState(!1),[T,S]=w.useState(null),[E,O]=w.useState(""),[R,A]=w.useState(!1),[$,Z]=w.useState(""),B=Q=>{Q.preventDefault(),d(!0)},oe=Q=>{Q.preventDefault(),d(!1)},P=Q=>{Q.preventDefault(),d(!1);const Y=Q.dataTransfer.files;if(Y.length>0){const k=Y[0];k.name.endsWith(".dxt")?(y(k),g(null)):g(r("dxt.invalidFileType"))}},H=Q=>{const Y=Q.target.files;if(Y&&Y.length>0){const k=Y[0];k.name.endsWith(".dxt")?(y(k),g(null)):g(r("dxt.invalidFileType"))}},I=async()=>{if(!h){g(r("dxt.noFileSelected"));return}m(!0),g(null);try{const Q=new FormData;Q.append("dxtFile",h);const Y=localStorage.getItem("mcphub_token"),k=await fetch(Ne("/dxt/upload"),{method:"POST",headers:{"x-auth-token":Y||""},body:Q}),q=await k.json();if(!k.ok)throw new Error(q.message||`HTTP error! Status: ${k.status}`);if(q.success&&q.data)S(q.data.manifest),O(q.data.extractDir),v(!0);else throw new Error(q.message||r("dxt.uploadFailed"))}catch(Q){console.error("DXT upload error:",Q),g(Q instanceof Error?Q.message:r("dxt.uploadFailed"))}finally{m(!1)}},ne=async(Q,Y=!1)=>{var k;m(!0),g(null);try{const q=se(T,E,Q),z=localStorage.getItem("mcphub_token");if(!Y){const ae=await fetch(Ne("/servers"),{method:"GET",headers:{"x-auth-token":z||""}});if(ae.ok&&((k=(await ae.json()).data)==null?void 0:k.find(ee=>ee.name===Q))){Z(Q),A(!0),m(!1);return}}const re=Y?"PUT":"POST",N=Ne(Y?`/servers/${encodeURIComponent(Q)}`:"/servers"),G=await fetch(N,{method:re,headers:{"Content-Type":"application/json","x-auth-token":z||""},body:JSON.stringify({name:Q,config:q})}),te=await G.json();if(!G.ok)throw new Error(te.message||`HTTP error! Status: ${G.status}`);if(te.success)s(q);else throw new Error(te.message||r("dxt.installFailed"))}catch(q){console.error("DXT install error:",q),g(q instanceof Error?q.message:r("dxt.installFailed")),m(!1)}},L=()=>{A(!1),$&&ne($,!0)},V=()=>{A(!1),Z(""),m(!1)},se=(Q,Y,k)=>{var re;const q=((re=Q.server)==null?void 0:re.mcp_config)||{},z={type:"stdio",command:q.command||"node",args:(q.args||[]).map(N=>N.replace("${__dirname}",Y))};return q.env&&Object.keys(q.env).length>0&&(z.env={...q.env},Object.keys(z.env).forEach(N=>{typeof z.env[N]=="string"&&(z.env[N]=z.env[N].replace("${__dirname}",Y))})),z};return j&&T?l.jsxs(l.Fragment,{children:[l.jsx(n1,{isOpen:R,onClose:V,onConfirm:L,title:r("dxt.serverExistsTitle"),message:r("dxt.serverExistsConfirm",{serverName:$}),confirmText:r("dxt.override"),cancelText:r("common.cancel"),variant:"warning"}),l.jsx("div",{className:`fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4 ${R?"opacity-50 pointer-events-none":""}`,children:l.jsxs("div",{className:"bg-white shadow rounded-lg p-6 w-full max-w-2xl max-h-screen overflow-y-auto",children:[l.jsxs("div",{className:"flex justify-between items-center mb-6",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:r("dxt.installServer")}),l.jsx("button",{onClick:i,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),p&&l.jsx("div",{className:"mb-4 bg-red-50 border-l-4 border-red-500 p-4 rounded",children:l.jsx("p",{className:"text-red-700",children:p})}),l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg",children:[l.jsx("h3",{className:"font-medium text-gray-900 mb-2",children:r("dxt.extensionInfo")}),l.jsxs("div",{className:"space-y-2 text-sm",children:[l.jsxs("div",{children:[l.jsxs("strong",{children:[r("dxt.name"),":"]})," ",T.display_name||T.name]}),l.jsxs("div",{children:[l.jsxs("strong",{children:[r("dxt.version"),":"]})," ",T.version]}),l.jsxs("div",{children:[l.jsxs("strong",{children:[r("dxt.description"),":"]})," ",T.description]}),T.author&&l.jsxs("div",{children:[l.jsxs("strong",{children:[r("dxt.author"),":"]})," ",T.author.name]}),T.tools&&T.tools.length>0&&l.jsxs("div",{children:[l.jsxs("strong",{children:[r("dxt.tools"),":"]}),l.jsx("ul",{className:"list-disc list-inside ml-4",children:T.tools.map((Q,Y)=>l.jsxs("li",{children:[Q.name," - ",Q.description]},Y))})]})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:r("dxt.serverName")}),l.jsx("input",{type:"text",id:"serverName",defaultValue:T.name,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 form-input",placeholder:r("dxt.serverNamePlaceholder")})]}),l.jsxs("div",{className:"flex justify-end space-x-4",children:[l.jsx("button",{onClick:i,disabled:f,className:"px-4 py-2 text-gray-700 bg-gray-200 rounded hover:bg-gray-300 disabled:opacity-50 btn-secondary",children:r("common.cancel")}),l.jsx("button",{onClick:()=>{const Q=document.getElementById("serverName"),Y=(Q==null?void 0:Q.value.trim())||T.name;ne(Y)},disabled:f,className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50 flex items-center btn-primary",children:f?l.jsxs(l.Fragment,{children:[l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"})]}),r("dxt.installing")]}):r("dxt.install")})]})]})]})})]}):l.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:l.jsxs("div",{className:"bg-white shadow rounded-lg p-6 w-full max-w-lg",children:[l.jsxs("div",{className:"flex justify-between items-center mb-6",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:r("dxt.uploadTitle")}),l.jsx("button",{onClick:i,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),p&&l.jsx("div",{className:"mb-4 bg-red-50 border-l-4 border-red-500 p-4 rounded",children:l.jsx("p",{className:"text-red-700",children:p})}),l.jsxs("div",{className:`relative border-2 border-dashed rounded-lg p-8 text-center transition-colors ${c?"border-blue-500 bg-blue-50":h?"border-gray-500 ":"border-gray-300 hover:border-gray-400"}`,onDragOver:B,onDragLeave:oe,onDrop:P,children:[h?l.jsxs("div",{className:"space-y-2",children:[l.jsx("svg",{className:"mx-auto h-12 w-12 text-green-200",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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"})}),l.jsx("p",{className:"text-sm text-gray-900 font-medium",children:h.name}),l.jsxs("p",{className:"text-xs text-gray-500",children:[(h.size/1024/1024).toFixed(2)," MB"]})]}):l.jsxs("div",{className:"space-y-2",children:[l.jsx("svg",{className:"mx-auto h-12 w-12 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm text-gray-900",children:r("dxt.dropFileHere")}),l.jsx("p",{className:"text-xs text-gray-500",children:r("dxt.orClickToSelect")})]})]}),l.jsx("input",{type:"file",accept:".dxt",onChange:H,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"})]}),l.jsxs("div",{className:"mt-6 flex justify-end space-x-4",children:[l.jsx("button",{onClick:i,disabled:f,className:"px-4 py-2 text-gray-700 bg-gray-200 rounded hover:bg-gray-300 disabled:opacity-50 btn-secondary",children:r("common.cancel")}),l.jsx("button",{onClick:I,disabled:!h||f,className:"px-4 py-2 text-white rounded hover:bg-blue-700 disabled:opacity-50 flex items-center btn-primary",children:f?l.jsxs(l.Fragment,{children:[l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"})]}),r("dxt.uploading")]}):r("dxt.upload")})]})]})})},l1=()=>{const{t:s}=Oe(),i=On(),{servers:r,error:c,setError:d,isLoading:f,handleServerAdd:m,handleServerEdit:p,handleServerRemove:g,handleServerToggle:h,triggerRefresh:y}=Hl(),[j,v]=w.useState(null),[T,S]=w.useState(!1),[E,O]=w.useState(!1),R=async B=>{const oe=await p(B);oe&&v(oe)},A=()=>{v(null),y()},$=async()=>{S(!0);try{y(),await new Promise(B=>setTimeout(B,500))}finally{S(!1)}},Z=B=>{O(!1),y()};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center mb-8",children:[l.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:s("pages.servers.title")}),l.jsxs("div",{className:"flex space-x-4",children:[l.jsxs("button",{onClick:()=>i("/market"),className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center btn-primary transition-all duration-200",children:[l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:l.jsx("path",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3z"})}),s("nav.market")]}),l.jsx(t1,{onAdd:m}),l.jsxs("button",{onClick:()=>O(!0),className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center btn-primary transition-all duration-200",children:[l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:l.jsx("path",{d:"M5.5 13a3.5 3.5 0 01-.369-6.98 4 4 0 117.753-1.977A4.5 4.5 0 1113.5 13H11V9.413l1.293 1.293a1 1 0 001.414-1.414l-3-3a1 1 0 00-1.414 0l-3 3a1 1 0 001.414 1.414L9 9.413V13H5.5z"})}),s("dxt.upload")]}),l.jsxs("button",{onClick:$,disabled:T,className:`px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center btn-primary transition-all duration-200 ${T?"opacity-70 cursor-not-allowed":""}`,children:[T?l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"})]}):l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:l.jsx("path",{fillRule:"evenodd",d:"M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z",clipRule:"evenodd"})}),s("common.refresh")]})]})]}),c&&l.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm error-box",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-red-600 text-lg font-medium",children:s("app.error")}),l.jsx("p",{className:"text-gray-600 mt-1",children:c})]}),l.jsx("button",{onClick:()=>d(null),className:"ml-4 text-gray-500 hover:text-gray-700 transition-colors duration-200 btn-secondary","aria-label":s("app.closeButton"),children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:l.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?l.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center loading-container",children:l.jsxs("div",{className:"flex flex-col items-center",children:[l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"})]}),l.jsx("p",{className:"text-gray-600",children:s("app.loading")})]})}):r.length===0?l.jsx("div",{className:"bg-white shadow rounded-lg p-6 empty-state",children:l.jsx("p",{className:"text-gray-600",children:s("app.noServers")})}):l.jsx("div",{className:"space-y-6",children:r.map((B,oe)=>l.jsx(e1,{server:B,onRemove:g,onEdit:R,onToggle:h,onRefresh:y},oe))}),j&&l.jsx(a1,{server:j,onEdit:A,onCancel:()=>v(null)}),E&&l.jsx(s1,{onSuccess:Z,onCancel:()=>O(!1)})]})},cu=()=>{const{t:s}=Oe(),[i,r]=w.useState([]),[c,d]=w.useState(!0),[f,m]=w.useState(null),[p,g]=w.useState(0),h=w.useCallback(async()=>{try{d(!0);const R=localStorage.getItem("mcphub_token"),A=await fetch(Ne("/groups"),{headers:{"x-auth-token":R||""}});if(!A.ok)throw new Error(`Status: ${A.status}`);const $=await A.json();$&&$.success&&Array.isArray($.data)?r($.data):(console.error("Invalid group data format:",$),r([])),m(null)}catch(R){console.error("Error fetching groups:",R),m(R instanceof Error?R.message:"Failed to fetch groups"),r([])}finally{d(!1)}},[]),y=w.useCallback(()=>{g(R=>R+1)},[]),j=async(R,A,$=[])=>{try{const Z=localStorage.getItem("mcphub_token"),B=await fetch(Ne("/groups"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":Z||""},body:JSON.stringify({name:R,description:A,servers:$})}),oe=await B.json();return B.ok?(y(),oe.data||null):(m(oe.message||s("groups.createError")),null)}catch(Z){return m(Z instanceof Error?Z.message:"Failed to create group"),null}},v=async(R,A)=>{try{const $=localStorage.getItem("mcphub_token"),Z=await fetch(Ne(`/groups/${R}`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":$||""},body:JSON.stringify(A)}),B=await Z.json();return Z.ok?(y(),B.data||null):(m(B.message||s("groups.updateError")),null)}catch($){return m($ instanceof Error?$.message:"Failed to update group"),null}},T=async(R,A)=>{try{const $=localStorage.getItem("mcphub_token"),Z=await fetch(Ne(`/groups/${R}/servers/batch`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":$||""},body:JSON.stringify({servers:A})}),B=await Z.json();return Z.ok?(y(),B.data||null):(m(B.message||s("groups.updateError")),null)}catch($){return m($ instanceof Error?$.message:"Failed to update group servers"),null}},S=async R=>{try{const A=localStorage.getItem("mcphub_token"),$=await fetch(Ne(`/groups/${R}`),{method:"DELETE",headers:{"x-auth-token":A||""}}),Z=await $.json();return $.ok?(y(),!0):(m(Z.message||s("groups.deleteError")),!1)}catch(A){return m(A instanceof Error?A.message:"Failed to delete group"),!1}},E=async(R,A)=>{try{const $=localStorage.getItem("mcphub_token"),Z=await fetch(Ne(`/groups/${R}/servers`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":$||""},body:JSON.stringify({serverName:A})}),B=await Z.json();return Z.ok?(y(),B.data||null):(m(B.message||s("groups.serverAddError")),null)}catch($){return m($ instanceof Error?$.message:"Failed to add server to group"),null}},O=async(R,A)=>{try{const $=localStorage.getItem("mcphub_token"),Z=await fetch(Ne(`/groups/${R}/servers/${A}`),{method:"DELETE",headers:{"x-auth-token":$||""}}),B=await Z.json();return Z.ok?(y(),B.data||null):(m(B.message||s("groups.serverRemoveError")),null)}catch($){return m($ instanceof Error?$.message:"Failed to remove server from group"),null}};return w.useEffect(()=>{h()},[h,p]),{groups:i,loading:c,error:f,setError:m,triggerRefresh:y,createGroup:j,updateGroup:v,updateGroupServers:T,deleteGroup:S,addServerToGroup:E,removeServerFromGroup:O}},r1=({onAdd:s,onCancel:i})=>{const{t:r}=Oe(),{createGroup:c}=cu(),{servers:d}=Hl(),[f,m]=w.useState([]),[p,g]=w.useState(null),[h,y]=w.useState(!1),[j,v]=w.useState({name:"",description:"",servers:[]});w.useEffect(()=>{m(d.filter(E=>E.enabled!==!1))},[d]);const T=E=>{const{name:O,value:R}=E.target;v(A=>({...A,[O]:R}))},S=async E=>{E.preventDefault(),y(!0),g(null);try{if(!j.name.trim()){g(r("groups.nameRequired")),y(!1);return}if(!await c(j.name,j.description,j.servers)){g(r("groups.createError")),y(!1);return}s()}catch(O){g(O instanceof Error?O.message:String(O)),y(!1)}};return l.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:l.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:l.jsxs("div",{className:"p-6",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:r("groups.addNew")}),p&&l.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:p}),l.jsxs("form",{onSubmit:S,children:[l.jsxs("div",{className:"mb-4",children:[l.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[r("groups.name")," *"]}),l.jsx("input",{type:"text",id:"name",name:"name",value:j.name,onChange:T,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline form-input",placeholder:r("groups.namePlaceholder"),required:!0})]}),l.jsx(zg,{className:"mb-6",label:r("groups.servers"),noOptionsText:r("groups.noServerOptions"),values:j.servers,options:f.map(E=>({value:E.name,label:E.name})),onChange:E=>v(O=>({...O,servers:E}))}),l.jsxs("div",{className:"flex justify-end space-x-3",children:[l.jsx("button",{type:"button",onClick:i,className:"px-4 py-2 text-gray-600 hover:text-gray-800 btn-secondary",disabled:h,children:r("common.cancel")}),l.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50 btn-primary",disabled:h,children:r(h?"common.submitting":"common.create")})]})]})]})})})},i1=({group:s,onEdit:i,onCancel:r})=>{const{t:c}=Oe(),{updateGroup:d}=cu(),{servers:f}=Hl(),[m,p]=w.useState([]),[g,h]=w.useState(null),[y,j]=w.useState(!1),[v,T]=w.useState({name:s.name,description:s.description||"",servers:s.servers||[]});w.useEffect(()=>{p(f.filter(O=>O.enabled!==!1))},[f]);const S=O=>{const{name:R,value:A}=O.target;T($=>({...$,[R]:A}))},E=async O=>{O.preventDefault(),j(!0),h(null);try{if(!v.name.trim()){h(c("groups.nameRequired")),j(!1);return}if(!await d(s.id,{name:v.name,description:v.description,servers:v.servers})){h(c("groups.updateError")),j(!1);return}i()}catch(R){h(R instanceof Error?R.message:String(R)),j(!1)}};return l.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:l.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:l.jsxs("div",{className:"p-6",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:c("groups.edit")}),g&&l.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:g}),l.jsxs("form",{onSubmit:E,children:[l.jsxs("div",{className:"mb-4",children:[l.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[c("groups.name")," *"]}),l.jsx("input",{type:"text",id:"name",name:"name",value:v.name,onChange:S,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline form-input",placeholder:c("groups.namePlaceholder"),required:!0})]}),l.jsx(zg,{className:"mb-6",label:c("groups.servers"),noOptionsText:c("groups.noServerOptions"),values:v.servers,options:m.map(O=>({value:O.name,label:O.name})),onChange:O=>T(R=>({...R,servers:O}))}),l.jsxs("div",{className:"flex justify-end space-x-3",children:[l.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-gray-600 hover:text-gray-800 btn-secondary",disabled:y,children:c("common.cancel")}),l.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50 btn-primary",disabled:y,children:c(y?"common.submitting":"common.save")})]})]})]})})})},o1=({group:s,servers:i,onEdit:r,onDelete:c})=>{const{t:d}=Oe(),{showToast:f}=_l(),[m,p]=w.useState(!1),[g,h]=w.useState(!1),y=()=>{r(s)},j=()=>{p(!0)},v=()=>{c(s.id),p(!1)},T=()=>{if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(s.id).then(()=>{h(!0),setTimeout(()=>h(!1),2e3)});else{const E=document.createElement("textarea");E.value=s.id,E.style.position="fixed",E.style.left="-9999px",document.body.appendChild(E),E.focus(),E.select();try{document.execCommand("copy"),h(!0),setTimeout(()=>h(!1),2e3)}catch(O){f(d("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",O)}document.body.removeChild(E)}},S=i.filter(E=>s.servers.includes(E.name));return l.jsxs("div",{className:"bg-white shadow rounded-lg p-6 ",children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-800",children:s.name}),l.jsxs("div",{className:"flex items-center ml-3",children:[l.jsx("span",{className:"text-xs text-gray-500 mr-1",children:s.id}),l.jsx("button",{onClick:T,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:d("common.copy"),children:g?l.jsx(xi,{size:14,className:"text-green-500"}):l.jsx(ug,{size:14})})]})]}),s.description&&l.jsx("p",{className:"text-gray-600 text-sm mt-1",children:s.description})]}),l.jsxs("div",{className:"flex items-center space-x-3",children:[l.jsx("div",{className:"bg-blue-50 text-blue-700 px-3 py-1 rounded-full text-sm btn-secondary",children:d("groups.serverCount",{count:s.servers.length})}),l.jsx("button",{onClick:y,className:"text-gray-500 hover:text-gray-700",title:d("groups.edit"),children:l.jsx(dg,{size:18})}),l.jsx("button",{onClick:j,className:"text-gray-500 hover:text-red-600",title:d("groups.delete"),children:l.jsx(wb,{size:18})})]})]}),l.jsx("div",{className:"mt-4",children:S.length===0?l.jsx("p",{className:"text-gray-500 italic",children:d("groups.noServers")}):l.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:S.map(E=>l.jsxs("div",{className:"inline-flex items-center px-3 py-1 bg-gray-50 rounded",children:[l.jsx("span",{className:"font-medium text-gray-700 text-sm",children:E.name}),l.jsx("span",{className:`ml-2 inline-block h-2 w-2 rounded-full ${E.status==="connected"?"bg-green-500":E.status==="connecting"?"bg-yellow-500":"bg-red-500"}`})]},E.name))})}),l.jsx(Dg,{isOpen:m,onClose:()=>p(!1),onConfirm:v,serverName:s.name,isGroup:!0})]})},c1=()=>{const{t:s}=Oe(),{groups:i,loading:r,error:c,setError:d,deleteGroup:f,triggerRefresh:m}=cu(),{servers:p}=Hl(),[g,h]=w.useState(null),[y,j]=w.useState(!1),v=R=>{h(R)},T=()=>{h(null),m()},S=async R=>{await f(R)||d(s("groups.deleteError"))},E=()=>{j(!0)},O=()=>{j(!1),m()};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center mb-8",children:[l.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:s("pages.groups.title")}),l.jsx("div",{className:"flex space-x-4",children:l.jsxs("button",{onClick:E,className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center btn-primary transition-all duration-200",children:[l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:l.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 00-1 1v5H4a1 1 0 100 2h5v5a1 1 0 102 0v-5h5a1 1 0 100-2h-5V4a1 1 0 00-1-1z",clipRule:"evenodd"})}),s("groups.add")]})})]}),c&&l.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6 error-box rounded-lg",children:l.jsx("p",{children:c})}),r?l.jsx("div",{className:"bg-white shadow rounded-lg p-6 loading-container",children:l.jsxs("div",{className:"flex flex-col items-center justify-center",children:[l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"})]}),l.jsx("p",{className:"text-gray-600",children:s("app.loading")})]})}):i.length===0?l.jsx("div",{className:"bg-white shadow rounded-lg p-6 empty-state",children:l.jsx("p",{className:"text-gray-600",children:s("groups.noGroups")})}):l.jsx("div",{className:"space-y-6",children:i.map(R=>l.jsx(o1,{group:R,servers:p,onEdit:v,onDelete:S},R.id))}),y&&l.jsx(r1,{onAdd:O,onCancel:O}),g&&l.jsx(i1,{group:g,onEdit:T,onCancel:()=>h(null)})]})},u1=({onSuccess:s,onCancel:i})=>{const{t:r}=Oe(),[c,d]=w.useState({currentPassword:"",newPassword:""}),[f,m]=w.useState(""),[p,g]=w.useState(!1),[h,y]=w.useState(null),[j,v]=w.useState(!1),T=E=>{const{name:O,value:R}=E.target;O==="confirmPassword"?m(R):d(A=>({...A,[O]:R}))},S=async E=>{if(E.preventDefault(),y(null),c.newPassword!==f){y(r("auth.passwordsNotMatch"));return}g(!0);try{const O=await By(c);O.success?(v(!0),s&&s()):y(O.message||r("auth.changePasswordError"))}catch{y(r("auth.changePasswordError"))}finally{g(!1)}};return l.jsxs("div",{className:"p-6 bg-white rounded-lg shadow-md",children:[l.jsx("h2",{className:"text-xl font-bold mb-4",children:r("auth.changePassword")}),j?l.jsx("div",{className:"bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded mb-4",children:r("auth.changePasswordSuccess")}):l.jsxs("form",{onSubmit:S,children:[h&&l.jsx("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4",children:h}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"currentPassword",children:r("auth.currentPassword")}),l.jsx("input",{type:"password",id:"currentPassword",name:"currentPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500 form-input",value:c.currentPassword,onChange:T,required:!0})]}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"newPassword",children:r("auth.newPassword")}),l.jsx("input",{type:"password",id:"newPassword",name:"newPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500 form-input",value:c.newPassword,onChange:T,required:!0,minLength:6})]}),l.jsxs("div",{className:"mb-6",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"confirmPassword",children:r("auth.confirmPassword")}),l.jsx("input",{type:"password",id:"confirmPassword",name:"confirmPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500 form-input",value:f,onChange:T,required:!0,minLength:6})]}),l.jsxs("div",{className:"flex justify-end space-x-2",children:[i&&l.jsx("button",{type:"button",onClick:i,disabled:p,className:"py-2 px-4 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:r("common.cancel")}),l.jsx("button",{type:"submit",disabled:p,className:"py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 btn-primary",children:p?l.jsxs("span",{className:"flex items-center",children:[l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"})]}),r("common.save")]}):r("common.save")})]})]})]})},d1=()=>{const{t:s}=Oe(),{showToast:i}=_l(),[r,c]=w.useState({enableGlobalRoute:!0,enableGroupNameRoute:!0,enableBearerAuth:!1,bearerAuthKey:"",skipAuth:!1}),[d,f]=w.useState({bearerAuthKey:""}),[m,p]=w.useState({pythonIndexUrl:"",npmRegistry:""}),[g,h]=w.useState({enabled:!1,dbUrl:"",openaiApiBaseUrl:"",openaiApiKey:"",openaiApiEmbeddingModel:""}),[y,j]=w.useState(!1),[v,T]=w.useState(null),[S,E]=w.useState(0),O=w.useCallback(()=>{E(P=>P+1)},[]),R=w.useCallback(async()=>{var P,H,I,ne,L,V;j(!0),T(null);try{const se=localStorage.getItem("mcphub_token"),Q=await fetch(Ne("/settings"),{headers:{"x-auth-token":se||""}});if(!Q.ok)throw new Error(`HTTP error! Status: ${Q.status}`);const Y=await Q.json();Y.success&&((H=(P=Y.data)==null?void 0:P.systemConfig)!=null&&H.routing)&&c({enableGlobalRoute:Y.data.systemConfig.routing.enableGlobalRoute??!0,enableGroupNameRoute:Y.data.systemConfig.routing.enableGroupNameRoute??!0,enableBearerAuth:Y.data.systemConfig.routing.enableBearerAuth??!1,bearerAuthKey:Y.data.systemConfig.routing.bearerAuthKey||"",skipAuth:Y.data.systemConfig.routing.skipAuth??!1}),Y.success&&((ne=(I=Y.data)==null?void 0:I.systemConfig)!=null&&ne.install)&&p({pythonIndexUrl:Y.data.systemConfig.install.pythonIndexUrl||"",npmRegistry:Y.data.systemConfig.install.npmRegistry||""}),Y.success&&((V=(L=Y.data)==null?void 0:L.systemConfig)!=null&&V.smartRouting)&&h({enabled:Y.data.systemConfig.smartRouting.enabled??!1,dbUrl:Y.data.systemConfig.smartRouting.dbUrl||"",openaiApiBaseUrl:Y.data.systemConfig.smartRouting.openaiApiBaseUrl||"",openaiApiKey:Y.data.systemConfig.smartRouting.openaiApiKey||"",openaiApiEmbeddingModel:Y.data.systemConfig.smartRouting.openaiApiEmbeddingModel||""})}catch(se){console.error("Failed to fetch settings:",se),T(se instanceof Error?se.message:"Failed to fetch settings"),i(s("errors.failedToFetchSettings"))}finally{j(!1)}},[s]),A=async(P,H)=>{j(!0),T(null);try{const I=localStorage.getItem("mcphub_token"),ne=await fetch(Ne("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":I||""},body:JSON.stringify({routing:{[P]:H}})});if(!ne.ok)throw new Error(`HTTP error! Status: ${ne.status}`);return(await ne.json()).success?(c({...r,[P]:H}),i(s("settings.systemConfigUpdated")),!0):(i(s("errors.failedToUpdateRouteConfig")),!1)}catch(I){return console.error("Failed to update routing config:",I),T(I instanceof Error?I.message:"Failed to update routing config"),i(s("errors.failedToUpdateRouteConfig")),!1}finally{j(!1)}},$=async(P,H)=>{j(!0),T(null);try{const I=localStorage.getItem("mcphub_token"),ne=await fetch(Ne("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":I||""},body:JSON.stringify({install:{[P]:H}})});if(!ne.ok)throw new Error(`HTTP error! Status: ${ne.status}`);return(await ne.json()).success?(p({...m,[P]:H}),i(s("settings.systemConfigUpdated")),!0):(i(s("errors.failedToUpdateSystemConfig")),!1)}catch(I){return console.error("Failed to update system config:",I),T(I instanceof Error?I.message:"Failed to update system config"),i(s("errors.failedToUpdateSystemConfig")),!1}finally{j(!1)}},Z=async(P,H)=>{j(!0),T(null);try{const I=localStorage.getItem("mcphub_token"),ne=await fetch(Ne("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":I||""},body:JSON.stringify({smartRouting:{[P]:H}})});if(!ne.ok){const V=await ne.json();throw new Error(V.message||`HTTP error! Status: ${ne.status}`)}const L=await ne.json();return L.success?(h({...g,[P]:H}),i(s("settings.systemConfigUpdated")),!0):(i(L.message||s("errors.failedToUpdateSmartRoutingConfig")),!1)}catch(I){console.error("Failed to update smart routing config:",I);const ne=I instanceof Error?I.message:"Failed to update smart routing config";return T(ne),i(ne),!1}finally{j(!1)}},B=async P=>{j(!0),T(null);try{const H=localStorage.getItem("mcphub_token"),I=await fetch(Ne("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":H||""},body:JSON.stringify({smartRouting:P})});if(!I.ok){const L=await I.json();throw new Error(L.message||`HTTP error! Status: ${I.status}`)}const ne=await I.json();return ne.success?(h({...g,...P}),i(s("settings.systemConfigUpdated")),!0):(i(ne.message||s("errors.failedToUpdateSmartRoutingConfig")),!1)}catch(H){console.error("Failed to update smart routing config:",H);const I=H instanceof Error?H.message:"Failed to update smart routing config";return T(I),i(I),!1}finally{j(!1)}},oe=async P=>{j(!0),T(null);try{const H=localStorage.getItem("mcphub_token"),I=await fetch(Ne("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":H||""},body:JSON.stringify({routing:P})});if(!I.ok)throw new Error(`HTTP error! Status: ${I.status}`);return(await I.json()).success?(c({...r,...P}),i(s("settings.systemConfigUpdated")),!0):(i(s("errors.failedToUpdateRouteConfig")),!1)}catch(H){return console.error("Failed to update routing config:",H),T(H instanceof Error?H.message:"Failed to update routing config"),i(s("errors.failedToUpdateRouteConfig")),!1}finally{j(!1)}};return w.useEffect(()=>{R()},[R,S]),w.useEffect(()=>{r&&f({bearerAuthKey:r.bearerAuthKey})},[r]),{routingConfig:r,tempRoutingConfig:d,setTempRoutingConfig:f,installConfig:m,smartRoutingConfig:g,loading:y,error:v,setError:T,triggerRefresh:O,fetchSettings:R,updateRoutingConfig:A,updateInstallConfig:$,updateSmartRoutingConfig:Z,updateSmartRoutingConfigBatch:B,updateRoutingConfigBatch:oe}};function f1(s=32){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=new Uint8Array(s);return crypto.getRandomValues(r),Array.from(r).map(c=>i.charAt(c%i.length)).join("")}const m1=()=>{const{t:s,i18n:i}=Oe(),r=On(),{showToast:c}=_l(),[d,f]=w.useState(i.language);w.useEffect(()=>{f(i.language)},[i.language]);const[m,p]=w.useState({pythonIndexUrl:"",npmRegistry:""}),[g,h]=w.useState({dbUrl:"",openaiApiBaseUrl:"",openaiApiKey:"",openaiApiEmbeddingModel:""}),{routingConfig:y,tempRoutingConfig:j,setTempRoutingConfig:v,installConfig:T,smartRoutingConfig:S,loading:E,updateRoutingConfig:O,updateRoutingConfigBatch:R,updateInstallConfig:A,updateSmartRoutingConfig:$,updateSmartRoutingConfigBatch:Z}=d1();w.useEffect(()=>{T&&p(T)},[T]),w.useEffect(()=>{S&&h({dbUrl:S.dbUrl||"",openaiApiBaseUrl:S.openaiApiBaseUrl||"",openaiApiKey:S.openaiApiKey||"",openaiApiEmbeddingModel:S.openaiApiEmbeddingModel||""})},[S]);const[B,oe]=w.useState({routingConfig:!1,installConfig:!1,smartRoutingConfig:!1,password:!1}),P=z=>{oe(re=>({...re,[z]:!re[z]}))},H=async(z,re)=>{if(z==="enableBearerAuth"&&re===!0&&!j.bearerAuthKey&&!y.bearerAuthKey){const N=f1();I(N),await R({enableBearerAuth:!0,bearerAuthKey:N})&&v(te=>({...te,bearerAuthKey:N}));return}await O(z,re)},I=z=>{v(re=>({...re,bearerAuthKey:z}))},ne=async()=>{await O("bearerAuthKey",j.bearerAuthKey)},L=(z,re)=>{p({...m,[z]:re})},V=async z=>{await A(z,m[z])},se=(z,re)=>{h({...g,[z]:re})},Q=async z=>{await $(z,g[z])},Y=async z=>{if(z){const re=g.dbUrl||S.dbUrl,N=g.openaiApiKey||S.openaiApiKey;if(!re||!N){const te=[];re||te.push(s("settings.dbUrl")),N||te.push(s("settings.openaiApiKey")),c(s("settings.smartRoutingValidationError",{fields:te.join(", ")}));return}const G={enabled:z};g.dbUrl!==S.dbUrl&&(G.dbUrl=g.dbUrl),g.openaiApiBaseUrl!==S.openaiApiBaseUrl&&(G.openaiApiBaseUrl=g.openaiApiBaseUrl),g.openaiApiKey!==S.openaiApiKey&&(G.openaiApiKey=g.openaiApiKey),g.openaiApiEmbeddingModel!==S.openaiApiEmbeddingModel&&(G.openaiApiEmbeddingModel=g.openaiApiEmbeddingModel),await Z(G)}else await $("enabled",z)},k=()=>{setTimeout(()=>{r("/")},2e3)},q=z=>{localStorage.setItem("i18nextLng",z),window.location.reload()};return l.jsxs("div",{className:"container mx-auto",children:[l.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:s("pages.settings.title")}),l.jsx("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6 page-card",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h2",{className:"font-semibold text-gray-800",children:s("pages.settings.language")}),l.jsxs("div",{className:"flex space-x-3",children:[l.jsx("button",{className:`px-3 py-1.5 rounded-md transition-all duration-200 text-sm ${d.startsWith("en")?"bg-blue-500 text-white btn-primary":"bg-blue-100 text-blue-800 hover:bg-blue-200 btn-secondary"}`,onClick:()=>q("en"),children:"English"}),l.jsx("button",{className:`px-3 py-1.5 rounded-md transition-all duration-200 text-sm ${d.startsWith("zh")?"bg-blue-500 text-white btn-primary":"bg-blue-100 text-blue-800 hover:bg-blue-200 btn-secondary"}`,onClick:()=>q("zh"),children:"中文"})]})]})}),l.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6 page-card",children:[l.jsxs("div",{className:"flex justify-between items-center cursor-pointer transition-colors duration-200 hover:text-blue-600",onClick:()=>P("smartRoutingConfig"),children:[l.jsx("h2",{className:"font-semibold text-gray-800",children:s("pages.settings.smartRouting")}),l.jsx("span",{className:"text-gray-500 transition-transform duration-200",children:B.smartRoutingConfig?"▼":"►"})]}),B.smartRoutingConfig&&l.jsxs("div",{className:"space-y-4 mt-4",children:[l.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.enableSmartRouting")}),l.jsx("p",{className:"text-sm text-gray-500",children:s("settings.enableSmartRoutingDescription")})]}),l.jsx(Ss,{disabled:E,checked:S.enabled,onCheckedChange:z=>Y(z)})]}),l.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[l.jsx("div",{className:"mb-2",children:l.jsxs("h3",{className:"font-medium text-gray-700",children:[l.jsx("span",{className:"text-red-500 px-1",children:"*"}),s("settings.dbUrl")]})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("input",{type:"text",value:g.dbUrl,onChange:z=>se("dbUrl",z.target.value),placeholder:s("settings.dbUrlPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm border-gray-300 form-input",disabled:E}),l.jsx("button",{onClick:()=>Q("dbUrl"),disabled:E,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]}),l.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[l.jsx("div",{className:"mb-2",children:l.jsxs("h3",{className:"font-medium text-gray-700",children:[l.jsx("span",{className:"text-red-500 px-1",children:"*"}),s("settings.openaiApiKey")]})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("input",{type:"password",value:g.openaiApiKey,onChange:z=>se("openaiApiKey",z.target.value),placeholder:s("settings.openaiApiKeyPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm border-gray-300",disabled:E}),l.jsx("button",{onClick:()=>Q("openaiApiKey"),disabled:E,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]}),l.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[l.jsx("div",{className:"mb-2",children:l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.openaiApiBaseUrl")})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("input",{type:"text",value:g.openaiApiBaseUrl,onChange:z=>se("openaiApiBaseUrl",z.target.value),placeholder:s("settings.openaiApiBaseUrlPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:E}),l.jsx("button",{onClick:()=>Q("openaiApiBaseUrl"),disabled:E,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]}),l.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[l.jsx("div",{className:"mb-2",children:l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.openaiApiEmbeddingModel")})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("input",{type:"text",value:g.openaiApiEmbeddingModel,onChange:z=>se("openaiApiEmbeddingModel",z.target.value),placeholder:s("settings.openaiApiEmbeddingModelPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:E}),l.jsx("button",{onClick:()=>Q("openaiApiEmbeddingModel"),disabled:E,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]})]})]}),l.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[l.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>P("routingConfig"),children:[l.jsx("h2",{className:"font-semibold text-gray-800",children:s("pages.settings.routeConfig")}),l.jsx("span",{className:"text-gray-500",children:B.routingConfig?"▼":"►"})]}),B.routingConfig&&l.jsxs("div",{className:"space-y-4 mt-4",children:[l.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.enableBearerAuth")}),l.jsx("p",{className:"text-sm text-gray-500",children:s("settings.enableBearerAuthDescription")})]}),l.jsx(Ss,{disabled:E,checked:y.enableBearerAuth,onCheckedChange:z=>H("enableBearerAuth",z)})]}),y.enableBearerAuth&&l.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[l.jsxs("div",{className:"mb-2",children:[l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.bearerAuthKey")}),l.jsx("p",{className:"text-sm text-gray-500",children:s("settings.bearerAuthKeyDescription")})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("input",{type:"text",value:j.bearerAuthKey,onChange:z=>I(z.target.value),placeholder:s("settings.bearerAuthKeyPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:E||!y.enableBearerAuth}),l.jsx("button",{onClick:ne,disabled:E||!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 btn-primary",children:s("common.save")})]})]}),l.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.enableGlobalRoute")}),l.jsx("p",{className:"text-sm text-gray-500",children:s("settings.enableGlobalRouteDescription")})]}),l.jsx(Ss,{disabled:E,checked:y.enableGlobalRoute,onCheckedChange:z=>H("enableGlobalRoute",z)})]}),l.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.enableGroupNameRoute")}),l.jsx("p",{className:"text-sm text-gray-500",children:s("settings.enableGroupNameRouteDescription")})]}),l.jsx(Ss,{disabled:E,checked:y.enableGroupNameRoute,onCheckedChange:z=>H("enableGroupNameRoute",z)})]}),l.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.skipAuth")}),l.jsx("p",{className:"text-sm text-gray-500",children:s("settings.skipAuthDescription")})]}),l.jsx(Ss,{disabled:E,checked:y.skipAuth,onCheckedChange:z=>H("skipAuth",z)})]})]})]}),l.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[l.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>P("installConfig"),children:[l.jsx("h2",{className:"font-semibold text-gray-800",children:s("settings.installConfig")}),l.jsx("span",{className:"text-gray-500",children:B.installConfig?"▼":"►"})]}),B.installConfig&&l.jsxs("div",{className:"space-y-4 mt-4",children:[l.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[l.jsxs("div",{className:"mb-2",children:[l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.pythonIndexUrl")}),l.jsx("p",{className:"text-sm text-gray-500",children:s("settings.pythonIndexUrlDescription")})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("input",{type:"text",value:m.pythonIndexUrl,onChange:z=>L("pythonIndexUrl",z.target.value),placeholder:s("settings.pythonIndexUrlPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:E}),l.jsx("button",{onClick:()=>V("pythonIndexUrl"),disabled:E,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]}),l.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[l.jsxs("div",{className:"mb-2",children:[l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.npmRegistry")}),l.jsx("p",{className:"text-sm text-gray-500",children:s("settings.npmRegistryDescription")})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("input",{type:"text",value:m.npmRegistry,onChange:z=>L("npmRegistry",z.target.value),placeholder:s("settings.npmRegistryPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm form-input",disabled:E}),l.jsx("button",{onClick:()=>V("npmRegistry"),disabled:E,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50 btn-primary",children:s("common.save")})]})]})]})]}),l.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[l.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>P("password"),children:[l.jsx("h2",{className:"font-semibold text-gray-800",children:s("auth.changePassword")}),l.jsx("span",{className:"text-gray-500",children:B.password?"▼":"►"})]}),B.password&&l.jsx("div",{className:"max-w-lg mt-4",children:l.jsx(u1,{onSuccess:k})})]})]})},h1=()=>{const{t:s}=Oe(),[i,r]=w.useState([]),[c,d]=w.useState([]),[f,m]=w.useState([]),[p,g]=w.useState([]),[h,y]=w.useState(""),[j,v]=w.useState(""),[T,S]=w.useState(""),[E,O]=w.useState(!0),[R,A]=w.useState(null),[$,Z]=w.useState(null),[B,oe]=w.useState([]),[P,H]=w.useState(1),[I,ne]=w.useState(9),[L,V]=w.useState(1),se=w.useCallback(async()=>{try{O(!0);const ee=localStorage.getItem("mcphub_token"),le=await fetch(Ne("/market/servers"),{headers:{"x-auth-token":ee||""}});if(!le.ok)throw new Error(`Status: ${le.status}`);const ce=await le.json();ce&&ce.success&&Array.isArray(ce.data)?(d(ce.data),Q(ce.data,P)):(console.error("Invalid market servers data format:",ce),A(s("market.fetchError")))}catch(ee){console.error("Error fetching market servers:",ee),A(ee instanceof Error?ee.message:String(ee))}finally{O(!1)}},[s]),Q=w.useCallback((ee,le,ce=I)=>{const xe=ee.length,Be=Math.ceil(xe/ce);V(Be);const je=Math.max(1,Math.min(le,Be));je!==le&&H(je);const De=(je-1)*ce,Fe=ee.slice(De,De+ce);r(Fe)},[I]),Y=w.useCallback(ee=>{H(ee),Q(c,ee,I)},[c,Q,I]),k=w.useCallback(async()=>{try{const ee=localStorage.getItem("mcphub_token"),le=await fetch(Ne("/market/categories"),{headers:{"x-auth-token":ee||""}});if(!le.ok)throw new Error(`Status: ${le.status}`);const ce=await le.json();ce&&ce.success&&Array.isArray(ce.data)?m(ce.data):console.error("Invalid categories data format:",ce)}catch(ee){console.error("Error fetching categories:",ee)}},[]),q=w.useCallback(async()=>{try{const ee=localStorage.getItem("mcphub_token"),le=await fetch(Ne("/market/tags"),{headers:{"x-auth-token":ee||""}});if(!le.ok)throw new Error(`Status: ${le.status}`);const ce=await le.json();ce&&ce.success&&Array.isArray(ce.data)?g(ce.data):console.error("Invalid tags data format:",ce)}catch(ee){console.error("Error fetching tags:",ee)}},[]),z=w.useCallback(async ee=>{try{O(!0);const le=localStorage.getItem("mcphub_token"),ce=await fetch(Ne(`/market/servers/${ee}`),{headers:{"x-auth-token":le||""}});if(!ce.ok)throw new Error(`Status: ${ce.status}`);const xe=await ce.json();return xe&&xe.success&&xe.data?(Z(xe.data),xe.data):(console.error("Invalid server data format:",xe),A(s("market.serverNotFound")),null)}catch(le){return console.error(`Error fetching server ${ee}:`,le),A(le instanceof Error?le.message:String(le)),null}finally{O(!1)}},[s]),re=w.useCallback(async ee=>{try{if(O(!0),S(ee),!ee.trim()){se();return}const le=localStorage.getItem("mcphub_token"),ce=await fetch(Ne(`/market/servers/search?query=${encodeURIComponent(ee)}`),{headers:{"x-auth-token":le||""}});if(!ce.ok)throw new Error(`Status: ${ce.status}`);const xe=await ce.json();xe&&xe.success&&Array.isArray(xe.data)?(d(xe.data),H(1),Q(xe.data,1)):(console.error("Invalid search results format:",xe),A(s("market.searchError")))}catch(le){console.error("Error searching servers:",le),A(le instanceof Error?le.message:String(le))}finally{O(!1)}},[s,c,Q,se]),N=w.useCallback(async ee=>{try{if(O(!0),y(ee),v(""),!ee){se();return}const le=localStorage.getItem("mcphub_token"),ce=await fetch(Ne(`/market/categories/${encodeURIComponent(ee)}`),{headers:{"x-auth-token":le||""}});if(!ce.ok)throw new Error(`Status: ${ce.status}`);const xe=await ce.json();xe&&xe.success&&Array.isArray(xe.data)?(d(xe.data),H(1),Q(xe.data,1)):(console.error("Invalid category filter results format:",xe),A(s("market.filterError")))}catch(le){console.error("Error filtering servers by category:",le),A(le instanceof Error?le.message:String(le))}finally{O(!1)}},[s,se,Q]),G=w.useCallback(async ee=>{try{if(O(!0),v(ee),y(""),!ee){se();return}const le=localStorage.getItem("mcphub_token"),ce=await fetch(Ne(`/market/tags/${encodeURIComponent(ee)}`),{headers:{"x-auth-token":le||""}});if(!ce.ok)throw new Error(`Status: ${ce.status}`);const xe=await ce.json();xe&&xe.success&&Array.isArray(xe.data)?(d(xe.data),H(1),Q(xe.data,1)):(console.error("Invalid tag filter results format:",xe),A(s("market.tagFilterError")))}catch(le){console.error("Error filtering servers by tag:",le),A(le instanceof Error?le.message:String(le))}finally{O(!1)}},[s,se,Q]),te=w.useCallback(async()=>{try{const ee=localStorage.getItem("mcphub_token"),le=await fetch(Ne("/servers"),{headers:{"x-auth-token":ee||""}});if(!le.ok)throw new Error(`Status: ${le.status}`);const ce=await le.json();if(ce&&ce.success&&Array.isArray(ce.data)){const xe=ce.data.map(Be=>Be.name);oe(xe)}}catch(ee){console.error("Error fetching installed servers:",ee)}},[]),ae=w.useCallback(ee=>B.includes(ee),[B]),de=w.useCallback(async(ee,le)=>{var ce,xe;try{const Be=(ce=ee.installations)!=null&&ce.npm?"npm":Object.keys(ee.installations||{}).length>0?Object.keys(ee.installations)[0]:null;if(!Be||!((xe=ee.installations)!=null&&xe[Be]))return A(s("market.noInstallationMethod")),!1;const je=ee.installations[Be],De={name:ee.name,config:le.type==="stdio"?{command:le.command||je.command||"",args:le.args||je.args||[],env:{...je.env,...le.env}}:le},Fe=localStorage.getItem("mcphub_token"),Ct=await fetch(Ne("/servers"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":Fe||""},body:JSON.stringify(De)});if(!Ct.ok){const ua=await Ct.json();throw new Error(ua.message||`Status: ${Ct.status}`)}return await te(),!0}catch(Be){return console.error("Error installing server:",Be),A(Be instanceof Error?Be.message:String(Be)),!1}},[s,te]),we=w.useCallback(ee=>{ne(ee),H(1),Q(c,1,ee)},[c,Q]);return w.useEffect(()=>{se(),k(),q(),te()},[se,k,q,te]),{servers:i,allServers:c,categories:f,tags:p,selectedCategory:h,selectedTag:j,searchQuery:T,loading:E,error:R,setError:A,currentServer:$,fetchMarketServers:se,fetchServerByName:z,searchServers:re,filterByCategory:N,filterByTag:G,installServer:de,currentPage:P,totalPages:L,serversPerPage:I,changePage:Y,changeServersPerPage:we,isServerInstalled:ae}},g1=({server:s,onClick:i})=>{var p,g,h,y;const{t:r}=Oe(),c=()=>{if(!s.tags||s.tags.length===0)return{tagsToShow:[],hasMore:!1,moreCount:0};const j=28,v=A=>A.length+3;let T=0,S=0;const E=[...s.tags].sort((A,$)=>A.length-$.length);for(S=0;S<E.length;S++){const A=v(E[S]);if(T+A>j)break;if(T+=A,S===E.length-1)return{tagsToShow:E,hasMore:!1,moreCount:0}}S===0&&E.length>0&&(S=1);const O=E.length-S,R=3+String(O).length+r("market.moreTags").length;return T+R<=j||S<1?{tagsToShow:E.slice(0,S),hasMore:!0,moreCount:O}:{tagsToShow:E.slice(0,Math.max(1,S-1)),hasMore:!0,moreCount:O+1}},{tagsToShow:d,hasMore:f,moreCount:m}=c();return l.jsxs("div",{className:"bg-white rounded-lg shadow-md p-5 hover:shadow-lg transition-all duration-200 cursor-pointer flex flex-col h-full page-card",onClick:()=>i(s),children:[l.jsxs("div",{className:"flex justify-between items-start mb-3",children:[l.jsx("h3",{className:"text-lg font-semibold text-gray-900 line-clamp-1 mr-2",children:s.display_name}),s.is_official&&l.jsx("span",{className:"text-xs font-medium px-2.5 py-0.5 rounded flex-shrink-0 label-primary",children:r("market.official")})]}),l.jsx("p",{className:"text-gray-600 text-sm mb-4 line-clamp-2 min-h-[40px]",children:s.description}),l.jsx("div",{className:"flex flex-wrap gap-1 mb-2 min-h-[28px]",children:((p=s.categories)==null?void 0:p.length)>0?s.categories.map((j,v)=>l.jsx("span",{className:"bg-gray-100 text-gray-800 text-xs px-2 py-1.5 rounded whitespace-nowrap",children:j},v)):l.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),l.jsx("div",{className:"relative mb-3 min-h-[28px] overflow-x-auto",children:((g=s.tags)==null?void 0:g.length)>0?l.jsxs("div",{className:"flex gap-1 items-center whitespace-nowrap",children:[d.map((j,v)=>l.jsxs("span",{className:"bg-green-50 text-green-700 text-xs px-2 py-1 rounded flex-shrink-0 label-secondary",children:["#",j]},v)),f&&l.jsxs("span",{className:"bg-gray-100 text-gray-600 text-xs px-1.5 py-1 rounded flex-shrink-0",children:["+",m," ",r("market.moreTags")]})]}):l.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),l.jsxs("div",{className:"flex justify-between items-center mt-auto pt-2 text-xs text-gray-500",children:[l.jsxs("div",{className:"overflow-hidden",children:[l.jsxs("span",{className:"whitespace-nowrap",children:[r("market.by")," "]}),l.jsx("span",{className:"font-medium whitespace-nowrap overflow-hidden text-ellipsis max-w-[120px] inline-block align-bottom",children:((h=s.author)==null?void 0:h.name)||r("market.unknown")})]}),l.jsxs("div",{className:"flex items-center flex-shrink-0",children:[l.jsx("svg",{className:"h-4 w-4 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:l.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"})}),l.jsxs("span",{children:[((y=s.tools)==null?void 0:y.length)||0," ",r("market.tools")]})]})]})]})},p1=({server:s,onBack:i,onInstall:r,installing:c=!1,isInstalled:d=!1})=>{var I,ne;const{t:f}=Oe(),[m,p]=w.useState(!1),[g,h]=w.useState(null),[y,j]=w.useState(!1),[v,T]=w.useState(null),[S,E]=w.useState([]),O=()=>d?{className:"bg-green-600 cursor-default px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:f("market.installed")}:c?{className:"bg-gray-400 cursor-not-allowed px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:f("market.installing")}:{className:"bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded text-sm font-medium text-white btn-primary",disabled:!1,text:f("market.install")},R=()=>{p(!m),h(null),j(!1),T(null)},A=async()=>{v&&(await $(v),j(!1),T(null))},$=async L=>{try{h(null),r(s,L.config),p(!1)}catch(V){console.error("Error installing server:",V),h(f("errors.serverInstall"))}},Z=()=>{d||R()},B=()=>{if(!s.installations)return;if(s.installations.npm)return s.installations.npm;if(s.installations.uvx)return s.installations.uvx;if(s.installations.default)return s.installations.default;const L=Object.keys(s.installations);if(L.length>0)return s.installations[L[0]]},oe=async L=>{try{const V=Ug(L);V.length>0?(E(V),T(L),j(!0)):await $(L)}catch(V){console.error("Error processing server installation:",V),h(f("errors.serverInstall"))}},P=O(),H=B();return l.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[l.jsx("div",{className:"mb-4",children:l.jsxs("button",{onClick:i,className:"text-gray-600 hover:text-gray-900 flex items-center",children:[l.jsx("svg",{className:"h-5 w-5 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:l.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"})}),f("market.backToList")]})}),l.jsxs("div",{className:"flex justify-between items-start mb-4",children:[l.jsx("div",{children:l.jsxs("h2",{className:"text-2xl font-bold text-gray-900 flex items-center flex-wrap",children:[s.display_name,l.jsxs("span",{className:"text-sm font-normal text-gray-500 ml-2",children:["(",s.name,")"]}),l.jsxs("span",{className:"text-sm font-normal text-gray-600 ml-4",children:[f("market.author"),": ",s.author.name," • ",f("market.license"),": ",s.license," •",l.jsx("a",{href:s.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline ml-1",children:f("market.repository")})]})]})}),l.jsxs("div",{className:"flex items-center",children:[s.is_official&&l.jsx("span",{className:"bg-blue-100 text-blue-800 text-sm font-normal px-4 py-2 rounded mr-2 flex items-center label-primary",children:f("market.official")}),l.jsx("button",{onClick:Z,disabled:P.disabled,className:P.className,children:P.text})]})]}),l.jsx("p",{className:"text-gray-700 mb-6",children:s.description}),l.jsxs("div",{className:"mb-6",children:[l.jsxs("h3",{className:"text-lg font-semibold mb-3",children:[f("market.categories")," & ",f("market.tags")]}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[(I=s.categories)==null?void 0:I.map((L,V)=>l.jsx("span",{className:"bg-gray-100 text-gray-800 px-3 py-1 rounded",children:L},`cat-${V}`)),s.tags&&s.tags.map((L,V)=>l.jsxs("span",{className:"bg-gray-100 text-green-700 px-2 py-1 rounded text-sm",children:["#",L]},`tag-${V}`))]})]}),s.arguments&&Object.keys(s.arguments).length>0&&l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:"text-lg font-semibold mb-3",children:f("market.arguments")}),l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[l.jsx("thead",{className:"bg-gray-50 border-b border-gray-200",children:l.jsxs("tr",{children:[l.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:f("market.argumentName")}),l.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:f("market.description")}),l.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:f("market.required")}),l.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:f("market.example")})]})}),l.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:Object.entries(s.arguments).map(([L,V],se)=>l.jsxs("tr",{children:[l.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:L}),l.jsx("td",{className:"px-6 py-4 text-sm text-gray-500",children:V.description}),l.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:V.required?l.jsx("span",{className:"text-green-600",children:"✓"}):l.jsx("span",{className:"text-gray-600",children:"✗"})}),l.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:l.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:V.example})})]},se))})]})})]}),l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:"text-lg font-semibold mb-3",children:f("market.tools")}),l.jsx("div",{className:"space-y-4",children:(ne=s.tools)==null?void 0:ne.map((L,V)=>l.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[l.jsxs("h4",{className:"font-medium mb-2",children:[L.name,l.jsx("button",{type:"button",onClick:()=>{const se=document.getElementById(`schema-${V}`);se&&se.classList.toggle("hidden")},className:"text-sm text-blue-500 font-normal hover:underline focus:outline-none ml-2",children:f("market.viewSchema")})]}),l.jsx("p",{className:"text-gray-600 mb-2",children:L.description}),l.jsx("div",{className:"mt-2",children:l.jsx("pre",{id:`schema-${V}`,className:"hidden bg-gray-50 p-3 rounded text-sm overflow-auto mt-2",children:JSON.stringify(L.inputSchema,null,2)})})]},V))})]}),s.examples&&s.examples.length>0&&l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:"text-lg font-semibold mb-3",children:f("market.examples")}),l.jsx("div",{className:"space-y-4",children:s.examples.map((L,V)=>l.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[l.jsx("h4",{className:"font-medium mb-2",children:L.title}),l.jsx("p",{className:"text-gray-600 mb-2",children:L.description}),l.jsx("pre",{className:"bg-gray-50 p-3 rounded text-sm overflow-auto",children:L.prompt})]},V))})]}),l.jsx("div",{className:"mt-6 flex justify-end",children:l.jsx("button",{onClick:Z,disabled:P.disabled,className:P.className,children:P.text})}),m&&l.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:l.jsx(ou,{onSubmit:oe,onCancel:R,modalTitle:f("market.installServer",{name:s.display_name}),formError:g,initialData:{name:s.name,status:"disconnected",config:H?{command:H.command||"",args:H.args||[],env:H.env||{}}:void 0}})}),y&&l.jsx("div",{className:"fixed inset-0 bg-black/50 z-[60] flex items-center justify-center p-4",children:l.jsxs("div",{className:"bg-white rounded-lg p-6 w-full max-w-md",children:[l.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:f("server.confirmVariables")}),l.jsx("p",{className:"text-gray-600 mb-4",children:f("server.variablesDetected")}),l.jsx("div",{className:"bg-yellow-50 border border-yellow-200 rounded p-3 mb-4",children:l.jsxs("div",{className:"flex items-start",children:[l.jsx("div",{className:"flex-shrink-0",children:l.jsx("svg",{className:"h-5 w-5 text-yellow-400",viewBox:"0 0 20 20",fill:"currentColor",children:l.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})})}),l.jsxs("div",{className:"ml-3",children:[l.jsxs("h4",{className:"text-sm font-medium text-yellow-800",children:[f("server.detectedVariables"),":"]}),l.jsx("ul",{className:"mt-1 text-sm text-yellow-700",children:S.map((L,V)=>l.jsxs("li",{className:"font-mono",children:["$",`{${L}}`]},V))})]})]})}),l.jsx("p",{className:"text-gray-600 text-sm mb-6",children:f("market.confirmVariablesMessage")}),l.jsxs("div",{className:"flex justify-end space-x-3",children:[l.jsx("button",{onClick:()=>{j(!1),T(null)},className:"px-4 py-2 text-gray-600 border border-gray-300 rounded hover:bg-gray-50 btn-secondary",children:f("common.cancel")}),l.jsx("button",{onClick:A,className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 btn-primary",children:f("market.confirmAndInstall")})]})]})})]})},x1=({currentPage:s,totalPages:i,onPageChange:r})=>{const c=()=>{const d=[];d.push(l.jsx("button",{onClick:()=>r(1),className:`px-3 py-1 mx-1 rounded ${s===1?"bg-blue-500 text-white btn-primary":"bg-gray-200 hover:bg-gray-300 text-gray-700 btn-secondary"}`,children:"1"},"first"));const m=Math.max(2,s-Math.floor(5/2));m>2&&d.push(l.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis1"));for(let p=m;p<=Math.min(i-1,m+5-3);p++)d.push(l.jsx("button",{onClick:()=>r(p),className:`px-3 py-1 mx-1 rounded ${s===p?"bg-blue-500 text-white btn-primary":"bg-gray-200 hover:bg-gray-300 text-gray-700 btn-secondary"}`,children:p},p));return m+5-3<i-1&&d.push(l.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis2")),i>1&&d.push(l.jsx("button",{onClick:()=>r(i),className:`px-3 py-1 mx-1 rounded ${s===i?"bg-blue-500 text-white btn-primary":"bg-gray-200 hover:bg-gray-300 text-gray-700 btn-secondary"}`,children:i},"last")),d};return i<=1?null:l.jsxs("div",{className:"flex justify-center items-center my-6",children:[l.jsx("button",{onClick:()=>r(Math.max(1,s-1)),disabled:s===1,className:`px-3 py-1 rounded mr-2 ${s===1?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-700 btn-secondary"}`,children:"« Prev"}),l.jsx("div",{className:"flex",children:c()}),l.jsx("button",{onClick:()=>r(Math.min(i,s+1)),disabled:s===i,className:`px-3 py-1 rounded ml-2 ${s===i?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-700 btn-secondary"}`,children:"Next »"})]})},vh=()=>{const{t:s}=Oe(),i=On(),{serverName:r}=Bx(),{showToast:c}=_l(),{servers:d,allServers:f,categories:m,loading:p,error:g,setError:h,searchServers:y,filterByCategory:j,filterByTag:v,selectedCategory:T,selectedTag:S,installServer:E,fetchServerByName:O,isServerInstalled:R,currentPage:A,totalPages:$,changePage:Z,serversPerPage:B,changeServersPerPage:oe}=h1(),[P,H]=w.useState(null),[I,ne]=w.useState(""),[L,V]=w.useState(!1);w.useEffect(()=>{(async()=>{if(r){const te=await O(r);te?H(te):i("/market")}else H(null)})()},[r,O,i]);const se=G=>{G.preventDefault(),y(I)},Q=G=>{j(G)},Y=()=>{ne(""),j(""),v("")},k=G=>{i(`/market/${G.name}`)},q=()=>{i("/market")},z=async(G,te)=>{try{V(!0),await E(G,te)&&c(s("market.installSuccess",{serverName:G.display_name}),"success")}finally{V(!1)}},re=G=>{Z(G),window.scrollTo({top:0,behavior:"smooth"})},N=G=>{const te=parseInt(G.target.value,10);oe(te)};return P?l.jsx(p1,{server:P,onBack:q,onInstall:z,installing:L,isInstalled:R(P.name)}):l.jsxs("div",{children:[l.jsx("div",{className:"flex justify-between items-center mb-8",children:l.jsx("div",{children:l.jsxs("h1",{className:"text-2xl font-bold text-gray-900 flex items-center",children:[s("market.title"),l.jsx("span",{className:"text-sm text-gray-500 font-normal ml-2",children:s("pages.market.title").split(" - ")[1]})]})})}),g&&l.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6 error-box rounded-lg",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("p",{children:g}),l.jsx("button",{onClick:()=>h(null),className:"text-red-700 hover:text-red-900 transition-colors duration-200",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:l.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"})})})]})}),l.jsx("div",{className:"bg-white shadow rounded-lg p-6 mb-6 page-card",children:l.jsxs("form",{onSubmit:se,className:"flex space-x-4 mb-0",children:[l.jsx("div",{className:"flex-grow",children:l.jsx("input",{type:"text",value:I,onChange:G=>ne(G.target.value),placeholder:s("market.searchPlaceholder"),className:"shadow appearance-none border border-gray-200 rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline form-input"})}),l.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center btn-primary transition-all duration-200",children:s("market.search")}),(I||T||S)&&l.jsx("button",{type:"button",onClick:Y,className:"border border-gray-300 text-gray-700 font-medium py-2 px-4 rounded hover:bg-gray-50 btn-secondary transition-all duration-200",children:s("market.clearFilters")})]})}),l.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[l.jsx("div",{className:"md:w-48 flex-shrink-0",children:l.jsx("div",{className:"bg-white shadow rounded-lg p-4 mb-6 sticky top-4 page-card",children:m.length>0?l.jsxs("div",{className:"mb-6",children:[l.jsxs("div",{className:"flex justify-between items-center mb-3",children:[l.jsx("h3",{className:"font-medium text-gray-900",children:s("market.categories")}),T&&l.jsx("span",{className:"text-xs text-blue-600 cursor-pointer hover:underline transition-colors duration-200",onClick:()=>j(""),children:s("market.clearCategoryFilter")})]}),l.jsx("div",{className:"flex flex-col gap-2",children:m.map(G=>l.jsx("button",{onClick:()=>Q(G),className:`px-3 py-2 rounded text-sm text-left transition-all duration-200 ${T===G?"bg-blue-100 text-blue-800 font-medium btn-primary":"bg-gray-100 text-gray-800 hover:bg-gray-200 btn-secondary"}`,children:G},G))})]}):p?l.jsxs("div",{className:"mb-6",children:[l.jsx("div",{className:"mb-3",children:l.jsx("h3",{className:"font-medium text-gray-900",children:s("market.categories")})}),l.jsxs("div",{className:"flex flex-col gap-2 items-center py-4 loading-container",children:[l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"})]}),l.jsx("p",{className:"text-sm text-gray-600",children:s("app.loading")})]})]}):l.jsxs("div",{className:"mb-6",children:[l.jsx("div",{className:"mb-3",children:l.jsx("h3",{className:"font-medium text-gray-900",children:s("market.categories")})}),l.jsx("p",{className:"text-sm text-gray-600 py-2",children:s("market.noCategories")})]})})}),l.jsx("div",{className:"flex-grow",children:p?l.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:l.jsxs("div",{className:"flex flex-col items-center",children:[l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"})]}),l.jsx("p",{className:"text-gray-600",children:s("app.loading")})]})}):d.length===0?l.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:l.jsx("p",{className:"text-gray-600",children:s("market.noServers")})}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 gap-6",children:d.map((G,te)=>l.jsx(g1,{server:G,onClick:k},te))}),l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsx("div",{className:"text-sm text-gray-500",children:s("market.showing",{from:(A-1)*B+1,to:Math.min(A*B,f.length),total:f.length})}),l.jsx(x1,{currentPage:A,totalPages:$,onPageChange:re}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsxs("label",{htmlFor:"perPage",className:"text-sm text-gray-600",children:[s("market.perPage"),":"]}),l.jsxs("select",{id:"perPage",value:B,onChange:N,className:"border rounded p-1 text-sm btn-secondary outline-none",children:[l.jsx("option",{value:"6",children:"6"}),l.jsx("option",{value:"9",children:"9"}),l.jsx("option",{value:"12",children:"12"}),l.jsx("option",{value:"24",children:"24"})]})]})]}),l.jsx("div",{className:"mt-6"})]})})]})]})},y1={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"},b1={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 v1({variant:s="default",size:i="default",className:r,disabled:c,children:d,...f}){return l.jsx("button",{className:nn("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",y1[s],b1[i],r),disabled:c,...f,children:d})}const w1=({logs:s,isLoading:i=!1,error:r=null,onClear:c})=>{const{t:d}=Oe(),f=w.useRef(null),[m,p]=w.useState(!0),[g,h]=w.useState(""),[y,j]=w.useState(["info","error","warn","debug"]),[v,T]=w.useState(["main","child"]);w.useEffect(()=>{m&&f.current&&(f.current.scrollTop=f.current.scrollHeight)},[s,m]);const S=s.filter(A=>{const $=g?A.message.toLowerCase().includes(g.toLowerCase()):!0,Z=y.includes(A.type),B=v.includes(A.source);return $&&Z&&B}),E=A=>new Date(A).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),O=A=>{switch(A){case"error":return"bg-red-400/80 text-white";case"warn":return"bg-yellow-400/80 text-gray-900";case"debug":return"bg-purple-400/80 text-white";case"info":return"bg-blue-400/80 text-white";default:return"bg-blue-400/80 text-white"}},R=A=>{switch(A){case"main":return"bg-green-400/80 text-white";case"child":return"bg-orange-400/80 text-white";default:return"bg-gray-400/80 text-white"}};return l.jsxs("div",{className:"flex flex-col h-full",children:[l.jsxs("div",{className:"bg-card p-3 rounded-t-md flex flex-wrap items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsxs("span",{className:"font-semibold text-sm",children:[d("logs.filters"),":"]}),l.jsx("input",{type:"text",placeholder:d("logs.search"),className:"shadow appearance-none border border-gray-200 rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline form-input",value:g,onChange:A=>h(A.target.value)}),l.jsx("div",{className:"flex gap-1 items-center",children:["debug","info","error","warn"].map(A=>l.jsx(ri,{variant:y.includes(A)?"default":"outline",className:`cursor-pointer ${y.includes(A)?O(A):""}`,onClick:()=>{y.includes(A)?j($=>$.filter(Z=>Z!==A)):j($=>[...$,A])},children:A},A))}),l.jsx("div",{className:"flex gap-1 items-center ml-2",children:["main","child"].map(A=>l.jsx(ri,{variant:v.includes(A)?"default":"outline",className:`cursor-pointer ${v.includes(A)?R(A):""}`,onClick:()=>{v.includes(A)?T($=>$.filter(Z=>Z!==A)):T($=>[...$,A])},children:d(A==="main"?"logs.mainProcess":"logs.childProcess")},A))})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("label",{className:"flex items-center gap-1 text-sm",children:[l.jsx("input",{type:"checkbox",checked:m,onChange:()=>p(!m),className:"form-checkbox h-4 w-4"}),d("logs.autoScroll")]}),l.jsx(v1,{variant:"outline",size:"sm",onClick:c,className:"btn-secondary",disabled:i||s.length===0,children:d("logs.clearLogs")})]})]}),l.jsx("div",{ref:f,className:"flex-grow p-2 overflow-auto bg-card rounded-b-md font-mono text-sm",style:{maxHeight:"calc(100vh - 300px)"},children:i?l.jsx("div",{className:"flex justify-center items-center h-full",children:l.jsx("span",{children:d("logs.loading")})}):r?l.jsx("div",{className:"text-red-500 p-2",children:r.message}):S.length===0?l.jsx("div",{className:"text-center text-muted-foreground p-8",children:g||y.length<4||v.length<2?d("logs.noMatch"):d("logs.noLogs")}):S.map((A,$)=>l.jsxs("div",{className:`py-1 ${A.type==="error"?"text-red-500":A.type==="warn"?"text-yellow-500":""}`,children:[l.jsxs("span",{className:"text-gray-400",children:["[",E(A.timestamp),"]"]}),l.jsx(ri,{className:`ml-2 mr-1 ${O(A.type)}`,children:A.type}),l.jsxs(ri,{variant:"default",className:`mr-2 ${R(A.source)}`,children:[A.source==="main"?d("logs.main"):d("logs.child"),A.processId?` (${A.processId})`:""]}),l.jsx("span",{className:"whitespace-pre-wrap",children:A.message})]},`${A.timestamp}-${$}`))})]})},j1=async()=>{try{const s=ln(),r=await(await fetch(Ne("/logs"),{method:"DELETE",headers:{"x-auth-token":s||""}})).json();if(!r.success)throw new Error(r.error||"Failed to clear logs")}catch(s){throw console.error("Error clearing logs:",s),s}},S1=()=>{const[s,i]=w.useState([]),[r,c]=w.useState(!0),[d,f]=w.useState(null);return w.useEffect(()=>{let p=null,g=!0;const h=()=>{try{p&&p.close();const y=ln();p=new EventSource(Ne(`/logs/stream?token=${y}`)),p.onmessage=j=>{if(g)try{const v=JSON.parse(j.data);v.type==="initial"?(i(v.logs),c(!1)):v.type==="log"&&i(T=>[...T,v.log])}catch(v){console.error("Error parsing SSE message:",v)}},p.onerror=()=>{g&&(p&&(p.close(),setTimeout(h,5e3)),f(new Error("Connection to log stream lost, attempting to reconnect...")))}}catch(y){if(!g)return;f(y instanceof Error?y:new Error("Failed to connect to log stream")),c(!1)}};return h(),()=>{g=!1,p&&p.close()}},[]),{logs:s,loading:r,error:d,clearLogs:async()=>{try{await j1(),i([])}catch(p){f(p instanceof Error?p:new Error("Failed to clear logs"))}}}},N1=()=>{const{t:s}=Oe(),{logs:i,loading:r,error:c,clearLogs:d}=S1();return l.jsxs("div",{className:"container mx-auto p-4",children:[l.jsx("div",{className:"flex justify-between items-center mb-4",children:l.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:s("pages.logs.title")})}),l.jsx("div",{className:"bg-card rounded-md shadow-sm border border-gray-200 page-card",children:l.jsx(w1,{logs:i,isLoading:r,error:c,onClear:d})})]})};function wh(){const s=su();return l.jsx(cv,{children:l.jsx($y,{children:l.jsx(iv,{children:l.jsx(Ny,{basename:s,children:l.jsxs(ey,{children:[l.jsx($t,{path:"/login",element:l.jsx(qv,{})}),l.jsx($t,{element:l.jsx(Vv,{}),children:l.jsxs($t,{element:l.jsx(Bv,{}),children:[l.jsx($t,{path:"/",element:l.jsx(Gv,{})}),l.jsx($t,{path:"/servers",element:l.jsx(l1,{})}),l.jsx($t,{path:"/groups",element:l.jsx(c1,{})}),l.jsx($t,{path:"/market",element:l.jsx(vh,{})}),l.jsx($t,{path:"/market/:serverName",element:l.jsx(vh,{})}),l.jsx($t,{path:"/logs",element:l.jsx(N1,{})}),l.jsx($t,{path:"/settings",element:l.jsx(m1,{})})]})}),l.jsx($t,{path:"*",element:l.jsx(Zh,{to:"/"})})]})})})})})}const Se=s=>typeof s=="string",Rl=()=>{let s,i;const r=new Promise((c,d)=>{s=c,i=d});return r.resolve=s,r.reject=i,r},jh=s=>s==null?"":""+s,C1=(s,i,r)=>{s.forEach(c=>{i[c]&&(r[c]=i[c])})},E1=/###/g,Sh=s=>s&&s.indexOf("###")>-1?s.replace(E1,"."):s,Nh=s=>!s||Se(s),Ol=(s,i,r)=>{const c=Se(i)?i.split("."):i;let d=0;for(;d<c.length-1;){if(Nh(s))return{};const f=Sh(c[d]);!s[f]&&r&&(s[f]=new r),Object.prototype.hasOwnProperty.call(s,f)?s=s[f]:s={},++d}return Nh(s)?{}:{obj:s,k:Sh(c[d])}},Ch=(s,i,r)=>{const{obj:c,k:d}=Ol(s,i,Object);if(c!==void 0||i.length===1){c[d]=r;return}let f=i[i.length-1],m=i.slice(0,i.length-1),p=Ol(s,m,Object);for(;p.obj===void 0&&m.length;)f=`${m[m.length-1]}.${f}`,m=m.slice(0,m.length-1),p=Ol(s,m,Object),p!=null&&p.obj&&typeof p.obj[`${p.k}.${f}`]<"u"&&(p.obj=void 0);p.obj[`${p.k}.${f}`]=r},k1=(s,i,r,c)=>{const{obj:d,k:f}=Ol(s,i,Object);d[f]=d[f]||[],d[f].push(r)},di=(s,i)=>{const{obj:r,k:c}=Ol(s,i);if(r&&Object.prototype.hasOwnProperty.call(r,c))return r[c]},T1=(s,i,r)=>{const c=di(s,r);return c!==void 0?c:di(i,r)},Lg=(s,i,r)=>{for(const c in i)c!=="__proto__"&&c!=="constructor"&&(c in s?Se(s[c])||s[c]instanceof String||Se(i[c])||i[c]instanceof String?r&&(s[c]=i[c]):Lg(s[c],i[c],r):s[c]=i[c]);return s},bs=s=>s.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var A1={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const R1=s=>Se(s)?s.replace(/[&<>"'\/]/g,i=>A1[i]):s;class O1{constructor(i){this.capacity=i,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(i){const r=this.regExpMap.get(i);if(r!==void 0)return r;const c=new RegExp(i);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(i,c),this.regExpQueue.push(i),c}}const M1=[" ",",","?","!",";"],z1=new O1(20),D1=(s,i,r)=>{i=i||"",r=r||"";const c=M1.filter(m=>i.indexOf(m)<0&&r.indexOf(m)<0);if(c.length===0)return!0;const d=z1.getRegExp(`(${c.map(m=>m==="?"?"\\?":m).join("|")})`);let f=!d.test(s);if(!f){const m=s.indexOf(r);m>0&&!d.test(s.substring(0,m))&&(f=!0)}return f},Zc=function(s,i){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!s)return;if(s[i])return Object.prototype.hasOwnProperty.call(s,i)?s[i]:void 0;const c=i.split(r);let d=s;for(let f=0;f<c.length;){if(!d||typeof d!="object")return;let m,p="";for(let g=f;g<c.length;++g)if(g!==f&&(p+=r),p+=c[g],m=d[p],m!==void 0){if(["string","number","boolean"].indexOf(typeof m)>-1&&g<c.length-1)continue;f+=g-f+1;break}d=m}return d},fi=s=>s==null?void 0:s.replace("_","-"),U1={type:"logger",log(s){this.output("log",s)},warn(s){this.output("warn",s)},error(s){this.output("error",s)},output(s,i){var r,c;(c=(r=console==null?void 0:console[s])==null?void 0:r.apply)==null||c.call(r,console,i)}};class mi{constructor(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(i,r)}init(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=i||U1,this.options=r,this.debug=r.debug}log(){for(var i=arguments.length,r=new Array(i),c=0;c<i;c++)r[c]=arguments[c];return this.forward(r,"log","",!0)}warn(){for(var i=arguments.length,r=new Array(i),c=0;c<i;c++)r[c]=arguments[c];return this.forward(r,"warn","",!0)}error(){for(var i=arguments.length,r=new Array(i),c=0;c<i;c++)r[c]=arguments[c];return this.forward(r,"error","")}deprecate(){for(var i=arguments.length,r=new Array(i),c=0;c<i;c++)r[c]=arguments[c];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(i,r,c,d){return d&&!this.debug?null:(Se(i[0])&&(i[0]=`${c}${this.prefix} ${i[0]}`),this.logger[r](i))}create(i){return new mi(this.logger,{prefix:`${this.prefix}:${i}:`,...this.options})}clone(i){return i=i||this.options,i.prefix=i.prefix||this.prefix,new mi(this.logger,i)}}var ca=new mi;class yi{constructor(){this.observers={}}on(i,r){return i.split(" ").forEach(c=>{this.observers[c]||(this.observers[c]=new Map);const d=this.observers[c].get(r)||0;this.observers[c].set(r,d+1)}),this}off(i,r){if(this.observers[i]){if(!r){delete this.observers[i];return}this.observers[i].delete(r)}}emit(i){for(var r=arguments.length,c=new Array(r>1?r-1:0),d=1;d<r;d++)c[d-1]=arguments[d];this.observers[i]&&Array.from(this.observers[i].entries()).forEach(m=>{let[p,g]=m;for(let h=0;h<g;h++)p(...c)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(m=>{let[p,g]=m;for(let h=0;h<g;h++)p.apply(p,[i,...c])})}}class Eh extends yi{constructor(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=i||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}removeNamespaces(i){const r=this.options.ns.indexOf(i);r>-1&&this.options.ns.splice(r,1)}getResource(i,r,c){var h,y;let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const f=d.keySeparator!==void 0?d.keySeparator:this.options.keySeparator,m=d.ignoreJSONStructure!==void 0?d.ignoreJSONStructure:this.options.ignoreJSONStructure;let p;i.indexOf(".")>-1?p=i.split("."):(p=[i,r],c&&(Array.isArray(c)?p.push(...c):Se(c)&&f?p.push(...c.split(f)):p.push(c)));const g=di(this.data,p);return!g&&!r&&!c&&i.indexOf(".")>-1&&(i=p[0],r=p[1],c=p.slice(2).join(".")),g||!m||!Se(c)?g:Zc((y=(h=this.data)==null?void 0:h[i])==null?void 0:y[r],c,f)}addResource(i,r,c,d){let f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const m=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator;let p=[i,r];c&&(p=p.concat(m?c.split(m):c)),i.indexOf(".")>-1&&(p=i.split("."),d=r,r=p[1]),this.addNamespaces(r),Ch(this.data,p,d),f.silent||this.emit("added",i,r,c,d)}addResources(i,r,c){let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const f in c)(Se(c[f])||Array.isArray(c[f]))&&this.addResource(i,r,f,c[f],{silent:!0});d.silent||this.emit("added",i,r,c)}addResourceBundle(i,r,c,d,f){let m=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},p=[i,r];i.indexOf(".")>-1&&(p=i.split("."),d=c,c=r,r=p[1]),this.addNamespaces(r);let g=di(this.data,p)||{};m.skipCopy||(c=JSON.parse(JSON.stringify(c))),d?Lg(g,c,f):g={...g,...c},Ch(this.data,p,g),m.silent||this.emit("added",i,r,c)}removeResourceBundle(i,r){this.hasResourceBundle(i,r)&&delete this.data[i][r],this.removeNamespaces(r),this.emit("removed",i,r)}hasResourceBundle(i,r){return this.getResource(i,r)!==void 0}getResourceBundle(i,r){return r||(r=this.options.defaultNS),this.getResource(i,r)}getDataByLanguage(i){return this.data[i]}hasLanguageSomeTranslations(i){const r=this.getDataByLanguage(i);return!!(r&&Object.keys(r)||[]).find(d=>r[d]&&Object.keys(r[d]).length>0)}toJSON(){return this.data}}var _g={processors:{},addPostProcessor(s){this.processors[s.name]=s},handle(s,i,r,c,d){return s.forEach(f=>{var m;i=((m=this.processors[f])==null?void 0:m.process(i,r,c,d))??i}),i}};const kh={},Th=s=>!Se(s)&&typeof s!="boolean"&&typeof s!="number";class hi extends yi{constructor(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),C1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ca.create("translator")}changeLanguage(i){i&&(this.language=i)}exists(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;const c=this.resolve(i,r);return(c==null?void 0:c.res)!==void 0}extractFromKey(i,r){let c=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const d=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let f=r.ns||this.options.defaultNS||[];const m=c&&i.indexOf(c)>-1,p=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!D1(i,c,d);if(m&&!p){const g=i.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:i,namespaces:Se(f)?[f]:f};const h=i.split(c);(c!==d||c===d&&this.options.ns.indexOf(h[0])>-1)&&(f=h.shift()),i=h.join(d)}return{key:i,namespaces:Se(f)?[f]:f}}translate(i,r,c){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);const d=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,f=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:m,namespaces:p}=this.extractFromKey(i[i.length-1],r),g=p[p.length-1],h=r.lng||this.language,y=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((h==null?void 0:h.toLowerCase())==="cimode"){if(y){const L=r.nsSeparator||this.options.nsSeparator;return d?{res:`${g}${L}${m}`,usedKey:m,exactUsedKey:m,usedLng:h,usedNS:g,usedParams:this.getUsedParamsDetails(r)}:`${g}${L}${m}`}return d?{res:m,usedKey:m,exactUsedKey:m,usedLng:h,usedNS:g,usedParams:this.getUsedParamsDetails(r)}:m}const j=this.resolve(i,r);let v=j==null?void 0:j.res;const T=(j==null?void 0:j.usedKey)||m,S=(j==null?void 0:j.exactUsedKey)||m,E=["[object Number]","[object Function]","[object RegExp]"],O=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject,A=r.count!==void 0&&!Se(r.count),$=hi.hasDefaultValue(r),Z=A?this.pluralResolver.getSuffix(h,r.count,r):"",B=r.ordinal&&A?this.pluralResolver.getSuffix(h,r.count,{ordinal:!1}):"",oe=A&&!r.ordinal&&r.count===0,P=oe&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${Z}`]||r[`defaultValue${B}`]||r.defaultValue;let H=v;R&&!v&&$&&(H=P);const I=Th(H),ne=Object.prototype.toString.apply(H);if(R&&H&&I&&E.indexOf(ne)<0&&!(Se(O)&&Array.isArray(H))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const L=this.options.returnedObjectHandler?this.options.returnedObjectHandler(T,H,{...r,ns:p}):`key '${m} (${this.language})' returned an object instead of string.`;return d?(j.res=L,j.usedParams=this.getUsedParamsDetails(r),j):L}if(f){const L=Array.isArray(H),V=L?[]:{},se=L?S:T;for(const Q in H)if(Object.prototype.hasOwnProperty.call(H,Q)){const Y=`${se}${f}${Q}`;$&&!v?V[Q]=this.translate(Y,{...r,defaultValue:Th(P)?P[Q]:void 0,joinArrays:!1,ns:p}):V[Q]=this.translate(Y,{...r,joinArrays:!1,ns:p}),V[Q]===Y&&(V[Q]=H[Q])}v=V}}else if(R&&Se(O)&&Array.isArray(v))v=v.join(O),v&&(v=this.extendTranslation(v,i,r,c));else{let L=!1,V=!1;!this.isValidLookup(v)&&$&&(L=!0,v=P),this.isValidLookup(v)||(V=!0,v=m);const Q=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&V?void 0:v,Y=$&&P!==v&&this.options.updateMissing;if(V||L||Y){if(this.logger.log(Y?"updateKey":"missingKey",h,g,m,Y?P:v),f){const re=this.resolve(m,{...r,keySeparator:!1});re&&re.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 k=[];const q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&q&&q[0])for(let re=0;re<q.length;re++)k.push(q[re]);else this.options.saveMissingTo==="all"?k=this.languageUtils.toResolveHierarchy(r.lng||this.language):k.push(r.lng||this.language);const z=(re,N,G)=>{var ae;const te=$&&G!==v?G:Q;this.options.missingKeyHandler?this.options.missingKeyHandler(re,g,N,te,Y,r):(ae=this.backendConnector)!=null&&ae.saveMissing&&this.backendConnector.saveMissing(re,g,N,te,Y,r),this.emit("missingKey",re,g,N,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?k.forEach(re=>{const N=this.pluralResolver.getSuffixes(re,r);oe&&r[`defaultValue${this.options.pluralSeparator}zero`]&&N.indexOf(`${this.options.pluralSeparator}zero`)<0&&N.push(`${this.options.pluralSeparator}zero`),N.forEach(G=>{z([re],m+G,r[`defaultValue${G}`]||P)})}):z(k,m,P))}v=this.extendTranslation(v,i,r,j,c),V&&v===m&&this.options.appendNamespaceToMissingKey&&(v=`${g}:${m}`),(V||L)&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}:${m}`:m,L?v:void 0))}return d?(j.res=v,j.usedParams=this.getUsedParamsDetails(r),j):v}extendTranslation(i,r,c,d,f){var h,y;var m=this;if((h=this.i18nFormat)!=null&&h.parse)i=this.i18nFormat.parse(i,{...this.options.interpolation.defaultVariables,...c},c.lng||this.language||d.usedLng,d.usedNS,d.usedKey,{resolved:d});else if(!c.skipInterpolation){c.interpolation&&this.interpolator.init({...c,interpolation:{...this.options.interpolation,...c.interpolation}});const j=Se(i)&&(((y=c==null?void 0:c.interpolation)==null?void 0:y.skipOnVariables)!==void 0?c.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let v;if(j){const S=i.match(this.interpolator.nestingRegexp);v=S&&S.length}let T=c.replace&&!Se(c.replace)?c.replace:c;if(this.options.interpolation.defaultVariables&&(T={...this.options.interpolation.defaultVariables,...T}),i=this.interpolator.interpolate(i,T,c.lng||this.language||d.usedLng,c),j){const S=i.match(this.interpolator.nestingRegexp),E=S&&S.length;v<E&&(c.nest=!1)}!c.lng&&d&&d.res&&(c.lng=this.language||d.usedLng),c.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var S=arguments.length,E=new Array(S),O=0;O<S;O++)E[O]=arguments[O];return(f==null?void 0:f[0])===E[0]&&!c.context?(m.logger.warn(`It seems you are nesting recursively key: ${E[0]} in key: ${r[0]}`),null):m.translate(...E,r)},c)),c.interpolation&&this.interpolator.reset()}const p=c.postProcess||this.options.postProcess,g=Se(p)?[p]:p;return i!=null&&(g!=null&&g.length)&&c.applyPostProcessor!==!1&&(i=_g.handle(g,i,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...d,usedParams:this.getUsedParamsDetails(c)},...c}:c,this)),i}resolve(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,d,f,m,p;return Se(i)&&(i=[i]),i.forEach(g=>{if(this.isValidLookup(c))return;const h=this.extractFromKey(g,r),y=h.key;d=y;let j=h.namespaces;this.options.fallbackNS&&(j=j.concat(this.options.fallbackNS));const v=r.count!==void 0&&!Se(r.count),T=v&&!r.ordinal&&r.count===0,S=r.context!==void 0&&(Se(r.context)||typeof r.context=="number")&&r.context!=="",E=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);j.forEach(O=>{var R,A;this.isValidLookup(c)||(p=O,!kh[`${E[0]}-${O}`]&&((R=this.utils)!=null&&R.hasLoadedNamespace)&&!((A=this.utils)!=null&&A.hasLoadedNamespace(p))&&(kh[`${E[0]}-${O}`]=!0,this.logger.warn(`key "${d}" for languages "${E.join(", ")}" won't get resolved as namespace "${p}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach($=>{var oe;if(this.isValidLookup(c))return;m=$;const Z=[y];if((oe=this.i18nFormat)!=null&&oe.addLookupKeys)this.i18nFormat.addLookupKeys(Z,y,$,O,r);else{let P;v&&(P=this.pluralResolver.getSuffix($,r.count,r));const H=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(v&&(Z.push(y+P),r.ordinal&&P.indexOf(I)===0&&Z.push(y+P.replace(I,this.options.pluralSeparator)),T&&Z.push(y+H)),S){const ne=`${y}${this.options.contextSeparator}${r.context}`;Z.push(ne),v&&(Z.push(ne+P),r.ordinal&&P.indexOf(I)===0&&Z.push(ne+P.replace(I,this.options.pluralSeparator)),T&&Z.push(ne+H))}}let B;for(;B=Z.pop();)this.isValidLookup(c)||(f=B,c=this.getResource($,O,B,r))}))})}),{res:c,usedKey:d,exactUsedKey:f,usedLng:m,usedNS:p}}isValidLookup(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}getResource(i,r,c){var f;let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(f=this.i18nFormat)!=null&&f.getResource?this.i18nFormat.getResource(i,r,c,d):this.resourceStore.getResource(i,r,c,d)}getUsedParamsDetails(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],c=i.replace&&!Se(i.replace);let d=c?i.replace:i;if(c&&typeof i.count<"u"&&(d.count=i.count),this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),!c){d={...d};for(const f of r)delete d[f]}return d}static hasDefaultValue(i){const r="defaultValue";for(const c in i)if(Object.prototype.hasOwnProperty.call(i,c)&&r===c.substring(0,r.length)&&i[c]!==void 0)return!0;return!1}}class Ah{constructor(i){this.options=i,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ca.create("languageUtils")}getScriptPartFromCode(i){if(i=fi(i),!i||i.indexOf("-")<0)return null;const r=i.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(i){if(i=fi(i),!i||i.indexOf("-")<0)return i;const r=i.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(i){if(Se(i)&&i.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(i)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?i.toLowerCase():i)}return this.options.cleanCode||this.options.lowerCaseLng?i.toLowerCase():i}isSupportedCode(i){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(i=this.getLanguagePartFromCode(i)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(i)>-1}getBestMatchFromCodes(i){if(!i)return null;let r;return i.forEach(c=>{if(r)return;const d=this.formatLanguageCode(c);(!this.options.supportedLngs||this.isSupportedCode(d))&&(r=d)}),!r&&this.options.supportedLngs&&i.forEach(c=>{if(r)return;const d=this.getLanguagePartFromCode(c);if(this.isSupportedCode(d))return r=d;r=this.options.supportedLngs.find(f=>{if(f===d)return f;if(!(f.indexOf("-")<0&&d.indexOf("-")<0)&&(f.indexOf("-")>0&&d.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===d||f.indexOf(d)===0&&d.length>1))return f})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(i,r){if(!i)return[];if(typeof i=="function"&&(i=i(r)),Se(i)&&(i=[i]),Array.isArray(i))return i;if(!r)return i.default||[];let c=i[r];return c||(c=i[this.getScriptPartFromCode(r)]),c||(c=i[this.formatLanguageCode(r)]),c||(c=i[this.getLanguagePartFromCode(r)]),c||(c=i.default),c||[]}toResolveHierarchy(i,r){const c=this.getFallbackCodes(r||this.options.fallbackLng||[],i),d=[],f=m=>{m&&(this.isSupportedCode(m)?d.push(m):this.logger.warn(`rejecting language code not found in supportedLngs: ${m}`))};return Se(i)&&(i.indexOf("-")>-1||i.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&f(this.formatLanguageCode(i)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&f(this.getScriptPartFromCode(i)),this.options.load!=="currentOnly"&&f(this.getLanguagePartFromCode(i))):Se(i)&&f(this.formatLanguageCode(i)),c.forEach(m=>{d.indexOf(m)<0&&f(this.formatLanguageCode(m))}),d}}const Rh={zero:0,one:1,two:2,few:3,many:4,other:5},Oh={select:s=>s===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class L1{constructor(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=i,this.options=r,this.logger=ca.create("pluralResolver"),this.pluralRulesCache={}}addRule(i,r){this.rules[i]=r}clearCache(){this.pluralRulesCache={}}getRule(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const c=fi(i==="dev"?"en":i),d=r.ordinal?"ordinal":"cardinal",f=JSON.stringify({cleanedCode:c,type:d});if(f in this.pluralRulesCache)return this.pluralRulesCache[f];let m;try{m=new Intl.PluralRules(c,{type:d})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Oh;if(!i.match(/-|_/))return Oh;const g=this.languageUtils.getLanguagePartFromCode(i);m=this.getRule(g,r)}return this.pluralRulesCache[f]=m,m}needsPlural(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=this.getRule(i,r);return c||(c=this.getRule("dev",r)),(c==null?void 0:c.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(i,r){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(i,c).map(d=>`${r}${d}`)}getSuffixes(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=this.getRule(i,r);return c||(c=this.getRule("dev",r)),c?c.resolvedOptions().pluralCategories.sort((d,f)=>Rh[d]-Rh[f]).map(d=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${d}`):[]}getSuffix(i,r){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const d=this.getRule(i,c);return d?`${this.options.prepend}${c.ordinal?`ordinal${this.options.prepend}`:""}${d.select(r)}`:(this.logger.warn(`no plural rule found for: ${i}`),this.getSuffix("dev",r,c))}}const Mh=function(s,i,r){let c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,f=T1(s,i,r);return!f&&d&&Se(r)&&(f=Zc(s,r,c),f===void 0&&(f=Zc(i,r,c))),f},Hc=s=>s.replace(/\$/g,"$$$$");class _1{constructor(){var r;let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ca.create("interpolator"),this.options=i,this.format=((r=i==null?void 0:i.interpolation)==null?void 0:r.format)||(c=>c),this.init(i)}init(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};i.interpolation||(i.interpolation={escapeValue:!0});const{escape:r,escapeValue:c,useRawValueToEscape:d,prefix:f,prefixEscaped:m,suffix:p,suffixEscaped:g,formatSeparator:h,unescapeSuffix:y,unescapePrefix:j,nestingPrefix:v,nestingPrefixEscaped:T,nestingSuffix:S,nestingSuffixEscaped:E,nestingOptionsSeparator:O,maxReplaces:R,alwaysFormat:A}=i.interpolation;this.escape=r!==void 0?r:R1,this.escapeValue=c!==void 0?c:!0,this.useRawValueToEscape=d!==void 0?d:!1,this.prefix=f?bs(f):m||"{{",this.suffix=p?bs(p):g||"}}",this.formatSeparator=h||",",this.unescapePrefix=y?"":j||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=v?bs(v):T||bs("$t("),this.nestingSuffix=S?bs(S):E||bs(")"),this.nestingOptionsSeparator=O||",",this.maxReplaces=R||1e3,this.alwaysFormat=A!==void 0?A:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const i=(r,c)=>(r==null?void 0:r.source)===c?(r.lastIndex=0,r):new RegExp(c,"g");this.regexp=i(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=i(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=i(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(i,r,c,d){var T;let f,m,p;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=S=>{if(S.indexOf(this.formatSeparator)<0){const A=Mh(r,g,S,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(A,void 0,c,{...d,...r,interpolationkey:S}):A}const E=S.split(this.formatSeparator),O=E.shift().trim(),R=E.join(this.formatSeparator).trim();return this.format(Mh(r,g,O,this.options.keySeparator,this.options.ignoreJSONStructure),R,c,{...d,...r,interpolationkey:O})};this.resetRegExp();const y=(d==null?void 0:d.missingInterpolationHandler)||this.options.missingInterpolationHandler,j=((T=d==null?void 0:d.interpolation)==null?void 0:T.skipOnVariables)!==void 0?d.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:S=>Hc(S)},{regex:this.regexp,safeValue:S=>this.escapeValue?Hc(this.escape(S)):Hc(S)}].forEach(S=>{for(p=0;f=S.regex.exec(i);){const E=f[1].trim();if(m=h(E),m===void 0)if(typeof y=="function"){const R=y(i,f,d);m=Se(R)?R:""}else if(d&&Object.prototype.hasOwnProperty.call(d,E))m="";else if(j){m=f[0];continue}else this.logger.warn(`missed to pass in variable ${E} for interpolating ${i}`),m="";else!Se(m)&&!this.useRawValueToEscape&&(m=jh(m));const O=S.safeValue(m);if(i=i.replace(f[0],O),j?(S.regex.lastIndex+=m.length,S.regex.lastIndex-=f[0].length):S.regex.lastIndex=0,p++,p>=this.maxReplaces)break}}),i}nest(i,r){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d,f,m;const p=(g,h)=>{const y=this.nestingOptionsSeparator;if(g.indexOf(y)<0)return g;const j=g.split(new RegExp(`${y}[ ]*{`));let v=`{${j[1]}`;g=j[0],v=this.interpolate(v,m);const T=v.match(/'/g),S=v.match(/"/g);(((T==null?void 0:T.length)??0)%2===0&&!S||S.length%2!==0)&&(v=v.replace(/'/g,'"'));try{m=JSON.parse(v),h&&(m={...h,...m})}catch(E){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,E),`${g}${y}${v}`}return m.defaultValue&&m.defaultValue.indexOf(this.prefix)>-1&&delete m.defaultValue,g};for(;d=this.nestingRegexp.exec(i);){let g=[];m={...c},m=m.replace&&!Se(m.replace)?m.replace:m,m.applyPostProcessor=!1,delete m.defaultValue;let h=!1;if(d[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(d[1])){const y=d[1].split(this.formatSeparator).map(j=>j.trim());d[1]=y.shift(),g=y,h=!0}if(f=r(p.call(this,d[1].trim(),m),m),f&&d[0]===i&&!Se(f))return f;Se(f)||(f=jh(f)),f||(this.logger.warn(`missed to resolve ${d[1]} for nesting ${i}`),f=""),h&&(f=g.reduce((y,j)=>this.format(y,j,c.lng,{...c,interpolationkey:d[1].trim()}),f.trim())),i=i.replace(d[0],f),this.regexp.lastIndex=0}return i}}const H1=s=>{let i=s.toLowerCase().trim();const r={};if(s.indexOf("(")>-1){const c=s.split("(");i=c[0].toLowerCase().trim();const d=c[1].substring(0,c[1].length-1);i==="currency"&&d.indexOf(":")<0?r.currency||(r.currency=d.trim()):i==="relativetime"&&d.indexOf(":")<0?r.range||(r.range=d.trim()):d.split(";").forEach(m=>{if(m){const[p,...g]=m.split(":"),h=g.join(":").trim().replace(/^'+|'+$/g,""),y=p.trim();r[y]||(r[y]=h),h==="false"&&(r[y]=!1),h==="true"&&(r[y]=!0),isNaN(h)||(r[y]=parseInt(h,10))}})}return{formatName:i,formatOptions:r}},vs=s=>{const i={};return(r,c,d)=>{let f=d;d&&d.interpolationkey&&d.formatParams&&d.formatParams[d.interpolationkey]&&d[d.interpolationkey]&&(f={...f,[d.interpolationkey]:void 0});const m=c+JSON.stringify(f);let p=i[m];return p||(p=s(fi(c),d),i[m]=p),p(r)}};class B1{constructor(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ca.create("formatter"),this.options=i,this.formats={number:vs((r,c)=>{const d=new Intl.NumberFormat(r,{...c});return f=>d.format(f)}),currency:vs((r,c)=>{const d=new Intl.NumberFormat(r,{...c,style:"currency"});return f=>d.format(f)}),datetime:vs((r,c)=>{const d=new Intl.DateTimeFormat(r,{...c});return f=>d.format(f)}),relativetime:vs((r,c)=>{const d=new Intl.RelativeTimeFormat(r,{...c});return f=>d.format(f,c.range||"day")}),list:vs((r,c)=>{const d=new Intl.ListFormat(r,{...c});return f=>d.format(f)})},this.init(i)}init(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(i,r){this.formats[i.toLowerCase().trim()]=r}addCached(i,r){this.formats[i.toLowerCase().trim()]=vs(r)}format(i,r,c){let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const f=r.split(this.formatSeparator);if(f.length>1&&f[0].indexOf("(")>1&&f[0].indexOf(")")<0&&f.find(p=>p.indexOf(")")>-1)){const p=f.findIndex(g=>g.indexOf(")")>-1);f[0]=[f[0],...f.splice(1,p)].join(this.formatSeparator)}return f.reduce((p,g)=>{var j;const{formatName:h,formatOptions:y}=H1(g);if(this.formats[h]){let v=p;try{const T=((j=d==null?void 0:d.formatParams)==null?void 0:j[d.interpolationkey])||{},S=T.locale||T.lng||d.locale||d.lng||c;v=this.formats[h](p,S,{...y,...d,...T})}catch(T){this.logger.warn(T)}return v}else this.logger.warn(`there was no format function for ${h}`);return p},i)}}const V1=(s,i)=>{s.pending[i]!==void 0&&(delete s.pending[i],s.pendingCount--)};class q1 extends yi{constructor(i,r,c){var f,m;let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=i,this.store=r,this.services=c,this.languageUtils=c.languageUtils,this.options=d,this.logger=ca.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=d.maxParallelReads||10,this.readingCalls=0,this.maxRetries=d.maxRetries>=0?d.maxRetries:5,this.retryTimeout=d.retryTimeout>=1?d.retryTimeout:350,this.state={},this.queue=[],(m=(f=this.backend)==null?void 0:f.init)==null||m.call(f,c,d.backend,d)}queueLoad(i,r,c,d){const f={},m={},p={},g={};return i.forEach(h=>{let y=!0;r.forEach(j=>{const v=`${h}|${j}`;!c.reload&&this.store.hasResourceBundle(h,j)?this.state[v]=2:this.state[v]<0||(this.state[v]===1?m[v]===void 0&&(m[v]=!0):(this.state[v]=1,y=!1,m[v]===void 0&&(m[v]=!0),f[v]===void 0&&(f[v]=!0),g[j]===void 0&&(g[j]=!0)))}),y||(p[h]=!0)}),(Object.keys(f).length||Object.keys(m).length)&&this.queue.push({pending:m,pendingCount:Object.keys(m).length,loaded:{},errors:[],callback:d}),{toLoad:Object.keys(f),pending:Object.keys(m),toLoadLanguages:Object.keys(p),toLoadNamespaces:Object.keys(g)}}loaded(i,r,c){const d=i.split("|"),f=d[0],m=d[1];r&&this.emit("failedLoading",f,m,r),!r&&c&&this.store.addResourceBundle(f,m,c,void 0,void 0,{skipCopy:!0}),this.state[i]=r?-1:2,r&&c&&(this.state[i]=0);const p={};this.queue.forEach(g=>{k1(g.loaded,[f],m),V1(g,i),r&&g.errors.push(r),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(h=>{p[h]||(p[h]={});const y=g.loaded[h];y.length&&y.forEach(j=>{p[h][j]===void 0&&(p[h][j]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",p),this.queue=this.queue.filter(g=>!g.done)}read(i,r,c){let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,m=arguments.length>5?arguments[5]:void 0;if(!i.length)return m(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:r,fcName:c,tried:d,wait:f,callback:m});return}this.readingCalls++;const p=(h,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const j=this.waitingReads.shift();this.read(j.lng,j.ns,j.fcName,j.tried,j.wait,j.callback)}if(h&&y&&d<this.maxRetries){setTimeout(()=>{this.read.call(this,i,r,c,d+1,f*2,m)},f);return}m(h,y)},g=this.backend[c].bind(this.backend);if(g.length===2){try{const h=g(i,r);h&&typeof h.then=="function"?h.then(y=>p(null,y)).catch(p):p(null,h)}catch(h){p(h)}return}return g(i,r,p)}prepareLoading(i,r){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d=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."),d&&d();Se(i)&&(i=this.languageUtils.toResolveHierarchy(i)),Se(r)&&(r=[r]);const f=this.queueLoad(i,r,c,d);if(!f.toLoad.length)return f.pending.length||d(),null;f.toLoad.forEach(m=>{this.loadOne(m)})}load(i,r,c){this.prepareLoading(i,r,{},c)}reload(i,r,c){this.prepareLoading(i,r,{reload:!0},c)}loadOne(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const c=i.split("|"),d=c[0],f=c[1];this.read(d,f,"read",void 0,void 0,(m,p)=>{m&&this.logger.warn(`${r}loading namespace ${f} for language ${d} failed`,m),!m&&p&&this.logger.log(`${r}loaded namespace ${f} for language ${d}`,p),this.loaded(i,m,p)})}saveMissing(i,r,c,d,f){var g,h,y,j,v;let m=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},p=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((h=(g=this.services)==null?void 0:g.utils)!=null&&h.hasLoadedNamespace&&!((j=(y=this.services)==null?void 0:y.utils)!=null&&j.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${c}" as the namespace "${r}" 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 T={...m,isUpdate:f},S=this.backend.create.bind(this.backend);if(S.length<6)try{let E;S.length===5?E=S(i,r,c,d,T):E=S(i,r,c,d),E&&typeof E.then=="function"?E.then(O=>p(null,O)).catch(p):p(null,E)}catch(E){p(E)}else S(i,r,c,d,p,T)}!i||!i[0]||this.store.addResource(i[0],r,c,d)}}}const zh=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:s=>{let i={};if(typeof s[1]=="object"&&(i=s[1]),Se(s[1])&&(i.defaultValue=s[1]),Se(s[2])&&(i.tDescription=s[2]),typeof s[2]=="object"||typeof s[3]=="object"){const r=s[3]||s[2];Object.keys(r).forEach(c=>{i[c]=r[c]})}return i},interpolation:{escapeValue:!0,format:s=>s,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Dh=s=>{var i,r;return Se(s.ns)&&(s.ns=[s.ns]),Se(s.fallbackLng)&&(s.fallbackLng=[s.fallbackLng]),Se(s.fallbackNS)&&(s.fallbackNS=[s.fallbackNS]),((r=(i=s.supportedLngs)==null?void 0:i.indexOf)==null?void 0:r.call(i,"cimode"))<0&&(s.supportedLngs=s.supportedLngs.concat(["cimode"])),typeof s.initImmediate=="boolean"&&(s.initAsync=s.initImmediate),s},ii=()=>{},G1=s=>{Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach(r=>{typeof s[r]=="function"&&(s[r]=s[r].bind(s))})};class Dl extends yi{constructor(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Dh(i),this.services={},this.logger=ca,this.modules={external:[]},G1(this),r&&!this.isInitialized&&!i.isClone){if(!this.options.initAsync)return this.init(i,r),this;setTimeout(()=>{this.init(i,r)},0)}}init(){var i=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(c=r,r={}),r.defaultNS==null&&r.ns&&(Se(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const d=zh();this.options={...d,...this.options,...Dh(r)},this.options.interpolation={...d.interpolation,...this.options.interpolation},r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const f=y=>y?typeof y=="function"?new y:y:null;if(!this.options.isClone){this.modules.logger?ca.init(f(this.modules.logger),this.options):ca.init(null,this.options);let y;this.modules.formatter?y=this.modules.formatter:y=B1;const j=new Ah(this.options);this.store=new Eh(this.options.resources,this.options);const v=this.services;v.logger=ca,v.resourceStore=this.store,v.languageUtils=j,v.pluralResolver=new L1(j,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),y&&(!this.options.interpolation.format||this.options.interpolation.format===d.interpolation.format)&&(v.formatter=f(y),v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new _1(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new q1(f(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",function(T){for(var S=arguments.length,E=new Array(S>1?S-1:0),O=1;O<S;O++)E[O-1]=arguments[O];i.emit(T,...E)}),this.modules.languageDetector&&(v.languageDetector=f(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=f(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new hi(this.services,this.options),this.translator.on("*",function(T){for(var S=arguments.length,E=new Array(S>1?S-1:0),O=1;O<S;O++)E[O-1]=arguments[O];i.emit(T,...E)}),this.modules.external.forEach(T=>{T.init&&T.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 i.store[y](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(y=>{this[y]=function(){return i.store[y](...arguments),i}});const g=Rl(),h=()=>{const y=(j,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(j,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?h():setTimeout(h,0),g}loadResources(i){var f,m;let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ii;const d=Se(i)?i:this.language;if(typeof i=="function"&&(c=i),!this.options.resources||this.options.partialBundledLanguages){if((d==null?void 0:d.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return c();const p=[],g=h=>{if(!h||h==="cimode")return;this.services.languageUtils.toResolveHierarchy(h).forEach(j=>{j!=="cimode"&&p.indexOf(j)<0&&p.push(j)})};d?g(d):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(y=>g(y)),(m=(f=this.options.preload)==null?void 0:f.forEach)==null||m.call(f,h=>g(h)),this.services.backendConnector.load(p,this.options.ns,h=>{!h&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),c(h)})}else c(null)}reloadResources(i,r,c){const d=Rl();return typeof i=="function"&&(c=i,i=void 0),typeof r=="function"&&(c=r,r=void 0),i||(i=this.languages),r||(r=this.options.ns),c||(c=ii),this.services.backendConnector.reload(i,r,f=>{d.resolve(),c(f)}),d}use(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&_g.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}setResolvedLanguage(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(let r=0;r<this.languages.length;r++){const c=this.languages[r];if(!(["cimode","dev"].indexOf(c)>-1)&&this.store.hasLanguageSomeTranslations(c)){this.resolvedLanguage=c;break}}}changeLanguage(i,r){var c=this;this.isLanguageChangingTo=i;const d=Rl();this.emit("languageChanging",i);const f=g=>{this.language=g,this.languages=this.services.languageUtils.toResolveHierarchy(g),this.resolvedLanguage=void 0,this.setResolvedLanguage(g)},m=(g,h)=>{h?(f(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,d.resolve(function(){return c.t(...arguments)}),r&&r(g,function(){return c.t(...arguments)})},p=g=>{var y,j;!i&&!g&&this.services.languageDetector&&(g=[]);const h=Se(g)?g:this.services.languageUtils.getBestMatchFromCodes(g);h&&(this.language||f(h),this.translator.language||this.translator.changeLanguage(h),(j=(y=this.services.languageDetector)==null?void 0:y.cacheUserLanguage)==null||j.call(y,h)),this.loadResources(h,v=>{m(v,h)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?p(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(p):this.services.languageDetector.detect(p):p(i),d}getFixedT(i,r,c){var d=this;const f=function(m,p){let g;if(typeof p!="object"){for(var h=arguments.length,y=new Array(h>2?h-2:0),j=2;j<h;j++)y[j-2]=arguments[j];g=d.options.overloadTranslationOptionHandler([m,p].concat(y))}else g={...p};g.lng=g.lng||f.lng,g.lngs=g.lngs||f.lngs,g.ns=g.ns||f.ns,g.keyPrefix!==""&&(g.keyPrefix=g.keyPrefix||c||f.keyPrefix);const v=d.options.keySeparator||".";let T;return g.keyPrefix&&Array.isArray(m)?T=m.map(S=>`${g.keyPrefix}${v}${S}`):T=g.keyPrefix?`${g.keyPrefix}${v}${m}`:m,d.t(T,g)};return Se(i)?f.lng=i:f.lngs=i,f.ns=r,f.keyPrefix=c,f}t(){var d;for(var i=arguments.length,r=new Array(i),c=0;c<i;c++)r[c]=arguments[c];return(d=this.translator)==null?void 0:d.translate(...r)}exists(){var d;for(var i=arguments.length,r=new Array(i),c=0;c<i;c++)r[c]=arguments[c];return(d=this.translator)==null?void 0:d.exists(...r)}setDefaultNamespace(i){this.options.defaultNS=i}hasLoadedNamespace(i){let r=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=r.lng||this.resolvedLanguage||this.languages[0],d=this.options?this.options.fallbackLng:!1,f=this.languages[this.languages.length-1];if(c.toLowerCase()==="cimode")return!0;const m=(p,g)=>{const h=this.services.backendConnector.state[`${p}|${g}`];return h===-1||h===0||h===2};if(r.precheck){const p=r.precheck(this,m);if(p!==void 0)return p}return!!(this.hasResourceBundle(c,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||m(c,i)&&(!d||m(f,i)))}loadNamespaces(i,r){const c=Rl();return this.options.ns?(Se(i)&&(i=[i]),i.forEach(d=>{this.options.ns.indexOf(d)<0&&this.options.ns.push(d)}),this.loadResources(d=>{c.resolve(),r&&r(d)}),c):(r&&r(),Promise.resolve())}loadLanguages(i,r){const c=Rl();Se(i)&&(i=[i]);const d=this.options.preload||[],f=i.filter(m=>d.indexOf(m)<0&&this.services.languageUtils.isSupportedCode(m));return f.length?(this.options.preload=d.concat(f),this.loadResources(m=>{c.resolve(),r&&r(m)}),c):(r&&r(),Promise.resolve())}dir(i){var d,f;if(i||(i=this.resolvedLanguage||(((d=this.languages)==null?void 0:d.length)>0?this.languages[0]:this.language)),!i)return"rtl";const r=["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=((f=this.services)==null?void 0:f.languageUtils)||new Ah(zh());return r.indexOf(c.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new Dl(i,r)}cloneInstance(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ii;const c=i.forkResourceStore;c&&delete i.forkResourceStore;const d={...this.options,...i,isClone:!0},f=new Dl(d);if((i.debug!==void 0||i.prefix!==void 0)&&(f.logger=f.logger.clone(i)),["store","services","language"].forEach(p=>{f[p]=this[p]}),f.services={...this.services},f.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},c){const p=Object.keys(this.store.data).reduce((g,h)=>(g[h]={...this.store.data[h]},Object.keys(g[h]).reduce((y,j)=>(y[j]={...g[h][j]},y),{})),{});f.store=new Eh(p,d),f.services.resourceStore=f.store}return f.translator=new hi(f.services,d),f.translator.on("*",function(p){for(var g=arguments.length,h=new Array(g>1?g-1:0),y=1;y<g;y++)h[y-1]=arguments[y];f.emit(p,...h)}),f.init(d,r),f.translator.options=d,f.translator.backendConnector.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},f}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const xt=Dl.createInstance();xt.createInstance=Dl.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:$1,forEach:K1}=[];function Y1(s){return K1.call($1.call(arguments,1),i=>{if(i)for(const r in i)s[r]===void 0&&(s[r]=i[r])}),s}function X1(s){return typeof s!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(r=>r.test(s))}const Uh=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Q1=function(s,i){const c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},d=encodeURIComponent(i);let f=`${s}=${d}`;if(c.maxAge>0){const m=c.maxAge-0;if(Number.isNaN(m))throw new Error("maxAge should be a Number");f+=`; Max-Age=${Math.floor(m)}`}if(c.domain){if(!Uh.test(c.domain))throw new TypeError("option domain is invalid");f+=`; Domain=${c.domain}`}if(c.path){if(!Uh.test(c.path))throw new TypeError("option path is invalid");f+=`; Path=${c.path}`}if(c.expires){if(typeof c.expires.toUTCString!="function")throw new TypeError("option expires is invalid");f+=`; Expires=${c.expires.toUTCString()}`}if(c.httpOnly&&(f+="; HttpOnly"),c.secure&&(f+="; Secure"),c.sameSite)switch(typeof c.sameSite=="string"?c.sameSite.toLowerCase():c.sameSite){case!0:f+="; SameSite=Strict";break;case"lax":f+="; SameSite=Lax";break;case"strict":f+="; SameSite=Strict";break;case"none":f+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return c.partitioned&&(f+="; Partitioned"),f},Lh={create(s,i,r,c){let d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(d.expires=new Date,d.expires.setTime(d.expires.getTime()+r*60*1e3)),c&&(d.domain=c),document.cookie=Q1(s,encodeURIComponent(i),d)},read(s){const i=`${s}=`,r=document.cookie.split(";");for(let c=0;c<r.length;c++){let d=r[c];for(;d.charAt(0)===" ";)d=d.substring(1,d.length);if(d.indexOf(i)===0)return d.substring(i.length,d.length)}return null},remove(s){this.create(s,"",-1)}};var P1={name:"cookie",lookup(s){let{lookupCookie:i}=s;if(i&&typeof document<"u")return Lh.read(i)||void 0},cacheUserLanguage(s,i){let{lookupCookie:r,cookieMinutes:c,cookieDomain:d,cookieOptions:f}=i;r&&typeof document<"u"&&Lh.create(r,s,c,d,f)}},Z1={name:"querystring",lookup(s){var c;let{lookupQuerystring:i}=s,r;if(typeof window<"u"){let{search:d}=window.location;!window.location.search&&((c=window.location.hash)==null?void 0:c.indexOf("?"))>-1&&(d=window.location.hash.substring(window.location.hash.indexOf("?")));const m=d.substring(1).split("&");for(let p=0;p<m.length;p++){const g=m[p].indexOf("=");g>0&&m[p].substring(0,g)===i&&(r=m[p].substring(g+1))}}return r}};let ws=null;const _h=()=>{if(ws!==null)return ws;try{if(ws=typeof window<"u"&&window.localStorage!==null,!ws)return!1;const s="i18next.translate.boo";window.localStorage.setItem(s,"foo"),window.localStorage.removeItem(s)}catch{ws=!1}return ws};var F1={name:"localStorage",lookup(s){let{lookupLocalStorage:i}=s;if(i&&_h())return window.localStorage.getItem(i)||void 0},cacheUserLanguage(s,i){let{lookupLocalStorage:r}=i;r&&_h()&&window.localStorage.setItem(r,s)}};let js=null;const Hh=()=>{if(js!==null)return js;try{if(js=typeof window<"u"&&window.sessionStorage!==null,!js)return!1;const s="i18next.translate.boo";window.sessionStorage.setItem(s,"foo"),window.sessionStorage.removeItem(s)}catch{js=!1}return js};var J1={name:"sessionStorage",lookup(s){let{lookupSessionStorage:i}=s;if(i&&Hh())return window.sessionStorage.getItem(i)||void 0},cacheUserLanguage(s,i){let{lookupSessionStorage:r}=i;r&&Hh()&&window.sessionStorage.setItem(r,s)}},I1={name:"navigator",lookup(s){const i=[];if(typeof navigator<"u"){const{languages:r,userLanguage:c,language:d}=navigator;if(r)for(let f=0;f<r.length;f++)i.push(r[f]);c&&i.push(c),d&&i.push(d)}return i.length>0?i:void 0}},W1={name:"htmlTag",lookup(s){let{htmlTag:i}=s,r;const c=i||(typeof document<"u"?document.documentElement:null);return c&&typeof c.getAttribute=="function"&&(r=c.getAttribute("lang")),r}},e2={name:"path",lookup(s){var d;let{lookupFromPathIndex:i}=s;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(d=r[typeof i=="number"?i:0])==null?void 0:d.replace("/",""):void 0}},t2={name:"subdomain",lookup(s){var d,f;let{lookupFromSubdomainIndex:i}=s;const r=typeof i=="number"?i+1:1,c=typeof window<"u"&&((f=(d=window.location)==null?void 0:d.hostname)==null?void 0:f.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(c)return c[r]}};let Hg=!1;try{document.cookie,Hg=!0}catch{}const Bg=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Hg||Bg.splice(1,1);const a2=()=>({order:Bg,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:s=>s});class Vg{constructor(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(i,r)}init(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=i,this.options=Y1(r,this.options||{},a2()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=d=>d.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=c,this.addDetector(P1),this.addDetector(Z1),this.addDetector(F1),this.addDetector(J1),this.addDetector(I1),this.addDetector(W1),this.addDetector(e2),this.addDetector(t2)}addDetector(i){return this.detectors[i.name]=i,this}detect(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return i.forEach(c=>{if(this.detectors[c]){let d=this.detectors[c].lookup(this.options);d&&typeof d=="string"&&(d=[d]),d&&(r=r.concat(d))}}),r=r.filter(c=>c!=null&&!X1(c)).map(c=>this.options.convertDetectedLanguage(c)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(i)>-1||r.forEach(c=>{this.detectors[c]&&this.detectors[c].cacheUserLanguage(i,this.options)}))}}Vg.type="languageDetector";const n2={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"},s2={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..."},l2={viewProfile:"View profile",userCenter:"User Center"},r2={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"},i2={label:"WeChat",title:"Connect via WeChat",qrCodeAlt:"WeChat QR Code",scanMessage:"Scan this QR code to connect with us on WeChat"},o2={label:"Discord",title:"Join our Discord server",community:"Join our growing community on Discord for support, discussions, and updates!"},c2={title:"Theme",light:"Light",dark:"Dark",system:"System"},u2={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"},d2={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",confirmVariables:"Confirm Variable Configuration",variablesDetected:"Variables detected in configuration. Please confirm these variables are properly configured:",detectedVariables:"Detected Variables",confirmVariablesMessage:"Please ensure these variables are properly defined in your runtime environment. Continue adding server?",confirmAndAdd:"Confirm and Add",openapi:{inputMode:"Input Mode",inputModeUrl:"Specification URL",inputModeSchema:"JSON Schema",specUrl:"OpenAPI Specification URL",schema:"OpenAPI JSON Schema",schemaHelp:"Paste your complete OpenAPI JSON schema here",security:"Security Type",securityNone:"None",securityApiKey:"API Key",securityHttp:"HTTP Authentication",securityOAuth2:"OAuth 2.0",securityOpenIdConnect:"OpenID Connect",apiKeyConfig:"API Key Configuration",apiKeyName:"Header/Parameter Name",apiKeyIn:"Location",apiKeyValue:"API Key Value",httpAuthConfig:"HTTP Authentication Configuration",httpScheme:"Authentication Scheme",httpCredentials:"Credentials",oauth2Config:"OAuth 2.0 Configuration",oauth2Token:"Access Token",openIdConnectConfig:"OpenID Connect Configuration",openIdConnectUrl:"Discovery URL",openIdConnectToken:"ID Token"}},f2={online:"Online",offline:"Offline",connecting:"Connecting"},m2={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"},h2={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",confirm:"Confirm"},g2={dashboard:"Dashboard",servers:"Servers",groups:"Groups",settings:"Settings",changePassword:"Change Password",market:"Market",logs:"Logs"},p2={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"}},x2={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"},y2={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"},b2={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",confirmVariablesMessage:"Please ensure these variables are properly defined in your runtime environment. Continue installing server?",confirmAndInstall:"Confirm and Install"},v2={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}}"},w2={enableGlobalRoute:"Enable Global Route",enableGlobalRouteDescription:"Allow connections to /sse endpoint without specifying a group ID",enableGroupNameRoute:"Enable Group Name Route",enableGroupNameRouteDescription:"Allow connections to /sse endpoint using group names instead of just group IDs",enableBearerAuth:"Enable Bearer Authentication",enableBearerAuthDescription:"Require bearer token authentication for MCP requests",bearerAuthKey:"Bearer Authentication Key",bearerAuthKeyDescription:"The authentication key that will be required in the Bearer token",bearerAuthKeyPlaceholder:"Enter bearer authentication key",skipAuth:"Skip Authentication",skipAuthDescription:"Bypass login requirement for frontend and API access (DEFAULT OFF for security)",pythonIndexUrl:"Python Package Repository URL",pythonIndexUrlDescription:"Set UV_DEFAULT_INDEX environment variable for Python package installation",pythonIndexUrlPlaceholder:"e.g. https://pypi.org/simple",npmRegistry:"NPM Registry URL",npmRegistryDescription:"Set npm_config_registry environment variable for NPM package installation",npmRegistryPlaceholder:"e.g. https://registry.npmjs.org/",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}}"},j2={upload:"Upload",uploadTitle:"Upload DXT Extension",dropFileHere:"Drop your .dxt file here",orClickToSelect:"or click to select from your computer",invalidFileType:"Please select a valid .dxt file",noFileSelected:"Please select a .dxt file to upload",uploading:"Uploading...",uploadFailed:"Failed to upload DXT file",installServer:"Install MCP Server from DXT",extensionInfo:"Extension Information",name:"Name",version:"Version",description:"Description",author:"Author",tools:"Tools",serverName:"Server Name",serverNamePlaceholder:"Enter a name for this server",install:"Install",installing:"Installing...",installFailed:"Failed to install server from DXT",serverExistsTitle:"Server Already Exists",serverExistsConfirm:"Server '{{serverName}}' already exists. Do you want to override it with the new version?",override:"Override"},S2={app:n2,about:s2,profile:l2,sponsor:r2,wechat:i2,discord:o2,theme:c2,auth:u2,server:d2,status:f2,errors:m2,common:h2,nav:g2,pages:p2,logs:x2,groups:y2,market:b2,tool:v2,settings:w2,dxt:j2},N2={title:"MCP Hub 控制面板",error:"错误",closeButton:"关闭",noServers:"没有可用的 MCP 服务器",loading:"加载中...",logout:"退出登录",profile:"个人资料",changePassword:"修改密码",toggleSidebar:"切换侧边栏",welcomeUser:"欢迎, {{username}}",name:"MCP Hub"},C2={title:"关于",versionInfo:"MCP Hub 版本: {{version}}",newVersion:"有新版本可用!",currentVersion:"当前版本",newVersionAvailable:"新版本 {{version}} 已发布",viewOnGitHub:"在 GitHub 上查看",checkForUpdates:"检查更新",checking:"检查更新中..."},E2={viewProfile:"查看个人中心",userCenter:"个人中心"},k2={label:"赞助",title:"支持项目",rewardAlt:"赞赏码",supportMessage:"通过捐赠支持 MCP Hub 的开发!",supportButton:"在 Ko-fi 上支持"},T2={label:"微信",title:"微信联系",qrCodeAlt:"微信二维码",scanMessage:"扫描二维码添加微信"},A2={label:"Discord",title:"加入我们的 Discord 服务器",community:"加入我们不断壮大的 Discord 社区,获取支持、参与讨论并了解最新动态!"},R2={title:"主题",light:"浅色",dark:"深色",system:"系统"},O2={login:"登录",loginTitle:"登录 MCP Hub",username:"用户名",password:"密码",loggingIn:"登录中...",emptyFields:"用户名和密码不能为空",loginFailed:"登录失败,请检查用户名和密码",loginError:"登录过程中出现错误",currentPassword:"当前密码",newPassword:"新密码",confirmPassword:"确认密码",passwordsNotMatch:"新密码与确认密码不一致",changePasswordSuccess:"密码修改成功",changePasswordError:"修改密码失败",changePassword:"修改密码",passwordChanged:"密码修改成功",passwordChangeError:"修改密码失败"},M2={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:"查看错误详情",confirmVariables:"确认变量配置",variablesDetected:"检测到配置中包含变量,请确认这些变量是否已正确配置:",detectedVariables:"检测到的变量",confirmVariablesMessage:"请确保这些变量在运行环境中已正确定义。是否继续添加服务器?",confirmAndAdd:"确认并添加",openapi:{inputMode:"输入模式",inputModeUrl:"规范 URL",inputModeSchema:"JSON 模式",specUrl:"OpenAPI 规范 URL",schema:"OpenAPI JSON 模式",schemaHelp:"请在此处粘贴完整的 OpenAPI JSON 模式",security:"安全类型",securityNone:"无",securityApiKey:"API 密钥",securityHttp:"HTTP 认证",securityOAuth2:"OAuth 2.0",securityOpenIdConnect:"OpenID Connect",apiKeyConfig:"API 密钥配置",apiKeyName:"请求头/参数名称",apiKeyIn:"位置",apiKeyValue:"API 密钥值",httpAuthConfig:"HTTP 认证配置",httpScheme:"认证方案",httpCredentials:"凭据",oauth2Config:"OAuth 2.0 配置",oauth2Token:"访问令牌",openIdConnectConfig:"OpenID Connect 配置",openIdConnectUrl:"发现 URL",openIdConnectToken:"ID 令牌"}},z2={online:"在线",offline:"离线",connecting:"连接中"},D2={general:"发生错误",network:"网络连接错误,请检查您的互联网连接",serverConnection:"无法连接到服务器,请检查服务器是否正在运行",serverAdd:"添加服务器失败,请检查服务器状态",serverUpdate:"编辑服务器 {{serverName}} 失败,请检查服务器状态",serverFetch:"获取服务器数据失败,请稍后重试",initialStartup:"服务器可能正在启动中。首次启动可能需要一些时间,请耐心等候...",serverInstall:"安装服务器失败",failedToFetchSettings:"获取设置失败",failedToUpdateSystemConfig:"更新系统配置失败",failedToUpdateRouteConfig:"更新路由配置失败",failedToUpdateSmartRoutingConfig:"更新智能路由配置失败"},U2={processing:"处理中...",save:"保存",cancel:"取消",refresh:"刷新",create:"创建",submitting:"提交中...",delete:"删除",remove:"移除",copy:"复制",copySuccess:"已复制到剪贴板",copyFailed:"复制失败",close:"关闭",confirm:"确认"},L2={dashboard:"仪表盘",servers:"服务器",settings:"设置",changePassword:"修改密码",groups:"分组",market:"市场",logs:"日志"},_2={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:"系统日志"}},H2={filters:"筛选",search:"搜索日志...",autoScroll:"自动滚动",clearLogs:"清除日志",loading:"加载日志中...",noLogs:"暂无日志。",noMatch:"没有匹配当前筛选条件的日志。",mainProcess:"主进程",childProcess:"子进程",main:"主",child:"子"},B2={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}} 台服务器"},V2={title:"服务器市场",official:"官方",by:"作者",unknown:"未知",tools:"工具",search:"搜索",searchPlaceholder:"搜索服务器名称、分类或标签",clearFilters:"清除",clearCategoryFilter:"",clearTagFilter:"",categories:"分类",tags:"标签",showTags:"显示标签",hideTags:"隐藏标签",moreTags:"",noServers:"未找到匹配的服务器",backToList:"返回列表",install:"安装",installing:"安装中...",installed:"已安装",installServer:"安装服务器: {{name}}",installSuccess:"服务器 {{serverName}} 安装成功",author:"作者",license:"许可证",repository:"代码仓库",examples:"示例",arguments:"参数",argumentName:"名称",description:"描述",required:"必填",example:"示例",viewSchema:"查看结构",fetchError:"获取服务器市场数据失败",serverNotFound:"未找到服务器",searchError:"搜索服务器失败",filterError:"按分类筛选服务器失败",tagFilterError:"按标签筛选服务器失败",noInstallationMethod:"该服务器没有可用的安装方法",showing:"显示 {{from}}-{{to}}/{{total}} 个服务器",perPage:"每页显示",confirmVariablesMessage:"请确保这些变量在运行环境中已正确定义。是否继续安装服务器?",confirmAndInstall:"确认并安装"},q2={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}}"},G2={enableGlobalRoute:"启用全局路由",enableGlobalRouteDescription:"允许不指定组 ID 就连接到 /sse 端点",enableGroupNameRoute:"启用组名路由",enableGroupNameRouteDescription:"允许使用组名而不仅仅是组 ID 连接到 /sse 端点",enableBearerAuth:"启用 Bearer 认证",enableBearerAuthDescription:"对 MCP 请求启用 Bearer 令牌认证",bearerAuthKey:"Bearer 认证密钥",bearerAuthKeyDescription:"Bearer 令牌中需要携带的认证密钥",bearerAuthKeyPlaceholder:"请输入 Bearer 认证密钥",skipAuth:"免登录开关",skipAuthDescription:"跳过前端和 API 访问的登录要求(默认关闭确保安全性)",pythonIndexUrl:"Python 包仓库地址",pythonIndexUrlDescription:"设置 UV_DEFAULT_INDEX 环境变量,用于 Python 包安装",pythonIndexUrlPlaceholder:"例如: https://mirrors.aliyun.com/pypi/simple",npmRegistry:"NPM 仓库地址",npmRegistryDescription:"设置 npm_config_registry 环境变量,用于 NPM 包安装",npmRegistryPlaceholder:"例如: https://registry.npmmirror.com/",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={upload:"上传",uploadTitle:"上传 DXT 扩展",dropFileHere:"将 .dxt 文件拖拽到此处",orClickToSelect:"或点击从计算机选择",invalidFileType:"请选择有效的 .dxt 文件",noFileSelected:"请选择要上传的 .dxt 文件",uploading:"上传中...",uploadFailed:"上传 DXT 文件失败",installServer:"从 DXT 安装 MCP 服务器",extensionInfo:"扩展信息",name:"名称",version:"版本",description:"描述",author:"作者",tools:"工具",serverName:"服务器名称",serverNamePlaceholder:"为此服务器输入名称",install:"安装",installing:"安装中...",installFailed:"从 DXT 安装服务器失败",serverExistsTitle:"服务器已存在",serverExistsConfirm:"服务器 '{{serverName}}' 已存在。是否要用新版本覆盖它?",override:"覆盖"},K2={app:N2,about:C2,profile:E2,sponsor:k2,wechat:T2,discord:A2,theme:R2,auth:O2,server:M2,status:z2,errors:D2,common:U2,nav:L2,pages:_2,logs:H2,groups:B2,market:V2,tool:q2,settings:G2,dxt:$2};xt.use(Vg).use(wv).init({resources:{en:{translation:S2},zh:{translation:K2}},fallbackLng:"en",debug:!1,defaultNS:"translation",interpolation:{escapeValue:!1},detection:{order:["localStorage","cookie","htmlTag","navigator"],caches:["localStorage","cookie"]}});async function Y2(){try{console.log("Loading runtime configuration...");const s=await Uy();console.log("Runtime configuration loaded:",s),window.__MCPHUB_CONFIG__=s,lh.createRoot(document.getElementById("root")).render(l.jsx(Bc.StrictMode,{children:l.jsx(wh,{})}))}catch(s){console.error("Failed to initialize app:",s),console.log("Starting app with default configuration..."),window.__MCPHUB_CONFIG__={basePath:"",version:"dev",name:"mcphub"},lh.createRoot(document.getElementById("root")).render(l.jsx(Bc.StrictMode,{children:l.jsx(wh,{})}))}}Y2();
|
|
187
|
+
//# sourceMappingURL=index-BjnGlIAs.js.map
|