@samanhappy/mcphub 0.7.7 → 0.8.1
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/clients/openapi.js +278 -0
- package/dist/clients/openapi.js.map +1 -0
- package/dist/controllers/configController.js +27 -0
- package/dist/controllers/configController.js.map +1 -1
- package/dist/controllers/groupController.js +1 -1
- package/dist/controllers/groupController.js.map +1 -1
- package/dist/controllers/serverController.js +39 -11
- package/dist/controllers/serverController.js.map +1 -1
- package/dist/middlewares/auth.js +28 -0
- package/dist/middlewares/auth.js.map +1 -1
- package/dist/models/User.js +5 -5
- package/dist/models/User.js.map +1 -1
- package/dist/routes/index.js +3 -1
- package/dist/routes/index.js.map +1 -1
- package/dist/services/logService.js +2 -1
- package/dist/services/logService.js.map +1 -1
- package/dist/services/mcpService.js +116 -5
- package/dist/services/mcpService.js.map +1 -1
- package/dist/services/vectorSearchService.js +1 -1
- package/dist/services/vectorSearchService.js.map +1 -1
- package/dist/utils/smartRouting.js +1 -1
- package/dist/utils/smartRouting.js.map +1 -1
- package/frontend/dist/assets/{index-B0BhrPem.css → index-BTlOGwgN.css} +1 -1
- package/frontend/dist/assets/index-DINekbuX.js +186 -0
- package/frontend/dist/assets/index-DINekbuX.js.map +1 -0
- package/frontend/dist/index.html +2 -2
- package/package.json +12 -1
- package/frontend/dist/assets/index-Dr8Yov3b.js +0 -172
- package/frontend/dist/assets/index-Dr8Yov3b.js.map +0 -1
|
@@ -1,172 +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 Ah(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var hu={exports:{}},os={};/**
|
|
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 Bm;function Jp(){if(Bm)return os;Bm=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 x in d)x!=="key"&&(f[x]=d[x])}else f=d;return d=f.ref,{$$typeof:l,type:o,key:m,ref:d!==void 0?d:null,props:f}}return os.Fragment=s,os.jsx=r,os.jsxs=r,os}var qm;function Fp(){return qm||(qm=1,hu.exports=Jp()),hu.exports}var u=Fp(),gu={exports:{}},we={};/**
|
|
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 Gm;function Ip(){if(Gm)return we;Gm=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"),x=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),S=Symbol.iterator;function v(N){return N===null||typeof N!="object"?null:(N=S&&N[S]||N["@@iterator"],typeof N=="function"?N:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,C={};function T(N,Q,ne){this.props=N,this.context=Q,this.refs=C,this.updater=ne||O}T.prototype.isReactComponent={},T.prototype.setState=function(N,Q){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,Q,"setState")},T.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function z(){}z.prototype=T.prototype;function k(N,Q,ne){this.props=N,this.context=Q,this.refs=C,this.updater=ne||O}var U=k.prototype=new z;U.constructor=k,j(U,T.prototype),U.isPureReactComponent=!0;var $=Array.isArray,K={H:null,A:null,T:null,S:null,V:null},ue=Object.prototype.hasOwnProperty;function X(N,Q,ne,Z,ie,be){return ne=be.ref,{$$typeof:l,type:N,key:Q,ref:ne!==void 0?ne:null,props:be}}function Y(N,Q){return X(N.type,Q,void 0,void 0,void 0,N.props)}function I(N){return typeof N=="object"&&N!==null&&N.$$typeof===l}function H(N){var Q={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(ne){return Q[ne]})}var q=/\/+/g;function ae(N,Q){return typeof N=="object"&&N!==null&&N.key!=null?H(""+N.key):Q.toString(36)}function le(){}function se(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(le,le):(N.status="pending",N.then(function(Q){N.status==="pending"&&(N.status="fulfilled",N.value=Q)},function(Q){N.status==="pending"&&(N.status="rejected",N.reason=Q)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function G(N,Q,ne,Z,ie){var be=typeof N;(be==="undefined"||be==="boolean")&&(N=null);var ee=!1;if(N===null)ee=!0;else switch(be){case"bigint":case"string":case"number":ee=!0;break;case"object":switch(N.$$typeof){case l:case s:ee=!0;break;case y:return ee=N._init,G(ee(N._payload),Q,ne,Z,ie)}}if(ee)return ie=ie(N),ee=Z===""?"."+ae(N,0):Z,$(ie)?(ne="",ee!=null&&(ne=ee.replace(q,"$&/")+"/"),G(ie,Q,ne,"",function(he){return he})):ie!=null&&(I(ie)&&(ie=Y(ie,ne+(ie.key==null||N&&N.key===ie.key?"":(""+ie.key).replace(q,"$&/")+"/")+ee)),Q.push(ie)),1;ee=0;var re=Z===""?".":Z+":";if($(N))for(var oe=0;oe<N.length;oe++)Z=N[oe],be=re+ae(Z,oe),ee+=G(Z,Q,ne,be,ie);else if(oe=v(N),typeof oe=="function")for(N=oe.call(N),oe=0;!(Z=N.next()).done;)Z=Z.value,be=re+ae(Z,oe++),ee+=G(Z,Q,ne,be,ie);else if(be==="object"){if(typeof N.then=="function")return G(se(N),Q,ne,Z,ie);throw Q=String(N),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return ee}function M(N,Q,ne){if(N==null)return N;var Z=[],ie=0;return G(N,Z,"","",function(be){return Q.call(ne,be,ie++)}),Z}function W(N){if(N._status===-1){var Q=N._result;Q=Q(),Q.then(function(ne){(N._status===0||N._status===-1)&&(N._status=1,N._result=ne)},function(ne){(N._status===0||N._status===-1)&&(N._status=2,N._result=ne)}),N._status===-1&&(N._status=0,N._result=Q)}if(N._status===1)return N._result.default;throw N._result}var A=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)};function te(){}return we.Children={map:M,forEach:function(N,Q,ne){M(N,function(){Q.apply(this,arguments)},ne)},count:function(N){var Q=0;return M(N,function(){Q++}),Q},toArray:function(N){return M(N,function(Q){return Q})||[]},only:function(N){if(!I(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},we.Component=T,we.Fragment=r,we.Profiler=d,we.PureComponent=k,we.StrictMode=o,we.Suspense=h,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,we.__COMPILER_RUNTIME={__proto__:null,c:function(N){return K.H.useMemoCache(N)}},we.cache=function(N){return function(){return N.apply(null,arguments)}},we.cloneElement=function(N,Q,ne){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var Z=j({},N.props),ie=N.key,be=void 0;if(Q!=null)for(ee in Q.ref!==void 0&&(be=void 0),Q.key!==void 0&&(ie=""+Q.key),Q)!ue.call(Q,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&Q.ref===void 0||(Z[ee]=Q[ee]);var ee=arguments.length-2;if(ee===1)Z.children=ne;else if(1<ee){for(var re=Array(ee),oe=0;oe<ee;oe++)re[oe]=arguments[oe+2];Z.children=re}return X(N.type,ie,void 0,void 0,be,Z)},we.createContext=function(N){return N={$$typeof:m,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:f,_context:N},N},we.createElement=function(N,Q,ne){var Z,ie={},be=null;if(Q!=null)for(Z in Q.key!==void 0&&(be=""+Q.key),Q)ue.call(Q,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ie[Z]=Q[Z]);var ee=arguments.length-2;if(ee===1)ie.children=ne;else if(1<ee){for(var re=Array(ee),oe=0;oe<ee;oe++)re[oe]=arguments[oe+2];ie.children=re}if(N&&N.defaultProps)for(Z in ee=N.defaultProps,ee)ie[Z]===void 0&&(ie[Z]=ee[Z]);return X(N,be,void 0,void 0,null,ie)},we.createRef=function(){return{current:null}},we.forwardRef=function(N){return{$$typeof:x,render:N}},we.isValidElement=I,we.lazy=function(N){return{$$typeof:y,_payload:{_status:-1,_result:N},_init:W}},we.memo=function(N,Q){return{$$typeof:g,type:N,compare:Q===void 0?null:Q}},we.startTransition=function(N){var Q=K.T,ne={};K.T=ne;try{var Z=N(),ie=K.S;ie!==null&&ie(ne,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(te,A)}catch(be){A(be)}finally{K.T=Q}},we.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},we.use=function(N){return K.H.use(N)},we.useActionState=function(N,Q,ne){return K.H.useActionState(N,Q,ne)},we.useCallback=function(N,Q){return K.H.useCallback(N,Q)},we.useContext=function(N){return K.H.useContext(N)},we.useDebugValue=function(){},we.useDeferredValue=function(N,Q){return K.H.useDeferredValue(N,Q)},we.useEffect=function(N,Q,ne){var Z=K.H;if(typeof ne=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Z.useEffect(N,Q)},we.useId=function(){return K.H.useId()},we.useImperativeHandle=function(N,Q,ne){return K.H.useImperativeHandle(N,Q,ne)},we.useInsertionEffect=function(N,Q){return K.H.useInsertionEffect(N,Q)},we.useLayoutEffect=function(N,Q){return K.H.useLayoutEffect(N,Q)},we.useMemo=function(N,Q){return K.H.useMemo(N,Q)},we.useOptimistic=function(N,Q){return K.H.useOptimistic(N,Q)},we.useReducer=function(N,Q,ne){return K.H.useReducer(N,Q,ne)},we.useRef=function(N){return K.H.useRef(N)},we.useState=function(N){return K.H.useState(N)},we.useSyncExternalStore=function(N,Q,ne){return K.H.useSyncExternalStore(N,Q,ne)},we.useTransition=function(){return K.H.useTransition()},we.version="19.1.0",we}var Vm;function Lu(){return Vm||(Vm=1,gu.exports=Ip()),gu.exports}var w=Lu();const Eu=Ah(w);var pu={exports:{}},us={},xu={exports:{}},yu={};/**
|
|
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 $m;function Wp(){return $m||($m=1,function(l){function s(M,W){var A=M.length;M.push(W);e:for(;0<A;){var te=A-1>>>1,N=M[te];if(0<d(N,W))M[te]=W,M[A]=N,A=te;else break e}}function r(M){return M.length===0?null:M[0]}function o(M){if(M.length===0)return null;var W=M[0],A=M.pop();if(A!==W){M[0]=A;e:for(var te=0,N=M.length,Q=N>>>1;te<Q;){var ne=2*(te+1)-1,Z=M[ne],ie=ne+1,be=M[ie];if(0>d(Z,A))ie<N&&0>d(be,Z)?(M[te]=be,M[ie]=A,te=ie):(M[te]=Z,M[ne]=A,te=ne);else if(ie<N&&0>d(be,A))M[te]=be,M[ie]=A,te=ie;else break e}}return W}function d(M,W){var A=M.sortIndex-W.sortIndex;return A!==0?A:M.id-W.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,x=m.now();l.unstable_now=function(){return m.now()-x}}var h=[],g=[],y=1,S=null,v=3,O=!1,j=!1,C=!1,T=!1,z=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function $(M){for(var W=r(g);W!==null;){if(W.callback===null)o(g);else if(W.startTime<=M)o(g),W.sortIndex=W.expirationTime,s(h,W);else break;W=r(g)}}function K(M){if(C=!1,$(M),!j)if(r(h)!==null)j=!0,ue||(ue=!0,ae());else{var W=r(g);W!==null&&G(K,W.startTime-M)}}var ue=!1,X=-1,Y=5,I=-1;function H(){return T?!0:!(l.unstable_now()-I<Y)}function q(){if(T=!1,ue){var M=l.unstable_now();I=M;var W=!0;try{e:{j=!1,C&&(C=!1,k(X),X=-1),O=!0;var A=v;try{t:{for($(M),S=r(h);S!==null&&!(S.expirationTime>M&&H());){var te=S.callback;if(typeof te=="function"){S.callback=null,v=S.priorityLevel;var N=te(S.expirationTime<=M);if(M=l.unstable_now(),typeof N=="function"){S.callback=N,$(M),W=!0;break t}S===r(h)&&o(h),$(M)}else o(h);S=r(h)}if(S!==null)W=!0;else{var Q=r(g);Q!==null&&G(K,Q.startTime-M),W=!1}}break e}finally{S=null,v=A,O=!1}W=void 0}}finally{W?ae():ue=!1}}}var ae;if(typeof U=="function")ae=function(){U(q)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,se=le.port2;le.port1.onmessage=q,ae=function(){se.postMessage(null)}}else ae=function(){z(q,0)};function G(M,W){X=z(function(){M(l.unstable_now())},W)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(M){M.callback=null},l.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<M?Math.floor(1e3/M):5},l.unstable_getCurrentPriorityLevel=function(){return v},l.unstable_next=function(M){switch(v){case 1:case 2:case 3:var W=3;break;default:W=v}var A=v;v=W;try{return M()}finally{v=A}},l.unstable_requestPaint=function(){T=!0},l.unstable_runWithPriority=function(M,W){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var A=v;v=M;try{return W()}finally{v=A}},l.unstable_scheduleCallback=function(M,W,A){var te=l.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?te+A:te):A=te,M){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=A+N,M={id:y++,callback:W,priorityLevel:M,startTime:A,expirationTime:N,sortIndex:-1},A>te?(M.sortIndex=A,s(g,M),r(h)===null&&M===r(g)&&(C?(k(X),X=-1):C=!0,G(K,A-te))):(M.sortIndex=N,s(h,M),j||O||(j=!0,ue||(ue=!0,ae()))),M},l.unstable_shouldYield=H,l.unstable_wrapCallback=function(M){var W=v;return function(){var A=v;v=W;try{return M.apply(this,arguments)}finally{v=A}}}}(yu)),yu}var Ym;function ex(){return Ym||(Ym=1,xu.exports=Wp()),xu.exports}var bu={exports:{}},dt={};/**
|
|
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 Km;function tx(){if(Km)return dt;Km=1;var l=Lu();function s(h){var g="https://react.dev/errors/"+h;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)g+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+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,y){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:S==null?null:""+S,children:h,containerInfo:g,implementation:y}}var m=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(h,g){if(h==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return dt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,dt.createPortal=function(h,g){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return f(h,g,null,y)},dt.flushSync=function(h){var g=m.T,y=o.p;try{if(m.T=null,o.p=2,h)return h()}finally{m.T=g,o.p=y,o.d.f()}},dt.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))},dt.prefetchDNS=function(h){typeof h=="string"&&o.d.D(h)},dt.preinit=function(h,g){if(typeof h=="string"&&g&&typeof g.as=="string"){var y=g.as,S=x(y,g.crossOrigin),v=typeof g.integrity=="string"?g.integrity:void 0,O=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;y==="style"?o.d.S(h,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:S,integrity:v,fetchPriority:O}):y==="script"&&o.d.X(h,{crossOrigin:S,integrity:v,fetchPriority:O,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},dt.preinitModule=function(h,g){if(typeof h=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var y=x(g.as,g.crossOrigin);o.d.M(h,{crossOrigin:y,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)},dt.preload=function(h,g){if(typeof h=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var y=g.as,S=x(y,g.crossOrigin);o.d.L(h,y,{crossOrigin:S,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})}},dt.preloadModule=function(h,g){if(typeof h=="string")if(g){var y=x(g.as,g.crossOrigin);o.d.m(h,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else o.d.m(h)},dt.requestFormReset=function(h){o.d.r(h)},dt.unstable_batchedUpdates=function(h,g){return h(g)},dt.useFormState=function(h,g,y){return m.H.useFormState(h,g,y)},dt.useFormStatus=function(){return m.H.useHostTransitionStatus()},dt.version="19.1.0",dt}var Qm;function ax(){if(Qm)return bu.exports;Qm=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(),bu.exports=tx(),bu.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 Xm;function nx(){if(Xm)return us;Xm=1;var l=ex(),s=Lu(),r=ax();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 x(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 c=i.alternate;if(c===null){if(n=i.return,n!==null){a=n;continue}break}if(i.child===c.child){for(c=i.child;c;){if(c===a)return x(i),e;if(c===n)return x(i),t;c=c.sibling}throw Error(o(188))}if(a.return!==n.return)a=i,n=c;else{for(var p=!1,b=i.child;b;){if(b===a){p=!0,a=i,n=c;break}if(b===n){p=!0,n=i,a=c;break}b=b.sibling}if(!p){for(b=c.child;b;){if(b===a){p=!0,a=c,n=i;break}if(b===n){p=!0,n=c,a=i;break}b=b.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 y=Object.assign,S=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),k=Symbol.for("react.consumer"),U=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=q&&e[q]||e["@@iterator"],typeof e=="function"?e:null)}var le=Symbol.for("react.client.reference");function se(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case T:return"Profiler";case C:return"StrictMode";case K:return"Suspense";case ue:return"SuspenseList";case I:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case O:return"Portal";case U:return(e.displayName||"Context")+".Provider";case k:return(e._context.displayName||"Context")+".Consumer";case $:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return t=e.displayName||null,t!==null?t:se(e.type)||"Memo";case Y:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var G=Array.isArray,M=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A={pending:!1,data:null,method:null,action:null},te=[],N=-1;function Q(e){return{current:e}}function ne(e){0>N||(e.current=te[N],te[N]=null,N--)}function Z(e,t){N++,te[N]=e.current,e.current=t}var ie=Q(null),be=Q(null),ee=Q(null),re=Q(null);function oe(e,t){switch(Z(ee,t),Z(be,e),Z(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?mm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=mm(t),e=hm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ne(ie),Z(ie,e)}function he(){ne(ie),ne(be),ne(ee)}function xe(e){e.memoizedState!==null&&Z(re,e);var t=ie.current,a=hm(t,e.type);t!==a&&(Z(be,e),Z(ie,a))}function Oe(e){be.current===e&&(ne(ie),ne(be)),re.current===e&&(ne(re),ns._currentValue=A)}var qe=Object.prototype.hasOwnProperty,Yt=l.unstable_scheduleCallback,Kt=l.unstable_cancelCallback,hn=l.unstable_shouldYield,st=l.unstable_requestPaint,Ze=l.unstable_now,js=l.unstable_getCurrentPriorityLevel,cl=l.unstable_ImmediatePriority,Ns=l.unstable_UserBlockingPriority,ya=l.unstable_NormalPriority,Og=l.unstable_LowPriority,Zu=l.unstable_IdlePriority,Mg=l.log,zg=l.unstable_setDisableYieldValue,dl=null,bt=null;function ba(e){if(typeof Mg=="function"&&zg(e),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode(dl,e)}catch{}}var vt=Math.clz32?Math.clz32:Lg,Dg=Math.log,Ug=Math.LN2;function Lg(e){return e>>>=0,e===0?32:31-(Dg(e)/Ug|0)|0}var Es=256,Cs=4194304;function Qa(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 ks(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var i=0,c=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var b=n&134217727;return b!==0?(n=b&~c,n!==0?i=Qa(n):(p&=b,p!==0?i=Qa(p):a||(a=b&~e,a!==0&&(i=Qa(a))))):(b=n&~c,b!==0?i=Qa(b):p!==0?i=Qa(p):a||(a=n&~e,a!==0&&(i=Qa(a)))),i===0?0:t!==0&&t!==i&&(t&c)===0&&(c=i&-i,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:i}function fl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function _g(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 Pu(){var e=Es;return Es<<=1,(Es&4194048)===0&&(Es=256),e}function Ju(){var e=Cs;return Cs<<=1,(Cs&62914560)===0&&(Cs=4194304),e}function ai(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ml(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Hg(e,t,a,n,i,c){var p=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var b=e.entanglements,E=e.expirationTimes,_=e.hiddenUpdates;for(a=p&~a;0<a;){var P=31-vt(a),F=1<<P;b[P]=0,E[P]=-1;var B=_[P];if(B!==null)for(_[P]=null,P=0;P<B.length;P++){var V=B[P];V!==null&&(V.lane&=-536870913)}a&=~F}n!==0&&Fu(e,n,0),c!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=c&~(p&~t))}function Fu(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-vt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&4194090}function Iu(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-vt(a),i=1<<n;i&t|e[n]&t&&(e[n]|=t),a&=~i}}function ni(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 li(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Wu(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:zm(e.type))}function Bg(e,t){var a=W.p;try{return W.p=e,t()}finally{W.p=a}}var va=Math.random().toString(36).slice(2),ut="__reactFiber$"+va,ht="__reactProps$"+va,gn="__reactContainer$"+va,si="__reactEvents$"+va,qg="__reactListeners$"+va,Gg="__reactHandles$"+va,ec="__reactResources$"+va,hl="__reactMarker$"+va;function ri(e){delete e[ut],delete e[ht],delete e[si],delete e[qg],delete e[Gg]}function pn(e){var t=e[ut];if(t)return t;for(var a=e.parentNode;a;){if(t=a[gn]||a[ut]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=ym(e);e!==null;){if(a=e[ut])return a;e=ym(e)}return t}e=a,a=e.parentNode}return null}function xn(e){if(e=e[ut]||e[gn]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function gl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function yn(e){var t=e[ec];return t||(t=e[ec]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function tt(e){e[hl]=!0}var tc=new Set,ac={};function Xa(e,t){bn(e,t),bn(e+"Capture",t)}function bn(e,t){for(ac[e]=t,e=0;e<t.length;e++)tc.add(t[e])}var Vg=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]*$"),nc={},lc={};function $g(e){return qe.call(lc,e)?!0:qe.call(nc,e)?!1:Vg.test(e)?lc[e]=!0:(nc[e]=!0,!1)}function Ts(e,t,a){if($g(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 As(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 ea(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 ii,sc;function vn(e){if(ii===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);ii=t&&t[1]||"",sc=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+ii+e+sc}var oi=!1;function ui(e,t){if(!e||oi)return"";oi=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(V){var B=V}Reflect.construct(e,[],F)}else{try{F.call()}catch(V){B=V}e.call(F.prototype)}}else{try{throw Error()}catch(V){B=V}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(V){if(V&&B&&typeof V.stack=="string")return[V.stack,B.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 c=n.DetermineComponentFrameRoot(),p=c[0],b=c[1];if(p&&b){var E=p.split(`
|
|
44
|
-
`),_=b.split(`
|
|
45
|
-
`);for(i=n=0;n<E.length&&!E[n].includes("DetermineComponentFrameRoot");)n++;for(;i<_.length&&!_[i].includes("DetermineComponentFrameRoot");)i++;if(n===E.length||i===_.length)for(n=E.length-1,i=_.length-1;1<=n&&0<=i&&E[n]!==_[i];)i--;for(;1<=n&&0<=i;n--,i--)if(E[n]!==_[i]){if(n!==1||i!==1)do if(n--,i--,0>i||E[n]!==_[i]){var P=`
|
|
46
|
-
`+E[n].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),P}while(1<=n&&0<=i);break}}}finally{oi=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?vn(a):""}function Yg(e){switch(e.tag){case 26:case 27:case 5:return vn(e.type);case 16:return vn("Lazy");case 13:return vn("Suspense");case 19:return vn("SuspenseList");case 0:case 15:return ui(e.type,!1);case 11:return ui(e.type.render,!1);case 1:return ui(e.type,!0);case 31:return vn("Activity");default:return""}}function rc(e){try{var t="";do t+=Yg(e),e=e.return;while(e);return t}catch(a){return`
|
|
47
|
-
Error generating stack: `+a.message+`
|
|
48
|
-
`+a.stack}}function Tt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ic(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kg(e){var t=ic(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,c=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(p){n=""+p,c.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 Rs(e){e._valueTracker||(e._valueTracker=Kg(e))}function oc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=ic(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Os(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 At(e){return e.replace(Qg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ci(e,t,a,n,i,c,p,b){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Tt(t)):e.value!==""+Tt(t)&&(e.value=""+Tt(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?di(e,p,Tt(t)):a!=null?di(e,p,Tt(a)):n!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Tt(b):e.removeAttribute("name")}function uc(e,t,a,n,i,c,p,b){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null))return;a=a!=null?""+Tt(a):"",t=t!=null?""+Tt(t):a,b||t===e.value||(e.value=t),e.defaultValue=t}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=b?e.checked:!!n,e.defaultChecked=!!n,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p)}function di(e,t,a){t==="number"&&Os(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function wn(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=""+Tt(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 cc(e,t,a){if(t!=null&&(t=""+Tt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Tt(a):""}function dc(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(G(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Tt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n)}function Sn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Xg=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function fc(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||Xg.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function mc(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&&fc(e,i,n)}else for(var c in t)t.hasOwnProperty(c)&&fc(e,c,t[c])}function fi(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zg=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Pg=/^[\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 Ms(e){return Pg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var mi=null;function hi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jn=null,Nn=null;function hc(e){var t=xn(e);if(t&&(e=t.stateNode)){var a=e[ht]||null;e:switch(e=t.stateNode,t.type){case"input":if(ci(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+At(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var i=n[ht]||null;if(!i)throw Error(o(90));ci(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&&oc(n)}break e;case"textarea":cc(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&wn(e,!!a.multiple,t,!1)}}}var gi=!1;function gc(e,t,a){if(gi)return e(t,a);gi=!0;try{var n=e(t);return n}finally{if(gi=!1,(jn!==null||Nn!==null)&&(xr(),jn&&(t=jn,e=Nn,Nn=jn=null,hc(t),e)))for(t=0;t<e.length;t++)hc(e[t])}}function pl(e,t){var a=e.stateNode;if(a===null)return null;var n=a[ht]||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 ta=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pi=!1;if(ta)try{var xl={};Object.defineProperty(xl,"passive",{get:function(){pi=!0}}),window.addEventListener("test",xl,xl),window.removeEventListener("test",xl,xl)}catch{pi=!1}var wa=null,xi=null,zs=null;function pc(){if(zs)return zs;var e,t=xi,a=t.length,n,i="value"in wa?wa.value:wa.textContent,c=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[c-n];n++);return zs=i.slice(e,1<n?1-n:void 0)}function Ds(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 Us(){return!0}function xc(){return!1}function gt(e){function t(a,n,i,c,p){this._reactName=a,this._targetInst=i,this.type=n,this.nativeEvent=c,this.target=p,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(a=e[b],this[b]=a?a(c):c[b]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Us:xc,this.isPropagationStopped=xc,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Us)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Us)},persist:function(){},isPersistent:Us}),t}var Za={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ls=gt(Za),yl=y({},Za,{view:0,detail:0}),Jg=gt(yl),yi,bi,bl,_s=y({},yl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wi,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!==bl&&(bl&&e.type==="mousemove"?(yi=e.screenX-bl.screenX,bi=e.screenY-bl.screenY):bi=yi=0,bl=e),yi)},movementY:function(e){return"movementY"in e?e.movementY:bi}}),yc=gt(_s),Fg=y({},_s,{dataTransfer:0}),Ig=gt(Fg),Wg=y({},yl,{relatedTarget:0}),vi=gt(Wg),e0=y({},Za,{animationName:0,elapsedTime:0,pseudoElement:0}),t0=gt(e0),a0=y({},Za,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),n0=gt(a0),l0=y({},Za,{data:0}),bc=gt(l0),s0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},r0={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"},i0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function o0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=i0[e])?!!t[e]:!1}function wi(){return o0}var u0=y({},yl,{key:function(e){if(e.key){var t=s0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?r0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wi,charCode:function(e){return e.type==="keypress"?Ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),c0=gt(u0),d0=y({},_s,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vc=gt(d0),f0=y({},yl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wi}),m0=gt(f0),h0=y({},Za,{propertyName:0,elapsedTime:0,pseudoElement:0}),g0=gt(h0),p0=y({},_s,{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}),x0=gt(p0),y0=y({},Za,{newState:0,oldState:0}),b0=gt(y0),v0=[9,13,27,32],Si=ta&&"CompositionEvent"in window,vl=null;ta&&"documentMode"in document&&(vl=document.documentMode);var w0=ta&&"TextEvent"in window&&!vl,wc=ta&&(!Si||vl&&8<vl&&11>=vl),Sc=" ",jc=!1;function Nc(e,t){switch(e){case"keyup":return v0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ec(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var En=!1;function S0(e,t){switch(e){case"compositionend":return Ec(t);case"keypress":return t.which!==32?null:(jc=!0,Sc);case"textInput":return e=t.data,e===Sc&&jc?null:e;default:return null}}function j0(e,t){if(En)return e==="compositionend"||!Si&&Nc(e,t)?(e=pc(),zs=xi=wa=null,En=!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 wc&&t.locale!=="ko"?null:t.data;default:return null}}var N0={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 Cc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!N0[e.type]:t==="textarea"}function kc(e,t,a,n){jn?Nn?Nn.push(n):Nn=[n]:jn=n,t=jr(t,"onChange"),0<t.length&&(a=new Ls("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var wl=null,Sl=null;function E0(e){om(e,0)}function Hs(e){var t=gl(e);if(oc(t))return e}function Tc(e,t){if(e==="change")return t}var Ac=!1;if(ta){var ji;if(ta){var Ni="oninput"in document;if(!Ni){var Rc=document.createElement("div");Rc.setAttribute("oninput","return;"),Ni=typeof Rc.oninput=="function"}ji=Ni}else ji=!1;Ac=ji&&(!document.documentMode||9<document.documentMode)}function Oc(){wl&&(wl.detachEvent("onpropertychange",Mc),Sl=wl=null)}function Mc(e){if(e.propertyName==="value"&&Hs(Sl)){var t=[];kc(t,Sl,e,hi(e)),gc(E0,t)}}function C0(e,t,a){e==="focusin"?(Oc(),wl=t,Sl=a,wl.attachEvent("onpropertychange",Mc)):e==="focusout"&&Oc()}function k0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Hs(Sl)}function T0(e,t){if(e==="click")return Hs(t)}function A0(e,t){if(e==="input"||e==="change")return Hs(t)}function R0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wt=typeof Object.is=="function"?Object.is:R0;function jl(e,t){if(wt(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(!qe.call(t,i)||!wt(e[i],t[i]))return!1}return!0}function zc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dc(e,t){var a=zc(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=zc(a)}}function Uc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Uc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Os(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=Os(e.document)}return t}function Ei(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 O0=ta&&"documentMode"in document&&11>=document.documentMode,Cn=null,Ci=null,Nl=null,ki=!1;function _c(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ki||Cn==null||Cn!==Os(n)||(n=Cn,"selectionStart"in n&&Ei(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}),Nl&&jl(Nl,n)||(Nl=n,n=jr(Ci,"onSelect"),0<n.length&&(t=new Ls("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=Cn)))}function Pa(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var kn={animationend:Pa("Animation","AnimationEnd"),animationiteration:Pa("Animation","AnimationIteration"),animationstart:Pa("Animation","AnimationStart"),transitionrun:Pa("Transition","TransitionRun"),transitionstart:Pa("Transition","TransitionStart"),transitioncancel:Pa("Transition","TransitionCancel"),transitionend:Pa("Transition","TransitionEnd")},Ti={},Hc={};ta&&(Hc=document.createElement("div").style,"AnimationEvent"in window||(delete kn.animationend.animation,delete kn.animationiteration.animation,delete kn.animationstart.animation),"TransitionEvent"in window||delete kn.transitionend.transition);function Ja(e){if(Ti[e])return Ti[e];if(!kn[e])return e;var t=kn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Hc)return Ti[e]=t[a];return e}var Bc=Ja("animationend"),qc=Ja("animationiteration"),Gc=Ja("animationstart"),M0=Ja("transitionrun"),z0=Ja("transitionstart"),D0=Ja("transitioncancel"),Vc=Ja("transitionend"),$c=new Map,Ai="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(" ");Ai.push("scrollEnd");function Bt(e,t){$c.set(e,t),Xa(t,[e])}var Yc=new WeakMap;function Rt(e,t){if(typeof e=="object"&&e!==null){var a=Yc.get(e);return a!==void 0?a:(t={value:e,source:t,stack:rc(t)},Yc.set(e,t),t)}return{value:e,source:t,stack:rc(t)}}var Ot=[],Tn=0,Ri=0;function Bs(){for(var e=Tn,t=Ri=Tn=0;t<e;){var a=Ot[t];Ot[t++]=null;var n=Ot[t];Ot[t++]=null;var i=Ot[t];Ot[t++]=null;var c=Ot[t];if(Ot[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}c!==0&&Kc(a,i,c)}}function qs(e,t,a,n){Ot[Tn++]=e,Ot[Tn++]=t,Ot[Tn++]=a,Ot[Tn++]=n,Ri|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Oi(e,t,a,n){return qs(e,t,a,n),Gs(e)}function An(e,t){return qs(e,null,null,t),Gs(e)}function Kc(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var i=!1,c=e.return;c!==null;)c.childLanes|=a,n=c.alternate,n!==null&&(n.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(i=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,i&&t!==null&&(i=31-vt(a),e=c.hiddenUpdates,n=e[i],n===null?e[i]=[t]:n.push(t),t.lane=a|536870912),c):null}function Gs(e){if(50<Pl)throw Pl=0,Ho=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Rn={};function U0(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 St(e,t,a,n){return new U0(e,t,a,n)}function Mi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function aa(e,t){var a=e.alternate;return a===null?(a=St(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 Qc(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 Vs(e,t,a,n,i,c){var p=0;if(n=e,typeof e=="function")Mi(e)&&(p=1);else if(typeof e=="string")p=_p(e,a,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case I:return e=St(31,a,t,i),e.elementType=I,e.lanes=c,e;case j:return Fa(a.children,i,c,t);case C:p=8,i|=24;break;case T:return e=St(12,a,t,i|2),e.elementType=T,e.lanes=c,e;case K:return e=St(13,a,t,i),e.elementType=K,e.lanes=c,e;case ue:return e=St(19,a,t,i),e.elementType=ue,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:case U:p=10;break e;case k:p=9;break e;case $:p=11;break e;case X:p=14;break e;case Y:p=16,n=null;break e}p=29,a=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=St(p,a,t,i),t.elementType=e,t.type=n,t.lanes=c,t}function Fa(e,t,a,n){return e=St(7,e,n,t),e.lanes=a,e}function zi(e,t,a){return e=St(6,e,null,t),e.lanes=a,e}function Di(e,t,a){return t=St(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var On=[],Mn=0,$s=null,Ys=0,Mt=[],zt=0,Ia=null,na=1,la="";function Wa(e,t){On[Mn++]=Ys,On[Mn++]=$s,$s=e,Ys=t}function Xc(e,t,a){Mt[zt++]=na,Mt[zt++]=la,Mt[zt++]=Ia,Ia=e;var n=na;e=la;var i=32-vt(n)-1;n&=~(1<<i),a+=1;var c=32-vt(t)+i;if(30<c){var p=i-i%5;c=(n&(1<<p)-1).toString(32),n>>=p,i-=p,na=1<<32-vt(t)+i|a<<i|n,la=c+e}else na=1<<c|a<<i|n,la=e}function Ui(e){e.return!==null&&(Wa(e,1),Xc(e,1,0))}function Li(e){for(;e===$s;)$s=On[--Mn],On[Mn]=null,Ys=On[--Mn],On[Mn]=null;for(;e===Ia;)Ia=Mt[--zt],Mt[zt]=null,la=Mt[--zt],Mt[zt]=null,na=Mt[--zt],Mt[zt]=null}var mt=null,Ye=null,Me=!1,en=null,Qt=!1,_i=Error(o(519));function tn(e){var t=Error(o(418,""));throw kl(Rt(t,e)),_i}function Zc(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[ut]=e,t[ht]=n,a){case"dialog":ke("cancel",t),ke("close",t);break;case"iframe":case"object":case"embed":ke("load",t);break;case"video":case"audio":for(a=0;a<Fl.length;a++)ke(Fl[a],t);break;case"source":ke("error",t);break;case"img":case"image":case"link":ke("error",t),ke("load",t);break;case"details":ke("toggle",t);break;case"input":ke("invalid",t),uc(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0),Rs(t);break;case"select":ke("invalid",t);break;case"textarea":ke("invalid",t),dc(t,n.value,n.defaultValue,n.children),Rs(t)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||fm(t.textContent,a)?(n.popover!=null&&(ke("beforetoggle",t),ke("toggle",t)),n.onScroll!=null&&ke("scroll",t),n.onScrollEnd!=null&&ke("scrollend",t),n.onClick!=null&&(t.onclick=Nr),t=!0):t=!1,t||tn(e)}function Pc(e){for(mt=e.return;mt;)switch(mt.tag){case 5:case 13:Qt=!1;return;case 27:case 3:Qt=!0;return;default:mt=mt.return}}function El(e){if(e!==mt)return!1;if(!Me)return Pc(e),Me=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||eu(e.type,e.memoizedProps)),a=!a),a&&Ye&&tn(e),Pc(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){Ye=Gt(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}Ye=null}}else t===27?(t=Ye,_a(e.type)?(e=lu,lu=null,Ye=e):Ye=t):Ye=mt?Gt(e.stateNode.nextSibling):null;return!0}function Cl(){Ye=mt=null,Me=!1}function Jc(){var e=en;return e!==null&&(yt===null?yt=e:yt.push.apply(yt,e),en=null),e}function kl(e){en===null?en=[e]:en.push(e)}var Hi=Q(null),an=null,sa=null;function Sa(e,t,a){Z(Hi,t._currentValue),t._currentValue=a}function ra(e){e._currentValue=Hi.current,ne(Hi)}function Bi(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 qi(e,t,a,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var c=i.dependencies;if(c!==null){var p=i.child;c=c.firstContext;e:for(;c!==null;){var b=c;c=i;for(var E=0;E<t.length;E++)if(b.context===t[E]){c.lanes|=a,b=c.alternate,b!==null&&(b.lanes|=a),Bi(c.return,a,e),n||(p=null);break e}c=b.next}}else if(i.tag===18){if(p=i.return,p===null)throw Error(o(341));p.lanes|=a,c=p.alternate,c!==null&&(c.lanes|=a),Bi(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 Tl(e,t,a,n){e=null;for(var i=t,c=!1;i!==null;){if(!c){if((i.flags&524288)!==0)c=!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 b=i.type;wt(i.pendingProps.value,p.value)||(e!==null?e.push(b):e=[b])}}else if(i===re.current){if(p=i.alternate,p===null)throw Error(o(387));p.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(ns):e=[ns])}i=i.return}e!==null&&qi(t,e,a,n),t.flags|=262144}function Ks(e){for(e=e.firstContext;e!==null;){if(!wt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function nn(e){an=e,sa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ct(e){return Fc(an,e)}function Qs(e,t){return an===null&&nn(e),Fc(e,t)}function Fc(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},sa===null){if(e===null)throw Error(o(308));sa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sa=sa.next=t;return a}var L0=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()})}},_0=l.unstable_scheduleCallback,H0=l.unstable_NormalPriority,Fe={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Gi(){return{controller:new L0,data:new Map,refCount:0}}function Al(e){e.refCount--,e.refCount===0&&_0(H0,function(){e.controller.abort()})}var Rl=null,Vi=0,zn=0,Dn=null;function B0(e,t){if(Rl===null){var a=Rl=[];Vi=0,zn=Ko(),Dn={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Vi++,t.then(Ic,Ic),t}function Ic(){if(--Vi===0&&Rl!==null){Dn!==null&&(Dn.status="fulfilled");var e=Rl;Rl=null,zn=0,Dn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function q0(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 Wc=M.S;M.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&B0(e,t),Wc!==null&&Wc(e,t)};var ln=Q(null);function $i(){var e=ln.current;return e!==null?e:Be.pooledCache}function Xs(e,t){t===null?Z(ln,ln.current):Z(ln,t.pool)}function ed(){var e=$i();return e===null?null:{parent:Fe._currentValue,pool:e}}var Ol=Error(o(460)),td=Error(o(474)),Zs=Error(o(542)),Yi={then:function(){}};function ad(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ps(){}function nd(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ps,Ps),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sd(e),e;default:if(typeof t.status=="string")t.then(Ps,Ps);else{if(e=Be,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,sd(e),e}throw Ml=t,Ol}}var Ml=null;function ld(){if(Ml===null)throw Error(o(459));var e=Ml;return Ml=null,e}function sd(e){if(e===Ol||e===Zs)throw Error(o(483))}var ja=!1;function Ki(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qi(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 Na(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ea(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(ze&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=Gs(e),Kc(e,null,a),t}return qs(e,n,t,a),Gs(e)}function zl(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,Iu(e,a)}}function Xi(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var i=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var p={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?i=c=p:c=c.next=p,a=a.next}while(a!==null);c===null?i=c=t:c=c.next=t}else i=c=t;a={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:c,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 Zi=!1;function Dl(){if(Zi){var e=Dn;if(e!==null)throw e}}function Ul(e,t,a,n){Zi=!1;var i=e.updateQueue;ja=!1;var c=i.firstBaseUpdate,p=i.lastBaseUpdate,b=i.shared.pending;if(b!==null){i.shared.pending=null;var E=b,_=E.next;E.next=null,p===null?c=_:p.next=_,p=E;var P=e.alternate;P!==null&&(P=P.updateQueue,b=P.lastBaseUpdate,b!==p&&(b===null?P.firstBaseUpdate=_:b.next=_,P.lastBaseUpdate=E))}if(c!==null){var F=i.baseState;p=0,P=_=E=null,b=c;do{var B=b.lane&-536870913,V=B!==b.lane;if(V?(Ae&B)===B:(n&B)===B){B!==0&&B===zn&&(Zi=!0),P!==null&&(P=P.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ye=e,ge=b;B=t;var _e=a;switch(ge.tag){case 1:if(ye=ge.payload,typeof ye=="function"){F=ye.call(_e,F,B);break e}F=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=ge.payload,B=typeof ye=="function"?ye.call(_e,F,B):ye,B==null)break e;F=y({},F,B);break e;case 2:ja=!0}}B=b.callback,B!==null&&(e.flags|=64,V&&(e.flags|=8192),V=i.callbacks,V===null?i.callbacks=[B]:V.push(B))}else V={lane:B,tag:b.tag,payload:b.payload,callback:b.callback,next:null},P===null?(_=P=V,E=F):P=P.next=V,p|=B;if(b=b.next,b===null){if(b=i.shared.pending,b===null)break;V=b,b=V.next,V.next=null,i.lastBaseUpdate=V,i.shared.pending=null}}while(!0);P===null&&(E=F),i.baseState=E,i.firstBaseUpdate=_,i.lastBaseUpdate=P,c===null&&(i.shared.lanes=0),za|=p,e.lanes=p,e.memoizedState=F}}function rd(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function id(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)rd(a[e],t)}var Un=Q(null),Js=Q(0);function od(e,t){e=ma,Z(Js,e),Z(Un,t),ma=e|t.baseLanes}function Pi(){Z(Js,ma),Z(Un,Un.current)}function Ji(){ma=Js.current,ne(Un),ne(Js)}var Ca=0,Se=null,Ue=null,Pe=null,Fs=!1,Ln=!1,sn=!1,Is=0,Ll=0,_n=null,G0=0;function Qe(){throw Error(o(321))}function Fi(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!wt(e[a],t[a]))return!1;return!0}function Ii(e,t,a,n,i,c){return Ca=c,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Kd:Qd,sn=!1,c=a(n,i),sn=!1,Ln&&(c=cd(t,a,n,i)),ud(e),c}function ud(e){M.H=lr;var t=Ue!==null&&Ue.next!==null;if(Ca=0,Pe=Ue=Se=null,Fs=!1,Ll=0,_n=null,t)throw Error(o(300));e===null||at||(e=e.dependencies,e!==null&&Ks(e)&&(at=!0))}function cd(e,t,a,n){Se=e;var i=0;do{if(Ln&&(_n=null),Ll=0,Ln=!1,25<=i)throw Error(o(301));if(i+=1,Pe=Ue=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}M.H=Z0,c=t(a,n)}while(Ln);return c}function V0(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?_l(t):t,e=e.useState()[0],(Ue!==null?Ue.memoizedState:null)!==e&&(Se.flags|=1024),t}function Wi(){var e=Is!==0;return Is=0,e}function eo(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function to(e){if(Fs){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Fs=!1}Ca=0,Pe=Ue=Se=null,Ln=!1,Ll=Is=0,_n=null}function pt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pe===null?Se.memoizedState=Pe=e:Pe=Pe.next=e,Pe}function Je(){if(Ue===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=Ue.next;var t=Pe===null?Se.memoizedState:Pe.next;if(t!==null)Pe=t,Ue=e;else{if(e===null)throw Se.alternate===null?Error(o(467)):Error(o(310));Ue=e,e={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},Pe===null?Se.memoizedState=Pe=e:Pe=Pe.next=e}return Pe}function ao(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _l(e){var t=Ll;return Ll+=1,_n===null&&(_n=[]),e=nd(_n,e,t),t=Se,(Pe===null?t.memoizedState:Pe.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Kd:Qd),e}function Ws(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return _l(e);if(e.$$typeof===U)return ct(e)}throw Error(o(438,String(e)))}function no(e){var t=null,a=Se.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=Se.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=ao(),Se.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=H;return t.index++,a}function ia(e,t){return typeof t=="function"?t(e):t}function er(e){var t=Je();return lo(t,Ue,e)}function lo(e,t,a){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=a;var i=e.baseQueue,c=n.pending;if(c!==null){if(i!==null){var p=i.next;i.next=c.next,c.next=p}t.baseQueue=i=c,n.pending=null}if(c=e.baseState,i===null)e.memoizedState=c;else{t=i.next;var b=p=null,E=null,_=t,P=!1;do{var F=_.lane&-536870913;if(F!==_.lane?(Ae&F)===F:(Ca&F)===F){var B=_.revertLane;if(B===0)E!==null&&(E=E.next={lane:0,revertLane:0,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),F===zn&&(P=!0);else if((Ca&B)===B){_=_.next,B===zn&&(P=!0);continue}else F={lane:0,revertLane:_.revertLane,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},E===null?(b=E=F,p=c):E=E.next=F,Se.lanes|=B,za|=B;F=_.action,sn&&a(c,F),c=_.hasEagerState?_.eagerState:a(c,F)}else B={lane:F,revertLane:_.revertLane,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},E===null?(b=E=B,p=c):E=E.next=B,Se.lanes|=F,za|=F;_=_.next}while(_!==null&&_!==t);if(E===null?p=c:E.next=b,!wt(c,e.memoizedState)&&(at=!0,P&&(a=Dn,a!==null)))throw a;e.memoizedState=c,e.baseState=p,e.baseQueue=E,n.lastRenderedState=c}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function so(e){var t=Je(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var n=a.dispatch,i=a.pending,c=t.memoizedState;if(i!==null){a.pending=null;var p=i=i.next;do c=e(c,p.action),p=p.next;while(p!==i);wt(c,t.memoizedState)||(at=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,n]}function dd(e,t,a){var n=Se,i=Je(),c=Me;if(c){if(a===void 0)throw Error(o(407));a=a()}else a=t();var p=!wt((Ue||i).memoizedState,a);p&&(i.memoizedState=a,at=!0),i=i.queue;var b=hd.bind(null,n,i,e);if(Hl(2048,8,b,[e]),i.getSnapshot!==t||p||Pe!==null&&Pe.memoizedState.tag&1){if(n.flags|=2048,Hn(9,tr(),md.bind(null,n,i,a,t),null),Be===null)throw Error(o(349));c||(Ca&124)!==0||fd(n,t,a)}return a}function fd(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Se.updateQueue,t===null?(t=ao(),Se.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function md(e,t,a,n){t.value=a,t.getSnapshot=n,gd(t)&&pd(e)}function hd(e,t,a){return a(function(){gd(t)&&pd(e)})}function gd(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!wt(e,a)}catch{return!0}}function pd(e){var t=An(e,2);t!==null&&kt(t,e,2)}function ro(e){var t=pt();if(typeof e=="function"){var a=e;if(e=a(),sn){ba(!0);try{a()}finally{ba(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:e},t}function xd(e,t,a,n){return e.baseState=a,lo(e,Ue,typeof n=="function"?n:ia)}function $0(e,t,a,n,i){if(nr(e))throw Error(o(485));if(e=t.action,e!==null){var c={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){c.listeners.push(p)}};M.T!==null?a(!0):c.isTransition=!1,n(c),a=t.pending,a===null?(c.next=t.pending=c,yd(t,c)):(c.next=a.next,t.pending=a.next=c)}}function yd(e,t){var a=t.action,n=t.payload,i=e.state;if(t.isTransition){var c=M.T,p={};M.T=p;try{var b=a(i,n),E=M.S;E!==null&&E(p,b),bd(e,t,b)}catch(_){io(e,t,_)}finally{M.T=c}}else try{c=a(i,n),bd(e,t,c)}catch(_){io(e,t,_)}}function bd(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){vd(e,t,n)},function(n){return io(e,t,n)}):vd(e,t,a)}function vd(e,t,a){t.status="fulfilled",t.value=a,wd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,yd(e,a)))}function io(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,wd(t),t=t.next;while(t!==n)}e.action=null}function wd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Sd(e,t){return t}function jd(e,t){if(Me){var a=Be.formState;if(a!==null){e:{var n=Se;if(Me){if(Ye){t:{for(var i=Ye,c=Qt;i.nodeType!==8;){if(!c){i=null;break t}if(i=Gt(i.nextSibling),i===null){i=null;break t}}c=i.data,i=c==="F!"||c==="F"?i:null}if(i){Ye=Gt(i.nextSibling),n=i.data==="F!";break e}}tn(n)}n=!1}n&&(t=a[0])}}return a=pt(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sd,lastRenderedState:t},a.queue=n,a=Vd.bind(null,Se,n),n.dispatch=a,n=ro(!1),c=mo.bind(null,Se,!1,n.queue),n=pt(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,a=$0.bind(null,Se,i,c,a),i.dispatch=a,n.memoizedState=e,[t,a,!1]}function Nd(e){var t=Je();return Ed(t,Ue,e)}function Ed(e,t,a){if(t=lo(e,t,Sd)[0],e=er(ia)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=_l(t)}catch(p){throw p===Ol?Zs:p}else n=t;t=Je();var i=t.queue,c=i.dispatch;return a!==t.memoizedState&&(Se.flags|=2048,Hn(9,tr(),Y0.bind(null,i,a),null)),[n,c,e]}function Y0(e,t){e.action=t}function Cd(e){var t=Je(),a=Ue;if(a!==null)return Ed(t,a,e);Je(),t=t.memoizedState,a=Je();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function Hn(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=Se.updateQueue,t===null&&(t=ao(),Se.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 tr(){return{destroy:void 0,resource:void 0}}function kd(){return Je().memoizedState}function ar(e,t,a,n){var i=pt();n=n===void 0?null:n,Se.flags|=e,i.memoizedState=Hn(1|t,tr(),a,n)}function Hl(e,t,a,n){var i=Je();n=n===void 0?null:n;var c=i.memoizedState.inst;Ue!==null&&n!==null&&Fi(n,Ue.memoizedState.deps)?i.memoizedState=Hn(t,c,a,n):(Se.flags|=e,i.memoizedState=Hn(1|t,c,a,n))}function Td(e,t){ar(8390656,8,e,t)}function Ad(e,t){Hl(2048,8,e,t)}function Rd(e,t){return Hl(4,2,e,t)}function Od(e,t){return Hl(4,4,e,t)}function Md(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 zd(e,t,a){a=a!=null?a.concat([e]):null,Hl(4,4,Md.bind(null,t,e),a)}function oo(){}function Dd(e,t){var a=Je();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Fi(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Ud(e,t){var a=Je();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Fi(t,n[1]))return n[0];if(n=e(),sn){ba(!0);try{e()}finally{ba(!1)}}return a.memoizedState=[n,t],n}function uo(e,t,a){return a===void 0||(Ca&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=Bf(),Se.lanes|=e,za|=e,a)}function Ld(e,t,a,n){return wt(a,t)?a:Un.current!==null?(e=uo(e,a,n),wt(e,t)||(at=!0),e):(Ca&42)===0?(at=!0,e.memoizedState=a):(e=Bf(),Se.lanes|=e,za|=e,t)}function _d(e,t,a,n,i){var c=W.p;W.p=c!==0&&8>c?c:8;var p=M.T,b={};M.T=b,mo(e,!1,t,a);try{var E=i(),_=M.S;if(_!==null&&_(b,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var P=q0(E,n);Bl(e,t,P,Ct(e))}else Bl(e,t,n,Ct(e))}catch(F){Bl(e,t,{then:function(){},status:"rejected",reason:F},Ct())}finally{W.p=c,M.T=p}}function K0(){}function co(e,t,a,n){if(e.tag!==5)throw Error(o(476));var i=Hd(e).queue;_d(e,i,t,A,a===null?K0:function(){return Bd(e),a(n)})}function Hd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:A,baseState:A,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:A},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Bd(e){var t=Hd(e).next.queue;Bl(e,t,{},Ct())}function fo(){return ct(ns)}function qd(){return Je().memoizedState}function Gd(){return Je().memoizedState}function Q0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ct();e=Na(a);var n=Ea(t,e,a);n!==null&&(kt(n,t,a),zl(n,t,a)),t={cache:Gi()},e.payload=t;return}t=t.return}}function X0(e,t,a){var n=Ct();a={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},nr(e)?$d(t,a):(a=Oi(e,t,a,n),a!==null&&(kt(a,e,n),Yd(a,t,n)))}function Vd(e,t,a){var n=Ct();Bl(e,t,a,n)}function Bl(e,t,a,n){var i={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(nr(e))$d(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var p=t.lastRenderedState,b=c(p,a);if(i.hasEagerState=!0,i.eagerState=b,wt(b,p))return qs(e,t,i,0),Be===null&&Bs(),!1}catch{}finally{}if(a=Oi(e,t,i,n),a!==null)return kt(a,e,n),Yd(a,t,n),!0}return!1}function mo(e,t,a,n){if(n={lane:2,revertLane:Ko(),action:n,hasEagerState:!1,eagerState:null,next:null},nr(e)){if(t)throw Error(o(479))}else t=Oi(e,a,n,2),t!==null&&kt(t,e,2)}function nr(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function $d(e,t){Ln=Fs=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Yd(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Iu(e,a)}}var lr={readContext:ct,use:Ws,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useLayoutEffect:Qe,useInsertionEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useSyncExternalStore:Qe,useId:Qe,useHostTransitionStatus:Qe,useFormState:Qe,useActionState:Qe,useOptimistic:Qe,useMemoCache:Qe,useCacheRefresh:Qe},Kd={readContext:ct,use:Ws,useCallback:function(e,t){return pt().memoizedState=[e,t===void 0?null:t],e},useContext:ct,useEffect:Td,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ar(4194308,4,Md.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ar(4194308,4,e,t)},useInsertionEffect:function(e,t){ar(4,2,e,t)},useMemo:function(e,t){var a=pt();t=t===void 0?null:t;var n=e();if(sn){ba(!0);try{e()}finally{ba(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=pt();if(a!==void 0){var i=a(t);if(sn){ba(!0);try{a(t)}finally{ba(!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=X0.bind(null,Se,e),[n.memoizedState,e]},useRef:function(e){var t=pt();return e={current:e},t.memoizedState=e},useState:function(e){e=ro(e);var t=e.queue,a=Vd.bind(null,Se,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:oo,useDeferredValue:function(e,t){var a=pt();return uo(a,e,t)},useTransition:function(){var e=ro(!1);return e=_d.bind(null,Se,e.queue,!0,!1),pt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Se,i=pt();if(Me){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),Be===null)throw Error(o(349));(Ae&124)!==0||fd(n,t,a)}i.memoizedState=a;var c={value:a,getSnapshot:t};return i.queue=c,Td(hd.bind(null,n,c,e),[e]),n.flags|=2048,Hn(9,tr(),md.bind(null,n,c,a,t),null),a},useId:function(){var e=pt(),t=Be.identifierPrefix;if(Me){var a=la,n=na;a=(n&~(1<<32-vt(n)-1)).toString(32)+a,t="«"+t+"R"+a,a=Is++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=G0++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:fo,useFormState:jd,useActionState:jd,useOptimistic:function(e){var t=pt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=mo.bind(null,Se,!0,a),a.dispatch=t,[e,t]},useMemoCache:no,useCacheRefresh:function(){return pt().memoizedState=Q0.bind(null,Se)}},Qd={readContext:ct,use:Ws,useCallback:Dd,useContext:ct,useEffect:Ad,useImperativeHandle:zd,useInsertionEffect:Rd,useLayoutEffect:Od,useMemo:Ud,useReducer:er,useRef:kd,useState:function(){return er(ia)},useDebugValue:oo,useDeferredValue:function(e,t){var a=Je();return Ld(a,Ue.memoizedState,e,t)},useTransition:function(){var e=er(ia)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:_l(e),t]},useSyncExternalStore:dd,useId:qd,useHostTransitionStatus:fo,useFormState:Nd,useActionState:Nd,useOptimistic:function(e,t){var a=Je();return xd(a,Ue,e,t)},useMemoCache:no,useCacheRefresh:Gd},Z0={readContext:ct,use:Ws,useCallback:Dd,useContext:ct,useEffect:Ad,useImperativeHandle:zd,useInsertionEffect:Rd,useLayoutEffect:Od,useMemo:Ud,useReducer:so,useRef:kd,useState:function(){return so(ia)},useDebugValue:oo,useDeferredValue:function(e,t){var a=Je();return Ue===null?uo(a,e,t):Ld(a,Ue.memoizedState,e,t)},useTransition:function(){var e=so(ia)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:_l(e),t]},useSyncExternalStore:dd,useId:qd,useHostTransitionStatus:fo,useFormState:Cd,useActionState:Cd,useOptimistic:function(e,t){var a=Je();return Ue!==null?xd(a,Ue,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:no,useCacheRefresh:Gd},Bn=null,ql=0;function sr(e){var t=ql;return ql+=1,Bn===null&&(Bn=[]),nd(Bn,e,t)}function Gl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function rr(e,t){throw t.$$typeof===S?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Xd(e){var t=e._init;return t(e._payload)}function Zd(e){function t(D,R){if(e){var L=D.deletions;L===null?(D.deletions=[R],D.flags|=16):L.push(R)}}function a(D,R){if(!e)return null;for(;R!==null;)t(D,R),R=R.sibling;return null}function n(D){for(var R=new Map;D!==null;)D.key!==null?R.set(D.key,D):R.set(D.index,D),D=D.sibling;return R}function i(D,R){return D=aa(D,R),D.index=0,D.sibling=null,D}function c(D,R,L){return D.index=L,e?(L=D.alternate,L!==null?(L=L.index,L<R?(D.flags|=67108866,R):L):(D.flags|=67108866,R)):(D.flags|=1048576,R)}function p(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function b(D,R,L,J){return R===null||R.tag!==6?(R=zi(L,D.mode,J),R.return=D,R):(R=i(R,L),R.return=D,R)}function E(D,R,L,J){var ce=L.type;return ce===j?P(D,R,L.props.children,J,L.key):R!==null&&(R.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===Y&&Xd(ce)===R.type)?(R=i(R,L.props),Gl(R,L),R.return=D,R):(R=Vs(L.type,L.key,L.props,null,D.mode,J),Gl(R,L),R.return=D,R)}function _(D,R,L,J){return R===null||R.tag!==4||R.stateNode.containerInfo!==L.containerInfo||R.stateNode.implementation!==L.implementation?(R=Di(L,D.mode,J),R.return=D,R):(R=i(R,L.children||[]),R.return=D,R)}function P(D,R,L,J,ce){return R===null||R.tag!==7?(R=Fa(L,D.mode,J,ce),R.return=D,R):(R=i(R,L),R.return=D,R)}function F(D,R,L){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=zi(""+R,D.mode,L),R.return=D,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case v:return L=Vs(R.type,R.key,R.props,null,D.mode,L),Gl(L,R),L.return=D,L;case O:return R=Di(R,D.mode,L),R.return=D,R;case Y:var J=R._init;return R=J(R._payload),F(D,R,L)}if(G(R)||ae(R))return R=Fa(R,D.mode,L,null),R.return=D,R;if(typeof R.then=="function")return F(D,sr(R),L);if(R.$$typeof===U)return F(D,Qs(D,R),L);rr(D,R)}return null}function B(D,R,L,J){var ce=R!==null?R.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return ce!==null?null:b(D,R,""+L,J);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case v:return L.key===ce?E(D,R,L,J):null;case O:return L.key===ce?_(D,R,L,J):null;case Y:return ce=L._init,L=ce(L._payload),B(D,R,L,J)}if(G(L)||ae(L))return ce!==null?null:P(D,R,L,J,null);if(typeof L.then=="function")return B(D,R,sr(L),J);if(L.$$typeof===U)return B(D,R,Qs(D,L),J);rr(D,L)}return null}function V(D,R,L,J,ce){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return D=D.get(L)||null,b(R,D,""+J,ce);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case v:return D=D.get(J.key===null?L:J.key)||null,E(R,D,J,ce);case O:return D=D.get(J.key===null?L:J.key)||null,_(R,D,J,ce);case Y:var Ee=J._init;return J=Ee(J._payload),V(D,R,L,J,ce)}if(G(J)||ae(J))return D=D.get(L)||null,P(R,D,J,ce,null);if(typeof J.then=="function")return V(D,R,L,sr(J),ce);if(J.$$typeof===U)return V(D,R,L,Qs(R,J),ce);rr(R,J)}return null}function ye(D,R,L,J){for(var ce=null,Ee=null,me=R,pe=R=0,lt=null;me!==null&&pe<L.length;pe++){me.index>pe?(lt=me,me=null):lt=me.sibling;var Re=B(D,me,L[pe],J);if(Re===null){me===null&&(me=lt);break}e&&me&&Re.alternate===null&&t(D,me),R=c(Re,R,pe),Ee===null?ce=Re:Ee.sibling=Re,Ee=Re,me=lt}if(pe===L.length)return a(D,me),Me&&Wa(D,pe),ce;if(me===null){for(;pe<L.length;pe++)me=F(D,L[pe],J),me!==null&&(R=c(me,R,pe),Ee===null?ce=me:Ee.sibling=me,Ee=me);return Me&&Wa(D,pe),ce}for(me=n(me);pe<L.length;pe++)lt=V(me,D,pe,L[pe],J),lt!==null&&(e&<.alternate!==null&&me.delete(lt.key===null?pe:lt.key),R=c(lt,R,pe),Ee===null?ce=lt:Ee.sibling=lt,Ee=lt);return e&&me.forEach(function(Va){return t(D,Va)}),Me&&Wa(D,pe),ce}function ge(D,R,L,J){if(L==null)throw Error(o(151));for(var ce=null,Ee=null,me=R,pe=R=0,lt=null,Re=L.next();me!==null&&!Re.done;pe++,Re=L.next()){me.index>pe?(lt=me,me=null):lt=me.sibling;var Va=B(D,me,Re.value,J);if(Va===null){me===null&&(me=lt);break}e&&me&&Va.alternate===null&&t(D,me),R=c(Va,R,pe),Ee===null?ce=Va:Ee.sibling=Va,Ee=Va,me=lt}if(Re.done)return a(D,me),Me&&Wa(D,pe),ce;if(me===null){for(;!Re.done;pe++,Re=L.next())Re=F(D,Re.value,J),Re!==null&&(R=c(Re,R,pe),Ee===null?ce=Re:Ee.sibling=Re,Ee=Re);return Me&&Wa(D,pe),ce}for(me=n(me);!Re.done;pe++,Re=L.next())Re=V(me,D,pe,Re.value,J),Re!==null&&(e&&Re.alternate!==null&&me.delete(Re.key===null?pe:Re.key),R=c(Re,R,pe),Ee===null?ce=Re:Ee.sibling=Re,Ee=Re);return e&&me.forEach(function(Pp){return t(D,Pp)}),Me&&Wa(D,pe),ce}function _e(D,R,L,J){if(typeof L=="object"&&L!==null&&L.type===j&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case v:e:{for(var ce=L.key;R!==null;){if(R.key===ce){if(ce=L.type,ce===j){if(R.tag===7){a(D,R.sibling),J=i(R,L.props.children),J.return=D,D=J;break e}}else if(R.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===Y&&Xd(ce)===R.type){a(D,R.sibling),J=i(R,L.props),Gl(J,L),J.return=D,D=J;break e}a(D,R);break}else t(D,R);R=R.sibling}L.type===j?(J=Fa(L.props.children,D.mode,J,L.key),J.return=D,D=J):(J=Vs(L.type,L.key,L.props,null,D.mode,J),Gl(J,L),J.return=D,D=J)}return p(D);case O:e:{for(ce=L.key;R!==null;){if(R.key===ce)if(R.tag===4&&R.stateNode.containerInfo===L.containerInfo&&R.stateNode.implementation===L.implementation){a(D,R.sibling),J=i(R,L.children||[]),J.return=D,D=J;break e}else{a(D,R);break}else t(D,R);R=R.sibling}J=Di(L,D.mode,J),J.return=D,D=J}return p(D);case Y:return ce=L._init,L=ce(L._payload),_e(D,R,L,J)}if(G(L))return ye(D,R,L,J);if(ae(L)){if(ce=ae(L),typeof ce!="function")throw Error(o(150));return L=ce.call(L),ge(D,R,L,J)}if(typeof L.then=="function")return _e(D,R,sr(L),J);if(L.$$typeof===U)return _e(D,R,Qs(D,L),J);rr(D,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,R!==null&&R.tag===6?(a(D,R.sibling),J=i(R,L),J.return=D,D=J):(a(D,R),J=zi(L,D.mode,J),J.return=D,D=J),p(D)):a(D,R)}return function(D,R,L,J){try{ql=0;var ce=_e(D,R,L,J);return Bn=null,ce}catch(me){if(me===Ol||me===Zs)throw me;var Ee=St(29,me,null,D.mode);return Ee.lanes=J,Ee.return=D,Ee}finally{}}}var qn=Zd(!0),Pd=Zd(!1),Dt=Q(null),Xt=null;function ka(e){var t=e.alternate;Z(Ie,Ie.current&1),Z(Dt,e),Xt===null&&(t===null||Un.current!==null||t.memoizedState!==null)&&(Xt=e)}function Jd(e){if(e.tag===22){if(Z(Ie,Ie.current),Z(Dt,e),Xt===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Xt=e)}}else Ta()}function Ta(){Z(Ie,Ie.current),Z(Dt,Dt.current)}function oa(e){ne(Dt),Xt===e&&(Xt=null),ne(Ie)}var Ie=Q(0);function ir(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==="$?"||nu(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 ho(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:y({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var go={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ct(),i=Na(n);i.payload=t,a!=null&&(i.callback=a),t=Ea(e,i,n),t!==null&&(kt(t,e,n),zl(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ct(),i=Na(n);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=Ea(e,i,n),t!==null&&(kt(t,e,n),zl(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ct(),n=Na(a);n.tag=2,t!=null&&(n.callback=t),t=Ea(e,n,a),t!==null&&(kt(t,e,a),zl(t,e,a))}};function Fd(e,t,a,n,i,c,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,c,p):t.prototype&&t.prototype.isPureReactComponent?!jl(a,n)||!jl(i,c):!0}function Id(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&&go.enqueueReplaceState(t,t.state,null)}function rn(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=y({},a));for(var i in e)a[i]===void 0&&(a[i]=e[i])}return a}var or=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 Wd(e){or(e)}function ef(e){console.error(e)}function tf(e){or(e)}function ur(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function af(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 po(e,t,a){return a=Na(a),a.tag=3,a.payload={element:null},a.callback=function(){ur(e,t)},a}function nf(e){return e=Na(e),e.tag=3,e}function lf(e,t,a,n){var i=a.type.getDerivedStateFromError;if(typeof i=="function"){var c=n.value;e.payload=function(){return i(c)},e.callback=function(){af(t,a,n)}}var p=a.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){af(t,a,n),typeof i!="function"&&(Da===null?Da=new Set([this]):Da.add(this));var b=n.stack;this.componentDidCatch(n.value,{componentStack:b!==null?b:""})})}function P0(e,t,a,n,i){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Tl(t,a,i,!0),a=Dt.current,a!==null){switch(a.tag){case 13:return Xt===null?qo():a.alternate===null&&Ke===0&&(Ke=3),a.flags&=-257,a.flags|=65536,a.lanes=i,n===Yi?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Vo(e,n,i)),!1;case 22:return a.flags|=65536,n===Yi?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)),Vo(e,n,i)),!1}throw Error(o(435,a.tag))}return Vo(e,n,i),qo(),!1}if(Me)return t=Dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==_i&&(e=Error(o(422),{cause:n}),kl(Rt(e,a)))):(n!==_i&&(t=Error(o(423),{cause:n}),kl(Rt(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=Rt(n,a),i=po(e.stateNode,n,i),Xi(e,i),Ke!==4&&(Ke=2)),!1;var c=Error(o(520),{cause:n});if(c=Rt(c,a),Zl===null?Zl=[c]:Zl.push(c),Ke!==4&&(Ke=2),t===null)return!0;n=Rt(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=po(a.stateNode,n,e),Xi(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Da===null||!Da.has(c))))return a.flags|=65536,i&=-i,a.lanes|=i,i=nf(i),lf(i,e,a,n),Xi(a,i),!1}a=a.return}while(a!==null);return!1}var sf=Error(o(461)),at=!1;function rt(e,t,a,n){t.child=e===null?Pd(t,null,a,n):qn(t,e.child,a,n)}function rf(e,t,a,n,i){a=a.render;var c=t.ref;if("ref"in n){var p={};for(var b in n)b!=="ref"&&(p[b]=n[b])}else p=n;return nn(t),n=Ii(e,t,a,p,c,i),b=Wi(),e!==null&&!at?(eo(e,t,i),ua(e,t,i)):(Me&&b&&Ui(t),t.flags|=1,rt(e,t,n,i),t.child)}function of(e,t,a,n,i){if(e===null){var c=a.type;return typeof c=="function"&&!Mi(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,uf(e,t,c,n,i)):(e=Vs(a.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!No(e,i)){var p=c.memoizedProps;if(a=a.compare,a=a!==null?a:jl,a(p,n)&&e.ref===t.ref)return ua(e,t,i)}return t.flags|=1,e=aa(c,n),e.ref=t.ref,e.return=t,t.child=e}function uf(e,t,a,n,i){if(e!==null){var c=e.memoizedProps;if(jl(c,n)&&e.ref===t.ref)if(at=!1,t.pendingProps=n=c,No(e,i))(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,ua(e,t,i)}return xo(e,t,a,n,i)}function cf(e,t,a){var n=t.pendingProps,i=n.children,c=e!==null?e.memoizedState:null;if(n.mode==="hidden"){if((t.flags&128)!==0){if(n=c!==null?c.baseLanes|a:a,e!==null){for(i=t.child=e.child,c=0;i!==null;)c=c|i.lanes|i.childLanes,i=i.sibling;t.childLanes=c&~n}else t.childLanes=0,t.child=null;return df(e,t,n,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xs(t,c!==null?c.cachePool:null),c!==null?od(t,c):Pi(),Jd(t);else return t.lanes=t.childLanes=536870912,df(e,t,c!==null?c.baseLanes|a:a,a)}else c!==null?(Xs(t,c.cachePool),od(t,c),Ta(),t.memoizedState=null):(e!==null&&Xs(t,null),Pi(),Ta());return rt(e,t,i,a),t.child}function df(e,t,a,n){var i=$i();return i=i===null?null:{parent:Fe._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&Xs(t,null),Pi(),Jd(t),e!==null&&Tl(e,t,n,!0),null}function cr(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 xo(e,t,a,n,i){return nn(t),a=Ii(e,t,a,n,void 0,i),n=Wi(),e!==null&&!at?(eo(e,t,i),ua(e,t,i)):(Me&&n&&Ui(t),t.flags|=1,rt(e,t,a,i),t.child)}function ff(e,t,a,n,i,c){return nn(t),t.updateQueue=null,a=cd(t,n,a,i),ud(e),n=Wi(),e!==null&&!at?(eo(e,t,c),ua(e,t,c)):(Me&&n&&Ui(t),t.flags|=1,rt(e,t,a,c),t.child)}function mf(e,t,a,n,i){if(nn(t),t.stateNode===null){var c=Rn,p=a.contextType;typeof p=="object"&&p!==null&&(c=ct(p)),c=new a(n,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=go,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=n,c.state=t.memoizedState,c.refs={},Ki(t),p=a.contextType,c.context=typeof p=="object"&&p!==null?ct(p):Rn,c.state=t.memoizedState,p=a.getDerivedStateFromProps,typeof p=="function"&&(ho(t,a,p,n),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(p=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),p!==c.state&&go.enqueueReplaceState(c,c.state,null),Ul(t,n,c,i),Dl(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){c=t.stateNode;var b=t.memoizedProps,E=rn(a,b);c.props=E;var _=c.context,P=a.contextType;p=Rn,typeof P=="object"&&P!==null&&(p=ct(P));var F=a.getDerivedStateFromProps;P=typeof F=="function"||typeof c.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,P||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(b||_!==p)&&Id(t,c,n,p),ja=!1;var B=t.memoizedState;c.state=B,Ul(t,n,c,i),Dl(),_=t.memoizedState,b||B!==_||ja?(typeof F=="function"&&(ho(t,a,F,n),_=t.memoizedState),(E=ja||Fd(t,a,E,n,B,_,p))?(P||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=_),c.props=n,c.state=_,c.context=p,n=E):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,Qi(e,t),p=t.memoizedProps,P=rn(a,p),c.props=P,F=t.pendingProps,B=c.context,_=a.contextType,E=Rn,typeof _=="object"&&_!==null&&(E=ct(_)),b=a.getDerivedStateFromProps,(_=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(p!==F||B!==E)&&Id(t,c,n,E),ja=!1,B=t.memoizedState,c.state=B,Ul(t,n,c,i),Dl();var V=t.memoizedState;p!==F||B!==V||ja||e!==null&&e.dependencies!==null&&Ks(e.dependencies)?(typeof b=="function"&&(ho(t,a,b,n),V=t.memoizedState),(P=ja||Fd(t,a,P,n,B,V,E)||e!==null&&e.dependencies!==null&&Ks(e.dependencies))?(_||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,V,E),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,V,E)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=V),c.props=n,c.state=V,c.context=E,n=P):(typeof c.componentDidUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),n=!1)}return c=n,cr(e,t),n=(t.flags&128)!==0,c||n?(c=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&n?(t.child=qn(t,e.child,null,i),t.child=qn(t,null,a,i)):rt(e,t,a,i),t.memoizedState=c.state,e=t.child):e=ua(e,t,i),e}function hf(e,t,a,n){return Cl(),t.flags|=256,rt(e,t,a,n),t.child}var yo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bo(e){return{baseLanes:e,cachePool:ed()}}function vo(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Ut),e}function gf(e,t,a){var n=t.pendingProps,i=!1,c=(t.flags&128)!==0,p;if((p=c)||(p=e!==null&&e.memoizedState===null?!1:(Ie.current&2)!==0),p&&(i=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Me){if(i?ka(t):Ta(),Me){var b=Ye,E;if(E=b){e:{for(E=b,b=Qt;E.nodeType!==8;){if(!b){b=null;break e}if(E=Gt(E.nextSibling),E===null){b=null;break e}}b=E}b!==null?(t.memoizedState={dehydrated:b,treeContext:Ia!==null?{id:na,overflow:la}:null,retryLane:536870912,hydrationErrors:null},E=St(18,null,null,0),E.stateNode=b,E.return=t,t.child=E,mt=t,Ye=null,E=!0):E=!1}E||tn(t)}if(b=t.memoizedState,b!==null&&(b=b.dehydrated,b!==null))return nu(b)?t.lanes=32:t.lanes=536870912,null;oa(t)}return b=n.children,n=n.fallback,i?(Ta(),i=t.mode,b=dr({mode:"hidden",children:b},i),n=Fa(n,i,a,null),b.return=t,n.return=t,b.sibling=n,t.child=b,i=t.child,i.memoizedState=bo(a),i.childLanes=vo(e,p,a),t.memoizedState=yo,n):(ka(t),wo(t,b))}if(E=e.memoizedState,E!==null&&(b=E.dehydrated,b!==null)){if(c)t.flags&256?(ka(t),t.flags&=-257,t=So(e,t,a)):t.memoizedState!==null?(Ta(),t.child=e.child,t.flags|=128,t=null):(Ta(),i=n.fallback,b=t.mode,n=dr({mode:"visible",children:n.children},b),i=Fa(i,b,a,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,qn(t,e.child,null,a),n=t.child,n.memoizedState=bo(a),n.childLanes=vo(e,p,a),t.memoizedState=yo,t=i);else if(ka(t),nu(b)){if(p=b.nextSibling&&b.nextSibling.dataset,p)var _=p.dgst;p=_,n=Error(o(419)),n.stack="",n.digest=p,kl({value:n,source:null,stack:null}),t=So(e,t,a)}else if(at||Tl(e,t,a,!1),p=(a&e.childLanes)!==0,at||p){if(p=Be,p!==null&&(n=a&-a,n=(n&42)!==0?1:ni(n),n=(n&(p.suspendedLanes|a))!==0?0:n,n!==0&&n!==E.retryLane))throw E.retryLane=n,An(e,n),kt(p,e,n),sf;b.data==="$?"||qo(),t=So(e,t,a)}else b.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,Ye=Gt(b.nextSibling),mt=t,Me=!0,en=null,Qt=!1,e!==null&&(Mt[zt++]=na,Mt[zt++]=la,Mt[zt++]=Ia,na=e.id,la=e.overflow,Ia=t),t=wo(t,n.children),t.flags|=4096);return t}return i?(Ta(),i=n.fallback,b=t.mode,E=e.child,_=E.sibling,n=aa(E,{mode:"hidden",children:n.children}),n.subtreeFlags=E.subtreeFlags&65011712,_!==null?i=aa(_,i):(i=Fa(i,b,a,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,b=e.child.memoizedState,b===null?b=bo(a):(E=b.cachePool,E!==null?(_=Fe._currentValue,E=E.parent!==_?{parent:_,pool:_}:E):E=ed(),b={baseLanes:b.baseLanes|a,cachePool:E}),i.memoizedState=b,i.childLanes=vo(e,p,a),t.memoizedState=yo,n):(ka(t),a=e.child,e=a.sibling,a=aa(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 wo(e,t){return t=dr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function dr(e,t){return e=St(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function So(e,t,a){return qn(t,e.child,null,a),e=wo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pf(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Bi(e.return,t,a)}function jo(e,t,a,n,i){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:i}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=n,c.tail=a,c.tailMode=i)}function xf(e,t,a){var n=t.pendingProps,i=n.revealOrder,c=n.tail;if(rt(e,t,n.children,a),n=Ie.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&&pf(e,a,t);else if(e.tag===19)pf(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(Ie,n),i){case"forwards":for(a=t.child,i=null;a!==null;)e=a.alternate,e!==null&&ir(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),jo(t,!1,i,a,c);break;case"backwards":for(a=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ir(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}jo(t,!0,a,null,c);break;case"together":jo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ua(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),za|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Tl(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=aa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=aa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function No(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ks(e)))}function J0(e,t,a){switch(t.tag){case 3:oe(t,t.stateNode.containerInfo),Sa(t,Fe,e.memoizedState.cache),Cl();break;case 27:case 5:xe(t);break;case 4:oe(t,t.stateNode.containerInfo);break;case 10:Sa(t,t.type,t.memoizedProps.value);break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(ka(t),t.flags|=128,null):(a&t.child.childLanes)!==0?gf(e,t,a):(ka(t),e=ua(e,t,a),e!==null?e.sibling:null);ka(t);break;case 19:var i=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Tl(e,t,a,!1),n=(a&t.childLanes)!==0),i){if(n)return xf(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Z(Ie,Ie.current),n)break;return null;case 22:case 23:return t.lanes=0,cf(e,t,a);case 24:Sa(t,Fe,e.memoizedState.cache)}return ua(e,t,a)}function yf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)at=!0;else{if(!No(e,a)&&(t.flags&128)===0)return at=!1,J0(e,t,a);at=(e.flags&131072)!==0}else at=!1,Me&&(t.flags&1048576)!==0&&Xc(t,Ys,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")Mi(n)?(e=rn(n,e),t.tag=1,t=mf(null,t,n,e,a)):(t.tag=0,t=xo(null,t,n,e,a));else{if(n!=null){if(i=n.$$typeof,i===$){t.tag=11,t=rf(null,t,n,e,a);break e}else if(i===X){t.tag=14,t=of(null,t,n,e,a);break e}}throw t=se(n)||n,Error(o(306,t,""))}}return t;case 0:return xo(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,i=rn(n,t.pendingProps),mf(e,t,n,i,a);case 3:e:{if(oe(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var c=t.memoizedState;i=c.element,Qi(e,t),Ul(t,n,null,a);var p=t.memoizedState;if(n=p.cache,Sa(t,Fe,n),n!==c.cache&&qi(t,[Fe],a,!0),Dl(),n=p.element,c.isDehydrated)if(c={element:n,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=hf(e,t,n,a);break e}else if(n!==i){i=Rt(Error(o(424)),t),kl(i),t=hf(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(Ye=Gt(e.firstChild),mt=t,Me=!0,en=null,Qt=!0,a=Pd(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Cl(),n===i){t=ua(e,t,a);break e}rt(e,t,n,a)}t=t.child}return t;case 26:return cr(e,t),e===null?(a=Sm(t.type,null,t.pendingProps,null))?t.memoizedState=a:Me||(a=t.type,e=t.pendingProps,n=Er(ee.current).createElement(a),n[ut]=t,n[ht]=e,ot(n,a,e),tt(n),t.stateNode=n):t.memoizedState=Sm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return xe(t),e===null&&Me&&(n=t.stateNode=bm(t.type,t.pendingProps,ee.current),mt=t,Qt=!0,i=Ye,_a(t.type)?(lu=i,Ye=Gt(n.firstChild)):Ye=i),rt(e,t,t.pendingProps.children,a),cr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Me&&((i=n=Ye)&&(n=Np(n,t.type,t.pendingProps,Qt),n!==null?(t.stateNode=n,mt=t,Ye=Gt(n.firstChild),Qt=!1,i=!0):i=!1),i||tn(t)),xe(t),i=t.type,c=t.pendingProps,p=e!==null?e.memoizedProps:null,n=c.children,eu(i,c)?n=null:p!==null&&eu(i,p)&&(t.flags|=32),t.memoizedState!==null&&(i=Ii(e,t,V0,null,null,a),ns._currentValue=i),cr(e,t),rt(e,t,n,a),t.child;case 6:return e===null&&Me&&((e=a=Ye)&&(a=Ep(a,t.pendingProps,Qt),a!==null?(t.stateNode=a,mt=t,Ye=null,e=!0):e=!1),e||tn(t)),null;case 13:return gf(e,t,a);case 4:return oe(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=qn(t,null,n,a):rt(e,t,n,a),t.child;case 11:return rf(e,t,t.type,t.pendingProps,a);case 7:return rt(e,t,t.pendingProps,a),t.child;case 8:return rt(e,t,t.pendingProps.children,a),t.child;case 12:return rt(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,Sa(t,t.type,n.value),rt(e,t,n.children,a),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,nn(t),i=ct(i),n=n(i),t.flags|=1,rt(e,t,n,a),t.child;case 14:return of(e,t,t.type,t.pendingProps,a);case 15:return uf(e,t,t.type,t.pendingProps,a);case 19:return xf(e,t,a);case 31:return n=t.pendingProps,a=t.mode,n={mode:n.mode,children:n.children},e===null?(a=dr(n,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=aa(e.child,n),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return cf(e,t,a);case 24:return nn(t),n=ct(Fe),e===null?(i=$i(),i===null&&(i=Be,c=Gi(),i.pooledCache=c,c.refCount++,c!==null&&(i.pooledCacheLanes|=a),i=c),t.memoizedState={parent:n,cache:i},Ki(t),Sa(t,Fe,i)):((e.lanes&a)!==0&&(Qi(e,t),Ul(t,null,null,a),Dl()),i=e.memoizedState,c=t.memoizedState,i.parent!==n?(i={parent:n,cache:n},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Sa(t,Fe,n)):(n=c.cache,Sa(t,Fe,n),n!==i.cache&&qi(t,[Fe],a,!0))),rt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function ca(e){e.flags|=4}function bf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!km(t)){if(t=Dt.current,t!==null&&((Ae&4194048)===Ae?Xt!==null:(Ae&62914560)!==Ae&&(Ae&536870912)===0||t!==Xt))throw Ml=Yi,td;e.flags|=8192}}function fr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ju():536870912,e.lanes|=t,Yn|=t)}function Vl(e,t){if(!Me)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 $e(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 F0(e,t,a){var n=t.pendingProps;switch(Li(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(t),null;case 1:return $e(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ra(Fe),he(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(El(t)?ca(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Jc())),$e(t),null;case 26:return a=t.memoizedState,e===null?(ca(t),a!==null?($e(t),bf(t,a)):($e(t),t.flags&=-16777217)):a?a!==e.memoizedState?(ca(t),$e(t),bf(t,a)):($e(t),t.flags&=-16777217):(e.memoizedProps!==n&&ca(t),$e(t),t.flags&=-16777217),null;case 27:Oe(t),a=ee.current;var i=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==n&&ca(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return $e(t),null}e=ie.current,El(t)?Zc(t):(e=bm(i,n,a),t.stateNode=e,ca(t))}return $e(t),null;case 5:if(Oe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&ca(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return $e(t),null}if(e=ie.current,El(t))Zc(t);else{switch(i=Er(ee.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[ut]=t,e[ht]=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(ot(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&&ca(t)}}return $e(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&ca(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=ee.current,El(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,i=mt,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}e[ut]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||fm(e.nodeValue,a)),e||tn(t)}else e=Er(e).createTextNode(n),e[ut]=t,t.stateNode=e}return $e(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=El(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[ut]=t}else Cl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),i=!1}else i=Jc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(oa(t),t):(oa(t),null)}if(oa(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 c=null;n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==i&&(n.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),fr(t,t.updateQueue),$e(t),null;case 4:return he(),e===null&&Po(t.stateNode.containerInfo),$e(t),null;case 10:return ra(t.type),$e(t),null;case 19:if(ne(Ie),i=t.memoizedState,i===null)return $e(t),null;if(n=(t.flags&128)!==0,c=i.rendering,c===null)if(n)Vl(i,!1);else{if(Ke!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=ir(e),c!==null){for(t.flags|=128,Vl(i,!1),e=c.updateQueue,t.updateQueue=e,fr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Qc(a,e),a=a.sibling;return Z(Ie,Ie.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ze()>gr&&(t.flags|=128,n=!0,Vl(i,!1),t.lanes=4194304)}else{if(!n)if(e=ir(c),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,fr(t,e),Vl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!c.alternate&&!Me)return $e(t),null}else 2*Ze()-i.renderingStartTime>gr&&a!==536870912&&(t.flags|=128,n=!0,Vl(i,!1),t.lanes=4194304);i.isBackwards?(c.sibling=t.child,t.child=c):(e=i.last,e!==null?e.sibling=c:t.child=c,i.last=c)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ze(),t.sibling=null,e=Ie.current,Z(Ie,n?e&1|2:e&1),t):($e(t),null);case 22:case 23:return oa(t),Ji(),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&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),a=t.updateQueue,a!==null&&fr(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&&ne(ln),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ra(Fe),$e(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function I0(e,t){switch(Li(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ra(Fe),he(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Oe(t),null;case 13:if(oa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Cl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(Ie),null;case 4:return he(),null;case 10:return ra(t.type),null;case 22:case 23:return oa(t),Ji(),e!==null&&ne(ln),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ra(Fe),null;case 25:return null;default:return null}}function vf(e,t){switch(Li(t),t.tag){case 3:ra(Fe),he();break;case 26:case 27:case 5:Oe(t);break;case 4:he();break;case 13:oa(t);break;case 19:ne(Ie);break;case 10:ra(t.type);break;case 22:case 23:oa(t),Ji(),e!==null&&ne(ln);break;case 24:ra(Fe)}}function $l(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 c=a.create,p=a.inst;n=c(),p.destroy=n}a=a.next}while(a!==i)}}catch(b){He(t,t.return,b)}}function Aa(e,t,a){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var c=i.next;n=c;do{if((n.tag&e)===e){var p=n.inst,b=p.destroy;if(b!==void 0){p.destroy=void 0,i=t;var E=a,_=b;try{_()}catch(P){He(i,E,P)}}}n=n.next}while(n!==c)}}catch(P){He(t,t.return,P)}}function wf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{id(t,a)}catch(n){He(e,e.return,n)}}}function Sf(e,t,a){a.props=rn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){He(e,t,n)}}function Yl(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){He(e,t,i)}}function Zt(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(i){He(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){He(e,t,i)}else a.current=null}function jf(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){He(e,e.return,i)}}function Eo(e,t,a){try{var n=e.stateNode;bp(n,e.type,a,t),n[ht]=t}catch(i){He(e,e.return,i)}}function Nf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&_a(e.type)||e.tag===4}function Co(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Nf(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&&_a(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 ko(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=Nr));else if(n!==4&&(n===27&&_a(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(ko(e,t,a),e=e.sibling;e!==null;)ko(e,t,a),e=e.sibling}function mr(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&&_a(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(mr(e,t,a),e=e.sibling;e!==null;)mr(e,t,a),e=e.sibling}function Ef(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);ot(t,n,a),t[ut]=e,t[ht]=a}catch(c){He(e,e.return,c)}}var da=!1,Xe=!1,To=!1,Cf=typeof WeakSet=="function"?WeakSet:Set,nt=null;function W0(e,t){if(e=e.containerInfo,Io=Or,e=Lc(e),Ei(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,c=n.focusNode;n=n.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var p=0,b=-1,E=-1,_=0,P=0,F=e,B=null;t:for(;;){for(var V;F!==a||i!==0&&F.nodeType!==3||(b=p+i),F!==c||n!==0&&F.nodeType!==3||(E=p+n),F.nodeType===3&&(p+=F.nodeValue.length),(V=F.firstChild)!==null;)B=F,F=V;for(;;){if(F===e)break t;if(B===a&&++_===i&&(b=p),B===c&&++P===n&&(E=p),(V=F.nextSibling)!==null)break;F=B,B=F.parentNode}F=V}a=b===-1||E===-1?null:{start:b,end:E}}else a=null}a=a||{start:0,end:0}}else a=null;for(Wo={focusedElem:e,selectionRange:a},Or=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){switch(t=nt,c=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,i=c.memoizedProps,c=c.memoizedState,n=a.stateNode;try{var ye=rn(a.type,i,a.elementType===a.type);e=n.getSnapshotBeforeUpdate(ye,c),n.__reactInternalSnapshotBeforeUpdate=e}catch(ge){He(a,a.return,ge)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)au(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":au(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,nt=e;break}nt=t.return}}function kf(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Ra(e,a),n&4&&$l(5,a);break;case 1:if(Ra(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(p){He(a,a.return,p)}else{var i=rn(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){He(a,a.return,p)}}n&64&&wf(a),n&512&&Yl(a,a.return);break;case 3:if(Ra(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{id(e,t)}catch(p){He(a,a.return,p)}}break;case 27:t===null&&n&4&&Ef(a);case 26:case 5:Ra(e,a),t===null&&n&4&&jf(a),n&512&&Yl(a,a.return);break;case 12:Ra(e,a);break;case 13:Ra(e,a),n&4&&Rf(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=op.bind(null,a),Cp(e,a))));break;case 22:if(n=a.memoizedState!==null||da,!n){t=t!==null&&t.memoizedState!==null||Xe,i=da;var c=Xe;da=n,(Xe=t)&&!c?Oa(e,a,(a.subtreeFlags&8772)!==0):Ra(e,a),da=i,Xe=c}break;case 30:break;default:Ra(e,a)}}function Tf(e){var t=e.alternate;t!==null&&(e.alternate=null,Tf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ri(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 Ge=null,xt=!1;function fa(e,t,a){for(a=a.child;a!==null;)Af(e,t,a),a=a.sibling}function Af(e,t,a){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(dl,a)}catch{}switch(a.tag){case 26:Xe||Zt(a,t),fa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Xe||Zt(a,t);var n=Ge,i=xt;_a(a.type)&&(Ge=a.stateNode,xt=!1),fa(e,t,a),Wl(a.stateNode),Ge=n,xt=i;break;case 5:Xe||Zt(a,t);case 6:if(n=Ge,i=xt,Ge=null,fa(e,t,a),Ge=n,xt=i,Ge!==null)if(xt)try{(Ge.nodeType===9?Ge.body:Ge.nodeName==="HTML"?Ge.ownerDocument.body:Ge).removeChild(a.stateNode)}catch(c){He(a,t,c)}else try{Ge.removeChild(a.stateNode)}catch(c){He(a,t,c)}break;case 18:Ge!==null&&(xt?(e=Ge,xm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),is(e)):xm(Ge,a.stateNode));break;case 4:n=Ge,i=xt,Ge=a.stateNode.containerInfo,xt=!0,fa(e,t,a),Ge=n,xt=i;break;case 0:case 11:case 14:case 15:Xe||Aa(2,a,t),Xe||Aa(4,a,t),fa(e,t,a);break;case 1:Xe||(Zt(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Sf(a,t,n)),fa(e,t,a);break;case 21:fa(e,t,a);break;case 22:Xe=(n=Xe)||a.memoizedState!==null,fa(e,t,a),Xe=n;break;default:fa(e,t,a)}}function Rf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{is(e)}catch(a){He(t,t.return,a)}}function ep(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Cf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Cf),t;default:throw Error(o(435,e.tag))}}function Ao(e,t){var a=ep(e);t.forEach(function(n){var i=up.bind(null,e,n);a.has(n)||(a.add(n),n.then(i,i))})}function jt(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n],c=e,p=t,b=p;e:for(;b!==null;){switch(b.tag){case 27:if(_a(b.type)){Ge=b.stateNode,xt=!1;break e}break;case 5:Ge=b.stateNode,xt=!1;break e;case 3:case 4:Ge=b.stateNode.containerInfo,xt=!0;break e}b=b.return}if(Ge===null)throw Error(o(160));Af(c,p,i),Ge=null,xt=!1,c=i.alternate,c!==null&&(c.return=null),i.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Of(t,e),t=t.sibling}var qt=null;function Of(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:jt(t,e),Nt(e),n&4&&(Aa(3,e,e.return),$l(3,e),Aa(5,e,e.return));break;case 1:jt(t,e),Nt(e),n&512&&(Xe||a===null||Zt(a,a.return)),n&64&&da&&(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=qt;if(jt(t,e),Nt(e),n&512&&(Xe||a===null||Zt(a,a.return)),n&4){var c=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":c=i.getElementsByTagName("title")[0],(!c||c[hl]||c[ut]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=i.createElement(n),i.head.insertBefore(c,i.querySelector("head > title"))),ot(c,n,a),c[ut]=e,tt(c),n=c;break e;case"link":var p=Em("link","href",i).get(n+(a.href||""));if(p){for(var b=0;b<p.length;b++)if(c=p[b],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){p.splice(b,1);break t}}c=i.createElement(n),ot(c,n,a),i.head.appendChild(c);break;case"meta":if(p=Em("meta","content",i).get(n+(a.content||""))){for(b=0;b<p.length;b++)if(c=p[b],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){p.splice(b,1);break t}}c=i.createElement(n),ot(c,n,a),i.head.appendChild(c);break;default:throw Error(o(468,n))}c[ut]=e,tt(c),n=c}e.stateNode=n}else Cm(i,e.type,e.stateNode);else e.stateNode=Nm(i,n,e.memoizedProps);else c!==n?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,n===null?Cm(i,e.type,e.stateNode):Nm(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Eo(e,e.memoizedProps,a.memoizedProps)}break;case 27:jt(t,e),Nt(e),n&512&&(Xe||a===null||Zt(a,a.return)),a!==null&&n&4&&Eo(e,e.memoizedProps,a.memoizedProps);break;case 5:if(jt(t,e),Nt(e),n&512&&(Xe||a===null||Zt(a,a.return)),e.flags&32){i=e.stateNode;try{Sn(i,"")}catch(V){He(e,e.return,V)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,Eo(e,i,a!==null?a.memoizedProps:i)),n&1024&&(To=!0);break;case 6:if(jt(t,e),Nt(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(V){He(e,e.return,V)}}break;case 3:if(Tr=null,i=qt,qt=Cr(t.containerInfo),jt(t,e),qt=i,Nt(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{is(t.containerInfo)}catch(V){He(e,e.return,V)}To&&(To=!1,Mf(e));break;case 4:n=qt,qt=Cr(e.stateNode.containerInfo),jt(t,e),Nt(e),qt=n;break;case 12:jt(t,e),Nt(e);break;case 13:jt(t,e),Nt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Uo=Ze()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Ao(e,n)));break;case 22:i=e.memoizedState!==null;var E=a!==null&&a.memoizedState!==null,_=da,P=Xe;if(da=_||i,Xe=P||E,jt(t,e),Xe=P,da=_,Nt(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||E||da||Xe||on(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){E=a=t;try{if(c=E.stateNode,i)p=c.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{b=E.stateNode;var F=E.memoizedProps.style,B=F!=null&&F.hasOwnProperty("display")?F.display:null;b.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(V){He(E,E.return,V)}}}else if(t.tag===6){if(a===null){E=t;try{E.stateNode.nodeValue=i?"":E.memoizedProps}catch(V){He(E,E.return,V)}}}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,Ao(e,a))));break;case 19:jt(t,e),Nt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Ao(e,n)));break;case 30:break;case 21:break;default:jt(t,e),Nt(e)}}function Nt(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Nf(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var i=a.stateNode,c=Co(e);mr(e,c,i);break;case 5:var p=a.stateNode;a.flags&32&&(Sn(p,""),a.flags&=-33);var b=Co(e);mr(e,b,p);break;case 3:case 4:var E=a.stateNode.containerInfo,_=Co(e);ko(e,_,E);break;default:throw Error(o(161))}}catch(P){He(e,e.return,P)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ra(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)kf(e,t.alternate,t),t=t.sibling}function on(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Aa(4,t,t.return),on(t);break;case 1:Zt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Sf(t,t.return,a),on(t);break;case 27:Wl(t.stateNode);case 26:case 5:Zt(t,t.return),on(t);break;case 22:t.memoizedState===null&&on(t);break;case 30:on(t);break;default:on(t)}e=e.sibling}}function Oa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,c=t,p=c.flags;switch(c.tag){case 0:case 11:case 15:Oa(i,c,a),$l(4,c);break;case 1:if(Oa(i,c,a),n=c,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(_){He(n,n.return,_)}if(n=c,i=n.updateQueue,i!==null){var b=n.stateNode;try{var E=i.shared.hiddenCallbacks;if(E!==null)for(i.shared.hiddenCallbacks=null,i=0;i<E.length;i++)rd(E[i],b)}catch(_){He(n,n.return,_)}}a&&p&64&&wf(c),Yl(c,c.return);break;case 27:Ef(c);case 26:case 5:Oa(i,c,a),a&&n===null&&p&4&&jf(c),Yl(c,c.return);break;case 12:Oa(i,c,a);break;case 13:Oa(i,c,a),a&&p&4&&Rf(i,c);break;case 22:c.memoizedState===null&&Oa(i,c,a),Yl(c,c.return);break;case 30:break;default:Oa(i,c,a)}t=t.sibling}}function Ro(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&&Al(a))}function Oo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Al(e))}function Pt(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)zf(e,t,a,n),t=t.sibling}function zf(e,t,a,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Pt(e,t,a,n),i&2048&&$l(9,t);break;case 1:Pt(e,t,a,n);break;case 3:Pt(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&&Al(e)));break;case 12:if(i&2048){Pt(e,t,a,n),e=t.stateNode;try{var c=t.memoizedProps,p=c.id,b=c.onPostCommit;typeof b=="function"&&b(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){He(t,t.return,E)}}else Pt(e,t,a,n);break;case 13:Pt(e,t,a,n);break;case 23:break;case 22:c=t.stateNode,p=t.alternate,t.memoizedState!==null?c._visibility&2?Pt(e,t,a,n):Kl(e,t):c._visibility&2?Pt(e,t,a,n):(c._visibility|=2,Gn(e,t,a,n,(t.subtreeFlags&10256)!==0)),i&2048&&Ro(p,t);break;case 24:Pt(e,t,a,n),i&2048&&Oo(t.alternate,t);break;default:Pt(e,t,a,n)}}function Gn(e,t,a,n,i){for(i=i&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var c=e,p=t,b=a,E=n,_=p.flags;switch(p.tag){case 0:case 11:case 15:Gn(c,p,b,E,i),$l(8,p);break;case 23:break;case 22:var P=p.stateNode;p.memoizedState!==null?P._visibility&2?Gn(c,p,b,E,i):Kl(c,p):(P._visibility|=2,Gn(c,p,b,E,i)),i&&_&2048&&Ro(p.alternate,p);break;case 24:Gn(c,p,b,E,i),i&&_&2048&&Oo(p.alternate,p);break;default:Gn(c,p,b,E,i)}t=t.sibling}}function Kl(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:Kl(a,n),i&2048&&Ro(n.alternate,n);break;case 24:Kl(a,n),i&2048&&Oo(n.alternate,n);break;default:Kl(a,n)}t=t.sibling}}var Ql=8192;function Vn(e){if(e.subtreeFlags&Ql)for(e=e.child;e!==null;)Df(e),e=e.sibling}function Df(e){switch(e.tag){case 26:Vn(e),e.flags&Ql&&e.memoizedState!==null&&Bp(qt,e.memoizedState,e.memoizedProps);break;case 5:Vn(e);break;case 3:case 4:var t=qt;qt=Cr(e.stateNode.containerInfo),Vn(e),qt=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Ql,Ql=16777216,Vn(e),Ql=t):Vn(e));break;default:Vn(e)}}function Uf(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 Xl(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];nt=n,_f(n,e)}Uf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Lf(e),e=e.sibling}function Lf(e){switch(e.tag){case 0:case 11:case 15:Xl(e),e.flags&2048&&Aa(9,e,e.return);break;case 3:Xl(e);break;case 12:Xl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,hr(e)):Xl(e);break;default:Xl(e)}}function hr(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];nt=n,_f(n,e)}Uf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Aa(8,t,t.return),hr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,hr(t));break;default:hr(t)}e=e.sibling}}function _f(e,t){for(;nt!==null;){var a=nt;switch(a.tag){case 0:case 11:case 15:Aa(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:Al(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,nt=n;else e:for(a=e;nt!==null;){n=nt;var i=n.sibling,c=n.return;if(Tf(n),n===a){nt=null;break e}if(i!==null){i.return=c,nt=i;break e}nt=c}}}var tp={getCacheForType:function(e){var t=ct(Fe),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},ap=typeof WeakMap=="function"?WeakMap:Map,ze=0,Be=null,Ce=null,Ae=0,De=0,Et=null,Ma=!1,$n=!1,Mo=!1,ma=0,Ke=0,za=0,un=0,zo=0,Ut=0,Yn=0,Zl=null,yt=null,Do=!1,Uo=0,gr=1/0,pr=null,Da=null,it=0,Ua=null,Kn=null,Qn=0,Lo=0,_o=null,Hf=null,Pl=0,Ho=null;function Ct(){if((ze&2)!==0&&Ae!==0)return Ae&-Ae;if(M.T!==null){var e=zn;return e!==0?e:Ko()}return Wu()}function Bf(){Ut===0&&(Ut=(Ae&536870912)===0||Me?Pu():536870912);var e=Dt.current;return e!==null&&(e.flags|=32),Ut}function kt(e,t,a){(e===Be&&(De===2||De===9)||e.cancelPendingCommit!==null)&&(Xn(e,0),La(e,Ae,Ut,!1)),ml(e,a),((ze&2)===0||e!==Be)&&(e===Be&&((ze&2)===0&&(un|=a),Ke===4&&La(e,Ae,Ut,!1)),Jt(e))}function qf(e,t,a){if((ze&6)!==0)throw Error(o(327));var n=!a&&(t&124)===0&&(t&e.expiredLanes)===0||fl(e,t),i=n?sp(e,t):Go(e,t,!0),c=n;do{if(i===0){$n&&!n&&La(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!np(a)){i=Go(e,t,!1),c=!1;continue}if(i===2){if(c=t,e.errorRecoveryDisabledLanes&c)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var b=e;i=Zl;var E=b.current.memoizedState.isDehydrated;if(E&&(Xn(b,p).flags|=256),p=Go(b,p,!1),p!==2){if(Mo&&!E){b.errorRecoveryDisabledLanes|=c,un|=c,i=4;break e}c=yt,yt=i,c!==null&&(yt===null?yt=c:yt.push.apply(yt,c))}i=p}if(c=!1,i!==2)continue}}if(i===1){Xn(e,0),La(e,t,0,!0);break}e:{switch(n=e,c=i,c){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:La(n,t,Ut,!Ma);break e;case 2:yt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=Uo+300-Ze(),10<i)){if(La(n,t,Ut,!Ma),ks(n,0,!0)!==0)break e;n.timeoutHandle=gm(Gf.bind(null,n,a,yt,pr,Do,t,Ut,un,Yn,Ma,c,2,-0,0),i);break e}Gf(n,a,yt,pr,Do,t,Ut,un,Yn,Ma,c,0,-0,0)}}break}while(!0);Jt(e)}function Gf(e,t,a,n,i,c,p,b,E,_,P,F,B,V){if(e.timeoutHandle=-1,F=t.subtreeFlags,(F&8192||(F&16785408)===16785408)&&(as={stylesheets:null,count:0,unsuspend:Hp},Df(t),F=qp(),F!==null)){e.cancelPendingCommit=F(Zf.bind(null,e,t,c,a,n,i,p,b,E,P,1,B,V)),La(e,c,p,!_);return}Zf(e,t,c,a,n,i,p,b,E)}function np(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],c=i.getSnapshot;i=i.value;try{if(!wt(c(),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 La(e,t,a,n){t&=~zo,t&=~un,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var c=31-vt(i),p=1<<c;n[c]=-1,i&=~p}a!==0&&Fu(e,a,t)}function xr(){return(ze&6)===0?(Jl(0),!1):!0}function Bo(){if(Ce!==null){if(De===0)var e=Ce.return;else e=Ce,sa=an=null,to(e),Bn=null,ql=0,e=Ce;for(;e!==null;)vf(e.alternate,e),e=e.return;Ce=null}}function Xn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,wp(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Bo(),Be=e,Ce=a=aa(e.current,null),Ae=t,De=0,Et=null,Ma=!1,$n=fl(e,t),Mo=!1,Yn=Ut=zo=un=za=Ke=0,yt=Zl=null,Do=!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-vt(n),c=1<<i;t|=e[i],n&=~c}return ma=t,Bs(),a}function Vf(e,t){Se=null,M.H=lr,t===Ol||t===Zs?(t=ld(),De=3):t===td?(t=ld(),De=4):De=t===sf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Et=t,Ce===null&&(Ke=1,ur(e,Rt(t,e.current)))}function $f(){var e=M.H;return M.H=lr,e===null?lr:e}function Yf(){var e=M.A;return M.A=tp,e}function qo(){Ke=4,Ma||(Ae&4194048)!==Ae&&Dt.current!==null||($n=!0),(za&134217727)===0&&(un&134217727)===0||Be===null||La(Be,Ae,Ut,!1)}function Go(e,t,a){var n=ze;ze|=2;var i=$f(),c=Yf();(Be!==e||Ae!==t)&&(pr=null,Xn(e,t)),t=!1;var p=Ke;e:do try{if(De!==0&&Ce!==null){var b=Ce,E=Et;switch(De){case 8:Bo(),p=6;break e;case 3:case 2:case 9:case 6:Dt.current===null&&(t=!0);var _=De;if(De=0,Et=null,Zn(e,b,E,_),a&&$n){p=0;break e}break;default:_=De,De=0,Et=null,Zn(e,b,E,_)}}lp(),p=Ke;break}catch(P){Vf(e,P)}while(!0);return t&&e.shellSuspendCounter++,sa=an=null,ze=n,M.H=i,M.A=c,Ce===null&&(Be=null,Ae=0,Bs()),p}function lp(){for(;Ce!==null;)Kf(Ce)}function sp(e,t){var a=ze;ze|=2;var n=$f(),i=Yf();Be!==e||Ae!==t?(pr=null,gr=Ze()+500,Xn(e,t)):$n=fl(e,t);e:do try{if(De!==0&&Ce!==null){t=Ce;var c=Et;t:switch(De){case 1:De=0,Et=null,Zn(e,t,c,1);break;case 2:case 9:if(ad(c)){De=0,Et=null,Qf(t);break}t=function(){De!==2&&De!==9||Be!==e||(De=7),Jt(e)},c.then(t,t);break e;case 3:De=7;break e;case 4:De=5;break e;case 7:ad(c)?(De=0,Et=null,Qf(t)):(De=0,Et=null,Zn(e,t,c,7));break;case 5:var p=null;switch(Ce.tag){case 26:p=Ce.memoizedState;case 5:case 27:var b=Ce;if(!p||km(p)){De=0,Et=null;var E=b.sibling;if(E!==null)Ce=E;else{var _=b.return;_!==null?(Ce=_,yr(_)):Ce=null}break t}}De=0,Et=null,Zn(e,t,c,5);break;case 6:De=0,Et=null,Zn(e,t,c,6);break;case 8:Bo(),Ke=6;break e;default:throw Error(o(462))}}rp();break}catch(P){Vf(e,P)}while(!0);return sa=an=null,M.H=n,M.A=i,ze=a,Ce!==null?0:(Be=null,Ae=0,Bs(),Ke)}function rp(){for(;Ce!==null&&!hn();)Kf(Ce)}function Kf(e){var t=yf(e.alternate,e,ma);e.memoizedProps=e.pendingProps,t===null?yr(e):Ce=t}function Qf(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=ff(a,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=ff(a,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:to(t);default:vf(a,t),t=Ce=Qc(t,ma),t=yf(a,t,ma)}e.memoizedProps=e.pendingProps,t===null?yr(e):Ce=t}function Zn(e,t,a,n){sa=an=null,to(t),Bn=null,ql=0;var i=t.return;try{if(P0(e,i,t,a,Ae)){Ke=1,ur(e,Rt(a,e.current)),Ce=null;return}}catch(c){if(i!==null)throw Ce=i,c;Ke=1,ur(e,Rt(a,e.current)),Ce=null;return}t.flags&32768?(Me||n===1?e=!0:$n||(Ae&536870912)!==0?e=!1:(Ma=e=!0,(n===2||n===9||n===3||n===6)&&(n=Dt.current,n!==null&&n.tag===13&&(n.flags|=16384))),Xf(t,e)):yr(t)}function yr(e){var t=e;do{if((t.flags&32768)!==0){Xf(t,Ma);return}e=t.return;var a=F0(t.alternate,t,ma);if(a!==null){Ce=a;return}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);Ke===0&&(Ke=5)}function Xf(e,t){do{var a=I0(e.alternate,e);if(a!==null){a.flags&=32767,Ce=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ce=e;return}Ce=e=a}while(e!==null);Ke=6,Ce=null}function Zf(e,t,a,n,i,c,p,b,E){e.cancelPendingCommit=null;do br();while(it!==0);if((ze&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(c=t.lanes|t.childLanes,c|=Ri,Hg(e,a,c,p,b,E),e===Be&&(Ce=Be=null,Ae=0),Kn=t,Ua=e,Qn=a,Lo=c,_o=i,Hf=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,cp(ya,function(){return Wf(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=M.T,M.T=null,i=W.p,W.p=2,p=ze,ze|=4;try{W0(e,t,a)}finally{ze=p,W.p=i,M.T=n}}it=1,Pf(),Jf(),Ff()}}function Pf(){if(it===1){it=0;var e=Ua,t=Kn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null;var n=W.p;W.p=2;var i=ze;ze|=4;try{Of(t,e);var c=Wo,p=Lc(e.containerInfo),b=c.focusedElem,E=c.selectionRange;if(p!==b&&b&&b.ownerDocument&&Uc(b.ownerDocument.documentElement,b)){if(E!==null&&Ei(b)){var _=E.start,P=E.end;if(P===void 0&&(P=_),"selectionStart"in b)b.selectionStart=_,b.selectionEnd=Math.min(P,b.value.length);else{var F=b.ownerDocument||document,B=F&&F.defaultView||window;if(B.getSelection){var V=B.getSelection(),ye=b.textContent.length,ge=Math.min(E.start,ye),_e=E.end===void 0?ge:Math.min(E.end,ye);!V.extend&&ge>_e&&(p=_e,_e=ge,ge=p);var D=Dc(b,ge),R=Dc(b,_e);if(D&&R&&(V.rangeCount!==1||V.anchorNode!==D.node||V.anchorOffset!==D.offset||V.focusNode!==R.node||V.focusOffset!==R.offset)){var L=F.createRange();L.setStart(D.node,D.offset),V.removeAllRanges(),ge>_e?(V.addRange(L),V.extend(R.node,R.offset)):(L.setEnd(R.node,R.offset),V.addRange(L))}}}}for(F=[],V=b;V=V.parentNode;)V.nodeType===1&&F.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<F.length;b++){var J=F[b];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}Or=!!Io,Wo=Io=null}finally{ze=i,W.p=n,M.T=a}}e.current=t,it=2}}function Jf(){if(it===2){it=0;var e=Ua,t=Kn,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var n=W.p;W.p=2;var i=ze;ze|=4;try{kf(e,t.alternate,t)}finally{ze=i,W.p=n,M.T=a}}it=3}}function Ff(){if(it===4||it===3){it=0,st();var e=Ua,t=Kn,a=Qn,n=Hf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?it=5:(it=0,Kn=Ua=null,If(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Da=null),li(a),t=t.stateNode,bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(dl,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=M.T,i=W.p,W.p=2,M.T=null;try{for(var c=e.onRecoverableError,p=0;p<n.length;p++){var b=n[p];c(b.value,{componentStack:b.stack})}}finally{M.T=t,W.p=i}}(Qn&3)!==0&&br(),Jt(e),i=e.pendingLanes,(a&4194090)!==0&&(i&42)!==0?e===Ho?Pl++:(Pl=0,Ho=e):Pl=0,Jl(0)}}function If(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Al(t)))}function br(e){return Pf(),Jf(),Ff(),Wf()}function Wf(){if(it!==5)return!1;var e=Ua,t=Lo;Lo=0;var a=li(Qn),n=M.T,i=W.p;try{W.p=32>a?32:a,M.T=null,a=_o,_o=null;var c=Ua,p=Qn;if(it=0,Kn=Ua=null,Qn=0,(ze&6)!==0)throw Error(o(331));var b=ze;if(ze|=4,Lf(c.current),zf(c,c.current,p,a),ze=b,Jl(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(dl,c)}catch{}return!0}finally{W.p=i,M.T=n,If(e,t)}}function em(e,t,a){t=Rt(a,t),t=po(e.stateNode,t,2),e=Ea(e,t,2),e!==null&&(ml(e,2),Jt(e))}function He(e,t,a){if(e.tag===3)em(e,e,a);else for(;t!==null;){if(t.tag===3){em(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Da===null||!Da.has(n))){e=Rt(a,e),a=nf(2),n=Ea(t,a,2),n!==null&&(lf(a,n,t,e),ml(n,2),Jt(n));break}}t=t.return}}function Vo(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new ap;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)||(Mo=!0,i.add(a),e=ip.bind(null,e,t,a),t.then(e,e))}function ip(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Be===e&&(Ae&a)===a&&(Ke===4||Ke===3&&(Ae&62914560)===Ae&&300>Ze()-Uo?(ze&2)===0&&Xn(e,0):zo|=a,Yn===Ae&&(Yn=0)),Jt(e)}function tm(e,t){t===0&&(t=Ju()),e=An(e,t),e!==null&&(ml(e,t),Jt(e))}function op(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),tm(e,a)}function up(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),tm(e,a)}function cp(e,t){return Yt(e,t)}var vr=null,Pn=null,$o=!1,wr=!1,Yo=!1,cn=0;function Jt(e){e!==Pn&&e.next===null&&(Pn===null?vr=Pn=e:Pn=Pn.next=e),wr=!0,$o||($o=!0,fp())}function Jl(e,t){if(!Yo&&wr){Yo=!0;do for(var a=!1,n=vr;n!==null;){if(e!==0){var i=n.pendingLanes;if(i===0)var c=0;else{var p=n.suspendedLanes,b=n.pingedLanes;c=(1<<31-vt(42|e)+1)-1,c&=i&~(p&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,sm(n,c))}else c=Ae,c=ks(n,n===Be?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(c&3)===0||fl(n,c)||(a=!0,sm(n,c));n=n.next}while(a);Yo=!1}}function dp(){am()}function am(){wr=$o=!1;var e=0;cn!==0&&(vp()&&(e=cn),cn=0);for(var t=Ze(),a=null,n=vr;n!==null;){var i=n.next,c=nm(n,t);c===0?(n.next=null,a===null?vr=i:a.next=i,i===null&&(Pn=a)):(a=n,(e!==0||(c&3)!==0)&&(wr=!0)),n=i}Jl(e)}function nm(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var p=31-vt(c),b=1<<p,E=i[p];E===-1?((b&a)===0||(b&n)!==0)&&(i[p]=_g(b,t)):E<=t&&(e.expiredLanes|=b),c&=~b}if(t=Be,a=Ae,a=ks(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(De===2||De===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Kt(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||fl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Kt(n),li(a)){case 2:case 8:a=Ns;break;case 32:a=ya;break;case 268435456:a=Zu;break;default:a=ya}return n=lm.bind(null,e),a=Yt(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Kt(n),e.callbackPriority=2,e.callbackNode=null,2}function lm(e,t){if(it!==0&&it!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(br()&&e.callbackNode!==a)return null;var n=Ae;return n=ks(e,e===Be?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(qf(e,n,t),nm(e,Ze()),e.callbackNode!=null&&e.callbackNode===a?lm.bind(null,e):null)}function sm(e,t){if(br())return null;qf(e,t,!0)}function fp(){Sp(function(){(ze&6)!==0?Yt(cl,dp):am()})}function Ko(){return cn===0&&(cn=Pu()),cn}function rm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ms(""+e)}function im(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 mp(e,t,a,n,i){if(t==="submit"&&a&&a.stateNode===i){var c=rm((i[ht]||null).action),p=n.submitter;p&&(t=(t=p[ht]||null)?rm(t.formAction):p.getAttribute("formAction"),t!==null&&(c=t,p=null));var b=new Ls("action","action",null,n,i);e.push({event:b,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(cn!==0){var E=p?im(i,p):new FormData(i);co(a,{pending:!0,data:E,method:i.method,action:c},null,E)}}else typeof c=="function"&&(b.preventDefault(),E=p?im(i,p):new FormData(i),co(a,{pending:!0,data:E,method:i.method,action:c},c,E))},currentTarget:i}]})}}for(var Qo=0;Qo<Ai.length;Qo++){var Xo=Ai[Qo],hp=Xo.toLowerCase(),gp=Xo[0].toUpperCase()+Xo.slice(1);Bt(hp,"on"+gp)}Bt(Bc,"onAnimationEnd"),Bt(qc,"onAnimationIteration"),Bt(Gc,"onAnimationStart"),Bt("dblclick","onDoubleClick"),Bt("focusin","onFocus"),Bt("focusout","onBlur"),Bt(M0,"onTransitionRun"),Bt(z0,"onTransitionStart"),Bt(D0,"onTransitionCancel"),Bt(Vc,"onTransitionEnd"),bn("onMouseEnter",["mouseout","mouseover"]),bn("onMouseLeave",["mouseout","mouseover"]),bn("onPointerEnter",["pointerout","pointerover"]),bn("onPointerLeave",["pointerout","pointerover"]),Xa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fl="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(" "),pp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fl));function om(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 c=void 0;if(t)for(var p=n.length-1;0<=p;p--){var b=n[p],E=b.instance,_=b.currentTarget;if(b=b.listener,E!==c&&i.isPropagationStopped())break e;c=b,i.currentTarget=_;try{c(i)}catch(P){or(P)}i.currentTarget=null,c=E}else for(p=0;p<n.length;p++){if(b=n[p],E=b.instance,_=b.currentTarget,b=b.listener,E!==c&&i.isPropagationStopped())break e;c=b,i.currentTarget=_;try{c(i)}catch(P){or(P)}i.currentTarget=null,c=E}}}}function ke(e,t){var a=t[si];a===void 0&&(a=t[si]=new Set);var n=e+"__bubble";a.has(n)||(um(t,e,2,!1),a.add(n))}function Zo(e,t,a){var n=0;t&&(n|=4),um(a,e,n,t)}var Sr="_reactListening"+Math.random().toString(36).slice(2);function Po(e){if(!e[Sr]){e[Sr]=!0,tc.forEach(function(a){a!=="selectionchange"&&(pp.has(a)||Zo(a,!1,e),Zo(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sr]||(t[Sr]=!0,Zo("selectionchange",!1,t))}}function um(e,t,a,n){switch(zm(t)){case 2:var i=$p;break;case 8:i=Yp;break;default:i=uu}a=i.bind(null,t,a,e),i=void 0,!pi||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 Jo(e,t,a,n,i){var c=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var p=n.tag;if(p===3||p===4){var b=n.stateNode.containerInfo;if(b===i)break;if(p===4)for(p=n.return;p!==null;){var E=p.tag;if((E===3||E===4)&&p.stateNode.containerInfo===i)return;p=p.return}for(;b!==null;){if(p=pn(b),p===null)return;if(E=p.tag,E===5||E===6||E===26||E===27){n=c=p;continue e}b=b.parentNode}}n=n.return}gc(function(){var _=c,P=hi(a),F=[];e:{var B=$c.get(e);if(B!==void 0){var V=Ls,ye=e;switch(e){case"keypress":if(Ds(a)===0)break e;case"keydown":case"keyup":V=c0;break;case"focusin":ye="focus",V=vi;break;case"focusout":ye="blur",V=vi;break;case"beforeblur":case"afterblur":V=vi;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":V=yc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=Ig;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=m0;break;case Bc:case qc:case Gc:V=t0;break;case Vc:V=g0;break;case"scroll":case"scrollend":V=Jg;break;case"wheel":V=x0;break;case"copy":case"cut":case"paste":V=n0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=vc;break;case"toggle":case"beforetoggle":V=b0}var ge=(t&4)!==0,_e=!ge&&(e==="scroll"||e==="scrollend"),D=ge?B!==null?B+"Capture":null:B;ge=[];for(var R=_,L;R!==null;){var J=R;if(L=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||L===null||D===null||(J=pl(R,D),J!=null&&ge.push(Il(R,J,L))),_e)break;R=R.return}0<ge.length&&(B=new V(B,ye,null,a,P),F.push({event:B,listeners:ge}))}}if((t&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",B&&a!==mi&&(ye=a.relatedTarget||a.fromElement)&&(pn(ye)||ye[gn]))break e;if((V||B)&&(B=P.window===P?P:(B=P.ownerDocument)?B.defaultView||B.parentWindow:window,V?(ye=a.relatedTarget||a.toElement,V=_,ye=ye?pn(ye):null,ye!==null&&(_e=f(ye),ge=ye.tag,ye!==_e||ge!==5&&ge!==27&&ge!==6)&&(ye=null)):(V=null,ye=_),V!==ye)){if(ge=yc,J="onMouseLeave",D="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(ge=vc,J="onPointerLeave",D="onPointerEnter",R="pointer"),_e=V==null?B:gl(V),L=ye==null?B:gl(ye),B=new ge(J,R+"leave",V,a,P),B.target=_e,B.relatedTarget=L,J=null,pn(P)===_&&(ge=new ge(D,R+"enter",ye,a,P),ge.target=L,ge.relatedTarget=_e,J=ge),_e=J,V&&ye)t:{for(ge=V,D=ye,R=0,L=ge;L;L=Jn(L))R++;for(L=0,J=D;J;J=Jn(J))L++;for(;0<R-L;)ge=Jn(ge),R--;for(;0<L-R;)D=Jn(D),L--;for(;R--;){if(ge===D||D!==null&&ge===D.alternate)break t;ge=Jn(ge),D=Jn(D)}ge=null}else ge=null;V!==null&&cm(F,B,V,ge,!1),ye!==null&&_e!==null&&cm(F,_e,ye,ge,!0)}}e:{if(B=_?gl(_):window,V=B.nodeName&&B.nodeName.toLowerCase(),V==="select"||V==="input"&&B.type==="file")var ce=Tc;else if(Cc(B))if(Ac)ce=A0;else{ce=k0;var Ee=C0}else V=B.nodeName,!V||V.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?_&&fi(_.elementType)&&(ce=Tc):ce=T0;if(ce&&(ce=ce(e,_))){kc(F,ce,a,P);break e}Ee&&Ee(e,B,_),e==="focusout"&&_&&B.type==="number"&&_.memoizedProps.value!=null&&di(B,"number",B.value)}switch(Ee=_?gl(_):window,e){case"focusin":(Cc(Ee)||Ee.contentEditable==="true")&&(Cn=Ee,Ci=_,Nl=null);break;case"focusout":Nl=Ci=Cn=null;break;case"mousedown":ki=!0;break;case"contextmenu":case"mouseup":case"dragend":ki=!1,_c(F,a,P);break;case"selectionchange":if(O0)break;case"keydown":case"keyup":_c(F,a,P)}var me;if(Si)e:{switch(e){case"compositionstart":var pe="onCompositionStart";break e;case"compositionend":pe="onCompositionEnd";break e;case"compositionupdate":pe="onCompositionUpdate";break e}pe=void 0}else En?Nc(e,a)&&(pe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(pe="onCompositionStart");pe&&(wc&&a.locale!=="ko"&&(En||pe!=="onCompositionStart"?pe==="onCompositionEnd"&&En&&(me=pc()):(wa=P,xi="value"in wa?wa.value:wa.textContent,En=!0)),Ee=jr(_,pe),0<Ee.length&&(pe=new bc(pe,e,null,a,P),F.push({event:pe,listeners:Ee}),me?pe.data=me:(me=Ec(a),me!==null&&(pe.data=me)))),(me=w0?S0(e,a):j0(e,a))&&(pe=jr(_,"onBeforeInput"),0<pe.length&&(Ee=new bc("onBeforeInput","beforeinput",null,a,P),F.push({event:Ee,listeners:pe}),Ee.data=me)),mp(F,e,_,a,P)}om(F,t)})}function Il(e,t,a){return{instance:e,listener:t,currentTarget:a}}function jr(e,t){for(var a=t+"Capture",n=[];e!==null;){var i=e,c=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||c===null||(i=pl(e,a),i!=null&&n.unshift(Il(e,i,c)),i=pl(e,t),i!=null&&n.push(Il(e,i,c))),e.tag===3)return n;e=e.return}return[]}function Jn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function cm(e,t,a,n,i){for(var c=t._reactName,p=[];a!==null&&a!==n;){var b=a,E=b.alternate,_=b.stateNode;if(b=b.tag,E!==null&&E===n)break;b!==5&&b!==26&&b!==27||_===null||(E=_,i?(_=pl(a,c),_!=null&&p.unshift(Il(a,_,E))):i||(_=pl(a,c),_!=null&&p.push(Il(a,_,E)))),a=a.return}p.length!==0&&e.push({event:t,listeners:p})}var xp=/\r\n?/g,yp=/\u0000|\uFFFD/g;function dm(e){return(typeof e=="string"?e:""+e).replace(xp,`
|
|
49
|
-
`).replace(yp,"")}function fm(e,t){return t=dm(t),dm(e)===t}function Nr(){}function Le(e,t,a,n,i,c){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Sn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Sn(e,""+n);break;case"className":As(e,"class",n);break;case"tabIndex":As(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":As(e,a,n);break;case"style":mc(e,n,c);break;case"data":if(t!=="object"){As(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=Ms(""+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 c=="function"&&(a==="formAction"?(t!=="input"&&Le(e,t,"name",i.name,i,null),Le(e,t,"formEncType",i.formEncType,i,null),Le(e,t,"formMethod",i.formMethod,i,null),Le(e,t,"formTarget",i.formTarget,i,null)):(Le(e,t,"encType",i.encType,i,null),Le(e,t,"method",i.method,i,null),Le(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Ms(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Nr);break;case"onScroll":n!=null&&ke("scroll",e);break;case"onScrollEnd":n!=null&&ke("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=Ms(""+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":ke("beforetoggle",e),ke("toggle",e),Ts(e,"popover",n);break;case"xlinkActuate":ea(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":ea(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":ea(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":ea(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":ea(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":ea(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":ea(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":ea(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":ea(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Ts(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Zg.get(a)||a,Ts(e,a,n))}}function Fo(e,t,a,n,i,c){switch(a){case"style":mc(e,n,c);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"?Sn(e,n):(typeof n=="number"||typeof n=="bigint")&&Sn(e,""+n);break;case"onScroll":n!=null&&ke("scroll",e);break;case"onScrollEnd":n!=null&&ke("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Nr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ac.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(i=a.endsWith("Capture"),t=a.slice(2,i?a.length-7:void 0),c=e[ht]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,i),typeof n=="function")){typeof c!="function"&&c!==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,""):Ts(e,a,n)}}}function ot(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ke("error",e),ke("load",e);var n=!1,i=!1,c;for(c in a)if(a.hasOwnProperty(c)){var p=a[c];if(p!=null)switch(c){case"src":n=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Le(e,t,c,p,a,null)}}i&&Le(e,t,"srcSet",a.srcSet,a,null),n&&Le(e,t,"src",a.src,a,null);return;case"input":ke("invalid",e);var b=c=p=i=null,E=null,_=null;for(n in a)if(a.hasOwnProperty(n)){var P=a[n];if(P!=null)switch(n){case"name":i=P;break;case"type":p=P;break;case"checked":E=P;break;case"defaultChecked":_=P;break;case"value":c=P;break;case"defaultValue":b=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,t));break;default:Le(e,t,n,P,a,null)}}uc(e,c,b,E,_,p,i,!1),Rs(e);return;case"select":ke("invalid",e),n=p=c=null;for(i in a)if(a.hasOwnProperty(i)&&(b=a[i],b!=null))switch(i){case"value":c=b;break;case"defaultValue":p=b;break;case"multiple":n=b;default:Le(e,t,i,b,a,null)}t=c,a=p,e.multiple=!!n,t!=null?wn(e,!!n,t,!1):a!=null&&wn(e,!!n,a,!0);return;case"textarea":ke("invalid",e),c=i=n=null;for(p in a)if(a.hasOwnProperty(p)&&(b=a[p],b!=null))switch(p){case"value":n=b;break;case"defaultValue":i=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(o(91));break;default:Le(e,t,p,b,a,null)}dc(e,n,i,c),Rs(e);return;case"option":for(E in a)if(a.hasOwnProperty(E)&&(n=a[E],n!=null))switch(E){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:Le(e,t,E,n,a,null)}return;case"dialog":ke("beforetoggle",e),ke("toggle",e),ke("cancel",e),ke("close",e);break;case"iframe":case"object":ke("load",e);break;case"video":case"audio":for(n=0;n<Fl.length;n++)ke(Fl[n],e);break;case"image":ke("error",e),ke("load",e);break;case"details":ke("toggle",e);break;case"embed":case"source":case"link":ke("error",e),ke("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(_ in a)if(a.hasOwnProperty(_)&&(n=a[_],n!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Le(e,t,_,n,a,null)}return;default:if(fi(t)){for(P in a)a.hasOwnProperty(P)&&(n=a[P],n!==void 0&&Fo(e,t,P,n,a,void 0));return}}for(b in a)a.hasOwnProperty(b)&&(n=a[b],n!=null&&Le(e,t,b,n,a,null))}function bp(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,c=null,p=null,b=null,E=null,_=null,P=null;for(V in a){var F=a[V];if(a.hasOwnProperty(V)&&F!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":E=F;default:n.hasOwnProperty(V)||Le(e,t,V,null,n,F)}}for(var B in n){var V=n[B];if(F=a[B],n.hasOwnProperty(B)&&(V!=null||F!=null))switch(B){case"type":c=V;break;case"name":i=V;break;case"checked":_=V;break;case"defaultChecked":P=V;break;case"value":p=V;break;case"defaultValue":b=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(o(137,t));break;default:V!==F&&Le(e,t,B,V,n,F)}}ci(e,p,b,E,_,P,c,i);return;case"select":V=p=b=B=null;for(c in a)if(E=a[c],a.hasOwnProperty(c)&&E!=null)switch(c){case"value":break;case"multiple":V=E;default:n.hasOwnProperty(c)||Le(e,t,c,null,n,E)}for(i in n)if(c=n[i],E=a[i],n.hasOwnProperty(i)&&(c!=null||E!=null))switch(i){case"value":B=c;break;case"defaultValue":b=c;break;case"multiple":p=c;default:c!==E&&Le(e,t,i,c,n,E)}t=b,a=p,n=V,B!=null?wn(e,!!a,B,!1):!!n!=!!a&&(t!=null?wn(e,!!a,t,!0):wn(e,!!a,a?[]:"",!1));return;case"textarea":V=B=null;for(b in a)if(i=a[b],a.hasOwnProperty(b)&&i!=null&&!n.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Le(e,t,b,null,n,i)}for(p in n)if(i=n[p],c=a[p],n.hasOwnProperty(p)&&(i!=null||c!=null))switch(p){case"value":B=i;break;case"defaultValue":V=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==c&&Le(e,t,p,i,n,c)}cc(e,B,V);return;case"option":for(var ye in a)if(B=a[ye],a.hasOwnProperty(ye)&&B!=null&&!n.hasOwnProperty(ye))switch(ye){case"selected":e.selected=!1;break;default:Le(e,t,ye,null,n,B)}for(E in n)if(B=n[E],V=a[E],n.hasOwnProperty(E)&&B!==V&&(B!=null||V!=null))switch(E){case"selected":e.selected=B&&typeof B!="function"&&typeof B!="symbol";break;default:Le(e,t,E,B,n,V)}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 ge in a)B=a[ge],a.hasOwnProperty(ge)&&B!=null&&!n.hasOwnProperty(ge)&&Le(e,t,ge,null,n,B);for(_ in n)if(B=n[_],V=a[_],n.hasOwnProperty(_)&&B!==V&&(B!=null||V!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(o(137,t));break;default:Le(e,t,_,B,n,V)}return;default:if(fi(t)){for(var _e in a)B=a[_e],a.hasOwnProperty(_e)&&B!==void 0&&!n.hasOwnProperty(_e)&&Fo(e,t,_e,void 0,n,B);for(P in n)B=n[P],V=a[P],!n.hasOwnProperty(P)||B===V||B===void 0&&V===void 0||Fo(e,t,P,B,n,V);return}}for(var D in a)B=a[D],a.hasOwnProperty(D)&&B!=null&&!n.hasOwnProperty(D)&&Le(e,t,D,null,n,B);for(F in n)B=n[F],V=a[F],!n.hasOwnProperty(F)||B===V||B==null&&V==null||Le(e,t,F,B,n,V)}var Io=null,Wo=null;function Er(e){return e.nodeType===9?e:e.ownerDocument}function mm(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 hm(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 eu(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 tu=null;function vp(){var e=window.event;return e&&e.type==="popstate"?e===tu?!1:(tu=e,!0):(tu=null,!1)}var gm=typeof setTimeout=="function"?setTimeout:void 0,wp=typeof clearTimeout=="function"?clearTimeout:void 0,pm=typeof Promise=="function"?Promise:void 0,Sp=typeof queueMicrotask=="function"?queueMicrotask:typeof pm<"u"?function(e){return pm.resolve(null).then(e).catch(jp)}:gm;function jp(e){setTimeout(function(){throw e})}function _a(e){return e==="head"}function xm(e,t){var a=t,n=0,i=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"){if(0<n&&8>n){a=n;var p=e.ownerDocument;if(a&1&&Wl(p.documentElement),a&2&&Wl(p.body),a&4)for(a=p.head,Wl(a),p=a.firstChild;p;){var b=p.nextSibling,E=p.nodeName;p[hl]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&p.rel.toLowerCase()==="stylesheet"||a.removeChild(p),p=b}}if(i===0){e.removeChild(c),is(t);return}i--}else a==="$"||a==="$?"||a==="$!"?i++:n=a.charCodeAt(0)-48;else n=0;a=c}while(a);is(t)}function au(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":au(a),ri(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Np(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[hl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==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(c=e.getAttribute("src"),(c!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Gt(e.nextSibling),e===null)break}return null}function Ep(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Gt(e.nextSibling),e===null))return null;return e}function nu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Cp(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 Gt(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 lu=null;function ym(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 bm(e,t,a){switch(t=Er(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 Wl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ri(e)}var Lt=new Map,vm=new Set;function Cr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ha=W.d;W.d={f:kp,r:Tp,D:Ap,C:Rp,L:Op,m:Mp,X:Dp,S:zp,M:Up};function kp(){var e=ha.f(),t=xr();return e||t}function Tp(e){var t=xn(e);t!==null&&t.tag===5&&t.type==="form"?Bd(t):ha.r(e)}var Fn=typeof document>"u"?null:document;function wm(e,t,a){var n=Fn;if(n&&typeof t=="string"&&t){var i=At(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),vm.has(i)||(vm.add(i),e={rel:e,crossOrigin:a,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),ot(t,"link",e),tt(t),n.head.appendChild(t)))}}function Ap(e){ha.D(e),wm("dns-prefetch",e,null)}function Rp(e,t){ha.C(e,t),wm("preconnect",e,t)}function Op(e,t,a){ha.L(e,t,a);var n=Fn;if(n&&e&&t){var i='link[rel="preload"][as="'+At(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+At(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+At(a.imageSizes)+'"]')):i+='[href="'+At(e)+'"]';var c=i;switch(t){case"style":c=In(e);break;case"script":c=Wn(e)}Lt.has(c)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Lt.set(c,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(es(c))||t==="script"&&n.querySelector(ts(c))||(t=n.createElement("link"),ot(t,"link",e),tt(t),n.head.appendChild(t)))}}function Mp(e,t){ha.m(e,t);var a=Fn;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+At(n)+'"][href="'+At(e)+'"]',c=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Wn(e)}if(!Lt.has(c)&&(e=y({rel:"modulepreload",href:e},t),Lt.set(c,e),a.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ts(c)))return}n=a.createElement("link"),ot(n,"link",e),tt(n),a.head.appendChild(n)}}}function zp(e,t,a){ha.S(e,t,a);var n=Fn;if(n&&e){var i=yn(n).hoistableStyles,c=In(e);t=t||"default";var p=i.get(c);if(!p){var b={loading:0,preload:null};if(p=n.querySelector(es(c)))b.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Lt.get(c))&&su(e,a);var E=p=n.createElement("link");tt(E),ot(E,"link",e),E._p=new Promise(function(_,P){E.onload=_,E.onerror=P}),E.addEventListener("load",function(){b.loading|=1}),E.addEventListener("error",function(){b.loading|=2}),b.loading|=4,kr(p,t,n)}p={type:"stylesheet",instance:p,count:1,state:b},i.set(c,p)}}}function Dp(e,t){ha.X(e,t);var a=Fn;if(a&&e){var n=yn(a).hoistableScripts,i=Wn(e),c=n.get(i);c||(c=a.querySelector(ts(i)),c||(e=y({src:e,async:!0},t),(t=Lt.get(i))&&ru(e,t),c=a.createElement("script"),tt(c),ot(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function Up(e,t){ha.M(e,t);var a=Fn;if(a&&e){var n=yn(a).hoistableScripts,i=Wn(e),c=n.get(i);c||(c=a.querySelector(ts(i)),c||(e=y({src:e,async:!0,type:"module"},t),(t=Lt.get(i))&&ru(e,t),c=a.createElement("script"),tt(c),ot(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function Sm(e,t,a,n){var i=(i=ee.current)?Cr(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=In(a.href),a=yn(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=In(a.href);var c=yn(i).hoistableStyles,p=c.get(e);if(p||(i=i.ownerDocument||i,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,p),(c=i.querySelector(es(e)))&&!c._p&&(p.instance=c,p.state.loading=5),Lt.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},Lt.set(e,a),c||Lp(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=Wn(a),a=yn(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 In(e){return'href="'+At(e)+'"'}function es(e){return'link[rel="stylesheet"]['+e+"]"}function jm(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Lp(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}),ot(t,"link",a),tt(t),e.head.appendChild(t))}function Wn(e){return'[src="'+At(e)+'"]'}function ts(e){return"script[async]"+e}function Nm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+At(a.href)+'"]');if(n)return t.instance=n,tt(n),n;var i=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),tt(n),ot(n,"style",i),kr(n,a.precedence,e),t.instance=n;case"stylesheet":i=In(a.href);var c=e.querySelector(es(i));if(c)return t.state.loading|=4,t.instance=c,tt(c),c;n=jm(a),(i=Lt.get(i))&&su(n,i),c=(e.ownerDocument||e).createElement("link"),tt(c);var p=c;return p._p=new Promise(function(b,E){p.onload=b,p.onerror=E}),ot(c,"link",n),t.state.loading|=4,kr(c,a.precedence,e),t.instance=c;case"script":return c=Wn(a.src),(i=e.querySelector(ts(c)))?(t.instance=i,tt(i),i):(n=a,(i=Lt.get(c))&&(n=y({},a),ru(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),tt(i),ot(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,kr(n,a.precedence,e));return t.instance}function kr(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,c=i,p=0;p<n.length;p++){var b=n[p];if(b.dataset.precedence===t)c=b;else if(c!==i)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function su(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ru(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Tr=null;function Em(e,t,a){if(Tr===null){var n=new Map,i=Tr=new Map;i.set(a,n)}else i=Tr,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 c=a[i];if(!(c[hl]||c[ut]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var p=c.getAttribute(t)||"";p=e+p;var b=n.get(p);b?b.push(c):n.set(p,[c])}}return n}function Cm(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function _p(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 km(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var as=null;function Hp(){}function Bp(e,t,a){if(as===null)throw Error(o(475));var n=as;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var i=In(a.href),c=e.querySelector(es(i));if(c){e=c._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(n.count++,n=Ar.bind(n),e.then(n,n)),t.state.loading|=4,t.instance=c,tt(c);return}c=e.ownerDocument||e,a=jm(a),(i=Lt.get(i))&&su(a,i),c=c.createElement("link"),tt(c);var p=c;p._p=new Promise(function(b,E){p.onload=b,p.onerror=E}),ot(c,"link",a),t.instance=c}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(n.count++,t=Ar.bind(n),e.addEventListener("load",t),e.addEventListener("error",t))}}function qp(){if(as===null)throw Error(o(475));var e=as;return e.stylesheets&&e.count===0&&iu(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&iu(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 Ar(){if(this.count--,this.count===0){if(this.stylesheets)iu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Rr=null;function iu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rr=new Map,t.forEach(Gp,e),Rr=null,Ar.call(e))}function Gp(e,t){if(!(t.state.loading&4)){var a=Rr.get(e);if(a)var n=a.get(null);else{a=new Map,Rr.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<i.length;c++){var p=i[c];(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"),c=a.get(p)||n,c===n&&a.set(null,i),a.set(p,i),this.count++,n=Ar.bind(this),i.addEventListener("load",n),i.addEventListener("error",n),c?c.parentNode.insertBefore(i,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ns={$$typeof:U,Provider:null,Consumer:null,_currentValue:A,_currentValue2:A,_threadCount:0};function Vp(e,t,a,n,i,c,p,b){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ai(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ai(0),this.hiddenUpdates=ai(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=c,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function Tm(e,t,a,n,i,c,p,b,E,_,P,F){return e=new Vp(e,t,a,p,b,E,_,F),t=1,c===!0&&(t|=24),c=St(3,null,null,t),e.current=c,c.stateNode=e,t=Gi(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:n,isDehydrated:a,cache:t},Ki(c),e}function Am(e){return e?(e=Rn,e):Rn}function Rm(e,t,a,n,i,c){i=Am(i),n.context===null?n.context=i:n.pendingContext=i,n=Na(t),n.payload={element:a},c=c===void 0?null:c,c!==null&&(n.callback=c),a=Ea(e,n,t),a!==null&&(kt(a,e,t),zl(a,e,t))}function Om(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function ou(e,t){Om(e,t),(e=e.alternate)&&Om(e,t)}function Mm(e){if(e.tag===13){var t=An(e,67108864);t!==null&&kt(t,e,67108864),ou(e,67108864)}}var Or=!0;function $p(e,t,a,n){var i=M.T;M.T=null;var c=W.p;try{W.p=2,uu(e,t,a,n)}finally{W.p=c,M.T=i}}function Yp(e,t,a,n){var i=M.T;M.T=null;var c=W.p;try{W.p=8,uu(e,t,a,n)}finally{W.p=c,M.T=i}}function uu(e,t,a,n){if(Or){var i=cu(n);if(i===null)Jo(e,t,n,Mr,a),Dm(e,n);else if(Qp(i,e,t,a,n))n.stopPropagation();else if(Dm(e,n),t&4&&-1<Kp.indexOf(e)){for(;i!==null;){var c=xn(i);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var p=Qa(c.pendingLanes);if(p!==0){var b=c;for(b.pendingLanes|=2,b.entangledLanes|=2;p;){var E=1<<31-vt(p);b.entanglements[1]|=E,p&=~E}Jt(c),(ze&6)===0&&(gr=Ze()+500,Jl(0))}}break;case 13:b=An(c,2),b!==null&&kt(b,c,2),xr(),ou(c,2)}if(c=cu(n),c===null&&Jo(e,t,n,Mr,a),c===i)break;i=c}i!==null&&n.stopPropagation()}else Jo(e,t,n,null,a)}}function cu(e){return e=hi(e),du(e)}var Mr=null;function du(e){if(Mr=null,e=pn(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 Mr=e,null}function zm(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(js()){case cl:return 2;case Ns:return 8;case ya:case Og:return 32;case Zu:return 268435456;default:return 32}default:return 32}}var fu=!1,Ha=null,Ba=null,qa=null,ls=new Map,ss=new Map,Ga=[],Kp="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 Dm(e,t){switch(e){case"focusin":case"focusout":Ha=null;break;case"dragenter":case"dragleave":Ba=null;break;case"mouseover":case"mouseout":qa=null;break;case"pointerover":case"pointerout":ls.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ss.delete(t.pointerId)}}function rs(e,t,a,n,i,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:c,targetContainers:[i]},t!==null&&(t=xn(t),t!==null&&Mm(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 Ha=rs(Ha,e,t,a,n,i),!0;case"dragenter":return Ba=rs(Ba,e,t,a,n,i),!0;case"mouseover":return qa=rs(qa,e,t,a,n,i),!0;case"pointerover":var c=i.pointerId;return ls.set(c,rs(ls.get(c)||null,e,t,a,n,i)),!0;case"gotpointercapture":return c=i.pointerId,ss.set(c,rs(ss.get(c)||null,e,t,a,n,i)),!0}return!1}function Um(e){var t=pn(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,Bg(e.priority,function(){if(a.tag===13){var n=Ct();n=ni(n);var i=An(a,n);i!==null&&kt(i,a,n),ou(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 zr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=cu(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);mi=n,a.target.dispatchEvent(n),mi=null}else return t=xn(a),t!==null&&Mm(t),e.blockedOn=a,!1;t.shift()}return!0}function Lm(e,t,a){zr(e)&&a.delete(t)}function Xp(){fu=!1,Ha!==null&&zr(Ha)&&(Ha=null),Ba!==null&&zr(Ba)&&(Ba=null),qa!==null&&zr(qa)&&(qa=null),ls.forEach(Lm),ss.forEach(Lm)}function Dr(e,t){e.blockedOn===t&&(e.blockedOn=null,fu||(fu=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Xp)))}var Ur=null;function _m(e){Ur!==e&&(Ur=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Ur===e&&(Ur=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(du(n||a)===null)continue;break}var c=xn(a);c!==null&&(e.splice(t,3),t-=3,co(c,{pending:!0,data:i,method:a.method,action:n},n,i))}}))}function is(e){function t(E){return Dr(E,e)}Ha!==null&&Dr(Ha,e),Ba!==null&&Dr(Ba,e),qa!==null&&Dr(qa,e),ls.forEach(t),ss.forEach(t);for(var a=0;a<Ga.length;a++){var n=Ga[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Ga.length&&(a=Ga[0],a.blockedOn===null);)Um(a),a.blockedOn===null&&Ga.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var i=a[n],c=a[n+1],p=i[ht]||null;if(typeof c=="function")p||_m(a);else if(p){var b=null;if(c&&c.hasAttribute("formAction")){if(i=c,p=c[ht]||null)b=p.formAction;else if(du(i)!==null)continue}else b=p.action;typeof b=="function"?a[n+1]=b:(a.splice(n,3),n-=3),_m(a)}}}function mu(e){this._internalRoot=e}Lr.prototype.render=mu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=Ct();Rm(a,n,e,t,null,null)},Lr.prototype.unmount=mu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rm(e.current,2,null,e,null,null),xr(),t[gn]=null}};function Lr(e){this._internalRoot=e}Lr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Wu();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ga.length&&t!==0&&t<Ga[a].priority;a++);Ga.splice(a,0,e),a===0&&Um(e)}};var Hm=s.version;if(Hm!=="19.1.0")throw Error(o(527,Hm,"19.1.0"));W.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 Zp={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_r.isDisabled&&_r.supportsFiber)try{dl=_r.inject(Zp),bt=_r}catch{}}return us.createRoot=function(e,t){if(!d(e))throw Error(o(299));var a=!1,n="",i=Wd,c=ef,p=tf,b=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&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(b=t.unstable_transitionCallbacks)),t=Tm(e,1,!1,null,null,a,n,i,c,p,b,null),e[gn]=t.current,Po(e),new mu(t)},us.hydrateRoot=function(e,t,a){if(!d(e))throw Error(o(299));var n=!1,i="",c=Wd,p=ef,b=tf,E=null,_=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(i=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(E=a.unstable_transitionCallbacks),a.formState!==void 0&&(_=a.formState)),t=Tm(e,1,!0,t,a??null,n,i,c,p,b,E,_),t.context=Am(null),a=t.current,n=Ct(),n=ni(n),i=Na(n),i.callback=null,Ea(a,i,n),a=n,t.current.lanes=a,ml(t,a),Jt(t),e[gn]=t.current,Po(e),new Lr(t)},us.version="19.1.0",us}var Zm;function lx(){if(Zm)return pu.exports;Zm=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(),pu.exports=nx(),pu.exports}var sx=lx();const Pm=Ah(sx);var cs={},Jm;function rx(){if(Jm)return cs;Jm=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.parse=m,cs.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 v=function(){};return v.prototype=Object.create(null),v})();function m(v,O){const j=new f,C=v.length;if(C<2)return j;const T=(O==null?void 0:O.decode)||y;let z=0;do{const k=v.indexOf("=",z);if(k===-1)break;const U=v.indexOf(";",z),$=U===-1?C:U;if(k>$){z=v.lastIndexOf(";",k-1)+1;continue}const K=x(v,z,k),ue=h(v,k,K),X=v.slice(K,ue);if(j[X]===void 0){let Y=x(v,k+1,$),I=h(v,$,Y);const H=T(v.slice(Y,I));j[X]=H}z=$+1}while(z<C);return j}function x(v,O,j){do{const C=v.charCodeAt(O);if(C!==32&&C!==9)return O}while(++O<j);return j}function h(v,O,j){for(;O>j;){const C=v.charCodeAt(--O);if(C!==32&&C!==9)return O+1}return j}function g(v,O,j){const C=(j==null?void 0:j.encode)||encodeURIComponent;if(!l.test(v))throw new TypeError(`argument name is invalid: ${v}`);const T=C(O);if(!s.test(T))throw new TypeError(`argument val is invalid: ${O}`);let z=v+"="+T;if(!j)return z;if(j.maxAge!==void 0){if(!Number.isInteger(j.maxAge))throw new TypeError(`option maxAge is invalid: ${j.maxAge}`);z+="; Max-Age="+j.maxAge}if(j.domain){if(!r.test(j.domain))throw new TypeError(`option domain is invalid: ${j.domain}`);z+="; Domain="+j.domain}if(j.path){if(!o.test(j.path))throw new TypeError(`option path is invalid: ${j.path}`);z+="; Path="+j.path}if(j.expires){if(!S(j.expires)||!Number.isFinite(j.expires.valueOf()))throw new TypeError(`option expires is invalid: ${j.expires}`);z+="; Expires="+j.expires.toUTCString()}if(j.httpOnly&&(z+="; HttpOnly"),j.secure&&(z+="; Secure"),j.partitioned&&(z+="; Partitioned"),j.priority)switch(typeof j.priority=="string"?j.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: ${j.priority}`)}if(j.sameSite)switch(typeof j.sameSite=="string"?j.sameSite.toLowerCase():j.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: ${j.sameSite}`)}return z}function y(v){if(v.indexOf("%")===-1)return v;try{return decodeURIComponent(v)}catch{return v}}function S(v){return d.call(v)==="[object Date]"}return cs}rx();var Fm="popstate";function ix(l={}){function s(o,d){let{pathname:f,search:m,hash:x}=o.location;return Cu("",{pathname:f,search:m,hash:x},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function r(o,d){return typeof d=="string"?d:ps(d)}return ux(s,r,null,l)}function Ve(l,s){if(l===!1||l===null||typeof l>"u")throw new Error(s)}function Vt(l,s){if(!l){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function ox(){return Math.random().toString(36).substring(2,10)}function Im(l,s){return{usr:l.state,key:l.key,idx:s}}function Cu(l,s,r=null,o){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof s=="string"?sl(s):s,state:r,key:s&&s.key||o||ox()}}function ps({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 sl(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 ux(l,s,r,o={}){let{window:d=document.defaultView,v5Compat:f=!1}=o,m=d.history,x="POP",h=null,g=y();g==null&&(g=0,m.replaceState({...m.state,idx:g},""));function y(){return(m.state||{idx:null}).idx}function S(){x="POP";let T=y(),z=T==null?null:T-g;g=T,h&&h({action:x,location:C.location,delta:z})}function v(T,z){x="PUSH";let k=Cu(C.location,T,z);g=y()+1;let U=Im(k,g),$=C.createHref(k);try{m.pushState(U,"",$)}catch(K){if(K instanceof DOMException&&K.name==="DataCloneError")throw K;d.location.assign($)}f&&h&&h({action:x,location:C.location,delta:1})}function O(T,z){x="REPLACE";let k=Cu(C.location,T,z);g=y();let U=Im(k,g),$=C.createHref(k);m.replaceState(U,"",$),f&&h&&h({action:x,location:C.location,delta:0})}function j(T){return cx(T)}let C={get action(){return x},get location(){return l(d,m)},listen(T){if(h)throw new Error("A history only accepts one active listener");return d.addEventListener(Fm,S),h=T,()=>{d.removeEventListener(Fm,S),h=null}},createHref(T){return s(d,T)},createURL:j,encodeLocation(T){let z=j(T);return{pathname:z.pathname,search:z.search,hash:z.hash}},push:v,replace:O,go(T){return m.go(T)}};return C}function cx(l,s=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Ve(r,"No window.location.(origin|href) available to create URL");let o=typeof l=="string"?l:ps(l);return o=o.replace(/ $/,"%20"),!s&&o.startsWith("//")&&(o=r+o),new URL(o,r)}function Rh(l,s,r="/"){return dx(l,s,r,!1)}function dx(l,s,r,o){let d=typeof s=="string"?sl(s):s,f=xa(d.pathname||"/",r);if(f==null)return null;let m=Oh(l);fx(m);let x=null;for(let h=0;x==null&&h<m.length;++h){let g=jx(f);x=wx(m[h],g,o)}return x}function Oh(l,s=[],r=[],o=""){let d=(f,m,x)=>{let h={relativePath:x===void 0?f.path||"":x,caseSensitive:f.caseSensitive===!0,childrenIndex:m,route:f};h.relativePath.startsWith("/")&&(Ve(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=pa([o,h.relativePath]),y=r.concat(h);f.children&&f.children.length>0&&(Ve(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),Oh(f.children,s,y,g)),!(f.path==null&&!f.index)&&s.push({path:g,score:bx(g,f.index),routesMeta:y})};return l.forEach((f,m)=>{var x;if(f.path===""||!((x=f.path)!=null&&x.includes("?")))d(f,m);else for(let h of Mh(f.path))d(f,m,h)}),s}function Mh(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=Mh(o.join("/")),x=[];return x.push(...m.map(h=>h===""?f:[f,h].join("/"))),d&&x.push(...m),x.map(h=>l.startsWith("/")&&h===""?"/":h)}function fx(l){l.sort((s,r)=>s.score!==r.score?r.score-s.score:vx(s.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}var mx=/^:[\w-]+$/,hx=3,gx=2,px=1,xx=10,yx=-2,Wm=l=>l==="*";function bx(l,s){let r=l.split("/"),o=r.length;return r.some(Wm)&&(o+=yx),s&&(o+=gx),r.filter(d=>!Wm(d)).reduce((d,f)=>d+(mx.test(f)?hx:f===""?px:xx),o)}function vx(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 wx(l,s,r=!1){let{routesMeta:o}=l,d={},f="/",m=[];for(let x=0;x<o.length;++x){let h=o[x],g=x===o.length-1,y=f==="/"?s:s.slice(f.length)||"/",S=Qr({path:h.relativePath,caseSensitive:h.caseSensitive,end:g},y),v=h.route;if(!S&&g&&r&&!o[o.length-1].route.index&&(S=Qr({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},y)),!S)return null;Object.assign(d,S.params),m.push({params:d,pathname:pa([f,S.pathname]),pathnameBase:kx(pa([f,S.pathnameBase])),route:v}),S.pathnameBase!=="/"&&(f=pa([f,S.pathnameBase]))}return m}function Qr(l,s){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[r,o]=Sx(l.path,l.caseSensitive,l.end),d=s.match(r);if(!d)return null;let f=d[0],m=f.replace(/(.)\/+$/,"$1"),x=d.slice(1);return{params:o.reduce((g,{paramName:y,isOptional:S},v)=>{if(y==="*"){let j=x[v]||"";m=f.slice(0,f.length-j.length).replace(/(.)\/+$/,"$1")}const O=x[v];return S&&!O?g[y]=void 0:g[y]=(O||"").replace(/%2F/g,"/"),g},{}),pathname:f,pathnameBase:m,pattern:l}}function Sx(l,s=!1,r=!0){Vt(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,x,h)=>(o.push({paramName:x,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 jx(l){try{return l.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return Vt(!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 xa(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 Nx(l,s="/"){let{pathname:r,search:o="",hash:d=""}=typeof l=="string"?sl(l):l;return{pathname:r?r.startsWith("/")?r:Ex(r,s):s,search:Tx(o),hash:Ax(d)}}function Ex(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 vu(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 Cx(l){return l.filter((s,r)=>r===0||s.route.path&&s.route.path.length>0)}function _u(l){let s=Cx(l);return s.map((r,o)=>o===s.length-1?r.pathname:r.pathnameBase)}function Hu(l,s,r,o=!1){let d;typeof l=="string"?d=sl(l):(d={...l},Ve(!d.pathname||!d.pathname.includes("?"),vu("?","pathname","search",d)),Ve(!d.pathname||!d.pathname.includes("#"),vu("#","pathname","hash",d)),Ve(!d.search||!d.search.includes("#"),vu("#","search","hash",d)));let f=l===""||d.pathname==="",m=f?"/":d.pathname,x;if(m==null)x=r;else{let S=s.length-1;if(!o&&m.startsWith("..")){let v=m.split("/");for(;v[0]==="..";)v.shift(),S-=1;d.pathname=v.join("/")}x=S>=0?s[S]:"/"}let h=Nx(d,x),g=m&&m!=="/"&&m.endsWith("/"),y=(f||m===".")&&r.endsWith("/");return!h.pathname.endsWith("/")&&(g||y)&&(h.pathname+="/"),h}var pa=l=>l.join("/").replace(/\/\/+/g,"/"),kx=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),Tx=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,Ax=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l;function Rx(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}var zh=["POST","PUT","PATCH","DELETE"];new Set(zh);var Ox=["GET",...zh];new Set(Ox);var rl=w.createContext(null);rl.displayName="DataRouter";var Fr=w.createContext(null);Fr.displayName="DataRouterState";var Dh=w.createContext({isTransitioning:!1});Dh.displayName="ViewTransition";var Mx=w.createContext(new Map);Mx.displayName="Fetchers";var zx=w.createContext(null);zx.displayName="Await";var $t=w.createContext(null);$t.displayName="Navigation";var bs=w.createContext(null);bs.displayName="Location";var Ht=w.createContext({outlet:null,matches:[],isDataRoute:!1});Ht.displayName="Route";var Bu=w.createContext(null);Bu.displayName="RouteError";function Dx(l,{relative:s}={}){Ve(il(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:o}=w.useContext($t),{hash:d,pathname:f,search:m}=vs(l,{relative:s}),x=f;return r!=="/"&&(x=f==="/"?r:pa([r,f])),o.createHref({pathname:x,search:m,hash:d})}function il(){return w.useContext(bs)!=null}function Wt(){return Ve(il(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(bs).location}var Uh="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Lh(l){w.useContext($t).static||w.useLayoutEffect(l)}function mn(){let{isDataRoute:l}=w.useContext(Ht);return l?Jx():Ux()}function Ux(){Ve(il(),"useNavigate() may be used only in the context of a <Router> component.");let l=w.useContext(rl),{basename:s,navigator:r}=w.useContext($t),{matches:o}=w.useContext(Ht),{pathname:d}=Wt(),f=JSON.stringify(_u(o)),m=w.useRef(!1);return Lh(()=>{m.current=!0}),w.useCallback((h,g={})=>{if(Vt(m.current,Uh),!m.current)return;if(typeof h=="number"){r.go(h);return}let y=Hu(h,JSON.parse(f),d,g.relative==="path");l==null&&s!=="/"&&(y.pathname=y.pathname==="/"?s:pa([s,y.pathname])),(g.replace?r.replace:r.push)(y,g.state,g)},[s,r,f,d,l])}var Lx=w.createContext(null);function _x(l){let s=w.useContext(Ht).outlet;return s&&w.createElement(Lx.Provider,{value:l},s)}function Hx(){let{matches:l}=w.useContext(Ht),s=l[l.length-1];return s?s.params:{}}function vs(l,{relative:s}={}){let{matches:r}=w.useContext(Ht),{pathname:o}=Wt(),d=JSON.stringify(_u(r));return w.useMemo(()=>Hu(l,JSON.parse(d),o,s==="path"),[l,d,o,s])}function Bx(l,s){return _h(l,s)}function _h(l,s,r,o){var z;Ve(il(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d}=w.useContext($t),{matches:f}=w.useContext(Ht),m=f[f.length-1],x=m?m.params:{},h=m?m.pathname:"/",g=m?m.pathnameBase:"/",y=m&&m.route;{let k=y&&y.path||"";Hh(h,!y||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${k}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
50
|
-
|
|
51
|
-
Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let S=Wt(),v;if(s){let k=typeof s=="string"?sl(s):s;Ve(g==="/"||((z=k.pathname)==null?void 0:z.startsWith(g)),`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 "${g}" but pathname "${k.pathname}" was given in the \`location\` prop.`),v=k}else v=S;let O=v.pathname||"/",j=O;if(g!=="/"){let k=g.replace(/^\//,"").split("/");j="/"+O.replace(/^\//,"").split("/").slice(k.length).join("/")}let C=Rh(l,{pathname:j});Vt(y||C!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Vt(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let T=Yx(C&&C.map(k=>Object.assign({},k,{params:Object.assign({},x,k.params),pathname:pa([g,d.encodeLocation?d.encodeLocation(k.pathname).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?g:pa([g,d.encodeLocation?d.encodeLocation(k.pathnameBase).pathname:k.pathnameBase])})),f,r,o);return s&&T?w.createElement(bs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},T):T}function qx(){let l=Px(),s=Rx(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=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:f},"ErrorBoundary")," or"," ",w.createElement("code",{style:f},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},s),r?w.createElement("pre",{style:d},r):null,m)}var Gx=w.createElement(qx,null),Vx=class extends w.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,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?w.createElement(Ht.Provider,{value:this.props.routeContext},w.createElement(Bu.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function $x({routeContext:l,match:s,children:r}){let o=w.useContext(rl);return o&&o.static&&o.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=s.route.id),w.createElement(Ht.Provider,{value:l},r)}function Yx(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);Ve(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,x=-1;if(r)for(let h=0;h<d.length;h++){let g=d[h];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(x=h),g.route.id){let{loaderData:y,errors:S}=r,v=g.route.loader&&!y.hasOwnProperty(g.route.id)&&(!S||S[g.route.id]===void 0);if(g.route.lazy||v){m=!0,x>=0?d=d.slice(0,x+1):d=[d[0]];break}}}return d.reduceRight((h,g,y)=>{let S,v=!1,O=null,j=null;r&&(S=f&&g.route.id?f[g.route.id]:void 0,O=g.route.errorElement||Gx,m&&(x<0&&y===0?(Hh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,j=null):x===y&&(v=!0,j=g.route.hydrateFallbackElement||null)));let C=s.concat(d.slice(0,y+1)),T=()=>{let z;return S?z=O:v?z=j:g.route.Component?z=w.createElement(g.route.Component,null):g.route.element?z=g.route.element:z=h,w.createElement($x,{match:g,routeContext:{outlet:h,matches:C,isDataRoute:r!=null},children:z})};return r&&(g.route.ErrorBoundary||g.route.errorElement||y===0)?w.createElement(Vx,{location:r.location,revalidation:r.revalidation,component:O,error:S,children:T(),routeContext:{outlet:null,matches:C,isDataRoute:!0}}):T()},null)}function qu(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kx(l){let s=w.useContext(rl);return Ve(s,qu(l)),s}function Qx(l){let s=w.useContext(Fr);return Ve(s,qu(l)),s}function Xx(l){let s=w.useContext(Ht);return Ve(s,qu(l)),s}function Gu(l){let s=Xx(l),r=s.matches[s.matches.length-1];return Ve(r.route.id,`${l} can only be used on routes that contain a unique "id"`),r.route.id}function Zx(){return Gu("useRouteId")}function Px(){var o;let l=w.useContext(Bu),s=Qx("useRouteError"),r=Gu("useRouteError");return l!==void 0?l:(o=s.errors)==null?void 0:o[r]}function Jx(){let{router:l}=Kx("useNavigate"),s=Gu("useNavigate"),r=w.useRef(!1);return Lh(()=>{r.current=!0}),w.useCallback(async(d,f={})=>{Vt(r.current,Uh),r.current&&(typeof d=="number"?l.navigate(d):await l.navigate(d,{fromRouteId:s,...f}))},[l,s])}var eh={};function Hh(l,s,r){!s&&!eh[l]&&(eh[l]=!0,Vt(!1,r))}w.memo(Fx);function Fx({routes:l,future:s,state:r}){return _h(l,void 0,r,s)}function Bh({to:l,replace:s,state:r,relative:o}){Ve(il(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=w.useContext($t);Vt(!d,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=w.useContext(Ht),{pathname:m}=Wt(),x=mn(),h=Hu(l,_u(f),m,o==="path"),g=JSON.stringify(h);return w.useEffect(()=>{x(JSON.parse(g),{replace:s,state:r,relative:o})},[x,g,o,s,r]),null}function qh(l){return _x(l.context)}function _t(l){Ve(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Ix({basename:l="/",children:s=null,location:r,navigationType:o="POP",navigator:d,static:f=!1}){Ve(!il(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=l.replace(/^\/*/,"/"),x=w.useMemo(()=>({basename:m,navigator:d,static:f,future:{}}),[m,d,f]);typeof r=="string"&&(r=sl(r));let{pathname:h="/",search:g="",hash:y="",state:S=null,key:v="default"}=r,O=w.useMemo(()=>{let j=xa(h,m);return j==null?null:{location:{pathname:j,search:g,hash:y,state:S,key:v},navigationType:o}},[m,h,g,y,S,v,o]);return Vt(O!=null,`<Router basename="${m}"> is not able to match the URL "${h}${g}${y}" because it does not start with the basename, so the <Router> won't render anything.`),O==null?null:w.createElement($t.Provider,{value:x},w.createElement(bs.Provider,{children:s,value:O}))}function Wx({children:l,location:s}){return Bx(ku(l),s)}function ku(l,s=[]){let r=[];return w.Children.forEach(l,(o,d)=>{if(!w.isValidElement(o))return;let f=[...s,d];if(o.type===w.Fragment){r.push.apply(r,ku(o.props.children,f));return}Ve(o.type===_t,`[${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>`),Ve(!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=ku(o.props.children,f)),r.push(m)}),r}var Yr="get",Kr="application/x-www-form-urlencoded";function Ir(l){return l!=null&&typeof l.tagName=="string"}function ey(l){return Ir(l)&&l.tagName.toLowerCase()==="button"}function ty(l){return Ir(l)&&l.tagName.toLowerCase()==="form"}function ay(l){return Ir(l)&&l.tagName.toLowerCase()==="input"}function ny(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function ly(l,s){return l.button===0&&(!s||s==="_self")&&!ny(l)}var Hr=null;function sy(){if(Hr===null)try{new FormData(document.createElement("form"),0),Hr=!1}catch{Hr=!0}return Hr}var ry=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function wu(l){return l!=null&&!ry.has(l)?(Vt(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Kr}"`),null):l}function iy(l,s){let r,o,d,f,m;if(ty(l)){let x=l.getAttribute("action");o=x?xa(x,s):null,r=l.getAttribute("method")||Yr,d=wu(l.getAttribute("enctype"))||Kr,f=new FormData(l)}else if(ey(l)||ay(l)&&(l.type==="submit"||l.type==="image")){let x=l.form;if(x==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=l.getAttribute("formaction")||x.getAttribute("action");if(o=h?xa(h,s):null,r=l.getAttribute("formmethod")||x.getAttribute("method")||Yr,d=wu(l.getAttribute("formenctype"))||wu(x.getAttribute("enctype"))||Kr,f=new FormData(x,l),!sy()){let{name:g,type:y,value:S}=l;if(y==="image"){let v=g?`${g}.`:"";f.append(`${v}x`,"0"),f.append(`${v}y`,"0")}else g&&f.append(g,S)}}else{if(Ir(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Yr,o=null,d=Kr,m=l}return f&&d==="text/plain"&&(m=f,f=void 0),{action:o,method:r.toLowerCase(),encType:d,formData:f,body:m}}function Vu(l,s){if(l===!1||l===null||typeof l>"u")throw new Error(s)}async function oy(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 uy(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 cy(l,s,r){let o=await Promise.all(l.map(async d=>{let f=s.routes[d.route.id];if(f){let m=await oy(f,r);return m.links?m.links():[]}return[]}));return hy(o.flat(1).filter(uy).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function th(l,s,r,o,d,f){let m=(h,g)=>r[g]?h.route.id!==r[g].route.id:!0,x=(h,g)=>{var y;return r[g].pathname!==h.pathname||((y=r[g].route.path)==null?void 0:y.endsWith("*"))&&r[g].params["*"]!==h.params["*"]};return f==="assets"?s.filter((h,g)=>m(h,g)||x(h,g)):f==="data"?s.filter((h,g)=>{var S;let y=o.routes[h.route.id];if(!y||!y.hasLoader)return!1;if(m(h,g)||x(h,g))return!0;if(h.route.shouldRevalidate){let v=h.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((S=r[0])==null?void 0:S.params)||{},nextUrl:new URL(l,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function dy(l,s,{includeHydrateFallback:r}={}){return fy(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 fy(l){return[...new Set(l)]}function my(l){let s={},r=Object.keys(l).sort();for(let o of r)s[o]=l[o];return s}function hy(l,s){let r=new Set;return new Set(s),l.reduce((o,d)=>{let f=JSON.stringify(my(d));return r.has(f)||(r.add(f),o.push({key:f,link:d})),o},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var gy=new Set([100,101,204,205]);function py(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&&xa(r.pathname,s)==="/"?r.pathname=`${s.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function Gh(){let l=w.useContext(rl);return Vu(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function xy(){let l=w.useContext(Fr);return Vu(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var $u=w.createContext(void 0);$u.displayName="FrameworkContext";function Vh(){let l=w.useContext($u);return Vu(l,"You must render this element inside a <HydratedRouter> element"),l}function yy(l,s){let r=w.useContext($u),[o,d]=w.useState(!1),[f,m]=w.useState(!1),{onFocus:x,onBlur:h,onMouseEnter:g,onMouseLeave:y,onTouchStart:S}=s,v=w.useRef(null);w.useEffect(()=>{if(l==="render"&&m(!0),l==="viewport"){let C=z=>{z.forEach(k=>{m(k.isIntersecting)})},T=new IntersectionObserver(C,{threshold:.5});return v.current&&T.observe(v.current),()=>{T.disconnect()}}},[l]),w.useEffect(()=>{if(o){let C=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(C)}}},[o]);let O=()=>{d(!0)},j=()=>{d(!1),m(!1)};return r?l!=="intent"?[f,v,{}]:[f,v,{onFocus:ds(x,O),onBlur:ds(h,j),onMouseEnter:ds(g,O),onMouseLeave:ds(y,j),onTouchStart:ds(S,O)}]:[!1,v,{}]}function ds(l,s){return r=>{l&&l(r),r.defaultPrevented||s(r)}}function by({page:l,...s}){let{router:r}=Gh(),o=w.useMemo(()=>Rh(r.routes,l,r.basename),[r.routes,l,r.basename]);return o?w.createElement(wy,{page:l,matches:o,...s}):null}function vy(l){let{manifest:s,routeModules:r}=Vh(),[o,d]=w.useState([]);return w.useEffect(()=>{let f=!1;return cy(l,s,r).then(m=>{f||d(m)}),()=>{f=!0}},[l,s,r]),o}function wy({page:l,matches:s,...r}){let o=Wt(),{manifest:d,routeModules:f}=Vh(),{basename:m}=Gh(),{loaderData:x,matches:h}=xy(),g=w.useMemo(()=>th(l,s,h,d,o,"data"),[l,s,h,d,o]),y=w.useMemo(()=>th(l,s,h,d,o,"assets"),[l,s,h,d,o]),S=w.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let j=new Set,C=!1;if(s.forEach(z=>{var U;let k=d.routes[z.route.id];!k||!k.hasLoader||(!g.some($=>$.route.id===z.route.id)&&z.route.id in x&&((U=f[z.route.id])!=null&&U.shouldRevalidate)||k.hasClientLoader?C=!0:j.add(z.route.id))}),j.size===0)return[];let T=py(l,m);return C&&j.size>0&&T.searchParams.set("_routes",s.filter(z=>j.has(z.route.id)).map(z=>z.route.id).join(",")),[T.pathname+T.search]},[m,x,o,d,g,s,l,f]),v=w.useMemo(()=>dy(y,d),[y,d]),O=vy(y);return w.createElement(w.Fragment,null,S.map(j=>w.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...r})),v.map(j=>w.createElement("link",{key:j,rel:"modulepreload",href:j,...r})),O.map(({key:j,link:C})=>w.createElement("link",{key:j,...C})))}function Sy(...l){return s=>{l.forEach(r=>{typeof r=="function"?r(s):r!=null&&(r.current=s)})}}var $h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{$h&&(window.__reactRouterVersion="7.6.1")}catch{}function jy({basename:l,children:s,window:r}){let o=w.useRef();o.current==null&&(o.current=ix({window:r,v5Compat:!0}));let d=o.current,[f,m]=w.useState({action:d.action,location:d.location}),x=w.useCallback(h=>{w.startTransition(()=>m(h))},[m]);return w.useLayoutEffect(()=>d.listen(x),[d,x]),w.createElement(Ix,{basename:l,children:s,location:f.location,navigationType:f.action,navigator:d})}var Yh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Kh=w.forwardRef(function({onClick:s,discover:r="render",prefetch:o="none",relative:d,reloadDocument:f,replace:m,state:x,target:h,to:g,preventScrollReset:y,viewTransition:S,...v},O){let{basename:j}=w.useContext($t),C=typeof g=="string"&&Yh.test(g),T,z=!1;if(typeof g=="string"&&C&&(T=g,$h))try{let I=new URL(window.location.href),H=g.startsWith("//")?new URL(I.protocol+g):new URL(g),q=xa(H.pathname,j);H.origin===I.origin&&q!=null?g=q+H.search+H.hash:z=!0}catch{Vt(!1,`<Link to="${g}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let k=Dx(g,{relative:d}),[U,$,K]=yy(o,v),ue=Cy(g,{replace:m,state:x,target:h,preventScrollReset:y,relative:d,viewTransition:S});function X(I){s&&s(I),I.defaultPrevented||ue(I)}let Y=w.createElement("a",{...v,...K,href:T||k,onClick:z||f?s:X,ref:Sy(O,$),target:h,"data-discover":!C&&r==="render"?"true":void 0});return U&&!C?w.createElement(w.Fragment,null,Y,w.createElement(by,{page:k})):Y});Kh.displayName="Link";var Qh=w.forwardRef(function({"aria-current":s="page",caseSensitive:r=!1,className:o="",end:d=!1,style:f,to:m,viewTransition:x,children:h,...g},y){let S=vs(m,{relative:g.relative}),v=Wt(),O=w.useContext(Fr),{navigator:j,basename:C}=w.useContext($t),T=O!=null&&Oy(S)&&x===!0,z=j.encodeLocation?j.encodeLocation(S).pathname:S.pathname,k=v.pathname,U=O&&O.navigation&&O.navigation.location?O.navigation.location.pathname:null;r||(k=k.toLowerCase(),U=U?U.toLowerCase():null,z=z.toLowerCase()),U&&C&&(U=xa(U,C)||U);const $=z!=="/"&&z.endsWith("/")?z.length-1:z.length;let K=k===z||!d&&k.startsWith(z)&&k.charAt($)==="/",ue=U!=null&&(U===z||!d&&U.startsWith(z)&&U.charAt(z.length)==="/"),X={isActive:K,isPending:ue,isTransitioning:T},Y=K?s:void 0,I;typeof o=="function"?I=o(X):I=[o,K?"active":null,ue?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let H=typeof f=="function"?f(X):f;return w.createElement(Kh,{...g,"aria-current":Y,className:I,ref:y,style:H,to:m,viewTransition:x},typeof h=="function"?h(X):h)});Qh.displayName="NavLink";var Ny=w.forwardRef(({discover:l="render",fetcherKey:s,navigate:r,reloadDocument:o,replace:d,state:f,method:m=Yr,action:x,onSubmit:h,relative:g,preventScrollReset:y,viewTransition:S,...v},O)=>{let j=Ay(),C=Ry(x,{relative:g}),T=m.toLowerCase()==="get"?"get":"post",z=typeof x=="string"&&Yh.test(x),k=U=>{if(h&&h(U),U.defaultPrevented)return;U.preventDefault();let $=U.nativeEvent.submitter,K=($==null?void 0:$.getAttribute("formmethod"))||m;j($||U.currentTarget,{fetcherKey:s,method:K,navigate:r,replace:d,state:f,relative:g,preventScrollReset:y,viewTransition:S})};return w.createElement("form",{ref:O,method:T,action:C,onSubmit:o?h:k,...v,"data-discover":!z&&l==="render"?"true":void 0})});Ny.displayName="Form";function Ey(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Xh(l){let s=w.useContext(rl);return Ve(s,Ey(l)),s}function Cy(l,{target:s,replace:r,state:o,preventScrollReset:d,relative:f,viewTransition:m}={}){let x=mn(),h=Wt(),g=vs(l,{relative:f});return w.useCallback(y=>{if(ly(y,s)){y.preventDefault();let S=r!==void 0?r:ps(h)===ps(g);x(l,{replace:S,state:o,preventScrollReset:d,relative:f,viewTransition:m})}},[h,x,g,r,o,s,l,d,f,m])}var ky=0,Ty=()=>`__${String(++ky)}__`;function Ay(){let{router:l}=Xh("useSubmit"),{basename:s}=w.useContext($t),r=Zx();return w.useCallback(async(o,d={})=>{let{action:f,method:m,encType:x,formData:h,body:g}=iy(o,s);if(d.navigate===!1){let y=d.fetcherKey||Ty();await l.fetch(y,r,d.action||f,{preventScrollReset:d.preventScrollReset,formData:h,body:g,formMethod:d.method||m,formEncType:d.encType||x,flushSync:d.flushSync})}else await l.navigate(d.action||f,{preventScrollReset:d.preventScrollReset,formData:h,body:g,formMethod:d.method||m,formEncType:d.encType||x,replace:d.replace,state:d.state,fromRouteId:r,flushSync:d.flushSync,viewTransition:d.viewTransition})},[l,s,r])}function Ry(l,{relative:s}={}){let{basename:r}=w.useContext($t),o=w.useContext(Ht);Ve(o,"useFormAction must be used inside a RouteContext");let[d]=o.matches.slice(-1),f={...vs(l||".",{relative:s})},m=Wt();if(l==null){f.search=m.search;let x=new URLSearchParams(f.search),h=x.getAll("index");if(h.some(y=>y==="")){x.delete("index"),h.filter(S=>S).forEach(S=>x.append("index",S));let y=x.toString();f.search=y?`?${y}`:""}}return(!l||l===".")&&d.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:pa([r,f.pathname])),ps(f)}function Oy(l,s={}){let r=w.useContext(Dh);Ve(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Xh("useViewTransitionState"),d=vs(l,{relative:s.relative});if(!r.isTransitioning)return!1;let f=xa(r.currentLocation.pathname,o)||r.currentLocation.pathname,m=xa(r.nextLocation.pathname,o)||r.nextLocation.pathname;return Qr(d.pathname,m)!=null||Qr(d.pathname,f)!=null}[...gy];const My=()=>window.__MCPHUB_CONFIG__||{basePath:"",version:"dev",name:"mcphub"},Zh=()=>{const s=My().basePath||"";return s&&!s.startsWith("/")?"/"+s:s},zy=()=>Zh()+"/api",Ne=l=>{const s=zy(),r=l.startsWith("/")?l:"/"+l;return s+r},Dy=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"}}},Yu="mcphub_token",Ka=()=>localStorage.getItem(Yu),Ph=l=>{localStorage.setItem(Yu,l)},Tu=()=>{localStorage.removeItem(Yu)},Uy=async l=>{try{console.log(Ne("/auth/login"));const r=await(await fetch(Ne("/auth/login"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})).json();return r.success&&r.token&&Ph(r.token),r}catch(s){return console.error("Login error:",s),{success:!1,message:"An error occurred during login"}}},Ly=async l=>{try{const r=await(await fetch(Ne("/auth/register"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})).json();return r.success&&r.token&&Ph(r.token),r}catch(s){return console.error("Register error:",s),{success:!1,message:"An error occurred during registration"}}},_y=async()=>{const l=Ka();if(!l)return{success:!1,message:"No authentication token"};try{return await(await fetch(Ne("/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"}}},Hy=async l=>{const s=Ka();if(!s)return{success:!1,message:"No authentication token"};try{return await(await fetch(Ne("/auth/change-password"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":s},body:JSON.stringify(l)})).json()}catch(r){return console.error("Change password error:",r),{success:!1,message:"An error occurred while changing password"}}},By=()=>{Tu()},Ft={token:null,isAuthenticated:!1,loading:!0,user:null,error:null},Jh=w.createContext({auth:Ft,login:async()=>!1,register:async()=>!1,logout:()=>{}}),qy=({children:l})=>{const[s,r]=w.useState(Ft);w.useEffect(()=>{(async()=>{const x=Ka();if(!x){r({...Ft,loading:!1});return}try{const h=await _y();h.success&&h.user?r({token:x,isAuthenticated:!0,loading:!1,user:h.user,error:null}):(Tu(),r({...Ft,loading:!1}))}catch{Tu(),r({...Ft,loading:!1})}})()},[]);const o=async(m,x)=>{try{const h=await Uy({username:m,password:x});return h.success&&h.token&&h.user?(r({token:h.token,isAuthenticated:!0,loading:!1,user:h.user,error:null}),!0):(r({...Ft,loading:!1,error:h.message||"Authentication failed"}),!1)}catch{return r({...Ft,loading:!1,error:"Authentication failed"}),!1}},d=async(m,x,h=!1)=>{try{const g=await Ly({username:m,password:x,isAdmin:h});return g.success&&g.token&&g.user?(r({token:g.token,isAuthenticated:!0,loading:!1,user:g.user,error:null}),!0):(r({...Ft,loading:!1,error:g.message||"Registration failed"}),!1)}catch{return r({...Ft,loading:!1,error:"Registration failed"}),!1}},f=()=>{By(),r({...Ft,loading:!1})};return u.jsx(Jh.Provider,{value:{auth:s,login:o,register:d,logout:f},children:l})},Wr=()=>w.useContext(Jh);/**
|
|
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 Gy=l=>l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Vy=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(s,r,o)=>o?o.toUpperCase():r.toLowerCase()),ah=l=>{const s=Vy(l);return s.charAt(0).toUpperCase()+s.slice(1)},Fh=(...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 $y={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 Yy=w.forwardRef(({color:l="currentColor",size:s=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:d="",children:f,iconNode:m,...x},h)=>w.createElement("svg",{ref:h,...$y,width:s,height:s,stroke:l,strokeWidth:o?Number(r)*24/Number(s):r,className:Fh("lucide",d),...x},[...m.map(([g,y])=>w.createElement(g,y)),...Array.isArray(f)?f:[f]]));/**
|
|
67
|
-
* @license lucide-react v0.486.0 - ISC
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the ISC license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const et=(l,s)=>{const r=w.forwardRef(({className:o,...d},f)=>w.createElement(Yy,{ref:f,iconNode:s,className:Fh(`lucide-${Gy(ah(l))}`,`lucide-${l}`,o),...d}));return r.displayName=ah(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 Ky=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ei=et("check",Ky);/**
|
|
77
|
-
* @license lucide-react v0.486.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const Qy=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ih=et("chevron-down",Qy);/**
|
|
82
|
-
* @license lucide-react v0.486.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const Xy=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Wh=et("chevron-right",Xy);/**
|
|
87
|
-
* @license lucide-react v0.486.0 - ISC
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the ISC license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const Zy=[["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"}]],eg=et("circle-alert",Zy);/**
|
|
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 Py=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Jy=et("circle-check-big",Py);/**
|
|
97
|
-
* @license lucide-react v0.486.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const Fy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Iy=et("circle-x",Fy);/**
|
|
102
|
-
* @license lucide-react v0.486.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const Wy=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],tg=et("copy",Wy);/**
|
|
107
|
-
* @license lucide-react v0.486.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const eb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],tb=et("info",eb);/**
|
|
112
|
-
* @license lucide-react v0.486.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const ab=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],nb=et("loader",ab);/**
|
|
117
|
-
* @license lucide-react v0.486.0 - ISC
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the ISC license.
|
|
120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const lb=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],sb=et("log-out",lb);/**
|
|
122
|
-
* @license lucide-react v0.486.0 - ISC
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the ISC license.
|
|
125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const rb=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],ib=et("moon",rb);/**
|
|
127
|
-
* @license lucide-react v0.486.0 - ISC
|
|
128
|
-
*
|
|
129
|
-
* This source code is licensed under the ISC license.
|
|
130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const ob=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],ub=et("play",ob);/**
|
|
132
|
-
* @license lucide-react v0.486.0 - ISC
|
|
133
|
-
*
|
|
134
|
-
* This source code is licensed under the ISC license.
|
|
135
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const cb=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],db=et("refresh-cw",cb);/**
|
|
137
|
-
* @license lucide-react v0.486.0 - ISC
|
|
138
|
-
*
|
|
139
|
-
* This source code is licensed under the ISC license.
|
|
140
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const fb=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],mb=et("settings",fb);/**
|
|
142
|
-
* @license lucide-react v0.486.0 - ISC
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the ISC license.
|
|
145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const hb=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],ag=et("square-pen",hb);/**
|
|
147
|
-
* @license lucide-react v0.486.0 - ISC
|
|
148
|
-
*
|
|
149
|
-
* This source code is licensed under the ISC license.
|
|
150
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const gb=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],pb=et("sun",gb);/**
|
|
152
|
-
* @license lucide-react v0.486.0 - ISC
|
|
153
|
-
*
|
|
154
|
-
* This source code is licensed under the ISC license.
|
|
155
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const xb=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],yb=et("trash",xb);/**
|
|
157
|
-
* @license lucide-react v0.486.0 - ISC
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the ISC license.
|
|
160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const bb=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],vb=et("user",bb);/**
|
|
162
|
-
* @license lucide-react v0.486.0 - ISC
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the ISC license.
|
|
165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const wb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xs=et("x",wb);function ng(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=ng(l[s]))&&(o&&(o+=" "),o+=r)}else for(r in l)l[r]&&(o&&(o+=" "),o+=r);return o}function Sb(){for(var l,s,r=0,o="",d=arguments.length;r<d;r++)(l=arguments[r])&&(s=ng(l))&&(o&&(o+=" "),o+=s);return o}const Ku="-",jb=l=>{const s=Eb(l),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=l;return{getClassGroupId:m=>{const x=m.split(Ku);return x[0]===""&&x.length!==1&&x.shift(),lg(x,s)||Nb(m)},getConflictingClassGroupIds:(m,x)=>{const h=r[m]||[];return x&&o[m]?[...h,...o[m]]:h}}},lg=(l,s)=>{var m;if(l.length===0)return s.classGroupId;const r=l[0],o=s.nextPart.get(r),d=o?lg(l.slice(1),o):void 0;if(d)return d;if(s.validators.length===0)return;const f=l.join(Ku);return(m=s.validators.find(({validator:x})=>x(f)))==null?void 0:m.classGroupId},nh=/^\[(.+)\]$/,Nb=l=>{if(nh.test(l)){const s=nh.exec(l)[1],r=s==null?void 0:s.substring(0,s.indexOf(":"));if(r)return"arbitrary.."+r}},Eb=l=>{const{theme:s,classGroups:r}=l,o={nextPart:new Map,validators:[]};for(const d in r)Au(r[d],o,d,s);return o},Au=(l,s,r,o)=>{l.forEach(d=>{if(typeof d=="string"){const f=d===""?s:lh(s,d);f.classGroupId=r;return}if(typeof d=="function"){if(Cb(d)){Au(d(o),s,r,o);return}s.validators.push({validator:d,classGroupId:r});return}Object.entries(d).forEach(([f,m])=>{Au(m,lh(s,f),r,o)})})},lh=(l,s)=>{let r=l;return s.split(Ku).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Cb=l=>l.isThemeGetter,kb=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)}}},Ru="!",Ou=":",Tb=Ou.length,Ab=l=>{const{prefix:s,experimentalParseClassName:r}=l;let o=d=>{const f=[];let m=0,x=0,h=0,g;for(let j=0;j<d.length;j++){let C=d[j];if(m===0&&x===0){if(C===Ou){f.push(d.slice(h,j)),h=j+Tb;continue}if(C==="/"){g=j;continue}}C==="["?m++:C==="]"?m--:C==="("?x++:C===")"&&x--}const y=f.length===0?d:d.substring(h),S=Rb(y),v=S!==y,O=g&&g>h?g-h:void 0;return{modifiers:f,hasImportantModifier:v,baseClassName:S,maybePostfixModifierPosition:O}};if(s){const d=s+Ou,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},Rb=l=>l.endsWith(Ru)?l.substring(0,l.length-1):l.startsWith(Ru)?l.substring(1):l,Ob=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}},Mb=l=>({cache:kb(l.cacheSize),parseClassName:Ab(l),sortModifiers:Ob(l),...jb(l)}),zb=/\s+/,Db=(l,s)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:d,sortModifiers:f}=s,m=[],x=l.trim().split(zb);let h="";for(let g=x.length-1;g>=0;g-=1){const y=x[g],{isExternal:S,modifiers:v,hasImportantModifier:O,baseClassName:j,maybePostfixModifierPosition:C}=r(y);if(S){h=y+(h.length>0?" "+h:h);continue}let T=!!C,z=o(T?j.substring(0,C):j);if(!z){if(!T){h=y+(h.length>0?" "+h:h);continue}if(z=o(j),!z){h=y+(h.length>0?" "+h:h);continue}T=!1}const k=f(v).join(":"),U=O?k+Ru:k,$=U+z;if(m.includes($))continue;m.push($);const K=d(z,T);for(let ue=0;ue<K.length;++ue){const X=K[ue];m.push(U+X)}h=y+(h.length>0?" "+h:h)}return h};function Ub(){let l=0,s,r,o="";for(;l<arguments.length;)(s=arguments[l++])&&(r=sg(s))&&(o&&(o+=" "),o+=r);return o}const sg=l=>{if(typeof l=="string")return l;let s,r="";for(let o=0;o<l.length;o++)l[o]&&(s=sg(l[o]))&&(r&&(r+=" "),r+=s);return r};function Lb(l,...s){let r,o,d,f=m;function m(h){const g=s.reduce((y,S)=>S(y),l());return r=Mb(g),o=r.cache.get,d=r.cache.set,f=x,x(h)}function x(h){const g=o(h);if(g)return g;const y=Db(h,r);return d(h,y),y}return function(){return f(Ub.apply(null,arguments))}}const We=l=>{const s=r=>r[l]||[];return s.isThemeGetter=!0,s},rg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ig=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_b=/^\d+\/\d+$/,Hb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Gb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,el=l=>_b.test(l),je=l=>!!l&&!Number.isNaN(Number(l)),$a=l=>!!l&&Number.isInteger(Number(l)),Su=l=>l.endsWith("%")&&je(l.slice(0,-1)),ga=l=>Hb.test(l),$b=()=>!0,Yb=l=>Bb.test(l)&&!qb.test(l),og=()=>!1,Kb=l=>Gb.test(l),Qb=l=>Vb.test(l),Xb=l=>!de(l)&&!fe(l),Zb=l=>ol(l,dg,og),de=l=>rg.test(l),dn=l=>ol(l,fg,Yb),ju=l=>ol(l,Wb,je),sh=l=>ol(l,ug,og),Pb=l=>ol(l,cg,Qb),Br=l=>ol(l,mg,Kb),fe=l=>ig.test(l),fs=l=>ul(l,fg),Jb=l=>ul(l,ev),rh=l=>ul(l,ug),Fb=l=>ul(l,dg),Ib=l=>ul(l,cg),qr=l=>ul(l,mg,!0),ol=(l,s,r)=>{const o=rg.exec(l);return o?o[1]?s(o[1]):r(o[2]):!1},ul=(l,s,r=!1)=>{const o=ig.exec(l);return o?o[1]?s(o[1]):r:!1},ug=l=>l==="position"||l==="percentage",cg=l=>l==="image"||l==="url",dg=l=>l==="length"||l==="size"||l==="bg-size",fg=l=>l==="length",Wb=l=>l==="number",ev=l=>l==="family-name",mg=l=>l==="shadow",tv=()=>{const l=We("color"),s=We("font"),r=We("text"),o=We("font-weight"),d=We("tracking"),f=We("leading"),m=We("breakpoint"),x=We("container"),h=We("spacing"),g=We("radius"),y=We("shadow"),S=We("inset-shadow"),v=We("text-shadow"),O=We("drop-shadow"),j=We("blur"),C=We("perspective"),T=We("aspect"),z=We("ease"),k=We("animate"),U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],K=()=>[...$(),fe,de],ue=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto","contain","none"],Y=()=>[fe,de,h],I=()=>[el,"full","auto",...Y()],H=()=>[$a,"none","subgrid",fe,de],q=()=>["auto",{span:["full",$a,fe,de]},$a,fe,de],ae=()=>[$a,"auto",fe,de],le=()=>["auto","min","max","fr",fe,de],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...Y()],W=()=>[el,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Y()],A=()=>[l,fe,de],te=()=>[...$(),rh,sh,{position:[fe,de]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",Fb,Zb,{size:[fe,de]}],ne=()=>[Su,fs,dn],Z=()=>["","none","full",g,fe,de],ie=()=>["",je,fs,dn],be=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[je,Su,rh,sh],oe=()=>["","none",j,fe,de],he=()=>["none",je,fe,de],xe=()=>["none",je,fe,de],Oe=()=>[je,fe,de],qe=()=>[el,"full",...Y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ga],breakpoint:[ga],color:[$b],container:[ga],"drop-shadow":[ga],ease:["in","out","in-out"],font:[Xb],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ga],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ga],shadow:[ga],spacing:["px",je],text:[ga],"text-shadow":[ga],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",el,de,fe,T]}],container:["container"],columns:[{columns:[je,de,fe,x]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:K()}],overflow:[{overflow:ue()}],"overflow-x":[{"overflow-x":ue()}],"overflow-y":[{"overflow-y":ue()}],overscroll:[{overscroll:X()}],"overscroll-x":[{"overscroll-x":X()}],"overscroll-y":[{"overscroll-y":X()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[$a,"auto",fe,de]}],basis:[{basis:[el,"full","auto",x,...Y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,el,"auto","initial","none",de]}],grow:[{grow:["",je,fe,de]}],shrink:[{shrink:["",je,fe,de]}],order:[{order:[$a,"first","last","none",fe,de]}],"grid-cols":[{"grid-cols":H()}],"col-start-end":[{col:q()}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":H()}],"row-start-end":[{row:q()}],"row-start":[{"row-start":ae()}],"row-end":[{"row-end":ae()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":le()}],"auto-rows":[{"auto-rows":le()}],gap:[{gap:Y()}],"gap-x":[{"gap-x":Y()}],"gap-y":[{"gap-y":Y()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:Y()}],px:[{px:Y()}],py:[{py:Y()}],ps:[{ps:Y()}],pe:[{pe:Y()}],pt:[{pt:Y()}],pr:[{pr:Y()}],pb:[{pb:Y()}],pl:[{pl:Y()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":Y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Y()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[x,"screen",...W()]}],"min-w":[{"min-w":[x,"screen","none",...W()]}],"max-w":[{"max-w":[x,"screen","none","prose",{screen:[m]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",r,fs,dn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,fe,ju]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Su,de]}],"font-family":[{font:[Jb,de,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,fe,de]}],"line-clamp":[{"line-clamp":[je,"none",fe,ju]}],leading:[{leading:[f,...Y()]}],"list-image":[{"list-image":["none",fe,de]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",fe,de]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",fe,dn]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[je,"auto",fe,de]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe,de]}],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",fe,de]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},$a,fe,de],radial:["",fe,de],conic:[$a,fe,de]},Ib,Pb]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],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:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,fe,de]}],"outline-w":[{outline:["",je,fs,dn]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",y,qr,Br]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",S,qr,Br]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[je,dn]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",v,qr,Br]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[je,fe,de]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[je]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[fe,de]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":$()}],"mask-image-conic-pos":[{"mask-conic":[je]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",fe,de]}],filter:[{filter:["","none",fe,de]}],blur:[{blur:oe()}],brightness:[{brightness:[je,fe,de]}],contrast:[{contrast:[je,fe,de]}],"drop-shadow":[{"drop-shadow":["","none",O,qr,Br]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",je,fe,de]}],"hue-rotate":[{"hue-rotate":[je,fe,de]}],invert:[{invert:["",je,fe,de]}],saturate:[{saturate:[je,fe,de]}],sepia:[{sepia:["",je,fe,de]}],"backdrop-filter":[{"backdrop-filter":["","none",fe,de]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[je,fe,de]}],"backdrop-contrast":[{"backdrop-contrast":[je,fe,de]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,fe,de]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,fe,de]}],"backdrop-invert":[{"backdrop-invert":["",je,fe,de]}],"backdrop-opacity":[{"backdrop-opacity":[je,fe,de]}],"backdrop-saturate":[{"backdrop-saturate":[je,fe,de]}],"backdrop-sepia":[{"backdrop-sepia":["",je,fe,de]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Y()}],"border-spacing-x":[{"border-spacing-x":Y()}],"border-spacing-y":[{"border-spacing-y":Y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",fe,de]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",fe,de]}],ease:[{ease:["linear","initial",z,fe,de]}],delay:[{delay:[je,fe,de]}],animate:[{animate:["none",k,fe,de]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,fe,de]}],"perspective-origin":[{"perspective-origin":K()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":["scale-3d"],skew:[{skew:Oe()}],"skew-x":[{"skew-x":Oe()}],"skew-y":[{"skew-y":Oe()}],transform:[{transform:[fe,de,"","none","gpu","cpu"]}],"transform-origin":[{origin:K()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:qe()}],"translate-x":[{"translate-x":qe()}],"translate-y":[{"translate-y":qe()}],"translate-z":[{"translate-z":qe()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"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",fe,de]}],"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":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"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",fe,de]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[je,fs,dn,ju]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},av=Lb(tv);function Ya(...l){return av(Sb(l))}const nv=({message:l,type:s="info",duration:r=3e3,onClose:o,visible:d})=>{w.useEffect(()=>{if(d){const h=setTimeout(()=>{o()},r);return()=>clearTimeout(h)}},[d,r,o]);const f={success:u.jsx(ei,{className:"w-5 h-5 text-green-500"}),error:u.jsx(xs,{className:"w-5 h-5 text-red-500"}),info:u.jsx("svg",{className:"w-5 h-5 text-blue-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.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:u.jsx("svg",{className:"w-5 h-5 text-yellow-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.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"},x={success:"text-green-800",error:"text-red-800",info:"text-blue-800",warning:"text-yellow-800"};return u.jsx("div",{className:Ya("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:u.jsxs("div",{className:"flex items-start",children:[u.jsx("div",{className:"flex-shrink-0",children:f[s]}),u.jsx("div",{className:"ml-3",children:u.jsx("p",{className:Ya("text-sm font-medium",x[s]),children:l})}),u.jsx("div",{className:"ml-auto pl-3",children:u.jsx("div",{className:"-mx-1.5 -my-1.5",children:u.jsxs("button",{onClick:o,className:Ya("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:[u.jsx("span",{className:"sr-only",children:"Dismiss"}),u.jsx(xs,{className:"h-5 w-5"})]})})})]})})},hg=w.createContext(void 0),ws=()=>{const l=w.useContext(hg);if(!l)throw new Error("useToast must be used within a ToastProvider");return l},lv=({children:l})=>{const[s,r]=w.useState({message:"",type:"info",visible:!1,duration:3e3}),o=w.useCallback((f,m="info",x=3e3)=>{r({message:f,type:m,visible:!0,duration:x})},[]),d=w.useCallback(()=>{r(f=>({...f,visible:!1}))},[]);return u.jsxs(hg.Provider,{value:{showToast:o},children:[l,u.jsx(nv,{message:s.message,type:s.type,duration:s.duration,onClose:d,visible:s.visible})]})},gg=w.createContext(void 0),sv=()=>{const l=w.useContext(gg);if(!l)throw new Error("useTheme must be used within a ThemeProvider");return l},rv=({children:l})=>{const[s,r]=w.useState(()=>localStorage.getItem("theme")||"system"),[o,d]=w.useState("light"),f=m=>{r(m),localStorage.setItem("theme",m)};return w.useEffect(()=>{const m=()=>{const h=window.document.documentElement,g=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",y=s==="system"?g:s;d(y),y==="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="")},x=window.matchMedia("(prefers-color-scheme: dark)");return x.addEventListener("change",m),m(),()=>{x.removeEventListener("change",m)}},[s]),u.jsx(gg.Provider,{value:{theme:s,setTheme:f,resolvedTheme:o},children:l})},iv=(l,s,r,o)=>{var f,m,x,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);fn(d[0])&&(d[0]=`react-i18next:: ${d[0]}`),(h=(x=l==null?void 0:l.services)==null?void 0:x.logger)!=null&&h.warn?l.services.logger.warn(...d):console!=null&&console.warn&&console.warn(...d)},ih={},Mu=(l,s,r,o)=>{fn(r)&&ih[r]||(fn(r)&&(ih[r]=new Date),iv(l,s,r,o))},pg=(l,s)=>()=>{if(l.isInitialized)s();else{const r=()=>{setTimeout(()=>{l.off("initialized",r)},0),s()};l.on("initialized",r)}},zu=(l,s,r)=>{l.loadNamespaces(s,pg(l,r))},oh=(l,s,r,o)=>{if(fn(r)&&(r=[r]),l.options.preload&&l.options.preload.indexOf(s)>-1)return zu(l,r,o);r.forEach(d=>{l.options.ns.indexOf(d)<0&&l.options.ns.push(d)}),l.loadLanguages(s,pg(l,o))},ov=(l,s,r={})=>!s.languages||!s.languages.length?(Mu(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}}),fn=l=>typeof l=="string",uv=l=>typeof l=="object"&&l!==null,cv=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,dv={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},fv=l=>dv[l],mv=l=>l.replace(cv,fv);let Du={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:mv};const hv=(l={})=>{Du={...Du,...l}},gv=()=>Du;let xg;const pv=l=>{xg=l},xv=()=>xg,yv={type:"3rdParty",init(l){hv(l.options.react),pv(l)}},bv=w.createContext();class vv{constructor(){this.usedNamespaces={}}addUsedNamespaces(s){s.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const wv=(l,s)=>{const r=w.useRef();return w.useEffect(()=>{r.current=l},[l,s]),r.current},yg=(l,s,r,o)=>l.getFixedT(s,r,o),Sv=(l,s,r,o)=>w.useCallback(yg(l,s,r,o),[l,s,r,o]),Te=(l,s={})=>{var $,K,ue,X;const{i18n:r}=s,{i18n:o,defaultNS:d}=w.useContext(bv)||{},f=r||o||xv();if(f&&!f.reportNamespaces&&(f.reportNamespaces=new vv),!f){Mu(f,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const Y=(H,q)=>fn(q)?q:uv(q)&&fn(q.defaultValue)?q.defaultValue:Array.isArray(H)?H[H.length-1]:H,I=[Y,{},!1];return I.t=Y,I.i18n={},I.ready=!1,I}($=f.options.react)!=null&&$.wait&&Mu(f,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const m={...gv(),...f.options.react,...s},{useSuspense:x,keyPrefix:h}=m;let g=d||((K=f.options)==null?void 0:K.defaultNS);g=fn(g)?[g]:g||["translation"],(X=(ue=f.reportNamespaces).addUsedNamespaces)==null||X.call(ue,g);const y=(f.isInitialized||f.initializedStoreOnce)&&g.every(Y=>ov(Y,f,m)),S=Sv(f,s.lng||null,m.nsMode==="fallback"?g:g[0],h),v=()=>S,O=()=>yg(f,s.lng||null,m.nsMode==="fallback"?g:g[0],h),[j,C]=w.useState(v);let T=g.join();s.lng&&(T=`${s.lng}${T}`);const z=wv(T),k=w.useRef(!0);w.useEffect(()=>{const{bindI18n:Y,bindI18nStore:I}=m;k.current=!0,!y&&!x&&(s.lng?oh(f,s.lng,g,()=>{k.current&&C(O)}):zu(f,g,()=>{k.current&&C(O)})),y&&z&&z!==T&&k.current&&C(O);const H=()=>{k.current&&C(O)};return Y&&(f==null||f.on(Y,H)),I&&(f==null||f.store.on(I,H)),()=>{k.current=!1,f&&(Y==null||Y.split(" ").forEach(q=>f.off(q,H))),I&&f&&I.split(" ").forEach(q=>f.store.off(q,H))}},[f,T]),w.useEffect(()=>{k.current&&y&&C(v)},[f,h,y]);const U=[j,f,y];if(U.t=j,U.i18n=f,U.ready=y,y||!y&&!x)return U;throw new Promise(Y=>{s.lng?oh(f,s.lng,g,()=>Y()):zu(f,g,()=>Y())})},bg=()=>{const{t:l}=Te(),{theme:s,setTheme:r}=sv();return u.jsx("div",{className:"flex items-center space-x-2",children:u.jsxs("div",{className:"flex bg-gray-200 dark:bg-gray-700 rounded-lg p-1",children:[u.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:u.jsx(pb,{size:18})}),u.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:u.jsx(ib,{size:18})})]})})},jv=l=>u.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[u.jsx("title",{children:"GitHub"}),u.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]}),Nv=l=>u.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[u.jsx("title",{children:"Sponsor"}),u.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"})]}),Ev=l=>u.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[u.jsx("title",{children:"WeChat"}),u.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"})]}),Cv=l=>u.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[u.jsx("title",{children:"Discord"}),u.jsx("path",{d:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"})]}),kv=({open:l,onOpenChange:s})=>{const{i18n:r,t:o}=Te();return l?u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6 relative",children:[u.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:u.jsx(xs,{className:"h-5 w-5"})}),u.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:o("sponsor.title")}),u.jsx("div",{className:"flex flex-col items-center justify-center py-4",children:r.language==="zh"?u.jsx("img",{src:"./assets/reward.png",alt:o("sponsor.rewardAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}):u.jsxs("div",{className:"text-center",children:[u.jsx("p",{className:"mb-4 text-gray-700 dark:text-gray-300",children:o("sponsor.supportMessage")}),u.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},Tv=({open:l,onOpenChange:s})=>{const{t:r}=Te();return l?u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6 relative",children:[u.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:u.jsx(xs,{className:"h-5 w-5"})}),u.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:r("wechat.title")}),u.jsxs("div",{className:"flex flex-col items-center justify-center py-4",children:[u.jsx("img",{src:"./assets/wexin.png",alt:r("wechat.qrCodeAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}),u.jsx("p",{className:"mt-4 text-center text-gray-700 dark:text-gray-300",children:r("wechat.scanMessage")})]})]})})}):null},Av=({onToggleSidebar:l})=>{const{t:s,i18n:r}=Te(),{auth:o}=Wr(),[d,f]=w.useState(!1),[m,x]=w.useState(!1);return u.jsxs("header",{className:"bg-white dark:bg-gray-800 shadow-sm z-10",children:[u.jsxs("div",{className:"flex justify-between items-center px-4 py-3",children:[u.jsxs("div",{className:"flex items-center",children:[u.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:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),u.jsx("h1",{className:"ml-4 text-xl font-bold text-gray-900 dark:text-white",children:s("app.title")})]}),u.jsxs("div",{className:"flex items-center space-x-4",children:[u.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"v0.7.7"}),u.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:u.jsx(jv,{className:"h-5 w-5"})}),r.language==="zh"?u.jsx("button",{onClick:()=>x(!0),className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 focus:outline-none","aria-label":s("wechat.label"),children:u.jsx(Ev,{className:"h-5 w-5"})}):u.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:u.jsx(Cv,{className:"h-5 w-5"})}),u.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:u.jsx(Nv,{className:"h-5 w-5"})}),u.jsx(bg,{})]})]}),u.jsx(kv,{open:d,onOpenChange:f}),u.jsx(Tv,{open:m,onOpenChange:x})]})},Rv="https://registry.npmjs.org",Ov="@samanhappy/mcphub",vg=async()=>{try{const l=await fetch(`${Rv}/${Ov}/latest`);if(!l.ok)throw new Error(`Failed to fetch latest version: ${l.status}`);return(await l.json()).version||null}catch(l){return console.error("Error checking for latest version:",l),null}},wg=(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},Mv=({isOpen:l,onClose:s,version:r})=>{const{t:o}=Te(),[d,f]=w.useState(!1),[m,x]=w.useState(""),[h,g]=w.useState(!1),y=async()=>{g(!0);try{const S=await vg();S&&(x(S),f(wg(r,S)>0))}catch(S){console.error("Failed to check for updates:",S)}finally{g(!1)}};return w.useEffect(()=>{l&&y()},[l,r]),l?u.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-30 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6 relative",children:[u.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:u.jsx(xs,{className:"h-5 w-5"})}),u.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:o("about.title")}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("span",{className:"text-gray-700 dark:text-gray-300",children:[o("about.currentVersion"),":"]}),u.jsx("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:r})]}),d&&m&&u.jsx("div",{className:"bg-blue-50 dark:bg-blue-900 p-3 rounded",children:u.jsxs("div",{className:"flex items-start",children:[u.jsx("div",{className:"flex-shrink-0",children:u.jsx("svg",{className:"h-5 w-5 text-blue-600 dark:text-blue-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.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"})})}),u.jsxs("div",{className:"ml-3 flex-1 text-sm text-blue-700 dark:text-blue-300",children:[u.jsx("p",{children:o("about.newVersionAvailable",{version:m})}),u.jsx("p",{className:"mt-1",children:u.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")})})]})]})}),u.jsxs("button",{onClick:y,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
|
|
167
|
-
${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:[u.jsx(db,{className:`h-4 w-4 mr-2 ${h?"animate-spin":""}`}),o(h?"about.checking":"about.checkForUpdates")]})]})]})})}):null},zv=({collapsed:l,version:s})=>{var T;const{t:r}=Te(),o=mn(),{auth:d,logout:f}=Wr(),[m,x]=w.useState(!1),[h,g]=w.useState(!1),[y,S]=w.useState(!1),v=w.useRef(null);w.useEffect(()=>{(async()=>{try{const k=await vg();k&&g(wg(s,k)>0)}catch(k){console.error("Error checking for new version:",k)}})()},[s]),w.useEffect(()=>{const z=k=>{v.current&&!v.current.contains(k.target)&&x(!1)};return document.addEventListener("mousedown",z),()=>{document.removeEventListener("mousedown",z)}},[]);const O=()=>{o("/settings"),x(!1)},j=()=>{f(),o("/login")},C=()=>{S(!0),x(!1)};return u.jsxs("div",{ref:v,className:"relative",children:[u.jsxs("button",{onClick:()=>x(!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:[u.jsxs("div",{className:"flex-shrink-0 relative",children:[u.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:u.jsx(vb,{className:"h-4 w-4 text-gray-700 dark:text-gray-300"})}),h&&u.jsx("span",{className:"absolute -top-1 -right-1 block w-2 h-2 bg-red-500 rounded-full"})]}),!l&&u.jsx("div",{className:"ml-3 flex flex-col items-start",children:u.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:((T=d.user)==null?void 0:T.username)||r("auth.user")})})]}),m&&u.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:[u.jsxs("button",{onClick:O,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:[u.jsx(mb,{className:"h-4 w-4 mr-2"}),r("nav.settings")]}),u.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:[u.jsx(tb,{className:"h-4 w-4 mr-2"}),r("about.title"),h&&u.jsx("span",{className:"absolute top-2 right-4 block w-2 h-2 bg-red-500 rounded-full"})]}),u.jsxs("button",{onClick:j,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:[u.jsx(sb,{className:"h-4 w-4 mr-2"}),r("app.logout")]})]}),u.jsx(Mv,{isOpen:y,onClose:()=>S(!1),version:s})]})},Dv=({collapsed:l})=>{const{t:s}=Te();Wt();const r="0.7.7",o=[{path:"/",label:s("nav.dashboard"),icon:u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[u.jsx("path",{d:"M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"}),u.jsx("path",{d:"M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"})]})},{path:"/servers",label:s("nav.servers"),icon:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.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:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.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:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.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:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.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 u.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:[u.jsx("div",{className:"overflow-y-auto flex-grow",children:u.jsx("nav",{className:"p-3 space-y-1",children:o.map(d=>u.jsxs(Qh,{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:[u.jsx("span",{className:"flex-shrink-0",children:d.icon}),!l&&u.jsx("span",{className:"ml-3",children:d.label})]},d.path))})}),u.jsx("div",{className:"p-3 bg-white dark:bg-gray-800",children:u.jsx(zv,{collapsed:l,version:r})})]})},Uv=({children:l})=>u.jsx("main",{className:"flex-1 overflow-auto p-6 bg-gray-100 dark:bg-gray-900",children:u.jsx("div",{className:"container mx-auto",children:l})}),Lv=()=>{const[l,s]=Eu.useState(!1),r=()=>{s(!l)};return u.jsxs("div",{className:"flex flex-col h-screen bg-gray-100 dark:bg-gray-900",children:[u.jsx(Av,{onToggleSidebar:r}),u.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[u.jsx(Dv,{collapsed:l}),u.jsx(Uv,{children:u.jsx(qh,{})})]})]})},_v=({redirectPath:l="/login"})=>{const{t:s}=Te(),{auth:r}=Wr();return r.loading?u.jsx("div",{className:"flex items-center justify-center h-screen",children:s("app.loading")}):r.isAuthenticated?u.jsx(qh,{}):u.jsx(Bh,{to:l,replace:!0})},Hv=()=>{const{t:l}=Te(),[s,r]=w.useState(""),[o,d]=w.useState(""),[f,m]=w.useState(null),[x,h]=w.useState(!1),{login:g}=Wr(),y=mn(),S=async v=>{v.preventDefault(),m(null),h(!0);try{if(!s||!o){m(l("auth.emptyFields")),h(!1);return}await g(s,o)?y("/"):m(l("auth.loginFailed"))}catch{m(l("auth.loginError"))}finally{h(!1)}};return u.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:[u.jsx("div",{className:"absolute top-4 right-4",children:u.jsx(bg,{})}),u.jsxs("div",{className:"max-w-md w-full space-y-8",children:[u.jsx("div",{children:u.jsx("h2",{className:"mt-6 text-center text-3xl font-extrabold text-gray-900 dark:text-white",children:l("auth.loginTitle")})}),u.jsxs("form",{className:"mt-8 space-y-6",onSubmit:S,children:[u.jsxs("div",{className:"rounded-md shadow-sm -space-y-px",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"username",className:"sr-only",children:l("auth.username")}),u.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:v=>r(v.target.value)})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"password",className:"sr-only",children:l("auth.password")}),u.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:v=>d(v.target.value)})]})]}),f&&u.jsx("div",{className:"text-red-500 dark:text-red-400 text-sm text-center",children:f}),u.jsx("div",{children:u.jsx("button",{type:"submit",disabled:x,className:"group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:l(x?"auth.loggingIn":"auth.login")})})]})]})]})},Gr={startup:{maxAttempts:60,pollingInterval:3e3},normal:{pollingInterval:1e4}},Ss=()=>{const{t:l}=Te(),[s,r]=w.useState([]),[o,d]=w.useState(null),[f,m]=w.useState(0),[x,h]=w.useState(!0),[g,y]=w.useState(0),S=w.useRef(null),v=w.useRef(0),O=()=>{S.current&&(clearInterval(S.current),S.current=null)},j=w.useCallback(()=>{O();const $=async()=>{try{const K=localStorage.getItem("mcphub_token"),X=await(await fetch(Ne("/servers"),{headers:{"x-auth-token":K||""}})).json();X&&X.success&&Array.isArray(X.data)?r(X.data):X&&Array.isArray(X)?r(X):(console.error("Invalid server data format:",X),r([])),d(null)}catch(K){console.error("Error fetching servers during normal polling:",K),navigator.onLine?K instanceof TypeError&&(K.message.includes("NetworkError")||K.message.includes("Failed to fetch"))?d(l("errors.serverConnection")):d(l("errors.serverFetch")):d(l("errors.network"))}};$(),S.current=setInterval($,Gr.normal.pollingInterval)},[l]);return w.useEffect(()=>{f>0&&(v.current=0,y(0));const $=async()=>{try{const K=localStorage.getItem("mcphub_token"),X=await(await fetch(Ne("/servers"),{headers:{"x-auth-token":K||""}})).json();return X&&X.success&&Array.isArray(X.data)?(r(X.data),h(!1),j(),!0):X&&Array.isArray(X)?(r(X),h(!1),j(),!0):(console.error("Invalid server data format:",X),r([]),h(!1),j(),!0)}catch(K){return v.current+=1,console.error(`Initial loading attempt ${v.current} failed:`,K),y(v.current),navigator.onLine?d(l("errors.initialStartup")):d(l("errors.network")),v.current>=Gr.startup.maxAttempts&&(console.log("Maximum startup attempts reached, switching to normal polling"),h(!1),O(),j()),!1}};return x?(O(),$(),S.current=setInterval($,Gr.startup.pollingInterval),console.log(`Started initial polling with interval: ${Gr.startup.pollingInterval}ms`)):j(),()=>{O()}},[f,l,x,j]),{servers:s,error:o,setError:d,isLoading:x,fetchAttempts:g,triggerRefresh:()=>{O(),x&&(h(!0),v.current=0,y(0)),m($=>$+1)},handleServerAdd:()=>{m($=>$+1)},handleServerEdit:async $=>{try{const K=localStorage.getItem("mcphub_token"),X=await(await fetch(Ne("/settings"),{headers:{"x-auth-token":K||""}})).json();if(X&&X.success&&X.data&&X.data.mcpServers&&X.data.mcpServers[$.name]){const Y=X.data.mcpServers[$.name];return{name:$.name,status:$.status,tools:$.tools||[],config:Y}}else return console.error("Failed to get server config from settings:",X),d(l("server.invalidConfig",{serverName:$.name})),null}catch(K){return console.error("Error fetching server settings:",K),d(K instanceof Error?K.message:String(K)),null}},handleServerRemove:async $=>{try{const K=localStorage.getItem("mcphub_token"),ue=await fetch(Ne(`/servers/${$}`),{method:"DELETE",headers:{"x-auth-token":K||""}}),X=await ue.json();return ue.ok?(m(Y=>Y+1),!0):(d(X.message||l("server.deleteError",{serverName:$})),!1)}catch(K){return d(l("errors.general")+": "+(K instanceof Error?K.message:String(K))),!1}},handleServerToggle:async($,K)=>{try{const ue=localStorage.getItem("mcphub_token"),X=await fetch(Ne(`/servers/${$.name}/toggle`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":ue||""},body:JSON.stringify({enabled:K})}),Y=await X.json();return X.ok?(m(I=>I+1),!0):(console.error("Failed to toggle server:",Y),d(l("server.toggleError",{serverName:$.name})),!1)}catch(ue){return console.error("Error toggling server:",ue),d(ue instanceof Error?ue.message:String(ue)),!1}}}},Bv=()=>{const{t:l}=Te(),{servers:s,error:r,setError:o,isLoading:d}=Ss(),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"},x=h=>s.length===0?0:Math.round(s.filter(g=>g.status===h).length/s.length*100);return u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:l("pages.dashboard.title")}),r&&u.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-red-600 text-lg font-medium",children:l("app.error")}),u.jsx("p",{className:"text-gray-600 mt-1",children:r})]}),u.jsx("button",{onClick:()=>o(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":l("app.closeButton"),children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.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?u.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:u.jsxs("div",{className:"flex flex-col items-center",children:[u.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:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.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"})]}),u.jsx("p",{className:"text-gray-600",children:l("app.loading")})]})}):u.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4",children:[u.jsx("div",{className:"bg-white rounded-lg shadow p-6",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-3 rounded-full bg-blue-100 text-blue-800",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.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"})})}),u.jsxs("div",{className:"ml-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:l("pages.dashboard.totalServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.total})]})]})}),u.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-3 rounded-full bg-green-100 text-green-800",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.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"})})}),u.jsxs("div",{className:"ml-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:l("pages.dashboard.onlineServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.online})]})]}),u.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:u.jsx("div",{className:"h-full bg-green-500 rounded-full",style:{width:`${x("connected")}%`}})})]}),u.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-3 rounded-full bg-red-100 text-red-800",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.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"})})}),u.jsxs("div",{className:"ml-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:l("pages.dashboard.offlineServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.offline})]})]}),u.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:u.jsx("div",{className:"h-full bg-red-500 rounded-full",style:{width:`${x("disconnected")}%`}})})]}),u.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-3 rounded-full bg-yellow-100 text-yellow-800",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),u.jsxs("div",{className:"ml-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:l("pages.dashboard.connectingServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.connecting})]})]}),u.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:u.jsx("div",{className:"h-full bg-yellow-500 rounded-full",style:{width:`${x("connecting")}%`}})})]})]}),s.length>0&&!d&&u.jsxs("div",{className:"mt-8",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:l("pages.dashboard.recentServers")}),u.jsx("div",{className:"bg-white shadow rounded-lg overflow-hidden",children:u.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[u.jsx("thead",{className:"bg-gray-50",children:u.jsxs("tr",{children:[u.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")}),u.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")}),u.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")}),u.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")})]})}),u.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:s.slice(0,5).map((h,g)=>{var y;return u.jsxs("tr",{children:[u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:h.name}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:u.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)})}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:((y=h.tools)==null?void 0:y.length)||0}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:h.enabled!==!1?u.jsx("span",{className:"text-green-600",children:"✓"}):u.jsx("span",{className:"text-red-600",children:"✗"})})]},g)})})]})})]})]})},qv="modulepreload",Gv=function(l,s){return new URL(l,s).href},uh={},Vv=function(s,r,o){let d=Promise.resolve();if(r&&r.length>0){let m=function(y){return Promise.all(y.map(S=>Promise.resolve(S).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const x=document.getElementsByTagName("link"),h=document.querySelector("meta[property=csp-nonce]"),g=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));d=m(r.map(y=>{if(y=Gv(y,o),y in uh)return;uh[y]=!0;const S=y.endsWith(".css"),v=S?'[rel="stylesheet"]':"";if(!!o)for(let C=x.length-1;C>=0;C--){const T=x[C];if(T.href===y&&(!S||T.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${v}`))return;const j=document.createElement("link");if(j.rel=S?"stylesheet":qv,S||(j.as="script"),j.crossOrigin="",j.href=y,g&&j.setAttribute("nonce",g),document.head.appendChild(j),S)return new Promise((C,T)=>{j.addEventListener("load",C),j.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${y}`)))})}))}function f(m){const x=new Event("vite:preloadError",{cancelable:!0});if(x.payload=m,window.dispatchEvent(x),!x.defaultPrevented)throw m}return d.then(m=>{for(const x of m||[])x.status==="rejected"&&f(x.reason);return s().catch(f)})},$v={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 Vr({children:l,variant:s="default",className:r,onClick:o}){return u.jsx("span",{className:Ya("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors",$v[s],o?"cursor-pointer":"",r),onClick:o,children:l})}const Yv=({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 u.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${r[l]}`,children:s(o[l]||l)})},Sg=async(l,s)=>{try{const r=Ka();if(!r)throw new Error("Authentication token not found. Please log in.");const o=s?`/tools/call/${s}`:"/tools/call",d=await fetch(Ne(o),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":r,Authorization:`Bearer ${r}`},body:JSON.stringify({toolName:l.toolName,arguments:l.arguments})});if(!d.ok)throw new Error(`HTTP ${d.status}: ${d.statusText}`);const f=await d.json();return f.success?{success:!0,content:f.data.content||[]}:{success:!1,error:f.message||"Tool call failed"}}catch(r){return console.error("Error calling tool:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}},Kv=async(l,s,r)=>{try{const o=Ka();if(!o)throw new Error("Authentication token not found. Please log in.");const d=await fetch(Ne(`/servers/${l}/tools/${s}/toggle`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":o,Authorization:`Bearer ${o}`},body:JSON.stringify({enabled:r})});if(!d.ok)throw new Error(`HTTP ${d.status}: ${d.statusText}`);const f=await d.json();return{success:f.success,error:f.success?void 0:f.message}}catch(o){return console.error("Error toggling tool:",o),{success:!1,error:o instanceof Error?o.message:"Unknown error occurred"}}},jg=async(l,s,r)=>{try{const o=Ka();if(!o)throw new Error("Authentication token not found. Please log in.");const d=await fetch(Ne(`/servers/${l}/tools/${s}/description`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":o,Authorization:`Bearer ${o}`},body:JSON.stringify({description:r})});if(!d.ok)throw new Error(`HTTP ${d.status}: ${d.statusText}`);const f=await d.json();return{success:f.success,error:f.success?void 0:f.message}}catch(o){return console.error("Error updating tool description:",o),{success:!1,error:o instanceof Error?o.message:"Unknown error occurred"}}},Qv=Object.freeze(Object.defineProperty({__proto__:null,callTool:Sg,toggleTool:Kv,updateToolDescription:jg},Symbol.toStringTag,{value:"Module"})),Xv=({value:l,isSelected:s,onClick:r,children:o})=>u.jsxs("button",{type:"button",role:"checkbox","aria-checked":s,className:Ya("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:[u.jsx("span",{className:"flex items-center",children:o}),s&&u.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:u.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"})})]}),Ng=({label:l,helpText:s,noOptionsText:r="No options available",values:o,options:d,onChange:f,className:m})=>{const x=h=>{const g=o.includes(h);f(g?o.filter(y=>y!==h):[...o,h])};return u.jsxs("div",{className:m,children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:l}),u.jsx("div",{className:"border rounded shadow max-h-60 overflow-y-auto",children:d.length===0?u.jsx("p",{className:"text-gray-500 text-sm p-3",children:r}):u.jsx("div",{className:"space-y-1 p-1",children:d.map(h=>u.jsx(Xv,{value:h.value,isSelected:o.includes(h.value),onClick:()=>x(h.value),children:h.label},h.value))})}),s&&u.jsx("p",{className:"text-xs text-gray-500 mt-1",children:s})]})},hs=({checked:l,onCheckedChange:s,disabled:r=!1})=>u.jsx("button",{type:"button",role:"switch","aria-checked":l,disabled:r,className:Ya("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:u.jsx("span",{className:Ya("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",l?"translate-x-6":"translate-x-1")})}),Zv=({schema:l,onSubmit:s,onCancel:r,loading:o=!1,storageKey:d})=>{const{t:f}=Te(),[m,x]=w.useState({}),[h,g]=w.useState({}),[y,S]=w.useState(!1),[v,O]=w.useState(""),[j,C]=w.useState(""),T=w.useMemo(()=>(q=>{const ae=le=>{if(typeof le=="object"&&le!==null){const se=le;return{type:se.type||"string",description:se.description,enum:se.enum,default:se.default,properties:se.properties?Object.fromEntries(Object.entries(se.properties).map(([G,M])=>[G,ae(M)])):void 0,required:se.required,items:se.items?ae(se.items):void 0}}return{type:"string"}};return{type:q.type,properties:q.properties?Object.fromEntries(Object.entries(q.properties).map(([le,se])=>[le,ae(se)])):void 0,required:q.required}})(l),[l]);w.useEffect(()=>{const H=(ae,le="")=>{const se={};return ae.type==="object"&&ae.properties&&Object.entries(ae.properties).forEach(([G,M])=>{const W=le?`${le}.${G}`:G;M.default!==void 0?se[G]=M.default:M.type==="string"?se[G]="":M.type==="number"||M.type==="integer"?se[G]=0:M.type==="boolean"?se[G]=!1:M.type==="array"?se[G]=[]:M.type==="object"&&(M.properties?se[G]=H(M,W):se[G]={})}),se};let q=H(T);if(d)try{const ae=localStorage.getItem(d);if(ae){const le=JSON.parse(ae);q={...q,...le}}}catch(ae){console.warn("Failed to load saved form data:",ae)}x(q)},[T,d]),w.useEffect(()=>{y&&Object.keys(m).length>0&&(O(JSON.stringify(m,null,2)),C(""))},[y,m]);const z=H=>{O(H),C("");try{const q=JSON.parse(H);if(x(q),d)try{localStorage.setItem(d,JSON.stringify(q))}catch(ae){console.warn("Failed to save form data to localStorage:",ae)}}catch{C(f("tool.invalidJsonFormat"))}},k=()=>{O(JSON.stringify(m,null,2)),C(""),S(!0)},U=()=>{if(v.trim())try{const H=JSON.parse(v);x(H),C(""),S(!1)}catch{C(f("tool.fixJsonBeforeSwitching"));return}else S(!1)},$=(H,q)=>{x(ae=>{const le={...ae},se=H.split(".");let G=le;for(let M=0;M<se.length-1;M++)G[se[M]]||(G[se[M]]={}),G=G[se[M]];if(G[se[se.length-1]]=q,d)try{localStorage.setItem(d,JSON.stringify(le))}catch(M){console.warn("Failed to save form data to localStorage:",M)}return le}),h[H]&&g(ae=>{const le={...ae};return delete le[H],le})},K=()=>{const H={},q=(ae,le,se="")=>{ae.type==="object"&&ae.properties&&Object.entries(ae.properties).forEach(([G,M])=>{var te;const W=se?`${se}.${G}`:G,A=X(le,W);if((te=ae.required)!=null&&te.includes(G)&&(A==null||A==="")){H[W]=`${G} is required`;return}A!=null&&A!==""&&(M.type==="string"&&typeof A!="string"?H[W]=`${G} must be a string`:M.type==="number"&&typeof A!="number"?H[W]=`${G} must be a number`:M.type==="integer"&&(!Number.isInteger(A)||typeof A!="number")?H[W]=`${G} must be an integer`:M.type==="boolean"&&typeof A!="boolean"?H[W]=`${G} must be a boolean`:M.type==="array"&&Array.isArray(A)?M.items&&A.forEach((N,Q)=>{var ne;((ne=M.items)==null?void 0:ne.type)==="object"&&M.items.properties&&q(M.items,N,`${W}.${Q}`)}):M.type==="object"&&typeof A=="object"&&q(M,A,W))})};return q(T,m),g(H),Object.keys(H).length===0},ue=H=>{H.preventDefault(),K()&&s(m)},X=(H,q)=>q.split(".").reduce((ae,le)=>ae==null?void 0:ae[le],H),Y=(H,q,ae,le)=>{const se=ae==null?void 0:ae[H];return q.type==="string"?q.enum?u.jsxs("select",{value:se||"",onChange:G=>le(G.target.value),className:"w-full border rounded-md px-2 py-1 text-sm border-gray-300 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[u.jsx("option",{value:"",children:f("tool.selectOption")}),q.enum.map((G,M)=>u.jsx("option",{value:G,children:G},M))]}):u.jsx("input",{type:"text",value:se||"",onChange:G=>le(G.target.value),className:"w-full border rounded-md px-2 py-1 text-sm border-gray-300 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:q.description||f("tool.enterKey",{key:H})}):q.type==="number"||q.type==="integer"?u.jsx("input",{type:"number",step:q.type==="integer"?"1":"any",value:se||"",onChange:G=>{const M=G.target.value===""?"":q.type==="integer"?parseInt(G.target.value):parseFloat(G.target.value);le(M)},className:"w-full border rounded-md px-2 py-1 text-sm border-gray-300 focus:outline-none focus:ring-1 focus:ring-blue-500"}):q.type==="boolean"?u.jsx("input",{type:"checkbox",checked:se||!1,onChange:G=>le(G.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}):u.jsx("input",{type:"text",value:se||"",onChange:G=>le(G.target.value),className:"w-full border rounded-md px-2 py-1 text-sm border-gray-300 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:q.description||f("tool.enterKey",{key:H})})},I=(H,q,ae="")=>{var M,W,A,te,N,Q,ne,Z,ie,be,ee,re,oe,he;const le=ae?`${ae}.${H}`:H,se=X(m,le),G=h[le];if(q.type==="array"){const xe=X(m,le)||[];return u.jsxs("div",{className:"mb-6",children:[u.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[H,(ae?(W=(M=X(T,ae))==null?void 0:M.required)==null?void 0:W.includes(H):(A=T.required)==null?void 0:A.includes(H))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),q.description&&u.jsx("p",{className:"text-xs text-gray-500 mb-2",children:q.description}),u.jsxs("div",{className:"border border-gray-200 rounded-md p-3 bg-gray-50",children:[xe.map((Oe,qe)=>{var Yt,Kt,hn;return u.jsxs("div",{className:"mb-3 p-3 bg-white border rounded-md",children:[u.jsxs("div",{className:"flex justify-between items-center mb-2",children:[u.jsx("span",{className:"text-sm font-medium text-gray-600",children:f("tool.item",{index:qe+1})}),u.jsx("button",{type:"button",onClick:()=>{const st=[...xe];st.splice(qe,1),$(le,st)},className:"text-red-500 hover:text-red-700 text-sm",children:f("common.remove")})]}),((Yt=q.items)==null?void 0:Yt.type)==="string"&&q.items.enum?u.jsxs("select",{value:Oe||"",onChange:st=>{const Ze=[...xe];Ze[qe]=st.target.value,$(le,Ze)},className:"w-full border rounded-md px-3 py-2 border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500",children:[u.jsx("option",{value:"",children:f("tool.selectOption")}),q.items.enum.map((st,Ze)=>u.jsx("option",{value:st,children:st},Ze))]}):((Kt=q.items)==null?void 0:Kt.type)==="object"&&q.items.properties?u.jsx("div",{className:"space-y-3",children:Object.entries(q.items.properties).map(([st,Ze])=>{var js,cl;return u.jsxs("div",{children:[u.jsxs("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:[st,((cl=(js=q.items)==null?void 0:js.required)==null?void 0:cl.includes(st))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),Y(st,Ze,Oe,Ns=>{const ya=[...xe];ya[qe]={...ya[qe],[st]:Ns},$(le,ya)})]},st)})}):u.jsx("input",{type:"text",value:Oe||"",onChange:st=>{const Ze=[...xe];Ze[qe]=st.target.value,$(le,Ze)},className:"w-full border rounded-md px-3 py-2 border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:f("tool.enterValue",{type:((hn=q.items)==null?void 0:hn.type)||"value"})})]},qe)}),u.jsx("button",{type:"button",onClick:()=>{var qe;const Oe=((qe=q.items)==null?void 0:qe.type)==="object"?{}:"";$(le,[...xe,Oe])},className:"w-full mt-2 px-3 py-2 text-sm text-blue-600 border border-blue-300 rounded-md hover:bg-blue-50",children:f("tool.addItem",{key:H})})]}),G&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:G})]},le)}return q.type==="object"?q.properties?u.jsxs("div",{className:"mb-6",children:[u.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[H,(ae?(N=(te=X(T,ae))==null?void 0:te.required)==null?void 0:N.includes(H):(Q=T.required)==null?void 0:Q.includes(H))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),q.description&&u.jsx("p",{className:"text-xs text-gray-500 mb-2",children:q.description}),u.jsx("div",{className:"border border-gray-200 rounded-md p-4 bg-gray-50",children:Object.entries(q.properties).map(([xe,Oe])=>I(xe,Oe,le))}),G&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:G})]},le):u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[H,(ae?(Z=(ne=X(T,ae))==null?void 0:ne.required)==null?void 0:Z.includes(H):(ie=T.required)==null?void 0:ie.includes(H))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"}),u.jsx("span",{className:"text-xs text-gray-500 ml-1",children:"(JSON object)"})]}),q.description&&u.jsx("p",{className:"text-xs text-gray-500 mb-2",children:q.description}),u.jsx("textarea",{value:typeof se=="object"?JSON.stringify(se,null,2):se||"{}",onChange:xe=>{try{const Oe=JSON.parse(xe.target.value);$(le,Oe)}catch{$(le,xe.target.value)}},placeholder:`{
|
|
168
|
-
"key": "value"
|
|
169
|
-
}`,className:`w-full border rounded-md px-3 py-2 font-mono text-sm ${G?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`,rows:4}),G&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:G})]},le):q.type==="string"?q.enum?u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[H,(ae?!1:(be=T.required)==null?void 0:be.includes(H))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),q.description&&u.jsx("p",{className:"text-xs text-gray-500 mb-2",children:q.description}),u.jsxs("select",{value:se||"",onChange:xe=>$(le,xe.target.value),className:`w-full border rounded-md px-3 py-2 ${G?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[u.jsx("option",{value:"",children:f("tool.selectOption")}),q.enum.map((xe,Oe)=>u.jsx("option",{value:xe,children:xe},Oe))]}),G&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:G})]},le):u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[H,(ae?!1:(ee=T.required)==null?void 0:ee.includes(H))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),q.description&&u.jsx("p",{className:"text-xs text-gray-500 mb-2",children:q.description}),u.jsx("input",{type:"text",value:se||"",onChange:xe=>$(le,xe.target.value),className:`w-full border rounded-md px-3 py-2 ${G?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),G&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:G})]},le):q.type==="number"||q.type==="integer"?u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[H,(ae?!1:(re=T.required)==null?void 0:re.includes(H))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),q.description&&u.jsx("p",{className:"text-xs text-gray-500 mb-2",children:q.description}),u.jsx("input",{type:"number",step:q.type==="integer"?"1":"any",value:se||"",onChange:xe=>{const Oe=xe.target.value===""?"":q.type==="integer"?parseInt(xe.target.value):parseFloat(xe.target.value);$(le,Oe)},className:`w-full border rounded-md px-3 py-2 ${G?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),G&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:G})]},le):q.type==="boolean"?u.jsxs("div",{className:"mb-4",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("input",{type:"checkbox",checked:se||!1,onChange:xe=>$(le,xe.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),u.jsxs("label",{className:"ml-2 block text-sm text-gray-700",children:[H,(ae?!1:(oe=T.required)==null?void 0:oe.includes(H))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})]}),q.description&&u.jsx("p",{className:"text-xs text-gray-500 mt-1",children:q.description}),G&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:G})]},le):u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[H,(ae?!1:(he=T.required)==null?void 0:he.includes(H))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"}),u.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",q.type,")"]})]}),q.description&&u.jsx("p",{className:"text-xs text-gray-500 mb-2",children:q.description}),u.jsx("input",{type:"text",value:se||"",onChange:xe=>$(le,xe.target.value),placeholder:f("tool.enterValue",{type:q.type}),className:`w-full border rounded-md px-3 py-2 ${G?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),G&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:G})]},le)};return T.properties?u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex justify-between items-center border-b pb-3",children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900",children:f("tool.parameters")}),u.jsxs("div",{className:"flex space-x-2",children:[u.jsx("button",{type:"button",onClick:U,className:`px-3 py-1 text-sm rounded-md transition-colors ${y?"bg-gray-100 text-gray-600 hover:bg-gray-200":"bg-blue-600 text-white"}`,children:f("tool.formMode")}),u.jsx("button",{type:"button",onClick:k,className:`px-3 py-1 text-sm rounded-md transition-colors ${y?"bg-blue-600 text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:f("tool.jsonMode")})]})]}),y?u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:f("tool.jsonConfiguration")}),u.jsx("textarea",{value:v,onChange:H=>z(H.target.value),placeholder:`{
|
|
170
|
-
"key": "value"
|
|
171
|
-
}`,className:`w-full h-64 border rounded-md px-3 py-2 font-mono text-sm resize-y ${j?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),j&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:j})]}),u.jsxs("div",{className:"flex justify-end space-x-2 pt-4",children:[u.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-sm text-gray-600 bg-gray-100 rounded-md hover:bg-gray-200",children:f("tool.cancel")}),u.jsx("button",{onClick:()=>{try{const H=JSON.parse(v);s(H)}catch{C(f("tool.invalidJsonFormat"))}},disabled:o||!!j,className:"px-4 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50",children:f(o?"tool.running":"tool.runTool")})]})]}):u.jsxs("form",{onSubmit:ue,className:"space-y-4",children:[Object.entries(T.properties||{}).map(([H,q])=>I(H,q)),u.jsxs("div",{className:"flex justify-end space-x-2 pt-4",children:[u.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-sm text-gray-600 bg-gray-100 rounded-md hover:bg-gray-200",children:f("tool.cancel")}),u.jsx("button",{type:"submit",disabled:o,className:"px-4 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50",children:f(o?"tool.running":"tool.runTool")})]})]})]}):u.jsxs("div",{className:"p-4 bg-gray-50 rounded-md",children:[u.jsx("p",{className:"text-sm text-gray-600",children:f("tool.noParameters")}),u.jsxs("div",{className:"flex justify-end space-x-2 mt-4",children:[u.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-sm text-gray-600 bg-gray-100 rounded-md hover:bg-gray-200",children:f("tool.cancel")}),u.jsx("button",{onClick:()=>s({}),disabled:o,className:"px-4 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50",children:f(o?"tool.running":"tool.runTool")})]})]})},Pv=({result:l,onClose:s})=>{const{t:r}=Te(),o=l.content,d=m=>Array.isArray(m)?m.map((x,h)=>u.jsx("div",{className:"mb-3 last:mb-0",children:f(x)},h)):f(m),f=m=>{if(typeof m=="string")return u.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:u.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:m})});if(typeof m=="object"&&m!==null){if(m.type==="text"&&m.text)return u.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:u.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:m.text})});if(m.type==="image"&&m.data)return u.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:u.jsx("img",{src:`data:${m.mimeType||"image/png"};base64,${m.data}`,alt:r("tool.toolResult"),className:"max-w-full h-auto rounded-md"})});try{const x=typeof m=="string"?m:JSON.stringify(m,null,2),h=typeof m=="string"?JSON.parse(m):m;return u.jsxs("div",{className:"bg-gray-50 rounded-md p-3",children:[u.jsx("div",{className:"text-xs text-gray-500 mb-2",children:r("tool.jsonResponse")}),u.jsx("pre",{className:"text-sm text-gray-800 overflow-auto",children:JSON.stringify(h,null,2)})]})}catch{return u.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:u.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:String(m)})})}}return u.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:u.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:String(m)})})};return u.jsxs("div",{className:"border border-gray-300 rounded-lg bg-white shadow-sm",children:[u.jsx("div",{className:"border-b border-gray-300 px-4 py-3 bg-gray-50 rounded-t-lg",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[l.success?u.jsx(Jy,{size:20,className:"text-green-500"}):u.jsx(Iy,{size:20,className:"text-red-500"}),u.jsx("div",{children:u.jsxs("h4",{className:"text-sm font-medium text-gray-900",children:[r("tool.execution")," ",l.success?r("tool.successful"):r("tool.failed")]})})]}),u.jsx("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 text-sm",children:"✕"})]})}),u.jsx("div",{className:"p-4",children:l.success?u.jsx("div",{children:l.content&&l.content.length>0?u.jsxs("div",{children:[u.jsx("div",{className:"text-sm text-gray-600 mb-3",children:r("tool.result")}),d(l.content)]}):u.jsx("div",{className:"text-sm text-gray-500 italic",children:r("tool.noContent")})}):u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center space-x-2 mb-3",children:[u.jsx(eg,{size:16,className:"text-red-500"}),u.jsx("span",{className:"text-sm font-medium text-red-700",children:r("tool.error")})]}),o&&o.length>0?u.jsxs("div",{children:[u.jsx("div",{className:"text-sm text-gray-600 mb-3",children:r("tool.errorDetails")}),d(o)]}):u.jsx("div",{className:"bg-red-50 border border-red-300 rounded-md p-3",children:u.jsx("pre",{className:"text-sm text-red-800 whitespace-pre-wrap",children:l.error||l.message||r("tool.unknownError")})})]})})]})},Jv=({tool:l,server:s,onToggle:r,onDescriptionUpdate:o})=>{const{t:d}=Te(),[f,m]=w.useState(!1),[x,h]=w.useState(!1),[g,y]=w.useState(!1),[S,v]=w.useState(null),[O,j]=w.useState(!1),[C,T]=w.useState(l.description||""),z=w.useRef(null),k=w.useRef(null),[U,$]=w.useState(0);w.useEffect(()=>{O&&z.current&&(z.current.focus(),U>0&&(z.current.style.width=`${U+20}px`))},[O,U]),w.useEffect(()=>{!O&&k.current&&$(k.current.offsetWidth)},[O,C]);const K=w.useCallback(()=>`mcphub_tool_form_${s?`${s}_`:""}${l.name}`,[l.name,s]),ue=w.useCallback(()=>{localStorage.removeItem(K())},[K]),X=G=>{r&&r(l.name,G)},Y=()=>{j(!0)},I=async()=>{try{const G=await jg(s,l.name,C);G.success?(j(!1),o&&o(l.name,C)):(T(l.description||""),console.error("Failed to update tool description:",G.error))}catch(G){console.error("Error updating tool description:",G),T(l.description||""),j(!1)}},H=G=>{T(G.target.value)},q=G=>{G.key==="Enter"?I():G.key==="Escape"&&(T(l.description||""),j(!1))},ae=async G=>{y(!0);try{const M=await Sg({toolName:l.name,arguments:G},s);v(M)}catch(M){v({success:!1,error:M instanceof Error?M.message:"Unknown error occurred"})}finally{y(!1)}},le=()=>{h(!1),ue(),v(null)},se=()=>{v(null)};return u.jsxs("div",{className:"bg-white border border-gray-300 shadow rounded-lg p-4 mb-4",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>m(!f),children:[u.jsx("div",{className:"flex-1",children:u.jsxs("h3",{className:"text-lg font-medium text-gray-900",children:[l.name.replace(s+"-",""),u.jsx("span",{className:"ml-2 text-sm font-normal text-gray-600 inline-flex items-center",children:O?u.jsxs(u.Fragment,{children:[u.jsx("input",{ref:z,type:"text",className:"px-2 py-1 border border-blue-300 rounded bg-white text-sm",value:C,onChange:H,onKeyDown:q,onClick:G=>G.stopPropagation(),style:{minWidth:"100px",width:U>0?`${U+20}px`:"auto"}}),u.jsx("button",{className:"ml-2 p-1 text-green-600 hover:text-green-800",onClick:G=>{G.stopPropagation(),I()},children:u.jsx(ei,{size:16})})]}):u.jsxs(u.Fragment,{children:[u.jsx("span",{ref:k,children:C||d("tool.noDescription")}),u.jsx("button",{className:"ml-2 p-1 text-gray-500 hover:text-blue-600 transition-colors",onClick:G=>{G.stopPropagation(),Y()},children:u.jsx(ag,{size:14})})]})})]})}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("div",{className:"flex items-center space-x-2",onClick:G=>G.stopPropagation(),children:u.jsx(hs,{checked:l.enabled??!0,onCheckedChange:X,disabled:g})}),u.jsxs("button",{onClick:G=>{G.stopPropagation(),m(!0),h(!0)},className:"flex items-center space-x-1 px-3 py-1 text-sm text-blue-600 bg-blue-50 hover:bg-blue-100 rounded-md transition-colors",disabled:g||!l.enabled,children:[g?u.jsx(nb,{size:14,className:"animate-spin"}):u.jsx(ub,{size:14}),u.jsx("span",{children:d(g?"tool.running":"tool.run")})]}),u.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:f?u.jsx(Ih,{size:18}):u.jsx(Wh,{size:18})})]})]}),f&&u.jsxs("div",{className:"mt-4 space-y-4",children:[!x&&u.jsxs("div",{className:"bg-gray-50 rounded p-3 border border-gray-300",children:[u.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:d("tool.inputSchema")}),u.jsx("pre",{className:"text-xs text-gray-600 overflow-auto",children:JSON.stringify(l.inputSchema,null,2)})]}),x&&u.jsxs("div",{className:"border border-gray-300 rounded-lg p-4 bg-blue-50",children:[u.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:d("tool.runToolWithName",{name:l.name.replace(s+"-","")})}),u.jsx(Zv,{schema:l.inputSchema||{type:"object"},onSubmit:ae,onCancel:le,loading:g,storageKey:K()}),S&&u.jsx("div",{className:"mt-4",children:u.jsx(Pv,{result:S,onClose:se})})]})]})]})},Eg=({isOpen:l,onClose:s,onConfirm:r,serverName:o,isGroup:d=!1})=>{const{t:f}=Te();return l?u.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-30 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6",children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-3",children:f(d?"groups.confirmDelete":"server.confirmDelete")}),u.jsx("p",{className:"text-gray-500 mb-6",children:d?f("groups.deleteWarning",{name:o}):f("server.deleteWarning",{name:o})}),u.jsxs("div",{className:"flex justify-end space-x-3",children:[u.jsx("button",{onClick:s,className:"px-4 py-2 text-gray-600 hover:text-gray-800",children:f("common.cancel")}),u.jsx("button",{onClick:r,className:"px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600",children:f("common.delete")})]})]})})}):null},Fv=({server:l,onRemove:s,onEdit:r,onToggle:o,onRefresh:d})=>{var I;const{t:f}=Te(),{showToast:m}=ws(),[x,h]=w.useState(!1),[g,y]=w.useState(!1),[S,v]=w.useState(!1),[O,j]=w.useState(!1),[C,T]=w.useState(!1),z=w.useRef(null);w.useEffect(()=>{const H=q=>{z.current&&!z.current.contains(q.target)&&j(!1)};return document.addEventListener("mousedown",H),()=>{document.removeEventListener("mousedown",H)}},[]);const k=H=>{H.stopPropagation(),y(!0)},U=H=>{H.stopPropagation(),r(l)},$=async H=>{if(H.stopPropagation(),!(S||!o)){v(!0);try{await o(l,l.enabled===!1)}finally{v(!1)}}},K=H=>{H.stopPropagation(),j(!O)},ue=H=>{if(H.stopPropagation(),!!l.error)if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(l.error).then(()=>{T(!0),m(f("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>T(!1),2e3)});else{const q=document.createElement("textarea");q.value=l.error,q.style.position="fixed",q.style.left="-9999px",document.body.appendChild(q),q.focus(),q.select();try{document.execCommand("copy"),T(!0),m(f("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>T(!1),2e3)}catch(ae){m(f("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",ae)}document.body.removeChild(q)}},X=()=>{s(l.name),y(!1)},Y=async(H,q)=>{try{const{toggleTool:ae}=await Vv(async()=>{const{toggleTool:se}=await Promise.resolve().then(()=>Qv);return{toggleTool:se}},[],import.meta.url),le=await ae(l.name,H,q);le.success?(m(f(q?"tool.enableSuccess":"tool.disableSuccess",{name:H}),"success"),d&&d()):m(le.error||f("tool.toggleFailed"),"error")}catch(ae){console.error("Error toggling tool:",ae),m(f("tool.toggleFailed"),"error")}};return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:`bg-white shadow rounded-lg p-6 mb-6 ${l.enabled===!1?"opacity-60":""}`,children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>h(!x),children:[u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx("h2",{className:`text-xl font-semibold ${l.enabled===!1?"text-gray-600":"text-gray-900"}`,children:l.name}),u.jsx(Yv,{status:l.status}),u.jsxs("div",{className:"flex items-center px-2 py-1 bg-blue-50 text-blue-700 rounded-full text-sm",children:[u.jsx("svg",{className:"w-4 h-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20",children:u.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"})}),u.jsxs("span",{children:[((I=l.tools)==null?void 0:I.length)||0," ",f("server.tools")]})]}),l.error&&u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"cursor-pointer",onClick:K,"aria-label":f("server.viewErrorDetails"),children:u.jsx(eg,{className:"text-red-500 hover:text-red-600",size:18})}),O&&u.jsxs("div",{ref:z,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:[u.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:[u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("h4",{className:"text-sm font-medium text-red-600",children:f("server.errorDetails")}),u.jsx("button",{onClick:ue,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:f("common.copy"),children:C?u.jsx(ei,{size:14,className:"text-green-500"}):u.jsx(tg,{size:14})})]}),u.jsx("button",{onClick:H=>{H.stopPropagation(),j(!1)},className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),u.jsx("div",{className:"p-4 pt-2",children:u.jsx("pre",{className:"text-sm text-gray-700 break-words whitespace-pre-wrap",children:l.error})})]})]})]}),u.jsxs("div",{className:"flex space-x-2",children:[u.jsx("button",{onClick:U,className:"px-3 py-1 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 text-sm",children:f("server.edit")}),u.jsx("div",{className:"flex items-center",children:u.jsx("button",{onClick:$,className:`px-3 py-1 text-sm rounded transition-colors ${S?"bg-gray-200 text-gray-500":l.enabled!==!1?"bg-green-100 text-green-800 hover:bg-green-200":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,disabled:S,children:S?f("common.processing"):l.enabled!==!1?f("server.disable"):f("server.enable")})}),u.jsx("button",{onClick:k,className:"px-3 py-1 bg-red-100 text-red-800 rounded hover:bg-red-200 text-sm",children:f("server.delete")}),u.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:x?u.jsx(Ih,{size:18}):u.jsx(Wh,{size:18})})]})]}),x&&l.tools&&u.jsxs("div",{className:"mt-6",children:[u.jsx("h6",{className:`font-medium ${l.enabled===!1?"text-gray-600":"text-gray-900"} mb-4`,children:f("server.tools")}),u.jsx("div",{className:"space-y-4",children:l.tools.map((H,q)=>u.jsx(Jv,{server:l.name,tool:H,onToggle:Y},q))})]})]}),u.jsx(Eg,{isOpen:g,onClose:()=>y(!1),onConfirm:X,serverName:l.name})]})},Qu=({onSubmit:l,onCancel:s,initialData:r=null,modalTitle:o,formError:d=null})=>{var G,M,W;const{t:f}=Te(),m=()=>!r||!r.config?"stdio":r.config.type?r.config.type:r.config.url?"sse":"stdio",[x,h]=w.useState(m()),[g,y]=w.useState({name:r&&r.name||"",url:r&&r.config&&r.config.url||"",command:r&&r.config&&r.config.command||"",arguments:r&&r.config&&r.config.args?Array.isArray(r.config.args)?r.config.args.join(" "):String(r.config.args):"",args:r&&r.config&&r.config.args||[],type:m(),env:[],headers:[],options:{timeout:r&&r.config&&r.config.options&&r.config.options.timeout||6e4,resetTimeoutOnProgress:r&&r.config&&r.config.options&&r.config.options.resetTimeoutOnProgress||!1,maxTotalTimeout:r&&r.config&&r.config.options&&r.config.options.maxTotalTimeout||void 0}}),[S,v]=w.useState(r&&r.config&&r.config.env?Object.entries(r.config.env).map(([A,te])=>({key:A,value:te})):[]),[O,j]=w.useState(r&&r.config&&r.config.headers?Object.entries(r.config.headers).map(([A,te])=>({key:A,value:te})):[]),[C,T]=w.useState(!1),[z,k]=w.useState(null),U=!!r,$=A=>{const{name:te,value:N}=A.target;y({...g,[te]:N})},K=A=>{const te=A.split(" ").filter(N=>N.trim()!=="");y({...g,arguments:A,args:te})},ue=A=>{h(A),y(te=>({...te,type:A}))},X=(A,te,N)=>{const Q=[...S];Q[A][te]=N,v(Q)},Y=()=>{v([...S,{key:"",value:""}])},I=A=>{const te=[...S];te.splice(A,1),v(te)},H=(A,te,N)=>{const Q=[...O];Q[A][te]=N,j(Q)},q=()=>{j([...O,{key:"",value:""}])},ae=A=>{const te=[...O];te.splice(A,1),j(te)},le=(A,te)=>{y(N=>({...N,options:{...N.options,[A]:te}}))},se=async A=>{var te,N,Q;A.preventDefault(),k(null);try{const ne={};S.forEach(({key:ee,value:re})=>{ee.trim()&&(ne[ee.trim()]=re)});const Z={};O.forEach(({key:ee,value:re})=>{ee.trim()&&(Z[ee.trim()]=re)});const ie={};(te=g.options)!=null&&te.timeout&&g.options.timeout!==6e4&&(ie.timeout=g.options.timeout),(N=g.options)!=null&&N.resetTimeoutOnProgress&&(ie.resetTimeoutOnProgress=g.options.resetTimeoutOnProgress),(Q=g.options)!=null&&Q.maxTotalTimeout&&(ie.maxTotalTimeout=g.options.maxTotalTimeout);const be={name:g.name,config:{type:x,...x==="sse"||x==="streamable-http"?{url:g.url,...Object.keys(Z).length>0?{headers:Z}:{}}:{command:g.command,args:g.args,env:Object.keys(ne).length>0?ne:void 0},...Object.keys(ie).length>0?{options:ie}:{}}};l(be)}catch(ne){k(`Error: ${ne instanceof Error?ne.message:String(ne)}`)}};return u.jsxs("div",{className:"bg-white shadow rounded-lg p-6 w-full max-w-xl max-h-screen overflow-y-auto",children:[u.jsxs("div",{className:"flex justify-between items-center mb-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:o}),u.jsx("button",{onClick:s,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),(z||d)&&u.jsx("div",{className:"bg-red-50 text-red-700 p-3 rounded mb-4",children:d||z}),u.jsxs("form",{onSubmit:se,children:[u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:f("server.name")}),u.jsx("input",{type:"text",name:"name",id:"name",value:g.name,onChange:$,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: time-mcp",required:!0,disabled:U})]}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:f("server.type")}),u.jsxs("div",{className:"flex space-x-4",children:[u.jsxs("div",{children:[u.jsx("input",{type:"radio",id:"command",name:"serverType",value:"command",checked:x==="stdio",onChange:()=>ue("stdio"),className:"mr-1"}),u.jsx("label",{htmlFor:"command",children:"STDIO"})]}),u.jsxs("div",{children:[u.jsx("input",{type:"radio",id:"url",name:"serverType",value:"url",checked:x==="sse",onChange:()=>ue("sse"),className:"mr-1"}),u.jsx("label",{htmlFor:"url",children:"SSE"})]}),u.jsxs("div",{children:[u.jsx("input",{type:"radio",id:"streamable-http",name:"serverType",value:"streamable-http",checked:x==="streamable-http",onChange:()=>ue("streamable-http"),className:"mr-1"}),u.jsx("label",{htmlFor:"streamable-http",children:"Streamable HTTP"})]})]})]}),x==="sse"||x==="streamable-http"?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"url",children:f("server.url")}),u.jsx("input",{type:"url",name:"url",id:"url",value:g.url,onChange:$,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:x==="streamable-http"?"e.g.: http://localhost:3000/mcp":"e.g.: http://localhost:3000/sse",required:x==="sse"||x==="streamable-http"})]}),u.jsxs("div",{className:"mb-4",children:[u.jsxs("div",{className:"flex justify-between items-center mb-2",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold",children:f("server.headers")}),u.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")]})]}),O.map((A,te)=>u.jsxs("div",{className:"flex items-center mb-2",children:[u.jsxs("div",{className:"flex items-center space-x-2 flex-grow",children:[u.jsx("input",{type:"text",value:A.key,onChange:N=>H(te,"key",N.target.value),className:"shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline w-1/2",placeholder:"Authorization"}),u.jsx("span",{className:"flex items-center",children:":"}),u.jsx("input",{type:"text",value:A.value,onChange:N=>H(te,"value",N.target.value),className:"shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline w-1/2",placeholder:"Bearer token..."})]}),u.jsxs("button",{type:"button",onClick:()=>ae(te),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")]})]},te))]})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"command",children:f("server.command")}),u.jsx("input",{type:"text",name:"command",id:"command",value:g.command,onChange:$,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: npx",required:x==="stdio"})]}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"arguments",children:f("server.arguments")}),u.jsx("input",{type:"text",name:"arguments",id:"arguments",value:g.arguments,onChange:A=>K(A.target.value),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: -y time-mcp",required:x==="stdio"})]}),u.jsxs("div",{className:"mb-4",children:[u.jsxs("div",{className:"flex justify-between items-center mb-2",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold",children:f("server.envVars")}),u.jsxs("button",{type:"button",onClick:Y,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")]})]}),S.map((A,te)=>u.jsxs("div",{className:"flex items-center mb-2",children:[u.jsxs("div",{className:"flex items-center space-x-2 flex-grow",children:[u.jsx("input",{type:"text",value:A.key,onChange:N=>X(te,"key",N.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")}),u.jsx("span",{className:"flex items-center",children:":"}),u.jsx("input",{type:"text",value:A.value,onChange:N=>X(te,"value",N.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")})]}),u.jsxs("button",{type:"button",onClick:()=>I(te),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")]})]},te))]})]}),u.jsxs("div",{className:"mb-4",children:[u.jsxs("div",{className:"flex items-center justify-between cursor-pointer bg-gray-50 hover:bg-gray-100 p-3 rounded border",onClick:()=>T(!C),children:[u.jsx("label",{className:"text-gray-700 text-sm font-bold",children:f("server.requestOptions")}),u.jsx("span",{className:"text-gray-500 text-sm",children:C?"▼":"▶"})]}),C&&u.jsxs("div",{className:"border rounded-b p-4 bg-gray-50 border-t-0",children:[u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-gray-600 text-sm font-medium mb-1",htmlFor:"timeout",children:f("server.timeout")}),u.jsx("input",{type:"number",id:"timeout",value:((G=g.options)==null?void 0:G.timeout)||6e4,onChange:A=>le("timeout",parseInt(A.target.value)||6e4),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"30000",min:"1000",max:"300000"}),u.jsx("p",{className:"text-xs text-gray-500 mt-1",children:f("server.timeoutDescription")})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-gray-600 text-sm font-medium mb-1",htmlFor:"maxTotalTimeout",children:f("server.maxTotalTimeout")}),u.jsx("input",{type:"number",id:"maxTotalTimeout",value:((M=g.options)==null?void 0:M.maxTotalTimeout)||"",onChange:A=>le("maxTotalTimeout",A.target.value?parseInt(A.target.value):void 0),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"Optional",min:"1000"}),u.jsx("p",{className:"text-xs text-gray-500 mt-1",children:f("server.maxTotalTimeoutDescription")})]})]}),u.jsxs("div",{className:"mt-3",children:[u.jsxs("label",{className:"flex items-center",children:[u.jsx("input",{type:"checkbox",checked:((W=g.options)==null?void 0:W.resetTimeoutOnProgress)||!1,onChange:A=>le("resetTimeoutOnProgress",A.target.checked),className:"mr-2"}),u.jsx("span",{className:"text-gray-600 text-sm",children:f("server.resetTimeoutOnProgress")})]}),u.jsx("p",{className:"text-xs text-gray-500 mt-1 ml-6",children:f("server.resetTimeoutOnProgressDescription")})]})]})]}),u.jsxs("div",{className:"flex justify-end mt-6",children:[u.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")}),u.jsx("button",{type:"submit",className:"bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded",children:f(U?"server.save":"server.add")})]})]})]})},Iv=({onAdd:l})=>{const{t:s}=Te(),[r,o]=w.useState(!1),[d,f]=w.useState(null),m=()=>{o(!r),f(null)},x=async h=>{try{f(null);const g=localStorage.getItem("mcphub_token"),y=await fetch(Ne("/servers"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":g||""},body:JSON.stringify(h)}),S=await y.json();if(!y.ok){S&&S.message?f(S.message):y.status===400?f(s("server.invalidData")):y.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 u.jsxs("div",{children:[u.jsxs("button",{onClick:m,className:"w-full bg-blue-100 text-blue-800 rounded hover:bg-blue-200 py-2 px-4 flex items-center justify-center",children:[u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",clipRule:"evenodd"})}),s("server.add")]}),r&&u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx(Qu,{onSubmit:x,onCancel:m,modalTitle:s("server.addServer"),formError:d})})]})},Wv=({server:l,onEdit:s,onCancel:r})=>{const{t:o}=Te(),[d,f]=w.useState(null),m=async x=>{try{f(null);const h=localStorage.getItem("mcphub_token"),g=await fetch(Ne(`/servers/${l.name}`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":h||""},body:JSON.stringify(x)}),y=await g.json();if(!g.ok){y&&y.message?f(y.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 u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx(Qu,{onSubmit:m,onCancel:r,initialData:l,modalTitle:o("server.editTitle",{serverName:l.name}),formError:d})})},e1=()=>{const{t:l}=Te(),s=mn(),{servers:r,error:o,setError:d,isLoading:f,handleServerAdd:m,handleServerEdit:x,handleServerRemove:h,handleServerToggle:g,triggerRefresh:y}=Ss(),[S,v]=w.useState(null),[O,j]=w.useState(!1),C=async k=>{const U=await x(k);U&&v(U)},T=()=>{v(null),y()},z=async()=>{j(!0);try{y(),await new Promise(k=>setTimeout(k,500))}finally{j(!1)}};return u.jsxs("div",{children:[u.jsxs("div",{className:"flex justify-between items-center mb-8",children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:l("pages.servers.title")}),u.jsxs("div",{className:"flex space-x-4",children:[u.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:[u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:u.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")]}),u.jsx(Iv,{onAdd:m}),u.jsxs("button",{onClick:z,disabled:O,className:`px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center ${O?"opacity-70 cursor-not-allowed":""}`,children:[O?u.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:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.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"})]}):u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:u.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&&u.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-red-600 text-lg font-medium",children:l("app.error")}),u.jsx("p",{className:"text-gray-600 mt-1",children:o})]}),u.jsx("button",{onClick:()=>d(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":l("app.closeButton"),children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.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?u.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:u.jsxs("div",{className:"flex flex-col items-center",children:[u.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:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.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"})]}),u.jsx("p",{className:"text-gray-600",children:l("app.loading")})]})}):r.length===0?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsx("p",{className:"text-gray-600",children:l("app.noServers")})}):u.jsx("div",{className:"space-y-6",children:r.map((k,U)=>u.jsx(Fv,{server:k,onRemove:h,onEdit:C,onToggle:g,onRefresh:y},U))}),S&&u.jsx(Wv,{server:S,onEdit:T,onCancel:()=>v(null)})]})},Xu=()=>{const{t:l}=Te(),[s,r]=w.useState([]),[o,d]=w.useState(!0),[f,m]=w.useState(null),[x,h]=w.useState(0),g=w.useCallback(async()=>{try{d(!0);const z=localStorage.getItem("mcphub_token"),k=await fetch(Ne("/groups"),{headers:{"x-auth-token":z||""}});if(!k.ok)throw new Error(`Status: ${k.status}`);const U=await k.json();U&&U.success&&Array.isArray(U.data)?r(U.data):(console.error("Invalid group data format:",U),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)}},[]),y=w.useCallback(()=>{h(z=>z+1)},[]),S=async(z,k,U=[])=>{try{const $=localStorage.getItem("mcphub_token"),K=await fetch(Ne("/groups"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":$||""},body:JSON.stringify({name:z,description:k,servers:U})}),ue=await K.json();return K.ok?(y(),ue.data||null):(m(ue.message||l("groups.createError")),null)}catch($){return m($ instanceof Error?$.message:"Failed to create group"),null}},v=async(z,k)=>{try{const U=localStorage.getItem("mcphub_token"),$=await fetch(Ne(`/groups/${z}`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":U||""},body:JSON.stringify(k)}),K=await $.json();return $.ok?(y(),K.data||null):(m(K.message||l("groups.updateError")),null)}catch(U){return m(U instanceof Error?U.message:"Failed to update group"),null}},O=async(z,k)=>{try{const U=localStorage.getItem("mcphub_token"),$=await fetch(Ne(`/groups/${z}/servers/batch`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":U||""},body:JSON.stringify({servers:k})}),K=await $.json();return $.ok?(y(),K.data||null):(m(K.message||l("groups.updateError")),null)}catch(U){return m(U instanceof Error?U.message:"Failed to update group servers"),null}},j=async z=>{try{const k=localStorage.getItem("mcphub_token"),U=await fetch(Ne(`/groups/${z}`),{method:"DELETE",headers:{"x-auth-token":k||""}}),$=await U.json();return U.ok?(y(),!0):(m($.message||l("groups.deleteError")),!1)}catch(k){return m(k instanceof Error?k.message:"Failed to delete group"),!1}},C=async(z,k)=>{try{const U=localStorage.getItem("mcphub_token"),$=await fetch(Ne(`/groups/${z}/servers`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":U||""},body:JSON.stringify({serverName:k})}),K=await $.json();return $.ok?(y(),K.data||null):(m(K.message||l("groups.serverAddError")),null)}catch(U){return m(U instanceof Error?U.message:"Failed to add server to group"),null}},T=async(z,k)=>{try{const U=localStorage.getItem("mcphub_token"),$=await fetch(Ne(`/groups/${z}/servers/${k}`),{method:"DELETE",headers:{"x-auth-token":U||""}}),K=await $.json();return $.ok?(y(),K.data||null):(m(K.message||l("groups.serverRemoveError")),null)}catch(U){return m(U instanceof Error?U.message:"Failed to remove server from group"),null}};return w.useEffect(()=>{g()},[g,x]),{groups:s,loading:o,error:f,setError:m,triggerRefresh:y,createGroup:S,updateGroup:v,updateGroupServers:O,deleteGroup:j,addServerToGroup:C,removeServerFromGroup:T}},t1=({onAdd:l,onCancel:s})=>{const{t:r}=Te(),{createGroup:o}=Xu(),{servers:d}=Ss(),[f,m]=w.useState([]),[x,h]=w.useState(null),[g,y]=w.useState(!1),[S,v]=w.useState({name:"",description:"",servers:[]});w.useEffect(()=>{m(d.filter(C=>C.enabled!==!1))},[d]);const O=C=>{const{name:T,value:z}=C.target;v(k=>({...k,[T]:z}))},j=async C=>{C.preventDefault(),y(!0),h(null);try{if(!S.name.trim()){h(r("groups.nameRequired")),y(!1);return}if(!await o(S.name,S.description,S.servers)){h(r("groups.createError")),y(!1);return}l()}catch(T){h(T instanceof Error?T.message:String(T)),y(!1)}};return u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:r("groups.addNew")}),x&&u.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:x}),u.jsxs("form",{onSubmit:j,children:[u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[r("groups.name")," *"]}),u.jsx("input",{type:"text",id:"name",name:"name",value:S.name,onChange:O,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})]}),u.jsx(Ng,{className:"mb-6",label:r("groups.servers"),noOptionsText:r("groups.noServerOptions"),values:S.servers,options:f.map(C=>({value:C.name,label:C.name})),onChange:C=>v(T=>({...T,servers:C}))}),u.jsxs("div",{className:"flex justify-end space-x-3",children:[u.jsx("button",{type:"button",onClick:s,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:g,children:r("common.cancel")}),u.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")})]})]})]})})})},a1=({group:l,onEdit:s,onCancel:r})=>{const{t:o}=Te(),{updateGroup:d}=Xu(),{servers:f}=Ss(),[m,x]=w.useState([]),[h,g]=w.useState(null),[y,S]=w.useState(!1),[v,O]=w.useState({name:l.name,description:l.description||"",servers:l.servers||[]});w.useEffect(()=>{x(f.filter(T=>T.enabled!==!1))},[f]);const j=T=>{const{name:z,value:k}=T.target;O(U=>({...U,[z]:k}))},C=async T=>{T.preventDefault(),S(!0),g(null);try{if(!v.name.trim()){g(o("groups.nameRequired")),S(!1);return}if(!await d(l.id,{name:v.name,description:v.description,servers:v.servers})){g(o("groups.updateError")),S(!1);return}s()}catch(z){g(z instanceof Error?z.message:String(z)),S(!1)}};return u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:o("groups.edit")}),h&&u.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:h}),u.jsxs("form",{onSubmit:C,children:[u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[o("groups.name")," *"]}),u.jsx("input",{type:"text",id:"name",name:"name",value:v.name,onChange:j,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:o("groups.namePlaceholder"),required:!0})]}),u.jsx(Ng,{className:"mb-6",label:o("groups.servers"),noOptionsText:o("groups.noServerOptions"),values:v.servers,options:m.map(T=>({value:T.name,label:T.name})),onChange:T=>O(z=>({...z,servers:T}))}),u.jsxs("div",{className:"flex justify-end space-x-3",children:[u.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:y,children:o("common.cancel")}),u.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",disabled:y,children:o(y?"common.submitting":"common.save")})]})]})]})})})},n1=({group:l,servers:s,onEdit:r,onDelete:o})=>{const{t:d}=Te(),{showToast:f}=ws(),[m,x]=w.useState(!1),[h,g]=w.useState(!1),y=()=>{r(l)},S=()=>{x(!0)},v=()=>{o(l.id),x(!1)},O=()=>{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(T){f(d("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",T)}document.body.removeChild(C)}},j=s.filter(C=>l.servers.includes(C.name));return u.jsxs("div",{className:"bg-white shadow rounded-lg p-6",children:[u.jsxs("div",{className:"flex justify-between items-center mb-4",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-800",children:l.name}),u.jsxs("div",{className:"flex items-center ml-3",children:[u.jsx("span",{className:"text-xs text-gray-500 mr-1",children:l.id}),u.jsx("button",{onClick:O,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:d("common.copy"),children:h?u.jsx(ei,{size:14,className:"text-green-500"}):u.jsx(tg,{size:14})})]})]}),l.description&&u.jsx("p",{className:"text-gray-600 text-sm mt-1",children:l.description})]}),u.jsxs("div",{className:"flex items-center space-x-3",children:[u.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})}),u.jsx("button",{onClick:y,className:"text-gray-500 hover:text-gray-700",title:d("groups.edit"),children:u.jsx(ag,{size:18})}),u.jsx("button",{onClick:S,className:"text-gray-500 hover:text-red-600",title:d("groups.delete"),children:u.jsx(yb,{size:18})})]})]}),u.jsx("div",{className:"mt-4",children:j.length===0?u.jsx("p",{className:"text-gray-500 italic",children:d("groups.noServers")}):u.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:j.map(C=>u.jsxs("div",{className:"inline-flex items-center px-3 py-1 bg-gray-50 rounded",children:[u.jsx("span",{className:"font-medium text-gray-700 text-sm",children:C.name}),u.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))})}),u.jsx(Eg,{isOpen:m,onClose:()=>x(!1),onConfirm:v,serverName:l.name,isGroup:!0})]})},l1=()=>{const{t:l}=Te(),{groups:s,loading:r,error:o,setError:d,deleteGroup:f,triggerRefresh:m}=Xu(),{servers:x}=Ss(),[h,g]=w.useState(null),[y,S]=w.useState(!1),v=z=>{g(z)},O=()=>{g(null),m()},j=async z=>{await f(z)||d(l("groups.deleteError"))},C=()=>{S(!0)},T=()=>{S(!1),m()};return u.jsxs("div",{children:[u.jsxs("div",{className:"flex justify-between items-center mb-8",children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:l("pages.groups.title")}),u.jsx("div",{className:"flex space-x-4",children:u.jsxs("button",{onClick:C,className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center",children:[u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:u.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&&u.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:u.jsx("p",{children:o})}),r?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsxs("div",{className:"flex flex-col items-center justify-center",children:[u.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:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.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"})]}),u.jsx("p",{className:"text-gray-600",children:l("app.loading")})]})}):s.length===0?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsx("p",{className:"text-gray-600",children:l("groups.noGroups")})}):u.jsx("div",{className:"space-y-6",children:s.map(z=>u.jsx(n1,{group:z,servers:x,onEdit:v,onDelete:j},z.id))}),y&&u.jsx(t1,{onAdd:T,onCancel:T}),h&&u.jsx(a1,{group:h,onEdit:O,onCancel:()=>g(null)})]})},s1=({onSuccess:l,onCancel:s})=>{const{t:r}=Te(),[o,d]=w.useState({currentPassword:"",newPassword:""}),[f,m]=w.useState(""),[x,h]=w.useState(!1),[g,y]=w.useState(null),[S,v]=w.useState(!1),O=C=>{const{name:T,value:z}=C.target;T==="confirmPassword"?m(z):d(k=>({...k,[T]:z}))},j=async C=>{if(C.preventDefault(),y(null),o.newPassword!==f){y(r("auth.passwordsNotMatch"));return}h(!0);try{const T=await Hy(o);T.success?(v(!0),l&&l()):y(T.message||r("auth.changePasswordError"))}catch{y(r("auth.changePasswordError"))}finally{h(!1)}};return u.jsxs("div",{className:"p-6 bg-white rounded-lg shadow-md",children:[u.jsx("h2",{className:"text-xl font-bold mb-4",children:r("auth.changePassword")}),S?u.jsx("div",{className:"bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded mb-4",children:r("auth.changePasswordSuccess")}):u.jsxs("form",{onSubmit:j,children:[g&&u.jsx("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4",children:g}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"currentPassword",children:r("auth.currentPassword")}),u.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:O,required:!0})]}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"newPassword",children:r("auth.newPassword")}),u.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:O,required:!0,minLength:6})]}),u.jsxs("div",{className:"mb-6",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"confirmPassword",children:r("auth.confirmPassword")}),u.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:O,required:!0,minLength:6})]}),u.jsxs("div",{className:"flex justify-end space-x-2",children:[s&&u.jsx("button",{type:"button",onClick:s,disabled:x,className:"py-2 px-4 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:r("common.cancel")}),u.jsx("button",{type:"submit",disabled:x,className:"py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:x?u.jsxs("span",{className:"flex items-center",children:[u.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:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.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")})]})]})]})},r1=()=>{const{t:l}=Te(),{showToast:s}=ws(),[r,o]=w.useState({enableGlobalRoute:!0,enableGroupNameRoute:!0,enableBearerAuth:!1,bearerAuthKey:""}),[d,f]=w.useState({bearerAuthKey:""}),[m,x]=w.useState({pythonIndexUrl:"",npmRegistry:""}),[h,g]=w.useState({enabled:!1,dbUrl:"",openaiApiBaseUrl:"",openaiApiKey:"",openaiApiEmbeddingModel:""}),[y,S]=w.useState(!1),[v,O]=w.useState(null),[j,C]=w.useState(0),T=w.useCallback(()=>{C(X=>X+1)},[]),z=w.useCallback(async()=>{var X,Y,I,H,q,ae;S(!0),O(null);try{const le=localStorage.getItem("mcphub_token"),se=await fetch(Ne("/settings"),{headers:{"x-auth-token":le||""}});if(!se.ok)throw new Error(`HTTP error! Status: ${se.status}`);const G=await se.json();G.success&&((Y=(X=G.data)==null?void 0:X.systemConfig)!=null&&Y.routing)&&o({enableGlobalRoute:G.data.systemConfig.routing.enableGlobalRoute??!0,enableGroupNameRoute:G.data.systemConfig.routing.enableGroupNameRoute??!0,enableBearerAuth:G.data.systemConfig.routing.enableBearerAuth??!1,bearerAuthKey:G.data.systemConfig.routing.bearerAuthKey||""}),G.success&&((H=(I=G.data)==null?void 0:I.systemConfig)!=null&&H.install)&&x({pythonIndexUrl:G.data.systemConfig.install.pythonIndexUrl||"",npmRegistry:G.data.systemConfig.install.npmRegistry||""}),G.success&&((ae=(q=G.data)==null?void 0:q.systemConfig)!=null&&ae.smartRouting)&&g({enabled:G.data.systemConfig.smartRouting.enabled??!1,dbUrl:G.data.systemConfig.smartRouting.dbUrl||"",openaiApiBaseUrl:G.data.systemConfig.smartRouting.openaiApiBaseUrl||"",openaiApiKey:G.data.systemConfig.smartRouting.openaiApiKey||"",openaiApiEmbeddingModel:G.data.systemConfig.smartRouting.openaiApiEmbeddingModel||""})}catch(le){console.error("Failed to fetch settings:",le),O(le instanceof Error?le.message:"Failed to fetch settings"),s(l("errors.failedToFetchSettings"))}finally{S(!1)}},[l]),k=async(X,Y)=>{S(!0),O(null);try{const I=localStorage.getItem("mcphub_token"),H=await fetch(Ne("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":I||""},body:JSON.stringify({routing:{[X]:Y}})});if(!H.ok)throw new Error(`HTTP error! Status: ${H.status}`);return(await H.json()).success?(o({...r,[X]:Y}),s(l("settings.systemConfigUpdated")),!0):(s(l("errors.failedToUpdateRouteConfig")),!1)}catch(I){return console.error("Failed to update routing config:",I),O(I instanceof Error?I.message:"Failed to update routing config"),s(l("errors.failedToUpdateRouteConfig")),!1}finally{S(!1)}},U=async(X,Y)=>{S(!0),O(null);try{const I=localStorage.getItem("mcphub_token"),H=await fetch(Ne("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":I||""},body:JSON.stringify({install:{[X]:Y}})});if(!H.ok)throw new Error(`HTTP error! Status: ${H.status}`);return(await H.json()).success?(x({...m,[X]:Y}),s(l("settings.systemConfigUpdated")),!0):(s(l("errors.failedToUpdateSystemConfig")),!1)}catch(I){return console.error("Failed to update system config:",I),O(I instanceof Error?I.message:"Failed to update system config"),s(l("errors.failedToUpdateSystemConfig")),!1}finally{S(!1)}},$=async(X,Y)=>{S(!0),O(null);try{const I=localStorage.getItem("mcphub_token"),H=await fetch(Ne("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":I||""},body:JSON.stringify({smartRouting:{[X]:Y}})});if(!H.ok){const ae=await H.json();throw new Error(ae.message||`HTTP error! Status: ${H.status}`)}const q=await H.json();return q.success?(g({...h,[X]:Y}),s(l("settings.systemConfigUpdated")),!0):(s(q.message||l("errors.failedToUpdateSmartRoutingConfig")),!1)}catch(I){console.error("Failed to update smart routing config:",I);const H=I instanceof Error?I.message:"Failed to update smart routing config";return O(H),s(H),!1}finally{S(!1)}},K=async X=>{S(!0),O(null);try{const Y=localStorage.getItem("mcphub_token"),I=await fetch(Ne("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":Y||""},body:JSON.stringify({smartRouting:X})});if(!I.ok){const q=await I.json();throw new Error(q.message||`HTTP error! Status: ${I.status}`)}const H=await I.json();return H.success?(g({...h,...X}),s(l("settings.systemConfigUpdated")),!0):(s(H.message||l("errors.failedToUpdateSmartRoutingConfig")),!1)}catch(Y){console.error("Failed to update smart routing config:",Y);const I=Y instanceof Error?Y.message:"Failed to update smart routing config";return O(I),s(I),!1}finally{S(!1)}},ue=async X=>{S(!0),O(null);try{const Y=localStorage.getItem("mcphub_token"),I=await fetch(Ne("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":Y||""},body:JSON.stringify({routing:X})});if(!I.ok)throw new Error(`HTTP error! Status: ${I.status}`);return(await I.json()).success?(o({...r,...X}),s(l("settings.systemConfigUpdated")),!0):(s(l("errors.failedToUpdateRouteConfig")),!1)}catch(Y){return console.error("Failed to update routing config:",Y),O(Y instanceof Error?Y.message:"Failed to update routing config"),s(l("errors.failedToUpdateRouteConfig")),!1}finally{S(!1)}};return w.useEffect(()=>{z()},[z,j]),w.useEffect(()=>{r&&f({bearerAuthKey:r.bearerAuthKey})},[r]),{routingConfig:r,tempRoutingConfig:d,setTempRoutingConfig:f,installConfig:m,smartRoutingConfig:h,loading:y,error:v,setError:O,triggerRefresh:T,fetchSettings:z,updateRoutingConfig:k,updateInstallConfig:U,updateSmartRoutingConfig:$,updateSmartRoutingConfigBatch:K,updateRoutingConfigBatch:ue}};function i1(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 o1=()=>{const{t:l,i18n:s}=Te(),r=mn(),{showToast:o}=ws(),[d,f]=w.useState(s.language);w.useEffect(()=>{f(s.language)},[s.language]);const[m,x]=w.useState({pythonIndexUrl:"",npmRegistry:""}),[h,g]=w.useState({dbUrl:"",openaiApiBaseUrl:"",openaiApiKey:"",openaiApiEmbeddingModel:""}),{routingConfig:y,tempRoutingConfig:S,setTempRoutingConfig:v,installConfig:O,smartRoutingConfig:j,loading:C,updateRoutingConfig:T,updateRoutingConfigBatch:z,updateInstallConfig:k,updateSmartRoutingConfig:U,updateSmartRoutingConfigBatch:$}=r1();w.useEffect(()=>{O&&x(O)},[O]),w.useEffect(()=>{j&&g({dbUrl:j.dbUrl||"",openaiApiBaseUrl:j.openaiApiBaseUrl||"",openaiApiKey:j.openaiApiKey||"",openaiApiEmbeddingModel:j.openaiApiEmbeddingModel||""})},[j]);const[K,ue]=w.useState({routingConfig:!1,installConfig:!1,smartRoutingConfig:!1,password:!1}),X=A=>{ue(te=>({...te,[A]:!te[A]}))},Y=async(A,te)=>{if(A==="enableBearerAuth"&&te===!0&&!S.bearerAuthKey&&!y.bearerAuthKey){const N=i1();I(N),await z({enableBearerAuth:!0,bearerAuthKey:N})&&v(ne=>({...ne,bearerAuthKey:N}));return}await T(A,te)},I=A=>{v(te=>({...te,bearerAuthKey:A}))},H=async()=>{await T("bearerAuthKey",S.bearerAuthKey)},q=(A,te)=>{x({...m,[A]:te})},ae=async A=>{await k(A,m[A])},le=(A,te)=>{g({...h,[A]:te})},se=async A=>{await U(A,h[A])},G=async A=>{if(A){const te=h.dbUrl||j.dbUrl,N=h.openaiApiKey||j.openaiApiKey;if(!te||!N){const ne=[];te||ne.push(l("settings.dbUrl")),N||ne.push(l("settings.openaiApiKey")),o(l("settings.smartRoutingValidationError",{fields:ne.join(", ")}));return}const Q={enabled:A};h.dbUrl!==j.dbUrl&&(Q.dbUrl=h.dbUrl),h.openaiApiBaseUrl!==j.openaiApiBaseUrl&&(Q.openaiApiBaseUrl=h.openaiApiBaseUrl),h.openaiApiKey!==j.openaiApiKey&&(Q.openaiApiKey=h.openaiApiKey),h.openaiApiEmbeddingModel!==j.openaiApiEmbeddingModel&&(Q.openaiApiEmbeddingModel=h.openaiApiEmbeddingModel),await $(Q)}else await U("enabled",A)},M=()=>{setTimeout(()=>{r("/")},2e3)},W=A=>{localStorage.setItem("i18nextLng",A),window.location.reload()};return u.jsxs("div",{className:"container mx-auto",children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:l("pages.settings.title")}),u.jsx("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:l("pages.settings.language")}),u.jsxs("div",{className:"flex space-x-3",children:[u.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:()=>W("en"),children:"English"}),u.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:()=>W("zh"),children:"中文"})]})]})}),u.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>X("smartRoutingConfig"),children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:l("pages.settings.smartRouting")}),u.jsx("span",{className:"text-gray-500",children:K.smartRoutingConfig?"▼":"►"})]}),K.smartRoutingConfig&&u.jsxs("div",{className:"space-y-4 mt-4",children:[u.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.enableSmartRouting")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableSmartRoutingDescription")})]}),u.jsx(hs,{disabled:C,checked:j.enabled,onCheckedChange:A=>G(A)})]}),u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsx("div",{className:"mb-2",children:u.jsxs("h3",{className:"font-medium text-gray-700",children:[u.jsx("span",{className:"text-red-500 px-1",children:"*"}),l("settings.dbUrl")]})}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:h.dbUrl,onChange:A=>le("dbUrl",A.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}),u.jsx("button",{onClick:()=>se("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")})]})]}),u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsx("div",{className:"mb-2",children:u.jsxs("h3",{className:"font-medium text-gray-700",children:[u.jsx("span",{className:"text-red-500 px-1",children:"*"}),l("settings.openaiApiKey")]})}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"password",value:h.openaiApiKey,onChange:A=>le("openaiApiKey",A.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}),u.jsx("button",{onClick:()=>se("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")})]})]}),u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsx("div",{className:"mb-2",children:u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.openaiApiBaseUrl")})}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:h.openaiApiBaseUrl,onChange:A=>le("openaiApiBaseUrl",A.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}),u.jsx("button",{onClick:()=>se("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")})]})]}),u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsx("div",{className:"mb-2",children:u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.openaiApiEmbeddingModel")})}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:h.openaiApiEmbeddingModel,onChange:A=>le("openaiApiEmbeddingModel",A.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}),u.jsx("button",{onClick:()=>se("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")})]})]})]})]}),u.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>X("routingConfig"),children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:l("pages.settings.routeConfig")}),u.jsx("span",{className:"text-gray-500",children:K.routingConfig?"▼":"►"})]}),K.routingConfig&&u.jsxs("div",{className:"space-y-4 mt-4",children:[u.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.enableBearerAuth")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableBearerAuthDescription")})]}),u.jsx(hs,{disabled:C,checked:y.enableBearerAuth,onCheckedChange:A=>Y("enableBearerAuth",A)})]}),y.enableBearerAuth&&u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{className:"mb-2",children:[u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.bearerAuthKey")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.bearerAuthKeyDescription")})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:S.bearerAuthKey,onChange:A=>I(A.target.value),placeholder:l("settings.bearerAuthKeyPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",disabled:C||!y.enableBearerAuth}),u.jsx("button",{onClick:H,disabled:C||!y.enableBearerAuth,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50",children:l("common.save")})]})]}),u.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.enableGlobalRoute")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableGlobalRouteDescription")})]}),u.jsx(hs,{disabled:C,checked:y.enableGlobalRoute,onCheckedChange:A=>Y("enableGlobalRoute",A)})]}),u.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.enableGroupNameRoute")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableGroupNameRouteDescription")})]}),u.jsx(hs,{disabled:C,checked:y.enableGroupNameRoute,onCheckedChange:A=>Y("enableGroupNameRoute",A)})]})]})]}),u.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>X("installConfig"),children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:l("settings.installConfig")}),u.jsx("span",{className:"text-gray-500",children:K.installConfig?"▼":"►"})]}),K.installConfig&&u.jsxs("div",{className:"space-y-4 mt-4",children:[u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{className:"mb-2",children:[u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.pythonIndexUrl")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.pythonIndexUrlDescription")})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:m.pythonIndexUrl,onChange:A=>q("pythonIndexUrl",A.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}),u.jsx("button",{onClick:()=>ae("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")})]})]}),u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{className:"mb-2",children:[u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.npmRegistry")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.npmRegistryDescription")})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:m.npmRegistry,onChange:A=>q("npmRegistry",A.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}),u.jsx("button",{onClick:()=>ae("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")})]})]})]})]}),u.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>X("password"),children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:l("auth.changePassword")}),u.jsx("span",{className:"text-gray-500",children:K.password?"▼":"►"})]}),K.password&&u.jsx("div",{className:"max-w-lg mt-4",children:u.jsx(s1,{onSuccess:M})})]})]})},u1=()=>{const{t:l}=Te(),[s,r]=w.useState([]),[o,d]=w.useState([]),[f,m]=w.useState([]),[x,h]=w.useState([]),[g,y]=w.useState(""),[S,v]=w.useState(""),[O,j]=w.useState(""),[C,T]=w.useState(!0),[z,k]=w.useState(null),[U,$]=w.useState(null),[K,ue]=w.useState([]),[X,Y]=w.useState(1),[I,H]=w.useState(9),[q,ae]=w.useState(1),le=w.useCallback(async()=>{try{T(!0);const ee=localStorage.getItem("mcphub_token"),re=await fetch(Ne("/market/servers"),{headers:{"x-auth-token":ee||""}});if(!re.ok)throw new Error(`Status: ${re.status}`);const oe=await re.json();oe&&oe.success&&Array.isArray(oe.data)?(d(oe.data),se(oe.data,X)):(console.error("Invalid market servers data format:",oe),k(l("market.fetchError")))}catch(ee){console.error("Error fetching market servers:",ee),k(ee instanceof Error?ee.message:String(ee))}finally{T(!1)}},[l]),se=w.useCallback((ee,re,oe=I)=>{const he=ee.length,xe=Math.ceil(he/oe);ae(xe);const Oe=Math.max(1,Math.min(re,xe));Oe!==re&&Y(Oe);const qe=(Oe-1)*oe,Yt=ee.slice(qe,qe+oe);r(Yt)},[I]),G=w.useCallback(ee=>{Y(ee),se(o,ee,I)},[o,se,I]),M=w.useCallback(async()=>{try{const ee=localStorage.getItem("mcphub_token"),re=await fetch(Ne("/market/categories"),{headers:{"x-auth-token":ee||""}});if(!re.ok)throw new Error(`Status: ${re.status}`);const oe=await re.json();oe&&oe.success&&Array.isArray(oe.data)?m(oe.data):console.error("Invalid categories data format:",oe)}catch(ee){console.error("Error fetching categories:",ee)}},[]),W=w.useCallback(async()=>{try{const ee=localStorage.getItem("mcphub_token"),re=await fetch(Ne("/market/tags"),{headers:{"x-auth-token":ee||""}});if(!re.ok)throw new Error(`Status: ${re.status}`);const oe=await re.json();oe&&oe.success&&Array.isArray(oe.data)?h(oe.data):console.error("Invalid tags data format:",oe)}catch(ee){console.error("Error fetching tags:",ee)}},[]),A=w.useCallback(async ee=>{try{T(!0);const re=localStorage.getItem("mcphub_token"),oe=await fetch(Ne(`/market/servers/${ee}`),{headers:{"x-auth-token":re||""}});if(!oe.ok)throw new Error(`Status: ${oe.status}`);const he=await oe.json();return he&&he.success&&he.data?($(he.data),he.data):(console.error("Invalid server data format:",he),k(l("market.serverNotFound")),null)}catch(re){return console.error(`Error fetching server ${ee}:`,re),k(re instanceof Error?re.message:String(re)),null}finally{T(!1)}},[l]),te=w.useCallback(async ee=>{try{if(T(!0),j(ee),!ee.trim()){le();return}const re=localStorage.getItem("mcphub_token"),oe=await fetch(Ne(`/market/servers/search?query=${encodeURIComponent(ee)}`),{headers:{"x-auth-token":re||""}});if(!oe.ok)throw new Error(`Status: ${oe.status}`);const he=await oe.json();he&&he.success&&Array.isArray(he.data)?(d(he.data),Y(1),se(he.data,1)):(console.error("Invalid search results format:",he),k(l("market.searchError")))}catch(re){console.error("Error searching servers:",re),k(re instanceof Error?re.message:String(re))}finally{T(!1)}},[l,o,se,le]),N=w.useCallback(async ee=>{try{if(T(!0),y(ee),v(""),!ee){le();return}const re=localStorage.getItem("mcphub_token"),oe=await fetch(Ne(`/market/categories/${encodeURIComponent(ee)}`),{headers:{"x-auth-token":re||""}});if(!oe.ok)throw new Error(`Status: ${oe.status}`);const he=await oe.json();he&&he.success&&Array.isArray(he.data)?(d(he.data),Y(1),se(he.data,1)):(console.error("Invalid category filter results format:",he),k(l("market.filterError")))}catch(re){console.error("Error filtering servers by category:",re),k(re instanceof Error?re.message:String(re))}finally{T(!1)}},[l,le,se]),Q=w.useCallback(async ee=>{try{if(T(!0),v(ee),y(""),!ee){le();return}const re=localStorage.getItem("mcphub_token"),oe=await fetch(Ne(`/market/tags/${encodeURIComponent(ee)}`),{headers:{"x-auth-token":re||""}});if(!oe.ok)throw new Error(`Status: ${oe.status}`);const he=await oe.json();he&&he.success&&Array.isArray(he.data)?(d(he.data),Y(1),se(he.data,1)):(console.error("Invalid tag filter results format:",he),k(l("market.tagFilterError")))}catch(re){console.error("Error filtering servers by tag:",re),k(re instanceof Error?re.message:String(re))}finally{T(!1)}},[l,le,se]),ne=w.useCallback(async()=>{try{const ee=localStorage.getItem("mcphub_token"),re=await fetch(Ne("/servers"),{headers:{"x-auth-token":ee||""}});if(!re.ok)throw new Error(`Status: ${re.status}`);const oe=await re.json();if(oe&&oe.success&&Array.isArray(oe.data)){const he=oe.data.map(xe=>xe.name);ue(he)}}catch(ee){console.error("Error fetching installed servers:",ee)}},[]),Z=w.useCallback(ee=>K.includes(ee),[K]),ie=w.useCallback(async(ee,re)=>{var oe,he;try{const xe=(oe=ee.installations)!=null&&oe.npm?"npm":Object.keys(ee.installations||{}).length>0?Object.keys(ee.installations)[0]:null;if(!xe||!((he=ee.installations)!=null&&he[xe]))return k(l("market.noInstallationMethod")),!1;const Oe=ee.installations[xe],qe={name:ee.name,config:{command:re.command||Oe.command||"",args:re.args||Oe.args||[],env:{...Oe.env,...re.env}}},Yt=localStorage.getItem("mcphub_token"),Kt=await fetch(Ne("/servers"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":Yt||""},body:JSON.stringify(qe)});if(!Kt.ok){const hn=await Kt.json();throw new Error(hn.message||`Status: ${Kt.status}`)}return await ne(),!0}catch(xe){return console.error("Error installing server:",xe),k(xe instanceof Error?xe.message:String(xe)),!1}},[l,ne]),be=w.useCallback(ee=>{H(ee),Y(1),se(o,1,ee)},[o,se]);return w.useEffect(()=>{le(),M(),W(),ne()},[le,M,W,ne]),{servers:s,allServers:o,categories:f,tags:x,selectedCategory:g,selectedTag:S,searchQuery:O,loading:C,error:z,setError:k,currentServer:U,fetchMarketServers:le,fetchServerByName:A,searchServers:te,filterByCategory:N,filterByTag:Q,installServer:ie,currentPage:X,totalPages:q,serversPerPage:I,changePage:G,changeServersPerPage:be,isServerInstalled:Z}},c1=({server:l,onClick:s})=>{var x,h,g,y;const{t:r}=Te(),o=()=>{if(!l.tags||l.tags.length===0)return{tagsToShow:[],hasMore:!1,moreCount:0};const S=28,v=k=>k.length+3;let O=0,j=0;const C=[...l.tags].sort((k,U)=>k.length-U.length);for(j=0;j<C.length;j++){const k=v(C[j]);if(O+k>S)break;if(O+=k,j===C.length-1)return{tagsToShow:C,hasMore:!1,moreCount:0}}j===0&&C.length>0&&(j=1);const T=C.length-j,z=3+String(T).length+r("market.moreTags").length;return O+z<=S||j<1?{tagsToShow:C.slice(0,j),hasMore:!0,moreCount:T}:{tagsToShow:C.slice(0,Math.max(1,j-1)),hasMore:!0,moreCount:T+1}},{tagsToShow:d,hasMore:f,moreCount:m}=o();return u.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:[u.jsxs("div",{className:"flex justify-between items-start mb-3",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900 line-clamp-1 mr-2",children:l.display_name}),l.is_official&&u.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")})]}),u.jsx("p",{className:"text-gray-600 text-sm mb-4 line-clamp-2 min-h-[40px]",children:l.description}),u.jsx("div",{className:"flex flex-wrap gap-1 mb-2 min-h-[28px]",children:((x=l.categories)==null?void 0:x.length)>0?l.categories.map((S,v)=>u.jsx("span",{className:"bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded whitespace-nowrap",children:S},v)):u.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),u.jsx("div",{className:"relative mb-3 min-h-[28px] overflow-x-auto",children:((h=l.tags)==null?void 0:h.length)>0?u.jsxs("div",{className:"flex gap-1 items-center whitespace-nowrap",children:[d.map((S,v)=>u.jsxs("span",{className:"bg-green-50 text-green-700 text-xs px-2 py-1 rounded flex-shrink-0",children:["#",S]},v)),f&&u.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")]})]}):u.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),u.jsxs("div",{className:"flex justify-between items-center mt-auto pt-2 text-xs text-gray-500 border-t border-gray-100",children:[u.jsxs("div",{className:"overflow-hidden",children:[u.jsxs("span",{className:"whitespace-nowrap",children:[r("market.by")," "]}),u.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")})]}),u.jsxs("div",{className:"flex items-center flex-shrink-0",children:[u.jsx("svg",{className:"h-4 w-4 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:u.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"})}),u.jsxs("span",{children:[((y=l.tools)==null?void 0:y.length)||0," ",r("market.tools")]})]})]})]})},d1=({server:l,onBack:s,onInstall:r,installing:o=!1,isInstalled:d=!1})=>{var z,k;const{t:f}=Te(),[m,x]=w.useState(!1),[h,g]=w.useState(null),y=()=>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")},S=()=>{x(!m),g(null)},v=()=>{d||S()},O=()=>{if(!l.installations)return;if(l.installations.npm)return l.installations.npm;if(l.installations.uvx)return l.installations.uvx;if(l.installations.default)return l.installations.default;const U=Object.keys(l.installations);if(U.length>0)return l.installations[U[0]]},j=async U=>{try{g(null),r(l,U.config),x(!1)}catch($){console.error("Error installing server:",$),g(f("errors.serverInstall"))}},C=y(),T=O();return u.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[u.jsx("div",{className:"mb-4",children:u.jsxs("button",{onClick:s,className:"text-gray-600 hover:text-gray-900 flex items-center",children:[u.jsx("svg",{className:"h-5 w-5 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:u.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")]})}),u.jsxs("div",{className:"flex justify-between items-start mb-4",children:[u.jsx("div",{children:u.jsxs("h2",{className:"text-2xl font-bold text-gray-900 flex items-center flex-wrap",children:[l.display_name,u.jsxs("span",{className:"text-sm font-normal text-gray-500 ml-2",children:["(",l.name,")"]}),u.jsxs("span",{className:"text-sm font-normal text-gray-600 ml-4",children:[f("market.author"),": ",l.author.name," • ",f("market.license"),": ",l.license," •",u.jsx("a",{href:l.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline ml-1",children:f("market.repository")})]})]})}),u.jsxs("div",{className:"flex items-center",children:[l.is_official&&u.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")}),u.jsx("button",{onClick:v,disabled:C.disabled,className:C.className,children:C.text})]})]}),u.jsx("p",{className:"text-gray-700 mb-6",children:l.description}),u.jsxs("div",{className:"mb-6",children:[u.jsxs("h3",{className:"text-lg font-semibold mb-3",children:[f("market.categories")," & ",f("market.tags")]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[(z=l.categories)==null?void 0:z.map((U,$)=>u.jsx("span",{className:"bg-gray-100 text-gray-800 px-3 py-1 rounded",children:U},`cat-${$}`)),l.tags&&l.tags.map((U,$)=>u.jsxs("span",{className:"bg-gray-100 text-green-700 px-2 py-1 rounded text-sm",children:["#",U]},`tag-${$}`))]})]}),l.arguments&&Object.keys(l.arguments).length>0&&u.jsxs("div",{className:"mb-6",children:[u.jsx("h3",{className:"text-lg font-semibold mb-3",children:f("market.arguments")}),u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[u.jsx("thead",{className:"bg-gray-50",children:u.jsxs("tr",{children:[u.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")}),u.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")}),u.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")}),u.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")})]})}),u.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:Object.entries(l.arguments).map(([U,$],K)=>u.jsxs("tr",{children:[u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:U}),u.jsx("td",{className:"px-6 py-4 text-sm text-gray-500",children:$.description}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:$.required?u.jsx("span",{className:"text-green-600",children:"✓"}):u.jsx("span",{className:"text-red-600",children:"✗"})}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:u.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:$.example})})]},K))})]})})]}),u.jsxs("div",{className:"mb-6",children:[u.jsx("h3",{className:"text-lg font-semibold mb-3",children:f("market.tools")}),u.jsx("div",{className:"space-y-4",children:(k=l.tools)==null?void 0:k.map((U,$)=>u.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[u.jsxs("h4",{className:"font-medium mb-2",children:[U.name,u.jsx("button",{type:"button",onClick:()=>{const K=document.getElementById(`schema-${$}`);K&&K.classList.toggle("hidden")},className:"text-sm text-blue-600 hover:underline focus:outline-none ml-2",children:f("market.viewSchema")})]}),u.jsx("p",{className:"text-gray-600 mb-2",children:U.description}),u.jsx("div",{className:"mt-2",children:u.jsx("pre",{id:`schema-${$}`,className:"hidden bg-gray-50 p-3 rounded text-sm overflow-auto mt-2",children:JSON.stringify(U.inputSchema,null,2)})})]},$))})]}),l.examples&&l.examples.length>0&&u.jsxs("div",{className:"mb-6",children:[u.jsx("h3",{className:"text-lg font-semibold mb-3",children:f("market.examples")}),u.jsx("div",{className:"space-y-4",children:l.examples.map((U,$)=>u.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[u.jsx("h4",{className:"font-medium mb-2",children:U.title}),u.jsx("p",{className:"text-gray-600 mb-2",children:U.description}),u.jsx("pre",{className:"bg-gray-50 p-3 rounded text-sm overflow-auto",children:U.prompt})]},$))})]}),u.jsx("div",{className:"mt-6 flex justify-end",children:u.jsx("button",{onClick:v,disabled:C.disabled,className:C.className,children:C.text})}),m&&u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx(Qu,{onSubmit:j,onCancel:S,modalTitle:f("market.installServer",{name:l.display_name}),formError:h,initialData:{name:l.name,status:"disconnected",config:T?{command:T.command||"",args:T.args||[],env:T.env||{}}:void 0}})})]})},f1=({currentPage:l,totalPages:s,onPageChange:r})=>{const o=()=>{const d=[];d.push(u.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(u.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis1"));for(let x=m;x<=Math.min(s-1,m+5-3);x++)d.push(u.jsx("button",{onClick:()=>r(x),className:`px-3 py-1 mx-1 rounded ${l===x?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:x},x));return m+5-3<s-1&&d.push(u.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis2")),s>1&&d.push(u.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:u.jsxs("div",{className:"flex justify-center items-center my-6",children:[u.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"}),u.jsx("div",{className:"flex",children:o()}),u.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 »"})]})},ch=()=>{const{t:l}=Te(),s=mn();Wt();const{serverName:r}=Hx(),{showToast:o}=ws(),{servers:d,allServers:f,categories:m,loading:x,error:h,setError:g,searchServers:y,filterByCategory:S,filterByTag:v,selectedCategory:O,selectedTag:j,installServer:C,fetchServerByName:T,isServerInstalled:z,currentPage:k,totalPages:U,changePage:$,serversPerPage:K,changeServersPerPage:ue}=u1(),[X,Y]=w.useState(null),[I,H]=w.useState(""),[q,ae]=w.useState(!1),[le,se]=w.useState(!1);w.useEffect(()=>{(async()=>{if(r){const ie=await T(r);ie?Y(ie):s("/market")}else Y(null)})()},[r,T,s]);const G=Z=>{Z.preventDefault(),y(I)},M=Z=>{S(Z)},W=()=>{H(""),S(""),v("")},A=Z=>{s(`/market/${Z.name}`)},te=()=>{s("/market")},N=async(Z,ie)=>{try{ae(!0),await C(Z,ie)&&o(l("market.installSuccess",{serverName:Z.display_name}),"success")}finally{ae(!1)}},Q=Z=>{$(Z),window.scrollTo({top:0,behavior:"smooth"})},ne=Z=>{const ie=parseInt(Z.target.value,10);ue(ie)};return X?u.jsx(d1,{server:X,onBack:te,onInstall:N,installing:q,isInstalled:z(X.name)}):u.jsxs("div",{children:[u.jsx("div",{className:"flex justify-between items-center mb-8",children:u.jsx("div",{children:u.jsxs("h1",{className:"text-2xl font-bold text-gray-900 flex items-center",children:[l("market.title"),u.jsx("span",{className:"text-sm text-gray-500 font-normal ml-2",children:l("pages.market.title").split(" - ")[1]})]})})}),h&&u.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("p",{children:h}),u.jsx("button",{onClick:()=>g(null),className:"text-red-700 hover:text-red-900",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.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"})})})]})}),u.jsx("div",{className:"bg-white shadow rounded-lg p-6 mb-6",children:u.jsxs("form",{onSubmit:G,className:"flex space-x-4 mb-0",children:[u.jsx("div",{className:"flex-grow",children:u.jsx("input",{type:"text",value:I,onChange:Z=>H(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"})}),u.jsx("button",{type:"submit",className:"bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded",children:l("market.search")}),(I||O||j)&&u.jsx("button",{type:"button",onClick:W,className:"border border-gray-300 text-gray-700 font-medium py-2 px-4 rounded hover:bg-gray-50",children:l("market.clearFilters")})]})}),u.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[u.jsx("div",{className:"md:w-48 flex-shrink-0",children:u.jsx("div",{className:"bg-white shadow rounded-lg p-4 mb-6 sticky top-4",children:m.length>0?u.jsxs("div",{className:"mb-6",children:[u.jsxs("div",{className:"flex justify-between items-center mb-3",children:[u.jsx("h3",{className:"font-medium text-gray-900",children:l("market.categories")}),O&&u.jsx("span",{className:"text-xs text-blue-600 cursor-pointer hover:underline",onClick:()=>S(""),children:l("market.clearCategoryFilter")})]}),u.jsx("div",{className:"flex flex-col gap-2",children:m.map(Z=>u.jsx("button",{onClick:()=>M(Z),className:`px-3 py-2 rounded text-sm text-left ${O===Z?"bg-blue-100 text-blue-800 font-medium":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,children:Z},Z))})]}):x?u.jsxs("div",{className:"mb-6",children:[u.jsx("div",{className:"mb-3",children:u.jsx("h3",{className:"font-medium text-gray-900",children:l("market.categories")})}),u.jsxs("div",{className:"flex flex-col gap-2 items-center py-4",children:[u.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:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.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"})]}),u.jsx("p",{className:"text-sm text-gray-600",children:l("app.loading")})]})]}):u.jsxs("div",{className:"mb-6",children:[u.jsx("div",{className:"mb-3",children:u.jsx("h3",{className:"font-medium text-gray-900",children:l("market.categories")})}),u.jsx("p",{className:"text-sm text-gray-600 py-2",children:l("market.noCategories")})]})})}),u.jsx("div",{className:"flex-grow",children:x?u.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:u.jsxs("div",{className:"flex flex-col items-center",children:[u.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:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.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"})]}),u.jsx("p",{className:"text-gray-600",children:l("app.loading")})]})}):d.length===0?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsx("p",{className:"text-gray-600",children:l("market.noServers")})}):u.jsxs(u.Fragment,{children:[u.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,ie)=>u.jsx(c1,{server:Z,onClick:A},ie))}),u.jsxs("div",{className:"flex justify-between items-center mb-4",children:[u.jsx("div",{className:"text-sm text-gray-500",children:l("market.showing",{from:(k-1)*K+1,to:Math.min(k*K,f.length),total:f.length})}),u.jsx(f1,{currentPage:k,totalPages:U,onPageChange:Q}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsxs("label",{htmlFor:"perPage",className:"text-sm text-gray-600",children:[l("market.perPage"),":"]}),u.jsxs("select",{id:"perPage",value:K,onChange:ne,className:"border rounded p-1 text-sm",children:[u.jsx("option",{value:"6",children:"6"}),u.jsx("option",{value:"9",children:"9"}),u.jsx("option",{value:"12",children:"12"}),u.jsx("option",{value:"24",children:"24"})]})]})]}),u.jsx("div",{className:"mt-6"})]})})]})]})},m1={default:"bg-blue-500 text-white hover:bg-blue-600 focus:ring-blue-500",outline:"border border-gray-300 dark:border-gray-700 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300",ghost:"bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300",link:"bg-transparent underline-offset-4 hover:underline text-blue-500 hover:text-blue-600",destructive:"bg-red-500 text-white hover:bg-red-600 focus:ring-red-500"},h1={default:"h-10 py-2 px-4",sm:"h-8 px-3 text-sm",lg:"h-12 px-6",icon:"h-10 w-10 p-0"};function g1({variant:l="default",size:s="default",className:r,disabled:o,children:d,...f}){return u.jsx("button",{className:Ya("rounded-md inline-flex items-center justify-center font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none",m1[l],h1[s],r),disabled:o,...f,children:d})}const p1=({logs:l,isLoading:s=!1,error:r=null,onClear:o})=>{const{t:d}=Te(),f=w.useRef(null),[m,x]=w.useState(!0),[h,g]=w.useState(""),[y,S]=w.useState(["info","error","warn","debug"]),[v,O]=w.useState(["main","child"]);w.useEffect(()=>{m&&f.current&&(f.current.scrollTop=f.current.scrollHeight)},[l,m]);const j=l.filter(k=>{const U=h?k.message.toLowerCase().includes(h.toLowerCase()):!0,$=y.includes(k.type),K=v.includes(k.source);return U&&$&&K}),C=k=>new Date(k).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),T=k=>{switch(k){case"error":return"bg-red-400";case"warn":return"bg-yellow-400";case"debug":return"bg-purple-400";default:return"bg-blue-400"}},z=k=>{switch(k){case"main":return"bg-green-400";case"child":return"bg-orange-400";default:return"bg-gray-400"}};return u.jsxs("div",{className:"flex flex-col h-full",children:[u.jsxs("div",{className:"bg-card p-3 rounded-t-md border-b flex flex-wrap items-center justify-between gap-2",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("span",{className:"font-semibold text-sm",children:[d("logs.filters"),":"]}),u.jsx("input",{type:"text",placeholder:d("logs.search"),className:"px-2 py-1 text-sm border rounded",value:h,onChange:k=>g(k.target.value)}),u.jsx("div",{className:"flex gap-1 items-center",children:["info","error","warn","debug"].map(k=>u.jsx(Vr,{variant:y.includes(k)?"default":"outline",className:`cursor-pointer ${y.includes(k)?T(k):""}`,onClick:()=>{y.includes(k)?S(U=>U.filter($=>$!==k)):S(U=>[...U,k])},children:k},k))}),u.jsx("div",{className:"flex gap-1 items-center ml-2",children:["main","child"].map(k=>u.jsx(Vr,{variant:v.includes(k)?"default":"outline",className:`cursor-pointer ${v.includes(k)?z(k):""}`,onClick:()=>{v.includes(k)?O(U=>U.filter($=>$!==k)):O(U=>[...U,k])},children:d(k==="main"?"logs.mainProcess":"logs.childProcess")},k))})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("label",{className:"flex items-center gap-1 text-sm",children:[u.jsx("input",{type:"checkbox",checked:m,onChange:()=>x(!m),className:"form-checkbox h-4 w-4"}),d("logs.autoScroll")]}),u.jsx(g1,{variant:"outline",size:"sm",onClick:o,disabled:s||l.length===0,children:d("logs.clearLogs")})]})]}),u.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?u.jsx("div",{className:"flex justify-center items-center h-full",children:u.jsx("span",{children:d("logs.loading")})}):r?u.jsx("div",{className:"text-red-500 p-2",children:r.message}):j.length===0?u.jsx("div",{className:"text-center text-muted-foreground p-8",children:h||y.length<4||v.length<2?d("logs.noMatch"):d("logs.noLogs")}):j.map((k,U)=>u.jsxs("div",{className:`py-1 border-b border-gray-100 dark:border-gray-800 ${k.type==="error"?"text-red-500":k.type==="warn"?"text-yellow-500":""}`,children:[u.jsxs("span",{className:"text-gray-400",children:["[",C(k.timestamp),"]"]}),u.jsx(Vr,{className:`ml-2 mr-1 ${T(k.type)}`,children:k.type}),u.jsxs(Vr,{variant:"default",className:`mr-2 ${z(k.source)}`,children:[k.source==="main"?d("logs.main"):d("logs.child"),k.processId?` (${k.processId})`:""]}),u.jsx("span",{className:"whitespace-pre-wrap",children:k.message})]},`${k.timestamp}-${U}`))})]})},x1=async()=>{try{const l=Ka();if(!l)throw new Error("Authentication token not found. Please log in.");const r=await(await fetch(Ne("/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}},y1=()=>{const[l,s]=w.useState([]),[r,o]=w.useState(!0),[d,f]=w.useState(null);return w.useEffect(()=>{let x=null,h=!0;const g=()=>{try{x&&x.close();const y=Ka();if(!y){f(new Error("Authentication token not found. Please log in.")),o(!1);return}x=new EventSource(Ne(`/logs/stream?token=${y}`)),x.onmessage=S=>{if(h)try{const v=JSON.parse(S.data);v.type==="initial"?(s(v.logs),o(!1)):v.type==="log"&&s(O=>[...O,v.log])}catch(v){console.error("Error parsing SSE message:",v)}},x.onerror=()=>{h&&(x&&(x.close(),setTimeout(g,5e3)),f(new Error("Connection to log stream lost, attempting to reconnect...")))}}catch(y){if(!h)return;f(y instanceof Error?y:new Error("Failed to connect to log stream")),o(!1)}};return g(),()=>{h=!1,x&&x.close()}},[]),{logs:l,loading:r,error:d,clearLogs:async()=>{try{await x1(),s([])}catch(x){f(x instanceof Error?x:new Error("Failed to clear logs"))}}}},b1=()=>{const{t:l}=Te(),{logs:s,loading:r,error:o,clearLogs:d}=y1();return u.jsxs("div",{className:"container mx-auto p-4",children:[u.jsx("div",{className:"flex justify-between items-center mb-4",children:u.jsx("h1",{className:"text-2xl font-bold",children:l("pages.logs.title")})}),u.jsx("div",{className:"bg-card rounded-md shadow-sm",children:u.jsx(p1,{logs:s,isLoading:r,error:o,onClear:d})})]})};function dh(){const l=Zh();return u.jsx(rv,{children:u.jsx(qy,{children:u.jsx(lv,{children:u.jsx(jy,{basename:l,children:u.jsxs(Wx,{children:[u.jsx(_t,{path:"/login",element:u.jsx(Hv,{})}),u.jsx(_t,{element:u.jsx(_v,{}),children:u.jsxs(_t,{element:u.jsx(Lv,{}),children:[u.jsx(_t,{path:"/",element:u.jsx(Bv,{})}),u.jsx(_t,{path:"/servers",element:u.jsx(e1,{})}),u.jsx(_t,{path:"/groups",element:u.jsx(l1,{})}),u.jsx(_t,{path:"/market",element:u.jsx(ch,{})}),u.jsx(_t,{path:"/market/:serverName",element:u.jsx(ch,{})}),u.jsx(_t,{path:"/logs",element:u.jsx(b1,{})}),u.jsx(_t,{path:"/settings",element:u.jsx(o1,{})})]})}),u.jsx(_t,{path:"*",element:u.jsx(Bh,{to:"/"})})]})})})})})}const ve=l=>typeof l=="string",ms=()=>{let l,s;const r=new Promise((o,d)=>{l=o,s=d});return r.resolve=l,r.reject=s,r},fh=l=>l==null?"":""+l,v1=(l,s,r)=>{l.forEach(o=>{s[o]&&(r[o]=s[o])})},w1=/###/g,mh=l=>l&&l.indexOf("###")>-1?l.replace(w1,"."):l,hh=l=>!l||ve(l),gs=(l,s,r)=>{const o=ve(s)?s.split("."):s;let d=0;for(;d<o.length-1;){if(hh(l))return{};const f=mh(o[d]);!l[f]&&r&&(l[f]=new r),Object.prototype.hasOwnProperty.call(l,f)?l=l[f]:l={},++d}return hh(l)?{}:{obj:l,k:mh(o[d])}},gh=(l,s,r)=>{const{obj:o,k:d}=gs(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),x=gs(l,m,Object);for(;x.obj===void 0&&m.length;)f=`${m[m.length-1]}.${f}`,m=m.slice(0,m.length-1),x=gs(l,m,Object),x!=null&&x.obj&&typeof x.obj[`${x.k}.${f}`]<"u"&&(x.obj=void 0);x.obj[`${x.k}.${f}`]=r},S1=(l,s,r,o)=>{const{obj:d,k:f}=gs(l,s,Object);d[f]=d[f]||[],d[f].push(r)},Xr=(l,s)=>{const{obj:r,k:o}=gs(l,s);if(r&&Object.prototype.hasOwnProperty.call(r,o))return r[o]},j1=(l,s,r)=>{const o=Xr(l,r);return o!==void 0?o:Xr(s,r)},Cg=(l,s,r)=>{for(const o in s)o!=="__proto__"&&o!=="constructor"&&(o in l?ve(l[o])||l[o]instanceof String||ve(s[o])||s[o]instanceof String?r&&(l[o]=s[o]):Cg(l[o],s[o],r):l[o]=s[o]);return l},tl=l=>l.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var N1={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const E1=l=>ve(l)?l.replace(/[&<>"'\/]/g,s=>N1[s]):l;class C1{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 k1=[" ",",","?","!",";"],T1=new C1(20),A1=(l,s,r)=>{s=s||"",r=r||"";const o=k1.filter(m=>s.indexOf(m)<0&&r.indexOf(m)<0);if(o.length===0)return!0;const d=T1.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},Uu=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,x="";for(let h=f;h<o.length;++h)if(h!==f&&(x+=r),x+=o[h],m=d[x],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},Zr=l=>l==null?void 0:l.replace("_","-"),R1={type:"logger",log(l){this.output("log",l)},warn(l){this.output("warn",l)},error(l){this.output("error",l)},output(l,s){var r,o;(o=(r=console==null?void 0:console[l])==null?void 0:r.apply)==null||o.call(r,console,s)}};class Pr{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||R1,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:(ve(s[0])&&(s[0]=`${o}${this.prefix} ${s[0]}`),this.logger[r](s))}create(s){return new Pr(this.logger,{prefix:`${this.prefix}:${s}:`,...this.options})}clone(s){return s=s||this.options,s.prefix=s.prefix||this.prefix,new Pr(this.logger,s)}}var It=new Pr;class ti{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[x,h]=m;for(let g=0;g<h;g++)x(...o)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(m=>{let[x,h]=m;for(let g=0;g<h;g++)x.apply(x,[s,...o])})}}class ph extends ti{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,y;let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const f=d.keySeparator!==void 0?d.keySeparator:this.options.keySeparator,m=d.ignoreJSONStructure!==void 0?d.ignoreJSONStructure:this.options.ignoreJSONStructure;let x;s.indexOf(".")>-1?x=s.split("."):(x=[s,r],o&&(Array.isArray(o)?x.push(...o):ve(o)&&f?x.push(...o.split(f)):x.push(o)));const h=Xr(this.data,x);return!h&&!r&&!o&&s.indexOf(".")>-1&&(s=x[0],r=x[1],o=x.slice(2).join(".")),h||!m||!ve(o)?h:Uu((y=(g=this.data)==null?void 0:g[s])==null?void 0:y[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 x=[s,r];o&&(x=x.concat(m?o.split(m):o)),s.indexOf(".")>-1&&(x=s.split("."),d=r,r=x[1]),this.addNamespaces(r),gh(this.data,x,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)(ve(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},x=[s,r];s.indexOf(".")>-1&&(x=s.split("."),d=o,o=r,r=x[1]),this.addNamespaces(r);let h=Xr(this.data,x)||{};m.skipCopy||(o=JSON.parse(JSON.stringify(o))),d?Cg(h,o,f):h={...h,...o},gh(this.data,x,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 kg={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 xh={},yh=l=>!ve(l)&&typeof l!="boolean"&&typeof l!="number";class Jr extends ti{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),v1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],s,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=It.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,x=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!A1(s,o,d);if(m&&!x){const h=s.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:s,namespaces:ve(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:ve(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:x}=this.extractFromKey(s[s.length-1],r),h=x[x.length-1],g=r.lng||this.language,y=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((g==null?void 0:g.toLowerCase())==="cimode"){if(y){const q=r.nsSeparator||this.options.nsSeparator;return d?{res:`${h}${q}${m}`,usedKey:m,exactUsedKey:m,usedLng:g,usedNS:h,usedParams:this.getUsedParamsDetails(r)}:`${h}${q}${m}`}return d?{res:m,usedKey:m,exactUsedKey:m,usedLng:g,usedNS:h,usedParams:this.getUsedParamsDetails(r)}:m}const S=this.resolve(s,r);let v=S==null?void 0:S.res;const O=(S==null?void 0:S.usedKey)||m,j=(S==null?void 0:S.exactUsedKey)||m,C=["[object Number]","[object Function]","[object RegExp]"],T=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,z=!this.i18nFormat||this.i18nFormat.handleAsObject,k=r.count!==void 0&&!ve(r.count),U=Jr.hasDefaultValue(r),$=k?this.pluralResolver.getSuffix(g,r.count,r):"",K=r.ordinal&&k?this.pluralResolver.getSuffix(g,r.count,{ordinal:!1}):"",ue=k&&!r.ordinal&&r.count===0,X=ue&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${$}`]||r[`defaultValue${K}`]||r.defaultValue;let Y=v;z&&!v&&U&&(Y=X);const I=yh(Y),H=Object.prototype.toString.apply(Y);if(z&&Y&&I&&C.indexOf(H)<0&&!(ve(T)&&Array.isArray(Y))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const q=this.options.returnedObjectHandler?this.options.returnedObjectHandler(O,Y,{...r,ns:x}):`key '${m} (${this.language})' returned an object instead of string.`;return d?(S.res=q,S.usedParams=this.getUsedParamsDetails(r),S):q}if(f){const q=Array.isArray(Y),ae=q?[]:{},le=q?j:O;for(const se in Y)if(Object.prototype.hasOwnProperty.call(Y,se)){const G=`${le}${f}${se}`;U&&!v?ae[se]=this.translate(G,{...r,defaultValue:yh(X)?X[se]:void 0,joinArrays:!1,ns:x}):ae[se]=this.translate(G,{...r,joinArrays:!1,ns:x}),ae[se]===G&&(ae[se]=Y[se])}v=ae}}else if(z&&ve(T)&&Array.isArray(v))v=v.join(T),v&&(v=this.extendTranslation(v,s,r,o));else{let q=!1,ae=!1;!this.isValidLookup(v)&&U&&(q=!0,v=X),this.isValidLookup(v)||(ae=!0,v=m);const se=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ae?void 0:v,G=U&&X!==v&&this.options.updateMissing;if(ae||q||G){if(this.logger.log(G?"updateKey":"missingKey",g,h,m,G?X:v),f){const te=this.resolve(m,{...r,keySeparator:!1});te&&te.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 M=[];const W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let te=0;te<W.length;te++)M.push(W[te]);else this.options.saveMissingTo==="all"?M=this.languageUtils.toResolveHierarchy(r.lng||this.language):M.push(r.lng||this.language);const A=(te,N,Q)=>{var Z;const ne=U&&Q!==v?Q:se;this.options.missingKeyHandler?this.options.missingKeyHandler(te,h,N,ne,G,r):(Z=this.backendConnector)!=null&&Z.saveMissing&&this.backendConnector.saveMissing(te,h,N,ne,G,r),this.emit("missingKey",te,h,N,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?M.forEach(te=>{const N=this.pluralResolver.getSuffixes(te,r);ue&&r[`defaultValue${this.options.pluralSeparator}zero`]&&N.indexOf(`${this.options.pluralSeparator}zero`)<0&&N.push(`${this.options.pluralSeparator}zero`),N.forEach(Q=>{A([te],m+Q,r[`defaultValue${Q}`]||X)})}):A(M,m,X))}v=this.extendTranslation(v,s,r,S,o),ae&&v===m&&this.options.appendNamespaceToMissingKey&&(v=`${h}:${m}`),(ae||q)&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}:${m}`:m,q?v:void 0))}return d?(S.res=v,S.usedParams=this.getUsedParamsDetails(r),S):v}extendTranslation(s,r,o,d,f){var g,y;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 S=ve(s)&&(((y=o==null?void 0:o.interpolation)==null?void 0:y.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let v;if(S){const j=s.match(this.interpolator.nestingRegexp);v=j&&j.length}let O=o.replace&&!ve(o.replace)?o.replace:o;if(this.options.interpolation.defaultVariables&&(O={...this.options.interpolation.defaultVariables,...O}),s=this.interpolator.interpolate(s,O,o.lng||this.language||d.usedLng,o),S){const j=s.match(this.interpolator.nestingRegexp),C=j&&j.length;v<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 j=arguments.length,C=new Array(j),T=0;T<j;T++)C[T]=arguments[T];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 x=o.postProcess||this.options.postProcess,h=ve(x)?[x]:x;return s!=null&&(h!=null&&h.length)&&o.applyPostProcessor!==!1&&(s=kg.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,x;return ve(s)&&(s=[s]),s.forEach(h=>{if(this.isValidLookup(o))return;const g=this.extractFromKey(h,r),y=g.key;d=y;let S=g.namespaces;this.options.fallbackNS&&(S=S.concat(this.options.fallbackNS));const v=r.count!==void 0&&!ve(r.count),O=v&&!r.ordinal&&r.count===0,j=r.context!==void 0&&(ve(r.context)||typeof r.context=="number")&&r.context!=="",C=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);S.forEach(T=>{var z,k;this.isValidLookup(o)||(x=T,!xh[`${C[0]}-${T}`]&&((z=this.utils)!=null&&z.hasLoadedNamespace)&&!((k=this.utils)!=null&&k.hasLoadedNamespace(x))&&(xh[`${C[0]}-${T}`]=!0,this.logger.warn(`key "${d}" for languages "${C.join(", ")}" won't get resolved as namespace "${x}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),C.forEach(U=>{var ue;if(this.isValidLookup(o))return;m=U;const $=[y];if((ue=this.i18nFormat)!=null&&ue.addLookupKeys)this.i18nFormat.addLookupKeys($,y,U,T,r);else{let X;v&&(X=this.pluralResolver.getSuffix(U,r.count,r));const Y=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(v&&($.push(y+X),r.ordinal&&X.indexOf(I)===0&&$.push(y+X.replace(I,this.options.pluralSeparator)),O&&$.push(y+Y)),j){const H=`${y}${this.options.contextSeparator}${r.context}`;$.push(H),v&&($.push(H+X),r.ordinal&&X.indexOf(I)===0&&$.push(H+X.replace(I,this.options.pluralSeparator)),O&&$.push(H+Y))}}let K;for(;K=$.pop();)this.isValidLookup(o)||(f=K,o=this.getResource(U,T,K,r))}))})}),{res:o,usedKey:d,exactUsedKey:f,usedLng:m,usedNS:x}}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&&!ve(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 bh{constructor(s){this.options=s,this.supportedLngs=this.options.supportedLngs||!1,this.logger=It.create("languageUtils")}getScriptPartFromCode(s){if(s=Zr(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=Zr(s),!s||s.indexOf("-")<0)return s;const r=s.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(s){if(ve(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)),ve(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 ve(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))):ve(s)&&f(this.formatLanguageCode(s)),o.forEach(m=>{d.indexOf(m)<0&&f(this.formatLanguageCode(m))}),d}}const vh={zero:0,one:1,two:2,few:3,many:4,other:5},wh={select:l=>l===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class O1{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=s,this.options=r,this.logger=It.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=Zr(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!"),wh;if(!s.match(/-|_/))return wh;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)=>vh[d]-vh[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 Sh=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=j1(l,s,r);return!f&&d&&ve(r)&&(f=Uu(l,r,o),f===void 0&&(f=Uu(s,r,o))),f},Nu=l=>l.replace(/\$/g,"$$$$");class M1{constructor(){var r;let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=It.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:x,suffixEscaped:h,formatSeparator:g,unescapeSuffix:y,unescapePrefix:S,nestingPrefix:v,nestingPrefixEscaped:O,nestingSuffix:j,nestingSuffixEscaped:C,nestingOptionsSeparator:T,maxReplaces:z,alwaysFormat:k}=s.interpolation;this.escape=r!==void 0?r:E1,this.escapeValue=o!==void 0?o:!0,this.useRawValueToEscape=d!==void 0?d:!1,this.prefix=f?tl(f):m||"{{",this.suffix=x?tl(x):h||"}}",this.formatSeparator=g||",",this.unescapePrefix=y?"":S||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=v?tl(v):O||tl("$t("),this.nestingSuffix=j?tl(j):C||tl(")"),this.nestingOptionsSeparator=T||",",this.maxReplaces=z||1e3,this.alwaysFormat=k!==void 0?k:!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 O;let f,m,x;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=j=>{if(j.indexOf(this.formatSeparator)<0){const k=Sh(r,h,j,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(k,void 0,o,{...d,...r,interpolationkey:j}):k}const C=j.split(this.formatSeparator),T=C.shift().trim(),z=C.join(this.formatSeparator).trim();return this.format(Sh(r,h,T,this.options.keySeparator,this.options.ignoreJSONStructure),z,o,{...d,...r,interpolationkey:T})};this.resetRegExp();const y=(d==null?void 0:d.missingInterpolationHandler)||this.options.missingInterpolationHandler,S=((O=d==null?void 0:d.interpolation)==null?void 0:O.skipOnVariables)!==void 0?d.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:j=>Nu(j)},{regex:this.regexp,safeValue:j=>this.escapeValue?Nu(this.escape(j)):Nu(j)}].forEach(j=>{for(x=0;f=j.regex.exec(s);){const C=f[1].trim();if(m=g(C),m===void 0)if(typeof y=="function"){const z=y(s,f,d);m=ve(z)?z:""}else if(d&&Object.prototype.hasOwnProperty.call(d,C))m="";else if(S){m=f[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${s}`),m="";else!ve(m)&&!this.useRawValueToEscape&&(m=fh(m));const T=j.safeValue(m);if(s=s.replace(f[0],T),S?(j.regex.lastIndex+=m.length,j.regex.lastIndex-=f[0].length):j.regex.lastIndex=0,x++,x>=this.maxReplaces)break}}),s}nest(s,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d,f,m;const x=(h,g)=>{const y=this.nestingOptionsSeparator;if(h.indexOf(y)<0)return h;const S=h.split(new RegExp(`${y}[ ]*{`));let v=`{${S[1]}`;h=S[0],v=this.interpolate(v,m);const O=v.match(/'/g),j=v.match(/"/g);(((O==null?void 0:O.length)??0)%2===0&&!j||j.length%2!==0)&&(v=v.replace(/'/g,'"'));try{m=JSON.parse(v),g&&(m={...g,...m})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,C),`${h}${y}${v}`}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&&!ve(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 y=d[1].split(this.formatSeparator).map(S=>S.trim());d[1]=y.shift(),h=y,g=!0}if(f=r(x.call(this,d[1].trim(),m),m),f&&d[0]===s&&!ve(f))return f;ve(f)||(f=fh(f)),f||(this.logger.warn(`missed to resolve ${d[1]} for nesting ${s}`),f=""),g&&(f=h.reduce((y,S)=>this.format(y,S,o.lng,{...o,interpolationkey:d[1].trim()}),f.trim())),s=s.replace(d[0],f),this.regexp.lastIndex=0}return s}}const z1=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[x,...h]=m.split(":"),g=h.join(":").trim().replace(/^'+|'+$/g,""),y=x.trim();r[y]||(r[y]=g),g==="false"&&(r[y]=!1),g==="true"&&(r[y]=!0),isNaN(g)||(r[y]=parseInt(g,10))}})}return{formatName:s,formatOptions:r}},al=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 x=s[m];return x||(x=l(Zr(o),d),s[m]=x),x(r)}};class D1{constructor(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=It.create("formatter"),this.options=s,this.formats={number:al((r,o)=>{const d=new Intl.NumberFormat(r,{...o});return f=>d.format(f)}),currency:al((r,o)=>{const d=new Intl.NumberFormat(r,{...o,style:"currency"});return f=>d.format(f)}),datetime:al((r,o)=>{const d=new Intl.DateTimeFormat(r,{...o});return f=>d.format(f)}),relativetime:al((r,o)=>{const d=new Intl.RelativeTimeFormat(r,{...o});return f=>d.format(f,o.range||"day")}),list:al((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()]=al(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(x=>x.indexOf(")")>-1)){const x=f.findIndex(h=>h.indexOf(")")>-1);f[0]=[f[0],...f.splice(1,x)].join(this.formatSeparator)}return f.reduce((x,h)=>{var S;const{formatName:g,formatOptions:y}=z1(h);if(this.formats[g]){let v=x;try{const O=((S=d==null?void 0:d.formatParams)==null?void 0:S[d.interpolationkey])||{},j=O.locale||O.lng||d.locale||d.lng||o;v=this.formats[g](x,j,{...y,...d,...O})}catch(O){this.logger.warn(O)}return v}else this.logger.warn(`there was no format function for ${g}`);return x},s)}}const U1=(l,s)=>{l.pending[s]!==void 0&&(delete l.pending[s],l.pendingCount--)};class L1 extends ti{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=It.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={},x={},h={};return s.forEach(g=>{let y=!0;r.forEach(S=>{const v=`${g}|${S}`;!o.reload&&this.store.hasResourceBundle(g,S)?this.state[v]=2:this.state[v]<0||(this.state[v]===1?m[v]===void 0&&(m[v]=!0):(this.state[v]=1,y=!1,m[v]===void 0&&(m[v]=!0),f[v]===void 0&&(f[v]=!0),h[S]===void 0&&(h[S]=!0)))}),y||(x[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(x),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 x={};this.queue.forEach(h=>{S1(h.loaded,[f],m),U1(h,s),r&&h.errors.push(r),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(g=>{x[g]||(x[g]={});const y=h.loaded[g];y.length&&y.forEach(S=>{x[g][S]===void 0&&(x[g][S]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",x),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 x=(g,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const S=this.waitingReads.shift();this.read(S.lng,S.ns,S.fcName,S.tried,S.wait,S.callback)}if(g&&y&&d<this.maxRetries){setTimeout(()=>{this.read.call(this,s,r,o,d+1,f*2,m)},f);return}m(g,y)},h=this.backend[o].bind(this.backend);if(h.length===2){try{const g=h(s,r);g&&typeof g.then=="function"?g.then(y=>x(null,y)).catch(x):x(null,g)}catch(g){x(g)}return}return h(s,r,x)}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();ve(s)&&(s=this.languageUtils.toResolveHierarchy(s)),ve(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,x)=>{m&&this.logger.warn(`${r}loading namespace ${f} for language ${d} failed`,m),!m&&x&&this.logger.log(`${r}loaded namespace ${f} for language ${d}`,x),this.loaded(s,m,x)})}saveMissing(s,r,o,d,f){var h,g,y,S,v;let m=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},x=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((g=(h=this.services)==null?void 0:h.utils)!=null&&g.hasLoadedNamespace&&!((S=(y=this.services)==null?void 0:y.utils)!=null&&S.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((v=this.backend)!=null&&v.create){const O={...m,isUpdate:f},j=this.backend.create.bind(this.backend);if(j.length<6)try{let C;j.length===5?C=j(s,r,o,d,O):C=j(s,r,o,d),C&&typeof C.then=="function"?C.then(T=>x(null,T)).catch(x):x(null,C)}catch(C){x(C)}else j(s,r,o,d,x,O)}!s||!s[0]||this.store.addResource(s[0],r,o,d)}}}const jh=()=>({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]),ve(l[1])&&(s.defaultValue=l[1]),ve(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}}),Nh=l=>{var s,r;return ve(l.ns)&&(l.ns=[l.ns]),ve(l.fallbackLng)&&(l.fallbackLng=[l.fallbackLng]),ve(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},$r=()=>{},_1=l=>{Object.getOwnPropertyNames(Object.getPrototypeOf(l)).forEach(r=>{typeof l[r]=="function"&&(l[r]=l[r].bind(l))})};class ys extends ti{constructor(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Nh(s),this.services={},this.logger=It,this.modules={external:[]},_1(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&&(ve(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const d=jh();this.options={...d,...this.options,...Nh(r)},this.options.interpolation={...d.interpolation,...this.options.interpolation},r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const f=y=>y?typeof y=="function"?new y:y:null;if(!this.options.isClone){this.modules.logger?It.init(f(this.modules.logger),this.options):It.init(null,this.options);let y;this.modules.formatter?y=this.modules.formatter:y=D1;const S=new bh(this.options);this.store=new ph(this.options.resources,this.options);const v=this.services;v.logger=It,v.resourceStore=this.store,v.languageUtils=S,v.pluralResolver=new O1(S,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),y&&(!this.options.interpolation.format||this.options.interpolation.format===d.interpolation.format)&&(v.formatter=f(y),v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new M1(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new L1(f(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",function(O){for(var j=arguments.length,C=new Array(j>1?j-1:0),T=1;T<j;T++)C[T-1]=arguments[T];s.emit(O,...C)}),this.modules.languageDetector&&(v.languageDetector=f(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=f(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new Jr(this.services,this.options),this.translator.on("*",function(O){for(var j=arguments.length,C=new Array(j>1?j-1:0),T=1;T<j;T++)C[T-1]=arguments[T];s.emit(O,...C)}),this.modules.external.forEach(O=>{O.init&&O.init(this)})}if(this.format=this.options.interpolation.format,o||(o=$r),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const y=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);y.length>0&&y[0]!=="dev"&&(this.options.lng=y[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(y=>{this[y]=function(){return s.store[y](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(y=>{this[y]=function(){return s.store[y](...arguments),s}});const h=ms(),g=()=>{const y=(S,v)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),h.resolve(v),o(S,v)};if(this.languages&&!this.isInitialized)return y(null,this.t.bind(this));this.changeLanguage(this.options.lng,y)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),h}loadResources(s){var f,m;let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$r;const d=ve(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 x=[],h=g=>{if(!g||g==="cimode")return;this.services.languageUtils.toResolveHierarchy(g).forEach(S=>{S!=="cimode"&&x.indexOf(S)<0&&x.push(S)})};d?h(d):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(y=>h(y)),(m=(f=this.options.preload)==null?void 0:f.forEach)==null||m.call(f,g=>h(g)),this.services.backendConnector.load(x,this.options.ns,g=>{!g&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(g)})}else o(null)}reloadResources(s,r,o){const d=ms();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=$r),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"&&kg.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=ms();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)})},x=h=>{var y,S;!s&&!h&&this.services.languageDetector&&(h=[]);const g=ve(h)?h:this.services.languageUtils.getBestMatchFromCodes(h);g&&(this.language||f(g),this.translator.language||this.translator.changeLanguage(g),(S=(y=this.services.languageDetector)==null?void 0:y.cacheUserLanguage)==null||S.call(y,g)),this.loadResources(g,v=>{m(v,g)})};return!s&&this.services.languageDetector&&!this.services.languageDetector.async?x(this.services.languageDetector.detect()):!s&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(x):this.services.languageDetector.detect(x):x(s),d}getFixedT(s,r,o){var d=this;const f=function(m,x){let h;if(typeof x!="object"){for(var g=arguments.length,y=new Array(g>2?g-2:0),S=2;S<g;S++)y[S-2]=arguments[S];h=d.options.overloadTranslationOptionHandler([m,x].concat(y))}else h={...x};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 v=d.options.keySeparator||".";let O;return h.keyPrefix&&Array.isArray(m)?O=m.map(j=>`${h.keyPrefix}${v}${j}`):O=h.keyPrefix?`${h.keyPrefix}${v}${m}`:m,d.t(O,h)};return ve(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=(x,h)=>{const g=this.services.backendConnector.state[`${x}|${h}`];return g===-1||g===0||g===2};if(r.precheck){const x=r.precheck(this,m);if(x!==void 0)return x}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=ms();return this.options.ns?(ve(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=ms();ve(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 bh(jh());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 ys(s,r)}cloneInstance(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$r;const o=s.forkResourceStore;o&&delete s.forkResourceStore;const d={...this.options,...s,isClone:!0},f=new ys(d);if((s.debug!==void 0||s.prefix!==void 0)&&(f.logger=f.logger.clone(s)),["store","services","language"].forEach(x=>{f[x]=this[x]}),f.services={...this.services},f.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},o){const x=Object.keys(this.store.data).reduce((h,g)=>(h[g]={...this.store.data[g]},Object.keys(h[g]).reduce((y,S)=>(y[S]={...h[g][S]},y),{})),{});f.store=new ph(x,d),f.services.resourceStore=f.store}return f.translator=new Jr(f.services,d),f.translator.on("*",function(x){for(var h=arguments.length,g=new Array(h>1?h-1:0),y=1;y<h;y++)g[y-1]=arguments[y];f.emit(x,...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 ft=ys.createInstance();ft.createInstance=ys.createInstance;ft.createInstance;ft.dir;ft.init;ft.loadResources;ft.reloadResources;ft.use;ft.changeLanguage;ft.getFixedT;ft.t;ft.exists;ft.setDefaultNamespace;ft.hasLoadedNamespace;ft.loadNamespaces;ft.loadLanguages;const{slice:H1,forEach:B1}=[];function q1(l){return B1.call(H1.call(arguments,1),s=>{if(s)for(const r in s)l[r]===void 0&&(l[r]=s[r])}),l}function G1(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 Eh=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,V1=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(!Eh.test(o.domain))throw new TypeError("option domain is invalid");f+=`; Domain=${o.domain}`}if(o.path){if(!Eh.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},Ch={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=V1(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 $1={name:"cookie",lookup(l){let{lookupCookie:s}=l;if(s&&typeof document<"u")return Ch.read(s)||void 0},cacheUserLanguage(l,s){let{lookupCookie:r,cookieMinutes:o,cookieDomain:d,cookieOptions:f}=s;r&&typeof document<"u"&&Ch.create(r,l,o,d,f)}},Y1={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 x=0;x<m.length;x++){const h=m[x].indexOf("=");h>0&&m[x].substring(0,h)===s&&(r=m[x].substring(h+1))}}return r}};let nl=null;const kh=()=>{if(nl!==null)return nl;try{if(nl=typeof window<"u"&&window.localStorage!==null,!nl)return!1;const l="i18next.translate.boo";window.localStorage.setItem(l,"foo"),window.localStorage.removeItem(l)}catch{nl=!1}return nl};var K1={name:"localStorage",lookup(l){let{lookupLocalStorage:s}=l;if(s&&kh())return window.localStorage.getItem(s)||void 0},cacheUserLanguage(l,s){let{lookupLocalStorage:r}=s;r&&kh()&&window.localStorage.setItem(r,l)}};let ll=null;const Th=()=>{if(ll!==null)return ll;try{if(ll=typeof window<"u"&&window.sessionStorage!==null,!ll)return!1;const l="i18next.translate.boo";window.sessionStorage.setItem(l,"foo"),window.sessionStorage.removeItem(l)}catch{ll=!1}return ll};var Q1={name:"sessionStorage",lookup(l){let{lookupSessionStorage:s}=l;if(s&&Th())return window.sessionStorage.getItem(s)||void 0},cacheUserLanguage(l,s){let{lookupSessionStorage:r}=s;r&&Th()&&window.sessionStorage.setItem(r,l)}},X1={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}},Z1={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}},P1={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}},J1={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 Tg=!1;try{document.cookie,Tg=!0}catch{}const Ag=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Tg||Ag.splice(1,1);const F1=()=>({order:Ag,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:l=>l});class Rg{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=q1(r,this.options||{},F1()),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($1),this.addDetector(Y1),this.addDetector(K1),this.addDetector(Q1),this.addDetector(X1),this.addDetector(Z1),this.addDetector(P1),this.addDetector(J1)}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&&!G1(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)}))}}Rg.type="languageDetector";const I1={title:"MCP Hub Dashboard",error:"Error",closeButton:"Close",noServers:"No MCP servers available",loading:"Loading...",logout:"Logout",profile:"Profile",changePassword:"Change Password",toggleSidebar:"Toggle Sidebar",welcomeUser:"Welcome, {{username}}",name:"MCP Hub"},W1={title:"About",versionInfo:"MCP Hub Version: {{version}}",newVersion:"New version available!",currentVersion:"Current version",newVersionAvailable:"New version {{version}} is available",viewOnGitHub:"View on GitHub",checkForUpdates:"Check for Updates",checking:"Checking for updates..."},e2={viewProfile:"View profile",userCenter:"User Center"},t2={label:"Sponsor",title:"Support the Project",rewardAlt:"Reward QR Code",supportMessage:"Support the development of MCP Hub by buying me a coffee!",supportButton:"Support on Ko-fi"},a2={label:"WeChat",title:"Connect via WeChat",qrCodeAlt:"WeChat QR Code",scanMessage:"Scan this QR code to connect with us on WeChat"},n2={label:"Discord",title:"Join our Discord server",community:"Join our growing community on Discord for support, discussions, and updates!"},l2={title:"Theme",light:"Light",dark:"Dark",system:"System"},s2={login:"Login",loginTitle:"Login to MCP Hub",username:"Username",password:"Password",loggingIn:"Logging in...",emptyFields:"Username and password cannot be empty",loginFailed:"Login failed, please check your username and password",loginError:"An error occurred during login",currentPassword:"Current Password",newPassword:"New Password",confirmPassword:"Confirm Password",passwordsNotMatch:"New password and confirmation do not match",changePasswordSuccess:"Password changed successfully",changePasswordError:"Failed to change password",changePassword:"Change Password",passwordChanged:"Password changed successfully",passwordChangeError:"Failed to change password"},r2={addServer:"Add Server",add:"Add",edit:"Edit",delete:"Delete",confirmDelete:"Are you sure you want to delete this server?",deleteWarning:"Deleting server '{{name}}' will remove it and all its data. This action cannot be undone.",status:"Status",tools:"Tools",name:"Server Name",url:"Server URL",apiKey:"API Key",save:"Save",cancel:"Cancel",invalidConfig:"Could not find configuration data for {{serverName}}",addError:"Failed to add server",editError:"Failed to edit server {{serverName}}",deleteError:"Failed to delete server {{serverName}}",updateError:"Failed to update server",editTitle:"Edit Server: {{serverName}}",type:"Server Type",command:"Command",arguments:"Arguments",envVars:"Environment Variables",headers:"HTTP Headers",key:"key",value:"value",enabled:"Enabled",enable:"Enable",disable:"Disable",requestOptions:"Configuration",timeout:"Request Timeout",timeoutDescription:"Timeout for requests to the MCP server (ms)",maxTotalTimeout:"Maximum Total Timeout",maxTotalTimeoutDescription:"Maximum total timeout for requests sent to the MCP server (ms) (Use with progress notifications)",resetTimeoutOnProgress:"Reset Timeout on Progress",resetTimeoutOnProgressDescription:"Reset timeout on progress notifications",remove:"Remove",toggleError:"Failed to toggle server {{serverName}}",alreadyExists:"Server {{serverName}} already exists",invalidData:"Invalid server data provided",notFound:"Server {{serverName}} not found",namePlaceholder:"Enter server name",urlPlaceholder:"Enter server URL",commandPlaceholder:"Enter command",argumentsPlaceholder:"Enter arguments",errorDetails:"Error Details",viewErrorDetails:"View error details"},i2={online:"Online",offline:"Offline",connecting:"Connecting"},o2={general:"Something went wrong",network:"Network connection error. Please check your internet connection",serverConnection:"Unable to connect to the server. Please check if the server is running",serverAdd:"Failed to add server. Please check the server status",serverUpdate:"Failed to edit server {{serverName}}. Please check the server status",serverFetch:"Failed to retrieve server data. Please try again later",initialStartup:"The server might be starting up. Please wait a moment as this process can take some time on first launch...",serverInstall:"Failed to install server",failedToFetchSettings:"Failed to fetch settings",failedToUpdateRouteConfig:"Failed to update route configuration",failedToUpdateSmartRoutingConfig:"Failed to update smart routing configuration"},u2={processing:"Processing...",save:"Save",cancel:"Cancel",refresh:"Refresh",create:"Create",submitting:"Submitting...",delete:"Delete",remove:"Remove",copy:"Copy",copySuccess:"Copied to clipboard",copyFailed:"Copy failed",close:"Close"},c2={dashboard:"Dashboard",servers:"Servers",groups:"Groups",settings:"Settings",changePassword:"Change Password",market:"Market",logs:"Logs"},d2={dashboard:{title:"Dashboard",totalServers:"Total",onlineServers:"Online",offlineServers:"Offline",connectingServers:"Connecting",recentServers:"Recent Servers"},servers:{title:"Servers Management"},groups:{title:"Group Management"},settings:{title:"Settings",language:"Language",account:"Account Settings",password:"Change Password",appearance:"Appearance",routeConfig:"Security",installConfig:"Installation",smartRouting:"Smart Routing"},market:{title:"Server Market - (Data from mcpm.sh)"},logs:{title:"System Logs"}},f2={filters:"Filters",search:"Search logs...",autoScroll:"Auto-scroll",clearLogs:"Clear logs",loading:"Loading logs...",noLogs:"No logs available.",noMatch:"No logs match the current filters.",mainProcess:"Main Process",childProcess:"Child Process",main:"Main",child:"Child"},m2={add:"Add",addNew:"Add New Group",edit:"Edit Group",delete:"Delete",confirmDelete:"Are you sure you want to delete this group?",deleteWarning:"Deleting group '{{name}}' will remove it and all its server associations. This action cannot be undone.",name:"Group Name",namePlaceholder:"Enter group name",nameRequired:"Group name is required",description:"Description",descriptionPlaceholder:"Enter group description (optional)",createError:"Failed to create group",updateError:"Failed to update group",deleteError:"Failed to delete group",serverAddError:"Failed to add server to group",serverRemoveError:"Failed to remove server from group",addServer:"Add Server to Group",selectServer:"Select a server to add",servers:"Servers in Group",remove:"Remove",noGroups:"No groups available. Create a new group to get started.",noServers:"No servers in this group.",noServerOptions:"No servers available",serverCount:"{{count}} Servers"},h2={title:"Server Market",official:"Official",by:"By",unknown:"Unknown",tools:"tools",search:"Search",searchPlaceholder:"Search for servers by name, category, or tags",clearFilters:"Clear",clearCategoryFilter:"",clearTagFilter:"",categories:"Categories",tags:"Tags",showTags:"Show tags",hideTags:"Hide tags",moreTags:"",noServers:"No servers found matching your search",backToList:"Back to list",install:"Install",installing:"Installing...",installed:"Installed",installServer:"Install Server: {{name}}",installSuccess:"Server {{serverName}} installed successfully",author:"Author",license:"License",repository:"Repository",examples:"Examples",arguments:"Arguments",argumentName:"Name",description:"Description",required:"Required",example:"Example",viewSchema:"View schema",fetchError:"Error fetching market servers",serverNotFound:"Server not found",searchError:"Error searching servers",filterError:"Error filtering servers by category",tagFilterError:"Error filtering servers by tag",noInstallationMethod:"No installation method available for this server",showing:"Showing {{from}}-{{to}} of {{total}} servers",perPage:"Per page"},g2={run:"Run",running:"Running...",runTool:"Run Tool",cancel:"Cancel",noDescription:"No description available",inputSchema:"Input Schema:",runToolWithName:"Run Tool: {{name}}",execution:"Tool Execution",successful:"Successful",failed:"Failed",result:"Result:",error:"Error",errorDetails:"Error Details:",noContent:"Tool executed successfully but returned no content.",unknownError:"Unknown error occurred",jsonResponse:"JSON Response:",toolResult:"Tool result",noParameters:"This tool does not require any parameters.",selectOption:"Select an option",enterValue:"Enter {{type}} value",enabled:"Enabled",enableSuccess:"Tool {{name}} enabled successfully",disableSuccess:"Tool {{name}} disabled successfully",toggleFailed:"Failed to toggle tool status",parameters:"Tool Parameters",formMode:"Form Mode",jsonMode:"JSON Mode",jsonConfiguration:"JSON Configuration",invalidJsonFormat:"Invalid JSON format",fixJsonBeforeSwitching:"Please fix JSON format before switching to form mode",item:"Item {{index}}",addItem:"Add {{key}} item",enterKey:"Enter {{key}}"},p2={enableGlobalRoute:"Enable Global Route",enableGlobalRouteDescription:"Allow connections to /sse endpoint without specifying a group ID",enableGroupNameRoute:"Enable Group Name Route",enableGroupNameRouteDescription:"Allow connections to /sse endpoint using group names instead of just group IDs",enableBearerAuth:"Enable Bearer Authentication",enableBearerAuthDescription:"Require bearer token authentication for MCP requests",bearerAuthKey:"Bearer Authentication Key",bearerAuthKeyDescription:"The authentication key that will be required in the Bearer token",bearerAuthKeyPlaceholder:"Enter bearer authentication key",pythonIndexUrl:"Python Package Repository URL",pythonIndexUrlDescription:"Set UV_DEFAULT_INDEX environment variable for Python package installation",pythonIndexUrlPlaceholder:"e.g. https://pypi.org/simple",npmRegistry:"NPM Registry URL",npmRegistryDescription:"Set npm_config_registry environment variable for NPM package installation",npmRegistryPlaceholder:"e.g. https://registry.npmjs.org/",installConfig:"Installation",systemConfigUpdated:"System configuration updated successfully",enableSmartRouting:"Enable Smart Routing",enableSmartRoutingDescription:"Enable smart routing feature to search the most suitable tool based on input (using $smart group name)",dbUrl:"PostgreSQL URL (requires pgvector support)",dbUrlPlaceholder:"e.g. postgresql://user:password@localhost:5432/dbname",openaiApiBaseUrl:"OpenAI API Base URL",openaiApiBaseUrlPlaceholder:"https://api.openai.com/v1",openaiApiKey:"OpenAI API Key",openaiApiKeyPlaceholder:"Enter OpenAI API key",openaiApiEmbeddingModel:"OpenAI Embedding Model",openaiApiEmbeddingModelPlaceholder:"text-embedding-3-small",smartRoutingConfigUpdated:"Smart routing configuration updated successfully",smartRoutingRequiredFields:"Database URL and OpenAI API Key are required to enable smart routing",smartRoutingValidationError:"Please fill in the required fields before enabling Smart Routing: {{fields}}"},x2={app:I1,about:W1,profile:e2,sponsor:t2,wechat:a2,discord:n2,theme:l2,auth:s2,server:r2,status:i2,errors:o2,common:u2,nav:c2,pages:d2,logs:f2,groups:m2,market:h2,tool:g2,settings:p2},y2={title:"MCP Hub 控制面板",error:"错误",closeButton:"关闭",noServers:"没有可用的 MCP 服务器",loading:"加载中...",logout:"退出登录",profile:"个人资料",changePassword:"修改密码",toggleSidebar:"切换侧边栏",welcomeUser:"欢迎, {{username}}",name:"MCP Hub"},b2={title:"关于",versionInfo:"MCP Hub 版本: {{version}}",newVersion:"有新版本可用!",currentVersion:"当前版本",newVersionAvailable:"新版本 {{version}} 已发布",viewOnGitHub:"在 GitHub 上查看",checkForUpdates:"检查更新",checking:"检查更新中..."},v2={viewProfile:"查看个人中心",userCenter:"个人中心"},w2={label:"赞助",title:"支持项目",rewardAlt:"赞赏码",supportMessage:"通过捐赠支持 MCP Hub 的开发!",supportButton:"在 Ko-fi 上支持"},S2={label:"微信",title:"微信联系",qrCodeAlt:"微信二维码",scanMessage:"扫描二维码添加微信"},j2={label:"Discord",title:"加入我们的 Discord 服务器",community:"加入我们不断壮大的 Discord 社区,获取支持、参与讨论并了解最新动态!"},N2={title:"主题",light:"浅色",dark:"深色",system:"系统"},E2={login:"登录",loginTitle:"登录 MCP Hub",username:"用户名",password:"密码",loggingIn:"登录中...",emptyFields:"用户名和密码不能为空",loginFailed:"登录失败,请检查用户名和密码",loginError:"登录过程中出现错误",currentPassword:"当前密码",newPassword:"新密码",confirmPassword:"确认密码",passwordsNotMatch:"新密码与确认密码不一致",changePasswordSuccess:"密码修改成功",changePasswordError:"修改密码失败",changePassword:"修改密码",passwordChanged:"密码修改成功",passwordChangeError:"修改密码失败"},C2={addServer:"添加服务器",add:"添加",edit:"编辑",delete:"删除",confirmDelete:"您确定要删除此服务器吗?",deleteWarning:"删除服务器 '{{name}}' 将会移除该服务器及其所有数据。此操作无法撤销。",status:"状态",tools:"工具",name:"服务器名称",url:"服务器 URL",apiKey:"API 密钥",save:"保存",cancel:"取消",addError:"添加服务器失败",editError:"编辑服务器 {{serverName}} 失败",invalidConfig:"无法找到 {{serverName}} 的配置数据",deleteError:"删除服务器 {{serverName}} 失败",updateError:"更新服务器失败",editTitle:"编辑服务器: {{serverName}}",type:"服务器类型",command:"命令",arguments:"参数",envVars:"环境变量",headers:"HTTP 请求头",key:"键",value:"值",enabled:"已启用",enable:"启用",disable:"禁用",requestOptions:"配置",timeout:"请求超时",timeoutDescription:"请求超时时间(毫秒)",maxTotalTimeout:"最大总超时",maxTotalTimeoutDescription:"无论是否有进度通知的最大总超时时间(毫秒)",resetTimeoutOnProgress:"收到进度通知时重置超时",resetTimeoutOnProgressDescription:"适用于发送周期性进度更新的长时间运行操作",remove:"移除",toggleError:"切换服务器 {{serverName}} 状态失败",alreadyExists:"服务器 {{serverName}} 已经存在",invalidData:"提供的服务器数据无效",notFound:"找不到服务器 {{serverName}}",namePlaceholder:"请输入服务器名称",urlPlaceholder:"请输入服务器URL",commandPlaceholder:"请输入命令",argumentsPlaceholder:"请输入参数",errorDetails:"错误详情",viewErrorDetails:"查看错误详情"},k2={online:"在线",offline:"离线",connecting:"连接中"},T2={general:"发生错误",network:"网络连接错误,请检查您的互联网连接",serverConnection:"无法连接到服务器,请检查服务器是否正在运行",serverAdd:"添加服务器失败,请检查服务器状态",serverUpdate:"编辑服务器 {{serverName}} 失败,请检查服务器状态",serverFetch:"获取服务器数据失败,请稍后重试",initialStartup:"服务器可能正在启动中。首次启动可能需要一些时间,请耐心等候...",serverInstall:"安装服务器失败",failedToFetchSettings:"获取设置失败",failedToUpdateSystemConfig:"更新系统配置失败",failedToUpdateRouteConfig:"更新路由配置失败",failedToUpdateSmartRoutingConfig:"更新智能路由配置失败"},A2={processing:"处理中...",save:"保存",cancel:"取消",refresh:"刷新",create:"创建",submitting:"提交中...",delete:"删除",remove:"移除",copy:"复制",copySuccess:"已复制到剪贴板",copyFailed:"复制失败",close:"关闭"},R2={dashboard:"仪表盘",servers:"服务器",settings:"设置",changePassword:"修改密码",groups:"分组",market:"市场",logs:"日志"},O2={dashboard:{title:"仪表盘",totalServers:"总数",onlineServers:"在线",offlineServers:"离线",connectingServers:"连接中",recentServers:"最近的服务器"},servers:{title:"服务器管理"},settings:{title:"设置",language:"语言",account:"账户设置",password:"修改密码",appearance:"外观",routeConfig:"安全配置",installConfig:"安装",smartRouting:"智能路由"},groups:{title:"分组管理"},market:{title:"服务器市场 - (数据来源于 mcpm.sh)"},logs:{title:"系统日志"}},M2={filters:"筛选",search:"搜索日志...",autoScroll:"自动滚动",clearLogs:"清除日志",loading:"加载日志中...",noLogs:"暂无日志。",noMatch:"没有匹配当前筛选条件的日志。",mainProcess:"主进程",childProcess:"子进程",main:"主",child:"子"},z2={add:"添加",addNew:"添加新分组",edit:"编辑分组",delete:"删除",confirmDelete:"您确定要删除此分组吗?",deleteWarning:"删除分组 '{{name}}' 将会移除该分组及其所有服务器关联。此操作无法撤销。",name:"分组名称",namePlaceholder:"请输入分组名称",nameRequired:"分组名称不能为空",description:"描述",descriptionPlaceholder:"请输入分组描述(可选)",createError:"创建分组失败",updateError:"更新分组失败",deleteError:"删除分组失败",serverAddError:"向分组添加服务器失败",serverRemoveError:"从分组移除服务器失败",addServer:"添加服务器到分组",selectServer:"选择要添加的服务器",servers:"分组中的服务器",remove:"移除",noGroups:"暂无可用分组。创建一个新分组以开始使用。",noServers:"此分组中没有服务器。",noServerOptions:"没有可用的服务器",serverCount:"{{count}} 台服务器"},D2={title:"服务器市场",official:"官方",by:"作者",unknown:"未知",tools:"工具",search:"搜索",searchPlaceholder:"搜索服务器名称、分类或标签",clearFilters:"清除",clearCategoryFilter:"",clearTagFilter:"",categories:"分类",tags:"标签",showTags:"显示标签",hideTags:"隐藏标签",moreTags:"",noServers:"未找到匹配的服务器",backToList:"返回列表",install:"安装",installing:"安装中...",installed:"已安装",installServer:"安装服务器: {{name}}",installSuccess:"服务器 {{serverName}} 安装成功",author:"作者",license:"许可证",repository:"代码仓库",examples:"示例",arguments:"参数",argumentName:"名称",description:"描述",required:"必填",example:"示例",viewSchema:"查看结构",fetchError:"获取服务器市场数据失败",serverNotFound:"未找到服务器",searchError:"搜索服务器失败",filterError:"按分类筛选服务器失败",tagFilterError:"按标签筛选服务器失败",noInstallationMethod:"该服务器没有可用的安装方法",showing:"显示 {{from}}-{{to}}/{{total}} 个服务器",perPage:"每页显示"},U2={run:"运行",running:"运行中...",runTool:"运行工具",cancel:"取消",noDescription:"无描述信息",inputSchema:"输入模式:",runToolWithName:"运行工具:{{name}}",execution:"工具执行",successful:"成功",failed:"失败",result:"结果:",error:"错误",errorDetails:"错误详情:",noContent:"工具执行成功但未返回内容。",unknownError:"发生未知错误",jsonResponse:"JSON 响应:",toolResult:"工具结果",noParameters:"此工具不需要任何参数。",selectOption:"选择一个选项",enterValue:"输入{{type}}值",enabled:"已启用",enableSuccess:"工具 {{name}} 启用成功",disableSuccess:"工具 {{name}} 禁用成功",toggleFailed:"切换工具状态失败",parameters:"工具参数",formMode:"表单模式",jsonMode:"JSON 模式",jsonConfiguration:"JSON 配置",invalidJsonFormat:"无效的 JSON 格式",fixJsonBeforeSwitching:"请修复 JSON 格式后再切换到表单模式",item:"项目 {{index}}",addItem:"添加 {{key}} 项目",enterKey:"输入 {{key}}"},L2={enableGlobalRoute:"启用全局路由",enableGlobalRouteDescription:"允许不指定组 ID 就连接到 /sse 端点",enableGroupNameRoute:"启用组名路由",enableGroupNameRouteDescription:"允许使用组名而不仅仅是组 ID 连接到 /sse 端点",enableBearerAuth:"启用 Bearer 认证",enableBearerAuthDescription:"对 MCP 请求启用 Bearer 令牌认证",bearerAuthKey:"Bearer 认证密钥",bearerAuthKeyDescription:"Bearer 令牌中需要携带的认证密钥",bearerAuthKeyPlaceholder:"请输入 Bearer 认证密钥",pythonIndexUrl:"Python 包仓库地址",pythonIndexUrlDescription:"设置 UV_DEFAULT_INDEX 环境变量,用于 Python 包安装",pythonIndexUrlPlaceholder:"例如: https://mirrors.aliyun.com/pypi/simple",npmRegistry:"NPM 仓库地址",npmRegistryDescription:"设置 npm_config_registry 环境变量,用于 NPM 包安装",npmRegistryPlaceholder:"例如: https://registry.npmmirror.com/",installConfig:"安装配置",systemConfigUpdated:"系统配置更新成功",enableSmartRouting:"启用智能路由",enableSmartRoutingDescription:"开启智能路由功能,根据输入自动搜索最合适的工具(使用 $smart 分组)",dbUrl:"PostgreSQL 连接地址(必须支持 pgvector)",dbUrlPlaceholder:"例如: postgresql://user:password@localhost:5432/dbname",openaiApiBaseUrl:"OpenAI API 基础地址",openaiApiBaseUrlPlaceholder:"https://api.openai.com/v1",openaiApiKey:"OpenAI API 密钥",openaiApiKeyDescription:"用于访问 OpenAI API 的密钥",openaiApiKeyPlaceholder:"请输入 OpenAI API 密钥",openaiApiEmbeddingModel:"OpenAI 嵌入模型",openaiApiEmbeddingModelPlaceholder:"text-embedding-3-small",smartRoutingConfigUpdated:"智能路由配置更新成功",smartRoutingRequiredFields:"启用智能路由需要填写数据库连接地址和 OpenAI API 密钥",smartRoutingValidationError:"启用智能路由前请先填写必要字段:{{fields}}"},_2={app:y2,about:b2,profile:v2,sponsor:w2,wechat:S2,discord:j2,theme:N2,auth:E2,server:C2,status:k2,errors:T2,common:A2,nav:R2,pages:O2,logs:M2,groups:z2,market:D2,tool:U2,settings:L2};ft.use(Rg).use(yv).init({resources:{en:{translation:x2},zh:{translation:_2}},fallbackLng:"en",debug:!1,defaultNS:"translation",interpolation:{escapeValue:!1},detection:{order:["localStorage","cookie","htmlTag","navigator"],caches:["localStorage","cookie"]}});async function H2(){try{console.log("Loading runtime configuration...");const l=await Dy();console.log("Runtime configuration loaded:",l),window.__MCPHUB_CONFIG__=l,Pm.createRoot(document.getElementById("root")).render(u.jsx(Eu.StrictMode,{children:u.jsx(dh,{})}))}catch(l){console.error("Failed to initialize app:",l),console.log("Starting app with default configuration..."),window.__MCPHUB_CONFIG__={basePath:"",version:"dev",name:"mcphub"},Pm.createRoot(document.getElementById("root")).render(u.jsx(Eu.StrictMode,{children:u.jsx(dh,{})}))}}H2();
|
|
172
|
-
//# sourceMappingURL=index-Dr8Yov3b.js.map
|