@samanhappy/mcphub 0.7.2 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/index.js +20 -1
- package/dist/config/index.js.map +1 -1
- package/dist/controllers/serverController.js +32 -0
- package/dist/controllers/serverController.js.map +1 -1
- package/dist/controllers/toolController.js +50 -0
- package/dist/controllers/toolController.js.map +1 -0
- package/dist/db/connection.js +22 -8
- package/dist/db/connection.js.map +1 -1
- package/dist/routes/index.js +3 -0
- package/dist/routes/index.js.map +1 -1
- package/dist/services/mcpService.js +34 -11
- package/dist/services/mcpService.js.map +1 -1
- package/dist/services/sseService.js +1 -1
- package/dist/utils/path.js +2 -1
- package/dist/utils/path.js.map +1 -1
- package/frontend/dist/assets/index-3z3kqnGQ.js +168 -0
- package/frontend/dist/assets/index-3z3kqnGQ.js.map +1 -0
- package/frontend/dist/assets/index-CGqWyDse.css +1 -0
- package/frontend/dist/index.html +2 -2
- package/package.json +1 -1
- package/frontend/dist/assets/index-BrGMGUbP.js +0 -148
- package/frontend/dist/assets/index-BrGMGUbP.js.map +0 -1
- package/frontend/dist/assets/index-D9p3VMBc.css +0 -1
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))o(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"&&o(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 o(d){if(d.ep)return;d.ep=!0;const f=r(d);fetch(d.href,f)}})();function Em(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var ou={exports:{}},ns={};/**
|
|
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 Lh;function $p(){if(Lh)return ns;Lh=1;var l=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function r(o,d,f){var m=null;if(f!==void 0&&(m=""+f),d.key!==void 0&&(m=""+d.key),"key"in d){f={};for(var y in d)y!=="key"&&(f[y]=d[y])}else f=d;return d=f.ref,{$$typeof:l,type:o,key:m,ref:d!==void 0?d:null,props:f}}return ns.Fragment=s,ns.jsx=r,ns.jsxs=r,ns}var _h;function Qp(){return _h||(_h=1,ou.exports=$p()),ou.exports}var c=Qp(),uu={exports:{}},ye={};/**
|
|
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 Hh;function Xp(){if(Hh)return ye;Hh=1;var l=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),m=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),w=Symbol.iterator;function b(E){return E===null||typeof E!="object"?null:(E=w&&E[w]||E["@@iterator"],typeof E=="function"?E:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,C={};function A(E,Q,ee){this.props=E,this.context=Q,this.refs=C,this.updater=ee||R}A.prototype.isReactComponent={},A.prototype.setState=function(E,Q){if(typeof E!="object"&&typeof E!="function"&&E!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,E,Q,"setState")},A.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function z(){}z.prototype=A.prototype;function T(E,Q,ee){this.props=E,this.context=Q,this.refs=C,this.updater=ee||R}var D=T.prototype=new z;D.constructor=T,N(D,A.prototype),D.isPureReactComponent=!0;var q=Array.isArray,Y={H:null,A:null,T:null,S:null,V:null},W=Object.prototype.hasOwnProperty;function H(E,Q,ee,Z,te,ve){return ee=ve.ref,{$$typeof:l,type:E,key:Q,ref:ee!==void 0?ee:null,props:ve}}function O(E,Q){return H(E.type,Q,void 0,void 0,void 0,E.props)}function J(E){return typeof E=="object"&&E!==null&&E.$$typeof===l}function re(E){var Q={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(ee){return Q[ee]})}var de=/\/+/g;function me(E,Q){return typeof E=="object"&&E!==null&&E.key!=null?re(""+E.key):Q.toString(36)}function ke(){}function oe(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(ke,ke):(E.status="pending",E.then(function(Q){E.status==="pending"&&(E.status="fulfilled",E.value=Q)},function(Q){E.status==="pending"&&(E.status="rejected",E.reason=Q)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function xe(E,Q,ee,Z,te){var ve=typeof E;(ve==="undefined"||ve==="boolean")&&(E=null);var F=!1;if(E===null)F=!0;else switch(ve){case"bigint":case"string":case"number":F=!0;break;case"object":switch(E.$$typeof){case l:case s:F=!0;break;case v:return F=E._init,xe(F(E._payload),Q,ee,Z,te)}}if(F)return te=te(E),F=Z===""?"."+me(E,0):Z,q(te)?(ee="",F!=null&&(ee=F.replace(de,"$&/")+"/"),xe(te,Q,ee,"",function(ce){return ce})):te!=null&&(J(te)&&(te=O(te,ee+(te.key==null||E&&E.key===te.key?"":(""+te.key).replace(de,"$&/")+"/")+F)),Q.push(te)),1;F=0;var I=Z===""?".":Z+":";if(q(E))for(var ae=0;ae<E.length;ae++)Z=E[ae],ve=I+me(Z,ae),F+=xe(Z,Q,ee,ve,te);else if(ae=b(E),typeof ae=="function")for(E=ae.call(E),ae=0;!(Z=E.next()).done;)Z=Z.value,ve=I+me(Z,ae++),F+=xe(Z,Q,ee,ve,te);else if(ve==="object"){if(typeof E.then=="function")return xe(oe(E),Q,ee,Z,te);throw Q=String(E),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return F}function G(E,Q,ee){if(E==null)return E;var Z=[],te=0;return xe(E,Z,"","",function(ve){return Q.call(ee,ve,te++)}),Z}function V(E){if(E._status===-1){var Q=E._result;Q=Q(),Q.then(function(ee){(E._status===0||E._status===-1)&&(E._status=1,E._result=ee)},function(ee){(E._status===0||E._status===-1)&&(E._status=2,E._result=ee)}),E._status===-1&&(E._status=0,E._result=Q)}if(E._status===1)return E._result.default;throw E._result}var $=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof E=="object"&&E!==null&&typeof E.message=="string"?String(E.message):String(E),error:E});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)};function ue(){}return ye.Children={map:G,forEach:function(E,Q,ee){G(E,function(){Q.apply(this,arguments)},ee)},count:function(E){var Q=0;return G(E,function(){Q++}),Q},toArray:function(E){return G(E,function(Q){return Q})||[]},only:function(E){if(!J(E))throw Error("React.Children.only expected to receive a single React element child.");return E}},ye.Component=A,ye.Fragment=r,ye.Profiler=d,ye.PureComponent=T,ye.StrictMode=o,ye.Suspense=h,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,ye.__COMPILER_RUNTIME={__proto__:null,c:function(E){return Y.H.useMemoCache(E)}},ye.cache=function(E){return function(){return E.apply(null,arguments)}},ye.cloneElement=function(E,Q,ee){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var Z=N({},E.props),te=E.key,ve=void 0;if(Q!=null)for(F in Q.ref!==void 0&&(ve=void 0),Q.key!==void 0&&(te=""+Q.key),Q)!W.call(Q,F)||F==="key"||F==="__self"||F==="__source"||F==="ref"&&Q.ref===void 0||(Z[F]=Q[F]);var F=arguments.length-2;if(F===1)Z.children=ee;else if(1<F){for(var I=Array(F),ae=0;ae<F;ae++)I[ae]=arguments[ae+2];Z.children=I}return H(E.type,te,void 0,void 0,ve,Z)},ye.createContext=function(E){return E={$$typeof:m,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:f,_context:E},E},ye.createElement=function(E,Q,ee){var Z,te={},ve=null;if(Q!=null)for(Z in Q.key!==void 0&&(ve=""+Q.key),Q)W.call(Q,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(te[Z]=Q[Z]);var F=arguments.length-2;if(F===1)te.children=ee;else if(1<F){for(var I=Array(F),ae=0;ae<F;ae++)I[ae]=arguments[ae+2];te.children=I}if(E&&E.defaultProps)for(Z in F=E.defaultProps,F)te[Z]===void 0&&(te[Z]=F[Z]);return H(E,ve,void 0,void 0,null,te)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(E){return{$$typeof:y,render:E}},ye.isValidElement=J,ye.lazy=function(E){return{$$typeof:v,_payload:{_status:-1,_result:E},_init:V}},ye.memo=function(E,Q){return{$$typeof:g,type:E,compare:Q===void 0?null:Q}},ye.startTransition=function(E){var Q=Y.T,ee={};Y.T=ee;try{var Z=E(),te=Y.S;te!==null&&te(ee,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(ue,$)}catch(ve){$(ve)}finally{Y.T=Q}},ye.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},ye.use=function(E){return Y.H.use(E)},ye.useActionState=function(E,Q,ee){return Y.H.useActionState(E,Q,ee)},ye.useCallback=function(E,Q){return Y.H.useCallback(E,Q)},ye.useContext=function(E){return Y.H.useContext(E)},ye.useDebugValue=function(){},ye.useDeferredValue=function(E,Q){return Y.H.useDeferredValue(E,Q)},ye.useEffect=function(E,Q,ee){var Z=Y.H;if(typeof ee=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Z.useEffect(E,Q)},ye.useId=function(){return Y.H.useId()},ye.useImperativeHandle=function(E,Q,ee){return Y.H.useImperativeHandle(E,Q,ee)},ye.useInsertionEffect=function(E,Q){return Y.H.useInsertionEffect(E,Q)},ye.useLayoutEffect=function(E,Q){return Y.H.useLayoutEffect(E,Q)},ye.useMemo=function(E,Q){return Y.H.useMemo(E,Q)},ye.useOptimistic=function(E,Q){return Y.H.useOptimistic(E,Q)},ye.useReducer=function(E,Q,ee){return Y.H.useReducer(E,Q,ee)},ye.useRef=function(E){return Y.H.useRef(E)},ye.useState=function(E){return Y.H.useState(E)},ye.useSyncExternalStore=function(E,Q,ee){return Y.H.useSyncExternalStore(E,Q,ee)},ye.useTransition=function(){return Y.H.useTransition()},ye.version="19.1.0",ye}var Bh;function Ru(){return Bh||(Bh=1,uu.exports=Xp()),uu.exports}var S=Ru();const vu=Em(S);var cu={exports:{}},ls={},du={exports:{}},fu={};/**
|
|
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 Gh;function Zp(){return Gh||(Gh=1,function(l){function s(G,V){var $=G.length;G.push(V);e:for(;0<$;){var ue=$-1>>>1,E=G[ue];if(0<d(E,V))G[ue]=V,G[$]=E,$=ue;else break e}}function r(G){return G.length===0?null:G[0]}function o(G){if(G.length===0)return null;var V=G[0],$=G.pop();if($!==V){G[0]=$;e:for(var ue=0,E=G.length,Q=E>>>1;ue<Q;){var ee=2*(ue+1)-1,Z=G[ee],te=ee+1,ve=G[te];if(0>d(Z,$))te<E&&0>d(ve,Z)?(G[ue]=ve,G[te]=$,ue=te):(G[ue]=Z,G[ee]=$,ue=ee);else if(te<E&&0>d(ve,$))G[ue]=ve,G[te]=$,ue=te;else break e}}return V}function d(G,V){var $=G.sortIndex-V.sortIndex;return $!==0?$:G.id-V.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var m=Date,y=m.now();l.unstable_now=function(){return m.now()-y}}var h=[],g=[],v=1,w=null,b=3,R=!1,N=!1,C=!1,A=!1,z=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function q(G){for(var V=r(g);V!==null;){if(V.callback===null)o(g);else if(V.startTime<=G)o(g),V.sortIndex=V.expirationTime,s(h,V);else break;V=r(g)}}function Y(G){if(C=!1,q(G),!N)if(r(h)!==null)N=!0,W||(W=!0,me());else{var V=r(g);V!==null&&xe(Y,V.startTime-G)}}var W=!1,H=-1,O=5,J=-1;function re(){return A?!0:!(l.unstable_now()-J<O)}function de(){if(A=!1,W){var G=l.unstable_now();J=G;var V=!0;try{e:{N=!1,C&&(C=!1,T(H),H=-1),R=!0;var $=b;try{t:{for(q(G),w=r(h);w!==null&&!(w.expirationTime>G&&re());){var ue=w.callback;if(typeof ue=="function"){w.callback=null,b=w.priorityLevel;var E=ue(w.expirationTime<=G);if(G=l.unstable_now(),typeof E=="function"){w.callback=E,q(G),V=!0;break t}w===r(h)&&o(h),q(G)}else o(h);w=r(h)}if(w!==null)V=!0;else{var Q=r(g);Q!==null&&xe(Y,Q.startTime-G),V=!1}}break e}finally{w=null,b=$,R=!1}V=void 0}}finally{V?me():W=!1}}}var me;if(typeof D=="function")me=function(){D(de)};else if(typeof MessageChannel<"u"){var ke=new MessageChannel,oe=ke.port2;ke.port1.onmessage=de,me=function(){oe.postMessage(null)}}else me=function(){z(de,0)};function xe(G,V){H=z(function(){G(l.unstable_now())},V)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(G){G.callback=null},l.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<G?Math.floor(1e3/G):5},l.unstable_getCurrentPriorityLevel=function(){return b},l.unstable_next=function(G){switch(b){case 1:case 2:case 3:var V=3;break;default:V=b}var $=b;b=V;try{return G()}finally{b=$}},l.unstable_requestPaint=function(){A=!0},l.unstable_runWithPriority=function(G,V){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var $=b;b=G;try{return V()}finally{b=$}},l.unstable_scheduleCallback=function(G,V,$){var ue=l.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?ue+$:ue):$=ue,G){case 1:var E=-1;break;case 2:E=250;break;case 5:E=1073741823;break;case 4:E=1e4;break;default:E=5e3}return E=$+E,G={id:v++,callback:V,priorityLevel:G,startTime:$,expirationTime:E,sortIndex:-1},$>ue?(G.sortIndex=$,s(g,G),r(h)===null&&G===r(g)&&(C?(T(H),H=-1):C=!0,xe(Y,$-ue))):(G.sortIndex=E,s(h,G),N||R||(N=!0,W||(W=!0,me()))),G},l.unstable_shouldYield=re,l.unstable_wrapCallback=function(G){var V=b;return function(){var $=b;b=V;try{return G.apply(this,arguments)}finally{b=$}}}}(fu)),fu}var qh;function Pp(){return qh||(qh=1,du.exports=Zp()),du.exports}var hu={exports:{}},rt={};/**
|
|
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 Vh;function Jp(){if(Vh)return rt;Vh=1;var l=Ru();function s(h){var g="https://react.dev/errors/"+h;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)g+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+h+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={d:{f:r,r:function(){throw Error(s(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(h,g,v){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:w==null?null:""+w,children:h,containerInfo:g,implementation:v}}var m=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(h,g){if(h==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,rt.createPortal=function(h,g){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return f(h,g,null,v)},rt.flushSync=function(h){var g=m.T,v=o.p;try{if(m.T=null,o.p=2,h)return h()}finally{m.T=g,o.p=v,o.d.f()}},rt.preconnect=function(h,g){typeof h=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,o.d.C(h,g))},rt.prefetchDNS=function(h){typeof h=="string"&&o.d.D(h)},rt.preinit=function(h,g){if(typeof h=="string"&&g&&typeof g.as=="string"){var v=g.as,w=y(v,g.crossOrigin),b=typeof g.integrity=="string"?g.integrity:void 0,R=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;v==="style"?o.d.S(h,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:w,integrity:b,fetchPriority:R}):v==="script"&&o.d.X(h,{crossOrigin:w,integrity:b,fetchPriority:R,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},rt.preinitModule=function(h,g){if(typeof h=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var v=y(g.as,g.crossOrigin);o.d.M(h,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&o.d.M(h)},rt.preload=function(h,g){if(typeof h=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var v=g.as,w=y(v,g.crossOrigin);o.d.L(h,v,{crossOrigin:w,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},rt.preloadModule=function(h,g){if(typeof h=="string")if(g){var v=y(g.as,g.crossOrigin);o.d.m(h,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else o.d.m(h)},rt.requestFormReset=function(h){o.d.r(h)},rt.unstable_batchedUpdates=function(h,g){return h(g)},rt.useFormState=function(h,g,v){return m.H.useFormState(h,g,v)},rt.useFormStatus=function(){return m.H.useHostTransitionStatus()},rt.version="19.1.0",rt}var Yh;function Fp(){if(Yh)return hu.exports;Yh=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),hu.exports=Jp(),hu.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 Kh;function Wp(){if(Kh)return ls;Kh=1;var l=Pp(),s=Ru(),r=Fp();function o(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 y(e){if(f(e)!==e)throw Error(o(188))}function h(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,n=t;;){var i=a.return;if(i===null)break;var u=i.alternate;if(u===null){if(n=i.return,n!==null){a=n;continue}break}if(i.child===u.child){for(u=i.child;u;){if(u===a)return y(i),e;if(u===n)return y(i),t;u=u.sibling}throw Error(o(188))}if(a.return!==n.return)a=i,n=u;else{for(var p=!1,x=i.child;x;){if(x===a){p=!0,a=i,n=u;break}if(x===n){p=!0,n=i,a=u;break}x=x.sibling}if(!p){for(x=u.child;x;){if(x===a){p=!0,a=u,n=i;break}if(x===n){p=!0,n=u,a=i;break}x=x.sibling}if(!p)throw Error(o(189))}}if(a.alternate!==n)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,w=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),T=Symbol.for("react.consumer"),D=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),de=Symbol.iterator;function me(e){return e===null||typeof e!="object"?null:(e=de&&e[de]||e["@@iterator"],typeof e=="function"?e:null)}var ke=Symbol.for("react.client.reference");function oe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ke?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case A:return"Profiler";case C:return"StrictMode";case Y:return"Suspense";case W:return"SuspenseList";case J:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case D:return(e.displayName||"Context")+".Provider";case T:return(e._context.displayName||"Context")+".Consumer";case q:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return t=e.displayName||null,t!==null?t:oe(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return oe(e(t))}catch{}}return null}var xe=Array.isArray,G=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},ue=[],E=-1;function Q(e){return{current:e}}function ee(e){0>E||(e.current=ue[E],ue[E]=null,E--)}function Z(e,t){E++,ue[E]=e.current,e.current=t}var te=Q(null),ve=Q(null),F=Q(null),I=Q(null);function ae(e,t){switch(Z(F,t),Z(ve,e),Z(te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ch(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ch(t),e=dh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ee(te),Z(te,e)}function ce(){ee(te),ee(ve),ee(F)}function et(e){e.memoizedState!==null&&Z(I,e);var t=te.current,a=dh(t,e.type);t!==a&&(Z(ve,e),Z(te,a))}function ct(e){ve.current===e&&(ee(te),ee(ve)),I.current===e&&(ee(I),Wl._currentValue=$)}var pt=Object.prototype.hasOwnProperty,Ft=l.unstable_scheduleCallback,sl=l.unstable_cancelCallback,Ng=l.unstable_shouldYield,jg=l.unstable_requestPaint,Vt=l.unstable_now,Eg=l.unstable_getCurrentPriorityLevel,Yu=l.unstable_ImmediatePriority,Ku=l.unstable_UserBlockingPriority,xs=l.unstable_NormalPriority,Cg=l.unstable_LowPriority,$u=l.unstable_IdlePriority,kg=l.log,Ag=l.unstable_setDisableYieldValue,rl=null,yt=null;function pa(e){if(typeof kg=="function"&&Ag(e),yt&&typeof yt.setStrictMode=="function")try{yt.setStrictMode(rl,e)}catch{}}var xt=Math.clz32?Math.clz32:Og,Tg=Math.log,Rg=Math.LN2;function Og(e){return e>>>=0,e===0?32:31-(Tg(e)/Rg|0)|0}var vs=256,bs=4194304;function Va(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 Ss(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var i=0,u=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var x=n&134217727;return x!==0?(n=x&~u,n!==0?i=Va(n):(p&=x,p!==0?i=Va(p):a||(a=x&~e,a!==0&&(i=Va(a))))):(x=n&~u,x!==0?i=Va(x):p!==0?i=Va(p):a||(a=n&~e,a!==0&&(i=Va(a)))),i===0?0:t!==0&&t!==i&&(t&u)===0&&(u=i&-i,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:i}function il(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Mg(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 Qu(){var e=vs;return vs<<=1,(vs&4194048)===0&&(vs=256),e}function Xu(){var e=bs;return bs<<=1,(bs&62914560)===0&&(bs=4194304),e}function Jr(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ol(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function zg(e,t,a,n,i,u){var p=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var x=e.entanglements,j=e.expirationTimes,L=e.hiddenUpdates;for(a=p&~a;0<a;){var K=31-xt(a),P=1<<K;x[K]=0,j[K]=-1;var _=L[K];if(_!==null)for(L[K]=null,K=0;K<_.length;K++){var B=_[K];B!==null&&(B.lane&=-536870913)}a&=~P}n!==0&&Zu(e,n,0),u!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=u&~(p&~t))}function Zu(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-xt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&4194090}function Pu(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-xt(a),i=1<<n;i&t|e[n]&t&&(e[n]|=t),a&=~i}}function Fr(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 Wr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ju(){var e=V.p;return e!==0?e:(e=window.event,e===void 0?32:Rh(e.type))}function Dg(e,t){var a=V.p;try{return V.p=e,t()}finally{V.p=a}}var ya=Math.random().toString(36).slice(2),lt="__reactFiber$"+ya,dt="__reactProps$"+ya,cn="__reactContainer$"+ya,Ir="__reactEvents$"+ya,Ug="__reactListeners$"+ya,Lg="__reactHandles$"+ya,Fu="__reactResources$"+ya,ul="__reactMarker$"+ya;function ei(e){delete e[lt],delete e[dt],delete e[Ir],delete e[Ug],delete e[Lg]}function dn(e){var t=e[lt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[cn]||a[lt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=gh(e);e!==null;){if(a=e[lt])return a;e=gh(e)}return t}e=a,a=e.parentNode}return null}function fn(e){if(e=e[lt]||e[cn]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function cl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function hn(e){var t=e[Fu];return t||(t=e[Fu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Je(e){e[ul]=!0}var Wu=new Set,Iu={};function Ya(e,t){mn(e,t),mn(e+"Capture",t)}function mn(e,t){for(Iu[e]=t,e=0;e<t.length;e++)Wu.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]*$"),ec={},tc={};function Hg(e){return pt.call(tc,e)?!0:pt.call(ec,e)?!1:_g.test(e)?tc[e]=!0:(ec[e]=!0,!1)}function ws(e,t,a){if(Hg(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 Ns(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 Wt(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 ti,ac;function gn(e){if(ti===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);ti=t&&t[1]||"",ac=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+ti+e+ac}var ai=!1;function ni(e,t){if(!e||ai)return"";ai=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var P=function(){throw Error()};if(Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(B){var _=B}Reflect.construct(e,[],P)}else{try{P.call()}catch(B){_=B}e.call(P.prototype)}}else{try{throw Error()}catch(B){_=B}(P=e())&&typeof P.catch=="function"&&P.catch(function(){})}}catch(B){if(B&&_&&typeof B.stack=="string")return[B.stack,_.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=n.DetermineComponentFrameRoot(),p=u[0],x=u[1];if(p&&x){var j=p.split(`
|
|
44
|
-
`),L=x.split(`
|
|
45
|
-
`);for(i=n=0;n<j.length&&!j[n].includes("DetermineComponentFrameRoot");)n++;for(;i<L.length&&!L[i].includes("DetermineComponentFrameRoot");)i++;if(n===j.length||i===L.length)for(n=j.length-1,i=L.length-1;1<=n&&0<=i&&j[n]!==L[i];)i--;for(;1<=n&&0<=i;n--,i--)if(j[n]!==L[i]){if(n!==1||i!==1)do if(n--,i--,0>i||j[n]!==L[i]){var K=`
|
|
46
|
-
`+j[n].replace(" at new "," at ");return e.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",e.displayName)),K}while(1<=n&&0<=i);break}}}finally{ai=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?gn(a):""}function Bg(e){switch(e.tag){case 26:case 27:case 5:return gn(e.type);case 16:return gn("Lazy");case 13:return gn("Suspense");case 19:return gn("SuspenseList");case 0:case 15:return ni(e.type,!1);case 11:return ni(e.type.render,!1);case 1:return ni(e.type,!0);case 31:return gn("Activity");default:return""}}function nc(e){try{var t="";do t+=Bg(e),e=e.return;while(e);return t}catch(a){return`
|
|
47
|
-
Error generating stack: `+a.message+`
|
|
48
|
-
`+a.stack}}function Ct(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gg(e){var t=lc(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 i=a.get,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(p){n=""+p,u.call(this,p)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(p){n=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function js(e){e._valueTracker||(e._valueTracker=Gg(e))}function sc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=lc(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Es(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 kt(e){return e.replace(qg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function li(e,t,a,n,i,u,p,x){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ct(t)):e.value!==""+Ct(t)&&(e.value=""+Ct(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?si(e,p,Ct(t)):a!=null?si(e,p,Ct(a)):n!=null&&e.removeAttribute("value"),i==null&&u!=null&&(e.defaultChecked=!!u),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+Ct(x):e.removeAttribute("name")}function rc(e,t,a,n,i,u,p,x){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?""+Ct(a):"",t=t!=null?""+Ct(t):a,x||t===e.value||(e.value=t),e.defaultValue=t}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=x?e.checked:!!n,e.defaultChecked=!!n,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p)}function si(e,t,a){t==="number"&&Es(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function pn(e,t,a,n){if(e=e.options,t){t={};for(var i=0;i<a.length;i++)t["$"+a[i]]=!0;for(a=0;a<e.length;a++)i=t.hasOwnProperty("$"+e[a].value),e[a].selected!==i&&(e[a].selected=i),i&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Ct(a),t=null,i=0;i<e.length;i++){if(e[i].value===a){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ic(e,t,a){if(t!=null&&(t=""+Ct(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ct(a):""}function oc(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(xe(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Ct(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n)}function yn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Vg=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 uc(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||Vg.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function cc(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(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 i in t)n=t[i],t.hasOwnProperty(i)&&a[i]!==n&&uc(e,i,n)}else for(var u in t)t.hasOwnProperty(u)&&uc(e,u,t[u])}function ri(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 Yg=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Kg=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Cs(e){return Kg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var ii=null;function oi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xn=null,vn=null;function dc(e){var t=fn(e);if(t&&(e=t.stateNode)){var a=e[dt]||null;e:switch(e=t.stateNode,t.type){case"input":if(li(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="'+kt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var i=n[dt]||null;if(!i)throw Error(o(90));li(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&sc(n)}break e;case"textarea":ic(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&pn(e,!!a.multiple,t,!1)}}}var ui=!1;function fc(e,t,a){if(ui)return e(t,a);ui=!0;try{var n=e(t);return n}finally{if(ui=!1,(xn!==null||vn!==null)&&(dr(),xn&&(t=xn,e=vn,vn=xn=null,dc(t),e)))for(t=0;t<e.length;t++)dc(e[t])}}function dl(e,t){var a=e.stateNode;if(a===null)return null;var n=a[dt]||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(o(231,t,typeof a));return a}var It=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ci=!1;if(It)try{var fl={};Object.defineProperty(fl,"passive",{get:function(){ci=!0}}),window.addEventListener("test",fl,fl),window.removeEventListener("test",fl,fl)}catch{ci=!1}var xa=null,di=null,ks=null;function hc(){if(ks)return ks;var e,t=di,a=t.length,n,i="value"in xa?xa.value:xa.textContent,u=i.length;for(e=0;e<a&&t[e]===i[e];e++);var p=a-e;for(n=1;n<=p&&t[a-n]===i[u-n];n++);return ks=i.slice(e,1<n?1-n:void 0)}function As(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 Ts(){return!0}function mc(){return!1}function ft(e){function t(a,n,i,u,p){this._reactName=a,this._targetInst=i,this.type=n,this.nativeEvent=u,this.target=p,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(a=e[x],this[x]=a?a(u):u[x]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Ts:mc,this.isPropagationStopped=mc,this}return v(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=Ts)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ts)},persist:function(){},isPersistent:Ts}),t}var Ka={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rs=ft(Ka),hl=v({},Ka,{view:0,detail:0}),$g=ft(hl),fi,hi,ml,Os=v({},hl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gi,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!==ml&&(ml&&e.type==="mousemove"?(fi=e.screenX-ml.screenX,hi=e.screenY-ml.screenY):hi=fi=0,ml=e),fi)},movementY:function(e){return"movementY"in e?e.movementY:hi}}),gc=ft(Os),Qg=v({},Os,{dataTransfer:0}),Xg=ft(Qg),Zg=v({},hl,{relatedTarget:0}),mi=ft(Zg),Pg=v({},Ka,{animationName:0,elapsedTime:0,pseudoElement:0}),Jg=ft(Pg),Fg=v({},Ka,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Wg=ft(Fg),Ig=v({},Ka,{data:0}),pc=ft(Ig),e0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},t0={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},a0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function n0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=a0[e])?!!t[e]:!1}function gi(){return n0}var l0=v({},hl,{key:function(e){if(e.key){var t=e0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=As(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?t0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gi,charCode:function(e){return e.type==="keypress"?As(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?As(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),s0=ft(l0),r0=v({},Os,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yc=ft(r0),i0=v({},hl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gi}),o0=ft(i0),u0=v({},Ka,{propertyName:0,elapsedTime:0,pseudoElement:0}),c0=ft(u0),d0=v({},Os,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),f0=ft(d0),h0=v({},Ka,{newState:0,oldState:0}),m0=ft(h0),g0=[9,13,27,32],pi=It&&"CompositionEvent"in window,gl=null;It&&"documentMode"in document&&(gl=document.documentMode);var p0=It&&"TextEvent"in window&&!gl,xc=It&&(!pi||gl&&8<gl&&11>=gl),vc=" ",bc=!1;function Sc(e,t){switch(e){case"keyup":return g0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bn=!1;function y0(e,t){switch(e){case"compositionend":return wc(t);case"keypress":return t.which!==32?null:(bc=!0,vc);case"textInput":return e=t.data,e===vc&&bc?null:e;default:return null}}function x0(e,t){if(bn)return e==="compositionend"||!pi&&Sc(e,t)?(e=hc(),ks=di=xa=null,bn=!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 xc&&t.locale!=="ko"?null:t.data;default:return null}}var v0={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Nc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!v0[e.type]:t==="textarea"}function jc(e,t,a,n){xn?vn?vn.push(n):vn=[n]:xn=n,t=yr(t,"onChange"),0<t.length&&(a=new Rs("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var pl=null,yl=null;function b0(e){sh(e,0)}function Ms(e){var t=cl(e);if(sc(t))return e}function Ec(e,t){if(e==="change")return t}var Cc=!1;if(It){var yi;if(It){var xi="oninput"in document;if(!xi){var kc=document.createElement("div");kc.setAttribute("oninput","return;"),xi=typeof kc.oninput=="function"}yi=xi}else yi=!1;Cc=yi&&(!document.documentMode||9<document.documentMode)}function Ac(){pl&&(pl.detachEvent("onpropertychange",Tc),yl=pl=null)}function Tc(e){if(e.propertyName==="value"&&Ms(yl)){var t=[];jc(t,yl,e,oi(e)),fc(b0,t)}}function S0(e,t,a){e==="focusin"?(Ac(),pl=t,yl=a,pl.attachEvent("onpropertychange",Tc)):e==="focusout"&&Ac()}function w0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ms(yl)}function N0(e,t){if(e==="click")return Ms(t)}function j0(e,t){if(e==="input"||e==="change")return Ms(t)}function E0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vt=typeof Object.is=="function"?Object.is:E0;function xl(e,t){if(vt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var i=a[n];if(!pt.call(t,i)||!vt(e[i],t[i]))return!1}return!0}function Rc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Oc(e,t){var a=Rc(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=Rc(a)}}function Mc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Es(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=Es(e.document)}return t}function vi(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 C0=It&&"documentMode"in document&&11>=document.documentMode,Sn=null,bi=null,vl=null,Si=!1;function Dc(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Si||Sn==null||Sn!==Es(n)||(n=Sn,"selectionStart"in n&&vi(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}),vl&&xl(vl,n)||(vl=n,n=yr(bi,"onSelect"),0<n.length&&(t=new Rs("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=Sn)))}function $a(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var wn={animationend:$a("Animation","AnimationEnd"),animationiteration:$a("Animation","AnimationIteration"),animationstart:$a("Animation","AnimationStart"),transitionrun:$a("Transition","TransitionRun"),transitionstart:$a("Transition","TransitionStart"),transitioncancel:$a("Transition","TransitionCancel"),transitionend:$a("Transition","TransitionEnd")},wi={},Uc={};It&&(Uc=document.createElement("div").style,"AnimationEvent"in window||(delete wn.animationend.animation,delete wn.animationiteration.animation,delete wn.animationstart.animation),"TransitionEvent"in window||delete wn.transitionend.transition);function Qa(e){if(wi[e])return wi[e];if(!wn[e])return e;var t=wn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Uc)return wi[e]=t[a];return e}var Lc=Qa("animationend"),_c=Qa("animationiteration"),Hc=Qa("animationstart"),k0=Qa("transitionrun"),A0=Qa("transitionstart"),T0=Qa("transitioncancel"),Bc=Qa("transitionend"),Gc=new Map,Ni="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(" ");Ni.push("scrollEnd");function _t(e,t){Gc.set(e,t),Ya(t,[e])}var qc=new WeakMap;function At(e,t){if(typeof e=="object"&&e!==null){var a=qc.get(e);return a!==void 0?a:(t={value:e,source:t,stack:nc(t)},qc.set(e,t),t)}return{value:e,source:t,stack:nc(t)}}var Tt=[],Nn=0,ji=0;function zs(){for(var e=Nn,t=ji=Nn=0;t<e;){var a=Tt[t];Tt[t++]=null;var n=Tt[t];Tt[t++]=null;var i=Tt[t];Tt[t++]=null;var u=Tt[t];if(Tt[t++]=null,n!==null&&i!==null){var p=n.pending;p===null?i.next=i:(i.next=p.next,p.next=i),n.pending=i}u!==0&&Vc(a,i,u)}}function Ds(e,t,a,n){Tt[Nn++]=e,Tt[Nn++]=t,Tt[Nn++]=a,Tt[Nn++]=n,ji|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Ei(e,t,a,n){return Ds(e,t,a,n),Us(e)}function jn(e,t){return Ds(e,null,null,t),Us(e)}function Vc(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var i=!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||(i=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,i&&t!==null&&(i=31-xt(a),e=u.hiddenUpdates,n=e[i],n===null?e[i]=[t]:n.push(t),t.lane=a|536870912),u):null}function Us(e){if(50<Kl)throw Kl=0,Mo=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var En={};function R0(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 bt(e,t,a,n){return new R0(e,t,a,n)}function Ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ea(e,t){var a=e.alternate;return a===null?(a=bt(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 Yc(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 Ls(e,t,a,n,i,u){var p=0;if(n=e,typeof e=="function")Ci(e)&&(p=1);else if(typeof e=="string")p=Mp(e,a,te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case J:return e=bt(31,a,t,i),e.elementType=J,e.lanes=u,e;case N:return Xa(a.children,i,u,t);case C:p=8,i|=24;break;case A:return e=bt(12,a,t,i|2),e.elementType=A,e.lanes=u,e;case Y:return e=bt(13,a,t,i),e.elementType=Y,e.lanes=u,e;case W:return e=bt(19,a,t,i),e.elementType=W,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:case D:p=10;break e;case T:p=9;break e;case q:p=11;break e;case H:p=14;break e;case O:p=16,n=null;break e}p=29,a=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=bt(p,a,t,i),t.elementType=e,t.type=n,t.lanes=u,t}function Xa(e,t,a,n){return e=bt(7,e,n,t),e.lanes=a,e}function ki(e,t,a){return e=bt(6,e,null,t),e.lanes=a,e}function Ai(e,t,a){return t=bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Cn=[],kn=0,_s=null,Hs=0,Rt=[],Ot=0,Za=null,ta=1,aa="";function Pa(e,t){Cn[kn++]=Hs,Cn[kn++]=_s,_s=e,Hs=t}function Kc(e,t,a){Rt[Ot++]=ta,Rt[Ot++]=aa,Rt[Ot++]=Za,Za=e;var n=ta;e=aa;var i=32-xt(n)-1;n&=~(1<<i),a+=1;var u=32-xt(t)+i;if(30<u){var p=i-i%5;u=(n&(1<<p)-1).toString(32),n>>=p,i-=p,ta=1<<32-xt(t)+i|a<<i|n,aa=u+e}else ta=1<<u|a<<i|n,aa=e}function Ti(e){e.return!==null&&(Pa(e,1),Kc(e,1,0))}function Ri(e){for(;e===_s;)_s=Cn[--kn],Cn[kn]=null,Hs=Cn[--kn],Cn[kn]=null;for(;e===Za;)Za=Rt[--Ot],Rt[Ot]=null,aa=Rt[--Ot],Rt[Ot]=null,ta=Rt[--Ot],Rt[Ot]=null}var ot=null,qe=null,Re=!1,Ja=null,Yt=!1,Oi=Error(o(519));function Fa(e){var t=Error(o(418,""));throw wl(At(t,e)),Oi}function $c(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[lt]=e,t[dt]=n,a){case"dialog":je("cancel",t),je("close",t);break;case"iframe":case"object":case"embed":je("load",t);break;case"video":case"audio":for(a=0;a<Ql.length;a++)je(Ql[a],t);break;case"source":je("error",t);break;case"img":case"image":case"link":je("error",t),je("load",t);break;case"details":je("toggle",t);break;case"input":je("invalid",t),rc(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0),js(t);break;case"select":je("invalid",t);break;case"textarea":je("invalid",t),oc(t,n.value,n.defaultValue,n.children),js(t)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||uh(t.textContent,a)?(n.popover!=null&&(je("beforetoggle",t),je("toggle",t)),n.onScroll!=null&&je("scroll",t),n.onScrollEnd!=null&&je("scrollend",t),n.onClick!=null&&(t.onclick=xr),t=!0):t=!1,t||Fa(e)}function Qc(e){for(ot=e.return;ot;)switch(ot.tag){case 5:case 13:Yt=!1;return;case 27:case 3:Yt=!0;return;default:ot=ot.return}}function bl(e){if(e!==ot)return!1;if(!Re)return Qc(e),Re=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Zo(e.type,e.memoizedProps)),a=!a),a&&qe&&Fa(e),Qc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){qe=Bt(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}qe=null}}else t===27?(t=qe,Da(e.type)?(e=Wo,Wo=null,qe=e):qe=t):qe=ot?Bt(e.stateNode.nextSibling):null;return!0}function Sl(){qe=ot=null,Re=!1}function Xc(){var e=Ja;return e!==null&&(gt===null?gt=e:gt.push.apply(gt,e),Ja=null),e}function wl(e){Ja===null?Ja=[e]:Ja.push(e)}var Mi=Q(null),Wa=null,na=null;function va(e,t,a){Z(Mi,t._currentValue),t._currentValue=a}function la(e){e._currentValue=Mi.current,ee(Mi)}function zi(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 Di(e,t,a,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var u=i.dependencies;if(u!==null){var p=i.child;u=u.firstContext;e:for(;u!==null;){var x=u;u=i;for(var j=0;j<t.length;j++)if(x.context===t[j]){u.lanes|=a,x=u.alternate,x!==null&&(x.lanes|=a),zi(u.return,a,e),n||(p=null);break e}u=x.next}}else if(i.tag===18){if(p=i.return,p===null)throw Error(o(341));p.lanes|=a,u=p.alternate,u!==null&&(u.lanes|=a),zi(p,a,e),p=null}else p=i.child;if(p!==null)p.return=i;else for(p=i;p!==null;){if(p===e){p=null;break}if(i=p.sibling,i!==null){i.return=p.return,p=i;break}p=p.return}i=p}}function Nl(e,t,a,n){e=null;for(var i=t,u=!1;i!==null;){if(!u){if((i.flags&524288)!==0)u=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var p=i.alternate;if(p===null)throw Error(o(387));if(p=p.memoizedProps,p!==null){var x=i.type;vt(i.pendingProps.value,p.value)||(e!==null?e.push(x):e=[x])}}else if(i===I.current){if(p=i.alternate,p===null)throw Error(o(387));p.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Wl):e=[Wl])}i=i.return}e!==null&&Di(t,e,a,n),t.flags|=262144}function Bs(e){for(e=e.firstContext;e!==null;){if(!vt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ia(e){Wa=e,na=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function st(e){return Zc(Wa,e)}function Gs(e,t){return Wa===null&&Ia(e),Zc(e,t)}function Zc(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},na===null){if(e===null)throw Error(o(308));na=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else na=na.next=t;return a}var O0=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()})}},M0=l.unstable_scheduleCallback,z0=l.unstable_NormalPriority,Xe={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ui(){return{controller:new O0,data:new Map,refCount:0}}function jl(e){e.refCount--,e.refCount===0&&M0(z0,function(){e.controller.abort()})}var El=null,Li=0,An=0,Tn=null;function D0(e,t){if(El===null){var a=El=[];Li=0,An=Bo(),Tn={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Li++,t.then(Pc,Pc),t}function Pc(){if(--Li===0&&El!==null){Tn!==null&&(Tn.status="fulfilled");var e=El;El=null,An=0,Tn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function U0(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(i){a.push(i)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var i=0;i<a.length;i++)(0,a[i])(t)},function(i){for(n.status="rejected",n.reason=i,i=0;i<a.length;i++)(0,a[i])(void 0)}),n}var Jc=G.S;G.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&D0(e,t),Jc!==null&&Jc(e,t)};var en=Q(null);function _i(){var e=en.current;return e!==null?e:_e.pooledCache}function qs(e,t){t===null?Z(en,en.current):Z(en,t.pool)}function Fc(){var e=_i();return e===null?null:{parent:Xe._currentValue,pool:e}}var Cl=Error(o(460)),Wc=Error(o(474)),Vs=Error(o(542)),Hi={then:function(){}};function Ic(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ys(){}function ed(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ys,Ys),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ad(e),e;default:if(typeof t.status=="string")t.then(Ys,Ys);else{if(e=_e,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=n}},function(n){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ad(e),e}throw kl=t,Cl}}var kl=null;function td(){if(kl===null)throw Error(o(459));var e=kl;return kl=null,e}function ad(e){if(e===Cl||e===Vs)throw Error(o(483))}var ba=!1;function Bi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gi(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 Sa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wa(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Oe&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=Us(e),Vc(e,null,a),t}return Ds(e,n,t,a),Us(e)}function Al(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,Pu(e,a)}}function qi(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var i=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var p={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?i=u=p:u=u.next=p,a=a.next}while(a!==null);u===null?i=u=t:u=u.next=t}else i=u=t;a={baseState:n.baseState,firstBaseUpdate:i,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 Vi=!1;function Tl(){if(Vi){var e=Tn;if(e!==null)throw e}}function Rl(e,t,a,n){Vi=!1;var i=e.updateQueue;ba=!1;var u=i.firstBaseUpdate,p=i.lastBaseUpdate,x=i.shared.pending;if(x!==null){i.shared.pending=null;var j=x,L=j.next;j.next=null,p===null?u=L:p.next=L,p=j;var K=e.alternate;K!==null&&(K=K.updateQueue,x=K.lastBaseUpdate,x!==p&&(x===null?K.firstBaseUpdate=L:x.next=L,K.lastBaseUpdate=j))}if(u!==null){var P=i.baseState;p=0,K=L=j=null,x=u;do{var _=x.lane&-536870913,B=_!==x.lane;if(B?(Ce&_)===_:(n&_)===_){_!==0&&_===An&&(Vi=!0),K!==null&&(K=K.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ge=e,fe=x;_=t;var Ue=a;switch(fe.tag){case 1:if(ge=fe.payload,typeof ge=="function"){P=ge.call(Ue,P,_);break e}P=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=fe.payload,_=typeof ge=="function"?ge.call(Ue,P,_):ge,_==null)break e;P=v({},P,_);break e;case 2:ba=!0}}_=x.callback,_!==null&&(e.flags|=64,B&&(e.flags|=8192),B=i.callbacks,B===null?i.callbacks=[_]:B.push(_))}else B={lane:_,tag:x.tag,payload:x.payload,callback:x.callback,next:null},K===null?(L=K=B,j=P):K=K.next=B,p|=_;if(x=x.next,x===null){if(x=i.shared.pending,x===null)break;B=x,x=B.next,B.next=null,i.lastBaseUpdate=B,i.shared.pending=null}}while(!0);K===null&&(j=P),i.baseState=j,i.firstBaseUpdate=L,i.lastBaseUpdate=K,u===null&&(i.shared.lanes=0),Ra|=p,e.lanes=p,e.memoizedState=P}}function nd(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function ld(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)nd(a[e],t)}var Rn=Q(null),Ks=Q(0);function sd(e,t){e=da,Z(Ks,e),Z(Rn,t),da=e|t.baseLanes}function Yi(){Z(Ks,da),Z(Rn,Rn.current)}function Ki(){da=Ks.current,ee(Rn),ee(Ks)}var Na=0,be=null,ze=null,$e=null,$s=!1,On=!1,tn=!1,Qs=0,Ol=0,Mn=null,L0=0;function Ye(){throw Error(o(321))}function $i(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!vt(e[a],t[a]))return!1;return!0}function Qi(e,t,a,n,i,u){return Na=u,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?Vd:Yd,tn=!1,u=a(n,i),tn=!1,On&&(u=id(t,a,n,i)),rd(e),u}function rd(e){G.H=Ws;var t=ze!==null&&ze.next!==null;if(Na=0,$e=ze=be=null,$s=!1,Ol=0,Mn=null,t)throw Error(o(300));e===null||Fe||(e=e.dependencies,e!==null&&Bs(e)&&(Fe=!0))}function id(e,t,a,n){be=e;var i=0;do{if(On&&(Mn=null),Ol=0,On=!1,25<=i)throw Error(o(301));if(i+=1,$e=ze=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}G.H=Y0,u=t(a,n)}while(On);return u}function _0(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?Ml(t):t,e=e.useState()[0],(ze!==null?ze.memoizedState:null)!==e&&(be.flags|=1024),t}function Xi(){var e=Qs!==0;return Qs=0,e}function Zi(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Pi(e){if($s){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}$s=!1}Na=0,$e=ze=be=null,On=!1,Ol=Qs=0,Mn=null}function ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $e===null?be.memoizedState=$e=e:$e=$e.next=e,$e}function Qe(){if(ze===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=$e===null?be.memoizedState:$e.next;if(t!==null)$e=t,ze=e;else{if(e===null)throw be.alternate===null?Error(o(467)):Error(o(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},$e===null?be.memoizedState=$e=e:$e=$e.next=e}return $e}function Ji(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ml(e){var t=Ol;return Ol+=1,Mn===null&&(Mn=[]),e=ed(Mn,e,t),t=be,($e===null?t.memoizedState:$e.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?Vd:Yd),e}function Xs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ml(e);if(e.$$typeof===D)return st(e)}throw Error(o(438,String(e)))}function Fi(e){var t=null,a=be.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=be.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Ji(),be.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]=re;return t.index++,a}function sa(e,t){return typeof t=="function"?t(e):t}function Zs(e){var t=Qe();return Wi(t,ze,e)}function Wi(e,t,a){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=a;var i=e.baseQueue,u=n.pending;if(u!==null){if(i!==null){var p=i.next;i.next=u.next,u.next=p}t.baseQueue=i=u,n.pending=null}if(u=e.baseState,i===null)e.memoizedState=u;else{t=i.next;var x=p=null,j=null,L=t,K=!1;do{var P=L.lane&-536870913;if(P!==L.lane?(Ce&P)===P:(Na&P)===P){var _=L.revertLane;if(_===0)j!==null&&(j=j.next={lane:0,revertLane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),P===An&&(K=!0);else if((Na&_)===_){L=L.next,_===An&&(K=!0);continue}else P={lane:0,revertLane:L.revertLane,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},j===null?(x=j=P,p=u):j=j.next=P,be.lanes|=_,Ra|=_;P=L.action,tn&&a(u,P),u=L.hasEagerState?L.eagerState:a(u,P)}else _={lane:P,revertLane:L.revertLane,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},j===null?(x=j=_,p=u):j=j.next=_,be.lanes|=P,Ra|=P;L=L.next}while(L!==null&&L!==t);if(j===null?p=u:j.next=x,!vt(u,e.memoizedState)&&(Fe=!0,K&&(a=Tn,a!==null)))throw a;e.memoizedState=u,e.baseState=p,e.baseQueue=j,n.lastRenderedState=u}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Ii(e){var t=Qe(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var n=a.dispatch,i=a.pending,u=t.memoizedState;if(i!==null){a.pending=null;var p=i=i.next;do u=e(u,p.action),p=p.next;while(p!==i);vt(u,t.memoizedState)||(Fe=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,n]}function od(e,t,a){var n=be,i=Qe(),u=Re;if(u){if(a===void 0)throw Error(o(407));a=a()}else a=t();var p=!vt((ze||i).memoizedState,a);p&&(i.memoizedState=a,Fe=!0),i=i.queue;var x=dd.bind(null,n,i,e);if(zl(2048,8,x,[e]),i.getSnapshot!==t||p||$e!==null&&$e.memoizedState.tag&1){if(n.flags|=2048,zn(9,Ps(),cd.bind(null,n,i,a,t),null),_e===null)throw Error(o(349));u||(Na&124)!==0||ud(n,t,a)}return a}function ud(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=be.updateQueue,t===null?(t=Ji(),be.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function cd(e,t,a,n){t.value=a,t.getSnapshot=n,fd(t)&&hd(e)}function dd(e,t,a){return a(function(){fd(t)&&hd(e)})}function fd(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!vt(e,a)}catch{return!0}}function hd(e){var t=jn(e,2);t!==null&&Et(t,e,2)}function eo(e){var t=ht();if(typeof e=="function"){var a=e;if(e=a(),tn){pa(!0);try{a()}finally{pa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:e},t}function md(e,t,a,n){return e.baseState=a,Wi(e,ze,typeof n=="function"?n:sa)}function H0(e,t,a,n,i){if(Fs(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){u.listeners.push(p)}};G.T!==null?a(!0):u.isTransition=!1,n(u),a=t.pending,a===null?(u.next=t.pending=u,gd(t,u)):(u.next=a.next,t.pending=a.next=u)}}function gd(e,t){var a=t.action,n=t.payload,i=e.state;if(t.isTransition){var u=G.T,p={};G.T=p;try{var x=a(i,n),j=G.S;j!==null&&j(p,x),pd(e,t,x)}catch(L){to(e,t,L)}finally{G.T=u}}else try{u=a(i,n),pd(e,t,u)}catch(L){to(e,t,L)}}function pd(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){yd(e,t,n)},function(n){return to(e,t,n)}):yd(e,t,a)}function yd(e,t,a){t.status="fulfilled",t.value=a,xd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,gd(e,a)))}function to(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,xd(t),t=t.next;while(t!==n)}e.action=null}function xd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function vd(e,t){return t}function bd(e,t){if(Re){var a=_e.formState;if(a!==null){e:{var n=be;if(Re){if(qe){t:{for(var i=qe,u=Yt;i.nodeType!==8;){if(!u){i=null;break t}if(i=Bt(i.nextSibling),i===null){i=null;break t}}u=i.data,i=u==="F!"||u==="F"?i:null}if(i){qe=Bt(i.nextSibling),n=i.data==="F!";break e}}Fa(n)}n=!1}n&&(t=a[0])}}return a=ht(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vd,lastRenderedState:t},a.queue=n,a=Bd.bind(null,be,n),n.dispatch=a,n=eo(!1),u=ro.bind(null,be,!1,n.queue),n=ht(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,a=H0.bind(null,be,i,u,a),i.dispatch=a,n.memoizedState=e,[t,a,!1]}function Sd(e){var t=Qe();return wd(t,ze,e)}function wd(e,t,a){if(t=Wi(e,t,vd)[0],e=Zs(sa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Ml(t)}catch(p){throw p===Cl?Vs:p}else n=t;t=Qe();var i=t.queue,u=i.dispatch;return a!==t.memoizedState&&(be.flags|=2048,zn(9,Ps(),B0.bind(null,i,a),null)),[n,u,e]}function B0(e,t){e.action=t}function Nd(e){var t=Qe(),a=ze;if(a!==null)return wd(t,a,e);Qe(),t=t.memoizedState,a=Qe();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function zn(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=be.updateQueue,t===null&&(t=Ji(),be.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 Ps(){return{destroy:void 0,resource:void 0}}function jd(){return Qe().memoizedState}function Js(e,t,a,n){var i=ht();n=n===void 0?null:n,be.flags|=e,i.memoizedState=zn(1|t,Ps(),a,n)}function zl(e,t,a,n){var i=Qe();n=n===void 0?null:n;var u=i.memoizedState.inst;ze!==null&&n!==null&&$i(n,ze.memoizedState.deps)?i.memoizedState=zn(t,u,a,n):(be.flags|=e,i.memoizedState=zn(1|t,u,a,n))}function Ed(e,t){Js(8390656,8,e,t)}function Cd(e,t){zl(2048,8,e,t)}function kd(e,t){return zl(4,2,e,t)}function Ad(e,t){return zl(4,4,e,t)}function Td(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 Rd(e,t,a){a=a!=null?a.concat([e]):null,zl(4,4,Td.bind(null,t,e),a)}function ao(){}function Od(e,t){var a=Qe();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&$i(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Md(e,t){var a=Qe();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&$i(t,n[1]))return n[0];if(n=e(),tn){pa(!0);try{e()}finally{pa(!1)}}return a.memoizedState=[n,t],n}function no(e,t,a){return a===void 0||(Na&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=Lf(),be.lanes|=e,Ra|=e,a)}function zd(e,t,a,n){return vt(a,t)?a:Rn.current!==null?(e=no(e,a,n),vt(e,t)||(Fe=!0),e):(Na&42)===0?(Fe=!0,e.memoizedState=a):(e=Lf(),be.lanes|=e,Ra|=e,t)}function Dd(e,t,a,n,i){var u=V.p;V.p=u!==0&&8>u?u:8;var p=G.T,x={};G.T=x,ro(e,!1,t,a);try{var j=i(),L=G.S;if(L!==null&&L(x,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var K=U0(j,n);Dl(e,t,K,jt(e))}else Dl(e,t,n,jt(e))}catch(P){Dl(e,t,{then:function(){},status:"rejected",reason:P},jt())}finally{V.p=u,G.T=p}}function G0(){}function lo(e,t,a,n){if(e.tag!==5)throw Error(o(476));var i=Ud(e).queue;Dd(e,i,t,$,a===null?G0:function(){return Ld(e),a(n)})}function Ud(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:$},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ld(e){var t=Ud(e).next.queue;Dl(e,t,{},jt())}function so(){return st(Wl)}function _d(){return Qe().memoizedState}function Hd(){return Qe().memoizedState}function q0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=jt();e=Sa(a);var n=wa(t,e,a);n!==null&&(Et(n,t,a),Al(n,t,a)),t={cache:Ui()},e.payload=t;return}t=t.return}}function V0(e,t,a){var n=jt();a={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Gd(t,a):(a=Ei(e,t,a,n),a!==null&&(Et(a,e,n),qd(a,t,n)))}function Bd(e,t,a){var n=jt();Dl(e,t,a,n)}function Dl(e,t,a,n){var i={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Gd(t,i);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var p=t.lastRenderedState,x=u(p,a);if(i.hasEagerState=!0,i.eagerState=x,vt(x,p))return Ds(e,t,i,0),_e===null&&zs(),!1}catch{}finally{}if(a=Ei(e,t,i,n),a!==null)return Et(a,e,n),qd(a,t,n),!0}return!1}function ro(e,t,a,n){if(n={lane:2,revertLane:Bo(),action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(o(479))}else t=Ei(e,a,n,2),t!==null&&Et(t,e,2)}function Fs(e){var t=e.alternate;return e===be||t!==null&&t===be}function Gd(e,t){On=$s=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function qd(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Pu(e,a)}}var Ws={readContext:st,use:Xs,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye},Vd={readContext:st,use:Xs,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:Ed,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Js(4194308,4,Td.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Js(4194308,4,e,t)},useInsertionEffect:function(e,t){Js(4,2,e,t)},useMemo:function(e,t){var a=ht();t=t===void 0?null:t;var n=e();if(tn){pa(!0);try{e()}finally{pa(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=ht();if(a!==void 0){var i=a(t);if(tn){pa(!0);try{a(t)}finally{pa(!1)}}}else i=t;return n.memoizedState=n.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},n.queue=e,e=e.dispatch=V0.bind(null,be,e),[n.memoizedState,e]},useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:function(e){e=eo(e);var t=e.queue,a=Bd.bind(null,be,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:ao,useDeferredValue:function(e,t){var a=ht();return no(a,e,t)},useTransition:function(){var e=eo(!1);return e=Dd.bind(null,be,e.queue,!0,!1),ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=be,i=ht();if(Re){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),_e===null)throw Error(o(349));(Ce&124)!==0||ud(n,t,a)}i.memoizedState=a;var u={value:a,getSnapshot:t};return i.queue=u,Ed(dd.bind(null,n,u,e),[e]),n.flags|=2048,zn(9,Ps(),cd.bind(null,n,u,a,t),null),a},useId:function(){var e=ht(),t=_e.identifierPrefix;if(Re){var a=aa,n=ta;a=(n&~(1<<32-xt(n)-1)).toString(32)+a,t="«"+t+"R"+a,a=Qs++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=L0++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:so,useFormState:bd,useActionState:bd,useOptimistic:function(e){var t=ht();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=ro.bind(null,be,!0,a),a.dispatch=t,[e,t]},useMemoCache:Fi,useCacheRefresh:function(){return ht().memoizedState=q0.bind(null,be)}},Yd={readContext:st,use:Xs,useCallback:Od,useContext:st,useEffect:Cd,useImperativeHandle:Rd,useInsertionEffect:kd,useLayoutEffect:Ad,useMemo:Md,useReducer:Zs,useRef:jd,useState:function(){return Zs(sa)},useDebugValue:ao,useDeferredValue:function(e,t){var a=Qe();return zd(a,ze.memoizedState,e,t)},useTransition:function(){var e=Zs(sa)[0],t=Qe().memoizedState;return[typeof e=="boolean"?e:Ml(e),t]},useSyncExternalStore:od,useId:_d,useHostTransitionStatus:so,useFormState:Sd,useActionState:Sd,useOptimistic:function(e,t){var a=Qe();return md(a,ze,e,t)},useMemoCache:Fi,useCacheRefresh:Hd},Y0={readContext:st,use:Xs,useCallback:Od,useContext:st,useEffect:Cd,useImperativeHandle:Rd,useInsertionEffect:kd,useLayoutEffect:Ad,useMemo:Md,useReducer:Ii,useRef:jd,useState:function(){return Ii(sa)},useDebugValue:ao,useDeferredValue:function(e,t){var a=Qe();return ze===null?no(a,e,t):zd(a,ze.memoizedState,e,t)},useTransition:function(){var e=Ii(sa)[0],t=Qe().memoizedState;return[typeof e=="boolean"?e:Ml(e),t]},useSyncExternalStore:od,useId:_d,useHostTransitionStatus:so,useFormState:Nd,useActionState:Nd,useOptimistic:function(e,t){var a=Qe();return ze!==null?md(a,ze,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Fi,useCacheRefresh:Hd},Dn=null,Ul=0;function Is(e){var t=Ul;return Ul+=1,Dn===null&&(Dn=[]),ed(Dn,e,t)}function Ll(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function er(e,t){throw t.$$typeof===w?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Kd(e){var t=e._init;return t(e._payload)}function $d(e){function t(M,k){if(e){var U=M.deletions;U===null?(M.deletions=[k],M.flags|=16):U.push(k)}}function a(M,k){if(!e)return null;for(;k!==null;)t(M,k),k=k.sibling;return null}function n(M){for(var k=new Map;M!==null;)M.key!==null?k.set(M.key,M):k.set(M.index,M),M=M.sibling;return k}function i(M,k){return M=ea(M,k),M.index=0,M.sibling=null,M}function u(M,k,U){return M.index=U,e?(U=M.alternate,U!==null?(U=U.index,U<k?(M.flags|=67108866,k):U):(M.flags|=67108866,k)):(M.flags|=1048576,k)}function p(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function x(M,k,U,X){return k===null||k.tag!==6?(k=ki(U,M.mode,X),k.return=M,k):(k=i(k,U),k.return=M,k)}function j(M,k,U,X){var ne=U.type;return ne===N?K(M,k,U.props.children,X,U.key):k!==null&&(k.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===O&&Kd(ne)===k.type)?(k=i(k,U.props),Ll(k,U),k.return=M,k):(k=Ls(U.type,U.key,U.props,null,M.mode,X),Ll(k,U),k.return=M,k)}function L(M,k,U,X){return k===null||k.tag!==4||k.stateNode.containerInfo!==U.containerInfo||k.stateNode.implementation!==U.implementation?(k=Ai(U,M.mode,X),k.return=M,k):(k=i(k,U.children||[]),k.return=M,k)}function K(M,k,U,X,ne){return k===null||k.tag!==7?(k=Xa(U,M.mode,X,ne),k.return=M,k):(k=i(k,U),k.return=M,k)}function P(M,k,U){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=ki(""+k,M.mode,U),k.return=M,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case b:return U=Ls(k.type,k.key,k.props,null,M.mode,U),Ll(U,k),U.return=M,U;case R:return k=Ai(k,M.mode,U),k.return=M,k;case O:var X=k._init;return k=X(k._payload),P(M,k,U)}if(xe(k)||me(k))return k=Xa(k,M.mode,U,null),k.return=M,k;if(typeof k.then=="function")return P(M,Is(k),U);if(k.$$typeof===D)return P(M,Gs(M,k),U);er(M,k)}return null}function _(M,k,U,X){var ne=k!==null?k.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return ne!==null?null:x(M,k,""+U,X);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case b:return U.key===ne?j(M,k,U,X):null;case R:return U.key===ne?L(M,k,U,X):null;case O:return ne=U._init,U=ne(U._payload),_(M,k,U,X)}if(xe(U)||me(U))return ne!==null?null:K(M,k,U,X,null);if(typeof U.then=="function")return _(M,k,Is(U),X);if(U.$$typeof===D)return _(M,k,Gs(M,U),X);er(M,U)}return null}function B(M,k,U,X,ne){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return M=M.get(U)||null,x(k,M,""+X,ne);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case b:return M=M.get(X.key===null?U:X.key)||null,j(k,M,X,ne);case R:return M=M.get(X.key===null?U:X.key)||null,L(k,M,X,ne);case O:var we=X._init;return X=we(X._payload),B(M,k,U,X,ne)}if(xe(X)||me(X))return M=M.get(U)||null,K(k,M,X,ne,null);if(typeof X.then=="function")return B(M,k,U,Is(X),ne);if(X.$$typeof===D)return B(M,k,U,Gs(k,X),ne);er(k,X)}return null}function ge(M,k,U,X){for(var ne=null,we=null,ie=k,he=k=0,Ie=null;ie!==null&&he<U.length;he++){ie.index>he?(Ie=ie,ie=null):Ie=ie.sibling;var Ae=_(M,ie,U[he],X);if(Ae===null){ie===null&&(ie=Ie);break}e&&ie&&Ae.alternate===null&&t(M,ie),k=u(Ae,k,he),we===null?ne=Ae:we.sibling=Ae,we=Ae,ie=Ie}if(he===U.length)return a(M,ie),Re&&Pa(M,he),ne;if(ie===null){for(;he<U.length;he++)ie=P(M,U[he],X),ie!==null&&(k=u(ie,k,he),we===null?ne=ie:we.sibling=ie,we=ie);return Re&&Pa(M,he),ne}for(ie=n(ie);he<U.length;he++)Ie=B(ie,M,he,U[he],X),Ie!==null&&(e&&Ie.alternate!==null&&ie.delete(Ie.key===null?he:Ie.key),k=u(Ie,k,he),we===null?ne=Ie:we.sibling=Ie,we=Ie);return e&&ie.forEach(function(Ba){return t(M,Ba)}),Re&&Pa(M,he),ne}function fe(M,k,U,X){if(U==null)throw Error(o(151));for(var ne=null,we=null,ie=k,he=k=0,Ie=null,Ae=U.next();ie!==null&&!Ae.done;he++,Ae=U.next()){ie.index>he?(Ie=ie,ie=null):Ie=ie.sibling;var Ba=_(M,ie,Ae.value,X);if(Ba===null){ie===null&&(ie=Ie);break}e&&ie&&Ba.alternate===null&&t(M,ie),k=u(Ba,k,he),we===null?ne=Ba:we.sibling=Ba,we=Ba,ie=Ie}if(Ae.done)return a(M,ie),Re&&Pa(M,he),ne;if(ie===null){for(;!Ae.done;he++,Ae=U.next())Ae=P(M,Ae.value,X),Ae!==null&&(k=u(Ae,k,he),we===null?ne=Ae:we.sibling=Ae,we=Ae);return Re&&Pa(M,he),ne}for(ie=n(ie);!Ae.done;he++,Ae=U.next())Ae=B(ie,M,he,Ae.value,X),Ae!==null&&(e&&Ae.alternate!==null&&ie.delete(Ae.key===null?he:Ae.key),k=u(Ae,k,he),we===null?ne=Ae:we.sibling=Ae,we=Ae);return e&&ie.forEach(function(Kp){return t(M,Kp)}),Re&&Pa(M,he),ne}function Ue(M,k,U,X){if(typeof U=="object"&&U!==null&&U.type===N&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case b:e:{for(var ne=U.key;k!==null;){if(k.key===ne){if(ne=U.type,ne===N){if(k.tag===7){a(M,k.sibling),X=i(k,U.props.children),X.return=M,M=X;break e}}else if(k.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===O&&Kd(ne)===k.type){a(M,k.sibling),X=i(k,U.props),Ll(X,U),X.return=M,M=X;break e}a(M,k);break}else t(M,k);k=k.sibling}U.type===N?(X=Xa(U.props.children,M.mode,X,U.key),X.return=M,M=X):(X=Ls(U.type,U.key,U.props,null,M.mode,X),Ll(X,U),X.return=M,M=X)}return p(M);case R:e:{for(ne=U.key;k!==null;){if(k.key===ne)if(k.tag===4&&k.stateNode.containerInfo===U.containerInfo&&k.stateNode.implementation===U.implementation){a(M,k.sibling),X=i(k,U.children||[]),X.return=M,M=X;break e}else{a(M,k);break}else t(M,k);k=k.sibling}X=Ai(U,M.mode,X),X.return=M,M=X}return p(M);case O:return ne=U._init,U=ne(U._payload),Ue(M,k,U,X)}if(xe(U))return ge(M,k,U,X);if(me(U)){if(ne=me(U),typeof ne!="function")throw Error(o(150));return U=ne.call(U),fe(M,k,U,X)}if(typeof U.then=="function")return Ue(M,k,Is(U),X);if(U.$$typeof===D)return Ue(M,k,Gs(M,U),X);er(M,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,k!==null&&k.tag===6?(a(M,k.sibling),X=i(k,U),X.return=M,M=X):(a(M,k),X=ki(U,M.mode,X),X.return=M,M=X),p(M)):a(M,k)}return function(M,k,U,X){try{Ul=0;var ne=Ue(M,k,U,X);return Dn=null,ne}catch(ie){if(ie===Cl||ie===Vs)throw ie;var we=bt(29,ie,null,M.mode);return we.lanes=X,we.return=M,we}finally{}}}var Un=$d(!0),Qd=$d(!1),Mt=Q(null),Kt=null;function ja(e){var t=e.alternate;Z(Ze,Ze.current&1),Z(Mt,e),Kt===null&&(t===null||Rn.current!==null||t.memoizedState!==null)&&(Kt=e)}function Xd(e){if(e.tag===22){if(Z(Ze,Ze.current),Z(Mt,e),Kt===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Kt=e)}}else Ea()}function Ea(){Z(Ze,Ze.current),Z(Mt,Mt.current)}function ra(e){ee(Mt),Kt===e&&(Kt=null),ee(Ze)}var Ze=Q(0);function tr(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==="$?"||Fo(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 io(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:v({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var oo={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=jt(),i=Sa(n);i.payload=t,a!=null&&(i.callback=a),t=wa(e,i,n),t!==null&&(Et(t,e,n),Al(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=jt(),i=Sa(n);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=wa(e,i,n),t!==null&&(Et(t,e,n),Al(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=jt(),n=Sa(a);n.tag=2,t!=null&&(n.callback=t),t=wa(e,n,a),t!==null&&(Et(t,e,a),Al(t,e,a))}};function Zd(e,t,a,n,i,u,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,u,p):t.prototype&&t.prototype.isPureReactComponent?!xl(a,n)||!xl(i,u):!0}function Pd(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&&oo.enqueueReplaceState(t,t.state,null)}function an(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=v({},a));for(var i in e)a[i]===void 0&&(a[i]=e[i])}return a}var ar=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 Jd(e){ar(e)}function Fd(e){console.error(e)}function Wd(e){ar(e)}function nr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Id(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function uo(e,t,a){return a=Sa(a),a.tag=3,a.payload={element:null},a.callback=function(){nr(e,t)},a}function ef(e){return e=Sa(e),e.tag=3,e}function tf(e,t,a,n){var i=a.type.getDerivedStateFromError;if(typeof i=="function"){var u=n.value;e.payload=function(){return i(u)},e.callback=function(){Id(t,a,n)}}var p=a.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){Id(t,a,n),typeof i!="function"&&(Oa===null?Oa=new Set([this]):Oa.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})})}function K0(e,t,a,n,i){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Nl(t,a,i,!0),a=Mt.current,a!==null){switch(a.tag){case 13:return Kt===null?Do():a.alternate===null&&Ve===0&&(Ve=3),a.flags&=-257,a.flags|=65536,a.lanes=i,n===Hi?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Lo(e,n,i)),!1;case 22:return a.flags|=65536,n===Hi?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)),Lo(e,n,i)),!1}throw Error(o(435,a.tag))}return Lo(e,n,i),Do(),!1}if(Re)return t=Mt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==Oi&&(e=Error(o(422),{cause:n}),wl(At(e,a)))):(n!==Oi&&(t=Error(o(423),{cause:n}),wl(At(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=At(n,a),i=uo(e.stateNode,n,i),qi(e,i),Ve!==4&&(Ve=2)),!1;var u=Error(o(520),{cause:n});if(u=At(u,a),Yl===null?Yl=[u]:Yl.push(u),Ve!==4&&(Ve=2),t===null)return!0;n=At(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=uo(a.stateNode,n,e),qi(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"&&(Oa===null||!Oa.has(u))))return a.flags|=65536,i&=-i,a.lanes|=i,i=ef(i),tf(i,e,a,n),qi(a,i),!1}a=a.return}while(a!==null);return!1}var af=Error(o(461)),Fe=!1;function tt(e,t,a,n){t.child=e===null?Qd(t,null,a,n):Un(t,e.child,a,n)}function nf(e,t,a,n,i){a=a.render;var u=t.ref;if("ref"in n){var p={};for(var x in n)x!=="ref"&&(p[x]=n[x])}else p=n;return Ia(t),n=Qi(e,t,a,p,u,i),x=Xi(),e!==null&&!Fe?(Zi(e,t,i),ia(e,t,i)):(Re&&x&&Ti(t),t.flags|=1,tt(e,t,n,i),t.child)}function lf(e,t,a,n,i){if(e===null){var u=a.type;return typeof u=="function"&&!Ci(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,sf(e,t,u,n,i)):(e=Ls(a.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!xo(e,i)){var p=u.memoizedProps;if(a=a.compare,a=a!==null?a:xl,a(p,n)&&e.ref===t.ref)return ia(e,t,i)}return t.flags|=1,e=ea(u,n),e.ref=t.ref,e.return=t,t.child=e}function sf(e,t,a,n,i){if(e!==null){var u=e.memoizedProps;if(xl(u,n)&&e.ref===t.ref)if(Fe=!1,t.pendingProps=n=u,xo(e,i))(e.flags&131072)!==0&&(Fe=!0);else return t.lanes=e.lanes,ia(e,t,i)}return co(e,t,a,n,i)}function rf(e,t,a){var n=t.pendingProps,i=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(i=t.child=e.child,u=0;i!==null;)u=u|i.lanes|i.childLanes,i=i.sibling;t.childLanes=u&~n}else t.childLanes=0,t.child=null;return of(e,t,n,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&qs(t,u!==null?u.cachePool:null),u!==null?sd(t,u):Yi(),Xd(t);else return t.lanes=t.childLanes=536870912,of(e,t,u!==null?u.baseLanes|a:a,a)}else u!==null?(qs(t,u.cachePool),sd(t,u),Ea(),t.memoizedState=null):(e!==null&&qs(t,null),Yi(),Ea());return tt(e,t,i,a),t.child}function of(e,t,a,n){var i=_i();return i=i===null?null:{parent:Xe._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&qs(t,null),Yi(),Xd(t),e!==null&&Nl(e,t,n,!0),null}function lr(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(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function co(e,t,a,n,i){return Ia(t),a=Qi(e,t,a,n,void 0,i),n=Xi(),e!==null&&!Fe?(Zi(e,t,i),ia(e,t,i)):(Re&&n&&Ti(t),t.flags|=1,tt(e,t,a,i),t.child)}function uf(e,t,a,n,i,u){return Ia(t),t.updateQueue=null,a=id(t,n,a,i),rd(e),n=Xi(),e!==null&&!Fe?(Zi(e,t,u),ia(e,t,u)):(Re&&n&&Ti(t),t.flags|=1,tt(e,t,a,u),t.child)}function cf(e,t,a,n,i){if(Ia(t),t.stateNode===null){var u=En,p=a.contextType;typeof p=="object"&&p!==null&&(u=st(p)),u=new a(n,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=oo,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=n,u.state=t.memoizedState,u.refs={},Bi(t),p=a.contextType,u.context=typeof p=="object"&&p!==null?st(p):En,u.state=t.memoizedState,p=a.getDerivedStateFromProps,typeof p=="function"&&(io(t,a,p,n),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(p=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),p!==u.state&&oo.enqueueReplaceState(u,u.state,null),Rl(t,n,u,i),Tl(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){u=t.stateNode;var x=t.memoizedProps,j=an(a,x);u.props=j;var L=u.context,K=a.contextType;p=En,typeof K=="object"&&K!==null&&(p=st(K));var P=a.getDerivedStateFromProps;K=typeof P=="function"||typeof u.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,K||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(x||L!==p)&&Pd(t,u,n,p),ba=!1;var _=t.memoizedState;u.state=_,Rl(t,n,u,i),Tl(),L=t.memoizedState,x||_!==L||ba?(typeof P=="function"&&(io(t,a,P,n),L=t.memoizedState),(j=ba||Zd(t,a,j,n,_,L,p))?(K||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=L),u.props=n,u.state=L,u.context=p,n=j):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{u=t.stateNode,Gi(e,t),p=t.memoizedProps,K=an(a,p),u.props=K,P=t.pendingProps,_=u.context,L=a.contextType,j=En,typeof L=="object"&&L!==null&&(j=st(L)),x=a.getDerivedStateFromProps,(L=typeof x=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(p!==P||_!==j)&&Pd(t,u,n,j),ba=!1,_=t.memoizedState,u.state=_,Rl(t,n,u,i),Tl();var B=t.memoizedState;p!==P||_!==B||ba||e!==null&&e.dependencies!==null&&Bs(e.dependencies)?(typeof x=="function"&&(io(t,a,x,n),B=t.memoizedState),(K=ba||Zd(t,a,K,n,_,B,j)||e!==null&&e.dependencies!==null&&Bs(e.dependencies))?(L||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(n,B,j),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(n,B,j)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||p===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=B),u.props=n,u.state=B,u.context=j,n=K):(typeof u.componentDidUpdate!="function"||p===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),n=!1)}return u=n,lr(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=Un(t,e.child,null,i),t.child=Un(t,null,a,i)):tt(e,t,a,i),t.memoizedState=u.state,e=t.child):e=ia(e,t,i),e}function df(e,t,a,n){return Sl(),t.flags|=256,tt(e,t,a,n),t.child}var fo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ho(e){return{baseLanes:e,cachePool:Fc()}}function mo(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=zt),e}function ff(e,t,a){var n=t.pendingProps,i=!1,u=(t.flags&128)!==0,p;if((p=u)||(p=e!==null&&e.memoizedState===null?!1:(Ze.current&2)!==0),p&&(i=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Re){if(i?ja(t):Ea(),Re){var x=qe,j;if(j=x){e:{for(j=x,x=Yt;j.nodeType!==8;){if(!x){x=null;break e}if(j=Bt(j.nextSibling),j===null){x=null;break e}}x=j}x!==null?(t.memoizedState={dehydrated:x,treeContext:Za!==null?{id:ta,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},j=bt(18,null,null,0),j.stateNode=x,j.return=t,t.child=j,ot=t,qe=null,j=!0):j=!1}j||Fa(t)}if(x=t.memoizedState,x!==null&&(x=x.dehydrated,x!==null))return Fo(x)?t.lanes=32:t.lanes=536870912,null;ra(t)}return x=n.children,n=n.fallback,i?(Ea(),i=t.mode,x=sr({mode:"hidden",children:x},i),n=Xa(n,i,a,null),x.return=t,n.return=t,x.sibling=n,t.child=x,i=t.child,i.memoizedState=ho(a),i.childLanes=mo(e,p,a),t.memoizedState=fo,n):(ja(t),go(t,x))}if(j=e.memoizedState,j!==null&&(x=j.dehydrated,x!==null)){if(u)t.flags&256?(ja(t),t.flags&=-257,t=po(e,t,a)):t.memoizedState!==null?(Ea(),t.child=e.child,t.flags|=128,t=null):(Ea(),i=n.fallback,x=t.mode,n=sr({mode:"visible",children:n.children},x),i=Xa(i,x,a,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,Un(t,e.child,null,a),n=t.child,n.memoizedState=ho(a),n.childLanes=mo(e,p,a),t.memoizedState=fo,t=i);else if(ja(t),Fo(x)){if(p=x.nextSibling&&x.nextSibling.dataset,p)var L=p.dgst;p=L,n=Error(o(419)),n.stack="",n.digest=p,wl({value:n,source:null,stack:null}),t=po(e,t,a)}else if(Fe||Nl(e,t,a,!1),p=(a&e.childLanes)!==0,Fe||p){if(p=_e,p!==null&&(n=a&-a,n=(n&42)!==0?1:Fr(n),n=(n&(p.suspendedLanes|a))!==0?0:n,n!==0&&n!==j.retryLane))throw j.retryLane=n,jn(e,n),Et(p,e,n),af;x.data==="$?"||Do(),t=po(e,t,a)}else x.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,qe=Bt(x.nextSibling),ot=t,Re=!0,Ja=null,Yt=!1,e!==null&&(Rt[Ot++]=ta,Rt[Ot++]=aa,Rt[Ot++]=Za,ta=e.id,aa=e.overflow,Za=t),t=go(t,n.children),t.flags|=4096);return t}return i?(Ea(),i=n.fallback,x=t.mode,j=e.child,L=j.sibling,n=ea(j,{mode:"hidden",children:n.children}),n.subtreeFlags=j.subtreeFlags&65011712,L!==null?i=ea(L,i):(i=Xa(i,x,a,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,x=e.child.memoizedState,x===null?x=ho(a):(j=x.cachePool,j!==null?(L=Xe._currentValue,j=j.parent!==L?{parent:L,pool:L}:j):j=Fc(),x={baseLanes:x.baseLanes|a,cachePool:j}),i.memoizedState=x,i.childLanes=mo(e,p,a),t.memoizedState=fo,n):(ja(t),a=e.child,e=a.sibling,a=ea(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=a,t.memoizedState=null,a)}function go(e,t){return t=sr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function sr(e,t){return e=bt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function po(e,t,a){return Un(t,e.child,null,a),e=go(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hf(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),zi(e.return,t,a)}function yo(e,t,a,n,i){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:i}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=n,u.tail=a,u.tailMode=i)}function mf(e,t,a){var n=t.pendingProps,i=n.revealOrder,u=n.tail;if(tt(e,t,n.children,a),n=Ze.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&&hf(e,a,t);else if(e.tag===19)hf(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(Z(Ze,n),i){case"forwards":for(a=t.child,i=null;a!==null;)e=a.alternate,e!==null&&tr(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),yo(t,!1,i,a,u);break;case"backwards":for(a=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&tr(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}yo(t,!0,a,null,u);break;case"together":yo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ia(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ra|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Nl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=ea(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ea(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function xo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Bs(e)))}function $0(e,t,a){switch(t.tag){case 3:ae(t,t.stateNode.containerInfo),va(t,Xe,e.memoizedState.cache),Sl();break;case 27:case 5:et(t);break;case 4:ae(t,t.stateNode.containerInfo);break;case 10:va(t,t.type,t.memoizedProps.value);break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(ja(t),t.flags|=128,null):(a&t.child.childLanes)!==0?ff(e,t,a):(ja(t),e=ia(e,t,a),e!==null?e.sibling:null);ja(t);break;case 19:var i=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Nl(e,t,a,!1),n=(a&t.childLanes)!==0),i){if(n)return mf(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Z(Ze,Ze.current),n)break;return null;case 22:case 23:return t.lanes=0,rf(e,t,a);case 24:va(t,Xe,e.memoizedState.cache)}return ia(e,t,a)}function gf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Fe=!0;else{if(!xo(e,a)&&(t.flags&128)===0)return Fe=!1,$0(e,t,a);Fe=(e.flags&131072)!==0}else Fe=!1,Re&&(t.flags&1048576)!==0&&Kc(t,Hs,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var n=t.elementType,i=n._init;if(n=i(n._payload),t.type=n,typeof n=="function")Ci(n)?(e=an(n,e),t.tag=1,t=cf(null,t,n,e,a)):(t.tag=0,t=co(null,t,n,e,a));else{if(n!=null){if(i=n.$$typeof,i===q){t.tag=11,t=nf(null,t,n,e,a);break e}else if(i===H){t.tag=14,t=lf(null,t,n,e,a);break e}}throw t=oe(n)||n,Error(o(306,t,""))}}return t;case 0:return co(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,i=an(n,t.pendingProps),cf(e,t,n,i,a);case 3:e:{if(ae(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var u=t.memoizedState;i=u.element,Gi(e,t),Rl(t,n,null,a);var p=t.memoizedState;if(n=p.cache,va(t,Xe,n),n!==u.cache&&Di(t,[Xe],a,!0),Tl(),n=p.element,u.isDehydrated)if(u={element:n,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=df(e,t,n,a);break e}else if(n!==i){i=At(Error(o(424)),t),wl(i),t=df(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(qe=Bt(e.firstChild),ot=t,Re=!0,Ja=null,Yt=!0,a=Qd(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Sl(),n===i){t=ia(e,t,a);break e}tt(e,t,n,a)}t=t.child}return t;case 26:return lr(e,t),e===null?(a=vh(t.type,null,t.pendingProps,null))?t.memoizedState=a:Re||(a=t.type,e=t.pendingProps,n=vr(F.current).createElement(a),n[lt]=t,n[dt]=e,nt(n,a,e),Je(n),t.stateNode=n):t.memoizedState=vh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return et(t),e===null&&Re&&(n=t.stateNode=ph(t.type,t.pendingProps,F.current),ot=t,Yt=!0,i=qe,Da(t.type)?(Wo=i,qe=Bt(n.firstChild)):qe=i),tt(e,t,t.pendingProps.children,a),lr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Re&&((i=n=qe)&&(n=vp(n,t.type,t.pendingProps,Yt),n!==null?(t.stateNode=n,ot=t,qe=Bt(n.firstChild),Yt=!1,i=!0):i=!1),i||Fa(t)),et(t),i=t.type,u=t.pendingProps,p=e!==null?e.memoizedProps:null,n=u.children,Zo(i,u)?n=null:p!==null&&Zo(i,p)&&(t.flags|=32),t.memoizedState!==null&&(i=Qi(e,t,_0,null,null,a),Wl._currentValue=i),lr(e,t),tt(e,t,n,a),t.child;case 6:return e===null&&Re&&((e=a=qe)&&(a=bp(a,t.pendingProps,Yt),a!==null?(t.stateNode=a,ot=t,qe=null,e=!0):e=!1),e||Fa(t)),null;case 13:return ff(e,t,a);case 4:return ae(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Un(t,null,n,a):tt(e,t,n,a),t.child;case 11:return nf(e,t,t.type,t.pendingProps,a);case 7:return tt(e,t,t.pendingProps,a),t.child;case 8:return tt(e,t,t.pendingProps.children,a),t.child;case 12:return tt(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,va(t,t.type,n.value),tt(e,t,n.children,a),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,Ia(t),i=st(i),n=n(i),t.flags|=1,tt(e,t,n,a),t.child;case 14:return lf(e,t,t.type,t.pendingProps,a);case 15:return sf(e,t,t.type,t.pendingProps,a);case 19:return mf(e,t,a);case 31:return n=t.pendingProps,a=t.mode,n={mode:n.mode,children:n.children},e===null?(a=sr(n,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=ea(e.child,n),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return rf(e,t,a);case 24:return Ia(t),n=st(Xe),e===null?(i=_i(),i===null&&(i=_e,u=Ui(),i.pooledCache=u,u.refCount++,u!==null&&(i.pooledCacheLanes|=a),i=u),t.memoizedState={parent:n,cache:i},Bi(t),va(t,Xe,i)):((e.lanes&a)!==0&&(Gi(e,t),Rl(t,null,null,a),Tl()),i=e.memoizedState,u=t.memoizedState,i.parent!==n?(i={parent:n,cache:n},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),va(t,Xe,n)):(n=u.cache,va(t,Xe,n),n!==i.cache&&Di(t,[Xe],a,!0))),tt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function oa(e){e.flags|=4}function pf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!jh(t)){if(t=Mt.current,t!==null&&((Ce&4194048)===Ce?Kt!==null:(Ce&62914560)!==Ce&&(Ce&536870912)===0||t!==Kt))throw kl=Hi,Wc;e.flags|=8192}}function rr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Xu():536870912,e.lanes|=t,Bn|=t)}function _l(e,t){if(!Re)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 Ge(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags&65011712,n|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function Q0(e,t,a){var n=t.pendingProps;switch(Ri(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(t),null;case 1:return Ge(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),la(Xe),ce(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(bl(t)?oa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xc())),Ge(t),null;case 26:return a=t.memoizedState,e===null?(oa(t),a!==null?(Ge(t),pf(t,a)):(Ge(t),t.flags&=-16777217)):a?a!==e.memoizedState?(oa(t),Ge(t),pf(t,a)):(Ge(t),t.flags&=-16777217):(e.memoizedProps!==n&&oa(t),Ge(t),t.flags&=-16777217),null;case 27:ct(t),a=F.current;var i=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==n&&oa(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return Ge(t),null}e=te.current,bl(t)?$c(t):(e=ph(i,n,a),t.stateNode=e,oa(t))}return Ge(t),null;case 5:if(ct(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&oa(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return Ge(t),null}if(e=te.current,bl(t))$c(t);else{switch(i=vr(F.current),e){case 1:e=i.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=i.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=i.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=i.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof n.is=="string"?i.createElement("select",{is:n.is}):i.createElement("select"),n.multiple?e.multiple=!0:n.size&&(e.size=n.size);break;default:e=typeof n.is=="string"?i.createElement(a,{is:n.is}):i.createElement(a)}}e[lt]=t,e[dt]=n;e:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)e.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=e;e:switch(nt(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&&oa(t)}}return Ge(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&oa(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=F.current,bl(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,i=ot,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}e[lt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||uh(e.nodeValue,a)),e||Fa(t)}else e=vr(e).createTextNode(n),e[lt]=t,t.stateNode=e}return Ge(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=bl(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(o(317));i[lt]=t}else Sl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ge(t),i=!1}else i=Xc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(ra(t),t):(ra(t),null)}if(ra(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=n!==null,e=e!==null&&e.memoizedState!==null,a){n=t.child,i=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(i=n.alternate.memoizedState.cachePool.pool);var u=null;n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==i&&(n.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),rr(t,t.updateQueue),Ge(t),null;case 4:return ce(),e===null&&Yo(t.stateNode.containerInfo),Ge(t),null;case 10:return la(t.type),Ge(t),null;case 19:if(ee(Ze),i=t.memoizedState,i===null)return Ge(t),null;if(n=(t.flags&128)!==0,u=i.rendering,u===null)if(n)_l(i,!1);else{if(Ve!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=tr(e),u!==null){for(t.flags|=128,_l(i,!1),e=u.updateQueue,t.updateQueue=e,rr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Yc(a,e),a=a.sibling;return Z(Ze,Ze.current&1|2),t.child}e=e.sibling}i.tail!==null&&Vt()>ur&&(t.flags|=128,n=!0,_l(i,!1),t.lanes=4194304)}else{if(!n)if(e=tr(u),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,rr(t,e),_l(i,!0),i.tail===null&&i.tailMode==="hidden"&&!u.alternate&&!Re)return Ge(t),null}else 2*Vt()-i.renderingStartTime>ur&&a!==536870912&&(t.flags|=128,n=!0,_l(i,!1),t.lanes=4194304);i.isBackwards?(u.sibling=t.child,t.child=u):(e=i.last,e!==null?e.sibling=u:t.child=u,i.last=u)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Vt(),t.sibling=null,e=Ze.current,Z(Ze,n?e&1|2:e&1),t):(Ge(t),null);case 22:case 23:return ra(t),Ki(),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&&(Ge(t),t.subtreeFlags&6&&(t.flags|=8192)):Ge(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&&ee(en),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),la(Xe),Ge(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function X0(e,t){switch(Ri(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(Xe),ce(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ct(t),null;case 13:if(ra(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Sl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ee(Ze),null;case 4:return ce(),null;case 10:return la(t.type),null;case 22:case 23:return ra(t),Ki(),e!==null&&ee(en),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return la(Xe),null;case 25:return null;default:return null}}function yf(e,t){switch(Ri(t),t.tag){case 3:la(Xe),ce();break;case 26:case 27:case 5:ct(t);break;case 4:ce();break;case 13:ra(t);break;case 19:ee(Ze);break;case 10:la(t.type);break;case 22:case 23:ra(t),Ki(),e!==null&&ee(en);break;case 24:la(Xe)}}function Hl(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){n=void 0;var u=a.create,p=a.inst;n=u(),p.destroy=n}a=a.next}while(a!==i)}}catch(x){Le(t,t.return,x)}}function Ca(e,t,a){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var u=i.next;n=u;do{if((n.tag&e)===e){var p=n.inst,x=p.destroy;if(x!==void 0){p.destroy=void 0,i=t;var j=a,L=x;try{L()}catch(K){Le(i,j,K)}}}n=n.next}while(n!==u)}}catch(K){Le(t,t.return,K)}}function xf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{ld(t,a)}catch(n){Le(e,e.return,n)}}}function vf(e,t,a){a.props=an(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Le(e,t,n)}}function Bl(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(i){Le(e,t,i)}}function $t(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(i){Le(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(i){Le(e,t,i)}else a.current=null}function bf(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(i){Le(e,e.return,i)}}function vo(e,t,a){try{var n=e.stateNode;mp(n,e.type,a,t),n[dt]=t}catch(i){Le(e,e.return,i)}}function Sf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Da(e.type)||e.tag===4}function bo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sf(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&&Da(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 So(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=xr));else if(n!==4&&(n===27&&Da(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(So(e,t,a),e=e.sibling;e!==null;)So(e,t,a),e=e.sibling}function ir(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&&Da(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ir(e,t,a),e=e.sibling;e!==null;)ir(e,t,a),e=e.sibling}function wf(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);nt(t,n,a),t[lt]=e,t[dt]=a}catch(u){Le(e,e.return,u)}}var ua=!1,Ke=!1,wo=!1,Nf=typeof WeakSet=="function"?WeakSet:Set,We=null;function Z0(e,t){if(e=e.containerInfo,Qo=Er,e=zc(e),vi(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 i=n.anchorOffset,u=n.focusNode;n=n.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var p=0,x=-1,j=-1,L=0,K=0,P=e,_=null;t:for(;;){for(var B;P!==a||i!==0&&P.nodeType!==3||(x=p+i),P!==u||n!==0&&P.nodeType!==3||(j=p+n),P.nodeType===3&&(p+=P.nodeValue.length),(B=P.firstChild)!==null;)_=P,P=B;for(;;){if(P===e)break t;if(_===a&&++L===i&&(x=p),_===u&&++K===n&&(j=p),(B=P.nextSibling)!==null)break;P=_,_=P.parentNode}P=B}a=x===-1||j===-1?null:{start:x,end:j}}else a=null}a=a||{start:0,end:0}}else a=null;for(Xo={focusedElem:e,selectionRange:a},Er=!1,We=t;We!==null;)if(t=We,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,We=e;else for(;We!==null;){switch(t=We,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,i=u.memoizedProps,u=u.memoizedState,n=a.stateNode;try{var ge=an(a.type,i,a.elementType===a.type);e=n.getSnapshotBeforeUpdate(ge,u),n.__reactInternalSnapshotBeforeUpdate=e}catch(fe){Le(a,a.return,fe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Jo(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Jo(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,We=e;break}We=t.return}}function jf(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:ka(e,a),n&4&&Hl(5,a);break;case 1:if(ka(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(p){Le(a,a.return,p)}else{var i=an(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){Le(a,a.return,p)}}n&64&&xf(a),n&512&&Bl(a,a.return);break;case 3:if(ka(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{ld(e,t)}catch(p){Le(a,a.return,p)}}break;case 27:t===null&&n&4&&wf(a);case 26:case 5:ka(e,a),t===null&&n&4&&bf(a),n&512&&Bl(a,a.return);break;case 12:ka(e,a);break;case 13:ka(e,a),n&4&&kf(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=np.bind(null,a),Sp(e,a))));break;case 22:if(n=a.memoizedState!==null||ua,!n){t=t!==null&&t.memoizedState!==null||Ke,i=ua;var u=Ke;ua=n,(Ke=t)&&!u?Aa(e,a,(a.subtreeFlags&8772)!==0):ka(e,a),ua=i,Ke=u}break;case 30:break;default:ka(e,a)}}function Ef(e){var t=e.alternate;t!==null&&(e.alternate=null,Ef(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ei(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 He=null,mt=!1;function ca(e,t,a){for(a=a.child;a!==null;)Cf(e,t,a),a=a.sibling}function Cf(e,t,a){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(rl,a)}catch{}switch(a.tag){case 26:Ke||$t(a,t),ca(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ke||$t(a,t);var n=He,i=mt;Da(a.type)&&(He=a.stateNode,mt=!1),ca(e,t,a),Zl(a.stateNode),He=n,mt=i;break;case 5:Ke||$t(a,t);case 6:if(n=He,i=mt,He=null,ca(e,t,a),He=n,mt=i,He!==null)if(mt)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(a.stateNode)}catch(u){Le(a,t,u)}else try{He.removeChild(a.stateNode)}catch(u){Le(a,t,u)}break;case 18:He!==null&&(mt?(e=He,mh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),as(e)):mh(He,a.stateNode));break;case 4:n=He,i=mt,He=a.stateNode.containerInfo,mt=!0,ca(e,t,a),He=n,mt=i;break;case 0:case 11:case 14:case 15:Ke||Ca(2,a,t),Ke||Ca(4,a,t),ca(e,t,a);break;case 1:Ke||($t(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&vf(a,t,n)),ca(e,t,a);break;case 21:ca(e,t,a);break;case 22:Ke=(n=Ke)||a.memoizedState!==null,ca(e,t,a),Ke=n;break;default:ca(e,t,a)}}function kf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{as(e)}catch(a){Le(t,t.return,a)}}function P0(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Nf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Nf),t;default:throw Error(o(435,e.tag))}}function No(e,t){var a=P0(e);t.forEach(function(n){var i=lp.bind(null,e,n);a.has(n)||(a.add(n),n.then(i,i))})}function St(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n],u=e,p=t,x=p;e:for(;x!==null;){switch(x.tag){case 27:if(Da(x.type)){He=x.stateNode,mt=!1;break e}break;case 5:He=x.stateNode,mt=!1;break e;case 3:case 4:He=x.stateNode.containerInfo,mt=!0;break e}x=x.return}if(He===null)throw Error(o(160));Cf(u,p,i),He=null,mt=!1,u=i.alternate,u!==null&&(u.return=null),i.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Af(t,e),t=t.sibling}var Ht=null;function Af(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:St(t,e),wt(e),n&4&&(Ca(3,e,e.return),Hl(3,e),Ca(5,e,e.return));break;case 1:St(t,e),wt(e),n&512&&(Ke||a===null||$t(a,a.return)),n&64&&ua&&(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 i=Ht;if(St(t,e),wt(e),n&512&&(Ke||a===null||$t(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,i=i.ownerDocument||i;t:switch(n){case"title":u=i.getElementsByTagName("title")[0],(!u||u[ul]||u[lt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=i.createElement(n),i.head.insertBefore(u,i.querySelector("head > title"))),nt(u,n,a),u[lt]=e,Je(u),n=u;break e;case"link":var p=wh("link","href",i).get(n+(a.href||""));if(p){for(var x=0;x<p.length;x++)if(u=p[x],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){p.splice(x,1);break t}}u=i.createElement(n),nt(u,n,a),i.head.appendChild(u);break;case"meta":if(p=wh("meta","content",i).get(n+(a.content||""))){for(x=0;x<p.length;x++)if(u=p[x],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){p.splice(x,1);break t}}u=i.createElement(n),nt(u,n,a),i.head.appendChild(u);break;default:throw Error(o(468,n))}u[lt]=e,Je(u),n=u}e.stateNode=n}else Nh(i,e.type,e.stateNode);else e.stateNode=Sh(i,n,e.memoizedProps);else u!==n?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,n===null?Nh(i,e.type,e.stateNode):Sh(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&vo(e,e.memoizedProps,a.memoizedProps)}break;case 27:St(t,e),wt(e),n&512&&(Ke||a===null||$t(a,a.return)),a!==null&&n&4&&vo(e,e.memoizedProps,a.memoizedProps);break;case 5:if(St(t,e),wt(e),n&512&&(Ke||a===null||$t(a,a.return)),e.flags&32){i=e.stateNode;try{yn(i,"")}catch(B){Le(e,e.return,B)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,vo(e,i,a!==null?a.memoizedProps:i)),n&1024&&(wo=!0);break;case 6:if(St(t,e),wt(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(B){Le(e,e.return,B)}}break;case 3:if(wr=null,i=Ht,Ht=br(t.containerInfo),St(t,e),Ht=i,wt(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{as(t.containerInfo)}catch(B){Le(e,e.return,B)}wo&&(wo=!1,Tf(e));break;case 4:n=Ht,Ht=br(e.stateNode.containerInfo),St(t,e),wt(e),Ht=n;break;case 12:St(t,e),wt(e);break;case 13:St(t,e),wt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(To=Vt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,No(e,n)));break;case 22:i=e.memoizedState!==null;var j=a!==null&&a.memoizedState!==null,L=ua,K=Ke;if(ua=L||i,Ke=K||j,St(t,e),Ke=K,ua=L,wt(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||j||ua||Ke||nn(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){j=a=t;try{if(u=j.stateNode,i)p=u.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{x=j.stateNode;var P=j.memoizedProps.style,_=P!=null&&P.hasOwnProperty("display")?P.display:null;x.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(B){Le(j,j.return,B)}}}else if(t.tag===6){if(a===null){j=t;try{j.stateNode.nodeValue=i?"":j.memoizedProps}catch(B){Le(j,j.return,B)}}}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,No(e,a))));break;case 19:St(t,e),wt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,No(e,n)));break;case 30:break;case 21:break;default:St(t,e),wt(e)}}function wt(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Sf(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var i=a.stateNode,u=bo(e);ir(e,u,i);break;case 5:var p=a.stateNode;a.flags&32&&(yn(p,""),a.flags&=-33);var x=bo(e);ir(e,x,p);break;case 3:case 4:var j=a.stateNode.containerInfo,L=bo(e);So(e,L,j);break;default:throw Error(o(161))}}catch(K){Le(e,e.return,K)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Tf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Tf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ka(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)jf(e,t.alternate,t),t=t.sibling}function nn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ca(4,t,t.return),nn(t);break;case 1:$t(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&vf(t,t.return,a),nn(t);break;case 27:Zl(t.stateNode);case 26:case 5:$t(t,t.return),nn(t);break;case 22:t.memoizedState===null&&nn(t);break;case 30:nn(t);break;default:nn(t)}e=e.sibling}}function Aa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,u=t,p=u.flags;switch(u.tag){case 0:case 11:case 15:Aa(i,u,a),Hl(4,u);break;case 1:if(Aa(i,u,a),n=u,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(L){Le(n,n.return,L)}if(n=u,i=n.updateQueue,i!==null){var x=n.stateNode;try{var j=i.shared.hiddenCallbacks;if(j!==null)for(i.shared.hiddenCallbacks=null,i=0;i<j.length;i++)nd(j[i],x)}catch(L){Le(n,n.return,L)}}a&&p&64&&xf(u),Bl(u,u.return);break;case 27:wf(u);case 26:case 5:Aa(i,u,a),a&&n===null&&p&4&&bf(u),Bl(u,u.return);break;case 12:Aa(i,u,a);break;case 13:Aa(i,u,a),a&&p&4&&kf(i,u);break;case 22:u.memoizedState===null&&Aa(i,u,a),Bl(u,u.return);break;case 30:break;default:Aa(i,u,a)}t=t.sibling}}function jo(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&&jl(a))}function Eo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&jl(e))}function Qt(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Rf(e,t,a,n),t=t.sibling}function Rf(e,t,a,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Qt(e,t,a,n),i&2048&&Hl(9,t);break;case 1:Qt(e,t,a,n);break;case 3:Qt(e,t,a,n),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&jl(e)));break;case 12:if(i&2048){Qt(e,t,a,n),e=t.stateNode;try{var u=t.memoizedProps,p=u.id,x=u.onPostCommit;typeof x=="function"&&x(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){Le(t,t.return,j)}}else Qt(e,t,a,n);break;case 13:Qt(e,t,a,n);break;case 23:break;case 22:u=t.stateNode,p=t.alternate,t.memoizedState!==null?u._visibility&2?Qt(e,t,a,n):Gl(e,t):u._visibility&2?Qt(e,t,a,n):(u._visibility|=2,Ln(e,t,a,n,(t.subtreeFlags&10256)!==0)),i&2048&&jo(p,t);break;case 24:Qt(e,t,a,n),i&2048&&Eo(t.alternate,t);break;default:Qt(e,t,a,n)}}function Ln(e,t,a,n,i){for(i=i&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var u=e,p=t,x=a,j=n,L=p.flags;switch(p.tag){case 0:case 11:case 15:Ln(u,p,x,j,i),Hl(8,p);break;case 23:break;case 22:var K=p.stateNode;p.memoizedState!==null?K._visibility&2?Ln(u,p,x,j,i):Gl(u,p):(K._visibility|=2,Ln(u,p,x,j,i)),i&&L&2048&&jo(p.alternate,p);break;case 24:Ln(u,p,x,j,i),i&&L&2048&&Eo(p.alternate,p);break;default:Ln(u,p,x,j,i)}t=t.sibling}}function Gl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,i=n.flags;switch(n.tag){case 22:Gl(a,n),i&2048&&jo(n.alternate,n);break;case 24:Gl(a,n),i&2048&&Eo(n.alternate,n);break;default:Gl(a,n)}t=t.sibling}}var ql=8192;function _n(e){if(e.subtreeFlags&ql)for(e=e.child;e!==null;)Of(e),e=e.sibling}function Of(e){switch(e.tag){case 26:_n(e),e.flags&ql&&e.memoizedState!==null&&Dp(Ht,e.memoizedState,e.memoizedProps);break;case 5:_n(e);break;case 3:case 4:var t=Ht;Ht=br(e.stateNode.containerInfo),_n(e),Ht=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=ql,ql=16777216,_n(e),ql=t):_n(e));break;default:_n(e)}}function Mf(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 Vl(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];We=n,Df(n,e)}Mf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zf(e),e=e.sibling}function zf(e){switch(e.tag){case 0:case 11:case 15:Vl(e),e.flags&2048&&Ca(9,e,e.return);break;case 3:Vl(e);break;case 12:Vl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,or(e)):Vl(e);break;default:Vl(e)}}function or(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];We=n,Df(n,e)}Mf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ca(8,t,t.return),or(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,or(t));break;default:or(t)}e=e.sibling}}function Df(e,t){for(;We!==null;){var a=We;switch(a.tag){case 0:case 11:case 15:Ca(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:jl(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,We=n;else e:for(a=e;We!==null;){n=We;var i=n.sibling,u=n.return;if(Ef(n),n===a){We=null;break e}if(i!==null){i.return=u,We=i;break e}We=u}}}var J0={getCacheForType:function(e){var t=st(Xe),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},F0=typeof WeakMap=="function"?WeakMap:Map,Oe=0,_e=null,Ne=null,Ce=0,Me=0,Nt=null,Ta=!1,Hn=!1,Co=!1,da=0,Ve=0,Ra=0,ln=0,ko=0,zt=0,Bn=0,Yl=null,gt=null,Ao=!1,To=0,ur=1/0,cr=null,Oa=null,at=0,Ma=null,Gn=null,qn=0,Ro=0,Oo=null,Uf=null,Kl=0,Mo=null;function jt(){if((Oe&2)!==0&&Ce!==0)return Ce&-Ce;if(G.T!==null){var e=An;return e!==0?e:Bo()}return Ju()}function Lf(){zt===0&&(zt=(Ce&536870912)===0||Re?Qu():536870912);var e=Mt.current;return e!==null&&(e.flags|=32),zt}function Et(e,t,a){(e===_e&&(Me===2||Me===9)||e.cancelPendingCommit!==null)&&(Vn(e,0),za(e,Ce,zt,!1)),ol(e,a),((Oe&2)===0||e!==_e)&&(e===_e&&((Oe&2)===0&&(ln|=a),Ve===4&&za(e,Ce,zt,!1)),Xt(e))}function _f(e,t,a){if((Oe&6)!==0)throw Error(o(327));var n=!a&&(t&124)===0&&(t&e.expiredLanes)===0||il(e,t),i=n?ep(e,t):Uo(e,t,!0),u=n;do{if(i===0){Hn&&!n&&za(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!W0(a)){i=Uo(e,t,!1),u=!1;continue}if(i===2){if(u=t,e.errorRecoveryDisabledLanes&u)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var x=e;i=Yl;var j=x.current.memoizedState.isDehydrated;if(j&&(Vn(x,p).flags|=256),p=Uo(x,p,!1),p!==2){if(Co&&!j){x.errorRecoveryDisabledLanes|=u,ln|=u,i=4;break e}u=gt,gt=i,u!==null&&(gt===null?gt=u:gt.push.apply(gt,u))}i=p}if(u=!1,i!==2)continue}}if(i===1){Vn(e,0),za(e,t,0,!0);break}e:{switch(n=e,u=i,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:za(n,t,zt,!Ta);break e;case 2:gt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=To+300-Vt(),10<i)){if(za(n,t,zt,!Ta),Ss(n,0,!0)!==0)break e;n.timeoutHandle=fh(Hf.bind(null,n,a,gt,cr,Ao,t,zt,ln,Bn,Ta,u,2,-0,0),i);break e}Hf(n,a,gt,cr,Ao,t,zt,ln,Bn,Ta,u,0,-0,0)}}break}while(!0);Xt(e)}function Hf(e,t,a,n,i,u,p,x,j,L,K,P,_,B){if(e.timeoutHandle=-1,P=t.subtreeFlags,(P&8192||(P&16785408)===16785408)&&(Fl={stylesheets:null,count:0,unsuspend:zp},Of(t),P=Up(),P!==null)){e.cancelPendingCommit=P($f.bind(null,e,t,u,a,n,i,p,x,j,K,1,_,B)),za(e,u,p,!L);return}$f(e,t,u,a,n,i,p,x,j)}function W0(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 i=a[n],u=i.getSnapshot;i=i.value;try{if(!vt(u(),i))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&=~ko,t&=~ln,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var u=31-xt(i),p=1<<u;n[u]=-1,i&=~p}a!==0&&Zu(e,a,t)}function dr(){return(Oe&6)===0?($l(0),!1):!0}function zo(){if(Ne!==null){if(Me===0)var e=Ne.return;else e=Ne,na=Wa=null,Pi(e),Dn=null,Ul=0,e=Ne;for(;e!==null;)yf(e.alternate,e),e=e.return;Ne=null}}function Vn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,pp(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),zo(),_e=e,Ne=a=ea(e.current,null),Ce=t,Me=0,Nt=null,Ta=!1,Hn=il(e,t),Co=!1,Bn=zt=ko=ln=Ra=Ve=0,gt=Yl=null,Ao=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var i=31-xt(n),u=1<<i;t|=e[i],n&=~u}return da=t,zs(),a}function Bf(e,t){be=null,G.H=Ws,t===Cl||t===Vs?(t=td(),Me=3):t===Wc?(t=td(),Me=4):Me=t===af?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Nt=t,Ne===null&&(Ve=1,nr(e,At(t,e.current)))}function Gf(){var e=G.H;return G.H=Ws,e===null?Ws:e}function qf(){var e=G.A;return G.A=J0,e}function Do(){Ve=4,Ta||(Ce&4194048)!==Ce&&Mt.current!==null||(Hn=!0),(Ra&134217727)===0&&(ln&134217727)===0||_e===null||za(_e,Ce,zt,!1)}function Uo(e,t,a){var n=Oe;Oe|=2;var i=Gf(),u=qf();(_e!==e||Ce!==t)&&(cr=null,Vn(e,t)),t=!1;var p=Ve;e:do try{if(Me!==0&&Ne!==null){var x=Ne,j=Nt;switch(Me){case 8:zo(),p=6;break e;case 3:case 2:case 9:case 6:Mt.current===null&&(t=!0);var L=Me;if(Me=0,Nt=null,Yn(e,x,j,L),a&&Hn){p=0;break e}break;default:L=Me,Me=0,Nt=null,Yn(e,x,j,L)}}I0(),p=Ve;break}catch(K){Bf(e,K)}while(!0);return t&&e.shellSuspendCounter++,na=Wa=null,Oe=n,G.H=i,G.A=u,Ne===null&&(_e=null,Ce=0,zs()),p}function I0(){for(;Ne!==null;)Vf(Ne)}function ep(e,t){var a=Oe;Oe|=2;var n=Gf(),i=qf();_e!==e||Ce!==t?(cr=null,ur=Vt()+500,Vn(e,t)):Hn=il(e,t);e:do try{if(Me!==0&&Ne!==null){t=Ne;var u=Nt;t:switch(Me){case 1:Me=0,Nt=null,Yn(e,t,u,1);break;case 2:case 9:if(Ic(u)){Me=0,Nt=null,Yf(t);break}t=function(){Me!==2&&Me!==9||_e!==e||(Me=7),Xt(e)},u.then(t,t);break e;case 3:Me=7;break e;case 4:Me=5;break e;case 7:Ic(u)?(Me=0,Nt=null,Yf(t)):(Me=0,Nt=null,Yn(e,t,u,7));break;case 5:var p=null;switch(Ne.tag){case 26:p=Ne.memoizedState;case 5:case 27:var x=Ne;if(!p||jh(p)){Me=0,Nt=null;var j=x.sibling;if(j!==null)Ne=j;else{var L=x.return;L!==null?(Ne=L,fr(L)):Ne=null}break t}}Me=0,Nt=null,Yn(e,t,u,5);break;case 6:Me=0,Nt=null,Yn(e,t,u,6);break;case 8:zo(),Ve=6;break e;default:throw Error(o(462))}}tp();break}catch(K){Bf(e,K)}while(!0);return na=Wa=null,G.H=n,G.A=i,Oe=a,Ne!==null?0:(_e=null,Ce=0,zs(),Ve)}function tp(){for(;Ne!==null&&!Ng();)Vf(Ne)}function Vf(e){var t=gf(e.alternate,e,da);e.memoizedProps=e.pendingProps,t===null?fr(e):Ne=t}function Yf(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=uf(a,t,t.pendingProps,t.type,void 0,Ce);break;case 11:t=uf(a,t,t.pendingProps,t.type.render,t.ref,Ce);break;case 5:Pi(t);default:yf(a,t),t=Ne=Yc(t,da),t=gf(a,t,da)}e.memoizedProps=e.pendingProps,t===null?fr(e):Ne=t}function Yn(e,t,a,n){na=Wa=null,Pi(t),Dn=null,Ul=0;var i=t.return;try{if(K0(e,i,t,a,Ce)){Ve=1,nr(e,At(a,e.current)),Ne=null;return}}catch(u){if(i!==null)throw Ne=i,u;Ve=1,nr(e,At(a,e.current)),Ne=null;return}t.flags&32768?(Re||n===1?e=!0:Hn||(Ce&536870912)!==0?e=!1:(Ta=e=!0,(n===2||n===9||n===3||n===6)&&(n=Mt.current,n!==null&&n.tag===13&&(n.flags|=16384))),Kf(t,e)):fr(t)}function fr(e){var t=e;do{if((t.flags&32768)!==0){Kf(t,Ta);return}e=t.return;var a=Q0(t.alternate,t,da);if(a!==null){Ne=a;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);Ve===0&&(Ve=5)}function Kf(e,t){do{var a=X0(e.alternate,e);if(a!==null){a.flags&=32767,Ne=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=a}while(e!==null);Ve=6,Ne=null}function $f(e,t,a,n,i,u,p,x,j){e.cancelPendingCommit=null;do hr();while(at!==0);if((Oe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=ji,zg(e,a,u,p,x,j),e===_e&&(Ne=_e=null,Ce=0),Gn=t,Ma=e,qn=a,Ro=u,Oo=i,Uf=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,sp(xs,function(){return Jf(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=G.T,G.T=null,i=V.p,V.p=2,p=Oe,Oe|=4;try{Z0(e,t,a)}finally{Oe=p,V.p=i,G.T=n}}at=1,Qf(),Xf(),Zf()}}function Qf(){if(at===1){at=0;var e=Ma,t=Gn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=G.T,G.T=null;var n=V.p;V.p=2;var i=Oe;Oe|=4;try{Af(t,e);var u=Xo,p=zc(e.containerInfo),x=u.focusedElem,j=u.selectionRange;if(p!==x&&x&&x.ownerDocument&&Mc(x.ownerDocument.documentElement,x)){if(j!==null&&vi(x)){var L=j.start,K=j.end;if(K===void 0&&(K=L),"selectionStart"in x)x.selectionStart=L,x.selectionEnd=Math.min(K,x.value.length);else{var P=x.ownerDocument||document,_=P&&P.defaultView||window;if(_.getSelection){var B=_.getSelection(),ge=x.textContent.length,fe=Math.min(j.start,ge),Ue=j.end===void 0?fe:Math.min(j.end,ge);!B.extend&&fe>Ue&&(p=Ue,Ue=fe,fe=p);var M=Oc(x,fe),k=Oc(x,Ue);if(M&&k&&(B.rangeCount!==1||B.anchorNode!==M.node||B.anchorOffset!==M.offset||B.focusNode!==k.node||B.focusOffset!==k.offset)){var U=P.createRange();U.setStart(M.node,M.offset),B.removeAllRanges(),fe>Ue?(B.addRange(U),B.extend(k.node,k.offset)):(U.setEnd(k.node,k.offset),B.addRange(U))}}}}for(P=[],B=x;B=B.parentNode;)B.nodeType===1&&P.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<P.length;x++){var X=P[x];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}Er=!!Qo,Xo=Qo=null}finally{Oe=i,V.p=n,G.T=a}}e.current=t,at=2}}function Xf(){if(at===2){at=0;var e=Ma,t=Gn,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=G.T,G.T=null;var n=V.p;V.p=2;var i=Oe;Oe|=4;try{jf(e,t.alternate,t)}finally{Oe=i,V.p=n,G.T=a}}at=3}}function Zf(){if(at===4||at===3){at=0,jg();var e=Ma,t=Gn,a=qn,n=Uf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?at=5:(at=0,Gn=Ma=null,Pf(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Oa=null),Wr(a),t=t.stateNode,yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(rl,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=G.T,i=V.p,V.p=2,G.T=null;try{for(var u=e.onRecoverableError,p=0;p<n.length;p++){var x=n[p];u(x.value,{componentStack:x.stack})}}finally{G.T=t,V.p=i}}(qn&3)!==0&&hr(),Xt(e),i=e.pendingLanes,(a&4194090)!==0&&(i&42)!==0?e===Mo?Kl++:(Kl=0,Mo=e):Kl=0,$l(0)}}function Pf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,jl(t)))}function hr(e){return Qf(),Xf(),Zf(),Jf()}function Jf(){if(at!==5)return!1;var e=Ma,t=Ro;Ro=0;var a=Wr(qn),n=G.T,i=V.p;try{V.p=32>a?32:a,G.T=null,a=Oo,Oo=null;var u=Ma,p=qn;if(at=0,Gn=Ma=null,qn=0,(Oe&6)!==0)throw Error(o(331));var x=Oe;if(Oe|=4,zf(u.current),Rf(u,u.current,p,a),Oe=x,$l(0,!1),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(rl,u)}catch{}return!0}finally{V.p=i,G.T=n,Pf(e,t)}}function Ff(e,t,a){t=At(a,t),t=uo(e.stateNode,t,2),e=wa(e,t,2),e!==null&&(ol(e,2),Xt(e))}function Le(e,t,a){if(e.tag===3)Ff(e,e,a);else for(;t!==null;){if(t.tag===3){Ff(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Oa===null||!Oa.has(n))){e=At(a,e),a=ef(2),n=wa(t,a,2),n!==null&&(tf(a,n,t,e),ol(n,2),Xt(n));break}}t=t.return}}function Lo(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new F0;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(a)||(Co=!0,i.add(a),e=ap.bind(null,e,t,a),t.then(e,e))}function ap(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,_e===e&&(Ce&a)===a&&(Ve===4||Ve===3&&(Ce&62914560)===Ce&&300>Vt()-To?(Oe&2)===0&&Vn(e,0):ko|=a,Bn===Ce&&(Bn=0)),Xt(e)}function Wf(e,t){t===0&&(t=Xu()),e=jn(e,t),e!==null&&(ol(e,t),Xt(e))}function np(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Wf(e,a)}function lp(e,t){var a=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(a=i.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(o(314))}n!==null&&n.delete(t),Wf(e,a)}function sp(e,t){return Ft(e,t)}var mr=null,Kn=null,_o=!1,gr=!1,Ho=!1,sn=0;function Xt(e){e!==Kn&&e.next===null&&(Kn===null?mr=Kn=e:Kn=Kn.next=e),gr=!0,_o||(_o=!0,ip())}function $l(e,t){if(!Ho&&gr){Ho=!0;do for(var a=!1,n=mr;n!==null;){if(e!==0){var i=n.pendingLanes;if(i===0)var u=0;else{var p=n.suspendedLanes,x=n.pingedLanes;u=(1<<31-xt(42|e)+1)-1,u&=i&~(p&~x),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,ah(n,u))}else u=Ce,u=Ss(n,n===_e?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||il(n,u)||(a=!0,ah(n,u));n=n.next}while(a);Ho=!1}}function rp(){If()}function If(){gr=_o=!1;var e=0;sn!==0&&(gp()&&(e=sn),sn=0);for(var t=Vt(),a=null,n=mr;n!==null;){var i=n.next,u=eh(n,t);u===0?(n.next=null,a===null?mr=i:a.next=i,i===null&&(Kn=a)):(a=n,(e!==0||(u&3)!==0)&&(gr=!0)),n=i}$l(e)}function eh(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var p=31-xt(u),x=1<<p,j=i[p];j===-1?((x&a)===0||(x&n)!==0)&&(i[p]=Mg(x,t)):j<=t&&(e.expiredLanes|=x),u&=~x}if(t=_e,a=Ce,a=Ss(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Me===2||Me===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&sl(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||il(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&sl(n),Wr(a)){case 2:case 8:a=Ku;break;case 32:a=xs;break;case 268435456:a=$u;break;default:a=xs}return n=th.bind(null,e),a=Ft(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&sl(n),e.callbackPriority=2,e.callbackNode=null,2}function th(e,t){if(at!==0&&at!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(hr()&&e.callbackNode!==a)return null;var n=Ce;return n=Ss(e,e===_e?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(_f(e,n,t),eh(e,Vt()),e.callbackNode!=null&&e.callbackNode===a?th.bind(null,e):null)}function ah(e,t){if(hr())return null;_f(e,t,!0)}function ip(){yp(function(){(Oe&6)!==0?Ft(Yu,rp):If()})}function Bo(){return sn===0&&(sn=Qu()),sn}function nh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Cs(""+e)}function lh(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 op(e,t,a,n,i){if(t==="submit"&&a&&a.stateNode===i){var u=nh((i[dt]||null).action),p=n.submitter;p&&(t=(t=p[dt]||null)?nh(t.formAction):p.getAttribute("formAction"),t!==null&&(u=t,p=null));var x=new Rs("action","action",null,n,i);e.push({event:x,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(sn!==0){var j=p?lh(i,p):new FormData(i);lo(a,{pending:!0,data:j,method:i.method,action:u},null,j)}}else typeof u=="function"&&(x.preventDefault(),j=p?lh(i,p):new FormData(i),lo(a,{pending:!0,data:j,method:i.method,action:u},u,j))},currentTarget:i}]})}}for(var Go=0;Go<Ni.length;Go++){var qo=Ni[Go],up=qo.toLowerCase(),cp=qo[0].toUpperCase()+qo.slice(1);_t(up,"on"+cp)}_t(Lc,"onAnimationEnd"),_t(_c,"onAnimationIteration"),_t(Hc,"onAnimationStart"),_t("dblclick","onDoubleClick"),_t("focusin","onFocus"),_t("focusout","onBlur"),_t(k0,"onTransitionRun"),_t(A0,"onTransitionStart"),_t(T0,"onTransitionCancel"),_t(Bc,"onTransitionEnd"),mn("onMouseEnter",["mouseout","mouseover"]),mn("onMouseLeave",["mouseout","mouseover"]),mn("onPointerEnter",["pointerout","pointerover"]),mn("onPointerLeave",["pointerout","pointerover"]),Ya("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ya("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ya("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ya("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ya("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ya("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ql="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(" "),dp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ql));function sh(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],i=n.event;n=n.listeners;e:{var u=void 0;if(t)for(var p=n.length-1;0<=p;p--){var x=n[p],j=x.instance,L=x.currentTarget;if(x=x.listener,j!==u&&i.isPropagationStopped())break e;u=x,i.currentTarget=L;try{u(i)}catch(K){ar(K)}i.currentTarget=null,u=j}else for(p=0;p<n.length;p++){if(x=n[p],j=x.instance,L=x.currentTarget,x=x.listener,j!==u&&i.isPropagationStopped())break e;u=x,i.currentTarget=L;try{u(i)}catch(K){ar(K)}i.currentTarget=null,u=j}}}}function je(e,t){var a=t[Ir];a===void 0&&(a=t[Ir]=new Set);var n=e+"__bubble";a.has(n)||(rh(t,e,2,!1),a.add(n))}function Vo(e,t,a){var n=0;t&&(n|=4),rh(a,e,n,t)}var pr="_reactListening"+Math.random().toString(36).slice(2);function Yo(e){if(!e[pr]){e[pr]=!0,Wu.forEach(function(a){a!=="selectionchange"&&(dp.has(a)||Vo(a,!1,e),Vo(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[pr]||(t[pr]=!0,Vo("selectionchange",!1,t))}}function rh(e,t,a,n){switch(Rh(t)){case 2:var i=Hp;break;case 8:i=Bp;break;default:i=nu}a=i.bind(null,t,a,e),i=void 0,!ci||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,a,{capture:!0,passive:i}):e.addEventListener(t,a,!0):i!==void 0?e.addEventListener(t,a,{passive:i}):e.addEventListener(t,a,!1)}function Ko(e,t,a,n,i){var u=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var p=n.tag;if(p===3||p===4){var x=n.stateNode.containerInfo;if(x===i)break;if(p===4)for(p=n.return;p!==null;){var j=p.tag;if((j===3||j===4)&&p.stateNode.containerInfo===i)return;p=p.return}for(;x!==null;){if(p=dn(x),p===null)return;if(j=p.tag,j===5||j===6||j===26||j===27){n=u=p;continue e}x=x.parentNode}}n=n.return}fc(function(){var L=u,K=oi(a),P=[];e:{var _=Gc.get(e);if(_!==void 0){var B=Rs,ge=e;switch(e){case"keypress":if(As(a)===0)break e;case"keydown":case"keyup":B=s0;break;case"focusin":ge="focus",B=mi;break;case"focusout":ge="blur",B=mi;break;case"beforeblur":case"afterblur":B=mi;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":B=gc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=Xg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=o0;break;case Lc:case _c:case Hc:B=Jg;break;case Bc:B=c0;break;case"scroll":case"scrollend":B=$g;break;case"wheel":B=f0;break;case"copy":case"cut":case"paste":B=Wg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=yc;break;case"toggle":case"beforetoggle":B=m0}var fe=(t&4)!==0,Ue=!fe&&(e==="scroll"||e==="scrollend"),M=fe?_!==null?_+"Capture":null:_;fe=[];for(var k=L,U;k!==null;){var X=k;if(U=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||U===null||M===null||(X=dl(k,M),X!=null&&fe.push(Xl(k,X,U))),Ue)break;k=k.return}0<fe.length&&(_=new B(_,ge,null,a,K),P.push({event:_,listeners:fe}))}}if((t&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",_&&a!==ii&&(ge=a.relatedTarget||a.fromElement)&&(dn(ge)||ge[cn]))break e;if((B||_)&&(_=K.window===K?K:(_=K.ownerDocument)?_.defaultView||_.parentWindow:window,B?(ge=a.relatedTarget||a.toElement,B=L,ge=ge?dn(ge):null,ge!==null&&(Ue=f(ge),fe=ge.tag,ge!==Ue||fe!==5&&fe!==27&&fe!==6)&&(ge=null)):(B=null,ge=L),B!==ge)){if(fe=gc,X="onMouseLeave",M="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(fe=yc,X="onPointerLeave",M="onPointerEnter",k="pointer"),Ue=B==null?_:cl(B),U=ge==null?_:cl(ge),_=new fe(X,k+"leave",B,a,K),_.target=Ue,_.relatedTarget=U,X=null,dn(K)===L&&(fe=new fe(M,k+"enter",ge,a,K),fe.target=U,fe.relatedTarget=Ue,X=fe),Ue=X,B&&ge)t:{for(fe=B,M=ge,k=0,U=fe;U;U=$n(U))k++;for(U=0,X=M;X;X=$n(X))U++;for(;0<k-U;)fe=$n(fe),k--;for(;0<U-k;)M=$n(M),U--;for(;k--;){if(fe===M||M!==null&&fe===M.alternate)break t;fe=$n(fe),M=$n(M)}fe=null}else fe=null;B!==null&&ih(P,_,B,fe,!1),ge!==null&&Ue!==null&&ih(P,Ue,ge,fe,!0)}}e:{if(_=L?cl(L):window,B=_.nodeName&&_.nodeName.toLowerCase(),B==="select"||B==="input"&&_.type==="file")var ne=Ec;else if(Nc(_))if(Cc)ne=j0;else{ne=w0;var we=S0}else B=_.nodeName,!B||B.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?L&&ri(L.elementType)&&(ne=Ec):ne=N0;if(ne&&(ne=ne(e,L))){jc(P,ne,a,K);break e}we&&we(e,_,L),e==="focusout"&&L&&_.type==="number"&&L.memoizedProps.value!=null&&si(_,"number",_.value)}switch(we=L?cl(L):window,e){case"focusin":(Nc(we)||we.contentEditable==="true")&&(Sn=we,bi=L,vl=null);break;case"focusout":vl=bi=Sn=null;break;case"mousedown":Si=!0;break;case"contextmenu":case"mouseup":case"dragend":Si=!1,Dc(P,a,K);break;case"selectionchange":if(C0)break;case"keydown":case"keyup":Dc(P,a,K)}var ie;if(pi)e:{switch(e){case"compositionstart":var he="onCompositionStart";break e;case"compositionend":he="onCompositionEnd";break e;case"compositionupdate":he="onCompositionUpdate";break e}he=void 0}else bn?Sc(e,a)&&(he="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(he="onCompositionStart");he&&(xc&&a.locale!=="ko"&&(bn||he!=="onCompositionStart"?he==="onCompositionEnd"&&bn&&(ie=hc()):(xa=K,di="value"in xa?xa.value:xa.textContent,bn=!0)),we=yr(L,he),0<we.length&&(he=new pc(he,e,null,a,K),P.push({event:he,listeners:we}),ie?he.data=ie:(ie=wc(a),ie!==null&&(he.data=ie)))),(ie=p0?y0(e,a):x0(e,a))&&(he=yr(L,"onBeforeInput"),0<he.length&&(we=new pc("onBeforeInput","beforeinput",null,a,K),P.push({event:we,listeners:he}),we.data=ie)),op(P,e,L,a,K)}sh(P,t)})}function Xl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function yr(e,t){for(var a=t+"Capture",n=[];e!==null;){var i=e,u=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||u===null||(i=dl(e,a),i!=null&&n.unshift(Xl(e,i,u)),i=dl(e,t),i!=null&&n.push(Xl(e,i,u))),e.tag===3)return n;e=e.return}return[]}function $n(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ih(e,t,a,n,i){for(var u=t._reactName,p=[];a!==null&&a!==n;){var x=a,j=x.alternate,L=x.stateNode;if(x=x.tag,j!==null&&j===n)break;x!==5&&x!==26&&x!==27||L===null||(j=L,i?(L=dl(a,u),L!=null&&p.unshift(Xl(a,L,j))):i||(L=dl(a,u),L!=null&&p.push(Xl(a,L,j)))),a=a.return}p.length!==0&&e.push({event:t,listeners:p})}var fp=/\r\n?/g,hp=/\u0000|\uFFFD/g;function oh(e){return(typeof e=="string"?e:""+e).replace(fp,`
|
|
49
|
-
`).replace(hp,"")}function uh(e,t){return t=oh(t),oh(e)===t}function xr(){}function De(e,t,a,n,i,u){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||yn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&yn(e,""+n);break;case"className":Ns(e,"class",n);break;case"tabIndex":Ns(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ns(e,a,n);break;case"style":cc(e,n,u);break;case"data":if(t!=="object"){Ns(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=Cs(""+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"&&De(e,t,"name",i.name,i,null),De(e,t,"formEncType",i.formEncType,i,null),De(e,t,"formMethod",i.formMethod,i,null),De(e,t,"formTarget",i.formTarget,i,null)):(De(e,t,"encType",i.encType,i,null),De(e,t,"method",i.method,i,null),De(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Cs(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=xr);break;case"onScroll":n!=null&&je("scroll",e);break;case"onScrollEnd":n!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(o(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=Cs(""+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":je("beforetoggle",e),je("toggle",e),ws(e,"popover",n);break;case"xlinkActuate":Wt(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Wt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Wt(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Wt(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Wt(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Wt(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":ws(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=Yg.get(a)||a,ws(e,a,n))}}function $o(e,t,a,n,i,u){switch(a){case"style":cc(e,n,u);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof n=="string"?yn(e,n):(typeof n=="number"||typeof n=="bigint")&&yn(e,""+n);break;case"onScroll":n!=null&&je("scroll",e);break;case"onScrollEnd":n!=null&&je("scrollend",e);break;case"onClick":n!=null&&(e.onclick=xr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Iu.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(i=a.endsWith("Capture"),t=a.slice(2,i?a.length-7:void 0),u=e[dt]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,i),typeof n=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,i);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):ws(e,a,n)}}}function nt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("load",e);var n=!1,i=!1,u;for(u in a)if(a.hasOwnProperty(u)){var p=a[u];if(p!=null)switch(u){case"src":n=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:De(e,t,u,p,a,null)}}i&&De(e,t,"srcSet",a.srcSet,a,null),n&&De(e,t,"src",a.src,a,null);return;case"input":je("invalid",e);var x=u=p=i=null,j=null,L=null;for(n in a)if(a.hasOwnProperty(n)){var K=a[n];if(K!=null)switch(n){case"name":i=K;break;case"type":p=K;break;case"checked":j=K;break;case"defaultChecked":L=K;break;case"value":u=K;break;case"defaultValue":x=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(o(137,t));break;default:De(e,t,n,K,a,null)}}rc(e,u,x,j,L,p,i,!1),js(e);return;case"select":je("invalid",e),n=p=u=null;for(i in a)if(a.hasOwnProperty(i)&&(x=a[i],x!=null))switch(i){case"value":u=x;break;case"defaultValue":p=x;break;case"multiple":n=x;default:De(e,t,i,x,a,null)}t=u,a=p,e.multiple=!!n,t!=null?pn(e,!!n,t,!1):a!=null&&pn(e,!!n,a,!0);return;case"textarea":je("invalid",e),u=i=n=null;for(p in a)if(a.hasOwnProperty(p)&&(x=a[p],x!=null))switch(p){case"value":n=x;break;case"defaultValue":i=x;break;case"children":u=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(o(91));break;default:De(e,t,p,x,a,null)}oc(e,n,i,u),js(e);return;case"option":for(j in a)if(a.hasOwnProperty(j)&&(n=a[j],n!=null))switch(j){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:De(e,t,j,n,a,null)}return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(n=0;n<Ql.length;n++)je(Ql[n],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("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(L in a)if(a.hasOwnProperty(L)&&(n=a[L],n!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:De(e,t,L,n,a,null)}return;default:if(ri(t)){for(K in a)a.hasOwnProperty(K)&&(n=a[K],n!==void 0&&$o(e,t,K,n,a,void 0));return}}for(x in a)a.hasOwnProperty(x)&&(n=a[x],n!=null&&De(e,t,x,n,a,null))}function mp(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 i=null,u=null,p=null,x=null,j=null,L=null,K=null;for(B in a){var P=a[B];if(a.hasOwnProperty(B)&&P!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":j=P;default:n.hasOwnProperty(B)||De(e,t,B,null,n,P)}}for(var _ in n){var B=n[_];if(P=a[_],n.hasOwnProperty(_)&&(B!=null||P!=null))switch(_){case"type":u=B;break;case"name":i=B;break;case"checked":L=B;break;case"defaultChecked":K=B;break;case"value":p=B;break;case"defaultValue":x=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(o(137,t));break;default:B!==P&&De(e,t,_,B,n,P)}}li(e,p,x,j,L,K,u,i);return;case"select":B=p=x=_=null;for(u in a)if(j=a[u],a.hasOwnProperty(u)&&j!=null)switch(u){case"value":break;case"multiple":B=j;default:n.hasOwnProperty(u)||De(e,t,u,null,n,j)}for(i in n)if(u=n[i],j=a[i],n.hasOwnProperty(i)&&(u!=null||j!=null))switch(i){case"value":_=u;break;case"defaultValue":x=u;break;case"multiple":p=u;default:u!==j&&De(e,t,i,u,n,j)}t=x,a=p,n=B,_!=null?pn(e,!!a,_,!1):!!n!=!!a&&(t!=null?pn(e,!!a,t,!0):pn(e,!!a,a?[]:"",!1));return;case"textarea":B=_=null;for(x in a)if(i=a[x],a.hasOwnProperty(x)&&i!=null&&!n.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:De(e,t,x,null,n,i)}for(p in n)if(i=n[p],u=a[p],n.hasOwnProperty(p)&&(i!=null||u!=null))switch(p){case"value":_=i;break;case"defaultValue":B=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==u&&De(e,t,p,i,n,u)}ic(e,_,B);return;case"option":for(var ge in a)if(_=a[ge],a.hasOwnProperty(ge)&&_!=null&&!n.hasOwnProperty(ge))switch(ge){case"selected":e.selected=!1;break;default:De(e,t,ge,null,n,_)}for(j in n)if(_=n[j],B=a[j],n.hasOwnProperty(j)&&_!==B&&(_!=null||B!=null))switch(j){case"selected":e.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:De(e,t,j,_,n,B)}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 fe in a)_=a[fe],a.hasOwnProperty(fe)&&_!=null&&!n.hasOwnProperty(fe)&&De(e,t,fe,null,n,_);for(L in n)if(_=n[L],B=a[L],n.hasOwnProperty(L)&&_!==B&&(_!=null||B!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(o(137,t));break;default:De(e,t,L,_,n,B)}return;default:if(ri(t)){for(var Ue in a)_=a[Ue],a.hasOwnProperty(Ue)&&_!==void 0&&!n.hasOwnProperty(Ue)&&$o(e,t,Ue,void 0,n,_);for(K in n)_=n[K],B=a[K],!n.hasOwnProperty(K)||_===B||_===void 0&&B===void 0||$o(e,t,K,_,n,B);return}}for(var M in a)_=a[M],a.hasOwnProperty(M)&&_!=null&&!n.hasOwnProperty(M)&&De(e,t,M,null,n,_);for(P in n)_=n[P],B=a[P],!n.hasOwnProperty(P)||_===B||_==null&&B==null||De(e,t,P,_,n,B)}var Qo=null,Xo=null;function vr(e){return e.nodeType===9?e:e.ownerDocument}function ch(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 dh(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 Zo(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 Po=null;function gp(){var e=window.event;return e&&e.type==="popstate"?e===Po?!1:(Po=e,!0):(Po=null,!1)}var fh=typeof setTimeout=="function"?setTimeout:void 0,pp=typeof clearTimeout=="function"?clearTimeout:void 0,hh=typeof Promise=="function"?Promise:void 0,yp=typeof queueMicrotask=="function"?queueMicrotask:typeof hh<"u"?function(e){return hh.resolve(null).then(e).catch(xp)}:fh;function xp(e){setTimeout(function(){throw e})}function Da(e){return e==="head"}function mh(e,t){var a=t,n=0,i=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"){if(0<n&&8>n){a=n;var p=e.ownerDocument;if(a&1&&Zl(p.documentElement),a&2&&Zl(p.body),a&4)for(a=p.head,Zl(a),p=a.firstChild;p;){var x=p.nextSibling,j=p.nodeName;p[ul]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&p.rel.toLowerCase()==="stylesheet"||a.removeChild(p),p=x}}if(i===0){e.removeChild(u),as(t);return}i--}else a==="$"||a==="$?"||a==="$!"?i++:n=a.charCodeAt(0)-48;else n=0;a=u}while(a);as(t)}function Jo(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":Jo(a),ei(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function vp(e,t,a,n){for(;e.nodeType===1;){var i=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[ul])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!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Bt(e.nextSibling),e===null)break}return null}function bp(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Bt(e.nextSibling),e===null))return null;return e}function Fo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Sp(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 Bt(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 Wo=null;function gh(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 ph(e,t,a){switch(t=vr(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Zl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ei(e)}var Dt=new Map,yh=new Set;function br(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fa=V.d;V.d={f:wp,r:Np,D:jp,C:Ep,L:Cp,m:kp,X:Tp,S:Ap,M:Rp};function wp(){var e=fa.f(),t=dr();return e||t}function Np(e){var t=fn(e);t!==null&&t.tag===5&&t.type==="form"?Ld(t):fa.r(e)}var Qn=typeof document>"u"?null:document;function xh(e,t,a){var n=Qn;if(n&&typeof t=="string"&&t){var i=kt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),yh.has(i)||(yh.add(i),e={rel:e,crossOrigin:a,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),nt(t,"link",e),Je(t),n.head.appendChild(t)))}}function jp(e){fa.D(e),xh("dns-prefetch",e,null)}function Ep(e,t){fa.C(e,t),xh("preconnect",e,t)}function Cp(e,t,a){fa.L(e,t,a);var n=Qn;if(n&&e&&t){var i='link[rel="preload"][as="'+kt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+kt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+kt(a.imageSizes)+'"]')):i+='[href="'+kt(e)+'"]';var u=i;switch(t){case"style":u=Xn(e);break;case"script":u=Zn(e)}Dt.has(u)||(e=v({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Dt.set(u,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(Pl(u))||t==="script"&&n.querySelector(Jl(u))||(t=n.createElement("link"),nt(t,"link",e),Je(t),n.head.appendChild(t)))}}function kp(e,t){fa.m(e,t);var a=Qn;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+kt(n)+'"][href="'+kt(e)+'"]',u=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Zn(e)}if(!Dt.has(u)&&(e=v({rel:"modulepreload",href:e},t),Dt.set(u,e),a.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Jl(u)))return}n=a.createElement("link"),nt(n,"link",e),Je(n),a.head.appendChild(n)}}}function Ap(e,t,a){fa.S(e,t,a);var n=Qn;if(n&&e){var i=hn(n).hoistableStyles,u=Xn(e);t=t||"default";var p=i.get(u);if(!p){var x={loading:0,preload:null};if(p=n.querySelector(Pl(u)))x.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Dt.get(u))&&Io(e,a);var j=p=n.createElement("link");Je(j),nt(j,"link",e),j._p=new Promise(function(L,K){j.onload=L,j.onerror=K}),j.addEventListener("load",function(){x.loading|=1}),j.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Sr(p,t,n)}p={type:"stylesheet",instance:p,count:1,state:x},i.set(u,p)}}}function Tp(e,t){fa.X(e,t);var a=Qn;if(a&&e){var n=hn(a).hoistableScripts,i=Zn(e),u=n.get(i);u||(u=a.querySelector(Jl(i)),u||(e=v({src:e,async:!0},t),(t=Dt.get(i))&&eu(e,t),u=a.createElement("script"),Je(u),nt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(i,u))}}function Rp(e,t){fa.M(e,t);var a=Qn;if(a&&e){var n=hn(a).hoistableScripts,i=Zn(e),u=n.get(i);u||(u=a.querySelector(Jl(i)),u||(e=v({src:e,async:!0,type:"module"},t),(t=Dt.get(i))&&eu(e,t),u=a.createElement("script"),Je(u),nt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(i,u))}}function vh(e,t,a,n){var i=(i=F.current)?br(i):null;if(!i)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Xn(a.href),a=hn(i).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=Xn(a.href);var u=hn(i).hoistableStyles,p=u.get(e);if(p||(i=i.ownerDocument||i,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,p),(u=i.querySelector(Pl(e)))&&!u._p&&(p.instance=u,p.state.loading=5),Dt.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},Dt.set(e,a),u||Op(i,e,a,p.state))),t&&n===null)throw Error(o(528,""));return p}if(t&&n!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Zn(a),a=hn(i).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(o(444,e))}}function Xn(e){return'href="'+kt(e)+'"'}function Pl(e){return'link[rel="stylesheet"]['+e+"]"}function bh(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Op(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}),nt(t,"link",a),Je(t),e.head.appendChild(t))}function Zn(e){return'[src="'+kt(e)+'"]'}function Jl(e){return"script[async]"+e}function Sh(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+kt(a.href)+'"]');if(n)return t.instance=n,Je(n),n;var i=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Je(n),nt(n,"style",i),Sr(n,a.precedence,e),t.instance=n;case"stylesheet":i=Xn(a.href);var u=e.querySelector(Pl(i));if(u)return t.state.loading|=4,t.instance=u,Je(u),u;n=bh(a),(i=Dt.get(i))&&Io(n,i),u=(e.ownerDocument||e).createElement("link"),Je(u);var p=u;return p._p=new Promise(function(x,j){p.onload=x,p.onerror=j}),nt(u,"link",n),t.state.loading|=4,Sr(u,a.precedence,e),t.instance=u;case"script":return u=Zn(a.src),(i=e.querySelector(Jl(u)))?(t.instance=i,Je(i),i):(n=a,(i=Dt.get(u))&&(n=v({},a),eu(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),Je(i),nt(i,"link",n),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Sr(n,a.precedence,e));return t.instance}function Sr(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,u=i,p=0;p<n.length;p++){var x=n[p];if(x.dataset.precedence===t)u=x;else if(u!==i)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Io(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function eu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var wr=null;function wh(e,t,a){if(wr===null){var n=new Map,i=wr=new Map;i.set(a,n)}else i=wr,n=i.get(a),n||(n=new Map,i.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),i=0;i<a.length;i++){var u=a[i];if(!(u[ul]||u[lt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var p=u.getAttribute(t)||"";p=e+p;var x=n.get(p);x?x.push(u):n.set(p,[u])}}return n}function Nh(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Mp(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 jh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Fl=null;function zp(){}function Dp(e,t,a){if(Fl===null)throw Error(o(475));var n=Fl;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var i=Xn(a.href),u=e.querySelector(Pl(i));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(n.count++,n=Nr.bind(n),e.then(n,n)),t.state.loading|=4,t.instance=u,Je(u);return}u=e.ownerDocument||e,a=bh(a),(i=Dt.get(i))&&Io(a,i),u=u.createElement("link"),Je(u);var p=u;p._p=new Promise(function(x,j){p.onload=x,p.onerror=j}),nt(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=Nr.bind(n),e.addEventListener("load",t),e.addEventListener("error",t))}}function Up(){if(Fl===null)throw Error(o(475));var e=Fl;return e.stylesheets&&e.count===0&&tu(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&tu(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 Nr(){if(this.count--,this.count===0){if(this.stylesheets)tu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var jr=null;function tu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,jr=new Map,t.forEach(Lp,e),jr=null,Nr.call(e))}function Lp(e,t){if(!(t.state.loading&4)){var a=jr.get(e);if(a)var n=a.get(null);else{a=new Map,jr.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<i.length;u++){var p=i[u];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(a.set(p.dataset.precedence,p),n=p)}n&&a.set(null,n)}i=t.instance,p=i.getAttribute("data-precedence"),u=a.get(p)||n,u===n&&a.set(null,i),a.set(p,i),this.count++,n=Nr.bind(this),i.addEventListener("load",n),i.addEventListener("error",n),u?u.parentNode.insertBefore(i,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Wl={$$typeof:D,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function _p(e,t,a,n,i,u,p,x){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=Jr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jr(0),this.hiddenUpdates=Jr(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=u,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function Eh(e,t,a,n,i,u,p,x,j,L,K,P){return e=new _p(e,t,a,p,x,j,L,P),t=1,u===!0&&(t|=24),u=bt(3,null,null,t),e.current=u,u.stateNode=e,t=Ui(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:n,isDehydrated:a,cache:t},Bi(u),e}function Ch(e){return e?(e=En,e):En}function kh(e,t,a,n,i,u){i=Ch(i),n.context===null?n.context=i:n.pendingContext=i,n=Sa(t),n.payload={element:a},u=u===void 0?null:u,u!==null&&(n.callback=u),a=wa(e,n,t),a!==null&&(Et(a,e,t),Al(a,e,t))}function Ah(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function au(e,t){Ah(e,t),(e=e.alternate)&&Ah(e,t)}function Th(e){if(e.tag===13){var t=jn(e,67108864);t!==null&&Et(t,e,67108864),au(e,67108864)}}var Er=!0;function Hp(e,t,a,n){var i=G.T;G.T=null;var u=V.p;try{V.p=2,nu(e,t,a,n)}finally{V.p=u,G.T=i}}function Bp(e,t,a,n){var i=G.T;G.T=null;var u=V.p;try{V.p=8,nu(e,t,a,n)}finally{V.p=u,G.T=i}}function nu(e,t,a,n){if(Er){var i=lu(n);if(i===null)Ko(e,t,n,Cr,a),Oh(e,n);else if(qp(i,e,t,a,n))n.stopPropagation();else if(Oh(e,n),t&4&&-1<Gp.indexOf(e)){for(;i!==null;){var u=fn(i);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var p=Va(u.pendingLanes);if(p!==0){var x=u;for(x.pendingLanes|=2,x.entangledLanes|=2;p;){var j=1<<31-xt(p);x.entanglements[1]|=j,p&=~j}Xt(u),(Oe&6)===0&&(ur=Vt()+500,$l(0))}}break;case 13:x=jn(u,2),x!==null&&Et(x,u,2),dr(),au(u,2)}if(u=lu(n),u===null&&Ko(e,t,n,Cr,a),u===i)break;i=u}i!==null&&n.stopPropagation()}else Ko(e,t,n,null,a)}}function lu(e){return e=oi(e),su(e)}var Cr=null;function su(e){if(Cr=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 Cr=e,null}function Rh(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(Eg()){case Yu:return 2;case Ku:return 8;case xs:case Cg:return 32;case $u:return 268435456;default:return 32}default:return 32}}var ru=!1,Ua=null,La=null,_a=null,Il=new Map,es=new Map,Ha=[],Gp="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 Oh(e,t){switch(e){case"focusin":case"focusout":Ua=null;break;case"dragenter":case"dragleave":La=null;break;case"mouseover":case"mouseout":_a=null;break;case"pointerover":case"pointerout":Il.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":es.delete(t.pointerId)}}function ts(e,t,a,n,i,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:u,targetContainers:[i]},t!==null&&(t=fn(t),t!==null&&Th(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function qp(e,t,a,n,i){switch(t){case"focusin":return Ua=ts(Ua,e,t,a,n,i),!0;case"dragenter":return La=ts(La,e,t,a,n,i),!0;case"mouseover":return _a=ts(_a,e,t,a,n,i),!0;case"pointerover":var u=i.pointerId;return Il.set(u,ts(Il.get(u)||null,e,t,a,n,i)),!0;case"gotpointercapture":return u=i.pointerId,es.set(u,ts(es.get(u)||null,e,t,a,n,i)),!0}return!1}function Mh(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,Dg(e.priority,function(){if(a.tag===13){var n=jt();n=Fr(n);var i=jn(a,n);i!==null&&Et(i,a,n),au(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 kr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=lu(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);ii=n,a.target.dispatchEvent(n),ii=null}else return t=fn(a),t!==null&&Th(t),e.blockedOn=a,!1;t.shift()}return!0}function zh(e,t,a){kr(e)&&a.delete(t)}function Vp(){ru=!1,Ua!==null&&kr(Ua)&&(Ua=null),La!==null&&kr(La)&&(La=null),_a!==null&&kr(_a)&&(_a=null),Il.forEach(zh),es.forEach(zh)}function Ar(e,t){e.blockedOn===t&&(e.blockedOn=null,ru||(ru=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Vp)))}var Tr=null;function Dh(e){Tr!==e&&(Tr=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Tr===e&&(Tr=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],i=e[t+2];if(typeof n!="function"){if(su(n||a)===null)continue;break}var u=fn(a);u!==null&&(e.splice(t,3),t-=3,lo(u,{pending:!0,data:i,method:a.method,action:n},n,i))}}))}function as(e){function t(j){return Ar(j,e)}Ua!==null&&Ar(Ua,e),La!==null&&Ar(La,e),_a!==null&&Ar(_a,e),Il.forEach(t),es.forEach(t);for(var a=0;a<Ha.length;a++){var n=Ha[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Ha.length&&(a=Ha[0],a.blockedOn===null);)Mh(a),a.blockedOn===null&&Ha.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var i=a[n],u=a[n+1],p=i[dt]||null;if(typeof u=="function")p||Dh(a);else if(p){var x=null;if(u&&u.hasAttribute("formAction")){if(i=u,p=u[dt]||null)x=p.formAction;else if(su(i)!==null)continue}else x=p.action;typeof x=="function"?a[n+1]=x:(a.splice(n,3),n-=3),Dh(a)}}}function iu(e){this._internalRoot=e}Rr.prototype.render=iu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=jt();kh(a,n,e,t,null,null)},Rr.prototype.unmount=iu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;kh(e.current,2,null,e,null,null),dr(),t[cn]=null}};function Rr(e){this._internalRoot=e}Rr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ju();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ha.length&&t!==0&&t<Ha[a].priority;a++);Ha.splice(a,0,e),a===0&&Mh(e)}};var Uh=s.version;if(Uh!=="19.1.0")throw Error(o(527,Uh,"19.1.0"));V.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=h(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var Yp={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Or=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Or.isDisabled&&Or.supportsFiber)try{rl=Or.inject(Yp),yt=Or}catch{}}return ls.createRoot=function(e,t){if(!d(e))throw Error(o(299));var a=!1,n="",i=Jd,u=Fd,p=Wd,x=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(x=t.unstable_transitionCallbacks)),t=Eh(e,1,!1,null,null,a,n,i,u,p,x,null),e[cn]=t.current,Yo(e),new iu(t)},ls.hydrateRoot=function(e,t,a){if(!d(e))throw Error(o(299));var n=!1,i="",u=Jd,p=Fd,x=Wd,j=null,L=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(i=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(j=a.unstable_transitionCallbacks),a.formState!==void 0&&(L=a.formState)),t=Eh(e,1,!0,t,a??null,n,i,u,p,x,j,L),t.context=Ch(null),a=t.current,n=jt(),n=Fr(n),i=Sa(n),i.callback=null,wa(a,i,n),a=n,t.current.lanes=a,ol(t,a),Xt(t),e[cn]=t.current,Yo(e),new Rr(t)},ls.version="19.1.0",ls}var $h;function Ip(){if($h)return cu.exports;$h=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),cu.exports=Wp(),cu.exports}var ey=Ip();const Qh=Em(ey);var ss={},Xh;function ty(){if(Xh)return ss;Xh=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.parse=m,ss.serialize=g;const l=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,s=/^[\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,o=/^[\u0020-\u003A\u003D-\u007E]*$/,d=Object.prototype.toString,f=(()=>{const b=function(){};return b.prototype=Object.create(null),b})();function m(b,R){const N=new f,C=b.length;if(C<2)return N;const A=(R==null?void 0:R.decode)||v;let z=0;do{const T=b.indexOf("=",z);if(T===-1)break;const D=b.indexOf(";",z),q=D===-1?C:D;if(T>q){z=b.lastIndexOf(";",T-1)+1;continue}const Y=y(b,z,T),W=h(b,T,Y),H=b.slice(Y,W);if(N[H]===void 0){let O=y(b,T+1,q),J=h(b,q,O);const re=A(b.slice(O,J));N[H]=re}z=q+1}while(z<C);return N}function y(b,R,N){do{const C=b.charCodeAt(R);if(C!==32&&C!==9)return R}while(++R<N);return N}function h(b,R,N){for(;R>N;){const C=b.charCodeAt(--R);if(C!==32&&C!==9)return R+1}return N}function g(b,R,N){const C=(N==null?void 0:N.encode)||encodeURIComponent;if(!l.test(b))throw new TypeError(`argument name is invalid: ${b}`);const A=C(R);if(!s.test(A))throw new TypeError(`argument val is invalid: ${R}`);let z=b+"="+A;if(!N)return z;if(N.maxAge!==void 0){if(!Number.isInteger(N.maxAge))throw new TypeError(`option maxAge is invalid: ${N.maxAge}`);z+="; Max-Age="+N.maxAge}if(N.domain){if(!r.test(N.domain))throw new TypeError(`option domain is invalid: ${N.domain}`);z+="; Domain="+N.domain}if(N.path){if(!o.test(N.path))throw new TypeError(`option path is invalid: ${N.path}`);z+="; Path="+N.path}if(N.expires){if(!w(N.expires)||!Number.isFinite(N.expires.valueOf()))throw new TypeError(`option expires is invalid: ${N.expires}`);z+="; Expires="+N.expires.toUTCString()}if(N.httpOnly&&(z+="; HttpOnly"),N.secure&&(z+="; Secure"),N.partitioned&&(z+="; Partitioned"),N.priority)switch(typeof N.priority=="string"?N.priority.toLowerCase():void 0){case"low":z+="; Priority=Low";break;case"medium":z+="; Priority=Medium";break;case"high":z+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${N.priority}`)}if(N.sameSite)switch(typeof N.sameSite=="string"?N.sameSite.toLowerCase():N.sameSite){case!0:case"strict":z+="; SameSite=Strict";break;case"lax":z+="; SameSite=Lax";break;case"none":z+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${N.sameSite}`)}return z}function v(b){if(b.indexOf("%")===-1)return b;try{return decodeURIComponent(b)}catch{return b}}function w(b){return d.call(b)==="[object Date]"}return ss}ty();var Zh="popstate";function ay(l={}){function s(o,d){let{pathname:f,search:m,hash:y}=o.location;return bu("",{pathname:f,search:m,hash:y},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function r(o,d){return typeof d=="string"?d:cs(d)}return ly(s,r,null,l)}function Be(l,s){if(l===!1||l===null||typeof l>"u")throw new Error(s)}function Gt(l,s){if(!l){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function ny(){return Math.random().toString(36).substring(2,10)}function Ph(l,s){return{usr:l.state,key:l.key,idx:s}}function bu(l,s,r=null,o){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof s=="string"?el(s):s,state:r,key:s&&s.key||o||ny()}}function cs({pathname:l="/",search:s="",hash:r=""}){return s&&s!=="?"&&(l+=s.charAt(0)==="?"?s:"?"+s),r&&r!=="#"&&(l+=r.charAt(0)==="#"?r:"#"+r),l}function el(l){let s={};if(l){let r=l.indexOf("#");r>=0&&(s.hash=l.substring(r),l=l.substring(0,r));let o=l.indexOf("?");o>=0&&(s.search=l.substring(o),l=l.substring(0,o)),l&&(s.pathname=l)}return s}function ly(l,s,r,o={}){let{window:d=document.defaultView,v5Compat:f=!1}=o,m=d.history,y="POP",h=null,g=v();g==null&&(g=0,m.replaceState({...m.state,idx:g},""));function v(){return(m.state||{idx:null}).idx}function w(){y="POP";let A=v(),z=A==null?null:A-g;g=A,h&&h({action:y,location:C.location,delta:z})}function b(A,z){y="PUSH";let T=bu(C.location,A,z);g=v()+1;let D=Ph(T,g),q=C.createHref(T);try{m.pushState(D,"",q)}catch(Y){if(Y instanceof DOMException&&Y.name==="DataCloneError")throw Y;d.location.assign(q)}f&&h&&h({action:y,location:C.location,delta:1})}function R(A,z){y="REPLACE";let T=bu(C.location,A,z);g=v();let D=Ph(T,g),q=C.createHref(T);m.replaceState(D,"",q),f&&h&&h({action:y,location:C.location,delta:0})}function N(A){return sy(A)}let C={get action(){return y},get location(){return l(d,m)},listen(A){if(h)throw new Error("A history only accepts one active listener");return d.addEventListener(Zh,w),h=A,()=>{d.removeEventListener(Zh,w),h=null}},createHref(A){return s(d,A)},createURL:N,encodeLocation(A){let z=N(A);return{pathname:z.pathname,search:z.search,hash:z.hash}},push:b,replace:R,go(A){return m.go(A)}};return C}function sy(l,s=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Be(r,"No window.location.(origin|href) available to create URL");let o=typeof l=="string"?l:cs(l);return o=o.replace(/ $/,"%20"),!s&&o.startsWith("//")&&(o=r+o),new URL(o,r)}function Cm(l,s,r="/"){return ry(l,s,r,!1)}function ry(l,s,r,o){let d=typeof s=="string"?el(s):s,f=ga(d.pathname||"/",r);if(f==null)return null;let m=km(l);iy(m);let y=null;for(let h=0;y==null&&h<m.length;++h){let g=xy(f);y=py(m[h],g,o)}return y}function km(l,s=[],r=[],o=""){let d=(f,m,y)=>{let h={relativePath:y===void 0?f.path||"":y,caseSensitive:f.caseSensitive===!0,childrenIndex:m,route:f};h.relativePath.startsWith("/")&&(Be(h.relativePath.startsWith(o),`Absolute route path "${h.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(o.length));let g=ma([o,h.relativePath]),v=r.concat(h);f.children&&f.children.length>0&&(Be(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),km(f.children,s,v,g)),!(f.path==null&&!f.index)&&s.push({path:g,score:my(g,f.index),routesMeta:v})};return l.forEach((f,m)=>{var y;if(f.path===""||!((y=f.path)!=null&&y.includes("?")))d(f,m);else for(let h of Am(f.path))d(f,m,h)}),s}function Am(l){let s=l.split("/");if(s.length===0)return[];let[r,...o]=s,d=r.endsWith("?"),f=r.replace(/\?$/,"");if(o.length===0)return d?[f,""]:[f];let m=Am(o.join("/")),y=[];return y.push(...m.map(h=>h===""?f:[f,h].join("/"))),d&&y.push(...m),y.map(h=>l.startsWith("/")&&h===""?"/":h)}function iy(l){l.sort((s,r)=>s.score!==r.score?r.score-s.score:gy(s.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}var oy=/^:[\w-]+$/,uy=3,cy=2,dy=1,fy=10,hy=-2,Jh=l=>l==="*";function my(l,s){let r=l.split("/"),o=r.length;return r.some(Jh)&&(o+=hy),s&&(o+=cy),r.filter(d=>!Jh(d)).reduce((d,f)=>d+(oy.test(f)?uy:f===""?dy:fy),o)}function gy(l,s){return l.length===s.length&&l.slice(0,-1).every((o,d)=>o===s[d])?l[l.length-1]-s[s.length-1]:0}function py(l,s,r=!1){let{routesMeta:o}=l,d={},f="/",m=[];for(let y=0;y<o.length;++y){let h=o[y],g=y===o.length-1,v=f==="/"?s:s.slice(f.length)||"/",w=qr({path:h.relativePath,caseSensitive:h.caseSensitive,end:g},v),b=h.route;if(!w&&g&&r&&!o[o.length-1].route.index&&(w=qr({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},v)),!w)return null;Object.assign(d,w.params),m.push({params:d,pathname:ma([f,w.pathname]),pathnameBase:wy(ma([f,w.pathnameBase])),route:b}),w.pathnameBase!=="/"&&(f=ma([f,w.pathnameBase]))}return m}function qr(l,s){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[r,o]=yy(l.path,l.caseSensitive,l.end),d=s.match(r);if(!d)return null;let f=d[0],m=f.replace(/(.)\/+$/,"$1"),y=d.slice(1);return{params:o.reduce((g,{paramName:v,isOptional:w},b)=>{if(v==="*"){let N=y[b]||"";m=f.slice(0,f.length-N.length).replace(/(.)\/+$/,"$1")}const R=y[b];return w&&!R?g[v]=void 0:g[v]=(R||"").replace(/%2F/g,"/"),g},{}),pathname:f,pathnameBase:m,pattern:l}}function yy(l,s=!1,r=!0){Gt(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let o=[],d="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,y,h)=>(o.push({paramName:y,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return l.endsWith("*")?(o.push({paramName:"*"}),d+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?d+="\\/*$":l!==""&&l!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,s?void 0:"i"),o]}function xy(l){try{return l.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return Gt(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${s}).`),l}}function ga(l,s){if(s==="/")return l;if(!l.toLowerCase().startsWith(s.toLowerCase()))return null;let r=s.endsWith("/")?s.length-1:s.length,o=l.charAt(r);return o&&o!=="/"?null:l.slice(r)||"/"}function vy(l,s="/"){let{pathname:r,search:o="",hash:d=""}=typeof l=="string"?el(l):l;return{pathname:r?r.startsWith("/")?r:by(r,s):s,search:Ny(o),hash:jy(d)}}function by(l,s){let r=s.replace(/\/+$/,"").split("/");return l.split("/").forEach(d=>{d===".."?r.length>1&&r.pop():d!=="."&&r.push(d)}),r.length>1?r.join("/"):"/"}function mu(l,s,r,o){return`Cannot include a '${l}' character in a manually specified \`to.${s}\` field [${JSON.stringify(o)}]. 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 Sy(l){return l.filter((s,r)=>r===0||s.route.path&&s.route.path.length>0)}function Ou(l){let s=Sy(l);return s.map((r,o)=>o===s.length-1?r.pathname:r.pathnameBase)}function Mu(l,s,r,o=!1){let d;typeof l=="string"?d=el(l):(d={...l},Be(!d.pathname||!d.pathname.includes("?"),mu("?","pathname","search",d)),Be(!d.pathname||!d.pathname.includes("#"),mu("#","pathname","hash",d)),Be(!d.search||!d.search.includes("#"),mu("#","search","hash",d)));let f=l===""||d.pathname==="",m=f?"/":d.pathname,y;if(m==null)y=r;else{let w=s.length-1;if(!o&&m.startsWith("..")){let b=m.split("/");for(;b[0]==="..";)b.shift(),w-=1;d.pathname=b.join("/")}y=w>=0?s[w]:"/"}let h=vy(d,y),g=m&&m!=="/"&&m.endsWith("/"),v=(f||m===".")&&r.endsWith("/");return!h.pathname.endsWith("/")&&(g||v)&&(h.pathname+="/"),h}var ma=l=>l.join("/").replace(/\/\/+/g,"/"),wy=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),Ny=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,jy=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l;function Ey(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}var Tm=["POST","PUT","PATCH","DELETE"];new Set(Tm);var Cy=["GET",...Tm];new Set(Cy);var tl=S.createContext(null);tl.displayName="DataRouter";var Qr=S.createContext(null);Qr.displayName="DataRouterState";var Rm=S.createContext({isTransitioning:!1});Rm.displayName="ViewTransition";var ky=S.createContext(new Map);ky.displayName="Fetchers";var Ay=S.createContext(null);Ay.displayName="Await";var qt=S.createContext(null);qt.displayName="Navigation";var hs=S.createContext(null);hs.displayName="Location";var Lt=S.createContext({outlet:null,matches:[],isDataRoute:!1});Lt.displayName="Route";var zu=S.createContext(null);zu.displayName="RouteError";function Ty(l,{relative:s}={}){Be(al(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:o}=S.useContext(qt),{hash:d,pathname:f,search:m}=ms(l,{relative:s}),y=f;return r!=="/"&&(y=f==="/"?r:ma([r,f])),o.createHref({pathname:y,search:m,hash:d})}function al(){return S.useContext(hs)!=null}function Jt(){return Be(al(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(hs).location}var Om="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Mm(l){S.useContext(qt).static||S.useLayoutEffect(l)}function un(){let{isDataRoute:l}=S.useContext(Lt);return l?$y():Ry()}function Ry(){Be(al(),"useNavigate() may be used only in the context of a <Router> component.");let l=S.useContext(tl),{basename:s,navigator:r}=S.useContext(qt),{matches:o}=S.useContext(Lt),{pathname:d}=Jt(),f=JSON.stringify(Ou(o)),m=S.useRef(!1);return Mm(()=>{m.current=!0}),S.useCallback((h,g={})=>{if(Gt(m.current,Om),!m.current)return;if(typeof h=="number"){r.go(h);return}let v=Mu(h,JSON.parse(f),d,g.relative==="path");l==null&&s!=="/"&&(v.pathname=v.pathname==="/"?s:ma([s,v.pathname])),(g.replace?r.replace:r.push)(v,g.state,g)},[s,r,f,d,l])}var Oy=S.createContext(null);function My(l){let s=S.useContext(Lt).outlet;return s&&S.createElement(Oy.Provider,{value:l},s)}function zy(){let{matches:l}=S.useContext(Lt),s=l[l.length-1];return s?s.params:{}}function ms(l,{relative:s}={}){let{matches:r}=S.useContext(Lt),{pathname:o}=Jt(),d=JSON.stringify(Ou(r));return S.useMemo(()=>Mu(l,JSON.parse(d),o,s==="path"),[l,d,o,s])}function Dy(l,s){return zm(l,s)}function zm(l,s,r,o){var T;Be(al(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d,static:f}=S.useContext(qt),{matches:m}=S.useContext(Lt),y=m[m.length-1],h=y?y.params:{},g=y?y.pathname:"/",v=y?y.pathnameBase:"/",w=y&&y.route;{let D=w&&w.path||"";Dm(g,!w||D.endsWith("*")||D.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${D}">) 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="${D}"> to <Route path="${D==="/"?"*":`${D}/*`}">.`)}let b=Jt(),R;if(s){let D=typeof s=="string"?el(s):s;Be(v==="/"||((T=D.pathname)==null?void 0:T.startsWith(v)),`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 "${v}" but pathname "${D.pathname}" was given in the \`location\` prop.`),R=D}else R=b;let N=R.pathname||"/",C=N;if(v!=="/"){let D=v.replace(/^\//,"").split("/");C="/"+N.replace(/^\//,"").split("/").slice(D.length).join("/")}let A=!f&&r&&r.matches&&r.matches.length>0?r.matches:Cm(l,{pathname:C});Gt(w||A!=null,`No routes matched location "${R.pathname}${R.search}${R.hash}" `),Gt(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${R.pathname}${R.search}${R.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let z=By(A&&A.map(D=>Object.assign({},D,{params:Object.assign({},h,D.params),pathname:ma([v,d.encodeLocation?d.encodeLocation(D.pathname).pathname:D.pathname]),pathnameBase:D.pathnameBase==="/"?v:ma([v,d.encodeLocation?d.encodeLocation(D.pathnameBase).pathname:D.pathnameBase])})),m,r,o);return s&&z?S.createElement(hs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...R},navigationType:"POP"}},z):z}function Uy(){let l=Ky(),s=Ey(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),r=l instanceof Error?l.stack:null,o="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:o},f={padding:"2px 4px",backgroundColor:o},m=null;return console.error("Error handled by React Router default ErrorBoundary:",l),m=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:f},"ErrorBoundary")," or"," ",S.createElement("code",{style:f},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},s),r?S.createElement("pre",{style:d},r):null,m)}var Ly=S.createElement(Uy,null),_y=class extends S.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,s){return s.location!==l.location||s.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:s.error,location:s.location,revalidation:l.revalidation||s.revalidation}}componentDidCatch(l,s){console.error("React Router caught the following error during render",l,s)}render(){return this.state.error!==void 0?S.createElement(Lt.Provider,{value:this.props.routeContext},S.createElement(zu.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Hy({routeContext:l,match:s,children:r}){let o=S.useContext(tl);return o&&o.static&&o.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=s.route.id),S.createElement(Lt.Provider,{value:l},r)}function By(l,s=[],r=null,o=null){if(l==null){if(!r)return null;if(r.errors)l=r.matches;else if(s.length===0&&!r.initialized&&r.matches.length>0)l=r.matches;else return null}let d=l,f=r==null?void 0:r.errors;if(f!=null){let h=d.findIndex(g=>g.route.id&&(f==null?void 0:f[g.route.id])!==void 0);Be(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),d=d.slice(0,Math.min(d.length,h+1))}let m=!1,y=-1;if(r)for(let h=0;h<d.length;h++){let g=d[h];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(y=h),g.route.id){let{loaderData:v,errors:w}=r,b=g.route.loader&&!v.hasOwnProperty(g.route.id)&&(!w||w[g.route.id]===void 0);if(g.route.lazy||b){m=!0,y>=0?d=d.slice(0,y+1):d=[d[0]];break}}}return d.reduceRight((h,g,v)=>{let w,b=!1,R=null,N=null;r&&(w=f&&g.route.id?f[g.route.id]:void 0,R=g.route.errorElement||Ly,m&&(y<0&&v===0?(Dm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,N=null):y===v&&(b=!0,N=g.route.hydrateFallbackElement||null)));let C=s.concat(d.slice(0,v+1)),A=()=>{let z;return w?z=R:b?z=N:g.route.Component?z=S.createElement(g.route.Component,null):g.route.element?z=g.route.element:z=h,S.createElement(Hy,{match:g,routeContext:{outlet:h,matches:C,isDataRoute:r!=null},children:z})};return r&&(g.route.ErrorBoundary||g.route.errorElement||v===0)?S.createElement(_y,{location:r.location,revalidation:r.revalidation,component:R,error:w,children:A(),routeContext:{outlet:null,matches:C,isDataRoute:!0}}):A()},null)}function Du(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gy(l){let s=S.useContext(tl);return Be(s,Du(l)),s}function qy(l){let s=S.useContext(Qr);return Be(s,Du(l)),s}function Vy(l){let s=S.useContext(Lt);return Be(s,Du(l)),s}function Uu(l){let s=Vy(l),r=s.matches[s.matches.length-1];return Be(r.route.id,`${l} can only be used on routes that contain a unique "id"`),r.route.id}function Yy(){return Uu("useRouteId")}function Ky(){var o;let l=S.useContext(zu),s=qy("useRouteError"),r=Uu("useRouteError");return l!==void 0?l:(o=s.errors)==null?void 0:o[r]}function $y(){let{router:l}=Gy("useNavigate"),s=Uu("useNavigate"),r=S.useRef(!1);return Mm(()=>{r.current=!0}),S.useCallback(async(d,f={})=>{Gt(r.current,Om),r.current&&(typeof d=="number"?l.navigate(d):await l.navigate(d,{fromRouteId:s,...f}))},[l,s])}var Fh={};function Dm(l,s,r){!s&&!Fh[l]&&(Fh[l]=!0,Gt(!1,r))}S.memo(Qy);function Qy({routes:l,future:s,state:r}){return zm(l,void 0,r,s)}function Um({to:l,replace:s,state:r,relative:o}){Be(al(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=S.useContext(qt);Gt(!d,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=S.useContext(Lt),{pathname:m}=Jt(),y=un(),h=Mu(l,Ou(f),m,o==="path"),g=JSON.stringify(h);return S.useEffect(()=>{y(JSON.parse(g),{replace:s,state:r,relative:o})},[y,g,o,s,r]),null}function Lm(l){return My(l.context)}function Ut(l){Be(!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 Xy({basename:l="/",children:s=null,location:r,navigationType:o="POP",navigator:d,static:f=!1}){Be(!al(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=l.replace(/^\/*/,"/"),y=S.useMemo(()=>({basename:m,navigator:d,static:f,future:{}}),[m,d,f]);typeof r=="string"&&(r=el(r));let{pathname:h="/",search:g="",hash:v="",state:w=null,key:b="default"}=r,R=S.useMemo(()=>{let N=ga(h,m);return N==null?null:{location:{pathname:N,search:g,hash:v,state:w,key:b},navigationType:o}},[m,h,g,v,w,b,o]);return Gt(R!=null,`<Router basename="${m}"> is not able to match the URL "${h}${g}${v}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:S.createElement(qt.Provider,{value:y},S.createElement(hs.Provider,{children:s,value:R}))}function Zy({children:l,location:s}){return Dy(Su(l),s)}function Su(l,s=[]){let r=[];return S.Children.forEach(l,(o,d)=>{if(!S.isValidElement(o))return;let f=[...s,d];if(o.type===S.Fragment){r.push.apply(r,Su(o.props.children,f));return}Be(o.type===Ut,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Be(!o.props.index||!o.props.children,"An index route cannot have child routes.");let m={id:o.props.id||f.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(m.children=Su(o.props.children,f)),r.push(m)}),r}var Br="get",Gr="application/x-www-form-urlencoded";function Xr(l){return l!=null&&typeof l.tagName=="string"}function Py(l){return Xr(l)&&l.tagName.toLowerCase()==="button"}function Jy(l){return Xr(l)&&l.tagName.toLowerCase()==="form"}function Fy(l){return Xr(l)&&l.tagName.toLowerCase()==="input"}function Wy(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function Iy(l,s){return l.button===0&&(!s||s==="_self")&&!Wy(l)}var Mr=null;function ex(){if(Mr===null)try{new FormData(document.createElement("form"),0),Mr=!1}catch{Mr=!0}return Mr}var tx=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gu(l){return l!=null&&!tx.has(l)?(Gt(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gr}"`),null):l}function ax(l,s){let r,o,d,f,m;if(Jy(l)){let y=l.getAttribute("action");o=y?ga(y,s):null,r=l.getAttribute("method")||Br,d=gu(l.getAttribute("enctype"))||Gr,f=new FormData(l)}else if(Py(l)||Fy(l)&&(l.type==="submit"||l.type==="image")){let y=l.form;if(y==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=l.getAttribute("formaction")||y.getAttribute("action");if(o=h?ga(h,s):null,r=l.getAttribute("formmethod")||y.getAttribute("method")||Br,d=gu(l.getAttribute("formenctype"))||gu(y.getAttribute("enctype"))||Gr,f=new FormData(y,l),!ex()){let{name:g,type:v,value:w}=l;if(v==="image"){let b=g?`${g}.`:"";f.append(`${b}x`,"0"),f.append(`${b}y`,"0")}else g&&f.append(g,w)}}else{if(Xr(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Br,o=null,d=Gr,m=l}return f&&d==="text/plain"&&(m=f,f=void 0),{action:o,method:r.toLowerCase(),encType:d,formData:f,body:m}}function Lu(l,s){if(l===!1||l===null||typeof l>"u")throw new Error(s)}async function nx(l,s){if(l.id in s)return s[l.id];try{let r=await import(l.module);return s[l.id]=r,r}catch(r){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function lx(l){return l==null?!1:l.href==null?l.rel==="preload"&&typeof l.imageSrcSet=="string"&&typeof l.imageSizes=="string":typeof l.rel=="string"&&typeof l.href=="string"}async function sx(l,s,r){let o=await Promise.all(l.map(async d=>{let f=s.routes[d.route.id];if(f){let m=await nx(f,r);return m.links?m.links():[]}return[]}));return ux(o.flat(1).filter(lx).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Wh(l,s,r,o,d,f){let m=(h,g)=>r[g]?h.route.id!==r[g].route.id:!0,y=(h,g)=>{var v;return r[g].pathname!==h.pathname||((v=r[g].route.path)==null?void 0:v.endsWith("*"))&&r[g].params["*"]!==h.params["*"]};return f==="assets"?s.filter((h,g)=>m(h,g)||y(h,g)):f==="data"?s.filter((h,g)=>{var w;let v=o.routes[h.route.id];if(!v||!v.hasLoader)return!1;if(m(h,g)||y(h,g))return!0;if(h.route.shouldRevalidate){let b=h.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((w=r[0])==null?void 0:w.params)||{},nextUrl:new URL(l,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function rx(l,s,{includeHydrateFallback:r}={}){return ix(l.map(o=>{let d=s.routes[o.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 ix(l){return[...new Set(l)]}function ox(l){let s={},r=Object.keys(l).sort();for(let o of r)s[o]=l[o];return s}function ux(l,s){let r=new Set;return new Set(s),l.reduce((o,d)=>{let f=JSON.stringify(ox(d));return r.has(f)||(r.add(f),o.push({key:f,link:d})),o},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var cx=new Set([100,101,204,205]);function dx(l,s){let r=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return r.pathname==="/"?r.pathname="_root.data":s&&ga(r.pathname,s)==="/"?r.pathname=`${s.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function _m(){let l=S.useContext(tl);return Lu(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function fx(){let l=S.useContext(Qr);return Lu(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var _u=S.createContext(void 0);_u.displayName="FrameworkContext";function Hm(){let l=S.useContext(_u);return Lu(l,"You must render this element inside a <HydratedRouter> element"),l}function hx(l,s){let r=S.useContext(_u),[o,d]=S.useState(!1),[f,m]=S.useState(!1),{onFocus:y,onBlur:h,onMouseEnter:g,onMouseLeave:v,onTouchStart:w}=s,b=S.useRef(null);S.useEffect(()=>{if(l==="render"&&m(!0),l==="viewport"){let C=z=>{z.forEach(T=>{m(T.isIntersecting)})},A=new IntersectionObserver(C,{threshold:.5});return b.current&&A.observe(b.current),()=>{A.disconnect()}}},[l]),S.useEffect(()=>{if(o){let C=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(C)}}},[o]);let R=()=>{d(!0)},N=()=>{d(!1),m(!1)};return r?l!=="intent"?[f,b,{}]:[f,b,{onFocus:rs(y,R),onBlur:rs(h,N),onMouseEnter:rs(g,R),onMouseLeave:rs(v,N),onTouchStart:rs(w,R)}]:[!1,b,{}]}function rs(l,s){return r=>{l&&l(r),r.defaultPrevented||s(r)}}function mx({page:l,...s}){let{router:r}=_m(),o=S.useMemo(()=>Cm(r.routes,l,r.basename),[r.routes,l,r.basename]);return o?S.createElement(px,{page:l,matches:o,...s}):null}function gx(l){let{manifest:s,routeModules:r}=Hm(),[o,d]=S.useState([]);return S.useEffect(()=>{let f=!1;return sx(l,s,r).then(m=>{f||d(m)}),()=>{f=!0}},[l,s,r]),o}function px({page:l,matches:s,...r}){let o=Jt(),{manifest:d,routeModules:f}=Hm(),{basename:m}=_m(),{loaderData:y,matches:h}=fx(),g=S.useMemo(()=>Wh(l,s,h,d,o,"data"),[l,s,h,d,o]),v=S.useMemo(()=>Wh(l,s,h,d,o,"assets"),[l,s,h,d,o]),w=S.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let N=new Set,C=!1;if(s.forEach(z=>{var D;let T=d.routes[z.route.id];!T||!T.hasLoader||(!g.some(q=>q.route.id===z.route.id)&&z.route.id in y&&((D=f[z.route.id])!=null&&D.shouldRevalidate)||T.hasClientLoader?C=!0:N.add(z.route.id))}),N.size===0)return[];let A=dx(l,m);return C&&N.size>0&&A.searchParams.set("_routes",s.filter(z=>N.has(z.route.id)).map(z=>z.route.id).join(",")),[A.pathname+A.search]},[m,y,o,d,g,s,l,f]),b=S.useMemo(()=>rx(v,d),[v,d]),R=gx(v);return S.createElement(S.Fragment,null,w.map(N=>S.createElement("link",{key:N,rel:"prefetch",as:"fetch",href:N,...r})),b.map(N=>S.createElement("link",{key:N,rel:"modulepreload",href:N,...r})),R.map(({key:N,link:C})=>S.createElement("link",{key:N,...C})))}function yx(...l){return s=>{l.forEach(r=>{typeof r=="function"?r(s):r!=null&&(r.current=s)})}}var Bm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Bm&&(window.__reactRouterVersion="7.6.0")}catch{}function xx({basename:l,children:s,window:r}){let o=S.useRef();o.current==null&&(o.current=ay({window:r,v5Compat:!0}));let d=o.current,[f,m]=S.useState({action:d.action,location:d.location}),y=S.useCallback(h=>{S.startTransition(()=>m(h))},[m]);return S.useLayoutEffect(()=>d.listen(y),[d,y]),S.createElement(Xy,{basename:l,children:s,location:f.location,navigationType:f.action,navigator:d})}var Gm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,qm=S.forwardRef(function({onClick:s,discover:r="render",prefetch:o="none",relative:d,reloadDocument:f,replace:m,state:y,target:h,to:g,preventScrollReset:v,viewTransition:w,...b},R){let{basename:N}=S.useContext(qt),C=typeof g=="string"&&Gm.test(g),A,z=!1;if(typeof g=="string"&&C&&(A=g,Bm))try{let J=new URL(window.location.href),re=g.startsWith("//")?new URL(J.protocol+g):new URL(g),de=ga(re.pathname,N);re.origin===J.origin&&de!=null?g=de+re.search+re.hash:z=!0}catch{Gt(!1,`<Link to="${g}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let T=Ty(g,{relative:d}),[D,q,Y]=hx(o,b),W=Sx(g,{replace:m,state:y,target:h,preventScrollReset:v,relative:d,viewTransition:w});function H(J){s&&s(J),J.defaultPrevented||W(J)}let O=S.createElement("a",{...b,...Y,href:A||T,onClick:z||f?s:H,ref:yx(R,q),target:h,"data-discover":!C&&r==="render"?"true":void 0});return D&&!C?S.createElement(S.Fragment,null,O,S.createElement(mx,{page:T})):O});qm.displayName="Link";var Vm=S.forwardRef(function({"aria-current":s="page",caseSensitive:r=!1,className:o="",end:d=!1,style:f,to:m,viewTransition:y,children:h,...g},v){let w=ms(m,{relative:g.relative}),b=Jt(),R=S.useContext(Qr),{navigator:N,basename:C}=S.useContext(qt),A=R!=null&&Cx(w)&&y===!0,z=N.encodeLocation?N.encodeLocation(w).pathname:w.pathname,T=b.pathname,D=R&&R.navigation&&R.navigation.location?R.navigation.location.pathname:null;r||(T=T.toLowerCase(),D=D?D.toLowerCase():null,z=z.toLowerCase()),D&&C&&(D=ga(D,C)||D);const q=z!=="/"&&z.endsWith("/")?z.length-1:z.length;let Y=T===z||!d&&T.startsWith(z)&&T.charAt(q)==="/",W=D!=null&&(D===z||!d&&D.startsWith(z)&&D.charAt(z.length)==="/"),H={isActive:Y,isPending:W,isTransitioning:A},O=Y?s:void 0,J;typeof o=="function"?J=o(H):J=[o,Y?"active":null,W?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let re=typeof f=="function"?f(H):f;return S.createElement(qm,{...g,"aria-current":O,className:J,ref:v,style:re,to:m,viewTransition:y},typeof h=="function"?h(H):h)});Vm.displayName="NavLink";var vx=S.forwardRef(({discover:l="render",fetcherKey:s,navigate:r,reloadDocument:o,replace:d,state:f,method:m=Br,action:y,onSubmit:h,relative:g,preventScrollReset:v,viewTransition:w,...b},R)=>{let N=jx(),C=Ex(y,{relative:g}),A=m.toLowerCase()==="get"?"get":"post",z=typeof y=="string"&&Gm.test(y),T=D=>{if(h&&h(D),D.defaultPrevented)return;D.preventDefault();let q=D.nativeEvent.submitter,Y=(q==null?void 0:q.getAttribute("formmethod"))||m;N(q||D.currentTarget,{fetcherKey:s,method:Y,navigate:r,replace:d,state:f,relative:g,preventScrollReset:v,viewTransition:w})};return S.createElement("form",{ref:R,method:A,action:C,onSubmit:o?h:T,...b,"data-discover":!z&&l==="render"?"true":void 0})});vx.displayName="Form";function bx(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ym(l){let s=S.useContext(tl);return Be(s,bx(l)),s}function Sx(l,{target:s,replace:r,state:o,preventScrollReset:d,relative:f,viewTransition:m}={}){let y=un(),h=Jt(),g=ms(l,{relative:f});return S.useCallback(v=>{if(Iy(v,s)){v.preventDefault();let w=r!==void 0?r:cs(h)===cs(g);y(l,{replace:w,state:o,preventScrollReset:d,relative:f,viewTransition:m})}},[h,y,g,r,o,s,l,d,f,m])}var wx=0,Nx=()=>`__${String(++wx)}__`;function jx(){let{router:l}=Ym("useSubmit"),{basename:s}=S.useContext(qt),r=Yy();return S.useCallback(async(o,d={})=>{let{action:f,method:m,encType:y,formData:h,body:g}=ax(o,s);if(d.navigate===!1){let v=d.fetcherKey||Nx();await l.fetch(v,r,d.action||f,{preventScrollReset:d.preventScrollReset,formData:h,body:g,formMethod:d.method||m,formEncType:d.encType||y,flushSync:d.flushSync})}else await l.navigate(d.action||f,{preventScrollReset:d.preventScrollReset,formData:h,body:g,formMethod:d.method||m,formEncType:d.encType||y,replace:d.replace,state:d.state,fromRouteId:r,flushSync:d.flushSync,viewTransition:d.viewTransition})},[l,s,r])}function Ex(l,{relative:s}={}){let{basename:r}=S.useContext(qt),o=S.useContext(Lt);Be(o,"useFormAction must be used inside a RouteContext");let[d]=o.matches.slice(-1),f={...ms(l||".",{relative:s})},m=Jt();if(l==null){f.search=m.search;let y=new URLSearchParams(f.search),h=y.getAll("index");if(h.some(v=>v==="")){y.delete("index"),h.filter(w=>w).forEach(w=>y.append("index",w));let v=y.toString();f.search=v?`?${v}`:""}}return(!l||l===".")&&d.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:ma([r,f.pathname])),cs(f)}function Cx(l,s={}){let r=S.useContext(Rm);Be(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Ym("useViewTransitionState"),d=ms(l,{relative:s.relative});if(!r.isTransitioning)return!1;let f=ga(r.currentLocation.pathname,o)||r.currentLocation.pathname,m=ga(r.nextLocation.pathname,o)||r.nextLocation.pathname;return qr(d.pathname,m)!=null||qr(d.pathname,f)!=null}[...cx];const kx=()=>window.__MCPHUB_CONFIG__||{basePath:"",version:"dev",name:"mcphub"},Km=()=>{const s=kx().basePath||"";return s&&!s.startsWith("/")?"/"+s:s},Ax=()=>Km()+"/api",Ee=l=>{const s=Ax(),r=l.startsWith("/")?l:"/"+l;return s+r},Tx=async()=>{try{const l=window.location.pathname,s=[l.replace(/\/[^\/]*$/,"")+"/config","/config",...l.includes("/")?[l.split("/")[1]?`/${l.split("/")[1]}/config`:"/config"]:["/config"]];for(const r of s)try{const o=await fetch(r,{method:"GET",headers:{Accept:"application/json","Cache-Control":"no-cache"}});if(o.ok){const d=await o.json();if(d.success&&d.data)return d.data}}catch(o){console.debug(`Failed to load config from ${r}:`,o)}return console.warn("Could not load runtime config from server, using defaults"),{basePath:"",version:"dev",name:"mcphub"}}catch(l){return console.error("Error loading runtime config:",l),{basePath:"",version:"dev",name:"mcphub"}}},Hu="mcphub_token",gs=()=>localStorage.getItem(Hu),$m=l=>{localStorage.setItem(Hu,l)},wu=()=>{localStorage.removeItem(Hu)},Rx=async l=>{try{console.log(Ee("/auth/login"));const r=await(await fetch(Ee("/auth/login"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})).json();return r.success&&r.token&&$m(r.token),r}catch(s){return console.error("Login error:",s),{success:!1,message:"An error occurred during login"}}},Ox=async l=>{try{const r=await(await fetch(Ee("/auth/register"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})).json();return r.success&&r.token&&$m(r.token),r}catch(s){return console.error("Register error:",s),{success:!1,message:"An error occurred during registration"}}},Mx=async()=>{const l=gs();if(!l)return{success:!1,message:"No authentication token"};try{return await(await fetch(Ee("/auth/user"),{method:"GET",headers:{"x-auth-token":l}})).json()}catch(s){return console.error("Get current user error:",s),{success:!1,message:"An error occurred while fetching user data"}}},zx=async l=>{const s=gs();if(!s)return{success:!1,message:"No authentication token"};try{return await(await fetch(Ee("/auth/change-password"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":s},body:JSON.stringify(l)})).json()}catch(r){return console.error("Change password error:",r),{success:!1,message:"An error occurred while changing password"}}},Dx=()=>{wu()},Zt={token:null,isAuthenticated:!1,loading:!0,user:null,error:null},Qm=S.createContext({auth:Zt,login:async()=>!1,register:async()=>!1,logout:()=>{}}),Ux=({children:l})=>{const[s,r]=S.useState(Zt);S.useEffect(()=>{(async()=>{const y=gs();if(!y){r({...Zt,loading:!1});return}try{const h=await Mx();h.success&&h.user?r({token:y,isAuthenticated:!0,loading:!1,user:h.user,error:null}):(wu(),r({...Zt,loading:!1}))}catch{wu(),r({...Zt,loading:!1})}})()},[]);const o=async(m,y)=>{try{const h=await Rx({username:m,password:y});return h.success&&h.token&&h.user?(r({token:h.token,isAuthenticated:!0,loading:!1,user:h.user,error:null}),!0):(r({...Zt,loading:!1,error:h.message||"Authentication failed"}),!1)}catch{return r({...Zt,loading:!1,error:"Authentication failed"}),!1}},d=async(m,y,h=!1)=>{try{const g=await Ox({username:m,password:y,isAdmin:h});return g.success&&g.token&&g.user?(r({token:g.token,isAuthenticated:!0,loading:!1,user:g.user,error:null}),!0):(r({...Zt,loading:!1,error:g.message||"Registration failed"}),!1)}catch{return r({...Zt,loading:!1,error:"Registration failed"}),!1}},f=()=>{Dx(),r({...Zt,loading:!1})};return c.jsx(Qm.Provider,{value:{auth:s,login:o,register:d,logout:f},children:l})},Zr=()=>S.useContext(Qm);/**
|
|
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 Lx=l=>l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_x=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(s,r,o)=>o?o.toUpperCase():r.toLowerCase()),Ih=l=>{const s=_x(l);return s.charAt(0).toUpperCase()+s.slice(1)},Xm=(...l)=>l.filter((s,r,o)=>!!s&&s.trim()!==""&&o.indexOf(s)===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 Hx={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 Bx=S.forwardRef(({color:l="currentColor",size:s=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:d="",children:f,iconNode:m,...y},h)=>S.createElement("svg",{ref:h,...Hx,width:s,height:s,stroke:l,strokeWidth:o?Number(r)*24/Number(s):r,className:Xm("lucide",d),...y},[...m.map(([g,v])=>S.createElement(g,v)),...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 ut=(l,s)=>{const r=S.forwardRef(({className:o,...d},f)=>S.createElement(Bx,{ref:f,iconNode:s,className:Xm(`lucide-${Lx(Ih(l))}`,`lucide-${l}`,o),...d}));return r.displayName=Ih(l),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 Gx=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Bu=ut("check",Gx);/**
|
|
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 qx=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Zm=ut("chevron-down",qx);/**
|
|
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 Vx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Pm=ut("chevron-right",Vx);/**
|
|
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 Yx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Kx=ut("circle-alert",Yx);/**
|
|
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 $x=[["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"}]],Jm=ut("copy",$x);/**
|
|
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 Qx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Xx=ut("info",Qx);/**
|
|
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 Zx=[["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"}]],Px=ut("log-out",Zx);/**
|
|
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 Jx=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],Fx=ut("moon",Jx);/**
|
|
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 Wx=[["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"}]],Ix=ut("refresh-cw",Wx);/**
|
|
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 ev=[["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"}]],tv=ut("settings",ev);/**
|
|
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 av=[["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"}]],nv=ut("square-pen",av);/**
|
|
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 lv=[["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"}]],sv=ut("sun",lv);/**
|
|
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 rv=[["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"}]],iv=ut("trash",rv);/**
|
|
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 ov=[["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"}]],uv=ut("user",ov);/**
|
|
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 cv=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ds=ut("x",cv);function Fm(l){var s,r,o="";if(typeof l=="string"||typeof l=="number")o+=l;else if(typeof l=="object")if(Array.isArray(l)){var d=l.length;for(s=0;s<d;s++)l[s]&&(r=Fm(l[s]))&&(o&&(o+=" "),o+=r)}else for(r in l)l[r]&&(o&&(o+=" "),o+=r);return o}function dv(){for(var l,s,r=0,o="",d=arguments.length;r<d;r++)(l=arguments[r])&&(s=Fm(l))&&(o&&(o+=" "),o+=s);return o}const Gu="-",fv=l=>{const s=mv(l),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=l;return{getClassGroupId:m=>{const y=m.split(Gu);return y[0]===""&&y.length!==1&&y.shift(),Wm(y,s)||hv(m)},getConflictingClassGroupIds:(m,y)=>{const h=r[m]||[];return y&&o[m]?[...h,...o[m]]:h}}},Wm=(l,s)=>{var m;if(l.length===0)return s.classGroupId;const r=l[0],o=s.nextPart.get(r),d=o?Wm(l.slice(1),o):void 0;if(d)return d;if(s.validators.length===0)return;const f=l.join(Gu);return(m=s.validators.find(({validator:y})=>y(f)))==null?void 0:m.classGroupId},em=/^\[(.+)\]$/,hv=l=>{if(em.test(l)){const s=em.exec(l)[1],r=s==null?void 0:s.substring(0,s.indexOf(":"));if(r)return"arbitrary.."+r}},mv=l=>{const{theme:s,classGroups:r}=l,o={nextPart:new Map,validators:[]};for(const d in r)Nu(r[d],o,d,s);return o},Nu=(l,s,r,o)=>{l.forEach(d=>{if(typeof d=="string"){const f=d===""?s:tm(s,d);f.classGroupId=r;return}if(typeof d=="function"){if(gv(d)){Nu(d(o),s,r,o);return}s.validators.push({validator:d,classGroupId:r});return}Object.entries(d).forEach(([f,m])=>{Nu(m,tm(s,f),r,o)})})},tm=(l,s)=>{let r=l;return s.split(Gu).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},gv=l=>l.isThemeGetter,pv=l=>{if(l<1)return{get:()=>{},set:()=>{}};let s=0,r=new Map,o=new Map;const d=(f,m)=>{r.set(f,m),s++,s>l&&(s=0,o=r,r=new Map)};return{get(f){let m=r.get(f);if(m!==void 0)return m;if((m=o.get(f))!==void 0)return d(f,m),m},set(f,m){r.has(f)?r.set(f,m):d(f,m)}}},ju="!",Eu=":",yv=Eu.length,xv=l=>{const{prefix:s,experimentalParseClassName:r}=l;let o=d=>{const f=[];let m=0,y=0,h=0,g;for(let N=0;N<d.length;N++){let C=d[N];if(m===0&&y===0){if(C===Eu){f.push(d.slice(h,N)),h=N+yv;continue}if(C==="/"){g=N;continue}}C==="["?m++:C==="]"?m--:C==="("?y++:C===")"&&y--}const v=f.length===0?d:d.substring(h),w=vv(v),b=w!==v,R=g&&g>h?g-h:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:R}};if(s){const d=s+Eu,f=o;o=m=>m.startsWith(d)?f(m.substring(d.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:m,maybePostfixModifierPosition:void 0}}if(r){const d=o;o=f=>r({className:f,parseClassName:d})}return o},vv=l=>l.endsWith(ju)?l.substring(0,l.length-1):l.startsWith(ju)?l.substring(1):l,bv=l=>{const s=Object.fromEntries(l.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const d=[];let f=[];return o.forEach(m=>{m[0]==="["||s[m]?(d.push(...f.sort(),m),f=[]):f.push(m)}),d.push(...f.sort()),d}},Sv=l=>({cache:pv(l.cacheSize),parseClassName:xv(l),sortModifiers:bv(l),...fv(l)}),wv=/\s+/,Nv=(l,s)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:d,sortModifiers:f}=s,m=[],y=l.trim().split(wv);let h="";for(let g=y.length-1;g>=0;g-=1){const v=y[g],{isExternal:w,modifiers:b,hasImportantModifier:R,baseClassName:N,maybePostfixModifierPosition:C}=r(v);if(w){h=v+(h.length>0?" "+h:h);continue}let A=!!C,z=o(A?N.substring(0,C):N);if(!z){if(!A){h=v+(h.length>0?" "+h:h);continue}if(z=o(N),!z){h=v+(h.length>0?" "+h:h);continue}A=!1}const T=f(b).join(":"),D=R?T+ju:T,q=D+z;if(m.includes(q))continue;m.push(q);const Y=d(z,A);for(let W=0;W<Y.length;++W){const H=Y[W];m.push(D+H)}h=v+(h.length>0?" "+h:h)}return h};function jv(){let l=0,s,r,o="";for(;l<arguments.length;)(s=arguments[l++])&&(r=Im(s))&&(o&&(o+=" "),o+=r);return o}const Im=l=>{if(typeof l=="string")return l;let s,r="";for(let o=0;o<l.length;o++)l[o]&&(s=Im(l[o]))&&(r&&(r+=" "),r+=s);return r};function Ev(l,...s){let r,o,d,f=m;function m(h){const g=s.reduce((v,w)=>w(v),l());return r=Sv(g),o=r.cache.get,d=r.cache.set,f=y,y(h)}function y(h){const g=o(h);if(g)return g;const v=Nv(h,r);return d(h,v),v}return function(){return f(jv.apply(null,arguments))}}const Pe=l=>{const s=r=>r[l]||[];return s.isThemeGetter=!0,s},eg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,tg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Cv=/^\d+\/\d+$/,kv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Av=/\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$/,Tv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Rv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ov=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pn=l=>Cv.test(l),Se=l=>!!l&&!Number.isNaN(Number(l)),Ga=l=>!!l&&Number.isInteger(Number(l)),pu=l=>l.endsWith("%")&&Se(l.slice(0,-1)),ha=l=>kv.test(l),Mv=()=>!0,zv=l=>Av.test(l)&&!Tv.test(l),ag=()=>!1,Dv=l=>Rv.test(l),Uv=l=>Ov.test(l),Lv=l=>!le(l)&&!se(l),_v=l=>nl(l,sg,ag),le=l=>eg.test(l),rn=l=>nl(l,rg,zv),yu=l=>nl(l,Vv,Se),am=l=>nl(l,ng,ag),Hv=l=>nl(l,lg,Uv),zr=l=>nl(l,ig,Dv),se=l=>tg.test(l),is=l=>ll(l,rg),Bv=l=>ll(l,Yv),nm=l=>ll(l,ng),Gv=l=>ll(l,sg),qv=l=>ll(l,lg),Dr=l=>ll(l,ig,!0),nl=(l,s,r)=>{const o=eg.exec(l);return o?o[1]?s(o[1]):r(o[2]):!1},ll=(l,s,r=!1)=>{const o=tg.exec(l);return o?o[1]?s(o[1]):r:!1},ng=l=>l==="position"||l==="percentage",lg=l=>l==="image"||l==="url",sg=l=>l==="length"||l==="size"||l==="bg-size",rg=l=>l==="length",Vv=l=>l==="number",Yv=l=>l==="family-name",ig=l=>l==="shadow",Kv=()=>{const l=Pe("color"),s=Pe("font"),r=Pe("text"),o=Pe("font-weight"),d=Pe("tracking"),f=Pe("leading"),m=Pe("breakpoint"),y=Pe("container"),h=Pe("spacing"),g=Pe("radius"),v=Pe("shadow"),w=Pe("inset-shadow"),b=Pe("text-shadow"),R=Pe("drop-shadow"),N=Pe("blur"),C=Pe("perspective"),A=Pe("aspect"),z=Pe("ease"),T=Pe("animate"),D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Y=()=>[...q(),se,le],W=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],O=()=>[se,le,h],J=()=>[Pn,"full","auto",...O()],re=()=>[Ga,"none","subgrid",se,le],de=()=>["auto",{span:["full",Ga,se,le]},Ga,se,le],me=()=>[Ga,"auto",se,le],ke=()=>["auto","min","max","fr",se,le],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],xe=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...O()],V=()=>[Pn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],$=()=>[l,se,le],ue=()=>[...q(),nm,am,{position:[se,le]}],E=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",Gv,_v,{size:[se,le]}],ee=()=>[pu,is,rn],Z=()=>["","none","full",g,se,le],te=()=>["",Se,is,rn],ve=()=>["solid","dashed","dotted","double"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[Se,pu,nm,am],ae=()=>["","none",N,se,le],ce=()=>["none",Se,se,le],et=()=>["none",Se,se,le],ct=()=>[Se,se,le],pt=()=>[Pn,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ha],breakpoint:[ha],color:[Mv],container:[ha],"drop-shadow":[ha],ease:["in","out","in-out"],font:[Lv],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ha],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ha],shadow:[ha],spacing:["px",Se],text:[ha],"text-shadow":[ha],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pn,le,se,A]}],container:["container"],columns:[{columns:[Se,le,se,y]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Y()}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:J()}],"inset-x":[{"inset-x":J()}],"inset-y":[{"inset-y":J()}],start:[{start:J()}],end:[{end:J()}],top:[{top:J()}],right:[{right:J()}],bottom:[{bottom:J()}],left:[{left:J()}],visibility:["visible","invisible","collapse"],z:[{z:[Ga,"auto",se,le]}],basis:[{basis:[Pn,"full","auto",y,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Se,Pn,"auto","initial","none",le]}],grow:[{grow:["",Se,se,le]}],shrink:[{shrink:["",Se,se,le]}],order:[{order:[Ga,"first","last","none",se,le]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:de()}],"col-start":[{"col-start":me()}],"col-end":[{"col-end":me()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:de()}],"row-start":[{"row-start":me()}],"row-end":[{"row-end":me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ke()}],"auto-rows":[{"auto-rows":ke()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...xe(),"normal"]}],"justify-self":[{"justify-self":["auto",...xe()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...xe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...xe(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...xe(),"baseline"]}],"place-self":[{"place-self":["auto",...xe()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],w:[{w:[y,"screen",...V()]}],"min-w":[{"min-w":[y,"screen","none",...V()]}],"max-w":[{"max-w":[y,"screen","none","prose",{screen:[m]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",r,is,rn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,se,yu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pu,le]}],"font-family":[{font:[Bv,le,s]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[d,se,le]}],"line-clamp":[{"line-clamp":[Se,"none",se,yu]}],leading:[{leading:[f,...O()]}],"list-image":[{"list-image":["none",se,le]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",se,le]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[Se,"from-font","auto",se,rn]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[Se,"auto",se,le]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se,le]}],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",se,le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:E()}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ga,se,le],radial:["",se,le],conic:[Ga,se,le]},qv,Hv]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:ee()}],"gradient-via-pos":[{via:ee()}],"gradient-to-pos":[{to:ee()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:te()}],"border-w-x":[{"border-x":te()}],"border-w-y":[{"border-y":te()}],"border-w-s":[{"border-s":te()}],"border-w-e":[{"border-e":te()}],"border-w-t":[{"border-t":te()}],"border-w-r":[{"border-r":te()}],"border-w-b":[{"border-b":te()}],"border-w-l":[{"border-l":te()}],"divide-x":[{"divide-x":te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Se,se,le]}],"outline-w":[{outline:["",Se,is,rn]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",v,Dr,zr]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",w,Dr,zr]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[Se,rn]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":te()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",b,Dr,zr]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[Se,se,le]}],"mix-blend":[{"mix-blend":[...F(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":F()}],"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":[Se]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[se,le]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"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":q()}],"mask-image-conic-pos":[{"mask-conic":[Se]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ue()}],"mask-repeat":[{mask:E()}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",se,le]}],filter:[{filter:["","none",se,le]}],blur:[{blur:ae()}],brightness:[{brightness:[Se,se,le]}],contrast:[{contrast:[Se,se,le]}],"drop-shadow":[{"drop-shadow":["","none",R,Dr,zr]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",Se,se,le]}],"hue-rotate":[{"hue-rotate":[Se,se,le]}],invert:[{invert:["",Se,se,le]}],saturate:[{saturate:[Se,se,le]}],sepia:[{sepia:["",Se,se,le]}],"backdrop-filter":[{"backdrop-filter":["","none",se,le]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[Se,se,le]}],"backdrop-contrast":[{"backdrop-contrast":[Se,se,le]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Se,se,le]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Se,se,le]}],"backdrop-invert":[{"backdrop-invert":["",Se,se,le]}],"backdrop-opacity":[{"backdrop-opacity":[Se,se,le]}],"backdrop-saturate":[{"backdrop-saturate":[Se,se,le]}],"backdrop-sepia":[{"backdrop-sepia":["",Se,se,le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",se,le]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Se,"initial",se,le]}],ease:[{ease:["linear","initial",z,se,le]}],delay:[{delay:[Se,se,le]}],animate:[{animate:["none",T,se,le]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,se,le]}],"perspective-origin":[{"perspective-origin":Y()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:et()}],"scale-x":[{"scale-x":et()}],"scale-y":[{"scale-y":et()}],"scale-z":[{"scale-z":et()}],"scale-3d":["scale-3d"],skew:[{skew:ct()}],"skew-x":[{"skew-x":ct()}],"skew-y":[{"skew-y":ct()}],transform:[{transform:[se,le,"","none","gpu","cpu"]}],"transform-origin":[{origin:Y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pt()}],"translate-x":[{"translate-x":pt()}],"translate-y":[{"translate-y":pt()}],"translate-z":[{"translate-z":pt()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"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",se,le]}],"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":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",se,le]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[Se,is,rn,yu]}],stroke:[{stroke:["none",...$()]}],"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"]}},$v=Ev(Kv);function qa(...l){return $v(dv(l))}const Qv=({message:l,type:s="info",duration:r=3e3,onClose:o,visible:d})=>{S.useEffect(()=>{if(d){const h=setTimeout(()=>{o()},r);return()=>clearTimeout(h)}},[d,r,o]);const f={success:c.jsx(Bu,{className:"w-5 h-5 text-green-500"}),error:c.jsx(ds,{className:"w-5 h-5 text-red-500"}),info:c.jsx("svg",{className:"w-5 h-5 text-blue-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.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:c.jsx("svg",{className:"w-5 h-5 text-yellow-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.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"},y={success:"text-green-800",error:"text-red-800",info:"text-blue-800",warning:"text-yellow-800"};return c.jsx("div",{className:qa("fixed top-4 right-4 z-50 max-w-sm p-4 rounded-md shadow-lg border",m[s],"transform transition-all duration-300 ease-in-out",d?"translate-x-0 opacity-100":"translate-x-full opacity-0"),children:c.jsxs("div",{className:"flex items-start",children:[c.jsx("div",{className:"flex-shrink-0",children:f[s]}),c.jsx("div",{className:"ml-3",children:c.jsx("p",{className:qa("text-sm font-medium",y[s]),children:l})}),c.jsx("div",{className:"ml-auto pl-3",children:c.jsx("div",{className:"-mx-1.5 -my-1.5",children:c.jsxs("button",{onClick:o,className:qa("inline-flex rounded-md p-1.5",`hover:bg-${s}-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-${s}-500`),children:[c.jsx("span",{className:"sr-only",children:"Dismiss"}),c.jsx(ds,{className:"h-5 w-5"})]})})})]})})},og=S.createContext(void 0),ps=()=>{const l=S.useContext(og);if(!l)throw new Error("useToast must be used within a ToastProvider");return l},Xv=({children:l})=>{const[s,r]=S.useState({message:"",type:"info",visible:!1,duration:3e3}),o=S.useCallback((f,m="info",y=3e3)=>{r({message:f,type:m,visible:!0,duration:y})},[]),d=S.useCallback(()=>{r(f=>({...f,visible:!1}))},[]);return c.jsxs(og.Provider,{value:{showToast:o},children:[l,c.jsx(Qv,{message:s.message,type:s.type,duration:s.duration,onClose:d,visible:s.visible})]})},ug=S.createContext(void 0),Zv=()=>{const l=S.useContext(ug);if(!l)throw new Error("useTheme must be used within a ThemeProvider");return l},Pv=({children:l})=>{const[s,r]=S.useState(()=>localStorage.getItem("theme")||"system"),[o,d]=S.useState("light"),f=m=>{r(m),localStorage.setItem("theme",m)};return S.useEffect(()=>{const m=()=>{const h=window.document.documentElement,g=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",v=s==="system"?g:s;d(v),v==="dark"?(console.log("Applying dark mode to HTML root element"),h.classList.add("dark"),document.body.style.backgroundColor="#111827"):(console.log("Removing dark mode from HTML root element"),h.classList.remove("dark"),document.body.style.backgroundColor="")},y=window.matchMedia("(prefers-color-scheme: dark)");return y.addEventListener("change",m),m(),()=>{y.removeEventListener("change",m)}},[s]),c.jsx(ug.Provider,{value:{theme:s,setTheme:f,resolvedTheme:o},children:l})},Jv=(l,s,r,o)=>{var f,m,y,h;const d=[r,{code:s,...o||{}}];if((m=(f=l==null?void 0:l.services)==null?void 0:f.logger)!=null&&m.forward)return l.services.logger.forward(d,"warn","react-i18next::",!0);on(d[0])&&(d[0]=`react-i18next:: ${d[0]}`),(h=(y=l==null?void 0:l.services)==null?void 0:y.logger)!=null&&h.warn?l.services.logger.warn(...d):console!=null&&console.warn&&console.warn(...d)},lm={},Cu=(l,s,r,o)=>{on(r)&&lm[r]||(on(r)&&(lm[r]=new Date),Jv(l,s,r,o))},cg=(l,s)=>()=>{if(l.isInitialized)s();else{const r=()=>{setTimeout(()=>{l.off("initialized",r)},0),s()};l.on("initialized",r)}},ku=(l,s,r)=>{l.loadNamespaces(s,cg(l,r))},sm=(l,s,r,o)=>{if(on(r)&&(r=[r]),l.options.preload&&l.options.preload.indexOf(s)>-1)return ku(l,r,o);r.forEach(d=>{l.options.ns.indexOf(d)<0&&l.options.ns.push(d)}),l.loadLanguages(s,cg(l,o))},Fv=(l,s,r={})=>!s.languages||!s.languages.length?(Cu(s,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:s.languages}),!0):s.hasLoadedNamespace(l,{lng:r.lng,precheck:(o,d)=>{var f;if(((f=r.bindI18n)==null?void 0:f.indexOf("languageChanging"))>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!d(o.isLanguageChangingTo,l))return!1}}),on=l=>typeof l=="string",Wv=l=>typeof l=="object"&&l!==null,Iv=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,eb={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},tb=l=>eb[l],ab=l=>l.replace(Iv,tb);let Au={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:ab};const nb=(l={})=>{Au={...Au,...l}},lb=()=>Au;let dg;const sb=l=>{dg=l},rb=()=>dg,ib={type:"3rdParty",init(l){nb(l.options.react),sb(l)}},ob=S.createContext();class ub{constructor(){this.usedNamespaces={}}addUsedNamespaces(s){s.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const cb=(l,s)=>{const r=S.useRef();return S.useEffect(()=>{r.current=l},[l,s]),r.current},fg=(l,s,r,o)=>l.getFixedT(s,r,o),db=(l,s,r,o)=>S.useCallback(fg(l,s,r,o),[l,s,r,o]),Te=(l,s={})=>{var q,Y,W,H;const{i18n:r}=s,{i18n:o,defaultNS:d}=S.useContext(ob)||{},f=r||o||rb();if(f&&!f.reportNamespaces&&(f.reportNamespaces=new ub),!f){Cu(f,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const O=(re,de)=>on(de)?de:Wv(de)&&on(de.defaultValue)?de.defaultValue:Array.isArray(re)?re[re.length-1]:re,J=[O,{},!1];return J.t=O,J.i18n={},J.ready=!1,J}(q=f.options.react)!=null&&q.wait&&Cu(f,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const m={...lb(),...f.options.react,...s},{useSuspense:y,keyPrefix:h}=m;let g=d||((Y=f.options)==null?void 0:Y.defaultNS);g=on(g)?[g]:g||["translation"],(H=(W=f.reportNamespaces).addUsedNamespaces)==null||H.call(W,g);const v=(f.isInitialized||f.initializedStoreOnce)&&g.every(O=>Fv(O,f,m)),w=db(f,s.lng||null,m.nsMode==="fallback"?g:g[0],h),b=()=>w,R=()=>fg(f,s.lng||null,m.nsMode==="fallback"?g:g[0],h),[N,C]=S.useState(b);let A=g.join();s.lng&&(A=`${s.lng}${A}`);const z=cb(A),T=S.useRef(!0);S.useEffect(()=>{const{bindI18n:O,bindI18nStore:J}=m;T.current=!0,!v&&!y&&(s.lng?sm(f,s.lng,g,()=>{T.current&&C(R)}):ku(f,g,()=>{T.current&&C(R)})),v&&z&&z!==A&&T.current&&C(R);const re=()=>{T.current&&C(R)};return O&&(f==null||f.on(O,re)),J&&(f==null||f.store.on(J,re)),()=>{T.current=!1,f&&(O==null||O.split(" ").forEach(de=>f.off(de,re))),J&&f&&J.split(" ").forEach(de=>f.store.off(de,re))}},[f,A]),S.useEffect(()=>{T.current&&v&&C(b)},[f,h,v]);const D=[N,f,v];if(D.t=N,D.i18n=f,D.ready=v,v||!v&&!y)return D;throw new Promise(O=>{s.lng?sm(f,s.lng,g,()=>O()):ku(f,g,()=>O())})},hg=()=>{const{t:l}=Te(),{theme:s,setTheme:r}=Zv();return c.jsx("div",{className:"flex items-center space-x-2",children:c.jsxs("div",{className:"flex bg-gray-200 dark:bg-gray-700 rounded-lg p-1",children:[c.jsx("button",{onClick:()=>r("light"),className:`flex items-center justify-center rounded-md p-1.5 ${s==="light"?"bg-white text-yellow-600 shadow":"text-black dark:text-gray-300 hover:text-yellow-600 dark:hover:text-yellow-500"}`,title:l("theme.light"),"aria-label":l("theme.light"),children:c.jsx(sv,{size:18})}),c.jsx("button",{onClick:()=>r("dark"),className:`flex items-center justify-center rounded-md p-1.5 ${s==="dark"?"bg-gray-800 text-blue-400 shadow":"text-gray-600 dark:text-gray-300 hover:text-blue-500 dark:hover:text-blue-400"}`,title:l("theme.dark"),"aria-label":l("theme.dark"),children:c.jsx(Fx,{size:18})})]})})},fb=l=>c.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[c.jsx("title",{children:"GitHub"}),c.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"})]}),hb=l=>c.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[c.jsx("title",{children:"Sponsor"}),c.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"})]}),mb=l=>c.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[c.jsx("title",{children:"WeChat"}),c.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"})]}),gb=l=>c.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[c.jsx("title",{children:"Discord"}),c.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"})]}),pb=({open:l,onOpenChange:s})=>{const{i18n:r,t:o}=Te();return l?c.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:c.jsxs("div",{className:"p-6 relative",children:[c.jsx("button",{onClick:()=>s(!1),className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":o("common.close"),children:c.jsx(ds,{className:"h-5 w-5"})}),c.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:o("sponsor.title")}),c.jsx("div",{className:"flex flex-col items-center justify-center py-4",children:r.language==="zh"?c.jsx("img",{src:"./assets/reward.png",alt:o("sponsor.rewardAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}):c.jsxs("div",{className:"text-center",children:[c.jsx("p",{className:"mb-4 text-gray-700 dark:text-gray-300",children:o("sponsor.supportMessage")}),c.jsx("a",{href:"https://ko-fi.com/samanhappy",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center bg-[#13C3FF] text-white px-4 py-2 rounded-md hover:bg-[#00A5E5] transition-colors",children:o("sponsor.supportButton")})]})})]})})}):null},yb=({open:l,onOpenChange:s})=>{const{t:r}=Te();return l?c.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:c.jsxs("div",{className:"p-6 relative",children:[c.jsx("button",{onClick:()=>s(!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:c.jsx(ds,{className:"h-5 w-5"})}),c.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:r("wechat.title")}),c.jsxs("div",{className:"flex flex-col items-center justify-center py-4",children:[c.jsx("img",{src:"./assets/wexin.png",alt:r("wechat.qrCodeAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}),c.jsx("p",{className:"mt-4 text-center text-gray-700 dark:text-gray-300",children:r("wechat.scanMessage")})]})]})})}):null},xb=({onToggleSidebar:l})=>{const{t:s,i18n:r}=Te(),{auth:o}=Zr(),[d,f]=S.useState(!1),[m,y]=S.useState(!1);return c.jsxs("header",{className:"bg-white dark:bg-gray-800 shadow-sm z-10",children:[c.jsxs("div",{className:"flex justify-between items-center px-4 py-3",children:[c.jsxs("div",{className:"flex items-center",children:[c.jsx("button",{onClick:l,className:"p-2 rounded-md text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none","aria-label":s("app.toggleSidebar"),children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),c.jsx("h1",{className:"ml-4 text-xl font-bold text-gray-900 dark:text-white",children:s("app.title")})]}),c.jsxs("div",{className:"flex items-center space-x-4",children:[c.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"v0.7.2"}),c.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:c.jsx(fb,{className:"h-5 w-5"})}),r.language==="zh"?c.jsx("button",{onClick:()=>y(!0),className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 focus:outline-none","aria-label":s("wechat.label"),children:c.jsx(mb,{className:"h-5 w-5"})}):c.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":s("discord.label"),children:c.jsx(gb,{className:"h-5 w-5"})}),c.jsx("button",{onClick:()=>f(!0),className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 focus:outline-none","aria-label":s("sponsor.label"),children:c.jsx(hb,{className:"h-5 w-5"})}),c.jsx(hg,{})]})]}),c.jsx(pb,{open:d,onOpenChange:f}),c.jsx(yb,{open:m,onOpenChange:y})]})},vb="https://registry.npmjs.org",bb="@samanhappy/mcphub",mg=async()=>{try{const l=await fetch(`${vb}/${bb}/latest`);if(!l.ok)throw new Error(`Failed to fetch latest version: ${l.status}`);return(await l.json()).version||null}catch(l){return console.error("Error checking for latest version:",l),null}},gg=(l,s)=>{if(l==="dev")return-1;const r=l.split(".").map(Number),o=s.split(".").map(Number);for(let d=0;d<3;d++){const f=r[d]||0,m=o[d]||0;if(f>m)return-1;if(f<m)return 1}return 0},Sb=({isOpen:l,onClose:s,version:r})=>{const{t:o}=Te(),[d,f]=S.useState(!1),[m,y]=S.useState(""),[h,g]=S.useState(!1),v=async()=>{g(!0);try{const w=await mg();w&&(y(w),f(gg(r,w)>0))}catch(w){console.error("Failed to check for updates:",w)}finally{g(!1)}};return S.useEffect(()=>{l&&v()},[l,r]),l?c.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-30 z-50 flex items-center justify-center p-4",children:c.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:c.jsxs("div",{className:"p-6 relative",children:[c.jsx("button",{onClick:s,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":o("common.close"),children:c.jsx(ds,{className:"h-5 w-5"})}),c.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:o("about.title")}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("span",{className:"text-gray-700 dark:text-gray-300",children:[o("about.currentVersion"),":"]}),c.jsx("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:r})]}),d&&m&&c.jsx("div",{className:"bg-blue-50 dark:bg-blue-900 p-3 rounded",children:c.jsxs("div",{className:"flex items-start",children:[c.jsx("div",{className:"flex-shrink-0",children:c.jsx("svg",{className:"h-5 w-5 text-blue-600 dark:text-blue-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.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"})})}),c.jsxs("div",{className:"ml-3 flex-1 text-sm text-blue-700 dark:text-blue-300",children:[c.jsx("p",{children:o("about.newVersionAvailable",{version:m})}),c.jsx("p",{className:"mt-1",children:c.jsx("a",{href:"https://github.com/samanhappy/mcphub",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline",children:o("about.viewOnGitHub")})})]})]})}),c.jsxs("button",{onClick:v,disabled:h,className:`mt-4 inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium
|
|
147
|
-
${h?"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:[c.jsx(Ix,{className:`h-4 w-4 mr-2 ${h?"animate-spin":""}`}),o(h?"about.checking":"about.checkForUpdates")]})]})]})})}):null},wb=({collapsed:l,version:s})=>{var A;const{t:r}=Te(),o=un(),{auth:d,logout:f}=Zr(),[m,y]=S.useState(!1),[h,g]=S.useState(!1),[v,w]=S.useState(!1),b=S.useRef(null);S.useEffect(()=>{(async()=>{try{const T=await mg();T&&g(gg(s,T)>0)}catch(T){console.error("Error checking for new version:",T)}})()},[s]),S.useEffect(()=>{const z=T=>{b.current&&!b.current.contains(T.target)&&y(!1)};return document.addEventListener("mousedown",z),()=>{document.removeEventListener("mousedown",z)}},[]);const R=()=>{o("/settings"),y(!1)},N=()=>{f(),o("/login")},C=()=>{w(!0),y(!1)};return c.jsxs("div",{ref:b,className:"relative",children:[c.jsxs("button",{onClick:()=>y(!m),className:`flex ${l?"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:[c.jsxs("div",{className:"flex-shrink-0 relative",children:[c.jsx("div",{className:"w-7 h-7 flex items-center justify-center rounded-full border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700",children:c.jsx(uv,{className:"h-4 w-4 text-gray-700 dark:text-gray-300"})}),h&&c.jsx("span",{className:"absolute -top-1 -right-1 block w-2 h-2 bg-red-500 rounded-full"})]}),!l&&c.jsx("div",{className:"ml-3 flex flex-col items-start",children:c.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:((A=d.user)==null?void 0:A.username)||r("auth.user")})})]}),m&&c.jsxs("div",{className:"absolute top-0 transform -translate-y-full left-0 w-48 bg-white dark:bg-gray-800 shadow-lg rounded-md py-1 z-50",children:[c.jsxs("button",{onClick:R,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:[c.jsx(tv,{className:"h-4 w-4 mr-2"}),r("nav.settings")]}),c.jsxs("button",{onClick:C,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 relative",children:[c.jsx(Xx,{className:"h-4 w-4 mr-2"}),r("about.title"),h&&c.jsx("span",{className:"absolute top-2 right-4 block w-2 h-2 bg-red-500 rounded-full"})]}),c.jsxs("button",{onClick:N,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:[c.jsx(Px,{className:"h-4 w-4 mr-2"}),r("app.logout")]})]}),c.jsx(Sb,{isOpen:v,onClose:()=>w(!1),version:s})]})},Nb=({collapsed:l})=>{const{t:s}=Te();Jt();const r="0.7.2",o=[{path:"/",label:s("nav.dashboard"),icon:c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[c.jsx("path",{d:"M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"}),c.jsx("path",{d:"M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"})]})},{path:"/servers",label:s("nav.servers"),icon:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:c.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:s("nav.groups"),icon:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:c.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:s("nav.market"),icon:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:c.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:s("nav.logs"),icon:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:c.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 c.jsxs("aside",{className:`bg-white dark:bg-gray-800 shadow-sm transition-all duration-300 ease-in-out flex flex-col h-full relative ${l?"w-16":"w-64"}`,children:[c.jsx("div",{className:"overflow-y-auto flex-grow",children:c.jsx("nav",{className:"p-3 space-y-1",children:o.map(d=>c.jsxs(Vm,{to:d.path,className:({isActive:f})=>`flex items-center px-3 py-2 rounded-md transition-colors ${f?"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`,end:d.path==="/",children:[c.jsx("span",{className:"flex-shrink-0",children:d.icon}),!l&&c.jsx("span",{className:"ml-3",children:d.label})]},d.path))})}),c.jsx("div",{className:"p-3 bg-white dark:bg-gray-800",children:c.jsx(wb,{collapsed:l,version:r})})]})},jb=({children:l})=>c.jsx("main",{className:"flex-1 overflow-auto p-6 bg-gray-100 dark:bg-gray-900",children:c.jsx("div",{className:"container mx-auto",children:l})}),Eb=()=>{const[l,s]=vu.useState(!1),r=()=>{s(!l)};return c.jsxs("div",{className:"flex flex-col h-screen bg-gray-100 dark:bg-gray-900",children:[c.jsx(xb,{onToggleSidebar:r}),c.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[c.jsx(Nb,{collapsed:l}),c.jsx(jb,{children:c.jsx(Lm,{})})]})]})},Cb=({redirectPath:l="/login"})=>{const{t:s}=Te(),{auth:r}=Zr();return r.loading?c.jsx("div",{className:"flex items-center justify-center h-screen",children:s("app.loading")}):r.isAuthenticated?c.jsx(Lm,{}):c.jsx(Um,{to:l,replace:!0})},kb=()=>{const{t:l}=Te(),[s,r]=S.useState(""),[o,d]=S.useState(""),[f,m]=S.useState(null),[y,h]=S.useState(!1),{login:g}=Zr(),v=un(),w=async b=>{b.preventDefault(),m(null),h(!0);try{if(!s||!o){m(l("auth.emptyFields")),h(!1);return}await g(s,o)?v("/"):m(l("auth.loginFailed"))}catch{m(l("auth.loginError"))}finally{h(!1)}};return c.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 py-12 px-4 sm:px-6 lg:px-8",children:[c.jsx("div",{className:"absolute top-4 right-4",children:c.jsx(hg,{})}),c.jsxs("div",{className:"max-w-md w-full space-y-8",children:[c.jsx("div",{children:c.jsx("h2",{className:"mt-6 text-center text-3xl font-extrabold text-gray-900 dark:text-white",children:l("auth.loginTitle")})}),c.jsxs("form",{className:"mt-8 space-y-6",onSubmit:w,children:[c.jsxs("div",{className:"rounded-md shadow-sm -space-y-px",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"username",className:"sr-only",children:l("auth.username")}),c.jsx("input",{id:"username",name:"username",type:"text",autoComplete:"username",required:!0,className:"appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-700 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white dark:bg-gray-800 rounded-t-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm",placeholder:l("auth.username"),value:s,onChange:b=>r(b.target.value)})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"password",className:"sr-only",children:l("auth.password")}),c.jsx("input",{id:"password",name:"password",type:"password",autoComplete:"current-password",required:!0,className:"appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-700 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white dark:bg-gray-800 rounded-b-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm",placeholder:l("auth.password"),value:o,onChange:b=>d(b.target.value)})]})]}),f&&c.jsx("div",{className:"text-red-500 dark:text-red-400 text-sm text-center",children:f}),c.jsx("div",{children:c.jsx("button",{type:"submit",disabled:y,className:"group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:l(y?"auth.loggingIn":"auth.login")})})]})]})]})},Ur={startup:{maxAttempts:60,pollingInterval:3e3},normal:{pollingInterval:1e4}},ys=()=>{const{t:l}=Te(),[s,r]=S.useState([]),[o,d]=S.useState(null),[f,m]=S.useState(0),[y,h]=S.useState(!0),[g,v]=S.useState(0),w=S.useRef(null),b=S.useRef(0),R=()=>{w.current&&(clearInterval(w.current),w.current=null)},N=S.useCallback(()=>{R();const q=async()=>{try{const Y=localStorage.getItem("mcphub_token"),H=await(await fetch(Ee("/servers"),{headers:{"x-auth-token":Y||""}})).json();H&&H.success&&Array.isArray(H.data)?r(H.data):H&&Array.isArray(H)?r(H):(console.error("Invalid server data format:",H),r([])),d(null)}catch(Y){console.error("Error fetching servers during normal polling:",Y),navigator.onLine?Y instanceof TypeError&&(Y.message.includes("NetworkError")||Y.message.includes("Failed to fetch"))?d(l("errors.serverConnection")):d(l("errors.serverFetch")):d(l("errors.network"))}};q(),w.current=setInterval(q,Ur.normal.pollingInterval)},[l]);return S.useEffect(()=>{f>0&&(b.current=0,v(0));const q=async()=>{try{const Y=localStorage.getItem("mcphub_token"),H=await(await fetch(Ee("/servers"),{headers:{"x-auth-token":Y||""}})).json();return H&&H.success&&Array.isArray(H.data)?(r(H.data),h(!1),N(),!0):H&&Array.isArray(H)?(r(H),h(!1),N(),!0):(console.error("Invalid server data format:",H),r([]),h(!1),N(),!0)}catch(Y){return b.current+=1,console.error(`Initial loading attempt ${b.current} failed:`,Y),v(b.current),navigator.onLine?d(l("errors.initialStartup")):d(l("errors.network")),b.current>=Ur.startup.maxAttempts&&(console.log("Maximum startup attempts reached, switching to normal polling"),h(!1),R(),N()),!1}};return y?(R(),q(),w.current=setInterval(q,Ur.startup.pollingInterval),console.log(`Started initial polling with interval: ${Ur.startup.pollingInterval}ms`)):N(),()=>{R()}},[f,l,y,N]),{servers:s,error:o,setError:d,isLoading:y,fetchAttempts:g,triggerRefresh:()=>{R(),y&&(h(!0),b.current=0,v(0)),m(q=>q+1)},handleServerAdd:()=>{m(q=>q+1)},handleServerEdit:async q=>{try{const Y=localStorage.getItem("mcphub_token"),H=await(await fetch(Ee("/settings"),{headers:{"x-auth-token":Y||""}})).json();if(H&&H.success&&H.data&&H.data.mcpServers&&H.data.mcpServers[q.name]){const O=H.data.mcpServers[q.name];return{name:q.name,status:q.status,tools:q.tools||[],config:O}}else return console.error("Failed to get server config from settings:",H),d(l("server.invalidConfig",{serverName:q.name})),null}catch(Y){return console.error("Error fetching server settings:",Y),d(Y instanceof Error?Y.message:String(Y)),null}},handleServerRemove:async q=>{try{const Y=localStorage.getItem("mcphub_token"),W=await fetch(Ee(`/servers/${q}`),{method:"DELETE",headers:{"x-auth-token":Y||""}}),H=await W.json();return W.ok?(m(O=>O+1),!0):(d(H.message||l("server.deleteError",{serverName:q})),!1)}catch(Y){return d(l("errors.general")+": "+(Y instanceof Error?Y.message:String(Y))),!1}},handleServerToggle:async(q,Y)=>{try{const W=localStorage.getItem("mcphub_token"),H=await fetch(Ee(`/servers/${q.name}/toggle`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":W||""},body:JSON.stringify({enabled:Y})}),O=await H.json();return H.ok?(m(J=>J+1),!0):(console.error("Failed to toggle server:",O),d(l("server.toggleError",{serverName:q.name})),!1)}catch(W){return console.error("Error toggling server:",W),d(W instanceof Error?W.message:String(W)),!1}}}},Ab=()=>{const{t:l}=Te(),{servers:s,error:r,setError:o,isLoading:d}=ys(),f={total:s.length,online:s.filter(h=>h.status==="connected").length,offline:s.filter(h=>h.status==="disconnected").length,connecting:s.filter(h=>h.status==="connecting").length},m={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting"},y=h=>s.length===0?0:Math.round(s.filter(g=>g.status===h).length/s.length*100);return c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:l("pages.dashboard.title")}),r&&c.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-red-600 text-lg font-medium",children:l("app.error")}),c.jsx("p",{className:"text-gray-600 mt-1",children:r})]}),c.jsx("button",{onClick:()=>o(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":l("app.closeButton"),children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:c.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?c.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:c.jsxs("div",{className:"flex flex-col items-center",children:[c.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:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.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"})]}),c.jsx("p",{className:"text-gray-600",children:l("app.loading")})]})}):c.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4",children:[c.jsx("div",{className:"bg-white rounded-lg shadow p-6",children:c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"p-3 rounded-full bg-blue-100 text-blue-800",children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.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"})})}),c.jsxs("div",{className:"ml-4",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:l("pages.dashboard.totalServers")}),c.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.total})]})]})}),c.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"p-3 rounded-full bg-green-100 text-green-800",children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.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"})})}),c.jsxs("div",{className:"ml-4",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:l("pages.dashboard.onlineServers")}),c.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.online})]})]}),c.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:c.jsx("div",{className:"h-full bg-green-500 rounded-full",style:{width:`${y("connected")}%`}})})]}),c.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"p-3 rounded-full bg-red-100 text-red-800",children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.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"})})}),c.jsxs("div",{className:"ml-4",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:l("pages.dashboard.offlineServers")}),c.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.offline})]})]}),c.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:c.jsx("div",{className:"h-full bg-red-500 rounded-full",style:{width:`${y("disconnected")}%`}})})]}),c.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"p-3 rounded-full bg-yellow-100 text-yellow-800",children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),c.jsxs("div",{className:"ml-4",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:l("pages.dashboard.connectingServers")}),c.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.connecting})]})]}),c.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:c.jsx("div",{className:"h-full bg-yellow-500 rounded-full",style:{width:`${y("connecting")}%`}})})]})]}),s.length>0&&!d&&c.jsxs("div",{className:"mt-8",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:l("pages.dashboard.recentServers")}),c.jsx("div",{className:"bg-white shadow rounded-lg overflow-hidden",children:c.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[c.jsx("thead",{className:"bg-gray-50",children:c.jsxs("tr",{children:[c.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:l("server.name")}),c.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:l("server.status")}),c.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:l("server.tools")}),c.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:l("server.enabled")})]})}),c.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:s.slice(0,5).map((h,g)=>{var v;return c.jsxs("tr",{children:[c.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:h.name}),c.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:c.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${h.status==="connected"?"bg-green-100 text-green-800":h.status==="disconnected"?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:l(m[h.status]||h.status)})}),c.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:((v=h.tools)==null?void 0:v.length)||0}),c.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:h.enabled!==!1?c.jsx("span",{className:"text-green-600",children:"✓"}):c.jsx("span",{className:"text-red-600",children:"✗"})})]},g)})})]})})]})]})},Tb={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 Lr({children:l,variant:s="default",className:r,onClick:o}){return c.jsx("span",{className:qa("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors",Tb[s],o?"cursor-pointer":"",r),onClick:o,children:l})}const Rb=({status:l})=>{const{t:s}=Te(),r={connecting:"bg-yellow-100 text-yellow-800",connected:"bg-green-100 text-green-800",disconnected:"bg-red-100 text-red-800"},o={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting"};return c.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${r[l]}`,children:s(o[l]||l)})},Ob=({tool:l})=>{const[s,r]=S.useState(!1);return c.jsxs("div",{className:"bg-white shadow rounded-lg p-4 mb-4",children:[c.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>r(!s),children:[c.jsx("h3",{className:"text-lg font-medium text-gray-900",children:l.name}),c.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:s?c.jsx(Zm,{size:18}):c.jsx(Pm,{size:18})})]}),s&&c.jsxs("div",{className:"mt-4",children:[c.jsx("p",{className:"text-gray-600 mb-2",children:l.description||"No description available"}),c.jsxs("div",{className:"bg-gray-50 rounded p-2",children:[c.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:"Input Schema:"}),c.jsx("pre",{className:"text-xs text-gray-600 overflow-auto",children:JSON.stringify(l.inputSchema,null,2)})]})]})]})},pg=({isOpen:l,onClose:s,onConfirm:r,serverName:o,isGroup:d=!1})=>{const{t:f}=Te();return l?c.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-30 z-50 flex items-center justify-center p-4",children:c.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:c.jsxs("div",{className:"p-6",children:[c.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-3",children:f(d?"groups.confirmDelete":"server.confirmDelete")}),c.jsx("p",{className:"text-gray-500 mb-6",children:d?f("groups.deleteWarning",{name:o}):f("server.deleteWarning",{name:o})}),c.jsxs("div",{className:"flex justify-end space-x-3",children:[c.jsx("button",{onClick:s,className:"px-4 py-2 text-gray-600 hover:text-gray-800",children:f("common.cancel")}),c.jsx("button",{onClick:r,className:"px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600",children:f("common.delete")})]})]})})}):null},Mb=({server:l,onRemove:s,onEdit:r,onToggle:o})=>{const{t:d}=Te(),{showToast:f}=ps(),[m,y]=S.useState(!1),[h,g]=S.useState(!1),[v,w]=S.useState(!1),[b,R]=S.useState(!1),[N,C]=S.useState(!1),A=S.useRef(null);S.useEffect(()=>{const H=O=>{A.current&&!A.current.contains(O.target)&&R(!1)};return document.addEventListener("mousedown",H),()=>{document.removeEventListener("mousedown",H)}},[]);const z=H=>{H.stopPropagation(),g(!0)},T=H=>{H.stopPropagation(),r(l)},D=async H=>{if(H.stopPropagation(),!(v||!o)){w(!0);try{await o(l,l.enabled===!1)}finally{w(!1)}}},q=H=>{H.stopPropagation(),R(!b)},Y=H=>{if(H.stopPropagation(),!!l.error)if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(l.error).then(()=>{C(!0),f(d("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>C(!1),2e3)});else{const O=document.createElement("textarea");O.value=l.error,O.style.position="fixed",O.style.left="-9999px",document.body.appendChild(O),O.focus(),O.select();try{document.execCommand("copy"),C(!0),f(d("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>C(!1),2e3)}catch(J){f(d("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",J)}document.body.removeChild(O)}},W=()=>{s(l.name),g(!1)};return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:`bg-white shadow rounded-lg p-6 mb-6 ${l.enabled===!1?"opacity-60":""}`,children:[c.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>y(!m),children:[c.jsxs("div",{className:"flex items-center space-x-3",children:[c.jsx("h2",{className:`text-xl font-semibold ${l.enabled===!1?"text-gray-600":"text-gray-900"}`,children:l.name}),c.jsx(Rb,{status:l.status}),l.error&&c.jsxs("div",{className:"relative",children:[c.jsx("div",{className:"cursor-pointer",onClick:q,"aria-label":d("server.viewErrorDetails"),children:c.jsx(Kx,{className:"text-red-500 hover:text-red-600",size:18})}),b&&c.jsxs("div",{ref:A,className:"absolute z-10 mt-2 bg-white border border-gray-200 rounded-md shadow-lg p-0 w-120",style:{left:"-231px",top:"24px",maxHeight:"300px",overflowY:"auto",width:"480px",transform:"translateX(50%)"},onClick:H=>H.stopPropagation(),children:[c.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:[c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("h4",{className:"text-sm font-medium text-red-600",children:d("server.errorDetails")}),c.jsx("button",{onClick:Y,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:d("common.copy"),children:N?c.jsx(Bu,{size:14,className:"text-green-500"}):c.jsx(Jm,{size:14})})]}),c.jsx("button",{onClick:H=>{H.stopPropagation(),R(!1)},className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),c.jsx("div",{className:"p-4 pt-2",children:c.jsx("pre",{className:"text-sm text-gray-700 break-words whitespace-pre-wrap",children:l.error})})]})]})]}),c.jsxs("div",{className:"flex space-x-2",children:[c.jsx("button",{onClick:T,className:"px-3 py-1 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 text-sm",children:d("server.edit")}),c.jsx("div",{className:"flex items-center",children:c.jsx("button",{onClick:D,className:`px-3 py-1 text-sm rounded transition-colors ${v?"bg-gray-200 text-gray-500":l.enabled!==!1?"bg-green-100 text-green-800 hover:bg-green-200":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,disabled:v,children:v?d("common.processing"):l.enabled!==!1?d("server.disable"):d("server.enable")})}),c.jsx("button",{onClick:z,className:"px-3 py-1 bg-red-100 text-red-800 rounded hover:bg-red-200 text-sm",children:d("server.delete")}),c.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:m?c.jsx(Zm,{size:18}):c.jsx(Pm,{size:18})})]})]}),m&&l.tools&&c.jsxs("div",{className:"mt-6",children:[c.jsx("h3",{className:`text-lg font-medium ${l.enabled===!1?"text-gray-600":"text-gray-900"} mb-4`,children:d("server.tools")}),c.jsx("div",{className:"space-y-4",children:l.tools.map((H,O)=>c.jsx(Ob,{tool:H},O))})]})]}),c.jsx(pg,{isOpen:h,onClose:()=>g(!1),onConfirm:W,serverName:l.name})]})},qu=({onSubmit:l,onCancel:s,initialData:r=null,modalTitle:o,formError:d=null})=>{const{t:f}=Te(),m=()=>!r||!r.config?"stdio":r.config.type?r.config.type:r.config.url?"sse":"stdio",[y,h]=S.useState(m()),[g,v]=S.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:[]}),[w,b]=S.useState(r&&r.config&&r.config.env?Object.entries(r.config.env).map(([H,O])=>({key:H,value:O})):[]),[R,N]=S.useState(null),C=!!r,A=H=>{const{name:O,value:J}=H.target;v({...g,[O]:J})},z=H=>{let O=H.split(" ").filter(J=>J.trim()!=="");v({...g,arguments:H,args:O})},T=H=>{h(H),v(O=>({...O,type:H}))},D=(H,O,J)=>{const re=[...w];re[H][O]=J,b(re)},q=()=>{b([...w,{key:"",value:""}])},Y=H=>{const O=[...w];O.splice(H,1),b(O)},W=async H=>{H.preventDefault(),N(null);try{const O={};w.forEach(({key:re,value:de})=>{re.trim()&&(O[re.trim()]=de)});const J={name:g.name,config:{type:y,...y==="sse"||y==="streamable-http"?{url:g.url}:{command:g.command,args:g.args,env:Object.keys(O).length>0?O:void 0}}};l(J)}catch(O){N(`Error: ${O instanceof Error?O.message:String(O)}`)}};return c.jsxs("div",{className:"bg-white shadow rounded-lg p-6 w-full max-w-xl max-h-screen overflow-y-auto",children:[c.jsxs("div",{className:"flex justify-between items-center mb-4",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:o}),c.jsx("button",{onClick:s,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),(R||d)&&c.jsx("div",{className:"bg-red-50 text-red-700 p-3 rounded mb-4",children:d||R}),c.jsxs("form",{onSubmit:W,children:[c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:f("server.name")}),c.jsx("input",{type:"text",name:"name",id:"name",value:g.name,onChange:A,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: time-mcp",required:!0,disabled:C})]}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:f("server.type")}),c.jsxs("div",{className:"flex space-x-4",children:[c.jsxs("div",{children:[c.jsx("input",{type:"radio",id:"command",name:"serverType",value:"command",checked:y==="stdio",onChange:()=>T("stdio"),className:"mr-1"}),c.jsx("label",{htmlFor:"command",children:"STDIO"})]}),c.jsxs("div",{children:[c.jsx("input",{type:"radio",id:"url",name:"serverType",value:"url",checked:y==="sse",onChange:()=>T("sse"),className:"mr-1"}),c.jsx("label",{htmlFor:"url",children:"SSE"})]}),c.jsxs("div",{children:[c.jsx("input",{type:"radio",id:"streamable-http",name:"serverType",value:"streamable-http",checked:y==="streamable-http",onChange:()=>T("streamable-http"),className:"mr-1"}),c.jsx("label",{htmlFor:"streamable-http",children:"Streamable HTTP"})]})]})]}),y==="sse"||y==="streamable-http"?c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"url",children:f("server.url")}),c.jsx("input",{type:"url",name:"url",id:"url",value:g.url,onChange:A,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:y==="streamable-http"?"e.g.: http://localhost:3000/mcp":"e.g.: http://localhost:3000/sse",required:y==="sse"||y==="streamable-http"})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"command",children:f("server.command")}),c.jsx("input",{type:"text",name:"command",id:"command",value:g.command,onChange:A,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: npx",required:y==="stdio"})]}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"arguments",children:f("server.arguments")}),c.jsx("input",{type:"text",name:"arguments",id:"arguments",value:g.arguments,onChange:H=>z(H.target.value),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: -y time-mcp",required:y==="stdio"})]}),c.jsxs("div",{className:"mb-4",children:[c.jsxs("div",{className:"flex justify-between items-center mb-2",children:[c.jsx("label",{className:"block text-gray-700 text-sm font-bold",children:f("server.envVars")}),c.jsxs("button",{type:"button",onClick:q,className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center",children:["+ ",f("server.add")]})]}),w.map((H,O)=>c.jsxs("div",{className:"flex items-center mb-2",children:[c.jsxs("div",{className:"flex items-center space-x-2 flex-grow",children:[c.jsx("input",{type:"text",value:H.key,onChange:J=>D(O,"key",J.target.value),className:"shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline w-1/2",placeholder:f("server.key")}),c.jsx("span",{className:"flex items-center",children:":"}),c.jsx("input",{type:"text",value:H.value,onChange:J=>D(O,"value",J.target.value),className:"shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline w-1/2",placeholder:f("server.value")})]}),c.jsxs("button",{type:"button",onClick:()=>Y(O),className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center justify-center min-w-[56px] ml-2",children:["- ",f("server.remove")]})]},O))]})]}),c.jsxs("div",{className:"flex justify-end mt-6",children:[c.jsx("button",{type:"button",onClick:s,className:"bg-gray-300 hover:bg-gray-400 text-gray-800 font-medium py-2 px-4 rounded mr-2",children:f("server.cancel")}),c.jsx("button",{type:"submit",className:"bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded",children:f(C?"server.save":"server.add")})]})]})]})},zb=({onAdd:l})=>{const{t:s}=Te(),[r,o]=S.useState(!1),[d,f]=S.useState(null),m=()=>{o(!r),f(null)},y=async h=>{try{f(null);const g=localStorage.getItem("mcphub_token"),v=await fetch(Ee("/servers"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":g||""},body:JSON.stringify(h)}),w=await v.json();if(!v.ok){w&&w.message?f(w.message):v.status===400?f(s("server.invalidData")):v.status===409?f(s("server.alreadyExists",{serverName:h.name})):f(s("server.addError"));return}o(!1),l()}catch(g){console.error("Error adding server:",g),navigator.onLine?g instanceof TypeError&&(g.message.includes("NetworkError")||g.message.includes("Failed to fetch"))?f(s("errors.serverConnection")):f(s("errors.serverAdd")):f(s("errors.network"))}};return c.jsxs("div",{children:[c.jsx("button",{onClick:m,className:"w-full bg-blue-100 text-blue-800 rounded hover:bg-blue-200 py-2 px-4",children:s("server.addServer")}),r&&c.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:c.jsx(qu,{onSubmit:y,onCancel:m,modalTitle:s("server.addServer"),formError:d})})]})},Db=({server:l,onEdit:s,onCancel:r})=>{const{t:o}=Te(),[d,f]=S.useState(null),m=async y=>{try{f(null);const h=localStorage.getItem("mcphub_token"),g=await fetch(Ee(`/servers/${l.name}`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":h||""},body:JSON.stringify(y)}),v=await g.json();if(!g.ok){v&&v.message?f(v.message):g.status===404?f(o("server.notFound",{serverName:l.name})):g.status===400?f(o("server.invalidData")):f(o("server.updateError",{serverName:l.name}));return}s()}catch(h){console.error("Error updating server:",h),navigator.onLine?h instanceof TypeError&&(h.message.includes("NetworkError")||h.message.includes("Failed to fetch"))?f(o("errors.serverConnection")):f(o("errors.serverUpdate",{serverName:l.name})):f(o("errors.network"))}};return c.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:c.jsx(qu,{onSubmit:m,onCancel:r,initialData:l,modalTitle:o("server.editTitle",{serverName:l.name}),formError:d})})},Ub=()=>{const{t:l}=Te(),s=un(),{servers:r,error:o,setError:d,isLoading:f,handleServerAdd:m,handleServerEdit:y,handleServerRemove:h,handleServerToggle:g,triggerRefresh:v}=ys(),[w,b]=S.useState(null),[R,N]=S.useState(!1),C=async T=>{const D=await y(T);D&&b(D)},A=()=>{b(null),v()},z=async()=>{N(!0);try{v(),await new Promise(T=>setTimeout(T,500))}finally{N(!1)}};return c.jsxs("div",{children:[c.jsxs("div",{className:"flex justify-between items-center mb-8",children:[c.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:l("pages.servers.title")}),c.jsxs("div",{className:"flex space-x-4",children:[c.jsxs("button",{onClick:()=>s("/market"),className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3z"})}),l("nav.market")]}),c.jsx(zb,{onAdd:m}),c.jsxs("button",{onClick:z,disabled:R,className:`px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center ${R?"opacity-70 cursor-not-allowed":""}`,children:[R?c.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:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.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"})]}):c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z",clipRule:"evenodd"})}),l("common.refresh")]})]})]}),o&&c.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-red-600 text-lg font-medium",children:l("app.error")}),c.jsx("p",{className:"text-gray-600 mt-1",children:o})]}),c.jsx("button",{onClick:()=>d(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":l("app.closeButton"),children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:c.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?c.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:c.jsxs("div",{className:"flex flex-col items-center",children:[c.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:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.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"})]}),c.jsx("p",{className:"text-gray-600",children:l("app.loading")})]})}):r.length===0?c.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:c.jsx("p",{className:"text-gray-600",children:l("app.noServers")})}):c.jsx("div",{className:"space-y-6",children:r.map((T,D)=>c.jsx(Mb,{server:T,onRemove:h,onEdit:C,onToggle:g},D))}),w&&c.jsx(Db,{server:w,onEdit:A,onCancel:()=>b(null)})]})},Vu=()=>{const{t:l}=Te(),[s,r]=S.useState([]),[o,d]=S.useState(!0),[f,m]=S.useState(null),[y,h]=S.useState(0),g=S.useCallback(async()=>{try{d(!0);const z=localStorage.getItem("mcphub_token"),T=await fetch(Ee("/groups"),{headers:{"x-auth-token":z||""}});if(!T.ok)throw new Error(`Status: ${T.status}`);const D=await T.json();D&&D.success&&Array.isArray(D.data)?r(D.data):(console.error("Invalid group data format:",D),r([])),m(null)}catch(z){console.error("Error fetching groups:",z),m(z instanceof Error?z.message:"Failed to fetch groups"),r([])}finally{d(!1)}},[]),v=S.useCallback(()=>{h(z=>z+1)},[]),w=async(z,T,D=[])=>{try{const q=localStorage.getItem("mcphub_token"),Y=await fetch(Ee("/groups"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":q||""},body:JSON.stringify({name:z,description:T,servers:D})}),W=await Y.json();return Y.ok?(v(),W.data||null):(m(W.message||l("groups.createError")),null)}catch(q){return m(q instanceof Error?q.message:"Failed to create group"),null}},b=async(z,T)=>{try{const D=localStorage.getItem("mcphub_token"),q=await fetch(Ee(`/groups/${z}`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":D||""},body:JSON.stringify(T)}),Y=await q.json();return q.ok?(v(),Y.data||null):(m(Y.message||l("groups.updateError")),null)}catch(D){return m(D instanceof Error?D.message:"Failed to update group"),null}},R=async(z,T)=>{try{const D=localStorage.getItem("mcphub_token"),q=await fetch(Ee(`/groups/${z}/servers/batch`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":D||""},body:JSON.stringify({servers:T})}),Y=await q.json();return q.ok?(v(),Y.data||null):(m(Y.message||l("groups.updateError")),null)}catch(D){return m(D instanceof Error?D.message:"Failed to update group servers"),null}},N=async z=>{try{const T=localStorage.getItem("mcphub_token"),D=await fetch(Ee(`/groups/${z}`),{method:"DELETE",headers:{"x-auth-token":T||""}}),q=await D.json();return D.ok?(v(),!0):(m(q.message||l("groups.deleteError")),!1)}catch(T){return m(T instanceof Error?T.message:"Failed to delete group"),!1}},C=async(z,T)=>{try{const D=localStorage.getItem("mcphub_token"),q=await fetch(Ee(`/groups/${z}/servers`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":D||""},body:JSON.stringify({serverName:T})}),Y=await q.json();return q.ok?(v(),Y.data||null):(m(Y.message||l("groups.serverAddError")),null)}catch(D){return m(D instanceof Error?D.message:"Failed to add server to group"),null}},A=async(z,T)=>{try{const D=localStorage.getItem("mcphub_token"),q=await fetch(Ee(`/groups/${z}/servers/${T}`),{method:"DELETE",headers:{"x-auth-token":D||""}}),Y=await q.json();return q.ok?(v(),Y.data||null):(m(Y.message||l("groups.serverRemoveError")),null)}catch(D){return m(D instanceof Error?D.message:"Failed to remove server from group"),null}};return S.useEffect(()=>{g()},[g,y]),{groups:s,loading:o,error:f,setError:m,triggerRefresh:v,createGroup:w,updateGroup:b,updateGroupServers:R,deleteGroup:N,addServerToGroup:C,removeServerFromGroup:A}},Lb=({value:l,isSelected:s,onClick:r,children:o})=>c.jsxs("button",{type:"button",role:"checkbox","aria-checked":s,className:qa("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:r,children:[c.jsx("span",{className:"flex items-center",children:o}),s&&c.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:c.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"})})]}),yg=({label:l,helpText:s,noOptionsText:r="No options available",values:o,options:d,onChange:f,className:m})=>{const y=h=>{const g=o.includes(h);f(g?o.filter(v=>v!==h):[...o,h])};return c.jsxs("div",{className:m,children:[c.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:l}),c.jsx("div",{className:"border rounded shadow max-h-60 overflow-y-auto",children:d.length===0?c.jsx("p",{className:"text-gray-500 text-sm p-3",children:r}):c.jsx("div",{className:"space-y-1 p-1",children:d.map(h=>c.jsx(Lb,{value:h.value,isSelected:o.includes(h.value),onClick:()=>y(h.value),children:h.label},h.value))})}),s&&c.jsx("p",{className:"text-xs text-gray-500 mt-1",children:s})]})},_r=({checked:l,onCheckedChange:s,disabled:r=!1})=>c.jsx("button",{type:"button",role:"switch","aria-checked":l,disabled:r,className:qa("relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",l?"bg-blue-600":"bg-gray-200",r?"opacity-50 cursor-not-allowed":"cursor-pointer"),onClick:()=>!r&&s(!l),children:c.jsx("span",{className:qa("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",l?"translate-x-6":"translate-x-1")})}),_b=({onAdd:l,onCancel:s})=>{const{t:r}=Te(),{createGroup:o}=Vu(),{servers:d}=ys(),[f,m]=S.useState([]),[y,h]=S.useState(null),[g,v]=S.useState(!1),[w,b]=S.useState({name:"",description:"",servers:[]});S.useEffect(()=>{m(d.filter(C=>C.enabled!==!1))},[d]);const R=C=>{const{name:A,value:z}=C.target;b(T=>({...T,[A]:z}))},N=async C=>{C.preventDefault(),v(!0),h(null);try{if(!w.name.trim()){h(r("groups.nameRequired")),v(!1);return}if(!await o(w.name,w.description,w.servers)){h(r("groups.createError")),v(!1);return}l()}catch(A){h(A instanceof Error?A.message:String(A)),v(!1)}};return c.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:c.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:c.jsxs("div",{className:"p-6",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:r("groups.addNew")}),y&&c.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:y}),c.jsxs("form",{onSubmit:N,children:[c.jsxs("div",{className:"mb-4",children:[c.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[r("groups.name")," *"]}),c.jsx("input",{type:"text",id:"name",name:"name",value:w.name,onChange:R,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:r("groups.namePlaceholder"),required:!0})]}),c.jsx(yg,{className:"mb-6",label:r("groups.servers"),noOptionsText:r("groups.noServerOptions"),values:w.servers,options:f.map(C=>({value:C.name,label:C.name})),onChange:C=>b(A=>({...A,servers:C}))}),c.jsxs("div",{className:"flex justify-end space-x-3",children:[c.jsx("button",{type:"button",onClick:s,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:g,children:r("common.cancel")}),c.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",disabled:g,children:r(g?"common.submitting":"common.create")})]})]})]})})})},Hb=({group:l,onEdit:s,onCancel:r})=>{const{t:o}=Te(),{updateGroup:d}=Vu(),{servers:f}=ys(),[m,y]=S.useState([]),[h,g]=S.useState(null),[v,w]=S.useState(!1),[b,R]=S.useState({name:l.name,description:l.description||"",servers:l.servers||[]});S.useEffect(()=>{y(f.filter(A=>A.enabled!==!1))},[f]);const N=A=>{const{name:z,value:T}=A.target;R(D=>({...D,[z]:T}))},C=async A=>{A.preventDefault(),w(!0),g(null);try{if(!b.name.trim()){g(o("groups.nameRequired")),w(!1);return}if(!await d(l.id,{name:b.name,description:b.description,servers:b.servers})){g(o("groups.updateError")),w(!1);return}s()}catch(z){g(z instanceof Error?z.message:String(z)),w(!1)}};return c.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:c.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:c.jsxs("div",{className:"p-6",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:o("groups.edit")}),h&&c.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:h}),c.jsxs("form",{onSubmit:C,children:[c.jsxs("div",{className:"mb-4",children:[c.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[o("groups.name")," *"]}),c.jsx("input",{type:"text",id:"name",name:"name",value:b.name,onChange:N,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:o("groups.namePlaceholder"),required:!0})]}),c.jsx(yg,{className:"mb-6",label:o("groups.servers"),noOptionsText:o("groups.noServerOptions"),values:b.servers,options:m.map(A=>({value:A.name,label:A.name})),onChange:A=>R(z=>({...z,servers:A}))}),c.jsxs("div",{className:"flex justify-end space-x-3",children:[c.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:v,children:o("common.cancel")}),c.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",disabled:v,children:o(v?"common.submitting":"common.save")})]})]})]})})})},Bb=({group:l,servers:s,onEdit:r,onDelete:o})=>{const{t:d}=Te(),{showToast:f}=ps(),[m,y]=S.useState(!1),[h,g]=S.useState(!1),v=()=>{r(l)},w=()=>{y(!0)},b=()=>{o(l.id),y(!1)},R=()=>{if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(l.id).then(()=>{g(!0),setTimeout(()=>g(!1),2e3)});else{const C=document.createElement("textarea");C.value=l.id,C.style.position="fixed",C.style.left="-9999px",document.body.appendChild(C),C.focus(),C.select();try{document.execCommand("copy"),g(!0),setTimeout(()=>g(!1),2e3)}catch(A){f(d("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",A)}document.body.removeChild(C)}},N=s.filter(C=>l.servers.includes(C.name));return c.jsxs("div",{className:"bg-white shadow rounded-lg p-6",children:[c.jsxs("div",{className:"flex justify-between items-center mb-4",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center",children:[c.jsx("h2",{className:"text-xl font-semibold text-gray-800",children:l.name}),c.jsxs("div",{className:"flex items-center ml-3",children:[c.jsx("span",{className:"text-xs text-gray-500 mr-1",children:l.id}),c.jsx("button",{onClick:R,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:d("common.copy"),children:h?c.jsx(Bu,{size:14,className:"text-green-500"}):c.jsx(Jm,{size:14})})]})]}),l.description&&c.jsx("p",{className:"text-gray-600 text-sm mt-1",children:l.description})]}),c.jsxs("div",{className:"flex items-center space-x-3",children:[c.jsx("div",{className:"bg-blue-50 text-blue-700 px-3 py-1 rounded-full text-sm",children:d("groups.serverCount",{count:l.servers.length})}),c.jsx("button",{onClick:v,className:"text-gray-500 hover:text-gray-700",title:d("groups.edit"),children:c.jsx(nv,{size:18})}),c.jsx("button",{onClick:w,className:"text-gray-500 hover:text-red-600",title:d("groups.delete"),children:c.jsx(iv,{size:18})})]})]}),c.jsx("div",{className:"mt-4",children:N.length===0?c.jsx("p",{className:"text-gray-500 italic",children:d("groups.noServers")}):c.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:N.map(C=>c.jsxs("div",{className:"inline-flex items-center px-3 py-1 bg-gray-50 rounded",children:[c.jsx("span",{className:"font-medium text-gray-700 text-sm",children:C.name}),c.jsx("span",{className:`ml-2 inline-block h-2 w-2 rounded-full ${C.status==="connected"?"bg-green-500":C.status==="connecting"?"bg-yellow-500":"bg-red-500"}`})]},C.name))})}),c.jsx(pg,{isOpen:m,onClose:()=>y(!1),onConfirm:b,serverName:l.name,isGroup:!0})]})},Gb=()=>{const{t:l}=Te(),{groups:s,loading:r,error:o,setError:d,deleteGroup:f,triggerRefresh:m}=Vu(),{servers:y}=ys(),[h,g]=S.useState(null),[v,w]=S.useState(!1),b=z=>{g(z)},R=()=>{g(null),m()},N=async z=>{await f(z)||d(l("groups.deleteError"))},C=()=>{w(!0)},A=()=>{w(!1),m()};return c.jsxs("div",{children:[c.jsxs("div",{className:"flex justify-between items-center mb-8",children:[c.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:l("pages.groups.title")}),c.jsx("div",{className:"flex space-x-4",children:c.jsxs("button",{onClick:C,className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:c.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 00-1 1v5H4a1 1 0 100 2h5v5a1 1 0 102 0v-5h5a1 1 0 100-2h-5V4a1 1 0 00-1-1z",clipRule:"evenodd"})}),l("groups.add")]})})]}),o&&c.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:c.jsx("p",{children:o})}),r?c.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:c.jsxs("div",{className:"flex flex-col items-center justify-center",children:[c.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:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.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"})]}),c.jsx("p",{className:"text-gray-600",children:l("app.loading")})]})}):s.length===0?c.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:c.jsx("p",{className:"text-gray-600",children:l("groups.noGroups")})}):c.jsx("div",{className:"space-y-6",children:s.map(z=>c.jsx(Bb,{group:z,servers:y,onEdit:b,onDelete:N},z.id))}),v&&c.jsx(_b,{onAdd:A,onCancel:A}),h&&c.jsx(Hb,{group:h,onEdit:R,onCancel:()=>g(null)})]})},qb=({onSuccess:l,onCancel:s})=>{const{t:r}=Te(),[o,d]=S.useState({currentPassword:"",newPassword:""}),[f,m]=S.useState(""),[y,h]=S.useState(!1),[g,v]=S.useState(null),[w,b]=S.useState(!1),R=C=>{const{name:A,value:z}=C.target;A==="confirmPassword"?m(z):d(T=>({...T,[A]:z}))},N=async C=>{if(C.preventDefault(),v(null),o.newPassword!==f){v(r("auth.passwordsNotMatch"));return}h(!0);try{const A=await zx(o);A.success?(b(!0),l&&l()):v(A.message||r("auth.changePasswordError"))}catch{v(r("auth.changePasswordError"))}finally{h(!1)}};return c.jsxs("div",{className:"p-6 bg-white rounded-lg shadow-md",children:[c.jsx("h2",{className:"text-xl font-bold mb-4",children:r("auth.changePassword")}),w?c.jsx("div",{className:"bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded mb-4",children:r("auth.changePasswordSuccess")}):c.jsxs("form",{onSubmit:N,children:[g&&c.jsx("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4",children:g}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"currentPassword",children:r("auth.currentPassword")}),c.jsx("input",{type:"password",id:"currentPassword",name:"currentPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500",value:o.currentPassword,onChange:R,required:!0})]}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"newPassword",children:r("auth.newPassword")}),c.jsx("input",{type:"password",id:"newPassword",name:"newPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500",value:o.newPassword,onChange:R,required:!0,minLength:6})]}),c.jsxs("div",{className:"mb-6",children:[c.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"confirmPassword",children:r("auth.confirmPassword")}),c.jsx("input",{type:"password",id:"confirmPassword",name:"confirmPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500",value:f,onChange:R,required:!0,minLength:6})]}),c.jsxs("div",{className:"flex justify-end space-x-2",children:[s&&c.jsx("button",{type:"button",onClick:s,disabled:y,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")}),c.jsx("button",{type:"submit",disabled:y,className:"py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:y?c.jsxs("span",{className:"flex items-center",children:[c.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:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.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")})]})]})]})},Vb=()=>{const{t:l}=Te(),{showToast:s}=ps(),[r,o]=S.useState({enableGlobalRoute:!0,enableGroupNameRoute:!0,enableBearerAuth:!1,bearerAuthKey:""}),[d,f]=S.useState({bearerAuthKey:""}),[m,y]=S.useState({pythonIndexUrl:"",npmRegistry:""}),[h,g]=S.useState({enabled:!1,dbUrl:"",openaiApiBaseUrl:"",openaiApiKey:"",openaiApiEmbeddingModel:""}),[v,w]=S.useState(!1),[b,R]=S.useState(null),[N,C]=S.useState(0),A=S.useCallback(()=>{C(W=>W+1)},[]),z=S.useCallback(async()=>{var W,H,O,J,re,de;w(!0),R(null);try{const me=localStorage.getItem("mcphub_token"),ke=await fetch(Ee("/settings"),{headers:{"x-auth-token":me||""}});if(!ke.ok)throw new Error(`HTTP error! Status: ${ke.status}`);const oe=await ke.json();oe.success&&((H=(W=oe.data)==null?void 0:W.systemConfig)!=null&&H.routing)&&o({enableGlobalRoute:oe.data.systemConfig.routing.enableGlobalRoute??!0,enableGroupNameRoute:oe.data.systemConfig.routing.enableGroupNameRoute??!0,enableBearerAuth:oe.data.systemConfig.routing.enableBearerAuth??!1,bearerAuthKey:oe.data.systemConfig.routing.bearerAuthKey||""}),oe.success&&((J=(O=oe.data)==null?void 0:O.systemConfig)!=null&&J.install)&&y({pythonIndexUrl:oe.data.systemConfig.install.pythonIndexUrl||"",npmRegistry:oe.data.systemConfig.install.npmRegistry||""}),oe.success&&((de=(re=oe.data)==null?void 0:re.systemConfig)!=null&&de.smartRouting)&&g({enabled:oe.data.systemConfig.smartRouting.enabled??!1,dbUrl:oe.data.systemConfig.smartRouting.dbUrl||"",openaiApiBaseUrl:oe.data.systemConfig.smartRouting.openaiApiBaseUrl||"",openaiApiKey:oe.data.systemConfig.smartRouting.openaiApiKey||"",openaiApiEmbeddingModel:oe.data.systemConfig.smartRouting.openaiApiEmbeddingModel||""})}catch(me){console.error("Failed to fetch settings:",me),R(me instanceof Error?me.message:"Failed to fetch settings"),s(l("errors.failedToFetchSettings"))}finally{w(!1)}},[l]),T=async(W,H)=>{w(!0),R(null);try{const O=localStorage.getItem("mcphub_token"),J=await fetch(Ee("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":O||""},body:JSON.stringify({routing:{[W]:H}})});if(!J.ok)throw new Error(`HTTP error! Status: ${J.status}`);return(await J.json()).success?(o({...r,[W]:H}),s(l("settings.systemConfigUpdated")),!0):(s(l("errors.failedToUpdateRouteConfig")),!1)}catch(O){return console.error("Failed to update routing config:",O),R(O instanceof Error?O.message:"Failed to update routing config"),s(l("errors.failedToUpdateRouteConfig")),!1}finally{w(!1)}},D=async(W,H)=>{w(!0),R(null);try{const O=localStorage.getItem("mcphub_token"),J=await fetch(Ee("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":O||""},body:JSON.stringify({install:{[W]:H}})});if(!J.ok)throw new Error(`HTTP error! Status: ${J.status}`);return(await J.json()).success?(y({...m,[W]:H}),s(l("settings.systemConfigUpdated")),!0):(s(l("errors.failedToUpdateSystemConfig")),!1)}catch(O){return console.error("Failed to update system config:",O),R(O instanceof Error?O.message:"Failed to update system config"),s(l("errors.failedToUpdateSystemConfig")),!1}finally{w(!1)}},q=async(W,H)=>{w(!0),R(null);try{const O=localStorage.getItem("mcphub_token"),J=await fetch(Ee("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":O||""},body:JSON.stringify({smartRouting:{[W]:H}})});if(!J.ok){const de=await J.json();throw new Error(de.message||`HTTP error! Status: ${J.status}`)}const re=await J.json();return re.success?(g({...h,[W]:H}),s(l("settings.systemConfigUpdated")),!0):(s(re.message||l("errors.failedToUpdateSmartRoutingConfig")),!1)}catch(O){console.error("Failed to update smart routing config:",O);const J=O instanceof Error?O.message:"Failed to update smart routing config";return R(J),s(J),!1}finally{w(!1)}},Y=async W=>{w(!0),R(null);try{const H=localStorage.getItem("mcphub_token"),O=await fetch(Ee("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":H||""},body:JSON.stringify({smartRouting:W})});if(!O.ok){const re=await O.json();throw new Error(re.message||`HTTP error! Status: ${O.status}`)}const J=await O.json();return J.success?(g({...h,...W}),s(l("settings.systemConfigUpdated")),!0):(s(J.message||l("errors.failedToUpdateSmartRoutingConfig")),!1)}catch(H){console.error("Failed to update smart routing config:",H);const O=H instanceof Error?H.message:"Failed to update smart routing config";return R(O),s(O),!1}finally{w(!1)}};return S.useEffect(()=>{z()},[z,N]),S.useEffect(()=>{r&&f({bearerAuthKey:r.bearerAuthKey})},[r]),{routingConfig:r,tempRoutingConfig:d,setTempRoutingConfig:f,installConfig:m,smartRoutingConfig:h,loading:v,error:b,setError:R,triggerRefresh:A,fetchSettings:z,updateRoutingConfig:T,updateInstallConfig:D,updateSmartRoutingConfig:q,updateSmartRoutingConfigBatch:Y}};function Yb(l=32){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=new Uint8Array(l);return crypto.getRandomValues(r),Array.from(r).map(o=>s.charAt(o%s.length)).join("")}const Kb=()=>{const{t:l,i18n:s}=Te(),r=un(),{showToast:o}=ps(),[d,f]=S.useState(s.language);S.useEffect(()=>{f(s.language)},[s.language]);const[m,y]=S.useState({pythonIndexUrl:"",npmRegistry:""}),[h,g]=S.useState({dbUrl:"",openaiApiBaseUrl:"",openaiApiKey:"",openaiApiEmbeddingModel:""}),{routingConfig:v,tempRoutingConfig:w,setTempRoutingConfig:b,installConfig:R,smartRoutingConfig:N,loading:C,updateRoutingConfig:A,updateInstallConfig:z,updateSmartRoutingConfig:T,updateSmartRoutingConfigBatch:D}=Vb();S.useEffect(()=>{R&&y(R)},[R]),S.useEffect(()=>{N&&g({dbUrl:N.dbUrl||"",openaiApiBaseUrl:N.openaiApiBaseUrl||"",openaiApiKey:N.openaiApiKey||"",openaiApiEmbeddingModel:N.openaiApiEmbeddingModel||""})},[N]);const[q,Y]=S.useState({routingConfig:!1,installConfig:!1,smartRoutingConfig:!1,password:!1}),W=V=>{Y($=>({...$,[V]:!$[V]}))},H=async(V,$)=>{if(await A(V,$),V==="enableBearerAuth"&&$===!0&&!w.bearerAuthKey){const ue=Yb();O(ue),await A("bearerAuthKey",ue)}},O=V=>{b($=>({...$,bearerAuthKey:V}))},J=async()=>{await A("bearerAuthKey",w.bearerAuthKey)},re=(V,$)=>{y({...m,[V]:$})},de=async V=>{await z(V,m[V])},me=(V,$)=>{g({...h,[V]:$})},ke=async V=>{await T(V,h[V])},oe=async V=>{if(V){const $=h.dbUrl||N.dbUrl,ue=h.openaiApiKey||N.openaiApiKey;if(!$||!ue){const Q=[];$||Q.push(l("settings.dbUrl")),ue||Q.push(l("settings.openaiApiKey")),o(l("settings.smartRoutingValidationError",{fields:Q.join(", ")}));return}const E={enabled:V};h.dbUrl!==N.dbUrl&&(E.dbUrl=h.dbUrl),h.openaiApiBaseUrl!==N.openaiApiBaseUrl&&(E.openaiApiBaseUrl=h.openaiApiBaseUrl),h.openaiApiKey!==N.openaiApiKey&&(E.openaiApiKey=h.openaiApiKey),h.openaiApiEmbeddingModel!==N.openaiApiEmbeddingModel&&(E.openaiApiEmbeddingModel=h.openaiApiEmbeddingModel),await D(E)}else await T("enabled",V)},xe=()=>{setTimeout(()=>{r("/")},2e3)},G=V=>{localStorage.setItem("i18nextLng",V),window.location.reload()};return c.jsxs("div",{className:"container mx-auto",children:[c.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:l("pages.settings.title")}),c.jsx("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h2",{className:"font-semibold text-gray-800",children:l("pages.settings.language")}),c.jsxs("div",{className:"flex space-x-3",children:[c.jsx("button",{className:`px-3 py-1.5 rounded-md transition-colors text-sm ${d.startsWith("en")?"bg-blue-500 text-white":"bg-blue-100 text-blue-800 hover:bg-blue-200"}`,onClick:()=>G("en"),children:"English"}),c.jsx("button",{className:`px-3 py-1.5 rounded-md transition-colors text-sm ${d.startsWith("zh")?"bg-blue-500 text-white":"bg-blue-100 text-blue-800 hover:bg-blue-200"}`,onClick:()=>G("zh"),children:"中文"})]})]})}),c.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[c.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>W("smartRoutingConfig"),children:[c.jsx("h2",{className:"font-semibold text-gray-800",children:l("pages.settings.smartRouting")}),c.jsx("span",{className:"text-gray-500",children:q.smartRoutingConfig?"▼":"►"})]}),q.smartRoutingConfig&&c.jsxs("div",{className:"space-y-4 mt-4",children:[c.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.enableSmartRouting")}),c.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableSmartRoutingDescription")})]}),c.jsx(_r,{disabled:C,checked:N.enabled,onCheckedChange:V=>oe(V)})]}),c.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[c.jsx("div",{className:"mb-2",children:c.jsxs("h3",{className:"font-medium text-gray-700",children:[c.jsx("span",{className:"text-red-500 px-1",children:"*"}),l("settings.dbUrl")]})}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("input",{type:"text",value:h.dbUrl,onChange:V=>me("dbUrl",V.target.value),placeholder:l("settings.dbUrlPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm border-gray-300",disabled:C}),c.jsx("button",{onClick:()=>ke("dbUrl"),disabled:C,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50",children:l("common.save")})]})]}),c.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[c.jsx("div",{className:"mb-2",children:c.jsxs("h3",{className:"font-medium text-gray-700",children:[c.jsx("span",{className:"text-red-500 px-1",children:"*"}),l("settings.openaiApiKey")]})}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("input",{type:"password",value:h.openaiApiKey,onChange:V=>me("openaiApiKey",V.target.value),placeholder:l("settings.openaiApiKeyPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm border-gray-300",disabled:C}),c.jsx("button",{onClick:()=>ke("openaiApiKey"),disabled:C,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50",children:l("common.save")})]})]}),c.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[c.jsx("div",{className:"mb-2",children:c.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.openaiApiBaseUrl")})}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("input",{type:"text",value:h.openaiApiBaseUrl,onChange:V=>me("openaiApiBaseUrl",V.target.value),placeholder:l("settings.openaiApiBaseUrlPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",disabled:C}),c.jsx("button",{onClick:()=>ke("openaiApiBaseUrl"),disabled:C,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50",children:l("common.save")})]})]}),c.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[c.jsx("div",{className:"mb-2",children:c.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.openaiApiEmbeddingModel")})}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("input",{type:"text",value:h.openaiApiEmbeddingModel,onChange:V=>me("openaiApiEmbeddingModel",V.target.value),placeholder:l("settings.openaiApiEmbeddingModelPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",disabled:C}),c.jsx("button",{onClick:()=>ke("openaiApiEmbeddingModel"),disabled:C,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50",children:l("common.save")})]})]})]})]}),c.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[c.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>W("routingConfig"),children:[c.jsx("h2",{className:"font-semibold text-gray-800",children:l("pages.settings.routeConfig")}),c.jsx("span",{className:"text-gray-500",children:q.routingConfig?"▼":"►"})]}),q.routingConfig&&c.jsxs("div",{className:"space-y-4 mt-4",children:[c.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.enableBearerAuth")}),c.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableBearerAuthDescription")})]}),c.jsx(_r,{disabled:C,checked:v.enableBearerAuth,onCheckedChange:V=>H("enableBearerAuth",V)})]}),v.enableBearerAuth&&c.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[c.jsxs("div",{className:"mb-2",children:[c.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.bearerAuthKey")}),c.jsx("p",{className:"text-sm text-gray-500",children:l("settings.bearerAuthKeyDescription")})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("input",{type:"text",value:w.bearerAuthKey,onChange:V=>O(V.target.value),placeholder:l("settings.bearerAuthKeyPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",disabled:C||!v.enableBearerAuth}),c.jsx("button",{onClick:J,disabled:C||!v.enableBearerAuth,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50",children:l("common.save")})]})]}),c.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.enableGlobalRoute")}),c.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableGlobalRouteDescription")})]}),c.jsx(_r,{disabled:C,checked:v.enableGlobalRoute,onCheckedChange:V=>H("enableGlobalRoute",V)})]}),c.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.enableGroupNameRoute")}),c.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableGroupNameRouteDescription")})]}),c.jsx(_r,{disabled:C,checked:v.enableGroupNameRoute,onCheckedChange:V=>H("enableGroupNameRoute",V)})]})]})]}),c.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[c.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>W("installConfig"),children:[c.jsx("h2",{className:"font-semibold text-gray-800",children:l("settings.installConfig")}),c.jsx("span",{className:"text-gray-500",children:q.installConfig?"▼":"►"})]}),q.installConfig&&c.jsxs("div",{className:"space-y-4 mt-4",children:[c.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[c.jsxs("div",{className:"mb-2",children:[c.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.pythonIndexUrl")}),c.jsx("p",{className:"text-sm text-gray-500",children:l("settings.pythonIndexUrlDescription")})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("input",{type:"text",value:m.pythonIndexUrl,onChange:V=>re("pythonIndexUrl",V.target.value),placeholder:l("settings.pythonIndexUrlPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",disabled:C}),c.jsx("button",{onClick:()=>de("pythonIndexUrl"),disabled:C,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50",children:l("common.save")})]})]}),c.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[c.jsxs("div",{className:"mb-2",children:[c.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.npmRegistry")}),c.jsx("p",{className:"text-sm text-gray-500",children:l("settings.npmRegistryDescription")})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("input",{type:"text",value:m.npmRegistry,onChange:V=>re("npmRegistry",V.target.value),placeholder:l("settings.npmRegistryPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",disabled:C}),c.jsx("button",{onClick:()=>de("npmRegistry"),disabled:C,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50",children:l("common.save")})]})]})]})]}),c.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[c.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>W("password"),children:[c.jsx("h2",{className:"font-semibold text-gray-800",children:l("auth.changePassword")}),c.jsx("span",{className:"text-gray-500",children:q.password?"▼":"►"})]}),q.password&&c.jsx("div",{className:"max-w-lg mt-4",children:c.jsx(qb,{onSuccess:xe})})]})]})},$b=()=>{const{t:l}=Te(),[s,r]=S.useState([]),[o,d]=S.useState([]),[f,m]=S.useState([]),[y,h]=S.useState([]),[g,v]=S.useState(""),[w,b]=S.useState(""),[R,N]=S.useState(""),[C,A]=S.useState(!0),[z,T]=S.useState(null),[D,q]=S.useState(null),[Y,W]=S.useState([]),[H,O]=S.useState(1),[J,re]=S.useState(9),[de,me]=S.useState(1),ke=S.useCallback(async()=>{try{A(!0);const F=localStorage.getItem("mcphub_token"),I=await fetch(Ee("/market/servers"),{headers:{"x-auth-token":F||""}});if(!I.ok)throw new Error(`Status: ${I.status}`);const ae=await I.json();ae&&ae.success&&Array.isArray(ae.data)?(d(ae.data),oe(ae.data,H)):(console.error("Invalid market servers data format:",ae),T(l("market.fetchError")))}catch(F){console.error("Error fetching market servers:",F),T(F instanceof Error?F.message:String(F))}finally{A(!1)}},[l]),oe=S.useCallback((F,I,ae=J)=>{const ce=F.length,et=Math.ceil(ce/ae);me(et);const ct=Math.max(1,Math.min(I,et));ct!==I&&O(ct);const pt=(ct-1)*ae,Ft=F.slice(pt,pt+ae);r(Ft)},[J]),xe=S.useCallback(F=>{O(F),oe(o,F,J)},[o,oe,J]),G=S.useCallback(async()=>{try{const F=localStorage.getItem("mcphub_token"),I=await fetch(Ee("/market/categories"),{headers:{"x-auth-token":F||""}});if(!I.ok)throw new Error(`Status: ${I.status}`);const ae=await I.json();ae&&ae.success&&Array.isArray(ae.data)?m(ae.data):console.error("Invalid categories data format:",ae)}catch(F){console.error("Error fetching categories:",F)}},[]),V=S.useCallback(async()=>{try{const F=localStorage.getItem("mcphub_token"),I=await fetch(Ee("/market/tags"),{headers:{"x-auth-token":F||""}});if(!I.ok)throw new Error(`Status: ${I.status}`);const ae=await I.json();ae&&ae.success&&Array.isArray(ae.data)?h(ae.data):console.error("Invalid tags data format:",ae)}catch(F){console.error("Error fetching tags:",F)}},[]),$=S.useCallback(async F=>{try{A(!0);const I=localStorage.getItem("mcphub_token"),ae=await fetch(Ee(`/market/servers/${F}`),{headers:{"x-auth-token":I||""}});if(!ae.ok)throw new Error(`Status: ${ae.status}`);const ce=await ae.json();return ce&&ce.success&&ce.data?(q(ce.data),ce.data):(console.error("Invalid server data format:",ce),T(l("market.serverNotFound")),null)}catch(I){return console.error(`Error fetching server ${F}:`,I),T(I instanceof Error?I.message:String(I)),null}finally{A(!1)}},[l]),ue=S.useCallback(async F=>{try{if(A(!0),N(F),!F.trim()){ke();return}const I=localStorage.getItem("mcphub_token"),ae=await fetch(Ee(`/market/servers/search?query=${encodeURIComponent(F)}`),{headers:{"x-auth-token":I||""}});if(!ae.ok)throw new Error(`Status: ${ae.status}`);const ce=await ae.json();ce&&ce.success&&Array.isArray(ce.data)?(d(ce.data),O(1),oe(ce.data,1)):(console.error("Invalid search results format:",ce),T(l("market.searchError")))}catch(I){console.error("Error searching servers:",I),T(I instanceof Error?I.message:String(I))}finally{A(!1)}},[l,o,oe,ke]),E=S.useCallback(async F=>{try{if(A(!0),v(F),b(""),!F){ke();return}const I=localStorage.getItem("mcphub_token"),ae=await fetch(Ee(`/market/categories/${encodeURIComponent(F)}`),{headers:{"x-auth-token":I||""}});if(!ae.ok)throw new Error(`Status: ${ae.status}`);const ce=await ae.json();ce&&ce.success&&Array.isArray(ce.data)?(d(ce.data),O(1),oe(ce.data,1)):(console.error("Invalid category filter results format:",ce),T(l("market.filterError")))}catch(I){console.error("Error filtering servers by category:",I),T(I instanceof Error?I.message:String(I))}finally{A(!1)}},[l,ke,oe]),Q=S.useCallback(async F=>{try{if(A(!0),b(F),v(""),!F){ke();return}const I=localStorage.getItem("mcphub_token"),ae=await fetch(Ee(`/market/tags/${encodeURIComponent(F)}`),{headers:{"x-auth-token":I||""}});if(!ae.ok)throw new Error(`Status: ${ae.status}`);const ce=await ae.json();ce&&ce.success&&Array.isArray(ce.data)?(d(ce.data),O(1),oe(ce.data,1)):(console.error("Invalid tag filter results format:",ce),T(l("market.tagFilterError")))}catch(I){console.error("Error filtering servers by tag:",I),T(I instanceof Error?I.message:String(I))}finally{A(!1)}},[l,ke,oe]),ee=S.useCallback(async()=>{try{const F=localStorage.getItem("mcphub_token"),I=await fetch(Ee("/servers"),{headers:{"x-auth-token":F||""}});if(!I.ok)throw new Error(`Status: ${I.status}`);const ae=await I.json();if(ae&&ae.success&&Array.isArray(ae.data)){const ce=ae.data.map(et=>et.name);W(ce)}}catch(F){console.error("Error fetching installed servers:",F)}},[]),Z=S.useCallback(F=>Y.includes(F),[Y]),te=S.useCallback(async F=>{var I,ae;try{const ce=(I=F.installations)!=null&&I.npm?"npm":Object.keys(F.installations||{}).length>0?Object.keys(F.installations)[0]:null;if(!ce||!((ae=F.installations)!=null&&ae[ce]))return T(l("market.noInstallationMethod")),!1;const et=F.installations[ce],ct={name:F.name,config:{command:et.command,args:et.args,env:et.env||{}}},pt=localStorage.getItem("mcphub_token"),Ft=await fetch(Ee("/servers"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":pt||""},body:JSON.stringify(ct)});if(!Ft.ok){const sl=await Ft.json();throw new Error(sl.message||`Status: ${Ft.status}`)}return await ee(),!0}catch(ce){return console.error("Error installing server:",ce),T(ce instanceof Error?ce.message:String(ce)),!1}},[l,ee]),ve=S.useCallback(F=>{re(F),O(1),oe(o,1,F)},[o,oe]);return S.useEffect(()=>{ke(),G(),V(),ee()},[ke,G,V,ee]),{servers:s,allServers:o,categories:f,tags:y,selectedCategory:g,selectedTag:w,searchQuery:R,loading:C,error:z,setError:T,currentServer:D,fetchMarketServers:ke,fetchServerByName:$,searchServers:ue,filterByCategory:E,filterByTag:Q,installServer:te,currentPage:H,totalPages:de,serversPerPage:J,changePage:xe,changeServersPerPage:ve,isServerInstalled:Z}},Qb=({server:l,onClick:s})=>{var y,h,g,v;const{t:r}=Te(),o=()=>{if(!l.tags||l.tags.length===0)return{tagsToShow:[],hasMore:!1,moreCount:0};const w=28,b=T=>T.length+3;let R=0,N=0;const C=[...l.tags].sort((T,D)=>T.length-D.length);for(N=0;N<C.length;N++){const T=b(C[N]);if(R+T>w)break;if(R+=T,N===C.length-1)return{tagsToShow:C,hasMore:!1,moreCount:0}}N===0&&C.length>0&&(N=1);const A=C.length-N,z=3+String(A).length+r("market.moreTags").length;return R+z<=w||N<1?{tagsToShow:C.slice(0,N),hasMore:!0,moreCount:A}:{tagsToShow:C.slice(0,Math.max(1,N-1)),hasMore:!0,moreCount:A+1}},{tagsToShow:d,hasMore:f,moreCount:m}=o();return c.jsxs("div",{className:"bg-white rounded-lg shadow-md p-5 hover:shadow-lg transition-shadow cursor-pointer flex flex-col h-full",onClick:()=>s(l),children:[c.jsxs("div",{className:"flex justify-between items-start mb-3",children:[c.jsx("h3",{className:"text-lg font-semibold text-gray-900 line-clamp-1 mr-2",children:l.display_name}),l.is_official&&c.jsx("span",{className:"bg-blue-100 text-blue-800 text-xs font-medium px-2.5 py-0.5 rounded flex-shrink-0",children:r("market.official")})]}),c.jsx("p",{className:"text-gray-600 text-sm mb-4 line-clamp-2 min-h-[40px]",children:l.description}),c.jsx("div",{className:"flex flex-wrap gap-1 mb-2 min-h-[28px]",children:((y=l.categories)==null?void 0:y.length)>0?l.categories.map((w,b)=>c.jsx("span",{className:"bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded whitespace-nowrap",children:w},b)):c.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),c.jsx("div",{className:"relative mb-3 min-h-[28px] overflow-x-auto",children:((h=l.tags)==null?void 0:h.length)>0?c.jsxs("div",{className:"flex gap-1 items-center whitespace-nowrap",children:[d.map((w,b)=>c.jsxs("span",{className:"bg-green-50 text-green-700 text-xs px-2 py-1 rounded flex-shrink-0",children:["#",w]},b)),f&&c.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")]})]}):c.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),c.jsxs("div",{className:"flex justify-between items-center mt-auto pt-2 text-xs text-gray-500 border-t border-gray-100",children:[c.jsxs("div",{className:"overflow-hidden",children:[c.jsxs("span",{className:"whitespace-nowrap",children:[r("market.by")," "]}),c.jsx("span",{className:"font-medium whitespace-nowrap overflow-hidden text-ellipsis max-w-[120px] inline-block align-bottom",children:((g=l.author)==null?void 0:g.name)||r("market.unknown")})]}),c.jsxs("div",{className:"flex items-center flex-shrink-0",children:[c.jsx("svg",{className:"h-4 w-4 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:c.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"})}),c.jsxs("span",{children:[((v=l.tools)==null?void 0:v.length)||0," ",r("market.tools")]})]})]})]})},Xb=({server:l,onBack:s,onInstall:r,installing:o=!1,isInstalled:d=!1})=>{var z,T;const{t:f}=Te(),[m,y]=S.useState(!1),[h,g]=S.useState(null),v=()=>d?{className:"bg-green-600 cursor-default px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:f("market.installed")}:o?{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",disabled:!1,text:f("market.install")},w=()=>{y(!m),g(null)},b=()=>{d||w()},R=()=>{if(!l.installations)return;if(l.installations.npm)return l.installations.npm;if(l.installations.uvx)return l.installations.uvx;if(l.installations.default)return l.installations.default;const D=Object.keys(l.installations);if(D.length>0)return l.installations[D[0]]},N=async D=>{try{g(null),r(l),y(!1)}catch(q){console.error("Error installing server:",q),g(f("errors.serverInstall"))}},C=v(),A=R();return c.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[c.jsx("div",{className:"mb-4",children:c.jsxs("button",{onClick:s,className:"text-gray-600 hover:text-gray-900 flex items-center",children:[c.jsx("svg",{className:"h-5 w-5 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:c.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")]})}),c.jsxs("div",{className:"flex justify-between items-start mb-4",children:[c.jsx("div",{children:c.jsxs("h2",{className:"text-2xl font-bold text-gray-900 flex items-center flex-wrap",children:[l.display_name,c.jsxs("span",{className:"text-sm font-normal text-gray-500 ml-2",children:["(",l.name,")"]}),c.jsxs("span",{className:"text-sm font-normal text-gray-600 ml-4",children:[f("market.author"),": ",l.author.name," • ",f("market.license"),": ",l.license," •",c.jsx("a",{href:l.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline ml-1",children:f("market.repository")})]})]})}),c.jsxs("div",{className:"flex items-center",children:[l.is_official&&c.jsx("span",{className:"bg-blue-100 text-blue-800 text-sm font-medium px-4 py-2 rounded mr-2 flex items-center",children:f("market.official")}),c.jsx("button",{onClick:b,disabled:C.disabled,className:C.className,children:C.text})]})]}),c.jsx("p",{className:"text-gray-700 mb-6",children:l.description}),c.jsxs("div",{className:"mb-6",children:[c.jsxs("h3",{className:"text-lg font-semibold mb-3",children:[f("market.categories")," & ",f("market.tags")]}),c.jsxs("div",{className:"flex flex-wrap gap-2",children:[(z=l.categories)==null?void 0:z.map((D,q)=>c.jsx("span",{className:"bg-gray-100 text-gray-800 px-3 py-1 rounded",children:D},`cat-${q}`)),l.tags&&l.tags.map((D,q)=>c.jsxs("span",{className:"bg-gray-100 text-green-700 px-2 py-1 rounded text-sm",children:["#",D]},`tag-${q}`))]})]}),l.arguments&&Object.keys(l.arguments).length>0&&c.jsxs("div",{className:"mb-6",children:[c.jsx("h3",{className:"text-lg font-semibold mb-3",children:f("market.arguments")}),c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[c.jsx("thead",{className:"bg-gray-50",children:c.jsxs("tr",{children:[c.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")}),c.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")}),c.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")}),c.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")})]})}),c.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:Object.entries(l.arguments).map(([D,q],Y)=>c.jsxs("tr",{children:[c.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:D}),c.jsx("td",{className:"px-6 py-4 text-sm text-gray-500",children:q.description}),c.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:q.required?c.jsx("span",{className:"text-green-600",children:"✓"}):c.jsx("span",{className:"text-red-600",children:"✗"})}),c.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:c.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:q.example})})]},Y))})]})})]}),c.jsxs("div",{className:"mb-6",children:[c.jsx("h3",{className:"text-lg font-semibold mb-3",children:f("market.tools")}),c.jsx("div",{className:"space-y-4",children:(T=l.tools)==null?void 0:T.map((D,q)=>c.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[c.jsxs("h4",{className:"font-medium mb-2",children:[D.name,c.jsx("button",{type:"button",onClick:()=>{const Y=document.getElementById(`schema-${q}`);Y&&Y.classList.toggle("hidden")},className:"text-sm text-blue-600 hover:underline focus:outline-none ml-2",children:f("market.viewSchema")})]}),c.jsx("p",{className:"text-gray-600 mb-2",children:D.description}),c.jsx("div",{className:"mt-2",children:c.jsx("pre",{id:`schema-${q}`,className:"hidden bg-gray-50 p-3 rounded text-sm overflow-auto mt-2",children:JSON.stringify(D.inputSchema,null,2)})})]},q))})]}),l.examples&&l.examples.length>0&&c.jsxs("div",{className:"mb-6",children:[c.jsx("h3",{className:"text-lg font-semibold mb-3",children:f("market.examples")}),c.jsx("div",{className:"space-y-4",children:l.examples.map((D,q)=>c.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[c.jsx("h4",{className:"font-medium mb-2",children:D.title}),c.jsx("p",{className:"text-gray-600 mb-2",children:D.description}),c.jsx("pre",{className:"bg-gray-50 p-3 rounded text-sm overflow-auto",children:D.prompt})]},q))})]}),c.jsx("div",{className:"mt-6 flex justify-end",children:c.jsx("button",{onClick:b,disabled:C.disabled,className:C.className,children:C.text})}),m&&c.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:c.jsx(qu,{onSubmit:N,onCancel:w,modalTitle:f("market.installServer",{name:l.display_name}),formError:h,initialData:{name:l.name,status:"disconnected",config:A?{command:A.command||"",args:A.args||[],env:A.env||{}}:void 0}})})]})},Zb=({currentPage:l,totalPages:s,onPageChange:r})=>{const o=()=>{const d=[];d.push(c.jsx("button",{onClick:()=>r(1),className:`px-3 py-1 mx-1 rounded ${l===1?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"1"},"first"));let m=Math.max(2,l-Math.floor(5/2));m>2&&d.push(c.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis1"));for(let y=m;y<=Math.min(s-1,m+5-3);y++)d.push(c.jsx("button",{onClick:()=>r(y),className:`px-3 py-1 mx-1 rounded ${l===y?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:y},y));return m+5-3<s-1&&d.push(c.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis2")),s>1&&d.push(c.jsx("button",{onClick:()=>r(s),className:`px-3 py-1 mx-1 rounded ${l===s?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:s},"last")),d};return s<=1?null:c.jsxs("div",{className:"flex justify-center items-center my-6",children:[c.jsx("button",{onClick:()=>r(Math.max(1,l-1)),disabled:l===1,className:`px-3 py-1 rounded mr-2 ${l===1?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"« Prev"}),c.jsx("div",{className:"flex",children:o()}),c.jsx("button",{onClick:()=>r(Math.min(s,l+1)),disabled:l===s,className:`px-3 py-1 rounded ml-2 ${l===s?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"Next »"})]})},rm=()=>{const{t:l}=Te(),s=un();Jt();const{serverName:r}=zy(),{showToast:o}=ps(),{servers:d,allServers:f,categories:m,loading:y,error:h,setError:g,searchServers:v,filterByCategory:w,filterByTag:b,selectedCategory:R,selectedTag:N,installServer:C,fetchServerByName:A,isServerInstalled:z,currentPage:T,totalPages:D,changePage:q,serversPerPage:Y,changeServersPerPage:W}=$b(),[H,O]=S.useState(null),[J,re]=S.useState(""),[de,me]=S.useState(!1),[ke,oe]=S.useState(!1);S.useEffect(()=>{(async()=>{if(r){const te=await A(r);te?O(te):s("/market")}else O(null)})()},[r,A,s]);const xe=Z=>{Z.preventDefault(),v(J)},G=Z=>{w(Z)},V=()=>{re(""),w(""),b("")},$=Z=>{s(`/market/${Z.name}`)},ue=()=>{s("/market")},E=async Z=>{try{me(!0),await C(Z)&&o(l("market.installSuccess",{serverName:Z.display_name}),"success")}finally{me(!1)}},Q=Z=>{q(Z),window.scrollTo({top:0,behavior:"smooth"})},ee=Z=>{const te=parseInt(Z.target.value,10);W(te)};return H?c.jsx(Xb,{server:H,onBack:ue,onInstall:E,installing:de,isInstalled:z(H.name)}):c.jsxs("div",{children:[c.jsx("div",{className:"flex justify-between items-center mb-8",children:c.jsx("div",{children:c.jsxs("h1",{className:"text-2xl font-bold text-gray-900 flex items-center",children:[l("market.title"),c.jsx("span",{className:"text-sm text-gray-500 font-normal ml-2",children:l("pages.market.title").split(" - ")[1]})]})})}),h&&c.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("p",{children:h}),c.jsx("button",{onClick:()=>g(null),className:"text-red-700 hover:text-red-900",children:c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:c.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"})})})]})}),c.jsx("div",{className:"bg-white shadow rounded-lg p-6 mb-6",children:c.jsxs("form",{onSubmit:xe,className:"flex space-x-4 mb-0",children:[c.jsx("div",{className:"flex-grow",children:c.jsx("input",{type:"text",value:J,onChange:Z=>re(Z.target.value),placeholder:l("market.searchPlaceholder"),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"})}),c.jsx("button",{type:"submit",className:"bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded",children:l("market.search")}),(J||R||N)&&c.jsx("button",{type:"button",onClick:V,className:"border border-gray-300 text-gray-700 font-medium py-2 px-4 rounded hover:bg-gray-50",children:l("market.clearFilters")})]})}),c.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[c.jsx("div",{className:"md:w-48 flex-shrink-0",children:c.jsx("div",{className:"bg-white shadow rounded-lg p-4 mb-6 sticky top-4",children:m.length>0?c.jsxs("div",{className:"mb-6",children:[c.jsxs("div",{className:"flex justify-between items-center mb-3",children:[c.jsx("h3",{className:"font-medium text-gray-900",children:l("market.categories")}),R&&c.jsx("span",{className:"text-xs text-blue-600 cursor-pointer hover:underline",onClick:()=>w(""),children:l("market.clearCategoryFilter")})]}),c.jsx("div",{className:"flex flex-col gap-2",children:m.map(Z=>c.jsx("button",{onClick:()=>G(Z),className:`px-3 py-2 rounded text-sm text-left ${R===Z?"bg-blue-100 text-blue-800 font-medium":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,children:Z},Z))})]}):y?c.jsxs("div",{className:"mb-6",children:[c.jsx("div",{className:"mb-3",children:c.jsx("h3",{className:"font-medium text-gray-900",children:l("market.categories")})}),c.jsxs("div",{className:"flex flex-col gap-2 items-center py-4",children:[c.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:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.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"})]}),c.jsx("p",{className:"text-sm text-gray-600",children:l("app.loading")})]})]}):c.jsxs("div",{className:"mb-6",children:[c.jsx("div",{className:"mb-3",children:c.jsx("h3",{className:"font-medium text-gray-900",children:l("market.categories")})}),c.jsx("p",{className:"text-sm text-gray-600 py-2",children:l("market.noCategories")})]})})}),c.jsx("div",{className:"flex-grow",children:y?c.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:c.jsxs("div",{className:"flex flex-col items-center",children:[c.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:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.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"})]}),c.jsx("p",{className:"text-gray-600",children:l("app.loading")})]})}):d.length===0?c.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:c.jsx("p",{className:"text-gray-600",children:l("market.noServers")})}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 gap-6",children:d.map((Z,te)=>c.jsx(Qb,{server:Z,onClick:$},te))}),c.jsxs("div",{className:"flex justify-between items-center mb-4",children:[c.jsx("div",{className:"text-sm text-gray-500",children:l("market.showing",{from:(T-1)*Y+1,to:Math.min(T*Y,f.length),total:f.length})}),c.jsx(Zb,{currentPage:T,totalPages:D,onPageChange:Q}),c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsxs("label",{htmlFor:"perPage",className:"text-sm text-gray-600",children:[l("market.perPage"),":"]}),c.jsxs("select",{id:"perPage",value:Y,onChange:ee,className:"border rounded p-1 text-sm",children:[c.jsx("option",{value:"6",children:"6"}),c.jsx("option",{value:"9",children:"9"}),c.jsx("option",{value:"12",children:"12"}),c.jsx("option",{value:"24",children:"24"})]})]})]}),c.jsx("div",{className:"mt-6"})]})})]})]})},Pb={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"},Jb={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 Fb({variant:l="default",size:s="default",className:r,disabled:o,children:d,...f}){return c.jsx("button",{className:qa("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",Pb[l],Jb[s],r),disabled:o,...f,children:d})}const Wb=({logs:l,isLoading:s=!1,error:r=null,onClear:o})=>{const{t:d}=Te(),f=S.useRef(null),[m,y]=S.useState(!0),[h,g]=S.useState(""),[v,w]=S.useState(["info","error","warn","debug"]),[b,R]=S.useState(["main","child"]);S.useEffect(()=>{m&&f.current&&(f.current.scrollTop=f.current.scrollHeight)},[l,m]);const N=l.filter(T=>{const D=h?T.message.toLowerCase().includes(h.toLowerCase()):!0,q=v.includes(T.type),Y=b.includes(T.source);return D&&q&&Y}),C=T=>new Date(T).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),A=T=>{switch(T){case"error":return"bg-red-400";case"warn":return"bg-yellow-400";case"debug":return"bg-purple-400";default:return"bg-blue-400"}},z=T=>{switch(T){case"main":return"bg-green-400";case"child":return"bg-orange-400";default:return"bg-gray-400"}};return c.jsxs("div",{className:"flex flex-col h-full",children:[c.jsxs("div",{className:"bg-card p-3 rounded-t-md border-b flex flex-wrap items-center justify-between gap-2",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsxs("span",{className:"font-semibold text-sm",children:[d("logs.filters"),":"]}),c.jsx("input",{type:"text",placeholder:d("logs.search"),className:"px-2 py-1 text-sm border rounded",value:h,onChange:T=>g(T.target.value)}),c.jsx("div",{className:"flex gap-1 items-center",children:["info","error","warn","debug"].map(T=>c.jsx(Lr,{variant:v.includes(T)?"default":"outline",className:`cursor-pointer ${v.includes(T)?A(T):""}`,onClick:()=>{v.includes(T)?w(D=>D.filter(q=>q!==T)):w(D=>[...D,T])},children:T},T))}),c.jsx("div",{className:"flex gap-1 items-center ml-2",children:["main","child"].map(T=>c.jsx(Lr,{variant:b.includes(T)?"default":"outline",className:`cursor-pointer ${b.includes(T)?z(T):""}`,onClick:()=>{b.includes(T)?R(D=>D.filter(q=>q!==T)):R(D=>[...D,T])},children:d(T==="main"?"logs.mainProcess":"logs.childProcess")},T))})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("label",{className:"flex items-center gap-1 text-sm",children:[c.jsx("input",{type:"checkbox",checked:m,onChange:()=>y(!m),className:"form-checkbox h-4 w-4"}),d("logs.autoScroll")]}),c.jsx(Fb,{variant:"outline",size:"sm",onClick:o,disabled:s||l.length===0,children:d("logs.clearLogs")})]})]}),c.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:s?c.jsx("div",{className:"flex justify-center items-center h-full",children:c.jsx("span",{children:d("logs.loading")})}):r?c.jsx("div",{className:"text-red-500 p-2",children:r.message}):N.length===0?c.jsx("div",{className:"text-center text-muted-foreground p-8",children:h||v.length<4||b.length<2?d("logs.noMatch"):d("logs.noLogs")}):N.map((T,D)=>c.jsxs("div",{className:`py-1 border-b border-gray-100 dark:border-gray-800 ${T.type==="error"?"text-red-500":T.type==="warn"?"text-yellow-500":""}`,children:[c.jsxs("span",{className:"text-gray-400",children:["[",C(T.timestamp),"]"]}),c.jsx(Lr,{className:`ml-2 mr-1 ${A(T.type)}`,children:T.type}),c.jsxs(Lr,{variant:"default",className:`mr-2 ${z(T.source)}`,children:[T.source==="main"?d("logs.main"):d("logs.child"),T.processId?` (${T.processId})`:""]}),c.jsx("span",{className:"whitespace-pre-wrap",children:T.message})]},`${T.timestamp}-${D}`))})]})},Ib=async()=>{try{const l=gs();if(!l)throw new Error("Authentication token not found. Please log in.");const r=await(await fetch(Ee("/logs"),{method:"DELETE",headers:{"x-auth-token":l}})).json();if(!r.success)throw new Error(r.error||"Failed to clear logs")}catch(l){throw console.error("Error clearing logs:",l),l}},e1=()=>{const[l,s]=S.useState([]),[r,o]=S.useState(!0),[d,f]=S.useState(null);return S.useEffect(()=>{let y=null,h=!0;const g=()=>{try{y&&y.close();const v=gs();if(!v){f(new Error("Authentication token not found. Please log in.")),o(!1);return}y=new EventSource(Ee(`/logs/stream?token=${v}`)),y.onmessage=w=>{if(h)try{const b=JSON.parse(w.data);b.type==="initial"?(s(b.logs),o(!1)):b.type==="log"&&s(R=>[...R,b.log])}catch(b){console.error("Error parsing SSE message:",b)}},y.onerror=()=>{h&&(y&&(y.close(),setTimeout(g,5e3)),f(new Error("Connection to log stream lost, attempting to reconnect...")))}}catch(v){if(!h)return;f(v instanceof Error?v:new Error("Failed to connect to log stream")),o(!1)}};return g(),()=>{h=!1,y&&y.close()}},[]),{logs:l,loading:r,error:d,clearLogs:async()=>{try{await Ib(),s([])}catch(y){f(y instanceof Error?y:new Error("Failed to clear logs"))}}}},t1=()=>{const{t:l}=Te(),{logs:s,loading:r,error:o,clearLogs:d}=e1();return c.jsxs("div",{className:"container mx-auto p-4",children:[c.jsx("div",{className:"flex justify-between items-center mb-4",children:c.jsx("h1",{className:"text-2xl font-bold",children:l("pages.logs.title")})}),c.jsx("div",{className:"bg-card rounded-md shadow-sm",children:c.jsx(Wb,{logs:s,isLoading:r,error:o,onClear:d})})]})};function im(){const l=Km();return c.jsx(Pv,{children:c.jsx(Ux,{children:c.jsx(Xv,{children:c.jsx(xx,{basename:l,children:c.jsxs(Zy,{children:[c.jsx(Ut,{path:"/login",element:c.jsx(kb,{})}),c.jsx(Ut,{element:c.jsx(Cb,{}),children:c.jsxs(Ut,{element:c.jsx(Eb,{}),children:[c.jsx(Ut,{path:"/",element:c.jsx(Ab,{})}),c.jsx(Ut,{path:"/servers",element:c.jsx(Ub,{})}),c.jsx(Ut,{path:"/groups",element:c.jsx(Gb,{})}),c.jsx(Ut,{path:"/market",element:c.jsx(rm,{})}),c.jsx(Ut,{path:"/market/:serverName",element:c.jsx(rm,{})}),c.jsx(Ut,{path:"/logs",element:c.jsx(t1,{})}),c.jsx(Ut,{path:"/settings",element:c.jsx(Kb,{})})]})}),c.jsx(Ut,{path:"*",element:c.jsx(Um,{to:"/"})})]})})})})})}const pe=l=>typeof l=="string",os=()=>{let l,s;const r=new Promise((o,d)=>{l=o,s=d});return r.resolve=l,r.reject=s,r},om=l=>l==null?"":""+l,a1=(l,s,r)=>{l.forEach(o=>{s[o]&&(r[o]=s[o])})},n1=/###/g,um=l=>l&&l.indexOf("###")>-1?l.replace(n1,"."):l,cm=l=>!l||pe(l),us=(l,s,r)=>{const o=pe(s)?s.split("."):s;let d=0;for(;d<o.length-1;){if(cm(l))return{};const f=um(o[d]);!l[f]&&r&&(l[f]=new r),Object.prototype.hasOwnProperty.call(l,f)?l=l[f]:l={},++d}return cm(l)?{}:{obj:l,k:um(o[d])}},dm=(l,s,r)=>{const{obj:o,k:d}=us(l,s,Object);if(o!==void 0||s.length===1){o[d]=r;return}let f=s[s.length-1],m=s.slice(0,s.length-1),y=us(l,m,Object);for(;y.obj===void 0&&m.length;)f=`${m[m.length-1]}.${f}`,m=m.slice(0,m.length-1),y=us(l,m,Object),y!=null&&y.obj&&typeof y.obj[`${y.k}.${f}`]<"u"&&(y.obj=void 0);y.obj[`${y.k}.${f}`]=r},l1=(l,s,r,o)=>{const{obj:d,k:f}=us(l,s,Object);d[f]=d[f]||[],d[f].push(r)},Vr=(l,s)=>{const{obj:r,k:o}=us(l,s);if(r&&Object.prototype.hasOwnProperty.call(r,o))return r[o]},s1=(l,s,r)=>{const o=Vr(l,r);return o!==void 0?o:Vr(s,r)},xg=(l,s,r)=>{for(const o in s)o!=="__proto__"&&o!=="constructor"&&(o in l?pe(l[o])||l[o]instanceof String||pe(s[o])||s[o]instanceof String?r&&(l[o]=s[o]):xg(l[o],s[o],r):l[o]=s[o]);return l},Jn=l=>l.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var r1={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const i1=l=>pe(l)?l.replace(/[&<>"'\/]/g,s=>r1[s]):l;class o1{constructor(s){this.capacity=s,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(s){const r=this.regExpMap.get(s);if(r!==void 0)return r;const o=new RegExp(s);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(s,o),this.regExpQueue.push(s),o}}const u1=[" ",",","?","!",";"],c1=new o1(20),d1=(l,s,r)=>{s=s||"",r=r||"";const o=u1.filter(m=>s.indexOf(m)<0&&r.indexOf(m)<0);if(o.length===0)return!0;const d=c1.getRegExp(`(${o.map(m=>m==="?"?"\\?":m).join("|")})`);let f=!d.test(l);if(!f){const m=l.indexOf(r);m>0&&!d.test(l.substring(0,m))&&(f=!0)}return f},Tu=function(l,s){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!l)return;if(l[s])return Object.prototype.hasOwnProperty.call(l,s)?l[s]:void 0;const o=s.split(r);let d=l;for(let f=0;f<o.length;){if(!d||typeof d!="object")return;let m,y="";for(let h=f;h<o.length;++h)if(h!==f&&(y+=r),y+=o[h],m=d[y],m!==void 0){if(["string","number","boolean"].indexOf(typeof m)>-1&&h<o.length-1)continue;f+=h-f+1;break}d=m}return d},Yr=l=>l==null?void 0:l.replace("_","-"),f1={type:"logger",log(l){this.output("log",l)},warn(l){this.output("warn",l)},error(l){this.output("error",l)},output(l,s){var r,o;(o=(r=console==null?void 0:console[l])==null?void 0:r.apply)==null||o.call(r,console,s)}};class Kr{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(s,r)}init(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=s||f1,this.options=r,this.debug=r.debug}log(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return this.forward(r,"log","",!0)}warn(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return this.forward(r,"warn","",!0)}error(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return this.forward(r,"error","")}deprecate(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(s,r,o,d){return d&&!this.debug?null:(pe(s[0])&&(s[0]=`${o}${this.prefix} ${s[0]}`),this.logger[r](s))}create(s){return new Kr(this.logger,{prefix:`${this.prefix}:${s}:`,...this.options})}clone(s){return s=s||this.options,s.prefix=s.prefix||this.prefix,new Kr(this.logger,s)}}var Pt=new Kr;class Pr{constructor(){this.observers={}}on(s,r){return s.split(" ").forEach(o=>{this.observers[o]||(this.observers[o]=new Map);const d=this.observers[o].get(r)||0;this.observers[o].set(r,d+1)}),this}off(s,r){if(this.observers[s]){if(!r){delete this.observers[s];return}this.observers[s].delete(r)}}emit(s){for(var r=arguments.length,o=new Array(r>1?r-1:0),d=1;d<r;d++)o[d-1]=arguments[d];this.observers[s]&&Array.from(this.observers[s].entries()).forEach(m=>{let[y,h]=m;for(let g=0;g<h;g++)y(...o)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(m=>{let[y,h]=m;for(let g=0;g<h;g++)y.apply(y,[s,...o])})}}class fm extends Pr{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=s||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(s){this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}removeNamespaces(s){const r=this.options.ns.indexOf(s);r>-1&&this.options.ns.splice(r,1)}getResource(s,r,o){var g,v;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 y;s.indexOf(".")>-1?y=s.split("."):(y=[s,r],o&&(Array.isArray(o)?y.push(...o):pe(o)&&f?y.push(...o.split(f)):y.push(o)));const h=Vr(this.data,y);return!h&&!r&&!o&&s.indexOf(".")>-1&&(s=y[0],r=y[1],o=y.slice(2).join(".")),h||!m||!pe(o)?h:Tu((v=(g=this.data)==null?void 0:g[s])==null?void 0:v[r],o,f)}addResource(s,r,o,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 y=[s,r];o&&(y=y.concat(m?o.split(m):o)),s.indexOf(".")>-1&&(y=s.split("."),d=r,r=y[1]),this.addNamespaces(r),dm(this.data,y,d),f.silent||this.emit("added",s,r,o,d)}addResources(s,r,o){let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const f in o)(pe(o[f])||Array.isArray(o[f]))&&this.addResource(s,r,f,o[f],{silent:!0});d.silent||this.emit("added",s,r,o)}addResourceBundle(s,r,o,d,f){let m=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},y=[s,r];s.indexOf(".")>-1&&(y=s.split("."),d=o,o=r,r=y[1]),this.addNamespaces(r);let h=Vr(this.data,y)||{};m.skipCopy||(o=JSON.parse(JSON.stringify(o))),d?xg(h,o,f):h={...h,...o},dm(this.data,y,h),m.silent||this.emit("added",s,r,o)}removeResourceBundle(s,r){this.hasResourceBundle(s,r)&&delete this.data[s][r],this.removeNamespaces(r),this.emit("removed",s,r)}hasResourceBundle(s,r){return this.getResource(s,r)!==void 0}getResourceBundle(s,r){return r||(r=this.options.defaultNS),this.getResource(s,r)}getDataByLanguage(s){return this.data[s]}hasLanguageSomeTranslations(s){const r=this.getDataByLanguage(s);return!!(r&&Object.keys(r)||[]).find(d=>r[d]&&Object.keys(r[d]).length>0)}toJSON(){return this.data}}var vg={processors:{},addPostProcessor(l){this.processors[l.name]=l},handle(l,s,r,o,d){return l.forEach(f=>{var m;s=((m=this.processors[f])==null?void 0:m.process(s,r,o,d))??s}),s}};const hm={},mm=l=>!pe(l)&&typeof l!="boolean"&&typeof l!="number";class $r extends Pr{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),a1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],s,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Pt.create("translator")}changeLanguage(s){s&&(this.language=s)}exists(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(s==null)return!1;const o=this.resolve(s,r);return(o==null?void 0:o.res)!==void 0}extractFromKey(s,r){let o=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");const d=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let f=r.ns||this.options.defaultNS||[];const m=o&&s.indexOf(o)>-1,y=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!d1(s,o,d);if(m&&!y){const h=s.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:s,namespaces:pe(f)?[f]:f};const g=s.split(o);(o!==d||o===d&&this.options.ns.indexOf(g[0])>-1)&&(f=g.shift()),s=g.join(d)}return{key:s,namespaces:pe(f)?[f]:f}}translate(s,r,o){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),s==null)return"";Array.isArray(s)||(s=[String(s)]);const d=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,f=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:m,namespaces:y}=this.extractFromKey(s[s.length-1],r),h=y[y.length-1],g=r.lng||this.language,v=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((g==null?void 0:g.toLowerCase())==="cimode"){if(v){const de=r.nsSeparator||this.options.nsSeparator;return d?{res:`${h}${de}${m}`,usedKey:m,exactUsedKey:m,usedLng:g,usedNS:h,usedParams:this.getUsedParamsDetails(r)}:`${h}${de}${m}`}return d?{res:m,usedKey:m,exactUsedKey:m,usedLng:g,usedNS:h,usedParams:this.getUsedParamsDetails(r)}:m}const w=this.resolve(s,r);let b=w==null?void 0:w.res;const R=(w==null?void 0:w.usedKey)||m,N=(w==null?void 0:w.exactUsedKey)||m,C=["[object Number]","[object Function]","[object RegExp]"],A=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,z=!this.i18nFormat||this.i18nFormat.handleAsObject,T=r.count!==void 0&&!pe(r.count),D=$r.hasDefaultValue(r),q=T?this.pluralResolver.getSuffix(g,r.count,r):"",Y=r.ordinal&&T?this.pluralResolver.getSuffix(g,r.count,{ordinal:!1}):"",W=T&&!r.ordinal&&r.count===0,H=W&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${q}`]||r[`defaultValue${Y}`]||r.defaultValue;let O=b;z&&!b&&D&&(O=H);const J=mm(O),re=Object.prototype.toString.apply(O);if(z&&O&&J&&C.indexOf(re)<0&&!(pe(A)&&Array.isArray(O))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const de=this.options.returnedObjectHandler?this.options.returnedObjectHandler(R,O,{...r,ns:y}):`key '${m} (${this.language})' returned an object instead of string.`;return d?(w.res=de,w.usedParams=this.getUsedParamsDetails(r),w):de}if(f){const de=Array.isArray(O),me=de?[]:{},ke=de?N:R;for(const oe in O)if(Object.prototype.hasOwnProperty.call(O,oe)){const xe=`${ke}${f}${oe}`;D&&!b?me[oe]=this.translate(xe,{...r,defaultValue:mm(H)?H[oe]:void 0,joinArrays:!1,ns:y}):me[oe]=this.translate(xe,{...r,joinArrays:!1,ns:y}),me[oe]===xe&&(me[oe]=O[oe])}b=me}}else if(z&&pe(A)&&Array.isArray(b))b=b.join(A),b&&(b=this.extendTranslation(b,s,r,o));else{let de=!1,me=!1;!this.isValidLookup(b)&&D&&(de=!0,b=H),this.isValidLookup(b)||(me=!0,b=m);const oe=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&me?void 0:b,xe=D&&H!==b&&this.options.updateMissing;if(me||de||xe){if(this.logger.log(xe?"updateKey":"missingKey",g,h,m,xe?H:b),f){const ue=this.resolve(m,{...r,keySeparator:!1});ue&&ue.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let G=[];const V=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&V&&V[0])for(let ue=0;ue<V.length;ue++)G.push(V[ue]);else this.options.saveMissingTo==="all"?G=this.languageUtils.toResolveHierarchy(r.lng||this.language):G.push(r.lng||this.language);const $=(ue,E,Q)=>{var Z;const ee=D&&Q!==b?Q:oe;this.options.missingKeyHandler?this.options.missingKeyHandler(ue,h,E,ee,xe,r):(Z=this.backendConnector)!=null&&Z.saveMissing&&this.backendConnector.saveMissing(ue,h,E,ee,xe,r),this.emit("missingKey",ue,h,E,b)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?G.forEach(ue=>{const E=this.pluralResolver.getSuffixes(ue,r);W&&r[`defaultValue${this.options.pluralSeparator}zero`]&&E.indexOf(`${this.options.pluralSeparator}zero`)<0&&E.push(`${this.options.pluralSeparator}zero`),E.forEach(Q=>{$([ue],m+Q,r[`defaultValue${Q}`]||H)})}):$(G,m,H))}b=this.extendTranslation(b,s,r,w,o),me&&b===m&&this.options.appendNamespaceToMissingKey&&(b=`${h}:${m}`),(me||de)&&this.options.parseMissingKeyHandler&&(b=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}:${m}`:m,de?b:void 0))}return d?(w.res=b,w.usedParams=this.getUsedParamsDetails(r),w):b}extendTranslation(s,r,o,d,f){var g,v;var m=this;if((g=this.i18nFormat)!=null&&g.parse)s=this.i18nFormat.parse(s,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||d.usedLng,d.usedNS,d.usedKey,{resolved:d});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const w=pe(s)&&(((v=o==null?void 0:o.interpolation)==null?void 0:v.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let b;if(w){const N=s.match(this.interpolator.nestingRegexp);b=N&&N.length}let R=o.replace&&!pe(o.replace)?o.replace:o;if(this.options.interpolation.defaultVariables&&(R={...this.options.interpolation.defaultVariables,...R}),s=this.interpolator.interpolate(s,R,o.lng||this.language||d.usedLng,o),w){const N=s.match(this.interpolator.nestingRegexp),C=N&&N.length;b<C&&(o.nest=!1)}!o.lng&&d&&d.res&&(o.lng=this.language||d.usedLng),o.nest!==!1&&(s=this.interpolator.nest(s,function(){for(var N=arguments.length,C=new Array(N),A=0;A<N;A++)C[A]=arguments[A];return(f==null?void 0:f[0])===C[0]&&!o.context?(m.logger.warn(`It seems you are nesting recursively key: ${C[0]} in key: ${r[0]}`),null):m.translate(...C,r)},o)),o.interpolation&&this.interpolator.reset()}const y=o.postProcess||this.options.postProcess,h=pe(y)?[y]:y;return s!=null&&(h!=null&&h.length)&&o.applyPostProcessor!==!1&&(s=vg.handle(h,s,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...d,usedParams:this.getUsedParamsDetails(o)},...o}:o,this)),s}resolve(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,d,f,m,y;return pe(s)&&(s=[s]),s.forEach(h=>{if(this.isValidLookup(o))return;const g=this.extractFromKey(h,r),v=g.key;d=v;let w=g.namespaces;this.options.fallbackNS&&(w=w.concat(this.options.fallbackNS));const b=r.count!==void 0&&!pe(r.count),R=b&&!r.ordinal&&r.count===0,N=r.context!==void 0&&(pe(r.context)||typeof r.context=="number")&&r.context!=="",C=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);w.forEach(A=>{var z,T;this.isValidLookup(o)||(y=A,!hm[`${C[0]}-${A}`]&&((z=this.utils)!=null&&z.hasLoadedNamespace)&&!((T=this.utils)!=null&&T.hasLoadedNamespace(y))&&(hm[`${C[0]}-${A}`]=!0,this.logger.warn(`key "${d}" for languages "${C.join(", ")}" won't get resolved as namespace "${y}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),C.forEach(D=>{var W;if(this.isValidLookup(o))return;m=D;const q=[v];if((W=this.i18nFormat)!=null&&W.addLookupKeys)this.i18nFormat.addLookupKeys(q,v,D,A,r);else{let H;b&&(H=this.pluralResolver.getSuffix(D,r.count,r));const O=`${this.options.pluralSeparator}zero`,J=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(b&&(q.push(v+H),r.ordinal&&H.indexOf(J)===0&&q.push(v+H.replace(J,this.options.pluralSeparator)),R&&q.push(v+O)),N){const re=`${v}${this.options.contextSeparator}${r.context}`;q.push(re),b&&(q.push(re+H),r.ordinal&&H.indexOf(J)===0&&q.push(re+H.replace(J,this.options.pluralSeparator)),R&&q.push(re+O))}}let Y;for(;Y=q.pop();)this.isValidLookup(o)||(f=Y,o=this.getResource(D,A,Y,r))}))})}),{res:o,usedKey:d,exactUsedKey:f,usedLng:m,usedNS:y}}isValidLookup(s){return s!==void 0&&!(!this.options.returnNull&&s===null)&&!(!this.options.returnEmptyString&&s==="")}getResource(s,r,o){var f;let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(f=this.i18nFormat)!=null&&f.getResource?this.i18nFormat.getResource(s,r,o,d):this.resourceStore.getResource(s,r,o,d)}getUsedParamsDetails(){let s=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"],o=s.replace&&!pe(s.replace);let d=o?s.replace:s;if(o&&typeof s.count<"u"&&(d.count=s.count),this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),!o){d={...d};for(const f of r)delete d[f]}return d}static hasDefaultValue(s){const r="defaultValue";for(const o in s)if(Object.prototype.hasOwnProperty.call(s,o)&&r===o.substring(0,r.length)&&s[o]!==void 0)return!0;return!1}}class gm{constructor(s){this.options=s,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Pt.create("languageUtils")}getScriptPartFromCode(s){if(s=Yr(s),!s||s.indexOf("-")<0)return null;const r=s.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(s){if(s=Yr(s),!s||s.indexOf("-")<0)return s;const r=s.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(s){if(pe(s)&&s.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(s)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?s.toLowerCase():s)}return this.options.cleanCode||this.options.lowerCaseLng?s.toLowerCase():s}isSupportedCode(s){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(s=this.getLanguagePartFromCode(s)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(s)>-1}getBestMatchFromCodes(s){if(!s)return null;let r;return s.forEach(o=>{if(r)return;const d=this.formatLanguageCode(o);(!this.options.supportedLngs||this.isSupportedCode(d))&&(r=d)}),!r&&this.options.supportedLngs&&s.forEach(o=>{if(r)return;const d=this.getLanguagePartFromCode(o);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(s,r){if(!s)return[];if(typeof s=="function"&&(s=s(r)),pe(s)&&(s=[s]),Array.isArray(s))return s;if(!r)return s.default||[];let o=s[r];return o||(o=s[this.getScriptPartFromCode(r)]),o||(o=s[this.formatLanguageCode(r)]),o||(o=s[this.getLanguagePartFromCode(r)]),o||(o=s.default),o||[]}toResolveHierarchy(s,r){const o=this.getFallbackCodes(r||this.options.fallbackLng||[],s),d=[],f=m=>{m&&(this.isSupportedCode(m)?d.push(m):this.logger.warn(`rejecting language code not found in supportedLngs: ${m}`))};return pe(s)&&(s.indexOf("-")>-1||s.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&f(this.formatLanguageCode(s)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&f(this.getScriptPartFromCode(s)),this.options.load!=="currentOnly"&&f(this.getLanguagePartFromCode(s))):pe(s)&&f(this.formatLanguageCode(s)),o.forEach(m=>{d.indexOf(m)<0&&f(this.formatLanguageCode(m))}),d}}const pm={zero:0,one:1,two:2,few:3,many:4,other:5},ym={select:l=>l===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class h1{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=s,this.options=r,this.logger=Pt.create("pluralResolver"),this.pluralRulesCache={}}addRule(s,r){this.rules[s]=r}clearCache(){this.pluralRulesCache={}}getRule(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=Yr(s==="dev"?"en":s),d=r.ordinal?"ordinal":"cardinal",f=JSON.stringify({cleanedCode:o,type:d});if(f in this.pluralRulesCache)return this.pluralRulesCache[f];let m;try{m=new Intl.PluralRules(o,{type:d})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),ym;if(!s.match(/-|_/))return ym;const h=this.languageUtils.getLanguagePartFromCode(s);m=this.getRule(h,r)}return this.pluralRulesCache[f]=m,m}needsPlural(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(s,r);return o||(o=this.getRule("dev",r)),(o==null?void 0:o.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(s,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(s,o).map(d=>`${r}${d}`)}getSuffixes(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(s,r);return o||(o=this.getRule("dev",r)),o?o.resolvedOptions().pluralCategories.sort((d,f)=>pm[d]-pm[f]).map(d=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${d}`):[]}getSuffix(s,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const d=this.getRule(s,o);return d?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${d.select(r)}`:(this.logger.warn(`no plural rule found for: ${s}`),this.getSuffix("dev",r,o))}}const xm=function(l,s,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,f=s1(l,s,r);return!f&&d&&pe(r)&&(f=Tu(l,r,o),f===void 0&&(f=Tu(s,r,o))),f},xu=l=>l.replace(/\$/g,"$$$$");class m1{constructor(){var r;let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Pt.create("interpolator"),this.options=s,this.format=((r=s==null?void 0:s.interpolation)==null?void 0:r.format)||(o=>o),this.init(s)}init(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};s.interpolation||(s.interpolation={escapeValue:!0});const{escape:r,escapeValue:o,useRawValueToEscape:d,prefix:f,prefixEscaped:m,suffix:y,suffixEscaped:h,formatSeparator:g,unescapeSuffix:v,unescapePrefix:w,nestingPrefix:b,nestingPrefixEscaped:R,nestingSuffix:N,nestingSuffixEscaped:C,nestingOptionsSeparator:A,maxReplaces:z,alwaysFormat:T}=s.interpolation;this.escape=r!==void 0?r:i1,this.escapeValue=o!==void 0?o:!0,this.useRawValueToEscape=d!==void 0?d:!1,this.prefix=f?Jn(f):m||"{{",this.suffix=y?Jn(y):h||"}}",this.formatSeparator=g||",",this.unescapePrefix=v?"":w||"-",this.unescapeSuffix=this.unescapePrefix?"":v||"",this.nestingPrefix=b?Jn(b):R||Jn("$t("),this.nestingSuffix=N?Jn(N):C||Jn(")"),this.nestingOptionsSeparator=A||",",this.maxReplaces=z||1e3,this.alwaysFormat=T!==void 0?T:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const s=(r,o)=>(r==null?void 0:r.source)===o?(r.lastIndex=0,r):new RegExp(o,"g");this.regexp=s(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=s(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=s(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(s,r,o,d){var R;let f,m,y;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=N=>{if(N.indexOf(this.formatSeparator)<0){const T=xm(r,h,N,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(T,void 0,o,{...d,...r,interpolationkey:N}):T}const C=N.split(this.formatSeparator),A=C.shift().trim(),z=C.join(this.formatSeparator).trim();return this.format(xm(r,h,A,this.options.keySeparator,this.options.ignoreJSONStructure),z,o,{...d,...r,interpolationkey:A})};this.resetRegExp();const v=(d==null?void 0:d.missingInterpolationHandler)||this.options.missingInterpolationHandler,w=((R=d==null?void 0:d.interpolation)==null?void 0:R.skipOnVariables)!==void 0?d.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:N=>xu(N)},{regex:this.regexp,safeValue:N=>this.escapeValue?xu(this.escape(N)):xu(N)}].forEach(N=>{for(y=0;f=N.regex.exec(s);){const C=f[1].trim();if(m=g(C),m===void 0)if(typeof v=="function"){const z=v(s,f,d);m=pe(z)?z:""}else if(d&&Object.prototype.hasOwnProperty.call(d,C))m="";else if(w){m=f[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${s}`),m="";else!pe(m)&&!this.useRawValueToEscape&&(m=om(m));const A=N.safeValue(m);if(s=s.replace(f[0],A),w?(N.regex.lastIndex+=m.length,N.regex.lastIndex-=f[0].length):N.regex.lastIndex=0,y++,y>=this.maxReplaces)break}}),s}nest(s,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d,f,m;const y=(h,g)=>{const v=this.nestingOptionsSeparator;if(h.indexOf(v)<0)return h;const w=h.split(new RegExp(`${v}[ ]*{`));let b=`{${w[1]}`;h=w[0],b=this.interpolate(b,m);const R=b.match(/'/g),N=b.match(/"/g);(((R==null?void 0:R.length)??0)%2===0&&!N||N.length%2!==0)&&(b=b.replace(/'/g,'"'));try{m=JSON.parse(b),g&&(m={...g,...m})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,C),`${h}${v}${b}`}return m.defaultValue&&m.defaultValue.indexOf(this.prefix)>-1&&delete m.defaultValue,h};for(;d=this.nestingRegexp.exec(s);){let h=[];m={...o},m=m.replace&&!pe(m.replace)?m.replace:m,m.applyPostProcessor=!1,delete m.defaultValue;let g=!1;if(d[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(d[1])){const v=d[1].split(this.formatSeparator).map(w=>w.trim());d[1]=v.shift(),h=v,g=!0}if(f=r(y.call(this,d[1].trim(),m),m),f&&d[0]===s&&!pe(f))return f;pe(f)||(f=om(f)),f||(this.logger.warn(`missed to resolve ${d[1]} for nesting ${s}`),f=""),g&&(f=h.reduce((v,w)=>this.format(v,w,o.lng,{...o,interpolationkey:d[1].trim()}),f.trim())),s=s.replace(d[0],f),this.regexp.lastIndex=0}return s}}const g1=l=>{let s=l.toLowerCase().trim();const r={};if(l.indexOf("(")>-1){const o=l.split("(");s=o[0].toLowerCase().trim();const d=o[1].substring(0,o[1].length-1);s==="currency"&&d.indexOf(":")<0?r.currency||(r.currency=d.trim()):s==="relativetime"&&d.indexOf(":")<0?r.range||(r.range=d.trim()):d.split(";").forEach(m=>{if(m){const[y,...h]=m.split(":"),g=h.join(":").trim().replace(/^'+|'+$/g,""),v=y.trim();r[v]||(r[v]=g),g==="false"&&(r[v]=!1),g==="true"&&(r[v]=!0),isNaN(g)||(r[v]=parseInt(g,10))}})}return{formatName:s,formatOptions:r}},Fn=l=>{const s={};return(r,o,d)=>{let f=d;d&&d.interpolationkey&&d.formatParams&&d.formatParams[d.interpolationkey]&&d[d.interpolationkey]&&(f={...f,[d.interpolationkey]:void 0});const m=o+JSON.stringify(f);let y=s[m];return y||(y=l(Yr(o),d),s[m]=y),y(r)}};class p1{constructor(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Pt.create("formatter"),this.options=s,this.formats={number:Fn((r,o)=>{const d=new Intl.NumberFormat(r,{...o});return f=>d.format(f)}),currency:Fn((r,o)=>{const d=new Intl.NumberFormat(r,{...o,style:"currency"});return f=>d.format(f)}),datetime:Fn((r,o)=>{const d=new Intl.DateTimeFormat(r,{...o});return f=>d.format(f)}),relativetime:Fn((r,o)=>{const d=new Intl.RelativeTimeFormat(r,{...o});return f=>d.format(f,o.range||"day")}),list:Fn((r,o)=>{const d=new Intl.ListFormat(r,{...o});return f=>d.format(f)})},this.init(s)}init(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(s,r){this.formats[s.toLowerCase().trim()]=r}addCached(s,r){this.formats[s.toLowerCase().trim()]=Fn(r)}format(s,r,o){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(y=>y.indexOf(")")>-1)){const y=f.findIndex(h=>h.indexOf(")")>-1);f[0]=[f[0],...f.splice(1,y)].join(this.formatSeparator)}return f.reduce((y,h)=>{var w;const{formatName:g,formatOptions:v}=g1(h);if(this.formats[g]){let b=y;try{const R=((w=d==null?void 0:d.formatParams)==null?void 0:w[d.interpolationkey])||{},N=R.locale||R.lng||d.locale||d.lng||o;b=this.formats[g](y,N,{...v,...d,...R})}catch(R){this.logger.warn(R)}return b}else this.logger.warn(`there was no format function for ${g}`);return y},s)}}const y1=(l,s)=>{l.pending[s]!==void 0&&(delete l.pending[s],l.pendingCount--)};class x1 extends Pr{constructor(s,r,o){var f,m;let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=s,this.store=r,this.services=o,this.languageUtils=o.languageUtils,this.options=d,this.logger=Pt.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,o,d.backend,d)}queueLoad(s,r,o,d){const f={},m={},y={},h={};return s.forEach(g=>{let v=!0;r.forEach(w=>{const b=`${g}|${w}`;!o.reload&&this.store.hasResourceBundle(g,w)?this.state[b]=2:this.state[b]<0||(this.state[b]===1?m[b]===void 0&&(m[b]=!0):(this.state[b]=1,v=!1,m[b]===void 0&&(m[b]=!0),f[b]===void 0&&(f[b]=!0),h[w]===void 0&&(h[w]=!0)))}),v||(y[g]=!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(y),toLoadNamespaces:Object.keys(h)}}loaded(s,r,o){const d=s.split("|"),f=d[0],m=d[1];r&&this.emit("failedLoading",f,m,r),!r&&o&&this.store.addResourceBundle(f,m,o,void 0,void 0,{skipCopy:!0}),this.state[s]=r?-1:2,r&&o&&(this.state[s]=0);const y={};this.queue.forEach(h=>{l1(h.loaded,[f],m),y1(h,s),r&&h.errors.push(r),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(g=>{y[g]||(y[g]={});const v=h.loaded[g];v.length&&v.forEach(w=>{y[g][w]===void 0&&(y[g][w]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",y),this.queue=this.queue.filter(h=>!h.done)}read(s,r,o){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(!s.length)return m(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:s,ns:r,fcName:o,tried:d,wait:f,callback:m});return}this.readingCalls++;const y=(g,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const w=this.waitingReads.shift();this.read(w.lng,w.ns,w.fcName,w.tried,w.wait,w.callback)}if(g&&v&&d<this.maxRetries){setTimeout(()=>{this.read.call(this,s,r,o,d+1,f*2,m)},f);return}m(g,v)},h=this.backend[o].bind(this.backend);if(h.length===2){try{const g=h(s,r);g&&typeof g.then=="function"?g.then(v=>y(null,v)).catch(y):y(null,g)}catch(g){y(g)}return}return h(s,r,y)}prepareLoading(s,r){let o=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();pe(s)&&(s=this.languageUtils.toResolveHierarchy(s)),pe(r)&&(r=[r]);const f=this.queueLoad(s,r,o,d);if(!f.toLoad.length)return f.pending.length||d(),null;f.toLoad.forEach(m=>{this.loadOne(m)})}load(s,r,o){this.prepareLoading(s,r,{},o)}reload(s,r,o){this.prepareLoading(s,r,{reload:!0},o)}loadOne(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const o=s.split("|"),d=o[0],f=o[1];this.read(d,f,"read",void 0,void 0,(m,y)=>{m&&this.logger.warn(`${r}loading namespace ${f} for language ${d} failed`,m),!m&&y&&this.logger.log(`${r}loaded namespace ${f} for language ${d}`,y),this.loaded(s,m,y)})}saveMissing(s,r,o,d,f){var h,g,v,w,b;let m=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},y=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((g=(h=this.services)==null?void 0:h.utils)!=null&&g.hasLoadedNamespace&&!((w=(v=this.services)==null?void 0:v.utils)!=null&&w.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${o}" 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(!(o==null||o==="")){if((b=this.backend)!=null&&b.create){const R={...m,isUpdate:f},N=this.backend.create.bind(this.backend);if(N.length<6)try{let C;N.length===5?C=N(s,r,o,d,R):C=N(s,r,o,d),C&&typeof C.then=="function"?C.then(A=>y(null,A)).catch(y):y(null,C)}catch(C){y(C)}else N(s,r,o,d,y,R)}!s||!s[0]||this.store.addResource(s[0],r,o,d)}}}const vm=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:l=>{let s={};if(typeof l[1]=="object"&&(s=l[1]),pe(l[1])&&(s.defaultValue=l[1]),pe(l[2])&&(s.tDescription=l[2]),typeof l[2]=="object"||typeof l[3]=="object"){const r=l[3]||l[2];Object.keys(r).forEach(o=>{s[o]=r[o]})}return s},interpolation:{escapeValue:!0,format:l=>l,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),bm=l=>{var s,r;return pe(l.ns)&&(l.ns=[l.ns]),pe(l.fallbackLng)&&(l.fallbackLng=[l.fallbackLng]),pe(l.fallbackNS)&&(l.fallbackNS=[l.fallbackNS]),((r=(s=l.supportedLngs)==null?void 0:s.indexOf)==null?void 0:r.call(s,"cimode"))<0&&(l.supportedLngs=l.supportedLngs.concat(["cimode"])),typeof l.initImmediate=="boolean"&&(l.initAsync=l.initImmediate),l},Hr=()=>{},v1=l=>{Object.getOwnPropertyNames(Object.getPrototypeOf(l)).forEach(r=>{typeof l[r]=="function"&&(l[r]=l[r].bind(l))})};class fs extends Pr{constructor(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=bm(s),this.services={},this.logger=Pt,this.modules={external:[]},v1(this),r&&!this.isInitialized&&!s.isClone){if(!this.options.initAsync)return this.init(s,r),this;setTimeout(()=>{this.init(s,r)},0)}}init(){var s=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(o=r,r={}),r.defaultNS==null&&r.ns&&(pe(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const d=vm();this.options={...d,...this.options,...bm(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=v=>v?typeof v=="function"?new v:v:null;if(!this.options.isClone){this.modules.logger?Pt.init(f(this.modules.logger),this.options):Pt.init(null,this.options);let v;this.modules.formatter?v=this.modules.formatter:v=p1;const w=new gm(this.options);this.store=new fm(this.options.resources,this.options);const b=this.services;b.logger=Pt,b.resourceStore=this.store,b.languageUtils=w,b.pluralResolver=new h1(w,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),v&&(!this.options.interpolation.format||this.options.interpolation.format===d.interpolation.format)&&(b.formatter=f(v),b.formatter.init(b,this.options),this.options.interpolation.format=b.formatter.format.bind(b.formatter)),b.interpolator=new m1(this.options),b.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},b.backendConnector=new x1(f(this.modules.backend),b.resourceStore,b,this.options),b.backendConnector.on("*",function(R){for(var N=arguments.length,C=new Array(N>1?N-1:0),A=1;A<N;A++)C[A-1]=arguments[A];s.emit(R,...C)}),this.modules.languageDetector&&(b.languageDetector=f(this.modules.languageDetector),b.languageDetector.init&&b.languageDetector.init(b,this.options.detection,this.options)),this.modules.i18nFormat&&(b.i18nFormat=f(this.modules.i18nFormat),b.i18nFormat.init&&b.i18nFormat.init(this)),this.translator=new $r(this.services,this.options),this.translator.on("*",function(R){for(var N=arguments.length,C=new Array(N>1?N-1:0),A=1;A<N;A++)C[A-1]=arguments[A];s.emit(R,...C)}),this.modules.external.forEach(R=>{R.init&&R.init(this)})}if(this.format=this.options.interpolation.format,o||(o=Hr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const v=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);v.length>0&&v[0]!=="dev"&&(this.options.lng=v[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(v=>{this[v]=function(){return s.store[v](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(v=>{this[v]=function(){return s.store[v](...arguments),s}});const h=os(),g=()=>{const v=(w,b)=>{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),h.resolve(b),o(w,b)};if(this.languages&&!this.isInitialized)return v(null,this.t.bind(this));this.changeLanguage(this.options.lng,v)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),h}loadResources(s){var f,m;let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hr;const d=pe(s)?s:this.language;if(typeof s=="function"&&(o=s),!this.options.resources||this.options.partialBundledLanguages){if((d==null?void 0:d.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return o();const y=[],h=g=>{if(!g||g==="cimode")return;this.services.languageUtils.toResolveHierarchy(g).forEach(w=>{w!=="cimode"&&y.indexOf(w)<0&&y.push(w)})};d?h(d):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(v=>h(v)),(m=(f=this.options.preload)==null?void 0:f.forEach)==null||m.call(f,g=>h(g)),this.services.backendConnector.load(y,this.options.ns,g=>{!g&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(g)})}else o(null)}reloadResources(s,r,o){const d=os();return typeof s=="function"&&(o=s,s=void 0),typeof r=="function"&&(o=r,r=void 0),s||(s=this.languages),r||(r=this.options.ns),o||(o=Hr),this.services.backendConnector.reload(s,r,f=>{d.resolve(),o(f)}),d}use(s){if(!s)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!s.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return s.type==="backend"&&(this.modules.backend=s),(s.type==="logger"||s.log&&s.warn&&s.error)&&(this.modules.logger=s),s.type==="languageDetector"&&(this.modules.languageDetector=s),s.type==="i18nFormat"&&(this.modules.i18nFormat=s),s.type==="postProcessor"&&vg.addPostProcessor(s),s.type==="formatter"&&(this.modules.formatter=s),s.type==="3rdParty"&&this.modules.external.push(s),this}setResolvedLanguage(s){if(!(!s||!this.languages)&&!(["cimode","dev"].indexOf(s)>-1))for(let r=0;r<this.languages.length;r++){const o=this.languages[r];if(!(["cimode","dev"].indexOf(o)>-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}}changeLanguage(s,r){var o=this;this.isLanguageChangingTo=s;const d=os();this.emit("languageChanging",s);const f=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},m=(h,g)=>{g?(f(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,d.resolve(function(){return o.t(...arguments)}),r&&r(h,function(){return o.t(...arguments)})},y=h=>{var v,w;!s&&!h&&this.services.languageDetector&&(h=[]);const g=pe(h)?h:this.services.languageUtils.getBestMatchFromCodes(h);g&&(this.language||f(g),this.translator.language||this.translator.changeLanguage(g),(w=(v=this.services.languageDetector)==null?void 0:v.cacheUserLanguage)==null||w.call(v,g)),this.loadResources(g,b=>{m(b,g)})};return!s&&this.services.languageDetector&&!this.services.languageDetector.async?y(this.services.languageDetector.detect()):!s&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(y):this.services.languageDetector.detect(y):y(s),d}getFixedT(s,r,o){var d=this;const f=function(m,y){let h;if(typeof y!="object"){for(var g=arguments.length,v=new Array(g>2?g-2:0),w=2;w<g;w++)v[w-2]=arguments[w];h=d.options.overloadTranslationOptionHandler([m,y].concat(v))}else h={...y};h.lng=h.lng||f.lng,h.lngs=h.lngs||f.lngs,h.ns=h.ns||f.ns,h.keyPrefix!==""&&(h.keyPrefix=h.keyPrefix||o||f.keyPrefix);const b=d.options.keySeparator||".";let R;return h.keyPrefix&&Array.isArray(m)?R=m.map(N=>`${h.keyPrefix}${b}${N}`):R=h.keyPrefix?`${h.keyPrefix}${b}${m}`:m,d.t(R,h)};return pe(s)?f.lng=s:f.lngs=s,f.ns=r,f.keyPrefix=o,f}t(){var d;for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return(d=this.translator)==null?void 0:d.translate(...r)}exists(){var d;for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return(d=this.translator)==null?void 0:d.exists(...r)}setDefaultNamespace(s){this.options.defaultNS=s}hasLoadedNamespace(s){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 o=r.lng||this.resolvedLanguage||this.languages[0],d=this.options?this.options.fallbackLng:!1,f=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const m=(y,h)=>{const g=this.services.backendConnector.state[`${y}|${h}`];return g===-1||g===0||g===2};if(r.precheck){const y=r.precheck(this,m);if(y!==void 0)return y}return!!(this.hasResourceBundle(o,s)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||m(o,s)&&(!d||m(f,s)))}loadNamespaces(s,r){const o=os();return this.options.ns?(pe(s)&&(s=[s]),s.forEach(d=>{this.options.ns.indexOf(d)<0&&this.options.ns.push(d)}),this.loadResources(d=>{o.resolve(),r&&r(d)}),o):(r&&r(),Promise.resolve())}loadLanguages(s,r){const o=os();pe(s)&&(s=[s]);const d=this.options.preload||[],f=s.filter(m=>d.indexOf(m)<0&&this.services.languageUtils.isSupportedCode(m));return f.length?(this.options.preload=d.concat(f),this.loadResources(m=>{o.resolve(),r&&r(m)}),o):(r&&r(),Promise.resolve())}dir(s){var d,f;if(s||(s=this.resolvedLanguage||(((d=this.languages)==null?void 0:d.length)>0?this.languages[0]:this.language)),!s)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"],o=((f=this.services)==null?void 0:f.languageUtils)||new gm(vm());return r.indexOf(o.getLanguagePartFromCode(s))>-1||s.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new fs(s,r)}cloneInstance(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hr;const o=s.forkResourceStore;o&&delete s.forkResourceStore;const d={...this.options,...s,isClone:!0},f=new fs(d);if((s.debug!==void 0||s.prefix!==void 0)&&(f.logger=f.logger.clone(s)),["store","services","language"].forEach(y=>{f[y]=this[y]}),f.services={...this.services},f.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},o){const y=Object.keys(this.store.data).reduce((h,g)=>(h[g]={...this.store.data[g]},Object.keys(h[g]).reduce((v,w)=>(v[w]={...h[g][w]},v),{})),{});f.store=new fm(y,d),f.services.resourceStore=f.store}return f.translator=new $r(f.services,d),f.translator.on("*",function(y){for(var h=arguments.length,g=new Array(h>1?h-1:0),v=1;v<h;v++)g[v-1]=arguments[v];f.emit(y,...g)}),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 it=fs.createInstance();it.createInstance=fs.createInstance;it.createInstance;it.dir;it.init;it.loadResources;it.reloadResources;it.use;it.changeLanguage;it.getFixedT;it.t;it.exists;it.setDefaultNamespace;it.hasLoadedNamespace;it.loadNamespaces;it.loadLanguages;const{slice:b1,forEach:S1}=[];function w1(l){return S1.call(b1.call(arguments,1),s=>{if(s)for(const r in s)l[r]===void 0&&(l[r]=s[r])}),l}function N1(l){return typeof l!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(r=>r.test(l))}const Sm=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,j1=function(l,s){const o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},d=encodeURIComponent(s);let f=`${l}=${d}`;if(o.maxAge>0){const m=o.maxAge-0;if(Number.isNaN(m))throw new Error("maxAge should be a Number");f+=`; Max-Age=${Math.floor(m)}`}if(o.domain){if(!Sm.test(o.domain))throw new TypeError("option domain is invalid");f+=`; Domain=${o.domain}`}if(o.path){if(!Sm.test(o.path))throw new TypeError("option path is invalid");f+=`; Path=${o.path}`}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");f+=`; Expires=${o.expires.toUTCString()}`}if(o.httpOnly&&(f+="; HttpOnly"),o.secure&&(f+="; Secure"),o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.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 o.partitioned&&(f+="; Partitioned"),f},wm={create(l,s,r,o){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)),o&&(d.domain=o),document.cookie=j1(l,encodeURIComponent(s),d)},read(l){const s=`${l}=`,r=document.cookie.split(";");for(let o=0;o<r.length;o++){let d=r[o];for(;d.charAt(0)===" ";)d=d.substring(1,d.length);if(d.indexOf(s)===0)return d.substring(s.length,d.length)}return null},remove(l){this.create(l,"",-1)}};var E1={name:"cookie",lookup(l){let{lookupCookie:s}=l;if(s&&typeof document<"u")return wm.read(s)||void 0},cacheUserLanguage(l,s){let{lookupCookie:r,cookieMinutes:o,cookieDomain:d,cookieOptions:f}=s;r&&typeof document<"u"&&wm.create(r,l,o,d,f)}},C1={name:"querystring",lookup(l){var o;let{lookupQuerystring:s}=l,r;if(typeof window<"u"){let{search:d}=window.location;!window.location.search&&((o=window.location.hash)==null?void 0:o.indexOf("?"))>-1&&(d=window.location.hash.substring(window.location.hash.indexOf("?")));const m=d.substring(1).split("&");for(let y=0;y<m.length;y++){const h=m[y].indexOf("=");h>0&&m[y].substring(0,h)===s&&(r=m[y].substring(h+1))}}return r}};let Wn=null;const Nm=()=>{if(Wn!==null)return Wn;try{if(Wn=typeof window<"u"&&window.localStorage!==null,!Wn)return!1;const l="i18next.translate.boo";window.localStorage.setItem(l,"foo"),window.localStorage.removeItem(l)}catch{Wn=!1}return Wn};var k1={name:"localStorage",lookup(l){let{lookupLocalStorage:s}=l;if(s&&Nm())return window.localStorage.getItem(s)||void 0},cacheUserLanguage(l,s){let{lookupLocalStorage:r}=s;r&&Nm()&&window.localStorage.setItem(r,l)}};let In=null;const jm=()=>{if(In!==null)return In;try{if(In=typeof window<"u"&&window.sessionStorage!==null,!In)return!1;const l="i18next.translate.boo";window.sessionStorage.setItem(l,"foo"),window.sessionStorage.removeItem(l)}catch{In=!1}return In};var A1={name:"sessionStorage",lookup(l){let{lookupSessionStorage:s}=l;if(s&&jm())return window.sessionStorage.getItem(s)||void 0},cacheUserLanguage(l,s){let{lookupSessionStorage:r}=s;r&&jm()&&window.sessionStorage.setItem(r,l)}},T1={name:"navigator",lookup(l){const s=[];if(typeof navigator<"u"){const{languages:r,userLanguage:o,language:d}=navigator;if(r)for(let f=0;f<r.length;f++)s.push(r[f]);o&&s.push(o),d&&s.push(d)}return s.length>0?s:void 0}},R1={name:"htmlTag",lookup(l){let{htmlTag:s}=l,r;const o=s||(typeof document<"u"?document.documentElement:null);return o&&typeof o.getAttribute=="function"&&(r=o.getAttribute("lang")),r}},O1={name:"path",lookup(l){var d;let{lookupFromPathIndex:s}=l;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(d=r[typeof s=="number"?s:0])==null?void 0:d.replace("/",""):void 0}},M1={name:"subdomain",lookup(l){var d,f;let{lookupFromSubdomainIndex:s}=l;const r=typeof s=="number"?s+1:1,o=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(o)return o[r]}};let bg=!1;try{document.cookie,bg=!0}catch{}const Sg=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];bg||Sg.splice(1,1);const z1=()=>({order:Sg,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:l=>l});class wg{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(s,r)}init(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=s,this.options=w1(r,this.options||{},z1()),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=o,this.addDetector(E1),this.addDetector(C1),this.addDetector(k1),this.addDetector(A1),this.addDetector(T1),this.addDetector(R1),this.addDetector(O1),this.addDetector(M1)}addDetector(s){return this.detectors[s.name]=s,this}detect(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return s.forEach(o=>{if(this.detectors[o]){let d=this.detectors[o].lookup(this.options);d&&typeof d=="string"&&(d=[d]),d&&(r=r.concat(d))}}),r=r.filter(o=>o!=null&&!N1(o)).map(o=>this.options.convertDetectedLanguage(o)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(s)>-1||r.forEach(o=>{this.detectors[o]&&this.detectors[o].cacheUserLanguage(s,this.options)}))}}wg.type="languageDetector";const D1={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"},U1={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..."},L1={viewProfile:"View profile",userCenter:"User Center"},_1={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"},H1={label:"WeChat",title:"Connect via WeChat",qrCodeAlt:"WeChat QR Code",scanMessage:"Scan this QR code to connect with us on WeChat"},B1={label:"Discord",title:"Join our Discord server",community:"Join our growing community on Discord for support, discussions, and updates!"},G1={title:"Theme",light:"Light",dark:"Dark",system:"System"},q1={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"},V1={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",key:"key",value:"value",enabled:"Enabled",enable:"Enable",disable:"Disable",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"},Y1={online:"Online",offline:"Offline",connecting:"Connecting"},K1={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"},$1={processing:"Processing...",save:"Save",cancel:"Cancel",refresh:"Refresh",create:"Create",submitting:"Submitting...",delete:"Delete",copy:"Copy",copySuccess:"Copied to clipboard",copyFailed:"Copy failed",close:"Close"},Q1={dashboard:"Dashboard",servers:"Servers",groups:"Groups",settings:"Settings",changePassword:"Change Password",market:"Market",logs:"Logs"},X1={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"}},Z1={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"},P1={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"},J1={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"},F1={enableGlobalRoute:"Enable Global Route",enableGlobalRouteDescription:"Allow connections to /sse endpoint without specifying a group ID",enableGroupNameRoute:"Enable Group Name Route",enableGroupNameRouteDescription:"Allow connections to /sse endpoint using group names instead of just group IDs",enableBearerAuth:"Enable Bearer Authentication",enableBearerAuthDescription:"Require bearer token authentication for MCP requests",bearerAuthKey:"Bearer Authentication Key",bearerAuthKeyDescription:"The authentication key that will be required in the Bearer token",bearerAuthKeyPlaceholder:"Enter bearer authentication key",pythonIndexUrl:"Python Package Repository URL",pythonIndexUrlDescription:"Set UV_DEFAULT_INDEX environment variable for Python package installation",pythonIndexUrlPlaceholder:"e.g. https://pypi.org/simple",npmRegistry:"NPM Registry URL",npmRegistryDescription:"Set npm_config_registry environment variable for NPM package installation",npmRegistryPlaceholder:"e.g. https://registry.npmjs.org/",installConfig:"Installation",systemConfigUpdated:"System configuration updated successfully",enableSmartRouting:"Enable Smart Routing",enableSmartRoutingDescription:"Enable smart routing feature to search the most suitable tool based on input (using $smart group name)",dbUrl:"PostgreSQL URL (with 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}}"},W1={app:D1,about:U1,profile:L1,sponsor:_1,wechat:H1,discord:B1,theme:G1,auth:q1,server:V1,status:Y1,errors:K1,common:$1,nav:Q1,pages:X1,logs:Z1,groups:P1,market:J1,settings:F1},I1={title:"MCP Hub 控制面板",error:"错误",closeButton:"关闭",noServers:"没有可用的 MCP 服务器",loading:"加载中...",logout:"退出登录",profile:"个人资料",changePassword:"修改密码",toggleSidebar:"切换侧边栏",welcomeUser:"欢迎, {{username}}",name:"MCP Hub"},e2={title:"关于",versionInfo:"MCP Hub 版本: {{version}}",newVersion:"有新版本可用!",currentVersion:"当前版本",newVersionAvailable:"新版本 {{version}} 已发布",viewOnGitHub:"在 GitHub 上查看",checkForUpdates:"检查更新",checking:"检查更新中..."},t2={viewProfile:"查看个人中心",userCenter:"个人中心"},a2={label:"赞助",title:"支持项目",rewardAlt:"赞赏码",supportMessage:"通过捐赠支持 MCP Hub 的开发!",supportButton:"在 Ko-fi 上支持"},n2={label:"微信",title:"微信联系",qrCodeAlt:"微信二维码",scanMessage:"扫描二维码添加微信"},l2={label:"Discord",title:"加入我们的 Discord 服务器",community:"加入我们不断壮大的 Discord 社区,获取支持、参与讨论并了解最新动态!"},s2={title:"主题",light:"浅色",dark:"深色",system:"系统"},r2={login:"登录",loginTitle:"登录 MCP Hub",username:"用户名",password:"密码",loggingIn:"登录中...",emptyFields:"用户名和密码不能为空",loginFailed:"登录失败,请检查用户名和密码",loginError:"登录过程中出现错误",currentPassword:"当前密码",newPassword:"新密码",confirmPassword:"确认密码",passwordsNotMatch:"新密码与确认密码不一致",changePasswordSuccess:"密码修改成功",changePasswordError:"修改密码失败",changePassword:"修改密码",passwordChanged:"密码修改成功",passwordChangeError:"修改密码失败"},i2={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:"环境变量",key:"键",value:"值",enabled:"已启用",enable:"启用",disable:"禁用",remove:"移除",toggleError:"切换服务器 {{serverName}} 状态失败",alreadyExists:"服务器 {{serverName}} 已经存在",invalidData:"提供的服务器数据无效",notFound:"找不到服务器 {{serverName}}",namePlaceholder:"请输入服务器名称",urlPlaceholder:"请输入服务器URL",commandPlaceholder:"请输入命令",argumentsPlaceholder:"请输入参数",errorDetails:"错误详情",viewErrorDetails:"查看错误详情"},o2={online:"在线",offline:"离线",connecting:"连接中"},u2={general:"发生错误",network:"网络连接错误,请检查您的互联网连接",serverConnection:"无法连接到服务器,请检查服务器是否正在运行",serverAdd:"添加服务器失败,请检查服务器状态",serverUpdate:"编辑服务器 {{serverName}} 失败,请检查服务器状态",serverFetch:"获取服务器数据失败,请稍后重试",initialStartup:"服务器可能正在启动中。首次启动可能需要一些时间,请耐心等候...",serverInstall:"安装服务器失败",failedToFetchSettings:"获取设置失败",failedToUpdateSystemConfig:"更新系统配置失败",failedToUpdateRouteConfig:"更新路由配置失败",failedToUpdateSmartRoutingConfig:"更新智能路由配置失败"},c2={processing:"处理中...",save:"保存",cancel:"取消",refresh:"刷新",create:"创建",submitting:"提交中...",delete:"删除",copy:"复制",copySuccess:"已复制到剪贴板",copyFailed:"复制失败",close:"关闭"},d2={dashboard:"仪表盘",servers:"服务器",settings:"设置",changePassword:"修改密码",groups:"分组",market:"市场",logs:"日志"},f2={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:"子"},m2={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}} 台服务器"},g2={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:"每页显示"},p2={enableGlobalRoute:"启用全局路由",enableGlobalRouteDescription:"允许不指定组 ID 就连接到 /sse 端点",enableGroupNameRoute:"启用组名路由",enableGroupNameRouteDescription:"允许使用组名而不仅仅是组 ID 连接到 /sse 端点",enableBearerAuth:"启用 Bearer 认证",enableBearerAuthDescription:"对 MCP 请求启用 Bearer 令牌认证",bearerAuthKey:"Bearer 认证密钥",bearerAuthKeyDescription:"Bearer 令牌中需要携带的认证密钥",bearerAuthKeyPlaceholder:"请输入 Bearer 认证密钥",pythonIndexUrl:"Python 包仓库地址",pythonIndexUrlDescription:"设置 UV_DEFAULT_INDEX 环境变量,用于 Python 包安装",pythonIndexUrlPlaceholder:"例如: https://mirrors.aliyun.com/pypi/simple",npmRegistry:"NPM 仓库地址",npmRegistryDescription:"设置 npm_config_registry 环境变量,用于 NPM 包安装",npmRegistryPlaceholder:"例如: https://registry.npmmirror.com/",installConfig:"安装配置",systemConfigUpdated:"系统配置更新成功",enableSmartRouting:"启用智能路由",enableSmartRoutingDescription:"开启智能路由功能,根据输入自动搜索最合适的工具(使用 $smart 分组)",dbUrl:"PostgreSQL 连接地址(支持 pgvector)",dbUrlPlaceholder:"例如: postgresql://user:password@localhost:5432/dbname",openaiApiBaseUrl:"OpenAI API 基础地址",openaiApiBaseUrlPlaceholder:"https://api.openai.com/v1",openaiApiKey:"OpenAI API 密钥",openaiApiKeyDescription:"用于访问 OpenAI API 的密钥",openaiApiKeyPlaceholder:"请输入 OpenAI API 密钥",openaiApiEmbeddingModel:"OpenAI 嵌入模型",openaiApiEmbeddingModelPlaceholder:"text-embedding-3-small",smartRoutingConfigUpdated:"智能路由配置更新成功",smartRoutingRequiredFields:"启用智能路由需要填写数据库连接地址和 OpenAI API 密钥",smartRoutingValidationError:"启用智能路由前请先填写必要字段:{{fields}}"},y2={app:I1,about:e2,profile:t2,sponsor:a2,wechat:n2,discord:l2,theme:s2,auth:r2,server:i2,status:o2,errors:u2,common:c2,nav:d2,pages:f2,logs:h2,groups:m2,market:g2,settings:p2};it.use(wg).use(ib).init({resources:{en:{translation:W1},zh:{translation:y2}},fallbackLng:"en",debug:!1,defaultNS:"translation",interpolation:{escapeValue:!1},detection:{order:["localStorage","cookie","htmlTag","navigator"],caches:["localStorage","cookie"]}});async function x2(){try{console.log("Loading runtime configuration...");const l=await Tx();console.log("Runtime configuration loaded:",l),window.__MCPHUB_CONFIG__=l,Qh.createRoot(document.getElementById("root")).render(c.jsx(vu.StrictMode,{children:c.jsx(im,{})}))}catch(l){console.error("Failed to initialize app:",l),console.log("Starting app with default configuration..."),window.__MCPHUB_CONFIG__={basePath:"",version:"dev",name:"mcphub"},Qh.createRoot(document.getElementById("root")).render(c.jsx(vu.StrictMode,{children:c.jsx(im,{})}))}}x2();
|
|
148
|
-
//# sourceMappingURL=index-BrGMGUbP.js.map
|