@openparachute/hub 0.7.0 → 0.7.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/package.json +1 -1
- package/src/__tests__/account-setup.test.ts +276 -6
- package/src/__tests__/admin-connections-credentials.test.ts +1320 -0
- package/src/__tests__/api-invites.test.ts +166 -6
- package/src/__tests__/audience-gate.test.ts +752 -0
- package/src/__tests__/hub-db.test.ts +36 -0
- package/src/__tests__/hub-server.test.ts +266 -0
- package/src/__tests__/invites.test.ts +64 -1
- package/src/__tests__/lifecycle.test.ts +238 -3
- package/src/__tests__/ws-bridge.test.ts +573 -0
- package/src/__tests__/ws-connection-caps.test.ts +456 -0
- package/src/account-setup.ts +94 -23
- package/src/admin-connections.ts +916 -14
- package/src/admin-login-ui.ts +64 -15
- package/src/admin-vaults.ts +9 -0
- package/src/api-invites.ts +92 -12
- package/src/audience-gate.ts +268 -0
- package/src/chrome-strip.ts +8 -1
- package/src/commands/lifecycle.ts +187 -47
- package/src/connections-store.ts +32 -2
- package/src/help.ts +13 -6
- package/src/host-admin-token-validation.ts +6 -2
- package/src/hub-db.ts +26 -1
- package/src/hub-server.ts +501 -12
- package/src/invites.ts +69 -2
- package/src/jwt-sign.ts +7 -1
- package/src/module-manifest.ts +107 -0
- package/src/origin-check.ts +7 -4
- package/src/services-manifest.ts +97 -0
- package/src/ws-bridge.ts +256 -0
- package/src/ws-connection-caps.ts +170 -0
- package/web/ui/dist/assets/index-Cxtod68O.js +61 -0
- package/web/ui/dist/index.html +1 -1
- package/web/ui/dist/assets/index-C-XzMVqN.js +0 -61
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))o(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const y of h.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&o(y)}).observe(document,{childList:!0,subtree:!0});function c(f){const h={};return f.integrity&&(h.integrity=f.integrity),f.referrerPolicy&&(h.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?h.credentials="include":f.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(f){if(f.ep)return;f.ep=!0;const h=c(f);fetch(f.href,h)}})();var Gr={exports:{}},ql={};/**
|
|
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 xh;function Jg(){if(xh)return ql;xh=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function c(o,f,h){var y=null;if(h!==void 0&&(y=""+h),f.key!==void 0&&(y=""+f.key),"key"in f){h={};for(var v in f)v!=="key"&&(h[v]=f[v])}else h=f;return f=h.ref,{$$typeof:l,type:o,key:y,ref:f!==void 0?f:null,props:h}}return ql.Fragment=r,ql.jsx=c,ql.jsxs=c,ql}var jh;function $g(){return jh||(jh=1,Gr.exports=Jg()),Gr.exports}var s=$g(),Zr={exports:{}},se={};/**
|
|
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 Sh;function Kg(){if(Sh)return se;Sh=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),y=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),O=Symbol.iterator;function A(N){return N===null||typeof N!="object"?null:(N=O&&N[O]||N["@@iterator"],typeof N=="function"?N:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,Y={};function Z(N,q,K){this.props=N,this.context=q,this.refs=Y,this.updater=K||R}Z.prototype.isReactComponent={},Z.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")},Z.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function G(){}G.prototype=Z.prototype;function V(N,q,K){this.props=N,this.context=q,this.refs=Y,this.updater=K||R}var ae=V.prototype=new G;ae.constructor=V,k(ae,Z.prototype),ae.isPureReactComponent=!0;var $=Array.isArray;function F(){}var E={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function X(N,q,K){var P=K.ref;return{$$typeof:l,type:N,key:q,ref:P!==void 0?P:null,props:K}}function oe(N,q){return X(N.type,q,N.props)}function le(N){return typeof N=="object"&&N!==null&&N.$$typeof===l}function me(N){var q={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(K){return q[K]})}var it=/\/+/g;function at(N,q){return typeof N=="object"&&N!==null&&N.key!=null?me(""+N.key):q.toString(36)}function Ye(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(F,F):(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 H(N,q,K,P,ue){var de=typeof N;(de==="undefined"||de==="boolean")&&(N=null);var je=!1;if(N===null)je=!0;else switch(de){case"bigint":case"string":case"number":je=!0;break;case"object":switch(N.$$typeof){case l:case r:je=!0;break;case S:return je=N._init,H(je(N._payload),q,K,P,ue)}}if(je)return ue=ue(N),je=P===""?"."+at(N,0):P,$(ue)?(K="",je!=null&&(K=je.replace(it,"$&/")+"/"),H(ue,q,K,"",function(Jn){return Jn})):ue!=null&&(le(ue)&&(ue=oe(ue,K+(ue.key==null||N&&N.key===ue.key?"":(""+ue.key).replace(it,"$&/")+"/")+je)),q.push(ue)),1;je=0;var nt=P===""?".":P+":";if($(N))for(var Be=0;Be<N.length;Be++)P=N[Be],de=nt+at(P,Be),je+=H(P,q,K,de,ue);else if(Be=A(N),typeof Be=="function")for(N=Be.call(N),Be=0;!(P=N.next()).done;)P=P.value,de=nt+at(P,Be++),je+=H(P,q,K,de,ue);else if(de==="object"){if(typeof N.then=="function")return H(Ye(N),q,K,P,ue);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 je}function J(N,q,K){if(N==null)return N;var P=[],ue=0;return H(N,P,"","",function(de){return q.call(K,de,ue++)}),P}function ie(N){if(N._status===-1){var q=N._result;q=q(),q.then(function(K){(N._status===0||N._status===-1)&&(N._status=1,N._result=K)},function(K){(N._status===0||N._status===-1)&&(N._status=2,N._result=K)}),N._status===-1&&(N._status=0,N._result=q)}if(N._status===1)return N._result.default;throw N._result}var Ne=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)},Re={map:J,forEach:function(N,q,K){J(N,function(){q.apply(this,arguments)},K)},count:function(N){var q=0;return J(N,function(){q++}),q},toArray:function(N){return J(N,function(q){return q})||[]},only:function(N){if(!le(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return se.Activity=j,se.Children=Re,se.Component=Z,se.Fragment=c,se.Profiler=f,se.PureComponent=V,se.StrictMode=o,se.Suspense=p,se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,se.__COMPILER_RUNTIME={__proto__:null,c:function(N){return E.H.useMemoCache(N)}},se.cache=function(N){return function(){return N.apply(null,arguments)}},se.cacheSignal=function(){return null},se.cloneElement=function(N,q,K){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var P=k({},N.props),ue=N.key;if(q!=null)for(de in q.key!==void 0&&(ue=""+q.key),q)!U.call(q,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&q.ref===void 0||(P[de]=q[de]);var de=arguments.length-2;if(de===1)P.children=K;else if(1<de){for(var je=Array(de),nt=0;nt<de;nt++)je[nt]=arguments[nt+2];P.children=je}return X(N.type,ue,P)},se.createContext=function(N){return N={$$typeof:y,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:h,_context:N},N},se.createElement=function(N,q,K){var P,ue={},de=null;if(q!=null)for(P in q.key!==void 0&&(de=""+q.key),q)U.call(q,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(ue[P]=q[P]);var je=arguments.length-2;if(je===1)ue.children=K;else if(1<je){for(var nt=Array(je),Be=0;Be<je;Be++)nt[Be]=arguments[Be+2];ue.children=nt}if(N&&N.defaultProps)for(P in je=N.defaultProps,je)ue[P]===void 0&&(ue[P]=je[P]);return X(N,de,ue)},se.createRef=function(){return{current:null}},se.forwardRef=function(N){return{$$typeof:v,render:N}},se.isValidElement=le,se.lazy=function(N){return{$$typeof:S,_payload:{_status:-1,_result:N},_init:ie}},se.memo=function(N,q){return{$$typeof:g,type:N,compare:q===void 0?null:q}},se.startTransition=function(N){var q=E.T,K={};E.T=K;try{var P=N(),ue=E.S;ue!==null&&ue(K,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(F,Ne)}catch(de){Ne(de)}finally{q!==null&&K.types!==null&&(q.types=K.types),E.T=q}},se.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},se.use=function(N){return E.H.use(N)},se.useActionState=function(N,q,K){return E.H.useActionState(N,q,K)},se.useCallback=function(N,q){return E.H.useCallback(N,q)},se.useContext=function(N){return E.H.useContext(N)},se.useDebugValue=function(){},se.useDeferredValue=function(N,q){return E.H.useDeferredValue(N,q)},se.useEffect=function(N,q){return E.H.useEffect(N,q)},se.useEffectEvent=function(N){return E.H.useEffectEvent(N)},se.useId=function(){return E.H.useId()},se.useImperativeHandle=function(N,q,K){return E.H.useImperativeHandle(N,q,K)},se.useInsertionEffect=function(N,q){return E.H.useInsertionEffect(N,q)},se.useLayoutEffect=function(N,q){return E.H.useLayoutEffect(N,q)},se.useMemo=function(N,q){return E.H.useMemo(N,q)},se.useOptimistic=function(N,q){return E.H.useOptimistic(N,q)},se.useReducer=function(N,q,K){return E.H.useReducer(N,q,K)},se.useRef=function(N){return E.H.useRef(N)},se.useState=function(N){return E.H.useState(N)},se.useSyncExternalStore=function(N,q,K){return E.H.useSyncExternalStore(N,q,K)},se.useTransition=function(){return E.H.useTransition()},se.version="19.2.5",se}var Ch;function sc(){return Ch||(Ch=1,Zr.exports=Kg()),Zr.exports}var b=sc(),Xr={exports:{}},Yl={},Vr={exports:{}},Qr={};/**
|
|
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 Nh;function Fg(){return Nh||(Nh=1,(function(l){function r(H,J){var ie=H.length;H.push(J);e:for(;0<ie;){var Ne=ie-1>>>1,Re=H[Ne];if(0<f(Re,J))H[Ne]=J,H[ie]=Re,ie=Ne;else break e}}function c(H){return H.length===0?null:H[0]}function o(H){if(H.length===0)return null;var J=H[0],ie=H.pop();if(ie!==J){H[0]=ie;e:for(var Ne=0,Re=H.length,N=Re>>>1;Ne<N;){var q=2*(Ne+1)-1,K=H[q],P=q+1,ue=H[P];if(0>f(K,ie))P<Re&&0>f(ue,K)?(H[Ne]=ue,H[P]=ie,Ne=P):(H[Ne]=K,H[q]=ie,Ne=q);else if(P<Re&&0>f(ue,ie))H[Ne]=ue,H[P]=ie,Ne=P;else break e}}return J}function f(H,J){var ie=H.sortIndex-J.sortIndex;return ie!==0?ie:H.id-J.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;l.unstable_now=function(){return h.now()}}else{var y=Date,v=y.now();l.unstable_now=function(){return y.now()-v}}var p=[],g=[],S=1,j=null,O=3,A=!1,R=!1,k=!1,Y=!1,Z=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function ae(H){for(var J=c(g);J!==null;){if(J.callback===null)o(g);else if(J.startTime<=H)o(g),J.sortIndex=J.expirationTime,r(p,J);else break;J=c(g)}}function $(H){if(k=!1,ae(H),!R)if(c(p)!==null)R=!0,F||(F=!0,me());else{var J=c(g);J!==null&&Ye($,J.startTime-H)}}var F=!1,E=-1,U=5,X=-1;function oe(){return Y?!0:!(l.unstable_now()-X<U)}function le(){if(Y=!1,F){var H=l.unstable_now();X=H;var J=!0;try{e:{R=!1,k&&(k=!1,G(E),E=-1),A=!0;var ie=O;try{t:{for(ae(H),j=c(p);j!==null&&!(j.expirationTime>H&&oe());){var Ne=j.callback;if(typeof Ne=="function"){j.callback=null,O=j.priorityLevel;var Re=Ne(j.expirationTime<=H);if(H=l.unstable_now(),typeof Re=="function"){j.callback=Re,ae(H),J=!0;break t}j===c(p)&&o(p),ae(H)}else o(p);j=c(p)}if(j!==null)J=!0;else{var N=c(g);N!==null&&Ye($,N.startTime-H),J=!1}}break e}finally{j=null,O=ie,A=!1}J=void 0}}finally{J?me():F=!1}}}var me;if(typeof V=="function")me=function(){V(le)};else if(typeof MessageChannel<"u"){var it=new MessageChannel,at=it.port2;it.port1.onmessage=le,me=function(){at.postMessage(null)}}else me=function(){Z(le,0)};function Ye(H,J){E=Z(function(){H(l.unstable_now())},J)}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(H){H.callback=null},l.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<H?Math.floor(1e3/H):5},l.unstable_getCurrentPriorityLevel=function(){return O},l.unstable_next=function(H){switch(O){case 1:case 2:case 3:var J=3;break;default:J=O}var ie=O;O=J;try{return H()}finally{O=ie}},l.unstable_requestPaint=function(){Y=!0},l.unstable_runWithPriority=function(H,J){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var ie=O;O=H;try{return J()}finally{O=ie}},l.unstable_scheduleCallback=function(H,J,ie){var Ne=l.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?Ne+ie:Ne):ie=Ne,H){case 1:var Re=-1;break;case 2:Re=250;break;case 5:Re=1073741823;break;case 4:Re=1e4;break;default:Re=5e3}return Re=ie+Re,H={id:S++,callback:J,priorityLevel:H,startTime:ie,expirationTime:Re,sortIndex:-1},ie>Ne?(H.sortIndex=ie,r(g,H),c(p)===null&&H===c(g)&&(k?(G(E),E=-1):k=!0,Ye($,ie-Ne))):(H.sortIndex=Re,r(p,H),R||A||(R=!0,F||(F=!0,me()))),H},l.unstable_shouldYield=oe,l.unstable_wrapCallback=function(H){var J=O;return function(){var ie=O;O=J;try{return H.apply(this,arguments)}finally{O=ie}}}})(Qr)),Qr}var Eh;function Wg(){return Eh||(Eh=1,Vr.exports=Fg()),Vr.exports}var Jr={exports:{}},et={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Th;function Ig(){if(Th)return et;Th=1;var l=sc();function r(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)g+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var o={d:{f:c,r:function(){throw Error(r(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},f=Symbol.for("react.portal");function h(p,g,S){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:j==null?null:""+j,children:p,containerInfo:g,implementation:S}}var y=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return et.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,et.createPortal=function(p,g){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(r(299));return h(p,g,null,S)},et.flushSync=function(p){var g=y.T,S=o.p;try{if(y.T=null,o.p=2,p)return p()}finally{y.T=g,o.p=S,o.d.f()}},et.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,o.d.C(p,g))},et.prefetchDNS=function(p){typeof p=="string"&&o.d.D(p)},et.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var S=g.as,j=v(S,g.crossOrigin),O=typeof g.integrity=="string"?g.integrity:void 0,A=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;S==="style"?o.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:j,integrity:O,fetchPriority:A}):S==="script"&&o.d.X(p,{crossOrigin:j,integrity:O,fetchPriority:A,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},et.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var S=v(g.as,g.crossOrigin);o.d.M(p,{crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&o.d.M(p)},et.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var S=g.as,j=v(S,g.crossOrigin);o.d.L(p,S,{crossOrigin:j,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})}},et.preloadModule=function(p,g){if(typeof p=="string")if(g){var S=v(g.as,g.crossOrigin);o.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else o.d.m(p)},et.requestFormReset=function(p){o.d.r(p)},et.unstable_batchedUpdates=function(p,g){return p(g)},et.useFormState=function(p,g,S){return y.H.useFormState(p,g,S)},et.useFormStatus=function(){return y.H.useHostTransitionStatus()},et.version="19.2.5",et}var wh;function Pg(){if(wh)return Jr.exports;wh=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),Jr.exports=Ig(),Jr.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 _h;function e1(){if(_h)return Yl;_h=1;var l=Wg(),r=sc(),c=Pg();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 f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(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 y(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 v(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(h(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,n=t;;){var i=a.return;if(i===null)break;var u=i.alternate;if(u===null){if(n=i.return,n!==null){a=n;continue}break}if(i.child===u.child){for(u=i.child;u;){if(u===a)return p(i),e;if(u===n)return p(i),t;u=u.sibling}throw Error(o(188))}if(a.return!==n.return)a=i,n=u;else{for(var d=!1,m=i.child;m;){if(m===a){d=!0,a=i,n=u;break}if(m===n){d=!0,n=i,a=u;break}m=m.sibling}if(!d){for(m=u.child;m;){if(m===a){d=!0,a=u,n=i;break}if(m===n){d=!0,n=u,a=i;break}m=m.sibling}if(!d)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 S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var j=Object.assign,O=Symbol.for("react.element"),A=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),V=Symbol.for("react.context"),ae=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),oe=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function me(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var it=Symbol.for("react.client.reference");function at(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===it?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case Z:return"Profiler";case Y:return"StrictMode";case $:return"Suspense";case F:return"SuspenseList";case X:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case V:return e.displayName||"Context";case G:return(e._context.displayName||"Context")+".Consumer";case ae:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case E:return t=e.displayName||null,t!==null?t:at(e.type)||"Memo";case U:t=e._payload,e=e._init;try{return at(e(t))}catch{}}return null}var Ye=Array.isArray,H=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},Ne=[],Re=-1;function N(e){return{current:e}}function q(e){0>Re||(e.current=Ne[Re],Ne[Re]=null,Re--)}function K(e,t){Re++,Ne[Re]=e.current,e.current=t}var P=N(null),ue=N(null),de=N(null),je=N(null);function nt(e,t){switch(K(de,t),K(ue,e),K(P,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Zf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Zf(t),e=Xf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(P),K(P,e)}function Be(){q(P),q(ue),q(de)}function Jn(e){e.memoizedState!==null&&K(je,e);var t=P.current,a=Xf(t,e.type);t!==a&&(K(ue,e),K(P,a))}function Jl(e){ue.current===e&&(q(P),q(ue)),je.current===e&&(q(je),Dl._currentValue=ie)}var Ns,yc;function Ha(e){if(Ns===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ns=t&&t[1]||"",yc=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Ns+e+yc}var Es=!1;function Ts(e,t){if(!e||Es)return"";Es=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var L=function(){throw Error()};if(Object.defineProperty(L.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(L,[])}catch(z){var M=z}Reflect.construct(e,[],L)}else{try{L.call()}catch(z){M=z}e.call(L.prototype)}}else{try{throw Error()}catch(z){M=z}(L=e())&&typeof L.catch=="function"&&L.catch(function(){})}}catch(z){if(z&&M&&typeof z.stack=="string")return[z.stack,M.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=n.DetermineComponentFrameRoot(),d=u[0],m=u[1];if(d&&m){var x=d.split(`
|
|
44
|
-
`),_=m.split(`
|
|
45
|
-
`);for(i=n=0;n<x.length&&!x[n].includes("DetermineComponentFrameRoot");)n++;for(;i<_.length&&!_[i].includes("DetermineComponentFrameRoot");)i++;if(n===x.length||i===_.length)for(n=x.length-1,i=_.length-1;1<=n&&0<=i&&x[n]!==_[i];)i--;for(;1<=n&&0<=i;n--,i--)if(x[n]!==_[i]){if(n!==1||i!==1)do if(n--,i--,0>i||x[n]!==_[i]){var D=`
|
|
46
|
-
`+x[n].replace(" at new "," at ");return e.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",e.displayName)),D}while(1<=n&&0<=i);break}}}finally{Es=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ha(a):""}function Nm(e,t){switch(e.tag){case 26:case 27:case 5:return Ha(e.type);case 16:return Ha("Lazy");case 13:return e.child!==t&&t!==null?Ha("Suspense Fallback"):Ha("Suspense");case 19:return Ha("SuspenseList");case 0:case 15:return Ts(e.type,!1);case 11:return Ts(e.type.render,!1);case 1:return Ts(e.type,!0);case 31:return Ha("Activity");default:return""}}function vc(e){try{var t="",a=null;do t+=Nm(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
-
Error generating stack: `+n.message+`
|
|
48
|
-
`+n.stack}}var ws=Object.prototype.hasOwnProperty,_s=l.unstable_scheduleCallback,Rs=l.unstable_cancelCallback,Em=l.unstable_shouldYield,Tm=l.unstable_requestPaint,mt=l.unstable_now,wm=l.unstable_getCurrentPriorityLevel,bc=l.unstable_ImmediatePriority,xc=l.unstable_UserBlockingPriority,$l=l.unstable_NormalPriority,_m=l.unstable_LowPriority,jc=l.unstable_IdlePriority,Rm=l.log,Am=l.unstable_setDisableYieldValue,$n=null,pt=null;function da(e){if(typeof Rm=="function"&&Am(e),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode($n,e)}catch{}}var gt=Math.clz32?Math.clz32:Om,Mm=Math.log,zm=Math.LN2;function Om(e){return e>>>=0,e===0?32:31-(Mm(e)/zm|0)|0}var Kl=256,Fl=262144,Wl=4194304;function Ba(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Il(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var i=0,u=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var m=n&134217727;return m!==0?(n=m&~u,n!==0?i=Ba(n):(d&=m,d!==0?i=Ba(d):a||(a=m&~e,a!==0&&(i=Ba(a))))):(m=n&~u,m!==0?i=Ba(m):d!==0?i=Ba(d):a||(a=n&~e,a!==0&&(i=Ba(a)))),i===0?0:t!==0&&t!==i&&(t&u)===0&&(u=i&-i,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:i}function Kn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function km(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 Sc(){var e=Wl;return Wl<<=1,(Wl&62914560)===0&&(Wl=4194304),e}function As(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Fn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Um(e,t,a,n,i,u){var d=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 m=e.entanglements,x=e.expirationTimes,_=e.hiddenUpdates;for(a=d&~a;0<a;){var D=31-gt(a),L=1<<D;m[D]=0,x[D]=-1;var M=_[D];if(M!==null)for(_[D]=null,D=0;D<M.length;D++){var z=M[D];z!==null&&(z.lane&=-536870913)}a&=~L}n!==0&&Cc(e,n,0),u!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=u&~(d&~t))}function Cc(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-gt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function Nc(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-gt(a),i=1<<n;i&t|e[n]&t&&(e[n]|=t),a&=~i}}function Ec(e,t){var a=t&-t;return a=(a&42)!==0?1:Ms(a),(a&(e.suspendedLanes|t))!==0?0:a}function Ms(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 zs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Tc(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:hh(e.type))}function wc(e,t){var a=J.p;try{return J.p=e,t()}finally{J.p=a}}var fa=Math.random().toString(36).slice(2),Ke="__reactFiber$"+fa,st="__reactProps$"+fa,ln="__reactContainer$"+fa,Os="__reactEvents$"+fa,Dm="__reactListeners$"+fa,Hm="__reactHandles$"+fa,_c="__reactResources$"+fa,Wn="__reactMarker$"+fa;function ks(e){delete e[Ke],delete e[st],delete e[Os],delete e[Dm],delete e[Hm]}function sn(e){var t=e[Ke];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ln]||a[Ke]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Wf(e);e!==null;){if(a=e[Ke])return a;e=Wf(e)}return t}e=a,a=e.parentNode}return null}function un(e){if(e=e[Ke]||e[ln]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function In(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function rn(e){var t=e[_c];return t||(t=e[_c]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Je(e){e[Wn]=!0}var Rc=new Set,Ac={};function La(e,t){cn(e,t),cn(e+"Capture",t)}function cn(e,t){for(Ac[e]=t,e=0;e<t.length;e++)Rc.add(t[e])}var Bm=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]*$"),Mc={},zc={};function Lm(e){return ws.call(zc,e)?!0:ws.call(Mc,e)?!1:Bm.test(e)?zc[e]=!0:(Mc[e]=!0,!1)}function Pl(e,t,a){if(Lm(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 ei(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 Qt(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)}}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 Oc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qm(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(d){a=""+d,u.call(this,d)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(d){a=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Us(e){if(!e._valueTracker){var t=Oc(e)?"checked":"value";e._valueTracker=qm(e,t,""+e[t])}}function kc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=Oc(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function ti(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 Ym=/[\n"\\]/g;function wt(e){return e.replace(Ym,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ds(e,t,a,n,i,u,d,m){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Tt(t)):e.value!==""+Tt(t)&&(e.value=""+Tt(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?Hs(e,d,Tt(t)):a!=null?Hs(e,d,Tt(a)):n!=null&&e.removeAttribute("value"),i==null&&u!=null&&(e.defaultChecked=!!u),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Tt(m):e.removeAttribute("name")}function Uc(e,t,a,n,i,u,d,m){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Us(e);return}a=a!=null?""+Tt(a):"",t=t!=null?""+Tt(t):a,m||t===e.value||(e.value=t),e.defaultValue=t}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=m?e.checked:!!n,e.defaultChecked=!!n,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),Us(e)}function Hs(e,t,a){t==="number"&&ti(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function on(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 Dc(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 Hc(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(Ye(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),Us(e)}function dn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Gm=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 Bc(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||Gm.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Lc(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&&Bc(e,i,n)}else for(var u in t)t.hasOwnProperty(u)&&Bc(e,u,t[u])}function Bs(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 Zm=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"]]),Xm=/^[\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 ai(e){return Xm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Jt(){}var Ls=null;function qs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fn=null,hn=null;function qc(e){var t=un(e);if(t&&(e=t.stateNode)){var a=e[st]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ds(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="'+wt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var i=n[st]||null;if(!i)throw Error(o(90));Ds(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&&kc(n)}break e;case"textarea":Dc(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&on(e,!!a.multiple,t,!1)}}}var Ys=!1;function Yc(e,t,a){if(Ys)return e(t,a);Ys=!0;try{var n=e(t);return n}finally{if(Ys=!1,(fn!==null||hn!==null)&&(Zi(),fn&&(t=fn,e=hn,hn=fn=null,qc(t),e)))for(t=0;t<e.length;t++)qc(e[t])}}function Pn(e,t){var a=e.stateNode;if(a===null)return null;var n=a[st]||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 $t=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gs=!1;if($t)try{var el={};Object.defineProperty(el,"passive",{get:function(){Gs=!0}}),window.addEventListener("test",el,el),window.removeEventListener("test",el,el)}catch{Gs=!1}var ha=null,Zs=null,ni=null;function Gc(){if(ni)return ni;var e,t=Zs,a=t.length,n,i="value"in ha?ha.value:ha.textContent,u=i.length;for(e=0;e<a&&t[e]===i[e];e++);var d=a-e;for(n=1;n<=d&&t[a-n]===i[u-n];n++);return ni=i.slice(e,1<n?1-n:void 0)}function li(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 ii(){return!0}function Zc(){return!1}function ut(e){function t(a,n,i,u,d){this._reactName=a,this._targetInst=i,this.type=n,this.nativeEvent=u,this.target=d,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(a=e[m],this[m]=a?a(u):u[m]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ii:Zc,this.isPropagationStopped=Zc,this}return j(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=ii)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ii)},persist:function(){},isPersistent:ii}),t}var qa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},si=ut(qa),tl=j({},qa,{view:0,detail:0}),Vm=ut(tl),Xs,Vs,al,ui=j({},tl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Js,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!==al&&(al&&e.type==="mousemove"?(Xs=e.screenX-al.screenX,Vs=e.screenY-al.screenY):Vs=Xs=0,al=e),Xs)},movementY:function(e){return"movementY"in e?e.movementY:Vs}}),Xc=ut(ui),Qm=j({},ui,{dataTransfer:0}),Jm=ut(Qm),$m=j({},tl,{relatedTarget:0}),Qs=ut($m),Km=j({},qa,{animationName:0,elapsedTime:0,pseudoElement:0}),Fm=ut(Km),Wm=j({},qa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Im=ut(Wm),Pm=j({},qa,{data:0}),Vc=ut(Pm),ep={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tp={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"},ap={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function np(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ap[e])?!!t[e]:!1}function Js(){return np}var lp=j({},tl,{key:function(e){if(e.key){var t=ep[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=li(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?tp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Js,charCode:function(e){return e.type==="keypress"?li(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?li(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ip=ut(lp),sp=j({},ui,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qc=ut(sp),up=j({},tl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Js}),rp=ut(up),cp=j({},qa,{propertyName:0,elapsedTime:0,pseudoElement:0}),op=ut(cp),dp=j({},ui,{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}),fp=ut(dp),hp=j({},qa,{newState:0,oldState:0}),mp=ut(hp),pp=[9,13,27,32],$s=$t&&"CompositionEvent"in window,nl=null;$t&&"documentMode"in document&&(nl=document.documentMode);var gp=$t&&"TextEvent"in window&&!nl,Jc=$t&&(!$s||nl&&8<nl&&11>=nl),$c=" ",Kc=!1;function Fc(e,t){switch(e){case"keyup":return pp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mn=!1;function yp(e,t){switch(e){case"compositionend":return Wc(t);case"keypress":return t.which!==32?null:(Kc=!0,$c);case"textInput":return e=t.data,e===$c&&Kc?null:e;default:return null}}function vp(e,t){if(mn)return e==="compositionend"||!$s&&Fc(e,t)?(e=Gc(),ni=Zs=ha=null,mn=!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 Jc&&t.locale!=="ko"?null:t.data;default:return null}}var bp={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 Ic(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!bp[e.type]:t==="textarea"}function Pc(e,t,a,n){fn?hn?hn.push(n):hn=[n]:fn=n,t=Fi(t,"onChange"),0<t.length&&(a=new si("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var ll=null,il=null;function xp(e){Hf(e,0)}function ri(e){var t=In(e);if(kc(t))return e}function eo(e,t){if(e==="change")return t}var to=!1;if($t){var Ks;if($t){var Fs="oninput"in document;if(!Fs){var ao=document.createElement("div");ao.setAttribute("oninput","return;"),Fs=typeof ao.oninput=="function"}Ks=Fs}else Ks=!1;to=Ks&&(!document.documentMode||9<document.documentMode)}function no(){ll&&(ll.detachEvent("onpropertychange",lo),il=ll=null)}function lo(e){if(e.propertyName==="value"&&ri(il)){var t=[];Pc(t,il,e,qs(e)),Yc(xp,t)}}function jp(e,t,a){e==="focusin"?(no(),ll=t,il=a,ll.attachEvent("onpropertychange",lo)):e==="focusout"&&no()}function Sp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ri(il)}function Cp(e,t){if(e==="click")return ri(t)}function Np(e,t){if(e==="input"||e==="change")return ri(t)}function Ep(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:Ep;function sl(e,t){if(yt(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(!ws.call(t,i)||!yt(e[i],t[i]))return!1}return!0}function io(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function so(e,t){var a=io(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=io(a)}}function uo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?uo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ro(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ti(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=ti(e.document)}return t}function Ws(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 Tp=$t&&"documentMode"in document&&11>=document.documentMode,pn=null,Is=null,ul=null,Ps=!1;function co(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ps||pn==null||pn!==ti(n)||(n=pn,"selectionStart"in n&&Ws(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}),ul&&sl(ul,n)||(ul=n,n=Fi(Is,"onSelect"),0<n.length&&(t=new si("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=pn)))}function Ya(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var gn={animationend:Ya("Animation","AnimationEnd"),animationiteration:Ya("Animation","AnimationIteration"),animationstart:Ya("Animation","AnimationStart"),transitionrun:Ya("Transition","TransitionRun"),transitionstart:Ya("Transition","TransitionStart"),transitioncancel:Ya("Transition","TransitionCancel"),transitionend:Ya("Transition","TransitionEnd")},eu={},oo={};$t&&(oo=document.createElement("div").style,"AnimationEvent"in window||(delete gn.animationend.animation,delete gn.animationiteration.animation,delete gn.animationstart.animation),"TransitionEvent"in window||delete gn.transitionend.transition);function Ga(e){if(eu[e])return eu[e];if(!gn[e])return e;var t=gn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in oo)return eu[e]=t[a];return e}var fo=Ga("animationend"),ho=Ga("animationiteration"),mo=Ga("animationstart"),wp=Ga("transitionrun"),_p=Ga("transitionstart"),Rp=Ga("transitioncancel"),po=Ga("transitionend"),go=new Map,tu="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(" ");tu.push("scrollEnd");function Ht(e,t){go.set(e,t),La(t,[e])}var ci=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)},_t=[],yn=0,au=0;function oi(){for(var e=yn,t=au=yn=0;t<e;){var a=_t[t];_t[t++]=null;var n=_t[t];_t[t++]=null;var i=_t[t];_t[t++]=null;var u=_t[t];if(_t[t++]=null,n!==null&&i!==null){var d=n.pending;d===null?i.next=i:(i.next=d.next,d.next=i),n.pending=i}u!==0&&yo(a,i,u)}}function di(e,t,a,n){_t[yn++]=e,_t[yn++]=t,_t[yn++]=a,_t[yn++]=n,au|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function nu(e,t,a,n){return di(e,t,a,n),fi(e)}function Za(e,t){return di(e,null,null,t),fi(e)}function yo(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var i=!1,u=e.return;u!==null;)u.childLanes|=a,n=u.alternate,n!==null&&(n.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(i=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,i&&t!==null&&(i=31-gt(a),e=u.hiddenUpdates,n=e[i],n===null?e[i]=[t]:n.push(t),t.lane=a|536870912),u):null}function fi(e){if(50<Rl)throw Rl=0,fr=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var vn={};function Ap(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 vt(e,t,a,n){return new Ap(e,t,a,n)}function lu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kt(e,t){var a=e.alternate;return a===null?(a=vt(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 vo(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 hi(e,t,a,n,i,u){var d=0;if(n=e,typeof e=="function")lu(e)&&(d=1);else if(typeof e=="string")d=Ug(e,a,P.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case X:return e=vt(31,a,t,i),e.elementType=X,e.lanes=u,e;case k:return Xa(a.children,i,u,t);case Y:d=8,i|=24;break;case Z:return e=vt(12,a,t,i|2),e.elementType=Z,e.lanes=u,e;case $:return e=vt(13,a,t,i),e.elementType=$,e.lanes=u,e;case F:return e=vt(19,a,t,i),e.elementType=F,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V:d=10;break e;case G:d=9;break e;case ae:d=11;break e;case E:d=14;break e;case U:d=16,n=null;break e}d=29,a=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=vt(d,a,t,i),t.elementType=e,t.type=n,t.lanes=u,t}function Xa(e,t,a,n){return e=vt(7,e,n,t),e.lanes=a,e}function iu(e,t,a){return e=vt(6,e,null,t),e.lanes=a,e}function bo(e){var t=vt(18,null,null,0);return t.stateNode=e,t}function su(e,t,a){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var xo=new WeakMap;function Rt(e,t){if(typeof e=="object"&&e!==null){var a=xo.get(e);return a!==void 0?a:(t={value:e,source:t,stack:vc(t)},xo.set(e,t),t)}return{value:e,source:t,stack:vc(t)}}var bn=[],xn=0,mi=null,rl=0,At=[],Mt=0,ma=null,Gt=1,Zt="";function Ft(e,t){bn[xn++]=rl,bn[xn++]=mi,mi=e,rl=t}function jo(e,t,a){At[Mt++]=Gt,At[Mt++]=Zt,At[Mt++]=ma,ma=e;var n=Gt;e=Zt;var i=32-gt(n)-1;n&=~(1<<i),a+=1;var u=32-gt(t)+i;if(30<u){var d=i-i%5;u=(n&(1<<d)-1).toString(32),n>>=d,i-=d,Gt=1<<32-gt(t)+i|a<<i|n,Zt=u+e}else Gt=1<<u|a<<i|n,Zt=e}function uu(e){e.return!==null&&(Ft(e,1),jo(e,1,0))}function ru(e){for(;e===mi;)mi=bn[--xn],bn[xn]=null,rl=bn[--xn],bn[xn]=null;for(;e===ma;)ma=At[--Mt],At[Mt]=null,Zt=At[--Mt],At[Mt]=null,Gt=At[--Mt],At[Mt]=null}function So(e,t){At[Mt++]=Gt,At[Mt++]=Zt,At[Mt++]=ma,Gt=t.id,Zt=t.overflow,ma=e}var Fe=null,Me=null,ye=!1,pa=null,zt=!1,cu=Error(o(519));function ga(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cl(Rt(t,e)),cu}function Co(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Ke]=e,t[st]=n,a){case"dialog":he("cancel",t),he("close",t);break;case"iframe":case"object":case"embed":he("load",t);break;case"video":case"audio":for(a=0;a<Ml.length;a++)he(Ml[a],t);break;case"source":he("error",t);break;case"img":case"image":case"link":he("error",t),he("load",t);break;case"details":he("toggle",t);break;case"input":he("invalid",t),Uc(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":he("invalid",t);break;case"textarea":he("invalid",t),Hc(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||Yf(t.textContent,a)?(n.popover!=null&&(he("beforetoggle",t),he("toggle",t)),n.onScroll!=null&&he("scroll",t),n.onScrollEnd!=null&&he("scrollend",t),n.onClick!=null&&(t.onclick=Jt),t=!0):t=!1,t||ga(e,!0)}function No(e){for(Fe=e.return;Fe;)switch(Fe.tag){case 5:case 31:case 13:zt=!1;return;case 27:case 3:zt=!0;return;default:Fe=Fe.return}}function jn(e){if(e!==Fe)return!1;if(!ye)return No(e),ye=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||wr(e.type,e.memoizedProps)),a=!a),a&&Me&&ga(e),No(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Me=Ff(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Me=Ff(e)}else t===27?(t=Me,Aa(e.type)?(e=zr,zr=null,Me=e):Me=t):Me=Fe?kt(e.stateNode.nextSibling):null;return!0}function Va(){Me=Fe=null,ye=!1}function ou(){var e=pa;return e!==null&&(dt===null?dt=e:dt.push.apply(dt,e),pa=null),e}function cl(e){pa===null?pa=[e]:pa.push(e)}var du=N(null),Qa=null,Wt=null;function ya(e,t,a){K(du,t._currentValue),t._currentValue=a}function It(e){e._currentValue=du.current,q(du)}function fu(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 hu(e,t,a,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var u=i.dependencies;if(u!==null){var d=i.child;u=u.firstContext;e:for(;u!==null;){var m=u;u=i;for(var x=0;x<t.length;x++)if(m.context===t[x]){u.lanes|=a,m=u.alternate,m!==null&&(m.lanes|=a),fu(u.return,a,e),n||(d=null);break e}u=m.next}}else if(i.tag===18){if(d=i.return,d===null)throw Error(o(341));d.lanes|=a,u=d.alternate,u!==null&&(u.lanes|=a),fu(d,a,e),d=null}else d=i.child;if(d!==null)d.return=i;else for(d=i;d!==null;){if(d===e){d=null;break}if(i=d.sibling,i!==null){i.return=d.return,d=i;break}d=d.return}i=d}}function Sn(e,t,a,n){e=null;for(var i=t,u=!1;i!==null;){if(!u){if((i.flags&524288)!==0)u=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var d=i.alternate;if(d===null)throw Error(o(387));if(d=d.memoizedProps,d!==null){var m=i.type;yt(i.pendingProps.value,d.value)||(e!==null?e.push(m):e=[m])}}else if(i===je.current){if(d=i.alternate,d===null)throw Error(o(387));d.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Dl):e=[Dl])}i=i.return}e!==null&&hu(t,e,a,n),t.flags|=262144}function pi(e){for(e=e.firstContext;e!==null;){if(!yt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ja(e){Qa=e,Wt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function We(e){return Eo(Qa,e)}function gi(e,t){return Qa===null&&Ja(e),Eo(e,t)}function Eo(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Wt===null){if(e===null)throw Error(o(308));Wt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wt=Wt.next=t;return a}var Mp=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()})}},zp=l.unstable_scheduleCallback,Op=l.unstable_NormalPriority,Ge={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function mu(){return{controller:new Mp,data:new Map,refCount:0}}function ol(e){e.refCount--,e.refCount===0&&zp(Op,function(){e.controller.abort()})}var dl=null,pu=0,Cn=0,Nn=null;function kp(e,t){if(dl===null){var a=dl=[];pu=0,Cn=vr(),Nn={status:"pending",value:void 0,then:function(n){a.push(n)}}}return pu++,t.then(To,To),t}function To(){if(--pu===0&&dl!==null){Nn!==null&&(Nn.status="fulfilled");var e=dl;dl=null,Cn=0,Nn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Up(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 wo=H.S;H.S=function(e,t){df=mt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&kp(e,t),wo!==null&&wo(e,t)};var $a=N(null);function gu(){var e=$a.current;return e!==null?e:Ae.pooledCache}function yi(e,t){t===null?K($a,$a.current):K($a,t.pool)}function _o(){var e=gu();return e===null?null:{parent:Ge._currentValue,pool:e}}var En=Error(o(460)),yu=Error(o(474)),vi=Error(o(542)),bi={then:function(){}};function Ro(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ao(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Jt,Jt),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,zo(e),e;default:if(typeof t.status=="string")t.then(Jt,Jt);else{if(e=Ae,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,zo(e),e}throw Fa=t,En}}function Ka(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Fa=a,En):a}}var Fa=null;function Mo(){if(Fa===null)throw Error(o(459));var e=Fa;return Fa=null,e}function zo(e){if(e===En||e===vi)throw Error(o(483))}var Tn=null,fl=0;function xi(e){var t=fl;return fl+=1,Tn===null&&(Tn=[]),Ao(Tn,e,t)}function hl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ji(e,t){throw t.$$typeof===O?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Oo(e){function t(T,C){if(e){var w=T.deletions;w===null?(T.deletions=[C],T.flags|=16):w.push(C)}}function a(T,C){if(!e)return null;for(;C!==null;)t(T,C),C=C.sibling;return null}function n(T){for(var C=new Map;T!==null;)T.key!==null?C.set(T.key,T):C.set(T.index,T),T=T.sibling;return C}function i(T,C){return T=Kt(T,C),T.index=0,T.sibling=null,T}function u(T,C,w){return T.index=w,e?(w=T.alternate,w!==null?(w=w.index,w<C?(T.flags|=67108866,C):w):(T.flags|=67108866,C)):(T.flags|=1048576,C)}function d(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function m(T,C,w,B){return C===null||C.tag!==6?(C=iu(w,T.mode,B),C.return=T,C):(C=i(C,w),C.return=T,C)}function x(T,C,w,B){var te=w.type;return te===k?D(T,C,w.props.children,B,w.key):C!==null&&(C.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===U&&Ka(te)===C.type)?(C=i(C,w.props),hl(C,w),C.return=T,C):(C=hi(w.type,w.key,w.props,null,T.mode,B),hl(C,w),C.return=T,C)}function _(T,C,w,B){return C===null||C.tag!==4||C.stateNode.containerInfo!==w.containerInfo||C.stateNode.implementation!==w.implementation?(C=su(w,T.mode,B),C.return=T,C):(C=i(C,w.children||[]),C.return=T,C)}function D(T,C,w,B,te){return C===null||C.tag!==7?(C=Xa(w,T.mode,B,te),C.return=T,C):(C=i(C,w),C.return=T,C)}function L(T,C,w){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=iu(""+C,T.mode,w),C.return=T,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case A:return w=hi(C.type,C.key,C.props,null,T.mode,w),hl(w,C),w.return=T,w;case R:return C=su(C,T.mode,w),C.return=T,C;case U:return C=Ka(C),L(T,C,w)}if(Ye(C)||me(C))return C=Xa(C,T.mode,w,null),C.return=T,C;if(typeof C.then=="function")return L(T,xi(C),w);if(C.$$typeof===V)return L(T,gi(T,C),w);ji(T,C)}return null}function M(T,C,w,B){var te=C!==null?C.key:null;if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return te!==null?null:m(T,C,""+w,B);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case A:return w.key===te?x(T,C,w,B):null;case R:return w.key===te?_(T,C,w,B):null;case U:return w=Ka(w),M(T,C,w,B)}if(Ye(w)||me(w))return te!==null?null:D(T,C,w,B,null);if(typeof w.then=="function")return M(T,C,xi(w),B);if(w.$$typeof===V)return M(T,C,gi(T,w),B);ji(T,w)}return null}function z(T,C,w,B,te){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return T=T.get(w)||null,m(C,T,""+B,te);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case A:return T=T.get(B.key===null?w:B.key)||null,x(C,T,B,te);case R:return T=T.get(B.key===null?w:B.key)||null,_(C,T,B,te);case U:return B=Ka(B),z(T,C,w,B,te)}if(Ye(B)||me(B))return T=T.get(w)||null,D(C,T,B,te,null);if(typeof B.then=="function")return z(T,C,w,xi(B),te);if(B.$$typeof===V)return z(T,C,w,gi(C,B),te);ji(C,B)}return null}function W(T,C,w,B){for(var te=null,ve=null,ee=C,ce=C=0,ge=null;ee!==null&&ce<w.length;ce++){ee.index>ce?(ge=ee,ee=null):ge=ee.sibling;var be=M(T,ee,w[ce],B);if(be===null){ee===null&&(ee=ge);break}e&&ee&&be.alternate===null&&t(T,ee),C=u(be,C,ce),ve===null?te=be:ve.sibling=be,ve=be,ee=ge}if(ce===w.length)return a(T,ee),ye&&Ft(T,ce),te;if(ee===null){for(;ce<w.length;ce++)ee=L(T,w[ce],B),ee!==null&&(C=u(ee,C,ce),ve===null?te=ee:ve.sibling=ee,ve=ee);return ye&&Ft(T,ce),te}for(ee=n(ee);ce<w.length;ce++)ge=z(ee,T,ce,w[ce],B),ge!==null&&(e&&ge.alternate!==null&&ee.delete(ge.key===null?ce:ge.key),C=u(ge,C,ce),ve===null?te=ge:ve.sibling=ge,ve=ge);return e&&ee.forEach(function(Ua){return t(T,Ua)}),ye&&Ft(T,ce),te}function ne(T,C,w,B){if(w==null)throw Error(o(151));for(var te=null,ve=null,ee=C,ce=C=0,ge=null,be=w.next();ee!==null&&!be.done;ce++,be=w.next()){ee.index>ce?(ge=ee,ee=null):ge=ee.sibling;var Ua=M(T,ee,be.value,B);if(Ua===null){ee===null&&(ee=ge);break}e&&ee&&Ua.alternate===null&&t(T,ee),C=u(Ua,C,ce),ve===null?te=Ua:ve.sibling=Ua,ve=Ua,ee=ge}if(be.done)return a(T,ee),ye&&Ft(T,ce),te;if(ee===null){for(;!be.done;ce++,be=w.next())be=L(T,be.value,B),be!==null&&(C=u(be,C,ce),ve===null?te=be:ve.sibling=be,ve=be);return ye&&Ft(T,ce),te}for(ee=n(ee);!be.done;ce++,be=w.next())be=z(ee,T,ce,be.value,B),be!==null&&(e&&be.alternate!==null&&ee.delete(be.key===null?ce:be.key),C=u(be,C,ce),ve===null?te=be:ve.sibling=be,ve=be);return e&&ee.forEach(function(Qg){return t(T,Qg)}),ye&&Ft(T,ce),te}function we(T,C,w,B){if(typeof w=="object"&&w!==null&&w.type===k&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case A:e:{for(var te=w.key;C!==null;){if(C.key===te){if(te=w.type,te===k){if(C.tag===7){a(T,C.sibling),B=i(C,w.props.children),B.return=T,T=B;break e}}else if(C.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===U&&Ka(te)===C.type){a(T,C.sibling),B=i(C,w.props),hl(B,w),B.return=T,T=B;break e}a(T,C);break}else t(T,C);C=C.sibling}w.type===k?(B=Xa(w.props.children,T.mode,B,w.key),B.return=T,T=B):(B=hi(w.type,w.key,w.props,null,T.mode,B),hl(B,w),B.return=T,T=B)}return d(T);case R:e:{for(te=w.key;C!==null;){if(C.key===te)if(C.tag===4&&C.stateNode.containerInfo===w.containerInfo&&C.stateNode.implementation===w.implementation){a(T,C.sibling),B=i(C,w.children||[]),B.return=T,T=B;break e}else{a(T,C);break}else t(T,C);C=C.sibling}B=su(w,T.mode,B),B.return=T,T=B}return d(T);case U:return w=Ka(w),we(T,C,w,B)}if(Ye(w))return W(T,C,w,B);if(me(w)){if(te=me(w),typeof te!="function")throw Error(o(150));return w=te.call(w),ne(T,C,w,B)}if(typeof w.then=="function")return we(T,C,xi(w),B);if(w.$$typeof===V)return we(T,C,gi(T,w),B);ji(T,w)}return typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint"?(w=""+w,C!==null&&C.tag===6?(a(T,C.sibling),B=i(C,w),B.return=T,T=B):(a(T,C),B=iu(w,T.mode,B),B.return=T,T=B),d(T)):a(T,C)}return function(T,C,w,B){try{fl=0;var te=we(T,C,w,B);return Tn=null,te}catch(ee){if(ee===En||ee===vi)throw ee;var ve=vt(29,ee,null,T.mode);return ve.lanes=B,ve.return=T,ve}finally{}}}var Wa=Oo(!0),ko=Oo(!1),va=!1;function vu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bu(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 ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xa(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(xe&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=fi(e),yo(e,null,a),t}return di(e,n,t,a),fi(e)}function ml(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,Nc(e,a)}}function xu(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var i=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var d={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?i=u=d:u=u.next=d,a=a.next}while(a!==null);u===null?i=u=t:u=u.next=t}else i=u=t;a={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:u,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var ju=!1;function pl(){if(ju){var e=Nn;if(e!==null)throw e}}function gl(e,t,a,n){ju=!1;var i=e.updateQueue;va=!1;var u=i.firstBaseUpdate,d=i.lastBaseUpdate,m=i.shared.pending;if(m!==null){i.shared.pending=null;var x=m,_=x.next;x.next=null,d===null?u=_:d.next=_,d=x;var D=e.alternate;D!==null&&(D=D.updateQueue,m=D.lastBaseUpdate,m!==d&&(m===null?D.firstBaseUpdate=_:m.next=_,D.lastBaseUpdate=x))}if(u!==null){var L=i.baseState;d=0,D=_=x=null,m=u;do{var M=m.lane&-536870913,z=M!==m.lane;if(z?(pe&M)===M:(n&M)===M){M!==0&&M===Cn&&(ju=!0),D!==null&&(D=D.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var W=e,ne=m;M=t;var we=a;switch(ne.tag){case 1:if(W=ne.payload,typeof W=="function"){L=W.call(we,L,M);break e}L=W;break e;case 3:W.flags=W.flags&-65537|128;case 0:if(W=ne.payload,M=typeof W=="function"?W.call(we,L,M):W,M==null)break e;L=j({},L,M);break e;case 2:va=!0}}M=m.callback,M!==null&&(e.flags|=64,z&&(e.flags|=8192),z=i.callbacks,z===null?i.callbacks=[M]:z.push(M))}else z={lane:M,tag:m.tag,payload:m.payload,callback:m.callback,next:null},D===null?(_=D=z,x=L):D=D.next=z,d|=M;if(m=m.next,m===null){if(m=i.shared.pending,m===null)break;z=m,m=z.next,z.next=null,i.lastBaseUpdate=z,i.shared.pending=null}}while(!0);D===null&&(x=L),i.baseState=x,i.firstBaseUpdate=_,i.lastBaseUpdate=D,u===null&&(i.shared.lanes=0),Ea|=d,e.lanes=d,e.memoizedState=L}}function Uo(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Do(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Uo(a[e],t)}var wn=N(null),Si=N(0);function Ho(e,t){e=ua,K(Si,e),K(wn,t),ua=e|t.baseLanes}function Su(){K(Si,ua),K(wn,wn.current)}function Cu(){ua=Si.current,q(wn),q(Si)}var bt=N(null),Ot=null;function ja(e){var t=e.alternate;K(Le,Le.current&1),K(bt,e),Ot===null&&(t===null||wn.current!==null||t.memoizedState!==null)&&(Ot=e)}function Nu(e){K(Le,Le.current),K(bt,e),Ot===null&&(Ot=e)}function Bo(e){e.tag===22?(K(Le,Le.current),K(bt,e),Ot===null&&(Ot=e)):Sa()}function Sa(){K(Le,Le.current),K(bt,bt.current)}function xt(e){q(bt),Ot===e&&(Ot=null),q(Le)}var Le=N(0);function Ci(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Ar(a)||Mr(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Pt=0,re=null,Ee=null,Ze=null,Ni=!1,_n=!1,Ia=!1,Ei=0,yl=0,Rn=null,Dp=0;function De(){throw Error(o(321))}function Eu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!yt(e[a],t[a]))return!1;return!0}function Tu(e,t,a,n,i,u){return Pt=u,re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,H.H=e===null||e.memoizedState===null?jd:Yu,Ia=!1,u=a(n,i),Ia=!1,_n&&(u=qo(t,a,n,i)),Lo(e),u}function Lo(e){H.H=xl;var t=Ee!==null&&Ee.next!==null;if(Pt=0,Ze=Ee=re=null,Ni=!1,yl=0,Rn=null,t)throw Error(o(300));e===null||Xe||(e=e.dependencies,e!==null&&pi(e)&&(Xe=!0))}function qo(e,t,a,n){re=e;var i=0;do{if(_n&&(Rn=null),yl=0,_n=!1,25<=i)throw Error(o(301));if(i+=1,Ze=Ee=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}H.H=Sd,u=t(a,n)}while(_n);return u}function Hp(){var e=H.H,t=e.useState()[0];return t=typeof t.then=="function"?vl(t):t,e=e.useState()[0],(Ee!==null?Ee.memoizedState:null)!==e&&(re.flags|=1024),t}function wu(){var e=Ei!==0;return Ei=0,e}function _u(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Ru(e){if(Ni){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ni=!1}Pt=0,Ze=Ee=re=null,_n=!1,yl=Ei=0,Rn=null}function lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?re.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function qe(){if(Ee===null){var e=re.alternate;e=e!==null?e.memoizedState:null}else e=Ee.next;var t=Ze===null?re.memoizedState:Ze.next;if(t!==null)Ze=t,Ee=e;else{if(e===null)throw re.alternate===null?Error(o(467)):Error(o(310));Ee=e,e={memoizedState:Ee.memoizedState,baseState:Ee.baseState,baseQueue:Ee.baseQueue,queue:Ee.queue,next:null},Ze===null?re.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function Ti(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vl(e){var t=yl;return yl+=1,Rn===null&&(Rn=[]),e=Ao(Rn,e,t),t=re,(Ze===null?t.memoizedState:Ze.next)===null&&(t=t.alternate,H.H=t===null||t.memoizedState===null?jd:Yu),e}function wi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return vl(e);if(e.$$typeof===V)return We(e)}throw Error(o(438,String(e)))}function Au(e){var t=null,a=re.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=re.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=Ti(),re.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]=oe;return t.index++,a}function ea(e,t){return typeof t=="function"?t(e):t}function _i(e){var t=qe();return Mu(t,Ee,e)}function Mu(e,t,a){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=a;var i=e.baseQueue,u=n.pending;if(u!==null){if(i!==null){var d=i.next;i.next=u.next,u.next=d}t.baseQueue=i=u,n.pending=null}if(u=e.baseState,i===null)e.memoizedState=u;else{t=i.next;var m=d=null,x=null,_=t,D=!1;do{var L=_.lane&-536870913;if(L!==_.lane?(pe&L)===L:(Pt&L)===L){var M=_.revertLane;if(M===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),L===Cn&&(D=!0);else if((Pt&M)===M){_=_.next,M===Cn&&(D=!0);continue}else L={lane:0,revertLane:_.revertLane,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},x===null?(m=x=L,d=u):x=x.next=L,re.lanes|=M,Ea|=M;L=_.action,Ia&&a(u,L),u=_.hasEagerState?_.eagerState:a(u,L)}else M={lane:L,revertLane:_.revertLane,gesture:_.gesture,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},x===null?(m=x=M,d=u):x=x.next=M,re.lanes|=L,Ea|=L;_=_.next}while(_!==null&&_!==t);if(x===null?d=u:x.next=m,!yt(u,e.memoizedState)&&(Xe=!0,D&&(a=Nn,a!==null)))throw a;e.memoizedState=u,e.baseState=d,e.baseQueue=x,n.lastRenderedState=u}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function zu(e){var t=qe(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var n=a.dispatch,i=a.pending,u=t.memoizedState;if(i!==null){a.pending=null;var d=i=i.next;do u=e(u,d.action),d=d.next;while(d!==i);yt(u,t.memoizedState)||(Xe=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,n]}function Yo(e,t,a){var n=re,i=qe(),u=ye;if(u){if(a===void 0)throw Error(o(407));a=a()}else a=t();var d=!yt((Ee||i).memoizedState,a);if(d&&(i.memoizedState=a,Xe=!0),i=i.queue,Uu(Xo.bind(null,n,i,e),[e]),i.getSnapshot!==t||d||Ze!==null&&Ze.memoizedState.tag&1){if(n.flags|=2048,An(9,{destroy:void 0},Zo.bind(null,n,i,a,t),null),Ae===null)throw Error(o(349));u||(Pt&127)!==0||Go(n,t,a)}return a}function Go(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=re.updateQueue,t===null?(t=Ti(),re.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Zo(e,t,a,n){t.value=a,t.getSnapshot=n,Vo(t)&&Qo(e)}function Xo(e,t,a){return a(function(){Vo(t)&&Qo(e)})}function Vo(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!yt(e,a)}catch{return!0}}function Qo(e){var t=Za(e,2);t!==null&&ft(t,e,2)}function Ou(e){var t=lt();if(typeof e=="function"){var a=e;if(e=a(),Ia){da(!0);try{a()}finally{da(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:e},t}function Jo(e,t,a,n){return e.baseState=a,Mu(e,Ee,typeof n=="function"?n:ea)}function Bp(e,t,a,n,i){if(Mi(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){u.listeners.push(d)}};H.T!==null?a(!0):u.isTransition=!1,n(u),a=t.pending,a===null?(u.next=t.pending=u,$o(t,u)):(u.next=a.next,t.pending=a.next=u)}}function $o(e,t){var a=t.action,n=t.payload,i=e.state;if(t.isTransition){var u=H.T,d={};H.T=d;try{var m=a(i,n),x=H.S;x!==null&&x(d,m),Ko(e,t,m)}catch(_){ku(e,t,_)}finally{u!==null&&d.types!==null&&(u.types=d.types),H.T=u}}else try{u=a(i,n),Ko(e,t,u)}catch(_){ku(e,t,_)}}function Ko(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){Fo(e,t,n)},function(n){return ku(e,t,n)}):Fo(e,t,a)}function Fo(e,t,a){t.status="fulfilled",t.value=a,Wo(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,$o(e,a)))}function ku(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,Wo(t),t=t.next;while(t!==n)}e.action=null}function Wo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Io(e,t){return t}function Po(e,t){if(ye){var a=Ae.formState;if(a!==null){e:{var n=re;if(ye){if(Me){t:{for(var i=Me,u=zt;i.nodeType!==8;){if(!u){i=null;break t}if(i=kt(i.nextSibling),i===null){i=null;break t}}u=i.data,i=u==="F!"||u==="F"?i:null}if(i){Me=kt(i.nextSibling),n=i.data==="F!";break e}}ga(n)}n=!1}n&&(t=a[0])}}return a=lt(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:t},a.queue=n,a=vd.bind(null,re,n),n.dispatch=a,n=Ou(!1),u=qu.bind(null,re,!1,n.queue),n=lt(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,a=Bp.bind(null,re,i,u,a),i.dispatch=a,n.memoizedState=e,[t,a,!1]}function ed(e){var t=qe();return td(t,Ee,e)}function td(e,t,a){if(t=Mu(e,t,Io)[0],e=_i(ea)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=vl(t)}catch(d){throw d===En?vi:d}else n=t;t=qe();var i=t.queue,u=i.dispatch;return a!==t.memoizedState&&(re.flags|=2048,An(9,{destroy:void 0},Lp.bind(null,i,a),null)),[n,u,e]}function Lp(e,t){e.action=t}function ad(e){var t=qe(),a=Ee;if(a!==null)return td(t,a,e);qe(),t=t.memoizedState,a=qe();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function An(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=re.updateQueue,t===null&&(t=Ti(),re.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 nd(){return qe().memoizedState}function Ri(e,t,a,n){var i=lt();re.flags|=e,i.memoizedState=An(1|t,{destroy:void 0},a,n===void 0?null:n)}function Ai(e,t,a,n){var i=qe();n=n===void 0?null:n;var u=i.memoizedState.inst;Ee!==null&&n!==null&&Eu(n,Ee.memoizedState.deps)?i.memoizedState=An(t,u,a,n):(re.flags|=e,i.memoizedState=An(1|t,u,a,n))}function ld(e,t){Ri(8390656,8,e,t)}function Uu(e,t){Ai(2048,8,e,t)}function qp(e){re.flags|=4;var t=re.updateQueue;if(t===null)t=Ti(),re.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function id(e){var t=qe().memoizedState;return qp({ref:t,nextImpl:e}),function(){if((xe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function sd(e,t){return Ai(4,2,e,t)}function ud(e,t){return Ai(4,4,e,t)}function rd(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 cd(e,t,a){a=a!=null?a.concat([e]):null,Ai(4,4,rd.bind(null,t,e),a)}function Du(){}function od(e,t){var a=qe();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Eu(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function dd(e,t){var a=qe();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Eu(t,n[1]))return n[0];if(n=e(),Ia){da(!0);try{e()}finally{da(!1)}}return a.memoizedState=[n,t],n}function Hu(e,t,a){return a===void 0||(Pt&1073741824)!==0&&(pe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=hf(),re.lanes|=e,Ea|=e,a)}function fd(e,t,a,n){return yt(a,t)?a:wn.current!==null?(e=Hu(e,a,n),yt(e,t)||(Xe=!0),e):(Pt&42)===0||(Pt&1073741824)!==0&&(pe&261930)===0?(Xe=!0,e.memoizedState=a):(e=hf(),re.lanes|=e,Ea|=e,t)}function hd(e,t,a,n,i){var u=J.p;J.p=u!==0&&8>u?u:8;var d=H.T,m={};H.T=m,qu(e,!1,t,a);try{var x=i(),_=H.S;if(_!==null&&_(m,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var D=Up(x,n);bl(e,t,D,Ct(e))}else bl(e,t,n,Ct(e))}catch(L){bl(e,t,{then:function(){},status:"rejected",reason:L},Ct())}finally{J.p=u,d!==null&&m.types!==null&&(d.types=m.types),H.T=d}}function Yp(){}function Bu(e,t,a,n){if(e.tag!==5)throw Error(o(476));var i=md(e).queue;hd(e,i,t,ie,a===null?Yp:function(){return pd(e),a(n)})}function md(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:ie},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function pd(e){var t=md(e);t.next===null&&(t=e.alternate.memoizedState),bl(e,t.next.queue,{},Ct())}function Lu(){return We(Dl)}function gd(){return qe().memoizedState}function yd(){return qe().memoizedState}function Gp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ct();e=ba(a);var n=xa(t,e,a);n!==null&&(ft(n,t,a),ml(n,t,a)),t={cache:mu()},e.payload=t;return}t=t.return}}function Zp(e,t,a){var n=Ct();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Mi(e)?bd(t,a):(a=nu(e,t,a,n),a!==null&&(ft(a,e,n),xd(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,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Mi(e))bd(t,i);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var d=t.lastRenderedState,m=u(d,a);if(i.hasEagerState=!0,i.eagerState=m,yt(m,d))return di(e,t,i,0),Ae===null&&oi(),!1}catch{}finally{}if(a=nu(e,t,i,n),a!==null)return ft(a,e,n),xd(a,t,n),!0}return!1}function qu(e,t,a,n){if(n={lane:2,revertLane:vr(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Mi(e)){if(t)throw Error(o(479))}else t=nu(e,a,n,2),t!==null&&ft(t,e,2)}function Mi(e){var t=e.alternate;return e===re||t!==null&&t===re}function bd(e,t){_n=Ni=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function xd(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Nc(e,a)}}var xl={readContext:We,use:wi,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useLayoutEffect:De,useInsertionEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useSyncExternalStore:De,useId:De,useHostTransitionStatus:De,useFormState:De,useActionState:De,useOptimistic:De,useMemoCache:De,useCacheRefresh:De};xl.useEffectEvent=De;var jd={readContext:We,use:wi,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:We,useEffect:ld,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ri(4194308,4,rd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ri(4194308,4,e,t)},useInsertionEffect:function(e,t){Ri(4,2,e,t)},useMemo:function(e,t){var a=lt();t=t===void 0?null:t;var n=e();if(Ia){da(!0);try{e()}finally{da(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=lt();if(a!==void 0){var i=a(t);if(Ia){da(!0);try{a(t)}finally{da(!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=Zp.bind(null,re,e),[n.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:function(e){e=Ou(e);var t=e.queue,a=vd.bind(null,re,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Du,useDeferredValue:function(e,t){var a=lt();return Hu(a,e,t)},useTransition:function(){var e=Ou(!1);return e=hd.bind(null,re,e.queue,!0,!1),lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=re,i=lt();if(ye){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),Ae===null)throw Error(o(349));(pe&127)!==0||Go(n,t,a)}i.memoizedState=a;var u={value:a,getSnapshot:t};return i.queue=u,ld(Xo.bind(null,n,u,e),[e]),n.flags|=2048,An(9,{destroy:void 0},Zo.bind(null,n,u,a,t),null),a},useId:function(){var e=lt(),t=Ae.identifierPrefix;if(ye){var a=Zt,n=Gt;a=(n&~(1<<32-gt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ei++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Dp++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Lu,useFormState:Po,useActionState:Po,useOptimistic:function(e){var t=lt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=qu.bind(null,re,!0,a),a.dispatch=t,[e,t]},useMemoCache:Au,useCacheRefresh:function(){return lt().memoizedState=Gp.bind(null,re)},useEffectEvent:function(e){var t=lt(),a={impl:e};return t.memoizedState=a,function(){if((xe&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},Yu={readContext:We,use:wi,useCallback:od,useContext:We,useEffect:Uu,useImperativeHandle:cd,useInsertionEffect:sd,useLayoutEffect:ud,useMemo:dd,useReducer:_i,useRef:nd,useState:function(){return _i(ea)},useDebugValue:Du,useDeferredValue:function(e,t){var a=qe();return fd(a,Ee.memoizedState,e,t)},useTransition:function(){var e=_i(ea)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:vl(e),t]},useSyncExternalStore:Yo,useId:gd,useHostTransitionStatus:Lu,useFormState:ed,useActionState:ed,useOptimistic:function(e,t){var a=qe();return Jo(a,Ee,e,t)},useMemoCache:Au,useCacheRefresh:yd};Yu.useEffectEvent=id;var Sd={readContext:We,use:wi,useCallback:od,useContext:We,useEffect:Uu,useImperativeHandle:cd,useInsertionEffect:sd,useLayoutEffect:ud,useMemo:dd,useReducer:zu,useRef:nd,useState:function(){return zu(ea)},useDebugValue:Du,useDeferredValue:function(e,t){var a=qe();return Ee===null?Hu(a,e,t):fd(a,Ee.memoizedState,e,t)},useTransition:function(){var e=zu(ea)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:vl(e),t]},useSyncExternalStore:Yo,useId:gd,useHostTransitionStatus:Lu,useFormState:ad,useActionState:ad,useOptimistic:function(e,t){var a=qe();return Ee!==null?Jo(a,Ee,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Au,useCacheRefresh:yd};Sd.useEffectEvent=id;function Gu(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:j({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Zu={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ct(),i=ba(n);i.payload=t,a!=null&&(i.callback=a),t=xa(e,i,n),t!==null&&(ft(t,e,n),ml(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ct(),i=ba(n);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=xa(e,i,n),t!==null&&(ft(t,e,n),ml(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ct(),n=ba(a);n.tag=2,t!=null&&(n.callback=t),t=xa(e,n,a),t!==null&&(ft(t,e,a),ml(t,e,a))}};function Cd(e,t,a,n,i,u,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,u,d):t.prototype&&t.prototype.isPureReactComponent?!sl(a,n)||!sl(i,u):!0}function Nd(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&&Zu.enqueueReplaceState(t,t.state,null)}function Pa(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=j({},a));for(var i in e)a[i]===void 0&&(a[i]=e[i])}return a}function Ed(e){ci(e)}function Td(e){console.error(e)}function wd(e){ci(e)}function zi(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function _d(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 Xu(e,t,a){return a=ba(a),a.tag=3,a.payload={element:null},a.callback=function(){zi(e,t)},a}function Rd(e){return e=ba(e),e.tag=3,e}function Ad(e,t,a,n){var i=a.type.getDerivedStateFromError;if(typeof i=="function"){var u=n.value;e.payload=function(){return i(u)},e.callback=function(){_d(t,a,n)}}var d=a.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){_d(t,a,n),typeof i!="function"&&(Ta===null?Ta=new Set([this]):Ta.add(this));var m=n.stack;this.componentDidCatch(n.value,{componentStack:m!==null?m:""})})}function Xp(e,t,a,n,i){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Sn(t,a,i,!0),a=bt.current,a!==null){switch(a.tag){case 31:case 13:return Ot===null?Xi():a.alternate===null&&He===0&&(He=3),a.flags&=-257,a.flags|=65536,a.lanes=i,n===bi?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),pr(e,n,i)),!1;case 22:return a.flags|=65536,n===bi?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)),pr(e,n,i)),!1}throw Error(o(435,a.tag))}return pr(e,n,i),Xi(),!1}if(ye)return t=bt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==cu&&(e=Error(o(422),{cause:n}),cl(Rt(e,a)))):(n!==cu&&(t=Error(o(423),{cause:n}),cl(Rt(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=Rt(n,a),i=Xu(e.stateNode,n,i),xu(e,i),He!==4&&(He=2)),!1;var u=Error(o(520),{cause:n});if(u=Rt(u,a),_l===null?_l=[u]:_l.push(u),He!==4&&(He=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=Xu(a.stateNode,n,e),xu(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Ta===null||!Ta.has(u))))return a.flags|=65536,i&=-i,a.lanes|=i,i=Rd(i),Ad(i,e,a,n),xu(a,i),!1}a=a.return}while(a!==null);return!1}var Vu=Error(o(461)),Xe=!1;function Ie(e,t,a,n){t.child=e===null?ko(t,null,a,n):Wa(t,e.child,a,n)}function Md(e,t,a,n,i){a=a.render;var u=t.ref;if("ref"in n){var d={};for(var m in n)m!=="ref"&&(d[m]=n[m])}else d=n;return Ja(t),n=Tu(e,t,a,d,u,i),m=wu(),e!==null&&!Xe?(_u(e,t,i),ta(e,t,i)):(ye&&m&&uu(t),t.flags|=1,Ie(e,t,n,i),t.child)}function zd(e,t,a,n,i){if(e===null){var u=a.type;return typeof u=="function"&&!lu(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,Od(e,t,u,n,i)):(e=hi(a.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Pu(e,i)){var d=u.memoizedProps;if(a=a.compare,a=a!==null?a:sl,a(d,n)&&e.ref===t.ref)return ta(e,t,i)}return t.flags|=1,e=Kt(u,n),e.ref=t.ref,e.return=t,t.child=e}function Od(e,t,a,n,i){if(e!==null){var u=e.memoizedProps;if(sl(u,n)&&e.ref===t.ref)if(Xe=!1,t.pendingProps=n=u,Pu(e,i))(e.flags&131072)!==0&&(Xe=!0);else return t.lanes=e.lanes,ta(e,t,i)}return Qu(e,t,a,n,i)}function kd(e,t,a,n){var i=n.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(n=t.child=e.child,i=0;n!==null;)i=i|n.lanes|n.childLanes,n=n.sibling;n=i&~u}else n=0,t.child=null;return Ud(e,t,u,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&yi(t,u!==null?u.cachePool:null),u!==null?Ho(t,u):Su(),Bo(t);else return n=t.lanes=536870912,Ud(e,t,u!==null?u.baseLanes|a:a,a,n)}else u!==null?(yi(t,u.cachePool),Ho(t,u),Sa(),t.memoizedState=null):(e!==null&&yi(t,null),Su(),Sa());return Ie(e,t,i,a),t.child}function jl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ud(e,t,a,n,i){var u=gu();return u=u===null?null:{parent:Ge._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&yi(t,null),Su(),Bo(t),e!==null&&Sn(e,t,n,!0),t.childLanes=i,null}function Oi(e,t){return t=Ui({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Dd(e,t,a){return Wa(t,e.child,null,a),e=Oi(t,t.pendingProps),e.flags|=2,xt(t),t.memoizedState=null,e}function Vp(e,t,a){var n=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ye){if(n.mode==="hidden")return e=Oi(t,n),t.lanes=536870912,jl(null,e);if(Nu(t),(e=Me)?(e=Kf(e,zt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ma!==null?{id:Gt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},a=bo(e),a.return=t,t.child=a,Fe=t,Me=null)):e=null,e===null)throw ga(t);return t.lanes=536870912,null}return Oi(t,n)}var u=e.memoizedState;if(u!==null){var d=u.dehydrated;if(Nu(t),i)if(t.flags&256)t.flags&=-257,t=Dd(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Xe||Sn(e,t,a,!1),i=(a&e.childLanes)!==0,Xe||i){if(n=Ae,n!==null&&(d=Ec(n,a),d!==0&&d!==u.retryLane))throw u.retryLane=d,Za(e,d),ft(n,e,d),Vu;Xi(),t=Dd(e,t,a)}else e=u.treeContext,Me=kt(d.nextSibling),Fe=t,ye=!0,pa=null,zt=!1,e!==null&&So(t,e),t=Oi(t,n),t.flags|=4096;return t}return e=Kt(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ki(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 Qu(e,t,a,n,i){return Ja(t),a=Tu(e,t,a,n,void 0,i),n=wu(),e!==null&&!Xe?(_u(e,t,i),ta(e,t,i)):(ye&&n&&uu(t),t.flags|=1,Ie(e,t,a,i),t.child)}function Hd(e,t,a,n,i,u){return Ja(t),t.updateQueue=null,a=qo(t,n,a,i),Lo(e),n=wu(),e!==null&&!Xe?(_u(e,t,u),ta(e,t,u)):(ye&&n&&uu(t),t.flags|=1,Ie(e,t,a,u),t.child)}function Bd(e,t,a,n,i){if(Ja(t),t.stateNode===null){var u=vn,d=a.contextType;typeof d=="object"&&d!==null&&(u=We(d)),u=new a(n,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Zu,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=n,u.state=t.memoizedState,u.refs={},vu(t),d=a.contextType,u.context=typeof d=="object"&&d!==null?We(d):vn,u.state=t.memoizedState,d=a.getDerivedStateFromProps,typeof d=="function"&&(Gu(t,a,d,n),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(d=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),d!==u.state&&Zu.enqueueReplaceState(u,u.state,null),gl(t,n,u,i),pl(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){u=t.stateNode;var m=t.memoizedProps,x=Pa(a,m);u.props=x;var _=u.context,D=a.contextType;d=vn,typeof D=="object"&&D!==null&&(d=We(D));var L=a.getDerivedStateFromProps;D=typeof L=="function"||typeof u.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,D||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(m||_!==d)&&Nd(t,u,n,d),va=!1;var M=t.memoizedState;u.state=M,gl(t,n,u,i),pl(),_=t.memoizedState,m||M!==_||va?(typeof L=="function"&&(Gu(t,a,L,n),_=t.memoizedState),(x=va||Cd(t,a,x,n,M,_,d))?(D||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=_),u.props=n,u.state=_,u.context=d,n=x):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{u=t.stateNode,bu(e,t),d=t.memoizedProps,D=Pa(a,d),u.props=D,L=t.pendingProps,M=u.context,_=a.contextType,x=vn,typeof _=="object"&&_!==null&&(x=We(_)),m=a.getDerivedStateFromProps,(_=typeof m=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(d!==L||M!==x)&&Nd(t,u,n,x),va=!1,M=t.memoizedState,u.state=M,gl(t,n,u,i),pl();var z=t.memoizedState;d!==L||M!==z||va||e!==null&&e.dependencies!==null&&pi(e.dependencies)?(typeof m=="function"&&(Gu(t,a,m,n),z=t.memoizedState),(D=va||Cd(t,a,D,n,M,z,x)||e!==null&&e.dependencies!==null&&pi(e.dependencies))?(_||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(n,z,x),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(n,z,x)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||d===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=z),u.props=n,u.state=z,u.context=x,n=D):(typeof u.componentDidUpdate!="function"||d===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),n=!1)}return u=n,ki(e,t),n=(t.flags&128)!==0,u||n?(u=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&n?(t.child=Wa(t,e.child,null,i),t.child=Wa(t,null,a,i)):Ie(e,t,a,i),t.memoizedState=u.state,e=t.child):e=ta(e,t,i),e}function Ld(e,t,a,n){return Va(),t.flags|=256,Ie(e,t,a,n),t.child}var Ju={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $u(e){return{baseLanes:e,cachePool:_o()}}function Ku(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=St),e}function qd(e,t,a){var n=t.pendingProps,i=!1,u=(t.flags&128)!==0,d;if((d=u)||(d=e!==null&&e.memoizedState===null?!1:(Le.current&2)!==0),d&&(i=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(ye){if(i?ja(t):Sa(),(e=Me)?(e=Kf(e,zt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ma!==null?{id:Gt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},a=bo(e),a.return=t,t.child=a,Fe=t,Me=null)):e=null,e===null)throw ga(t);return Mr(e)?t.lanes=32:t.lanes=536870912,null}var m=n.children;return n=n.fallback,i?(Sa(),i=t.mode,m=Ui({mode:"hidden",children:m},i),n=Xa(n,i,a,null),m.return=t,n.return=t,m.sibling=n,t.child=m,n=t.child,n.memoizedState=$u(a),n.childLanes=Ku(e,d,a),t.memoizedState=Ju,jl(null,n)):(ja(t),Fu(t,m))}var x=e.memoizedState;if(x!==null&&(m=x.dehydrated,m!==null)){if(u)t.flags&256?(ja(t),t.flags&=-257,t=Wu(e,t,a)):t.memoizedState!==null?(Sa(),t.child=e.child,t.flags|=128,t=null):(Sa(),m=n.fallback,i=t.mode,n=Ui({mode:"visible",children:n.children},i),m=Xa(m,i,a,null),m.flags|=2,n.return=t,m.return=t,n.sibling=m,t.child=n,Wa(t,e.child,null,a),n=t.child,n.memoizedState=$u(a),n.childLanes=Ku(e,d,a),t.memoizedState=Ju,t=jl(null,n));else if(ja(t),Mr(m)){if(d=m.nextSibling&&m.nextSibling.dataset,d)var _=d.dgst;d=_,n=Error(o(419)),n.stack="",n.digest=d,cl({value:n,source:null,stack:null}),t=Wu(e,t,a)}else if(Xe||Sn(e,t,a,!1),d=(a&e.childLanes)!==0,Xe||d){if(d=Ae,d!==null&&(n=Ec(d,a),n!==0&&n!==x.retryLane))throw x.retryLane=n,Za(e,n),ft(d,e,n),Vu;Ar(m)||Xi(),t=Wu(e,t,a)}else Ar(m)?(t.flags|=192,t.child=e.child,t=null):(e=x.treeContext,Me=kt(m.nextSibling),Fe=t,ye=!0,pa=null,zt=!1,e!==null&&So(t,e),t=Fu(t,n.children),t.flags|=4096);return t}return i?(Sa(),m=n.fallback,i=t.mode,x=e.child,_=x.sibling,n=Kt(x,{mode:"hidden",children:n.children}),n.subtreeFlags=x.subtreeFlags&65011712,_!==null?m=Kt(_,m):(m=Xa(m,i,a,null),m.flags|=2),m.return=t,n.return=t,n.sibling=m,t.child=n,jl(null,n),n=t.child,m=e.child.memoizedState,m===null?m=$u(a):(i=m.cachePool,i!==null?(x=Ge._currentValue,i=i.parent!==x?{parent:x,pool:x}:i):i=_o(),m={baseLanes:m.baseLanes|a,cachePool:i}),n.memoizedState=m,n.childLanes=Ku(e,d,a),t.memoizedState=Ju,jl(e.child,n)):(ja(t),a=e.child,e=a.sibling,a=Kt(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=a,t.memoizedState=null,a)}function Fu(e,t){return t=Ui({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ui(e,t){return e=vt(22,e,null,t),e.lanes=0,e}function Wu(e,t,a){return Wa(t,e.child,null,a),e=Fu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Yd(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),fu(e.return,t,a)}function Iu(e,t,a,n,i,u){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:i,treeForkCount:u}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=n,d.tail=a,d.tailMode=i,d.treeForkCount=u)}function Gd(e,t,a){var n=t.pendingProps,i=n.revealOrder,u=n.tail;n=n.children;var d=Le.current,m=(d&2)!==0;if(m?(d=d&1|2,t.flags|=128):d&=1,K(Le,d),Ie(e,t,n,a),n=ye?rl:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Yd(e,a,t);else if(e.tag===19)Yd(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}switch(i){case"forwards":for(a=t.child,i=null;a!==null;)e=a.alternate,e!==null&&Ci(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),Iu(t,!1,i,a,u,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ci(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}Iu(t,!0,a,null,u,n);break;case"together":Iu(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function ta(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ea|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Sn(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=Kt(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Kt(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Pu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&pi(e)))}function Qp(e,t,a){switch(t.tag){case 3:nt(t,t.stateNode.containerInfo),ya(t,Ge,e.memoizedState.cache),Va();break;case 27:case 5:Jn(t);break;case 4:nt(t,t.stateNode.containerInfo);break;case 10:ya(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Nu(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(ja(t),t.flags|=128,null):(a&t.child.childLanes)!==0?qd(e,t,a):(ja(t),e=ta(e,t,a),e!==null?e.sibling:null);ja(t);break;case 19:var i=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Sn(e,t,a,!1),n=(a&t.childLanes)!==0),i){if(n)return Gd(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),K(Le,Le.current),n)break;return null;case 22:return t.lanes=0,kd(e,t,a,t.pendingProps);case 24:ya(t,Ge,e.memoizedState.cache)}return ta(e,t,a)}function Zd(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Xe=!0;else{if(!Pu(e,a)&&(t.flags&128)===0)return Xe=!1,Qp(e,t,a);Xe=(e.flags&131072)!==0}else Xe=!1,ye&&(t.flags&1048576)!==0&&jo(t,rl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Ka(t.elementType),t.type=e,typeof e=="function")lu(e)?(n=Pa(e,n),t.tag=1,t=Bd(null,t,e,n,a)):(t.tag=0,t=Qu(null,t,e,n,a));else{if(e!=null){var i=e.$$typeof;if(i===ae){t.tag=11,t=Md(null,t,e,n,a);break e}else if(i===E){t.tag=14,t=zd(null,t,e,n,a);break e}}throw t=at(e)||e,Error(o(306,t,""))}}return t;case 0:return Qu(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,i=Pa(n,t.pendingProps),Bd(e,t,n,i,a);case 3:e:{if(nt(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var u=t.memoizedState;i=u.element,bu(e,t),gl(t,n,null,a);var d=t.memoizedState;if(n=d.cache,ya(t,Ge,n),n!==u.cache&&hu(t,[Ge],a,!0),pl(),n=d.element,u.isDehydrated)if(u={element:n,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Ld(e,t,n,a);break e}else if(n!==i){i=Rt(Error(o(424)),t),cl(i),t=Ld(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(Me=kt(e.firstChild),Fe=t,ye=!0,pa=null,zt=!0,a=ko(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Va(),n===i){t=ta(e,t,a);break e}Ie(e,t,n,a)}t=t.child}return t;case 26:return ki(e,t),e===null?(a=th(t.type,null,t.pendingProps,null))?t.memoizedState=a:ye||(a=t.type,e=t.pendingProps,n=Wi(de.current).createElement(a),n[Ke]=t,n[st]=e,Pe(n,a,e),Je(n),t.stateNode=n):t.memoizedState=th(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Jn(t),e===null&&ye&&(n=t.stateNode=If(t.type,t.pendingProps,de.current),Fe=t,zt=!0,i=Me,Aa(t.type)?(zr=i,Me=kt(n.firstChild)):Me=i),Ie(e,t,t.pendingProps.children,a),ki(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ye&&((i=n=Me)&&(n=Sg(n,t.type,t.pendingProps,zt),n!==null?(t.stateNode=n,Fe=t,Me=kt(n.firstChild),zt=!1,i=!0):i=!1),i||ga(t)),Jn(t),i=t.type,u=t.pendingProps,d=e!==null?e.memoizedProps:null,n=u.children,wr(i,u)?n=null:d!==null&&wr(i,d)&&(t.flags|=32),t.memoizedState!==null&&(i=Tu(e,t,Hp,null,null,a),Dl._currentValue=i),ki(e,t),Ie(e,t,n,a),t.child;case 6:return e===null&&ye&&((e=a=Me)&&(a=Cg(a,t.pendingProps,zt),a!==null?(t.stateNode=a,Fe=t,Me=null,e=!0):e=!1),e||ga(t)),null;case 13:return qd(e,t,a);case 4:return nt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Wa(t,null,n,a):Ie(e,t,n,a),t.child;case 11:return Md(e,t,t.type,t.pendingProps,a);case 7:return Ie(e,t,t.pendingProps,a),t.child;case 8:return Ie(e,t,t.pendingProps.children,a),t.child;case 12:return Ie(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,ya(t,t.type,n.value),Ie(e,t,n.children,a),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,Ja(t),i=We(i),n=n(i),t.flags|=1,Ie(e,t,n,a),t.child;case 14:return zd(e,t,t.type,t.pendingProps,a);case 15:return Od(e,t,t.type,t.pendingProps,a);case 19:return Gd(e,t,a);case 31:return Vp(e,t,a);case 22:return kd(e,t,a,t.pendingProps);case 24:return Ja(t),n=We(Ge),e===null?(i=gu(),i===null&&(i=Ae,u=mu(),i.pooledCache=u,u.refCount++,u!==null&&(i.pooledCacheLanes|=a),i=u),t.memoizedState={parent:n,cache:i},vu(t),ya(t,Ge,i)):((e.lanes&a)!==0&&(bu(e,t),gl(t,null,null,a),pl()),i=e.memoizedState,u=t.memoizedState,i.parent!==n?(i={parent:n,cache:n},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),ya(t,Ge,n)):(n=u.cache,ya(t,Ge,n),n!==i.cache&&hu(t,[Ge],a,!0))),Ie(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function aa(e){e.flags|=4}function er(e,t,a,n,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(yf())e.flags|=8192;else throw Fa=bi,yu}else e.flags&=-16777217}function Xd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!sh(t))if(yf())e.flags|=8192;else throw Fa=bi,yu}function Di(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Sc():536870912,e.lanes|=t,kn|=t)}function Sl(e,t){if(!ye)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 ze(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 Jp(e,t,a){var n=t.pendingProps;switch(ru(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return ze(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),It(Ge),Be(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(jn(t)?aa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ou())),ze(t),null;case 26:var i=t.type,u=t.memoizedState;return e===null?(aa(t),u!==null?(ze(t),Xd(t,u)):(ze(t),er(t,i,null,n,a))):u?u!==e.memoizedState?(aa(t),ze(t),Xd(t,u)):(ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&aa(t),ze(t),er(t,i,e,n,a)),null;case 27:if(Jl(t),a=de.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&aa(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return ze(t),null}e=P.current,jn(t)?Co(t):(e=If(i,n,a),t.stateNode=e,aa(t))}return ze(t),null;case 5:if(Jl(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&aa(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return ze(t),null}if(u=P.current,jn(t))Co(t);else{var d=Wi(de.current);switch(u){case 1:u=d.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:u=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":u=d.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":u=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":u=d.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof n.is=="string"?d.createElement("select",{is:n.is}):d.createElement("select"),n.multiple?u.multiple=!0:n.size&&(u.size=n.size);break;default:u=typeof n.is=="string"?d.createElement(i,{is:n.is}):d.createElement(i)}}u[Ke]=t,u[st]=n;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)u.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=u;e:switch(Pe(u,i,n),i){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&aa(t)}}return ze(t),er(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&aa(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=de.current,jn(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,i=Fe,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}e[Ke]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||Yf(e.nodeValue,a)),e||ga(t,!0)}else e=Wi(e).createTextNode(n),e[Ke]=t,t.stateNode=e}return ze(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=jn(t),a!==null){if(e===null){if(!n)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Ke]=t}else Va(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),e=!1}else a=ou(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(xt(t),t):(xt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return ze(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=jn(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[Ke]=t}else Va(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),i=!1}else i=ou(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(xt(t),t):(xt(t),null)}return xt(t),(t.flags&128)!==0?(t.lanes=a,t):(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),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==i&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Di(t,t.updateQueue),ze(t),null);case 4:return Be(),e===null&&Sr(t.stateNode.containerInfo),ze(t),null;case 10:return It(t.type),ze(t),null;case 19:if(q(Le),n=t.memoizedState,n===null)return ze(t),null;if(i=(t.flags&128)!==0,u=n.rendering,u===null)if(i)Sl(n,!1);else{if(He!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Ci(e),u!==null){for(t.flags|=128,Sl(n,!1),e=u.updateQueue,t.updateQueue=e,Di(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)vo(a,e),a=a.sibling;return K(Le,Le.current&1|2),ye&&Ft(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&mt()>Yi&&(t.flags|=128,i=!0,Sl(n,!1),t.lanes=4194304)}else{if(!i)if(e=Ci(u),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Di(t,e),Sl(n,!0),n.tail===null&&n.tailMode==="hidden"&&!u.alternate&&!ye)return ze(t),null}else 2*mt()-n.renderingStartTime>Yi&&a!==536870912&&(t.flags|=128,i=!0,Sl(n,!1),t.lanes=4194304);n.isBackwards?(u.sibling=t.child,t.child=u):(e=n.last,e!==null?e.sibling=u:t.child=u,n.last=u)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=mt(),e.sibling=null,a=Le.current,K(Le,i?a&1|2:a&1),ye&&Ft(t,n.treeForkCount),e):(ze(t),null);case 22:case 23:return xt(t),Cu(),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&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),a=t.updateQueue,a!==null&&Di(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&&q($a),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),It(Ge),ze(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function $p(e,t){switch(ru(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return It(Ge),Be(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Jl(t),null;case 31:if(t.memoizedState!==null){if(xt(t),t.alternate===null)throw Error(o(340));Va()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(xt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Va()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(Le),null;case 4:return Be(),null;case 10:return It(t.type),null;case 22:case 23:return xt(t),Cu(),e!==null&&q($a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return It(Ge),null;case 25:return null;default:return null}}function Vd(e,t){switch(ru(t),t.tag){case 3:It(Ge),Be();break;case 26:case 27:case 5:Jl(t);break;case 4:Be();break;case 31:t.memoizedState!==null&&xt(t);break;case 13:xt(t);break;case 19:q(Le);break;case 10:It(t.type);break;case 22:case 23:xt(t),Cu(),e!==null&&q($a);break;case 24:It(Ge)}}function Cl(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){n=void 0;var u=a.create,d=a.inst;n=u(),d.destroy=n}a=a.next}while(a!==i)}}catch(m){Ce(t,t.return,m)}}function Ca(e,t,a){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var u=i.next;n=u;do{if((n.tag&e)===e){var d=n.inst,m=d.destroy;if(m!==void 0){d.destroy=void 0,i=t;var x=a,_=m;try{_()}catch(D){Ce(i,x,D)}}}n=n.next}while(n!==u)}}catch(D){Ce(t,t.return,D)}}function Qd(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Do(t,a)}catch(n){Ce(e,e.return,n)}}}function Jd(e,t,a){a.props=Pa(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Ce(e,t,n)}}function Nl(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){Ce(e,t,i)}}function Xt(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(i){Ce(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){Ce(e,t,i)}else a.current=null}function $d(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){Ce(e,e.return,i)}}function tr(e,t,a){try{var n=e.stateNode;gg(n,e.type,a,t),n[st]=t}catch(i){Ce(e,e.return,i)}}function Kd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Aa(e.type)||e.tag===4}function ar(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Kd(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&&Aa(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 nr(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=Jt));else if(n!==4&&(n===27&&Aa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(nr(e,t,a),e=e.sibling;e!==null;)nr(e,t,a),e=e.sibling}function Hi(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&&Aa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Hi(e,t,a),e=e.sibling;e!==null;)Hi(e,t,a),e=e.sibling}function Fd(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pe(t,n,a),t[Ke]=e,t[st]=a}catch(u){Ce(e,e.return,u)}}var na=!1,Ve=!1,lr=!1,Wd=typeof WeakSet=="function"?WeakSet:Set,$e=null;function Kp(e,t){if(e=e.containerInfo,Er=ls,e=ro(e),Ws(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var i=n.anchorOffset,u=n.focusNode;n=n.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var d=0,m=-1,x=-1,_=0,D=0,L=e,M=null;t:for(;;){for(var z;L!==a||i!==0&&L.nodeType!==3||(m=d+i),L!==u||n!==0&&L.nodeType!==3||(x=d+n),L.nodeType===3&&(d+=L.nodeValue.length),(z=L.firstChild)!==null;)M=L,L=z;for(;;){if(L===e)break t;if(M===a&&++_===i&&(m=d),M===u&&++D===n&&(x=d),(z=L.nextSibling)!==null)break;L=M,M=L.parentNode}L=z}a=m===-1||x===-1?null:{start:m,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(Tr={focusedElem:e,selectionRange:a},ls=!1,$e=t;$e!==null;)if(t=$e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$e=e;else for(;$e!==null;){switch(t=$e,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)i=e[a],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,i=u.memoizedProps,u=u.memoizedState,n=a.stateNode;try{var W=Pa(a.type,i);e=n.getSnapshotBeforeUpdate(W,u),n.__reactInternalSnapshotBeforeUpdate=e}catch(ne){Ce(a,a.return,ne)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Rr(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Rr(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,$e=e;break}$e=t.return}}function Id(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:ia(e,a),n&4&&Cl(5,a);break;case 1:if(ia(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(d){Ce(a,a.return,d)}else{var i=Pa(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){Ce(a,a.return,d)}}n&64&&Qd(a),n&512&&Nl(a,a.return);break;case 3:if(ia(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{Do(e,t)}catch(d){Ce(a,a.return,d)}}break;case 27:t===null&&n&4&&Fd(a);case 26:case 5:ia(e,a),t===null&&n&4&&$d(a),n&512&&Nl(a,a.return);break;case 12:ia(e,a);break;case 31:ia(e,a),n&4&&tf(e,a);break;case 13:ia(e,a),n&4&&af(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=lg.bind(null,a),Ng(e,a))));break;case 22:if(n=a.memoizedState!==null||na,!n){t=t!==null&&t.memoizedState!==null||Ve,i=na;var u=Ve;na=n,(Ve=t)&&!u?sa(e,a,(a.subtreeFlags&8772)!==0):ia(e,a),na=i,Ve=u}break;case 30:break;default:ia(e,a)}}function Pd(e){var t=e.alternate;t!==null&&(e.alternate=null,Pd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ks(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 ke=null,rt=!1;function la(e,t,a){for(a=a.child;a!==null;)ef(e,t,a),a=a.sibling}function ef(e,t,a){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount($n,a)}catch{}switch(a.tag){case 26:Ve||Xt(a,t),la(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ve||Xt(a,t);var n=ke,i=rt;Aa(a.type)&&(ke=a.stateNode,rt=!1),la(e,t,a),Ol(a.stateNode),ke=n,rt=i;break;case 5:Ve||Xt(a,t);case 6:if(n=ke,i=rt,ke=null,la(e,t,a),ke=n,rt=i,ke!==null)if(rt)try{(ke.nodeType===9?ke.body:ke.nodeName==="HTML"?ke.ownerDocument.body:ke).removeChild(a.stateNode)}catch(u){Ce(a,t,u)}else try{ke.removeChild(a.stateNode)}catch(u){Ce(a,t,u)}break;case 18:ke!==null&&(rt?(e=ke,Jf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Gn(e)):Jf(ke,a.stateNode));break;case 4:n=ke,i=rt,ke=a.stateNode.containerInfo,rt=!0,la(e,t,a),ke=n,rt=i;break;case 0:case 11:case 14:case 15:Ca(2,a,t),Ve||Ca(4,a,t),la(e,t,a);break;case 1:Ve||(Xt(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Jd(a,t,n)),la(e,t,a);break;case 21:la(e,t,a);break;case 22:Ve=(n=Ve)||a.memoizedState!==null,la(e,t,a),Ve=n;break;default:la(e,t,a)}}function tf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gn(e)}catch(a){Ce(t,t.return,a)}}}function af(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gn(e)}catch(a){Ce(t,t.return,a)}}function Fp(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Wd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Wd),t;default:throw Error(o(435,e.tag))}}function Bi(e,t){var a=Fp(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var i=ig.bind(null,e,n);n.then(i,i)}})}function ct(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n],u=e,d=t,m=d;e:for(;m!==null;){switch(m.tag){case 27:if(Aa(m.type)){ke=m.stateNode,rt=!1;break e}break;case 5:ke=m.stateNode,rt=!1;break e;case 3:case 4:ke=m.stateNode.containerInfo,rt=!0;break e}m=m.return}if(ke===null)throw Error(o(160));ef(u,d,i),ke=null,rt=!1,u=i.alternate,u!==null&&(u.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)nf(t,e),t=t.sibling}var Bt=null;function nf(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ct(t,e),ot(e),n&4&&(Ca(3,e,e.return),Cl(3,e),Ca(5,e,e.return));break;case 1:ct(t,e),ot(e),n&512&&(Ve||a===null||Xt(a,a.return)),n&64&&na&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var i=Bt;if(ct(t,e),ot(e),n&512&&(Ve||a===null||Xt(a,a.return)),n&4){var u=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,i=i.ownerDocument||i;t:switch(n){case"title":u=i.getElementsByTagName("title")[0],(!u||u[Wn]||u[Ke]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=i.createElement(n),i.head.insertBefore(u,i.querySelector("head > title"))),Pe(u,n,a),u[Ke]=e,Je(u),n=u;break e;case"link":var d=lh("link","href",i).get(n+(a.href||""));if(d){for(var m=0;m<d.length;m++)if(u=d[m],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){d.splice(m,1);break t}}u=i.createElement(n),Pe(u,n,a),i.head.appendChild(u);break;case"meta":if(d=lh("meta","content",i).get(n+(a.content||""))){for(m=0;m<d.length;m++)if(u=d[m],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){d.splice(m,1);break t}}u=i.createElement(n),Pe(u,n,a),i.head.appendChild(u);break;default:throw Error(o(468,n))}u[Ke]=e,Je(u),n=u}e.stateNode=n}else ih(i,e.type,e.stateNode);else e.stateNode=nh(i,n,e.memoizedProps);else u!==n?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,n===null?ih(i,e.type,e.stateNode):nh(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&tr(e,e.memoizedProps,a.memoizedProps)}break;case 27:ct(t,e),ot(e),n&512&&(Ve||a===null||Xt(a,a.return)),a!==null&&n&4&&tr(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ct(t,e),ot(e),n&512&&(Ve||a===null||Xt(a,a.return)),e.flags&32){i=e.stateNode;try{dn(i,"")}catch(W){Ce(e,e.return,W)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,tr(e,i,a!==null?a.memoizedProps:i)),n&1024&&(lr=!0);break;case 6:if(ct(t,e),ot(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(W){Ce(e,e.return,W)}}break;case 3:if(es=null,i=Bt,Bt=Ii(t.containerInfo),ct(t,e),Bt=i,ot(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Gn(t.containerInfo)}catch(W){Ce(e,e.return,W)}lr&&(lr=!1,lf(e));break;case 4:n=Bt,Bt=Ii(e.stateNode.containerInfo),ct(t,e),ot(e),Bt=n;break;case 12:ct(t,e),ot(e);break;case 31:ct(t,e),ot(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Bi(e,n)));break;case 13:ct(t,e),ot(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(qi=mt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Bi(e,n)));break;case 22:i=e.memoizedState!==null;var x=a!==null&&a.memoizedState!==null,_=na,D=Ve;if(na=_||i,Ve=D||x,ct(t,e),Ve=D,na=_,ot(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||x||na||Ve||en(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){x=a=t;try{if(u=x.stateNode,i)d=u.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{m=x.stateNode;var L=x.memoizedProps.style,M=L!=null&&L.hasOwnProperty("display")?L.display:null;m.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(W){Ce(x,x.return,W)}}}else if(t.tag===6){if(a===null){x=t;try{x.stateNode.nodeValue=i?"":x.memoizedProps}catch(W){Ce(x,x.return,W)}}}else if(t.tag===18){if(a===null){x=t;try{var z=x.stateNode;i?$f(z,!0):$f(x.stateNode,!1)}catch(W){Ce(x,x.return,W)}}}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,Bi(e,a))));break;case 19:ct(t,e),ot(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Bi(e,n)));break;case 30:break;case 21:break;default:ct(t,e),ot(e)}}function ot(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Kd(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var i=a.stateNode,u=ar(e);Hi(e,u,i);break;case 5:var d=a.stateNode;a.flags&32&&(dn(d,""),a.flags&=-33);var m=ar(e);Hi(e,m,d);break;case 3:case 4:var x=a.stateNode.containerInfo,_=ar(e);nr(e,_,x);break;default:throw Error(o(161))}}catch(D){Ce(e,e.return,D)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function lf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;lf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ia(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Id(e,t.alternate,t),t=t.sibling}function en(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ca(4,t,t.return),en(t);break;case 1:Xt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Jd(t,t.return,a),en(t);break;case 27:Ol(t.stateNode);case 26:case 5:Xt(t,t.return),en(t);break;case 22:t.memoizedState===null&&en(t);break;case 30:en(t);break;default:en(t)}e=e.sibling}}function sa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,u=t,d=u.flags;switch(u.tag){case 0:case 11:case 15:sa(i,u,a),Cl(4,u);break;case 1:if(sa(i,u,a),n=u,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(_){Ce(n,n.return,_)}if(n=u,i=n.updateQueue,i!==null){var m=n.stateNode;try{var x=i.shared.hiddenCallbacks;if(x!==null)for(i.shared.hiddenCallbacks=null,i=0;i<x.length;i++)Uo(x[i],m)}catch(_){Ce(n,n.return,_)}}a&&d&64&&Qd(u),Nl(u,u.return);break;case 27:Fd(u);case 26:case 5:sa(i,u,a),a&&n===null&&d&4&&$d(u),Nl(u,u.return);break;case 12:sa(i,u,a);break;case 31:sa(i,u,a),a&&d&4&&tf(i,u);break;case 13:sa(i,u,a),a&&d&4&&af(i,u);break;case 22:u.memoizedState===null&&sa(i,u,a),Nl(u,u.return);break;case 30:break;default:sa(i,u,a)}t=t.sibling}}function ir(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&&ol(a))}function sr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ol(e))}function Lt(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)sf(e,t,a,n),t=t.sibling}function sf(e,t,a,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Lt(e,t,a,n),i&2048&&Cl(9,t);break;case 1:Lt(e,t,a,n);break;case 3:Lt(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&&ol(e)));break;case 12:if(i&2048){Lt(e,t,a,n),e=t.stateNode;try{var u=t.memoizedProps,d=u.id,m=u.onPostCommit;typeof m=="function"&&m(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(x){Ce(t,t.return,x)}}else Lt(e,t,a,n);break;case 31:Lt(e,t,a,n);break;case 13:Lt(e,t,a,n);break;case 23:break;case 22:u=t.stateNode,d=t.alternate,t.memoizedState!==null?u._visibility&2?Lt(e,t,a,n):El(e,t):u._visibility&2?Lt(e,t,a,n):(u._visibility|=2,Mn(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),i&2048&&ir(d,t);break;case 24:Lt(e,t,a,n),i&2048&&sr(t.alternate,t);break;default:Lt(e,t,a,n)}}function Mn(e,t,a,n,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,d=t,m=a,x=n,_=d.flags;switch(d.tag){case 0:case 11:case 15:Mn(u,d,m,x,i),Cl(8,d);break;case 23:break;case 22:var D=d.stateNode;d.memoizedState!==null?D._visibility&2?Mn(u,d,m,x,i):El(u,d):(D._visibility|=2,Mn(u,d,m,x,i)),i&&_&2048&&ir(d.alternate,d);break;case 24:Mn(u,d,m,x,i),i&&_&2048&&sr(d.alternate,d);break;default:Mn(u,d,m,x,i)}t=t.sibling}}function El(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:El(a,n),i&2048&&ir(n.alternate,n);break;case 24:El(a,n),i&2048&&sr(n.alternate,n);break;default:El(a,n)}t=t.sibling}}var Tl=8192;function zn(e,t,a){if(e.subtreeFlags&Tl)for(e=e.child;e!==null;)uf(e,t,a),e=e.sibling}function uf(e,t,a){switch(e.tag){case 26:zn(e,t,a),e.flags&Tl&&e.memoizedState!==null&&Dg(a,Bt,e.memoizedState,e.memoizedProps);break;case 5:zn(e,t,a);break;case 3:case 4:var n=Bt;Bt=Ii(e.stateNode.containerInfo),zn(e,t,a),Bt=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Tl,Tl=16777216,zn(e,t,a),Tl=n):zn(e,t,a));break;default:zn(e,t,a)}}function rf(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 wl(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];$e=n,of(n,e)}rf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)cf(e),e=e.sibling}function cf(e){switch(e.tag){case 0:case 11:case 15:wl(e),e.flags&2048&&Ca(9,e,e.return);break;case 3:wl(e);break;case 12:wl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Li(e)):wl(e);break;default:wl(e)}}function Li(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];$e=n,of(n,e)}rf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ca(8,t,t.return),Li(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Li(t));break;default:Li(t)}e=e.sibling}}function of(e,t){for(;$e!==null;){var a=$e;switch(a.tag){case 0:case 11:case 15:Ca(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:ol(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,$e=n;else e:for(a=e;$e!==null;){n=$e;var i=n.sibling,u=n.return;if(Pd(n),n===a){$e=null;break e}if(i!==null){i.return=u,$e=i;break e}$e=u}}}var Wp={getCacheForType:function(e){var t=We(Ge),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return We(Ge).controller.signal}},Ip=typeof WeakMap=="function"?WeakMap:Map,xe=0,Ae=null,fe=null,pe=0,Se=0,jt=null,Na=!1,On=!1,ur=!1,ua=0,He=0,Ea=0,tn=0,rr=0,St=0,kn=0,_l=null,dt=null,cr=!1,qi=0,df=0,Yi=1/0,Gi=null,Ta=null,Qe=0,wa=null,Un=null,ra=0,or=0,dr=null,ff=null,Rl=0,fr=null;function Ct(){return(xe&2)!==0&&pe!==0?pe&-pe:H.T!==null?vr():Tc()}function hf(){if(St===0)if((pe&536870912)===0||ye){var e=Fl;Fl<<=1,(Fl&3932160)===0&&(Fl=262144),St=e}else St=536870912;return e=bt.current,e!==null&&(e.flags|=32),St}function ft(e,t,a){(e===Ae&&(Se===2||Se===9)||e.cancelPendingCommit!==null)&&(Dn(e,0),_a(e,pe,St,!1)),Fn(e,a),((xe&2)===0||e!==Ae)&&(e===Ae&&((xe&2)===0&&(tn|=a),He===4&&_a(e,pe,St,!1)),Vt(e))}function mf(e,t,a){if((xe&6)!==0)throw Error(o(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Kn(e,t),i=n?tg(e,t):mr(e,t,!0),u=n;do{if(i===0){On&&!n&&_a(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!Pp(a)){i=mr(e,t,!1),u=!1;continue}if(i===2){if(u=t,e.errorRecoveryDisabledLanes&u)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var m=e;i=_l;var x=m.current.memoizedState.isDehydrated;if(x&&(Dn(m,d).flags|=256),d=mr(m,d,!1),d!==2){if(ur&&!x){m.errorRecoveryDisabledLanes|=u,tn|=u,i=4;break e}u=dt,dt=i,u!==null&&(dt===null?dt=u:dt.push.apply(dt,u))}i=d}if(u=!1,i!==2)continue}}if(i===1){Dn(e,0),_a(e,t,0,!0);break}e:{switch(n=e,u=i,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:_a(n,t,St,!Na);break e;case 2:dt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=qi+300-mt(),10<i)){if(_a(n,t,St,!Na),Il(n,0,!0)!==0)break e;ra=t,n.timeoutHandle=Vf(pf.bind(null,n,a,dt,Gi,cr,t,St,tn,kn,Na,u,"Throttled",-0,0),i);break e}pf(n,a,dt,Gi,cr,t,St,tn,kn,Na,u,null,-0,0)}}break}while(!0);Vt(e)}function pf(e,t,a,n,i,u,d,m,x,_,D,L,M,z){if(e.timeoutHandle=-1,L=t.subtreeFlags,L&8192||(L&16785408)===16785408){L={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Jt},uf(t,u,L);var W=(u&62914560)===u?qi-mt():(u&4194048)===u?df-mt():0;if(W=Hg(L,W),W!==null){ra=u,e.cancelPendingCommit=W(Cf.bind(null,e,t,u,a,n,i,d,m,x,D,L,null,M,z)),_a(e,u,d,!_);return}}Cf(e,t,u,a,n,i,d,m,x)}function Pp(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var i=a[n],u=i.getSnapshot;i=i.value;try{if(!yt(u(),i))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _a(e,t,a,n){t&=~rr,t&=~tn,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var u=31-gt(i),d=1<<u;n[u]=-1,i&=~d}a!==0&&Cc(e,a,t)}function Zi(){return(xe&6)===0?(Al(0),!1):!0}function hr(){if(fe!==null){if(Se===0)var e=fe.return;else e=fe,Wt=Qa=null,Ru(e),Tn=null,fl=0,e=fe;for(;e!==null;)Vd(e.alternate,e),e=e.return;fe=null}}function Dn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,bg(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ra=0,hr(),Ae=e,fe=a=Kt(e.current,null),pe=t,Se=0,jt=null,Na=!1,On=Kn(e,t),ur=!1,kn=St=rr=tn=Ea=He=0,dt=_l=null,cr=!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-gt(n),u=1<<i;t|=e[i],n&=~u}return ua=t,oi(),a}function gf(e,t){re=null,H.H=xl,t===En||t===vi?(t=Mo(),Se=3):t===yu?(t=Mo(),Se=4):Se=t===Vu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,jt=t,fe===null&&(He=1,zi(e,Rt(t,e.current)))}function yf(){var e=bt.current;return e===null?!0:(pe&4194048)===pe?Ot===null:(pe&62914560)===pe||(pe&536870912)!==0?e===Ot:!1}function vf(){var e=H.H;return H.H=xl,e===null?xl:e}function bf(){var e=H.A;return H.A=Wp,e}function Xi(){He=4,Na||(pe&4194048)!==pe&&bt.current!==null||(On=!0),(Ea&134217727)===0&&(tn&134217727)===0||Ae===null||_a(Ae,pe,St,!1)}function mr(e,t,a){var n=xe;xe|=2;var i=vf(),u=bf();(Ae!==e||pe!==t)&&(Gi=null,Dn(e,t)),t=!1;var d=He;e:do try{if(Se!==0&&fe!==null){var m=fe,x=jt;switch(Se){case 8:hr(),d=6;break e;case 3:case 2:case 9:case 6:bt.current===null&&(t=!0);var _=Se;if(Se=0,jt=null,Hn(e,m,x,_),a&&On){d=0;break e}break;default:_=Se,Se=0,jt=null,Hn(e,m,x,_)}}eg(),d=He;break}catch(D){gf(e,D)}while(!0);return t&&e.shellSuspendCounter++,Wt=Qa=null,xe=n,H.H=i,H.A=u,fe===null&&(Ae=null,pe=0,oi()),d}function eg(){for(;fe!==null;)xf(fe)}function tg(e,t){var a=xe;xe|=2;var n=vf(),i=bf();Ae!==e||pe!==t?(Gi=null,Yi=mt()+500,Dn(e,t)):On=Kn(e,t);e:do try{if(Se!==0&&fe!==null){t=fe;var u=jt;t:switch(Se){case 1:Se=0,jt=null,Hn(e,t,u,1);break;case 2:case 9:if(Ro(u)){Se=0,jt=null,jf(t);break}t=function(){Se!==2&&Se!==9||Ae!==e||(Se=7),Vt(e)},u.then(t,t);break e;case 3:Se=7;break e;case 4:Se=5;break e;case 7:Ro(u)?(Se=0,jt=null,jf(t)):(Se=0,jt=null,Hn(e,t,u,7));break;case 5:var d=null;switch(fe.tag){case 26:d=fe.memoizedState;case 5:case 27:var m=fe;if(d?sh(d):m.stateNode.complete){Se=0,jt=null;var x=m.sibling;if(x!==null)fe=x;else{var _=m.return;_!==null?(fe=_,Vi(_)):fe=null}break t}}Se=0,jt=null,Hn(e,t,u,5);break;case 6:Se=0,jt=null,Hn(e,t,u,6);break;case 8:hr(),He=6;break e;default:throw Error(o(462))}}ag();break}catch(D){gf(e,D)}while(!0);return Wt=Qa=null,H.H=n,H.A=i,xe=a,fe!==null?0:(Ae=null,pe=0,oi(),He)}function ag(){for(;fe!==null&&!Em();)xf(fe)}function xf(e){var t=Zd(e.alternate,e,ua);e.memoizedProps=e.pendingProps,t===null?Vi(e):fe=t}function jf(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Hd(a,t,t.pendingProps,t.type,void 0,pe);break;case 11:t=Hd(a,t,t.pendingProps,t.type.render,t.ref,pe);break;case 5:Ru(t);default:Vd(a,t),t=fe=vo(t,ua),t=Zd(a,t,ua)}e.memoizedProps=e.pendingProps,t===null?Vi(e):fe=t}function Hn(e,t,a,n){Wt=Qa=null,Ru(t),Tn=null,fl=0;var i=t.return;try{if(Xp(e,i,t,a,pe)){He=1,zi(e,Rt(a,e.current)),fe=null;return}}catch(u){if(i!==null)throw fe=i,u;He=1,zi(e,Rt(a,e.current)),fe=null;return}t.flags&32768?(ye||n===1?e=!0:On||(pe&536870912)!==0?e=!1:(Na=e=!0,(n===2||n===9||n===3||n===6)&&(n=bt.current,n!==null&&n.tag===13&&(n.flags|=16384))),Sf(t,e)):Vi(t)}function Vi(e){var t=e;do{if((t.flags&32768)!==0){Sf(t,Na);return}e=t.return;var a=Jp(t.alternate,t,ua);if(a!==null){fe=a;return}if(t=t.sibling,t!==null){fe=t;return}fe=t=e}while(t!==null);He===0&&(He=5)}function Sf(e,t){do{var a=$p(e.alternate,e);if(a!==null){a.flags&=32767,fe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){fe=e;return}fe=e=a}while(e!==null);He=6,fe=null}function Cf(e,t,a,n,i,u,d,m,x){e.cancelPendingCommit=null;do Qi();while(Qe!==0);if((xe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=au,Um(e,a,u,d,m,x),e===Ae&&(fe=Ae=null,pe=0),Un=t,wa=e,ra=a,or=u,dr=i,ff=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,sg($l,function(){return _f(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=H.T,H.T=null,i=J.p,J.p=2,d=xe,xe|=4;try{Kp(e,t,a)}finally{xe=d,J.p=i,H.T=n}}Qe=1,Nf(),Ef(),Tf()}}function Nf(){if(Qe===1){Qe=0;var e=wa,t=Un,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=H.T,H.T=null;var n=J.p;J.p=2;var i=xe;xe|=4;try{nf(t,e);var u=Tr,d=ro(e.containerInfo),m=u.focusedElem,x=u.selectionRange;if(d!==m&&m&&m.ownerDocument&&uo(m.ownerDocument.documentElement,m)){if(x!==null&&Ws(m)){var _=x.start,D=x.end;if(D===void 0&&(D=_),"selectionStart"in m)m.selectionStart=_,m.selectionEnd=Math.min(D,m.value.length);else{var L=m.ownerDocument||document,M=L&&L.defaultView||window;if(M.getSelection){var z=M.getSelection(),W=m.textContent.length,ne=Math.min(x.start,W),we=x.end===void 0?ne:Math.min(x.end,W);!z.extend&&ne>we&&(d=we,we=ne,ne=d);var T=so(m,ne),C=so(m,we);if(T&&C&&(z.rangeCount!==1||z.anchorNode!==T.node||z.anchorOffset!==T.offset||z.focusNode!==C.node||z.focusOffset!==C.offset)){var w=L.createRange();w.setStart(T.node,T.offset),z.removeAllRanges(),ne>we?(z.addRange(w),z.extend(C.node,C.offset)):(w.setEnd(C.node,C.offset),z.addRange(w))}}}}for(L=[],z=m;z=z.parentNode;)z.nodeType===1&&L.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<L.length;m++){var B=L[m];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}ls=!!Er,Tr=Er=null}finally{xe=i,J.p=n,H.T=a}}e.current=t,Qe=2}}function Ef(){if(Qe===2){Qe=0;var e=wa,t=Un,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=H.T,H.T=null;var n=J.p;J.p=2;var i=xe;xe|=4;try{Id(e,t.alternate,t)}finally{xe=i,J.p=n,H.T=a}}Qe=3}}function Tf(){if(Qe===4||Qe===3){Qe=0,Tm();var e=wa,t=Un,a=ra,n=ff;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Qe=5:(Qe=0,Un=wa=null,wf(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Ta=null),zs(a),t=t.stateNode,pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot($n,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=H.T,i=J.p,J.p=2,H.T=null;try{for(var u=e.onRecoverableError,d=0;d<n.length;d++){var m=n[d];u(m.value,{componentStack:m.stack})}}finally{H.T=t,J.p=i}}(ra&3)!==0&&Qi(),Vt(e),i=e.pendingLanes,(a&261930)!==0&&(i&42)!==0?e===fr?Rl++:(Rl=0,fr=e):Rl=0,Al(0)}}function wf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ol(t)))}function Qi(){return Nf(),Ef(),Tf(),_f()}function _f(){if(Qe!==5)return!1;var e=wa,t=or;or=0;var a=zs(ra),n=H.T,i=J.p;try{J.p=32>a?32:a,H.T=null,a=dr,dr=null;var u=wa,d=ra;if(Qe=0,Un=wa=null,ra=0,(xe&6)!==0)throw Error(o(331));var m=xe;if(xe|=4,cf(u.current),sf(u,u.current,d,a),xe=m,Al(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot($n,u)}catch{}return!0}finally{J.p=i,H.T=n,wf(e,t)}}function Rf(e,t,a){t=Rt(a,t),t=Xu(e.stateNode,t,2),e=xa(e,t,2),e!==null&&(Fn(e,2),Vt(e))}function Ce(e,t,a){if(e.tag===3)Rf(e,e,a);else for(;t!==null;){if(t.tag===3){Rf(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ta===null||!Ta.has(n))){e=Rt(a,e),a=Rd(2),n=xa(t,a,2),n!==null&&(Ad(a,n,t,e),Fn(n,2),Vt(n));break}}t=t.return}}function pr(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Ip;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)||(ur=!0,i.add(a),e=ng.bind(null,e,t,a),t.then(e,e))}function ng(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ae===e&&(pe&a)===a&&(He===4||He===3&&(pe&62914560)===pe&&300>mt()-qi?(xe&2)===0&&Dn(e,0):rr|=a,kn===pe&&(kn=0)),Vt(e)}function Af(e,t){t===0&&(t=Sc()),e=Za(e,t),e!==null&&(Fn(e,t),Vt(e))}function lg(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Af(e,a)}function ig(e,t){var a=0;switch(e.tag){case 31: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),Af(e,a)}function sg(e,t){return _s(e,t)}var Ji=null,Bn=null,gr=!1,$i=!1,yr=!1,Ra=0;function Vt(e){e!==Bn&&e.next===null&&(Bn===null?Ji=Bn=e:Bn=Bn.next=e),$i=!0,gr||(gr=!0,rg())}function Al(e,t){if(!yr&&$i){yr=!0;do for(var a=!1,n=Ji;n!==null;){if(e!==0){var i=n.pendingLanes;if(i===0)var u=0;else{var d=n.suspendedLanes,m=n.pingedLanes;u=(1<<31-gt(42|e)+1)-1,u&=i&~(d&~m),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,kf(n,u))}else u=pe,u=Il(n,n===Ae?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||Kn(n,u)||(a=!0,kf(n,u));n=n.next}while(a);yr=!1}}function ug(){Mf()}function Mf(){$i=gr=!1;var e=0;Ra!==0&&vg()&&(e=Ra);for(var t=mt(),a=null,n=Ji;n!==null;){var i=n.next,u=zf(n,t);u===0?(n.next=null,a===null?Ji=i:a.next=i,i===null&&(Bn=a)):(a=n,(e!==0||(u&3)!==0)&&($i=!0)),n=i}Qe!==0&&Qe!==5||Al(e),Ra!==0&&(Ra=0)}function zf(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var d=31-gt(u),m=1<<d,x=i[d];x===-1?((m&a)===0||(m&n)!==0)&&(i[d]=km(m,t)):x<=t&&(e.expiredLanes|=m),u&=~m}if(t=Ae,a=pe,a=Il(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Se===2||Se===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Rs(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Kn(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Rs(n),zs(a)){case 2:case 8:a=xc;break;case 32:a=$l;break;case 268435456:a=jc;break;default:a=$l}return n=Of.bind(null,e),a=_s(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Rs(n),e.callbackPriority=2,e.callbackNode=null,2}function Of(e,t){if(Qe!==0&&Qe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Qi()&&e.callbackNode!==a)return null;var n=pe;return n=Il(e,e===Ae?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(mf(e,n,t),zf(e,mt()),e.callbackNode!=null&&e.callbackNode===a?Of.bind(null,e):null)}function kf(e,t){if(Qi())return null;mf(e,t,!0)}function rg(){xg(function(){(xe&6)!==0?_s(bc,ug):Mf()})}function vr(){if(Ra===0){var e=Cn;e===0&&(e=Kl,Kl<<=1,(Kl&261888)===0&&(Kl=256)),Ra=e}return Ra}function Uf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ai(""+e)}function Df(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 cg(e,t,a,n,i){if(t==="submit"&&a&&a.stateNode===i){var u=Uf((i[st]||null).action),d=n.submitter;d&&(t=(t=d[st]||null)?Uf(t.formAction):d.getAttribute("formAction"),t!==null&&(u=t,d=null));var m=new si("action","action",null,n,i);e.push({event:m,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Ra!==0){var x=d?Df(i,d):new FormData(i);Bu(a,{pending:!0,data:x,method:i.method,action:u},null,x)}}else typeof u=="function"&&(m.preventDefault(),x=d?Df(i,d):new FormData(i),Bu(a,{pending:!0,data:x,method:i.method,action:u},u,x))},currentTarget:i}]})}}for(var br=0;br<tu.length;br++){var xr=tu[br],og=xr.toLowerCase(),dg=xr[0].toUpperCase()+xr.slice(1);Ht(og,"on"+dg)}Ht(fo,"onAnimationEnd"),Ht(ho,"onAnimationIteration"),Ht(mo,"onAnimationStart"),Ht("dblclick","onDoubleClick"),Ht("focusin","onFocus"),Ht("focusout","onBlur"),Ht(wp,"onTransitionRun"),Ht(_p,"onTransitionStart"),Ht(Rp,"onTransitionCancel"),Ht(po,"onTransitionEnd"),cn("onMouseEnter",["mouseout","mouseover"]),cn("onMouseLeave",["mouseout","mouseover"]),cn("onPointerEnter",["pointerout","pointerover"]),cn("onPointerLeave",["pointerout","pointerover"]),La("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),La("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),La("onBeforeInput",["compositionend","keypress","textInput","paste"]),La("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),La("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),La("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ml="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(" "),fg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ml));function Hf(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],i=n.event;n=n.listeners;e:{var u=void 0;if(t)for(var d=n.length-1;0<=d;d--){var m=n[d],x=m.instance,_=m.currentTarget;if(m=m.listener,x!==u&&i.isPropagationStopped())break e;u=m,i.currentTarget=_;try{u(i)}catch(D){ci(D)}i.currentTarget=null,u=x}else for(d=0;d<n.length;d++){if(m=n[d],x=m.instance,_=m.currentTarget,m=m.listener,x!==u&&i.isPropagationStopped())break e;u=m,i.currentTarget=_;try{u(i)}catch(D){ci(D)}i.currentTarget=null,u=x}}}}function he(e,t){var a=t[Os];a===void 0&&(a=t[Os]=new Set);var n=e+"__bubble";a.has(n)||(Bf(t,e,2,!1),a.add(n))}function jr(e,t,a){var n=0;t&&(n|=4),Bf(a,e,n,t)}var Ki="_reactListening"+Math.random().toString(36).slice(2);function Sr(e){if(!e[Ki]){e[Ki]=!0,Rc.forEach(function(a){a!=="selectionchange"&&(fg.has(a)||jr(a,!1,e),jr(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ki]||(t[Ki]=!0,jr("selectionchange",!1,t))}}function Bf(e,t,a,n){switch(hh(t)){case 2:var i=qg;break;case 8:i=Yg;break;default:i=Hr}a=i.bind(null,t,a,e),i=void 0,!Gs||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 Cr(e,t,a,n,i){var u=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var d=n.tag;if(d===3||d===4){var m=n.stateNode.containerInfo;if(m===i)break;if(d===4)for(d=n.return;d!==null;){var x=d.tag;if((x===3||x===4)&&d.stateNode.containerInfo===i)return;d=d.return}for(;m!==null;){if(d=sn(m),d===null)return;if(x=d.tag,x===5||x===6||x===26||x===27){n=u=d;continue e}m=m.parentNode}}n=n.return}Yc(function(){var _=u,D=qs(a),L=[];e:{var M=go.get(e);if(M!==void 0){var z=si,W=e;switch(e){case"keypress":if(li(a)===0)break e;case"keydown":case"keyup":z=ip;break;case"focusin":W="focus",z=Qs;break;case"focusout":W="blur",z=Qs;break;case"beforeblur":case"afterblur":z=Qs;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":z=Xc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=Jm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=rp;break;case fo:case ho:case mo:z=Fm;break;case po:z=op;break;case"scroll":case"scrollend":z=Vm;break;case"wheel":z=fp;break;case"copy":case"cut":case"paste":z=Im;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=Qc;break;case"toggle":case"beforetoggle":z=mp}var ne=(t&4)!==0,we=!ne&&(e==="scroll"||e==="scrollend"),T=ne?M!==null?M+"Capture":null:M;ne=[];for(var C=_,w;C!==null;){var B=C;if(w=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||w===null||T===null||(B=Pn(C,T),B!=null&&ne.push(zl(C,B,w))),we)break;C=C.return}0<ne.length&&(M=new z(M,W,null,a,D),L.push({event:M,listeners:ne}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",M&&a!==Ls&&(W=a.relatedTarget||a.fromElement)&&(sn(W)||W[ln]))break e;if((z||M)&&(M=D.window===D?D:(M=D.ownerDocument)?M.defaultView||M.parentWindow:window,z?(W=a.relatedTarget||a.toElement,z=_,W=W?sn(W):null,W!==null&&(we=h(W),ne=W.tag,W!==we||ne!==5&&ne!==27&&ne!==6)&&(W=null)):(z=null,W=_),z!==W)){if(ne=Xc,B="onMouseLeave",T="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(ne=Qc,B="onPointerLeave",T="onPointerEnter",C="pointer"),we=z==null?M:In(z),w=W==null?M:In(W),M=new ne(B,C+"leave",z,a,D),M.target=we,M.relatedTarget=w,B=null,sn(D)===_&&(ne=new ne(T,C+"enter",W,a,D),ne.target=w,ne.relatedTarget=we,B=ne),we=B,z&&W)t:{for(ne=hg,T=z,C=W,w=0,B=T;B;B=ne(B))w++;B=0;for(var te=C;te;te=ne(te))B++;for(;0<w-B;)T=ne(T),w--;for(;0<B-w;)C=ne(C),B--;for(;w--;){if(T===C||C!==null&&T===C.alternate){ne=T;break t}T=ne(T),C=ne(C)}ne=null}else ne=null;z!==null&&Lf(L,M,z,ne,!1),W!==null&&we!==null&&Lf(L,we,W,ne,!0)}}e:{if(M=_?In(_):window,z=M.nodeName&&M.nodeName.toLowerCase(),z==="select"||z==="input"&&M.type==="file")var ve=eo;else if(Ic(M))if(to)ve=Np;else{ve=Sp;var ee=jp}else z=M.nodeName,!z||z.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?_&&Bs(_.elementType)&&(ve=eo):ve=Cp;if(ve&&(ve=ve(e,_))){Pc(L,ve,a,D);break e}ee&&ee(e,M,_),e==="focusout"&&_&&M.type==="number"&&_.memoizedProps.value!=null&&Hs(M,"number",M.value)}switch(ee=_?In(_):window,e){case"focusin":(Ic(ee)||ee.contentEditable==="true")&&(pn=ee,Is=_,ul=null);break;case"focusout":ul=Is=pn=null;break;case"mousedown":Ps=!0;break;case"contextmenu":case"mouseup":case"dragend":Ps=!1,co(L,a,D);break;case"selectionchange":if(Tp)break;case"keydown":case"keyup":co(L,a,D)}var ce;if($s)e:{switch(e){case"compositionstart":var ge="onCompositionStart";break e;case"compositionend":ge="onCompositionEnd";break e;case"compositionupdate":ge="onCompositionUpdate";break e}ge=void 0}else mn?Fc(e,a)&&(ge="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ge="onCompositionStart");ge&&(Jc&&a.locale!=="ko"&&(mn||ge!=="onCompositionStart"?ge==="onCompositionEnd"&&mn&&(ce=Gc()):(ha=D,Zs="value"in ha?ha.value:ha.textContent,mn=!0)),ee=Fi(_,ge),0<ee.length&&(ge=new Vc(ge,e,null,a,D),L.push({event:ge,listeners:ee}),ce?ge.data=ce:(ce=Wc(a),ce!==null&&(ge.data=ce)))),(ce=gp?yp(e,a):vp(e,a))&&(ge=Fi(_,"onBeforeInput"),0<ge.length&&(ee=new Vc("onBeforeInput","beforeinput",null,a,D),L.push({event:ee,listeners:ge}),ee.data=ce)),cg(L,e,_,a,D)}Hf(L,t)})}function zl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Fi(e,t){for(var a=t+"Capture",n=[];e!==null;){var i=e,u=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||u===null||(i=Pn(e,a),i!=null&&n.unshift(zl(e,i,u)),i=Pn(e,t),i!=null&&n.push(zl(e,i,u))),e.tag===3)return n;e=e.return}return[]}function hg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Lf(e,t,a,n,i){for(var u=t._reactName,d=[];a!==null&&a!==n;){var m=a,x=m.alternate,_=m.stateNode;if(m=m.tag,x!==null&&x===n)break;m!==5&&m!==26&&m!==27||_===null||(x=_,i?(_=Pn(a,u),_!=null&&d.unshift(zl(a,_,x))):i||(_=Pn(a,u),_!=null&&d.push(zl(a,_,x)))),a=a.return}d.length!==0&&e.push({event:t,listeners:d})}var mg=/\r\n?/g,pg=/\u0000|\uFFFD/g;function qf(e){return(typeof e=="string"?e:""+e).replace(mg,`
|
|
49
|
-
`).replace(pg,"")}function Yf(e,t){return t=qf(t),qf(e)===t}function Te(e,t,a,n,i,u){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||dn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&dn(e,""+n);break;case"className":ei(e,"class",n);break;case"tabIndex":ei(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":ei(e,a,n);break;case"style":Lc(e,n,u);break;case"data":if(t!=="object"){ei(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=ai(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(a==="formAction"?(t!=="input"&&Te(e,t,"name",i.name,i,null),Te(e,t,"formEncType",i.formEncType,i,null),Te(e,t,"formMethod",i.formMethod,i,null),Te(e,t,"formTarget",i.formTarget,i,null)):(Te(e,t,"encType",i.encType,i,null),Te(e,t,"method",i.method,i,null),Te(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=ai(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Jt);break;case"onScroll":n!=null&&he("scroll",e);break;case"onScrollEnd":n!=null&&he("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=ai(""+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":he("beforetoggle",e),he("toggle",e),Pl(e,"popover",n);break;case"xlinkActuate":Qt(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Qt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Qt(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Qt(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Qt(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Qt(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Pl(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=Zm.get(a)||a,Pl(e,a,n))}}function Nr(e,t,a,n,i,u){switch(a){case"style":Lc(e,n,u);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof n=="string"?dn(e,n):(typeof n=="number"||typeof n=="bigint")&&dn(e,""+n);break;case"onScroll":n!=null&&he("scroll",e);break;case"onScrollEnd":n!=null&&he("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Jt);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),u=e[st]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,i),typeof n=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,i);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Pl(e,a,n)}}}function Pe(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":he("error",e),he("load",e);var n=!1,i=!1,u;for(u in a)if(a.hasOwnProperty(u)){var d=a[u];if(d!=null)switch(u){case"src":n=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Te(e,t,u,d,a,null)}}i&&Te(e,t,"srcSet",a.srcSet,a,null),n&&Te(e,t,"src",a.src,a,null);return;case"input":he("invalid",e);var m=u=d=i=null,x=null,_=null;for(n in a)if(a.hasOwnProperty(n)){var D=a[n];if(D!=null)switch(n){case"name":i=D;break;case"type":d=D;break;case"checked":x=D;break;case"defaultChecked":_=D;break;case"value":u=D;break;case"defaultValue":m=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(o(137,t));break;default:Te(e,t,n,D,a,null)}}Uc(e,u,m,x,_,d,i,!1);return;case"select":he("invalid",e),n=d=u=null;for(i in a)if(a.hasOwnProperty(i)&&(m=a[i],m!=null))switch(i){case"value":u=m;break;case"defaultValue":d=m;break;case"multiple":n=m;default:Te(e,t,i,m,a,null)}t=u,a=d,e.multiple=!!n,t!=null?on(e,!!n,t,!1):a!=null&&on(e,!!n,a,!0);return;case"textarea":he("invalid",e),u=i=n=null;for(d in a)if(a.hasOwnProperty(d)&&(m=a[d],m!=null))switch(d){case"value":n=m;break;case"defaultValue":i=m;break;case"children":u=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(o(91));break;default:Te(e,t,d,m,a,null)}Hc(e,n,i,u);return;case"option":for(x in a)if(a.hasOwnProperty(x)&&(n=a[x],n!=null))switch(x){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:Te(e,t,x,n,a,null)}return;case"dialog":he("beforetoggle",e),he("toggle",e),he("cancel",e),he("close",e);break;case"iframe":case"object":he("load",e);break;case"video":case"audio":for(n=0;n<Ml.length;n++)he(Ml[n],e);break;case"image":he("error",e),he("load",e);break;case"details":he("toggle",e);break;case"embed":case"source":case"link":he("error",e),he("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:Te(e,t,_,n,a,null)}return;default:if(Bs(t)){for(D in a)a.hasOwnProperty(D)&&(n=a[D],n!==void 0&&Nr(e,t,D,n,a,void 0));return}}for(m in a)a.hasOwnProperty(m)&&(n=a[m],n!=null&&Te(e,t,m,n,a,null))}function gg(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,u=null,d=null,m=null,x=null,_=null,D=null;for(z in a){var L=a[z];if(a.hasOwnProperty(z)&&L!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":x=L;default:n.hasOwnProperty(z)||Te(e,t,z,null,n,L)}}for(var M in n){var z=n[M];if(L=a[M],n.hasOwnProperty(M)&&(z!=null||L!=null))switch(M){case"type":u=z;break;case"name":i=z;break;case"checked":_=z;break;case"defaultChecked":D=z;break;case"value":d=z;break;case"defaultValue":m=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(137,t));break;default:z!==L&&Te(e,t,M,z,n,L)}}Ds(e,d,m,x,_,D,u,i);return;case"select":z=d=m=M=null;for(u in a)if(x=a[u],a.hasOwnProperty(u)&&x!=null)switch(u){case"value":break;case"multiple":z=x;default:n.hasOwnProperty(u)||Te(e,t,u,null,n,x)}for(i in n)if(u=n[i],x=a[i],n.hasOwnProperty(i)&&(u!=null||x!=null))switch(i){case"value":M=u;break;case"defaultValue":m=u;break;case"multiple":d=u;default:u!==x&&Te(e,t,i,u,n,x)}t=m,a=d,n=z,M!=null?on(e,!!a,M,!1):!!n!=!!a&&(t!=null?on(e,!!a,t,!0):on(e,!!a,a?[]:"",!1));return;case"textarea":z=M=null;for(m in a)if(i=a[m],a.hasOwnProperty(m)&&i!=null&&!n.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Te(e,t,m,null,n,i)}for(d in n)if(i=n[d],u=a[d],n.hasOwnProperty(d)&&(i!=null||u!=null))switch(d){case"value":M=i;break;case"defaultValue":z=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==u&&Te(e,t,d,i,n,u)}Dc(e,M,z);return;case"option":for(var W in a)if(M=a[W],a.hasOwnProperty(W)&&M!=null&&!n.hasOwnProperty(W))switch(W){case"selected":e.selected=!1;break;default:Te(e,t,W,null,n,M)}for(x in n)if(M=n[x],z=a[x],n.hasOwnProperty(x)&&M!==z&&(M!=null||z!=null))switch(x){case"selected":e.selected=M&&typeof M!="function"&&typeof M!="symbol";break;default:Te(e,t,x,M,n,z)}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 ne in a)M=a[ne],a.hasOwnProperty(ne)&&M!=null&&!n.hasOwnProperty(ne)&&Te(e,t,ne,null,n,M);for(_ in n)if(M=n[_],z=a[_],n.hasOwnProperty(_)&&M!==z&&(M!=null||z!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(o(137,t));break;default:Te(e,t,_,M,n,z)}return;default:if(Bs(t)){for(var we in a)M=a[we],a.hasOwnProperty(we)&&M!==void 0&&!n.hasOwnProperty(we)&&Nr(e,t,we,void 0,n,M);for(D in n)M=n[D],z=a[D],!n.hasOwnProperty(D)||M===z||M===void 0&&z===void 0||Nr(e,t,D,M,n,z);return}}for(var T in a)M=a[T],a.hasOwnProperty(T)&&M!=null&&!n.hasOwnProperty(T)&&Te(e,t,T,null,n,M);for(L in n)M=n[L],z=a[L],!n.hasOwnProperty(L)||M===z||M==null&&z==null||Te(e,t,L,M,n,z)}function Gf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function yg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var i=a[n],u=i.transferSize,d=i.initiatorType,m=i.duration;if(u&&m&&Gf(d)){for(d=0,m=i.responseEnd,n+=1;n<a.length;n++){var x=a[n],_=x.startTime;if(_>m)break;var D=x.transferSize,L=x.initiatorType;D&&Gf(L)&&(x=x.responseEnd,d+=D*(x<m?1:(m-_)/(x-_)))}if(--n,t+=8*(u+d)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Er=null,Tr=null;function Wi(e){return e.nodeType===9?e:e.ownerDocument}function Zf(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 Xf(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 wr(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 _r=null;function vg(){var e=window.event;return e&&e.type==="popstate"?e===_r?!1:(_r=e,!0):(_r=null,!1)}var Vf=typeof setTimeout=="function"?setTimeout:void 0,bg=typeof clearTimeout=="function"?clearTimeout:void 0,Qf=typeof Promise=="function"?Promise:void 0,xg=typeof queueMicrotask=="function"?queueMicrotask:typeof Qf<"u"?function(e){return Qf.resolve(null).then(e).catch(jg)}:Vf;function jg(e){setTimeout(function(){throw e})}function Aa(e){return e==="head"}function Jf(e,t){var a=t,n=0;do{var i=a.nextSibling;if(e.removeChild(a),i&&i.nodeType===8)if(a=i.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(i),Gn(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")Ol(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ol(a);for(var u=a.firstChild;u;){var d=u.nextSibling,m=u.nodeName;u[Wn]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=d}}else a==="body"&&Ol(e.ownerDocument.body);a=i}while(a);Gn(t)}function $f(e,t){var a=e;e=0;do{var n=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function Rr(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":Rr(a),ks(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Sg(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[Wn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=kt(e.nextSibling),e===null)break}return null}function Cg(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=kt(e.nextSibling),e===null))return null;return e}function Kf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=kt(e.nextSibling),e===null))return null;return e}function Ar(e){return e.data==="$?"||e.data==="$~"}function Mr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ng(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function kt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var zr=null;function Ff(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return kt(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Wf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function If(e,t,a){switch(t=Wi(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 Ol(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ks(e)}var Ut=new Map,Pf=new Set;function Ii(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ca=J.d;J.d={f:Eg,r:Tg,D:wg,C:_g,L:Rg,m:Ag,X:zg,S:Mg,M:Og};function Eg(){var e=ca.f(),t=Zi();return e||t}function Tg(e){var t=un(e);t!==null&&t.tag===5&&t.type==="form"?pd(t):ca.r(e)}var Ln=typeof document>"u"?null:document;function eh(e,t,a){var n=Ln;if(n&&typeof t=="string"&&t){var i=wt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),Pf.has(i)||(Pf.add(i),e={rel:e,crossOrigin:a,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),Pe(t,"link",e),Je(t),n.head.appendChild(t)))}}function wg(e){ca.D(e),eh("dns-prefetch",e,null)}function _g(e,t){ca.C(e,t),eh("preconnect",e,t)}function Rg(e,t,a){ca.L(e,t,a);var n=Ln;if(n&&e&&t){var i='link[rel="preload"][as="'+wt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+wt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+wt(a.imageSizes)+'"]')):i+='[href="'+wt(e)+'"]';var u=i;switch(t){case"style":u=qn(e);break;case"script":u=Yn(e)}Ut.has(u)||(e=j({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ut.set(u,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(kl(u))||t==="script"&&n.querySelector(Ul(u))||(t=n.createElement("link"),Pe(t,"link",e),Je(t),n.head.appendChild(t)))}}function Ag(e,t){ca.m(e,t);var a=Ln;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+wt(n)+'"][href="'+wt(e)+'"]',u=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Yn(e)}if(!Ut.has(u)&&(e=j({rel:"modulepreload",href:e},t),Ut.set(u,e),a.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ul(u)))return}n=a.createElement("link"),Pe(n,"link",e),Je(n),a.head.appendChild(n)}}}function Mg(e,t,a){ca.S(e,t,a);var n=Ln;if(n&&e){var i=rn(n).hoistableStyles,u=qn(e);t=t||"default";var d=i.get(u);if(!d){var m={loading:0,preload:null};if(d=n.querySelector(kl(u)))m.loading=5;else{e=j({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ut.get(u))&&Or(e,a);var x=d=n.createElement("link");Je(x),Pe(x,"link",e),x._p=new Promise(function(_,D){x.onload=_,x.onerror=D}),x.addEventListener("load",function(){m.loading|=1}),x.addEventListener("error",function(){m.loading|=2}),m.loading|=4,Pi(d,t,n)}d={type:"stylesheet",instance:d,count:1,state:m},i.set(u,d)}}}function zg(e,t){ca.X(e,t);var a=Ln;if(a&&e){var n=rn(a).hoistableScripts,i=Yn(e),u=n.get(i);u||(u=a.querySelector(Ul(i)),u||(e=j({src:e,async:!0},t),(t=Ut.get(i))&&kr(e,t),u=a.createElement("script"),Je(u),Pe(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(i,u))}}function Og(e,t){ca.M(e,t);var a=Ln;if(a&&e){var n=rn(a).hoistableScripts,i=Yn(e),u=n.get(i);u||(u=a.querySelector(Ul(i)),u||(e=j({src:e,async:!0,type:"module"},t),(t=Ut.get(i))&&kr(e,t),u=a.createElement("script"),Je(u),Pe(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(i,u))}}function th(e,t,a,n){var i=(i=de.current)?Ii(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=qn(a.href),a=rn(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=qn(a.href);var u=rn(i).hoistableStyles,d=u.get(e);if(d||(i=i.ownerDocument||i,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=i.querySelector(kl(e)))&&!u._p&&(d.instance=u,d.state.loading=5),Ut.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},Ut.set(e,a),u||kg(i,e,a,d.state))),t&&n===null)throw Error(o(528,""));return d}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=Yn(a),a=rn(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 qn(e){return'href="'+wt(e)+'"'}function kl(e){return'link[rel="stylesheet"]['+e+"]"}function ah(e){return j({},e,{"data-precedence":e.precedence,precedence:null})}function kg(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}),Pe(t,"link",a),Je(t),e.head.appendChild(t))}function Yn(e){return'[src="'+wt(e)+'"]'}function Ul(e){return"script[async]"+e}function nh(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+wt(a.href)+'"]');if(n)return t.instance=n,Je(n),n;var i=j({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Je(n),Pe(n,"style",i),Pi(n,a.precedence,e),t.instance=n;case"stylesheet":i=qn(a.href);var u=e.querySelector(kl(i));if(u)return t.state.loading|=4,t.instance=u,Je(u),u;n=ah(a),(i=Ut.get(i))&&Or(n,i),u=(e.ownerDocument||e).createElement("link"),Je(u);var d=u;return d._p=new Promise(function(m,x){d.onload=m,d.onerror=x}),Pe(u,"link",n),t.state.loading|=4,Pi(u,a.precedence,e),t.instance=u;case"script":return u=Yn(a.src),(i=e.querySelector(Ul(u)))?(t.instance=i,Je(i),i):(n=a,(i=Ut.get(u))&&(n=j({},a),kr(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),Je(i),Pe(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,Pi(n,a.precedence,e));return t.instance}function Pi(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,u=i,d=0;d<n.length;d++){var m=n[d];if(m.dataset.precedence===t)u=m;else if(u!==i)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Or(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function kr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var es=null;function lh(e,t,a){if(es===null){var n=new Map,i=es=new Map;i.set(a,n)}else i=es,n=i.get(a),n||(n=new Map,i.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),i=0;i<a.length;i++){var u=a[i];if(!(u[Wn]||u[Ke]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var d=u.getAttribute(t)||"";d=e+d;var m=n.get(d);m?m.push(u):n.set(d,[u])}}return n}function ih(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Ug(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 sh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Dg(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var i=qn(n.href),u=t.querySelector(kl(i));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ts.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,Je(u);return}u=t.ownerDocument||t,n=ah(n),(i=Ut.get(i))&&Or(n,i),u=u.createElement("link"),Je(u);var d=u;d._p=new Promise(function(m,x){d.onload=m,d.onerror=x}),Pe(u,"link",n),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ts.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Ur=0;function Hg(e,t){return e.stylesheets&&e.count===0&&ns(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&ns(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Ur===0&&(Ur=62500*yg());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ns(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Ur?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(i)}}:null}function ts(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ns(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var as=null;function ns(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,as=new Map,t.forEach(Bg,e),as=null,ts.call(e))}function Bg(e,t){if(!(t.state.loading&4)){var a=as.get(e);if(a)var n=a.get(null);else{a=new Map,as.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<i.length;u++){var d=i[u];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(a.set(d.dataset.precedence,d),n=d)}n&&a.set(null,n)}i=t.instance,d=i.getAttribute("data-precedence"),u=a.get(d)||n,u===n&&a.set(null,i),a.set(d,i),this.count++,n=ts.bind(this),i.addEventListener("load",n),i.addEventListener("error",n),u?u.parentNode.insertBefore(i,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Dl={$$typeof:V,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function Lg(e,t,a,n,i,u,d,m,x){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=As(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=As(0),this.hiddenUpdates=As(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=u,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function uh(e,t,a,n,i,u,d,m,x,_,D,L){return e=new Lg(e,t,a,d,x,_,D,L,m),t=1,u===!0&&(t|=24),u=vt(3,null,null,t),e.current=u,u.stateNode=e,t=mu(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:n,isDehydrated:a,cache:t},vu(u),e}function rh(e){return e?(e=vn,e):vn}function ch(e,t,a,n,i,u){i=rh(i),n.context===null?n.context=i:n.pendingContext=i,n=ba(t),n.payload={element:a},u=u===void 0?null:u,u!==null&&(n.callback=u),a=xa(e,n,t),a!==null&&(ft(a,e,t),ml(a,e,t))}function oh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Dr(e,t){oh(e,t),(e=e.alternate)&&oh(e,t)}function dh(e){if(e.tag===13||e.tag===31){var t=Za(e,67108864);t!==null&&ft(t,e,67108864),Dr(e,67108864)}}function fh(e){if(e.tag===13||e.tag===31){var t=Ct();t=Ms(t);var a=Za(e,t);a!==null&&ft(a,e,t),Dr(e,t)}}var ls=!0;function qg(e,t,a,n){var i=H.T;H.T=null;var u=J.p;try{J.p=2,Hr(e,t,a,n)}finally{J.p=u,H.T=i}}function Yg(e,t,a,n){var i=H.T;H.T=null;var u=J.p;try{J.p=8,Hr(e,t,a,n)}finally{J.p=u,H.T=i}}function Hr(e,t,a,n){if(ls){var i=Br(n);if(i===null)Cr(e,t,n,is,a),mh(e,n);else if(Zg(i,e,t,a,n))n.stopPropagation();else if(mh(e,n),t&4&&-1<Gg.indexOf(e)){for(;i!==null;){var u=un(i);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var d=Ba(u.pendingLanes);if(d!==0){var m=u;for(m.pendingLanes|=2,m.entangledLanes|=2;d;){var x=1<<31-gt(d);m.entanglements[1]|=x,d&=~x}Vt(u),(xe&6)===0&&(Yi=mt()+500,Al(0))}}break;case 31:case 13:m=Za(u,2),m!==null&&ft(m,u,2),Zi(),Dr(u,2)}if(u=Br(n),u===null&&Cr(e,t,n,is,a),u===i)break;i=u}i!==null&&n.stopPropagation()}else Cr(e,t,n,null,a)}}function Br(e){return e=qs(e),Lr(e)}var is=null;function Lr(e){if(is=null,e=sn(e),e!==null){var t=h(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=y(t),e!==null)return e;e=null}else if(a===31){if(e=v(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 is=e,null}function hh(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(wm()){case bc:return 2;case xc:return 8;case $l:case _m:return 32;case jc:return 268435456;default:return 32}default:return 32}}var qr=!1,Ma=null,za=null,Oa=null,Hl=new Map,Bl=new Map,ka=[],Gg="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 mh(e,t){switch(e){case"focusin":case"focusout":Ma=null;break;case"dragenter":case"dragleave":za=null;break;case"mouseover":case"mouseout":Oa=null;break;case"pointerover":case"pointerout":Hl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bl.delete(t.pointerId)}}function Ll(e,t,a,n,i,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:u,targetContainers:[i]},t!==null&&(t=un(t),t!==null&&dh(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Zg(e,t,a,n,i){switch(t){case"focusin":return Ma=Ll(Ma,e,t,a,n,i),!0;case"dragenter":return za=Ll(za,e,t,a,n,i),!0;case"mouseover":return Oa=Ll(Oa,e,t,a,n,i),!0;case"pointerover":var u=i.pointerId;return Hl.set(u,Ll(Hl.get(u)||null,e,t,a,n,i)),!0;case"gotpointercapture":return u=i.pointerId,Bl.set(u,Ll(Bl.get(u)||null,e,t,a,n,i)),!0}return!1}function ph(e){var t=sn(e.target);if(t!==null){var a=h(t);if(a!==null){if(t=a.tag,t===13){if(t=y(a),t!==null){e.blockedOn=t,wc(e.priority,function(){fh(a)});return}}else if(t===31){if(t=v(a),t!==null){e.blockedOn=t,wc(e.priority,function(){fh(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ss(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Br(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Ls=n,a.target.dispatchEvent(n),Ls=null}else return t=un(a),t!==null&&dh(t),e.blockedOn=a,!1;t.shift()}return!0}function gh(e,t,a){ss(e)&&a.delete(t)}function Xg(){qr=!1,Ma!==null&&ss(Ma)&&(Ma=null),za!==null&&ss(za)&&(za=null),Oa!==null&&ss(Oa)&&(Oa=null),Hl.forEach(gh),Bl.forEach(gh)}function us(e,t){e.blockedOn===t&&(e.blockedOn=null,qr||(qr=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Xg)))}var rs=null;function yh(e){rs!==e&&(rs=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){rs===e&&(rs=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(Lr(n||a)===null)continue;break}var u=un(a);u!==null&&(e.splice(t,3),t-=3,Bu(u,{pending:!0,data:i,method:a.method,action:n},n,i))}}))}function Gn(e){function t(x){return us(x,e)}Ma!==null&&us(Ma,e),za!==null&&us(za,e),Oa!==null&&us(Oa,e),Hl.forEach(t),Bl.forEach(t);for(var a=0;a<ka.length;a++){var n=ka[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<ka.length&&(a=ka[0],a.blockedOn===null);)ph(a),a.blockedOn===null&&ka.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var i=a[n],u=a[n+1],d=i[st]||null;if(typeof u=="function")d||yh(a);else if(d){var m=null;if(u&&u.hasAttribute("formAction")){if(i=u,d=u[st]||null)m=d.formAction;else if(Lr(i)!==null)continue}else m=d.action;typeof m=="function"?a[n+1]=m:(a.splice(n,3),n-=3),yh(a)}}}function vh(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(d){return i=d})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Yr(e){this._internalRoot=e}cs.prototype.render=Yr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=Ct();ch(a,n,e,t,null,null)},cs.prototype.unmount=Yr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ch(e.current,2,null,e,null,null),Zi(),t[ln]=null}};function cs(e){this._internalRoot=e}cs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Tc();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ka.length&&t!==0&&t<ka[a].priority;a++);ka.splice(a,0,e),a===0&&ph(e)}};var bh=r.version;if(bh!=="19.2.5")throw Error(o(527,bh,"19.2.5"));J.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=g(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var Vg={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var os=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!os.isDisabled&&os.supportsFiber)try{$n=os.inject(Vg),pt=os}catch{}}return Yl.createRoot=function(e,t){if(!f(e))throw Error(o(299));var a=!1,n="",i=Ed,u=Td,d=wd;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=uh(e,1,!1,null,null,a,n,null,i,u,d,vh),e[ln]=t.current,Sr(e),new Yr(t)},Yl.hydrateRoot=function(e,t,a){if(!f(e))throw Error(o(299));var n=!1,i="",u=Ed,d=Td,m=wd,x=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(i=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(d=a.onCaughtError),a.onRecoverableError!==void 0&&(m=a.onRecoverableError),a.formState!==void 0&&(x=a.formState)),t=uh(e,1,!0,t,a??null,n,i,x,u,d,m,vh),t.context=rh(null),a=t.current,n=Ct(),n=Ms(n),i=ba(n),i.callback=null,xa(a,i,n),a=n,t.current.lanes=a,Fn(t,a),Vt(t),e[ln]=t.current,Sr(e),new cs(t)},Yl.version="19.2.5",Yl}var Rh;function t1(){if(Rh)return Xr.exports;Rh=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),Xr.exports=e1(),Xr.exports}var a1=t1();/**
|
|
50
|
-
* react-router v7.14.2
|
|
51
|
-
*
|
|
52
|
-
* Copyright (c) Remix Software Inc.
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the MIT license found in the
|
|
55
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
-
*
|
|
57
|
-
* @license MIT
|
|
58
|
-
*/var Ah="popstate";function Mh(l){return typeof l=="object"&&l!=null&&"pathname"in l&&"search"in l&&"hash"in l&&"state"in l&&"key"in l}function n1(l={}){function r(o,f){var g;let h=(g=f.state)==null?void 0:g.masked,{pathname:y,search:v,hash:p}=h||o.location;return ac("",{pathname:y,search:v,hash:p},f.state&&f.state.usr||null,f.state&&f.state.key||"default",h?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function c(o,f){return typeof f=="string"?f:Xl(f)}return i1(r,c,null,l)}function Ue(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function Dt(l,r){if(!l){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function l1(){return Math.random().toString(36).substring(2,10)}function zh(l,r){return{usr:l.state,key:l.key,idx:r,masked:l.unstable_mask?{pathname:l.pathname,search:l.search,hash:l.hash}:void 0}}function ac(l,r,c=null,o,f){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof r=="string"?Zn(r):r,state:c,key:r&&r.key||o||l1(),unstable_mask:f}}function Xl({pathname:l="/",search:r="",hash:c=""}){return r&&r!=="?"&&(l+=r.charAt(0)==="?"?r:"?"+r),c&&c!=="#"&&(l+=c.charAt(0)==="#"?c:"#"+c),l}function Zn(l){let r={};if(l){let c=l.indexOf("#");c>=0&&(r.hash=l.substring(c),l=l.substring(0,c));let o=l.indexOf("?");o>=0&&(r.search=l.substring(o),l=l.substring(0,o)),l&&(r.pathname=l)}return r}function i1(l,r,c,o={}){let{window:f=document.defaultView,v5Compat:h=!1}=o,y=f.history,v="POP",p=null,g=S();g==null&&(g=0,y.replaceState({...y.state,idx:g},""));function S(){return(y.state||{idx:null}).idx}function j(){v="POP";let Y=S(),Z=Y==null?null:Y-g;g=Y,p&&p({action:v,location:k.location,delta:Z})}function O(Y,Z){v="PUSH";let G=Mh(Y)?Y:ac(k.location,Y,Z);g=S()+1;let V=zh(G,g),ae=k.createHref(G.unstable_mask||G);try{y.pushState(V,"",ae)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;f.location.assign(ae)}h&&p&&p({action:v,location:k.location,delta:1})}function A(Y,Z){v="REPLACE";let G=Mh(Y)?Y:ac(k.location,Y,Z);g=S();let V=zh(G,g),ae=k.createHref(G.unstable_mask||G);y.replaceState(V,"",ae),h&&p&&p({action:v,location:k.location,delta:0})}function R(Y){return s1(Y)}let k={get action(){return v},get location(){return l(f,y)},listen(Y){if(p)throw new Error("A history only accepts one active listener");return f.addEventListener(Ah,j),p=Y,()=>{f.removeEventListener(Ah,j),p=null}},createHref(Y){return r(f,Y)},createURL:R,encodeLocation(Y){let Z=R(Y);return{pathname:Z.pathname,search:Z.search,hash:Z.hash}},push:O,replace:A,go(Y){return y.go(Y)}};return k}function s1(l,r=!1){let c="http://localhost";typeof window<"u"&&(c=window.location.origin!=="null"?window.location.origin:window.location.href),Ue(c,"No window.location.(origin|href) available to create URL");let o=typeof l=="string"?l:Xl(l);return o=o.replace(/ $/,"%20"),!r&&o.startsWith("//")&&(o=c+o),new URL(o,c)}function Jh(l,r,c="/"){return u1(l,r,c,!1)}function u1(l,r,c,o){let f=typeof r=="string"?Zn(r):r,h=oa(f.pathname||"/",c);if(h==null)return null;let y=$h(l);r1(y);let v=null;for(let p=0;v==null&&p<y.length;++p){let g=b1(h);v=y1(y[p],g,o)}return v}function $h(l,r=[],c=[],o="",f=!1){let h=(y,v,p=f,g)=>{let S={relativePath:g===void 0?y.path||"":g,caseSensitive:y.caseSensitive===!0,childrenIndex:v,route:y};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(o)&&p)return;Ue(S.relativePath.startsWith(o),`Absolute route path "${S.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(o.length)}let j=qt([o,S.relativePath]),O=c.concat(S);y.children&&y.children.length>0&&(Ue(y.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${j}".`),$h(y.children,r,O,j,p)),!(y.path==null&&!y.index)&&r.push({path:j,score:p1(j,y.index),routesMeta:O})};return l.forEach((y,v)=>{var p;if(y.path===""||!((p=y.path)!=null&&p.includes("?")))h(y,v);else for(let g of Kh(y.path))h(y,v,!0,g)}),r}function Kh(l){let r=l.split("/");if(r.length===0)return[];let[c,...o]=r,f=c.endsWith("?"),h=c.replace(/\?$/,"");if(o.length===0)return f?[h,""]:[h];let y=Kh(o.join("/")),v=[];return v.push(...y.map(p=>p===""?h:[h,p].join("/"))),f&&v.push(...y),v.map(p=>l.startsWith("/")&&p===""?"/":p)}function r1(l){l.sort((r,c)=>r.score!==c.score?c.score-r.score:g1(r.routesMeta.map(o=>o.childrenIndex),c.routesMeta.map(o=>o.childrenIndex)))}var c1=/^:[\w-]+$/,o1=3,d1=2,f1=1,h1=10,m1=-2,Oh=l=>l==="*";function p1(l,r){let c=l.split("/"),o=c.length;return c.some(Oh)&&(o+=m1),r&&(o+=d1),c.filter(f=>!Oh(f)).reduce((f,h)=>f+(c1.test(h)?o1:h===""?f1:h1),o)}function g1(l,r){return l.length===r.length&&l.slice(0,-1).every((o,f)=>o===r[f])?l[l.length-1]-r[r.length-1]:0}function y1(l,r,c=!1){let{routesMeta:o}=l,f={},h="/",y=[];for(let v=0;v<o.length;++v){let p=o[v],g=v===o.length-1,S=h==="/"?r:r.slice(h.length)||"/",j=ps({path:p.relativePath,caseSensitive:p.caseSensitive,end:g},S),O=p.route;if(!j&&g&&c&&!o[o.length-1].route.index&&(j=ps({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},S)),!j)return null;Object.assign(f,j.params),y.push({params:f,pathname:qt([h,j.pathname]),pathnameBase:C1(qt([h,j.pathnameBase])),route:O}),j.pathnameBase!=="/"&&(h=qt([h,j.pathnameBase]))}return y}function ps(l,r){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[c,o]=v1(l.path,l.caseSensitive,l.end),f=r.match(c);if(!f)return null;let h=f[0],y=h.replace(/(.)\/+$/,"$1"),v=f.slice(1);return{params:o.reduce((g,{paramName:S,isOptional:j},O)=>{if(S==="*"){let R=v[O]||"";y=h.slice(0,h.length-R.length).replace(/(.)\/+$/,"$1")}const A=v[O];return j&&!A?g[S]=void 0:g[S]=(A||"").replace(/%2F/g,"/"),g},{}),pathname:h,pathnameBase:y,pattern:l}}function v1(l,r=!1,c=!0){Dt(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=[],f="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(y,v,p,g,S)=>{if(o.push({paramName:v,isOptional:p!=null}),p){let j=S.charAt(g+y.length);return j&&j!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(o.push({paramName:"*"}),f+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):c?f+="\\/*$":l!==""&&l!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,r?void 0:"i"),o]}function b1(l){try{return l.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Dt(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),l}}function oa(l,r){if(r==="/")return l;if(!l.toLowerCase().startsWith(r.toLowerCase()))return null;let c=r.endsWith("/")?r.length-1:r.length,o=l.charAt(c);return o&&o!=="/"?null:l.slice(c)||"/"}var x1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function j1(l,r="/"){let{pathname:c,search:o="",hash:f=""}=typeof l=="string"?Zn(l):l,h;return c?(c=Fh(c),c.startsWith("/")?h=kh(c.substring(1),"/"):h=kh(c,r)):h=r,{pathname:h,search:N1(o),hash:E1(f)}}function kh(l,r){let c=gs(r).split("/");return l.split("/").forEach(f=>{f===".."?c.length>1&&c.pop():f!=="."&&c.push(f)}),c.length>1?c.join("/"):"/"}function $r(l,r,c,o){return`Cannot include a '${l}' character in a manually specified \`to.${r}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${c}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function S1(l){return l.filter((r,c)=>c===0||r.route.path&&r.route.path.length>0)}function uc(l){let r=S1(l);return r.map((c,o)=>o===r.length-1?c.pathname:c.pathnameBase)}function bs(l,r,c,o=!1){let f;typeof l=="string"?f=Zn(l):(f={...l},Ue(!f.pathname||!f.pathname.includes("?"),$r("?","pathname","search",f)),Ue(!f.pathname||!f.pathname.includes("#"),$r("#","pathname","hash",f)),Ue(!f.search||!f.search.includes("#"),$r("#","search","hash",f)));let h=l===""||f.pathname==="",y=h?"/":f.pathname,v;if(y==null)v=c;else{let j=r.length-1;if(!o&&y.startsWith("..")){let O=y.split("/");for(;O[0]==="..";)O.shift(),j-=1;f.pathname=O.join("/")}v=j>=0?r[j]:"/"}let p=j1(f,v),g=y&&y!=="/"&&y.endsWith("/"),S=(h||y===".")&&c.endsWith("/");return!p.pathname.endsWith("/")&&(g||S)&&(p.pathname+="/"),p}var Fh=l=>l.replace(/\/\/+/g,"/"),qt=l=>Fh(l.join("/")),gs=l=>l.replace(/\/+$/,""),C1=l=>gs(l).replace(/^\/*/,"/"),N1=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,E1=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,T1=class{constructor(l,r,c,o=!1){this.status=l,this.statusText=r||"",this.internal=o,c instanceof Error?(this.data=c.toString(),this.error=c):this.data=c}};function w1(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function _1(l){let r=l.map(c=>c.route.path).filter(Boolean);return qt(r)||"/"}var Wh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ih(l,r){let c=l;if(typeof c!="string"||!x1.test(c))return{absoluteURL:void 0,isExternal:!1,to:c};let o=c,f=!1;if(Wh)try{let h=new URL(window.location.href),y=c.startsWith("//")?new URL(h.protocol+c):new URL(c),v=oa(y.pathname,r);y.origin===h.origin&&v!=null?c=v+y.search+y.hash:f=!0}catch{Dt(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:f,to:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ph=["POST","PUT","PATCH","DELETE"];new Set(Ph);var R1=["GET",...Ph];new Set(R1);var Xn=b.createContext(null);Xn.displayName="DataRouter";var xs=b.createContext(null);xs.displayName="DataRouterState";var em=b.createContext(!1);function A1(){return b.useContext(em)}var tm=b.createContext({isTransitioning:!1});tm.displayName="ViewTransition";var M1=b.createContext(new Map);M1.displayName="Fetchers";var z1=b.createContext(null);z1.displayName="Await";var Nt=b.createContext(null);Nt.displayName="Navigation";var Vl=b.createContext(null);Vl.displayName="Location";var Yt=b.createContext({outlet:null,matches:[],isDataRoute:!1});Yt.displayName="Route";var rc=b.createContext(null);rc.displayName="RouteError";var am="REACT_ROUTER_ERROR",O1="REDIRECT",k1="ROUTE_ERROR_RESPONSE";function U1(l){if(l.startsWith(`${am}:${O1}:{`))try{let r=JSON.parse(l.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function D1(l){if(l.startsWith(`${am}:${k1}:{`))try{let r=JSON.parse(l.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new T1(r.status,r.statusText,r.data)}catch{}}function H1(l,{relative:r}={}){Ue(Vn(),"useHref() may be used only in the context of a <Router> component.");let{basename:c,navigator:o}=b.useContext(Nt),{hash:f,pathname:h,search:y}=Ql(l,{relative:r}),v=h;return c!=="/"&&(v=h==="/"?c:qt([c,h])),o.createHref({pathname:v,search:y,hash:f})}function Vn(){return b.useContext(Vl)!=null}function Et(){return Ue(Vn(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Vl).location}var nm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function lm(l){b.useContext(Nt).static||b.useLayoutEffect(l)}function cc(){let{isDataRoute:l}=b.useContext(Yt);return l?W1():B1()}function B1(){Ue(Vn(),"useNavigate() may be used only in the context of a <Router> component.");let l=b.useContext(Xn),{basename:r,navigator:c}=b.useContext(Nt),{matches:o}=b.useContext(Yt),{pathname:f}=Et(),h=JSON.stringify(uc(o)),y=b.useRef(!1);return lm(()=>{y.current=!0}),b.useCallback((p,g={})=>{if(Dt(y.current,nm),!y.current)return;if(typeof p=="number"){c.go(p);return}let S=bs(p,JSON.parse(h),f,g.relative==="path");l==null&&r!=="/"&&(S.pathname=S.pathname==="/"?r:qt([r,S.pathname])),(g.replace?c.replace:c.push)(S,g.state,g)},[r,c,h,f,l])}b.createContext(null);function L1(){let{matches:l}=b.useContext(Yt),r=l[l.length-1];return(r==null?void 0:r.params)??{}}function Ql(l,{relative:r}={}){let{matches:c}=b.useContext(Yt),{pathname:o}=Et(),f=JSON.stringify(uc(c));return b.useMemo(()=>bs(l,JSON.parse(f),o,r==="path"),[l,f,o,r])}function q1(l,r){return im(l,r)}function im(l,r,c){var Y;Ue(Vn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=b.useContext(Nt),{matches:f}=b.useContext(Yt),h=f[f.length-1],y=h?h.params:{},v=h?h.pathname:"/",p=h?h.pathnameBase:"/",g=h&&h.route;{let Z=g&&g.path||"";um(v,!g||Z.endsWith("*")||Z.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${v}" (under <Route path="${Z}">) 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.
|
|
59
|
-
|
|
60
|
-
Please change the parent <Route path="${Z}"> to <Route path="${Z==="/"?"*":`${Z}/*`}">.`)}let S=Et(),j;if(r){let Z=typeof r=="string"?Zn(r):r;Ue(p==="/"||((Y=Z.pathname)==null?void 0:Y.startsWith(p)),`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 "${p}" but pathname "${Z.pathname}" was given in the \`location\` prop.`),j=Z}else j=S;let O=j.pathname||"/",A=O;if(p!=="/"){let Z=p.replace(/^\//,"").split("/");A="/"+O.replace(/^\//,"").split("/").slice(Z.length).join("/")}let R=Jh(l,{pathname:A});Dt(g||R!=null,`No routes matched location "${j.pathname}${j.search}${j.hash}" `),Dt(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${j.pathname}${j.search}${j.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 k=V1(R&&R.map(Z=>Object.assign({},Z,{params:Object.assign({},y,Z.params),pathname:qt([p,o.encodeLocation?o.encodeLocation(Z.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Z.pathname]),pathnameBase:Z.pathnameBase==="/"?p:qt([p,o.encodeLocation?o.encodeLocation(Z.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Z.pathnameBase])})),f,c);return r&&k?b.createElement(Vl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...j},navigationType:"POP"}},k):k}function Y1(){let l=F1(),r=w1(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),c=l instanceof Error?l.stack:null,o="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:o},h={padding:"2px 4px",backgroundColor:o},y=null;return console.error("Error handled by React Router default ErrorBoundary:",l),y=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:h},"ErrorBoundary")," or"," ",b.createElement("code",{style:h},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},r),c?b.createElement("pre",{style:f},c):null,y)}var G1=b.createElement(Y1,null),sm=class extends b.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,r){return r.location!==l.location||r.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:r.error,location:r.location,revalidation:l.revalidation||r.revalidation}}componentDidCatch(l,r){this.props.onError?this.props.onError(l,r):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const c=D1(l.digest);c&&(l=c)}let r=l!==void 0?b.createElement(Yt.Provider,{value:this.props.routeContext},b.createElement(rc.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?b.createElement(Z1,{error:l},r):r}};sm.contextType=em;var Kr=new WeakMap;function Z1({children:l,error:r}){let{basename:c}=b.useContext(Nt);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let o=U1(r.digest);if(o){let f=Kr.get(r);if(f)throw f;let h=Ih(o.location,c);if(Wh&&!Kr.get(r))if(h.isExternal||o.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const y=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:o.replace}));throw Kr.set(r,y),y}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return l}function X1({routeContext:l,match:r,children:c}){let o=b.useContext(Xn);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(Yt.Provider,{value:l},c)}function V1(l,r=[],c){let o=c==null?void 0:c.state;if(l==null){if(!o)return null;if(o.errors)l=o.matches;else if(r.length===0&&!o.initialized&&o.matches.length>0)l=o.matches;else return null}let f=l,h=o==null?void 0:o.errors;if(h!=null){let S=f.findIndex(j=>j.route.id&&(h==null?void 0:h[j.route.id])!==void 0);Ue(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),f=f.slice(0,Math.min(f.length,S+1))}let y=!1,v=-1;if(c&&o){y=o.renderFallback;for(let S=0;S<f.length;S++){let j=f[S];if((j.route.HydrateFallback||j.route.hydrateFallbackElement)&&(v=S),j.route.id){let{loaderData:O,errors:A}=o,R=j.route.loader&&!O.hasOwnProperty(j.route.id)&&(!A||A[j.route.id]===void 0);if(j.route.lazy||R){c.isStatic&&(y=!0),v>=0?f=f.slice(0,v+1):f=[f[0]];break}}}}let p=c==null?void 0:c.onError,g=o&&p?(S,j)=>{var O,A;p(S,{location:o.location,params:((A=(O=o.matches)==null?void 0:O[0])==null?void 0:A.params)??{},unstable_pattern:_1(o.matches),errorInfo:j})}:void 0;return f.reduceRight((S,j,O)=>{let A,R=!1,k=null,Y=null;o&&(A=h&&j.route.id?h[j.route.id]:void 0,k=j.route.errorElement||G1,y&&(v<0&&O===0?(um("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,Y=null):v===O&&(R=!0,Y=j.route.hydrateFallbackElement||null)));let Z=r.concat(f.slice(0,O+1)),G=()=>{let V;return A?V=k:R?V=Y:j.route.Component?V=b.createElement(j.route.Component,null):j.route.element?V=j.route.element:V=S,b.createElement(X1,{match:j,routeContext:{outlet:S,matches:Z,isDataRoute:o!=null},children:V})};return o&&(j.route.ErrorBoundary||j.route.errorElement||O===0)?b.createElement(sm,{location:o.location,revalidation:o.revalidation,component:k,error:A,children:G(),routeContext:{outlet:null,matches:Z,isDataRoute:!0},onError:g}):G()},null)}function oc(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Q1(l){let r=b.useContext(Xn);return Ue(r,oc(l)),r}function J1(l){let r=b.useContext(xs);return Ue(r,oc(l)),r}function $1(l){let r=b.useContext(Yt);return Ue(r,oc(l)),r}function dc(l){let r=$1(l),c=r.matches[r.matches.length-1];return Ue(c.route.id,`${l} can only be used on routes that contain a unique "id"`),c.route.id}function K1(){return dc("useRouteId")}function F1(){var o;let l=b.useContext(rc),r=J1("useRouteError"),c=dc("useRouteError");return l!==void 0?l:(o=r.errors)==null?void 0:o[c]}function W1(){let{router:l}=Q1("useNavigate"),r=dc("useNavigate"),c=b.useRef(!1);return lm(()=>{c.current=!0}),b.useCallback(async(f,h={})=>{Dt(c.current,nm),c.current&&(typeof f=="number"?await l.navigate(f):await l.navigate(f,{fromRouteId:r,...h}))},[l,r])}var Uh={};function um(l,r,c){!r&&!Uh[l]&&(Uh[l]=!0,Dt(!1,c))}b.memo(I1);function I1({routes:l,future:r,state:c,isStatic:o,onError:f}){return im(l,void 0,{state:c,isStatic:o,onError:f})}function Fr({to:l,replace:r,state:c,relative:o}){Ue(Vn(),"<Navigate> may be used only in the context of a <Router> component.");let{static:f}=b.useContext(Nt);Dt(!f,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:h}=b.useContext(Yt),{pathname:y}=Et(),v=cc(),p=bs(l,uc(h),y,o==="path"),g=JSON.stringify(p);return b.useEffect(()=>{v(JSON.parse(g),{replace:r,state:c,relative:o})},[v,g,o,r,c]),null}function ht(l){Ue(!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 P1({basename:l="/",children:r=null,location:c,navigationType:o="POP",navigator:f,static:h=!1,unstable_useTransitions:y}){Ue(!Vn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let v=l.replace(/^\/*/,"/"),p=b.useMemo(()=>({basename:v,navigator:f,static:h,unstable_useTransitions:y,future:{}}),[v,f,h,y]);typeof c=="string"&&(c=Zn(c));let{pathname:g="/",search:S="",hash:j="",state:O=null,key:A="default",unstable_mask:R}=c,k=b.useMemo(()=>{let Y=oa(g,v);return Y==null?null:{location:{pathname:Y,search:S,hash:j,state:O,key:A,unstable_mask:R},navigationType:o}},[v,g,S,j,O,A,o,R]);return Dt(k!=null,`<Router basename="${v}"> is not able to match the URL "${g}${S}${j}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:b.createElement(Nt.Provider,{value:p},b.createElement(Vl.Provider,{children:r,value:k}))}function ey({children:l,location:r}){return q1(nc(l),r)}function nc(l,r=[]){let c=[];return b.Children.forEach(l,(o,f)=>{if(!b.isValidElement(o))return;let h=[...r,f];if(o.type===b.Fragment){c.push.apply(c,nc(o.props.children,h));return}Ue(o.type===ht,`[${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>`),Ue(!o.props.index||!o.props.children,"An index route cannot have child routes.");let y={id:o.props.id||h.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,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&&(y.children=nc(o.props.children,h)),c.push(y)}),c}var hs="get",ms="application/x-www-form-urlencoded";function js(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function ty(l){return js(l)&&l.tagName.toLowerCase()==="button"}function ay(l){return js(l)&&l.tagName.toLowerCase()==="form"}function ny(l){return js(l)&&l.tagName.toLowerCase()==="input"}function ly(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function iy(l,r){return l.button===0&&(!r||r==="_self")&&!ly(l)}function lc(l=""){return new URLSearchParams(typeof l=="string"||Array.isArray(l)||l instanceof URLSearchParams?l:Object.keys(l).reduce((r,c)=>{let o=l[c];return r.concat(Array.isArray(o)?o.map(f=>[c,f]):[[c,o]])},[]))}function sy(l,r){let c=lc(l);return r&&r.forEach((o,f)=>{c.has(f)||r.getAll(f).forEach(h=>{c.append(f,h)})}),c}var ds=null;function uy(){if(ds===null)try{new FormData(document.createElement("form"),0),ds=!1}catch{ds=!0}return ds}var ry=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Wr(l){return l!=null&&!ry.has(l)?(Dt(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ms}"`),null):l}function cy(l,r){let c,o,f,h,y;if(ay(l)){let v=l.getAttribute("action");o=v?oa(v,r):null,c=l.getAttribute("method")||hs,f=Wr(l.getAttribute("enctype"))||ms,h=new FormData(l)}else if(ty(l)||ny(l)&&(l.type==="submit"||l.type==="image")){let v=l.form;if(v==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=l.getAttribute("formaction")||v.getAttribute("action");if(o=p?oa(p,r):null,c=l.getAttribute("formmethod")||v.getAttribute("method")||hs,f=Wr(l.getAttribute("formenctype"))||Wr(v.getAttribute("enctype"))||ms,h=new FormData(v,l),!uy()){let{name:g,type:S,value:j}=l;if(S==="image"){let O=g?`${g}.`:"";h.append(`${O}x`,"0"),h.append(`${O}y`,"0")}else g&&h.append(g,j)}}else{if(js(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=hs,o=null,f=ms,y=l}return h&&f==="text/plain"&&(y=h,h=void 0),{action:o,method:c.toLowerCase(),encType:f,formData:h,body:y}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function fc(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function rm(l,r,c,o){let f=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return c?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${o}`:f.pathname=`${f.pathname}.${o}`:f.pathname==="/"?f.pathname=`_root.${o}`:r&&oa(f.pathname,r)==="/"?f.pathname=`${gs(r)}/_root.${o}`:f.pathname=`${gs(f.pathname)}.${o}`,f}async function oy(l,r){if(l.id in r)return r[l.id];try{let c=await import(l.module);return r[l.id]=c,c}catch(c){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(c),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function dy(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 fy(l,r,c){let o=await Promise.all(l.map(async f=>{let h=r.routes[f.route.id];if(h){let y=await oy(h,c);return y.links?y.links():[]}return[]}));return gy(o.flat(1).filter(dy).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Dh(l,r,c,o,f,h){let y=(p,g)=>c[g]?p.route.id!==c[g].route.id:!0,v=(p,g)=>{var S;return c[g].pathname!==p.pathname||((S=c[g].route.path)==null?void 0:S.endsWith("*"))&&c[g].params["*"]!==p.params["*"]};return h==="assets"?r.filter((p,g)=>y(p,g)||v(p,g)):h==="data"?r.filter((p,g)=>{var j;let S=o.routes[p.route.id];if(!S||!S.hasLoader)return!1;if(y(p,g)||v(p,g))return!0;if(p.route.shouldRevalidate){let O=p.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((j=c[0])==null?void 0:j.params)||{},nextUrl:new URL(l,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof O=="boolean")return O}return!0}):[]}function hy(l,r,{includeHydrateFallback:c}={}){return my(l.map(o=>{let f=r.routes[o.route.id];if(!f)return[];let h=[f.module];return f.clientActionModule&&(h=h.concat(f.clientActionModule)),f.clientLoaderModule&&(h=h.concat(f.clientLoaderModule)),c&&f.hydrateFallbackModule&&(h=h.concat(f.hydrateFallbackModule)),f.imports&&(h=h.concat(f.imports)),h}).flat(1))}function my(l){return[...new Set(l)]}function py(l){let r={},c=Object.keys(l).sort();for(let o of c)r[o]=l[o];return r}function gy(l,r){let c=new Set;return new Set(r),l.reduce((o,f)=>{let h=JSON.stringify(py(f));return c.has(h)||(c.add(h),o.push({key:h,link:f})),o},[])}function hc(){let l=b.useContext(Xn);return fc(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function yy(){let l=b.useContext(xs);return fc(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var mc=b.createContext(void 0);mc.displayName="FrameworkContext";function pc(){let l=b.useContext(mc);return fc(l,"You must render this element inside a <HydratedRouter> element"),l}function vy(l,r){let c=b.useContext(mc),[o,f]=b.useState(!1),[h,y]=b.useState(!1),{onFocus:v,onBlur:p,onMouseEnter:g,onMouseLeave:S,onTouchStart:j}=r,O=b.useRef(null);b.useEffect(()=>{if(l==="render"&&y(!0),l==="viewport"){let k=Z=>{Z.forEach(G=>{y(G.isIntersecting)})},Y=new IntersectionObserver(k,{threshold:.5});return O.current&&Y.observe(O.current),()=>{Y.disconnect()}}},[l]),b.useEffect(()=>{if(o){let k=setTimeout(()=>{y(!0)},100);return()=>{clearTimeout(k)}}},[o]);let A=()=>{f(!0)},R=()=>{f(!1),y(!1)};return c?l!=="intent"?[h,O,{}]:[h,O,{onFocus:Gl(v,A),onBlur:Gl(p,R),onMouseEnter:Gl(g,A),onMouseLeave:Gl(S,R),onTouchStart:Gl(j,A)}]:[!1,O,{}]}function Gl(l,r){return c=>{l&&l(c),c.defaultPrevented||r(c)}}function by({page:l,...r}){let c=A1(),{router:o}=hc(),f=b.useMemo(()=>Jh(o.routes,l,o.basename),[o.routes,l,o.basename]);return f?c?b.createElement(jy,{page:l,matches:f,...r}):b.createElement(Sy,{page:l,matches:f,...r}):null}function xy(l){let{manifest:r,routeModules:c}=pc(),[o,f]=b.useState([]);return b.useEffect(()=>{let h=!1;return fy(l,r,c).then(y=>{h||f(y)}),()=>{h=!0}},[l,r,c]),o}function jy({page:l,matches:r,...c}){let o=Et(),{future:f}=pc(),{basename:h}=hc(),y=b.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let v=rm(l,h,f.unstable_trailingSlashAwareDataRequests,"rsc"),p=!1,g=[];for(let S of r)typeof S.route.shouldRevalidate=="function"?p=!0:g.push(S.route.id);return p&&g.length>0&&v.searchParams.set("_routes",g.join(",")),[v.pathname+v.search]},[h,f.unstable_trailingSlashAwareDataRequests,l,o,r]);return b.createElement(b.Fragment,null,y.map(v=>b.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...c})))}function Sy({page:l,matches:r,...c}){let o=Et(),{future:f,manifest:h,routeModules:y}=pc(),{basename:v}=hc(),{loaderData:p,matches:g}=yy(),S=b.useMemo(()=>Dh(l,r,g,h,o,"data"),[l,r,g,h,o]),j=b.useMemo(()=>Dh(l,r,g,h,o,"assets"),[l,r,g,h,o]),O=b.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let k=new Set,Y=!1;if(r.forEach(G=>{var ae;let V=h.routes[G.route.id];!V||!V.hasLoader||(!S.some($=>$.route.id===G.route.id)&&G.route.id in p&&((ae=y[G.route.id])!=null&&ae.shouldRevalidate)||V.hasClientLoader?Y=!0:k.add(G.route.id))}),k.size===0)return[];let Z=rm(l,v,f.unstable_trailingSlashAwareDataRequests,"data");return Y&&k.size>0&&Z.searchParams.set("_routes",r.filter(G=>k.has(G.route.id)).map(G=>G.route.id).join(",")),[Z.pathname+Z.search]},[v,f.unstable_trailingSlashAwareDataRequests,p,o,h,S,r,l,y]),A=b.useMemo(()=>hy(j,h),[j,h]),R=xy(j);return b.createElement(b.Fragment,null,O.map(k=>b.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...c})),A.map(k=>b.createElement("link",{key:k,rel:"modulepreload",href:k,...c})),R.map(({key:k,link:Y})=>b.createElement("link",{key:k,nonce:c.nonce,...Y,crossOrigin:Y.crossOrigin??c.crossOrigin})))}function Cy(...l){return r=>{l.forEach(c=>{typeof c=="function"?c(r):c!=null&&(c.current=r)})}}var Ny=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ny&&(window.__reactRouterVersion="7.14.2")}catch{}function Ey({basename:l,children:r,unstable_useTransitions:c,window:o}){let f=b.useRef();f.current==null&&(f.current=n1({window:o,v5Compat:!0}));let h=f.current,[y,v]=b.useState({action:h.action,location:h.location}),p=b.useCallback(g=>{c===!1?v(g):b.startTransition(()=>v(g))},[c]);return b.useLayoutEffect(()=>h.listen(p),[h,p]),b.createElement(P1,{basename:l,children:r,location:y.location,navigationType:y.action,navigator:h,unstable_useTransitions:c})}var cm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tt=b.forwardRef(function({onClick:r,discover:c="render",prefetch:o="none",relative:f,reloadDocument:h,replace:y,unstable_mask:v,state:p,target:g,to:S,preventScrollReset:j,viewTransition:O,unstable_defaultShouldRevalidate:A,...R},k){let{basename:Y,navigator:Z,unstable_useTransitions:G}=b.useContext(Nt),V=typeof S=="string"&&cm.test(S),ae=Ih(S,Y);S=ae.to;let $=H1(S,{relative:f}),F=Et(),E=null;if(v){let Ye=bs(v,[],F.unstable_mask?F.unstable_mask.pathname:"/",!0);Y!=="/"&&(Ye.pathname=Ye.pathname==="/"?Y:qt([Y,Ye.pathname])),E=Z.createHref(Ye)}let[U,X,oe]=vy(o,R),le=Ry(S,{replace:y,unstable_mask:v,state:p,target:g,preventScrollReset:j,relative:f,viewTransition:O,unstable_defaultShouldRevalidate:A,unstable_useTransitions:G});function me(Ye){r&&r(Ye),Ye.defaultPrevented||le(Ye)}let it=!(ae.isExternal||h),at=b.createElement("a",{...R,...oe,href:(it?E:void 0)||ae.absoluteURL||$,onClick:it?me:r,ref:Cy(k,X),target:g,"data-discover":!V&&c==="render"?"true":void 0});return U&&!V?b.createElement(b.Fragment,null,at,b.createElement(by,{page:$})):at});tt.displayName="Link";var Ty=b.forwardRef(function({"aria-current":r="page",caseSensitive:c=!1,className:o="",end:f=!1,style:h,to:y,viewTransition:v,children:p,...g},S){let j=Ql(y,{relative:g.relative}),O=Et(),A=b.useContext(xs),{navigator:R,basename:k}=b.useContext(Nt),Y=A!=null&&ky(j)&&v===!0,Z=R.encodeLocation?R.encodeLocation(j).pathname:j.pathname,G=O.pathname,V=A&&A.navigation&&A.navigation.location?A.navigation.location.pathname:null;c||(G=G.toLowerCase(),V=V?V.toLowerCase():null,Z=Z.toLowerCase()),V&&k&&(V=oa(V,k)||V);const ae=Z!=="/"&&Z.endsWith("/")?Z.length-1:Z.length;let $=G===Z||!f&&G.startsWith(Z)&&G.charAt(ae)==="/",F=V!=null&&(V===Z||!f&&V.startsWith(Z)&&V.charAt(Z.length)==="/"),E={isActive:$,isPending:F,isTransitioning:Y},U=$?r:void 0,X;typeof o=="function"?X=o(E):X=[o,$?"active":null,F?"pending":null,Y?"transitioning":null].filter(Boolean).join(" ");let oe=typeof h=="function"?h(E):h;return b.createElement(tt,{...g,"aria-current":U,className:X,ref:S,style:oe,to:y,viewTransition:v},typeof p=="function"?p(E):p)});Ty.displayName="NavLink";var wy=b.forwardRef(({discover:l="render",fetcherKey:r,navigate:c,reloadDocument:o,replace:f,state:h,method:y=hs,action:v,onSubmit:p,relative:g,preventScrollReset:S,viewTransition:j,unstable_defaultShouldRevalidate:O,...A},R)=>{let{unstable_useTransitions:k}=b.useContext(Nt),Y=zy(),Z=Oy(v,{relative:g}),G=y.toLowerCase()==="get"?"get":"post",V=typeof v=="string"&&cm.test(v),ae=$=>{if(p&&p($),$.defaultPrevented)return;$.preventDefault();let F=$.nativeEvent.submitter,E=(F==null?void 0:F.getAttribute("formmethod"))||y,U=()=>Y(F||$.currentTarget,{fetcherKey:r,method:E,navigate:c,replace:f,state:h,relative:g,preventScrollReset:S,viewTransition:j,unstable_defaultShouldRevalidate:O});k&&c!==!1?b.startTransition(()=>U()):U()};return b.createElement("form",{ref:R,method:G,action:Z,onSubmit:o?p:ae,...A,"data-discover":!V&&l==="render"?"true":void 0})});wy.displayName="Form";function _y(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function om(l){let r=b.useContext(Xn);return Ue(r,_y(l)),r}function Ry(l,{target:r,replace:c,unstable_mask:o,state:f,preventScrollReset:h,relative:y,viewTransition:v,unstable_defaultShouldRevalidate:p,unstable_useTransitions:g}={}){let S=cc(),j=Et(),O=Ql(l,{relative:y});return b.useCallback(A=>{if(iy(A,r)){A.preventDefault();let R=c!==void 0?c:Xl(j)===Xl(O),k=()=>S(l,{replace:R,unstable_mask:o,state:f,preventScrollReset:h,relative:y,viewTransition:v,unstable_defaultShouldRevalidate:p});g?b.startTransition(()=>k()):k()}},[j,S,O,c,o,f,r,l,h,y,v,p,g])}function dm(l){Dt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let r=b.useRef(lc(l)),c=b.useRef(!1),o=Et(),f=b.useMemo(()=>sy(o.search,c.current?null:r.current),[o.search]),h=cc(),y=b.useCallback((v,p)=>{const g=lc(typeof v=="function"?v(new URLSearchParams(f)):v);c.current=!0,h("?"+g,p)},[h,f]);return[f,y]}var Ay=0,My=()=>`__${String(++Ay)}__`;function zy(){let{router:l}=om("useSubmit"),{basename:r}=b.useContext(Nt),c=K1(),o=l.fetch,f=l.navigate;return b.useCallback(async(h,y={})=>{let{action:v,method:p,encType:g,formData:S,body:j}=cy(h,r);if(y.navigate===!1){let O=y.fetcherKey||My();await o(O,c,y.action||v,{unstable_defaultShouldRevalidate:y.unstable_defaultShouldRevalidate,preventScrollReset:y.preventScrollReset,formData:S,body:j,formMethod:y.method||p,formEncType:y.encType||g,flushSync:y.flushSync})}else await f(y.action||v,{unstable_defaultShouldRevalidate:y.unstable_defaultShouldRevalidate,preventScrollReset:y.preventScrollReset,formData:S,body:j,formMethod:y.method||p,formEncType:y.encType||g,replace:y.replace,state:y.state,fromRouteId:c,flushSync:y.flushSync,viewTransition:y.viewTransition})},[o,f,r,c])}function Oy(l,{relative:r}={}){let{basename:c}=b.useContext(Nt),o=b.useContext(Yt);Ue(o,"useFormAction must be used inside a RouteContext");let[f]=o.matches.slice(-1),h={...Ql(l||".",{relative:r})},y=Et();if(l==null){h.search=y.search;let v=new URLSearchParams(h.search),p=v.getAll("index");if(p.some(S=>S==="")){v.delete("index"),p.filter(j=>j).forEach(j=>v.append("index",j));let S=v.toString();h.search=S?`?${S}`:""}}return(!l||l===".")&&f.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(h.pathname=h.pathname==="/"?c:qt([c,h.pathname])),Xl(h)}function ky(l,{relative:r}={}){let c=b.useContext(tm);Ue(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=om("useViewTransitionState"),f=Ql(l,{relative:r});if(!c.isTransitioning)return!1;let h=oa(c.currentLocation.pathname,o)||c.currentLocation.pathname,y=oa(c.nextLocation.pathname,o)||c.nextLocation.pathname;return ps(f.pathname,y)!=null||ps(f.pathname,h)!=null}const Uy='<path d="M23.1599 14.9453C22.7429 14.9429 22.3775 15.2985 22.375 15.7204C22.3726 16.1374 22.7282 16.5028 23.1501 16.5053C23.567 16.5077 23.9325 16.1521 23.935 15.7302C23.9374 15.3108 23.5793 14.9478 23.1599 14.9453Z" fill="currentColor"/><path d="M15.758 22.3758C15.3435 22.3562 14.9657 22.702 14.9461 23.1214C14.9265 23.5359 15.2723 23.9137 15.6917 23.9333C16.1063 23.9529 16.484 23.6071 16.5036 23.1877C16.5232 22.7731 16.1774 22.3954 15.758 22.3758Z" fill="currentColor"/><path d="M23.1208 9.08552C23.5721 9.10024 23.9375 8.76176 23.9473 8.31291C23.9571 7.86161 23.6137 7.50351 23.1649 7.49615C22.7308 7.49124 22.3825 7.81746 22.3604 8.24668C22.3383 8.70044 22.6744 9.06835 23.1208 9.08307V9.08552Z" fill="currentColor"/><path d="M8.32678 22.3598C7.87547 22.3451 7.51002 22.6836 7.50021 23.1324C7.49039 23.5837 7.83378 23.9418 8.28263 23.9492C8.73393 23.9541 9.08712 23.6058 9.08712 23.1545C9.08712 22.7032 8.75601 22.3746 8.32678 22.3598Z" fill="currentColor"/><path d="M23.1502 12.8994C23.6113 12.9019 24.0135 12.4947 24.0013 12.0361C23.9914 11.5897 23.6039 11.2095 23.16 11.207C22.6989 11.2046 22.2966 11.6117 22.3089 12.0704C22.3187 12.5143 22.7062 12.897 23.1502 12.8994Z" fill="currentColor"/><path d="M12.9002 23.1849C12.9198 22.7459 12.5568 22.3436 12.1079 22.3068C11.6542 22.2725 11.2299 22.6551 11.2078 23.1162C11.1882 23.5553 11.5512 23.9575 12 23.9943C12.4538 24.0287 12.8781 23.646 12.9002 23.1849Z" fill="currentColor"/><path d="M19.4899 20.3568C19.9829 20.3544 20.368 19.9595 20.3582 19.464C20.3508 18.9882 19.9755 18.6129 19.4997 18.6056C19.0067 18.5982 18.6118 18.9833 18.6094 19.4763C18.6094 19.9693 18.9969 20.3593 19.4899 20.3544V20.3568Z" fill="currentColor"/><path d="M0.946568 14.8555C0.483002 14.8555 0.0881117 15.243 0.0783008 15.7066C0.0684898 16.1873 0.470738 16.5994 0.951474 16.5969C1.41504 16.5969 1.80993 16.2094 1.81974 15.7458C1.82955 15.2651 1.4273 14.853 0.946568 14.8555Z" fill="currentColor"/><path d="M15.6895 1.82027C16.1678 1.83989 16.5872 1.445 16.597 0.964263C16.6044 0.500696 16.2267 0.0984479 15.7631 0.0788261C15.2848 0.0592042 14.8654 0.454094 14.8556 0.93483C14.8482 1.3984 15.2259 1.80065 15.6895 1.82027Z" fill="currentColor"/><path d="M0.928315 9.18321C1.44829 9.19302 1.84073 8.81285 1.84073 8.29532C1.84073 7.79742 1.47037 7.41479 0.974917 7.40253C0.454937 7.39272 0.0625 7.77289 0.0625 8.29042C0.0625 8.79078 0.432863 9.17095 0.928315 9.18321Z" fill="currentColor"/><path d="M8.33104 0.0630625C7.81106 0.0458934 7.41126 0.423614 7.40636 0.938689C7.399 1.43905 7.76691 1.82658 8.25991 1.84129C8.76272 1.85601 9.15761 1.50036 9.18459 1.00982C9.21157 0.489838 8.84121 0.0777789 8.33349 0.0630625H8.33104Z" fill="currentColor"/><path d="M19.483 3.67042C18.9728 3.67042 18.5362 4.1021 18.5313 4.61227C18.524 5.11999 18.9532 5.56148 19.4634 5.57374C19.9858 5.58846 20.4445 5.1347 20.4371 4.60982C20.4298 4.09965 19.9932 3.66797 19.483 3.66797V3.67042Z" fill="currentColor"/><path d="M0.976227 11.102C0.456247 11.0849 -0.00486668 11.5411 3.87869e-05 12.0611C0.00494425 12.5663 0.441531 13.0029 0.946794 13.0029C1.45206 13.0029 1.8911 12.5737 1.90091 12.066C1.91072 11.5631 1.48394 11.1192 0.976227 11.102Z" fill="currentColor"/><path d="M12.0584 4.16361e-05C11.5531 -0.00486383 11.1116 0.424365 11.1018 0.93208C11.0895 1.45206 11.5457 1.91072 12.0657 1.90091C12.571 1.8911 13.0051 1.45206 13.0002 0.946797C12.9978 0.441534 12.5636 0.0049471 12.0584 4.16361e-05Z" fill="currentColor"/><path d="M4.65891 18.5322C4.13894 18.5077 3.67046 18.9516 3.66801 19.479C3.6631 19.9867 4.09233 20.4257 4.6025 20.438C5.11022 20.4478 5.55416 20.0259 5.57133 19.5133C5.59095 19.0081 5.16908 18.5567 4.65891 18.5322Z" fill="currentColor"/><path d="M4.58641 5.65236C5.13337 5.67443 5.62637 5.21332 5.64845 4.65654C5.67052 4.10959 5.20941 3.61659 4.65264 3.59451C4.10568 3.57244 3.61268 4.03355 3.5906 4.59032C3.56853 5.13728 4.02964 5.63028 4.58641 5.65236Z" fill="currentColor"/><path d="M19.5008 16.8099C20.1017 16.8 20.5726 16.3169 20.5677 15.7159C20.5628 15.115 20.087 14.6392 19.4836 14.6367C18.8803 14.6343 18.402 15.1077 18.3946 15.7086C18.3873 16.3267 18.8803 16.8197 19.5008 16.8074V16.8099Z" fill="currentColor"/><path d="M15.7209 20.5694C16.3218 20.5694 16.8025 20.0985 16.8099 19.4976C16.8172 18.8967 16.3488 18.411 15.7478 18.3988C15.1298 18.384 14.6318 18.8746 14.6368 19.4927C14.6417 20.0936 15.1199 20.5694 15.7209 20.5719V20.5694Z" fill="currentColor"/><path d="M9.42652 19.4702C9.41916 18.8644 8.9188 18.364 8.31298 18.3518C7.69243 18.3395 7.1651 18.8546 7.16019 19.4751C7.15529 20.0981 7.67281 20.6157 8.29581 20.6157C8.9188 20.6157 9.43388 20.0908 9.42652 19.4702Z" fill="currentColor"/><path d="M19.4553 7.16016C18.8495 7.17487 18.354 7.68259 18.3516 8.28841C18.3491 8.91141 18.8666 9.42893 19.4896 9.42403C20.1126 9.41912 20.6253 8.89669 20.6154 8.27615C20.6056 7.65316 20.0734 7.14544 19.4553 7.16261V7.16016Z" fill="currentColor"/><path d="M15.7219 5.79748C16.3817 5.79748 16.9115 5.26034 16.8993 4.60055C16.887 3.95793 16.3695 3.44531 15.7244 3.44531C15.0793 3.44531 14.5348 3.98246 14.5471 4.64225C14.5593 5.28732 15.0793 5.79748 15.7219 5.79748Z" fill="currentColor"/><path d="M4.63052 16.9006C5.27559 16.8957 5.78821 16.3806 5.79557 15.738C5.80292 15.0782 5.27068 14.5435 4.6109 14.5509C3.94866 14.5582 3.42623 15.0978 3.44585 15.7576C3.46302 16.4002 3.9879 16.9055 4.63052 16.9006Z" fill="currentColor"/><path d="M12.0637 20.6756C12.7088 20.6683 13.2533 20.1115 13.246 19.4714C13.2386 18.8263 12.6818 18.2818 12.0417 18.2891C11.3966 18.2965 10.8521 18.8533 10.8594 19.4934C10.8668 20.1385 11.4211 20.683 12.0637 20.6756Z" fill="currentColor"/><path d="M19.4762 10.8594C18.8312 10.8618 18.2842 11.4137 18.2891 12.0563C18.2915 12.7014 18.8434 13.2483 19.486 13.2434C20.1311 13.241 20.6781 12.6891 20.6732 12.0465C20.6682 11.4039 20.1188 10.8569 19.4762 10.8594Z" fill="currentColor"/><path d="M8.31147 5.84627C8.98106 5.83645 9.52067 5.28459 9.51576 4.61499C9.51085 3.9454 8.9639 3.40089 8.29675 3.39844C7.62716 3.39844 7.07774 3.93804 7.07038 4.60764C7.06303 5.2944 7.6247 5.85362 8.31147 5.84627Z" fill="currentColor"/><path d="M4.64934 7.0706C3.96257 7.05588 3.39599 7.6102 3.39845 8.29942C3.39845 8.96902 3.94541 9.51597 4.615 9.51843C5.2846 9.52088 5.83646 8.98128 5.84382 8.31168C5.85118 7.64209 5.31648 7.08532 4.64689 7.0706H4.64934Z" fill="currentColor"/><path d="M12.0484 5.91679C12.7376 5.92169 13.3312 5.34285 13.3508 4.64873C13.3704 3.94479 12.7671 3.32916 12.0607 3.32425C11.3715 3.31934 10.7779 3.89819 10.7583 4.59231C10.7387 5.29625 11.3396 5.91434 12.0484 5.91679Z" fill="currentColor"/><path d="M4.58021 13.3473C5.28169 13.3743 5.90469 12.7783 5.91695 12.0695C5.92921 11.3827 5.35528 10.7818 4.66115 10.7548C3.95967 10.7278 3.33668 11.3238 3.32441 12.0327C3.31215 12.7194 3.88609 13.3203 4.58021 13.3473Z" fill="currentColor"/><path d="M15.7193 14.3359C14.9687 14.3359 14.3335 14.9761 14.3359 15.7266C14.3359 16.4772 14.9761 17.1124 15.7266 17.11C16.4772 17.11 17.1124 16.4698 17.11 15.7193C17.1075 14.9687 16.4698 14.3335 15.7193 14.3359Z" fill="currentColor"/><path d="M15.7407 9.73609C16.5428 9.72628 17.1756 9.0763 17.1658 8.27671C17.156 7.47712 16.506 6.84186 15.7064 6.85167C14.9068 6.86149 14.2716 7.51146 14.2814 8.31105C14.2912 9.11064 14.9411 9.7459 15.7407 9.73609Z" fill="currentColor"/><path d="M8.2987 14.2813C7.50156 14.2764 6.8565 14.9165 6.85159 15.7161C6.84669 16.5133 7.48685 17.1583 8.28644 17.1632C9.08358 17.1681 9.72865 16.528 9.73355 15.7284C9.73601 14.9313 9.09584 14.2862 8.2987 14.2813Z" fill="currentColor"/><path d="M8.2854 9.79467C9.12669 9.79712 9.78647 9.15696 9.79874 8.32057C9.811 7.45967 9.15857 6.79007 8.30257 6.78516C7.46128 6.78271 6.8015 7.42533 6.78923 8.25926C6.77697 9.12017 7.4294 9.78976 8.2854 9.79467Z" fill="currentColor"/><path d="M15.7268 10.5156C14.8757 10.5156 14.1644 11.2343 14.184 12.0829C14.2036 12.9242 14.9075 13.6061 15.7415 13.5914C16.5803 13.5766 17.2671 12.8801 17.2622 12.0461C17.2573 11.2097 16.5631 10.5181 15.7268 10.5156Z" fill="currentColor"/><path d="M12.0588 14.1836C11.2077 14.1787 10.4964 14.8998 10.516 15.7485C10.5356 16.5897 11.2371 17.2716 12.0686 17.2593C12.9074 17.2471 13.5942 16.553 13.5917 15.7166C13.5893 14.8802 12.8976 14.1885 12.0612 14.1836H12.0588Z" fill="currentColor"/><path d="M12.0397 6.66802C11.1568 6.67538 10.4356 7.39894 10.4258 8.28192C10.4185 9.17717 11.1666 9.92525 12.0618 9.91789C12.9448 9.91054 13.6659 9.18698 13.6757 8.304C13.6831 7.40875 12.935 6.66066 12.0397 6.66802Z" fill="currentColor"/><path d="M8.29197 13.6757C9.1725 13.6757 9.90096 12.9619 9.91813 12.074C9.9353 11.1812 9.19212 10.4282 8.29442 10.4258C7.41389 10.4258 6.68543 11.1395 6.66826 12.0274C6.65109 12.9202 7.39427 13.6732 8.29197 13.6757Z" fill="currentColor"/><path d="M12.0638 10.2891C11.068 10.2842 10.2905 11.0568 10.293 12.0526C10.293 13.0288 11.0533 13.8014 12.0222 13.8137C13.0204 13.8259 13.8077 13.0631 13.8151 12.0722C13.8225 11.074 13.0548 10.294 12.0638 10.2891Z" fill="currentColor"/>';function Dy({size:l=20,idSuffix:r,className:c}){const o=`pc-brand-mark-clip-${r}`;return s.jsx("svg",{width:l,height:l,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:c,dangerouslySetInnerHTML:{__html:`<g clip-path="url(#${o})">${Uy}</g><defs><clipPath id="${o}"><rect width="24" height="24" fill="white"/></clipPath></defs>`}})}const fm="Parachute";let nn=null,Zl=null;const Hy=3e4;function By(){return"/admin/host-admin-token"}function Ly(){const l=`${window.location.pathname}${window.location.search}`;return`/login?next=${encodeURIComponent(l)}`}function Qn(){return window.location.replace(Ly()),new Promise(()=>{})}function qy(){return window.location.replace("/account/"),new Promise(()=>{})}async function Oe(){const l=Date.now();return nn&&nn.expiresAt-l>Hy?nn.token:Zl||(Zl=Yy().finally(()=>{Zl=null}),Zl)}async function Yy(){const l=await fetch(By(),{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(l.status===401)return nn=null,Qn();if(l.status===403)return nn=null,qy();if(!l.ok)throw new Error(`/admin/host-admin-token failed: ${l.status} ${await l.text()}`);const r=await l.json();if(!r.token||!r.expires_at)throw new Error("/admin/host-admin-token returned malformed body");return nn={token:r.token,expiresAt:new Date(r.expires_at).getTime()},r.token}function _e(){nn=null}class Q extends Error{constructor(r,c){super(c),this.status=r,this.name="HttpError"}}async function gc(){const l=await fetch("/.well-known/parachute.json",{headers:{accept:"application/json"}});if(!l.ok)throw new Q(l.status,`well-known fetch failed: ${l.status}`);const r=await l.json(),c=r.vaults??[],o=r.services??[];return{moduleInstalled:o.some(h=>h.name==="parachute-vault"||h.name.startsWith("parachute-vault-")),vaults:c.map(h=>{const y={name:h.name,url:h.url,version:h.version,path:Gy(h.name,h.url,o)};return h.managementUrl&&(y.managementUrl=h.managementUrl),y})}}function Gy(l,r,c){const o=c.find(f=>f.name===`parachute-vault-${l}`||f.path===`/vault/${l}`);if(o)return o.path;try{return new URL(r).pathname}catch{return`/vault/${l}`}}async function hm(l){const r=await fetch(`/admin/vault-admin-token/${encodeURIComponent(l)}`,{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(r.status===401)return Qn();if(!r.ok)throw new Q(r.status,await I(r));const c=await r.json();if(!c.token||!c.expires_at)throw new Q(500,"/admin/vault-admin-token returned malformed body");return{token:c.token,expiresAt:c.expires_at,scopes:c.scopes??[]}}async function Zy(l){var y,v;const r=await hm(l),c=await fetch(`/vault/${encodeURIComponent(l)}/.parachute/usage`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${r.token}`}});if(!c.ok)throw new Q(c.status,await I(c));const o=await c.json(),f=(y=o.counts)==null?void 0:y.notes,h=(v=o.bytes)==null?void 0:v.total;if(typeof f!="number"||typeof h!="number")throw new Q(500,"/.parachute/usage returned malformed body");return{notes:f,totalBytes:h}}function Xy(l){if(!Number.isFinite(l)||l<0)return"0 B";if(l<1024)return`${Math.round(l)} B`;const r=l/1024;if(r<1024)return`${Math.round(r)} KB`;const c=r/1024;return c<1024?`${c.toFixed(1)} MB`:`${(c/1024).toFixed(1)} GB`}async function Vy(l={}){const r=await Oe(),c=l.vault?`?vault=${encodeURIComponent(l.vault)}`:"",o=await fetch(`/api/grants${c}`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(o.status===401||o.status===403)throw _e(),new Q(o.status,await I(o));if(!o.ok)throw new Q(o.status,await I(o));return(await o.json()).grants??[]}async function Qy(l){const r=await Oe(),c=await fetch(`/api/grants/${encodeURIComponent(l)}`,{method:"DELETE",headers:{authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw _e(),new Q(c.status,await I(c));if(!c.ok)throw new Q(c.status,await I(c))}async function Jy(){const l=await fetch("/api/me",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(!l.ok)throw new Q(l.status,await I(l));return await l.json()}async function $y(l){const r=new URLSearchParams({__csrf:l}),c=await fetch("/logout",{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded",accept:"text/html, application/json"},credentials:"same-origin",body:r,redirect:"manual"});if(!(c.status===0||c.ok||c.status===302))throw new Q(c.status,await I(c))}let Hh=!1;function Ky(l,r){if(/^https?:\/\//i.test(r))return r;const c=l.replace(/\/+$/,"");return r==="/admin"||r==="/admin/"?(Hh||(Hh=!0,console.warn(`resolveManagementUrl: vault declares the legacy per-instance managementUrl ${JSON.stringify(r)}; joining under the vault URL for one release. New semantics: relative ("admin/") = per-instance join, leading-"/" = origin-absolute.`)),`${c}${r}`):r.startsWith("/")?new URL(r,`${c}/`).toString():`${c}/${r}`}async function Bh(l={}){const r=new URLSearchParams;l.revoked&&r.set("revoked",l.revoked),l.subject&&r.set("subject",l.subject),l.createdVia&&r.set("created_via",l.createdVia),l.cursor&&r.set("cursor",l.cursor);const c=r.toString(),o=c?`/api/auth/tokens?${c}`:"/api/auth/tokens",f=await Oe(),h=await fetch(o,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${f}`}});if(h.status===401||h.status===403)throw _e(),new Q(h.status,await I(h));if(!h.ok)throw new Q(h.status,await I(h));return await h.json()}async function mm(l){const r=await Oe(),c=await fetch("/api/auth/mint-token",{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify(l)});if(c.status===401||c.status===403)throw _e(),new Q(c.status,await I(c));if(!c.ok)throw new Q(c.status,await I(c));return await c.json()}async function Fy(l){const r=await Oe(),c=await fetch("/api/auth/revoke-token",{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify({jti:l})});if(c.status===401||c.status===403)throw _e(),new Q(c.status,await I(c));if(!c.ok)throw new Q(c.status,await I(c));return await c.json()}async function Wy(l){const r=await Oe(),c=await fetch(`/api/oauth/clients/${encodeURIComponent(l)}`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw _e(),new Q(c.status,await I(c));if(!c.ok)throw new Q(c.status,await I(c));return await c.json()}async function Iy(l,r){const o={method:"POST",headers:{accept:"application/json",authorization:`Bearer ${await Oe()}`}};r!==void 0&&(o.headers={...o.headers,"content-type":"application/json"},o.body=JSON.stringify({return_to:r}));const f=await fetch(`/api/oauth/clients/${encodeURIComponent(l)}/approve`,o);if(f.status===401||f.status===403)throw _e(),new Q(f.status,await I(f));if(!f.ok)throw new Q(f.status,await I(f));return await f.json()}async function Ss(){const l=await Oe(),r=await fetch("/api/modules",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw _e(),new Q(r.status,await I(r));if(!r.ok)throw new Q(r.status,await I(r));return await r.json()}async function Cs(l,r){const c=await Oe();return await fetch(`/api/modules/${encodeURIComponent(l)}/${r}`,{method:"POST",headers:{accept:"application/json",authorization:`Bearer ${c}`}})}async function Py(l){const r=await Cs(l,"install");if(r.status===401||r.status===403)throw _e(),new Q(r.status,await I(r));if(!r.ok)throw new Q(r.status,await I(r));return(await r.json()).operation_id}async function ev(l){const r=await Cs(l,"upgrade");if(r.status===401||r.status===403)throw _e(),new Q(r.status,await I(r));if(!r.ok)throw new Q(r.status,await I(r));return(await r.json()).operation_id}async function tv(l){const r=await Cs(l,"restart");if(r.status===401||r.status===403)throw _e(),new Q(r.status,await I(r));if(!r.ok)throw new Q(r.status,await I(r));return await r.json()}async function av(l){const r=await Cs(l,"uninstall");if(r.status===401||r.status===403)throw _e(),new Q(r.status,await I(r));if(!r.ok)throw new Q(r.status,await I(r));return await r.json()}async function nv(l){const r=await Oe(),c=await fetch("/api/modules/channel",{method:"PUT",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify({channel:l})});if(c.status===401||c.status===403)throw _e(),new Q(c.status,await I(c));if(!c.ok)throw new Q(c.status,await I(c));return(await c.json()).channel}async function pm(){const l=await Oe(),r=await fetch("/api/settings/hub-origin",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw _e(),new Q(r.status,await I(r));if(!r.ok)throw new Q(r.status,await I(r));return await r.json()}async function Lh(l){const r=await Oe(),c=await fetch("/api/settings/hub-origin",{method:"PUT",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify({hub_origin:l})});if(c.status===401||c.status===403)throw _e(),new Q(c.status,await I(c));if(!c.ok)throw new Q(c.status,await I(c));return(await c.json()).hub_origin}async function lv(l){const r=await Oe(),c=await fetch(`/api/modules/operations/${encodeURIComponent(l)}`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw _e(),new Q(c.status,await I(c));if(!c.ok)throw new Q(c.status,await I(c));return await c.json()}async function iv(){const l=await Oe(),r=await fetch("/api/users",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw _e(),new Q(r.status,await I(r));if(!r.ok)throw new Q(r.status,await I(r));return(await r.json()).users??[]}async function sv(l){const r=await Oe(),c=await fetch("/api/users",{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify(l)});if(c.status===401||c.status===403)throw _e(),new Q(c.status,await I(c));if(!c.ok)throw new Q(c.status,await I(c));return(await c.json()).user}async function uv(l){const r=await Oe(),c=await fetch(`/api/users/${encodeURIComponent(l)}`,{method:"DELETE",headers:{authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw c.status===401&&_e(),new Q(c.status,await I(c));if(!c.ok)throw new Q(c.status,await I(c));const o=await c.json().catch(()=>({}));return{revocationLagSeconds:typeof o.revocation_lag_seconds=="number"?o.revocation_lag_seconds:60}}async function rv(l,r){const c=await Oe(),o=await fetch(`/api/users/${encodeURIComponent(l)}/reset-password`,{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${c}`},body:JSON.stringify({new_password:r})});if(o.status===401||o.status===403)throw o.status===401&&_e(),new Q(o.status,await I(o));if(!o.ok)throw new Q(o.status,await I(o));const f=await o.json().catch(()=>({}));return{revocationLagSeconds:typeof f.revocation_lag_seconds=="number"?f.revocation_lag_seconds:60}}async function cv(l,r){const c=await Oe(),o=await fetch(`/api/users/${encodeURIComponent(l)}/vaults`,{method:"PATCH",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${c}`},body:JSON.stringify({assigned_vaults:r})});if(o.status===401||o.status===403)throw o.status===401&&_e(),new Q(o.status,await I(o));if(!o.ok)throw new Q(o.status,await I(o))}async function ov(){const l=await Oe(),r=await fetch("/api/users/vaults",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw _e(),new Q(r.status,await I(r));if(!r.ok)throw new Q(r.status,await I(r));return(await r.json()).vaults??[]}async function dv(){const l=await Oe(),r=await fetch("/api/invites",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw _e(),new Q(r.status,await I(r));if(!r.ok)throw new Q(r.status,await I(r));return(await r.json()).invites??[]}async function fv(l){const r=await Oe(),c=await fetch("/api/invites",{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify(l)});if(c.status===401||c.status===403)throw _e(),new Q(c.status,await I(c));if(!c.ok)throw new Q(c.status,await I(c));return await c.json()}async function hv(l){const r=await Oe(),c=await fetch(`/api/invites/${encodeURIComponent(l)}`,{method:"DELETE",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(c.status===401)throw _e(),new Q(c.status,await I(c));if(!c.ok)throw new Q(c.status,await I(c))}async function ic(){const l=await Oe(),r=await fetch("/api/hub",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw _e(),new Q(r.status,await I(r));if(!r.ok)throw new Q(r.status,await I(r));return await r.json()}async function mv(l){const r=await Oe(),c=await fetch("/api/hub/upgrade",{method:"POST",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw _e(),new Q(c.status,await I(c));if(!c.ok)throw new Q(c.status,await I(c));return await c.json()}async function pv(){const l=await Oe(),r=await fetch("/api/hub/upgrade/status",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===404)return null;if(r.status===401||r.status===403)throw _e(),new Q(r.status,await I(r));if(!r.ok)throw new Q(r.status,await I(r));return await r.json()}async function I(l){try{const r=await l.text(),c=JSON.parse(r);if(c.error_description)return c.error_description;if(c.error)return c.error;if(r)return r}catch{}return`${l.status} ${l.statusText}`}async function gv(){const l=await fetch("/api/connections/catalog",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(l.status===401)return Qn();if(!l.ok)throw new Q(l.status,await I(l));const r=await l.json(),c=Array.isArray(r.events)?r.events:[],o=Array.isArray(r.actions)?r.actions:[],f=Array.isArray(r.templates)?r.templates:[];return{events:c,actions:o,templates:f}}async function yv(){const l=await fetch("/admin/connections",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(l.status===401)return Qn();if(!l.ok)throw new Q(l.status,await I(l));const r=await l.json();return Array.isArray(r.connections)?r.connections:[]}async function vv(l){const r=await fetch("/admin/connections",{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},credentials:"same-origin",body:JSON.stringify(l)});if(r.status===401)return Qn();if(!r.ok)throw new Q(r.status,await I(r));const c=await r.json();if(!c.connection||typeof c.connection.id!="string")throw new Q(500,"/admin/connections returned a malformed connection body");return{connection:c.connection,...c.connect?{connect:c.connect}:{}}}async function bv(l){const r=await fetch(`/admin/connections/${encodeURIComponent(l)}`,{method:"DELETE",headers:{accept:"application/json"},credentials:"same-origin"});if(r.status===401){await Qn();return}if(r.status===207){let c="connection teardown partially failed";try{const o=await r.json();Array.isArray(o.errors)&&o.errors.length>0&&(c=o.errors.map(f=>`${f.step??"step"}: ${f.detail??"failed"}`).join("; "))}catch{}throw new Q(207,c)}if(!r.ok)throw new Q(r.status,await I(r))}const xv=3e4;function qh(l){const r=Math.max(0,l),c=Math.floor(r/1e3);if(c<60)return`${c}s`;const o=Math.floor(c/60);if(o<60)return`${o}m`;const f=Math.floor(o/60);return f<24?`${f}h ${o%60}m`:`${Math.floor(f/24)}d ${f%24}h`}function Ir(l){const r=new Date(l);if(Number.isNaN(r.getTime()))return l;const c=o=>String(o).padStart(2,"0");return`${r.getUTCFullYear()}-${c(r.getUTCMonth()+1)}-${c(r.getUTCDate())} ${c(r.getUTCHours())}:${c(r.getUTCMinutes())}:${c(r.getUTCSeconds())} UTC`}function jv(l){var r;if(l.source==="container")return"container";if(l.source==="npm")return"npm";if(l.source==="bun-linked"){const c=(r=l.bun_linked_path)==null?void 0:r.split("/").filter(Boolean).pop();return c&&l.git_head?`bun-linked → ${c} @ ${l.git_head}`:c?`bun-linked → ${c}`:"bun-linked"}return"unknown"}function Sv(){const[l,r]=b.useState(null),[c,o]=b.useState(!1),[f,h]=b.useState(!1),[y,v]=b.useState(null),p=b.useCallback(async()=>{h(!0);try{const g=await ic();r(g),v(new Date)}catch{}finally{h(!1)}},[]);return b.useEffect(()=>{p()},[p]),b.useEffect(()=>{const g=()=>{p()};window.addEventListener("focus",g);const S=window.setInterval(()=>{p()},xv);return()=>{window.removeEventListener("focus",g),window.clearInterval(S)}},[p]),l?s.jsxs("footer",{className:"hub-version-badge","data-testid":"hub-version-badge",children:[s.jsxs("button",{type:"button",className:"hub-version-badge-summary",onClick:()=>o(g=>!g),"aria-expanded":c,"data-testid":"hub-version-badge-summary",children:["Hub ",s.jsx("strong",{children:l.version})," · running"," ",s.jsx("span",{"data-testid":"hub-version-badge-uptime",children:qh(l.uptime_ms)})," ·"," ",s.jsx("span",{className:"hub-version-badge-source","data-testid":"hub-version-badge-source",children:l.source})]}),c?s.jsxs("div",{className:"hub-version-badge-panel","data-testid":"hub-version-badge-panel",children:[s.jsxs("dl",{children:[s.jsx("dt",{children:"Hub"}),s.jsx("dd",{children:s.jsxs("code",{children:["@openparachute/hub ",l.version]})}),s.jsx("dt",{children:"Source"}),s.jsx("dd",{children:jv(l)}),s.jsx("dt",{children:"Started"}),s.jsxs("dd",{children:[Ir(l.started_at)," (",qh(l.uptime_ms)," ago)"]}),l.container_build_time?s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"Built"}),s.jsx("dd",{children:Ir(l.container_build_time)})]}):null,l.render_commit?s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"Commit"}),s.jsxs("dd",{children:[s.jsx("code",{children:l.render_commit.slice(0,8)}),l.render_branch?s.jsxs(s.Fragment,{children:[" on ",s.jsx("code",{children:l.render_branch})]}):null]})]}):null,y?s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"Last checked"}),s.jsx("dd",{children:Ir(y.toISOString())})]}):null]}),s.jsx("button",{type:"button",className:"hub-version-badge-refresh secondary",onClick:()=>void p(),disabled:f,"data-testid":"hub-version-badge-refresh",children:f?"Refreshing…":"Refresh"})]}):null]}):null}function Cv(){const{clientId:l}=L1(),r=l??"",[c]=dm(),o=Nv(c.get("return_to")),[f,h]=b.useState({kind:"loading"}),[y,v]=b.useState({kind:"idle"}),[p,g]=b.useState(0);b.useEffect(()=>{if(!r){h({kind:"error",message:"missing client id in URL"});return}let j=!1;return h({kind:"loading"}),Wy(r).then(O=>{j||(h({kind:"ok",client:O}),O.status==="approved"&&(v({kind:"approved",alreadyApproved:!0}),o&&window.location.assign(o)))}).catch(O=>{if(j)return;if(O instanceof Q&&O.status===404){h({kind:"not_found"});return}const A=O instanceof Error?O.message:String(O);h({kind:"error",message:A})}),()=>{j=!0}},[r,p,o]);async function S(){v({kind:"approving"});try{const j=await Iy(r,o||void 0);if(j.redirect_to&&gm(j.redirect_to)){window.location.assign(j.redirect_to);return}v({kind:"approved",alreadyApproved:j.already_approved})}catch(j){const O=j instanceof Q?`approve failed (${j.status}): ${j.message}`:j instanceof Error?j.message:String(j);v({kind:"error",message:O})}}return s.jsxs("div",{children:[s.jsx("div",{className:"list-header",children:s.jsx("h2",{children:"Approve app"})}),Ev({loadState:f,action:y,onApprove:S,onRetry:()=>g(j=>j+1)})]})}function gm(l){return!(!l||!l.startsWith("/")||l.startsWith("//"))}function Nv(l){return l===null?null:gm(l)?l:null}function Ev({loadState:l,action:r,onApprove:c,onRetry:o}){if(l.kind==="loading")return s.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"});if(l.kind==="not_found")return s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"Unknown client."}),s.jsxs("p",{className:"muted",children:["This client_id isn't registered with this hub. The deep link may be stale, or the requesting app may have been registered against a different hub."," ",s.jsx(tt,{to:"/permissions",children:"Back to permissions"}),"."]})]});if(l.kind==="error")return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"error-banner",children:["Couldn't load the client: ",s.jsx("code",{children:l.message})]}),s.jsx("button",{type:"button",onClick:o,className:"secondary",children:"Retry"})]});const{client:f}=l,h=f.client_name??f.client_id;if(r.kind==="approved")return s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:r.alreadyApproved?"Already approved.":"Approved."}),s.jsxs("p",{className:"muted",children:[s.jsx("code",{children:h})," ",r.alreadyApproved?"was already on this hub's approved list.":"can now run an OAuth flow with this hub."," ","Return to the app that sent you here and retry the action — the request will go through now."]}),s.jsx("p",{className:"muted",style:{marginTop:"1rem"},children:s.jsx(tt,{to:"/permissions",children:"View permissions"})})]});const y=r.kind==="approving",v=r.kind==="error"?r.message:null;return s.jsxs("div",{children:[s.jsx("p",{className:"muted",children:"An app is asking this hub to issue OAuth tokens. Review the details below and approve only if you recognize the app."}),s.jsx("div",{className:"vault-row",style:{marginTop:"1rem"},children:s.jsxs("div",{className:"body",children:[s.jsx("div",{className:"name",children:s.jsx("code",{children:h})}),s.jsxs("div",{className:"dim",children:[s.jsx("span",{className:"muted",children:"client_id: "}),s.jsx("code",{children:f.client_id})]}),s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"redirect_uris: "}),f.redirect_uris.map((p,g)=>s.jsxs("span",{children:[s.jsx("code",{children:p}),g<f.redirect_uris.length-1?" ":null]},p))]}),f.scopes.length>0?s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"requested scopes: "}),f.scopes.map((p,g)=>s.jsxs("span",{children:[s.jsx("code",{children:Tv(p)}),g<f.scopes.length-1?" ":null]},p)),f.scopes.some(ym)?s.jsxs("p",{className:"muted",style:{marginTop:"0.4rem",fontStyle:"italic",fontSize:"0.85rem"},children:[s.jsx("code",{children:"*"})," — a specific vault is selected during sign-in via the consent picker (or the user's assigned vault for multi-user setups)."]}):null]}):null,s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"registered: "}),s.jsx("code",{title:f.registered_at,children:f.registered_at})]}),v?s.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:s.jsx("code",{children:v})}):null]})}),s.jsxs("div",{style:{marginTop:"1rem",display:"flex",gap:"0.5rem"},children:[s.jsx("button",{type:"button",onClick:()=>{c()},disabled:y,children:y?"Approving…":`Approve ${h}`}),s.jsx(tt,{to:"/permissions",className:"secondary",style:{alignSelf:"center"},children:"Cancel"})]})]})}function Tv(l){return ym(l)?`vault:*:${l.split(":")[1]}`:l}function ym(l){const r=l.split(":");if(r.length!==2||r[0]!=="vault")return!1;const c=r[1];return c==="read"||c==="write"}function wv(l){const r={};for(const c of l.parameters){const o=/^sink\.params\.(.+)$/.exec(c.target);o!=null&&o[1]&&(r[o[1]]=c.example??`my-${c.key}`)}return r}function Yh(l,r){return l instanceof Q?`${r} failed (${l.status}): ${l.message}`:l instanceof Error?l.message:String(l)}function Gh({value:l,label:r="Copy"}){const[c,o]=b.useState(!1);return s.jsx("button",{type:"button",className:"secondary",onClick:()=>{typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(l).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},children:c?"Copied ✓":r})}function _v(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(0),[f,h]=b.useState({kind:"idle"}),[y,v]=b.useState({kind:"idle"}),[p,g]=b.useState(""),[S,j]=b.useState(""),[O,A]=b.useState(""),[R,k]=b.useState(""),[Y,Z]=b.useState(""),[G,V]=b.useState(""),[ae,$]=b.useState("");b.useEffect(()=>{let X=!1;return r({kind:"loading"}),Promise.all([yv(),gv(),gc()]).then(([oe,le,me])=>{X||(r({kind:"ok",data:{connections:oe,catalog:le,vaults:me.vaults}}),A(it=>{var at;return it||((at=me.vaults[0])==null?void 0:at.name)||""}))}).catch(oe=>{X||r({kind:"error",message:oe instanceof Error?oe.message:String(oe)})}),()=>{X=!0}},[c]);function F(X){g(X.source.module),j(X.source.event),Z(X.sink.module),V(X.sink.action),k(X.source.filter?JSON.stringify(X.source.filter,null,2):"");const oe=wv(X);$(Object.keys(oe).length>0?JSON.stringify(oe,null,2):""),h({kind:"idle"})}async function E(X){if(X.preventDefault(),!p||!S||!Y||!G){h({kind:"error",message:"Pick a source event and a sink action."});return}let oe,le;try{oe=R.trim()?JSON.parse(R):void 0}catch{h({kind:"error",message:"Filter is not valid JSON."});return}try{le=ae.trim()?JSON.parse(ae):void 0}catch{h({kind:"error",message:"Action params are not valid JSON."});return}if(p==="vault"&&!O){h({kind:"error",message:"Pick a vault for the source event."});return}h({kind:"submitting"});try{const me=await vv({source:{module:p,...p==="vault"?{vault:O}:{},event:S,...oe?{filter:oe}:{}},sink:{module:Y,action:G,...le?{params:le}:{}}});h({kind:"created",...me.connect?{connect:me.connect}:{}}),o(it=>it+1)}catch(me){h({kind:"error",message:Yh(me,"Create")})}}async function U(X){v({kind:"removing",id:X});try{await bv(X),v({kind:"idle"}),o(oe=>oe+1)}catch(oe){v({kind:"error",id:X,message:Yh(oe,"Remove")})}}return s.jsxs("div",{"data-route-content":"true",children:[s.jsx("div",{className:"list-header",children:s.jsx("h1",{children:"Connections"})}),s.jsxs("p",{className:"muted",children:["A connection wires ",s.jsx("em",{children:"when [event] in a module → do [action] in another module"}),". The hub mints the tokens and registers the trigger. Modules declare presets for the common cases — pick one below to pre-fill the builder."]}),Rv(l,y,v,U,()=>o(X=>X+1)),l.kind==="ok"&&s.jsx(kv,{catalog:l.data.catalog,vaults:l.data.vaults,sourceModule:p,setSourceModule:g,sourceEvent:S,setSourceEvent:j,vault:O,setVault:A,filterText:R,setFilterText:k,sinkModule:Y,setSinkModule:Z,sinkAction:G,setSinkAction:V,paramsText:ae,setParamsText:$,createSt:f,setCreateSt:h,onSubmit:E,onApplyTemplate:F})]})}function Rv(l,r,c,o,f){if(l.kind==="loading")return s.jsx("p",{className:"muted",children:"Loading connections…"});if(l.kind==="error")return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"error-banner",children:["Couldn't load connections: ",s.jsx("code",{children:l.message})]}),s.jsx("button",{type:"button",onClick:f,className:"secondary",children:"Retry"})]});const{connections:h}=l.data;return h.length===0?s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No connections yet."}),s.jsx("p",{className:"muted",children:"Build one below, or start from a module's preset."})]}):s.jsx(zv,{connections:h,removeSt:r,setRemoveSt:c,onConfirmRemove:o})}function vm(l){return l.requested_by&&l.requested_by.length>0?l.requested_by:"custom"}function Av(l){return l==="custom"?"Custom (built here)":`Added from ${l}`}function Mv(l){const r=new Map;for(const c of l){const o=vm(c),f=r.get(o);f?f.push(c):r.set(o,[c])}return Array.from(r.entries()).sort(([c],[o])=>c===o?0:c==="custom"?1:o==="custom"?-1:c.localeCompare(o))}function zv({connections:l,removeSt:r,setRemoveSt:c,onConfirmRemove:o}){const f=Mv(l);return s.jsx(s.Fragment,{children:f.map(([h,y])=>s.jsxs("div",{className:"channel-list",style:{marginTop:"1rem"},"data-provenance-group":h,children:[s.jsx("h3",{style:{marginBottom:"0.25rem"},children:Av(h)}),s.jsx("div",{className:"table-scroll",children:s.jsxs("table",{className:"channel-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{scope:"col",children:"Connection"}),s.jsx("th",{scope:"col",children:"When"}),s.jsx("th",{scope:"col",children:"Do"}),s.jsx("th",{scope:"col",children:"Source"}),s.jsx("th",{scope:"col",children:"Actions"})]})}),s.jsx("tbody",{children:y.map(v=>Ov(v,r,c,o))})]})})]},h))})}function Ov(l,r,c,o){const f=r.kind==="confirming"&&r.id===l.id,h=r.kind==="removing"&&r.id===l.id,y=r.kind==="error"&&r.id===l.id?r.message:null,v=`${l.source.module}.${l.source.event}${l.source.vault?` (${l.source.vault})`:""}`,p=`${l.sink.module}.${l.sink.action}`,g=vm(l);return s.jsxs("tr",{"data-connection-id":l.id,"data-requested-by":g,children:[s.jsx("td",{children:s.jsx("code",{children:l.id})}),s.jsx("td",{children:s.jsx("code",{children:v})}),s.jsx("td",{children:s.jsx("code",{children:p})}),s.jsx("td",{children:g==="custom"?s.jsx("span",{className:"muted",children:"custom"}):s.jsx("span",{className:"tag","data-testid":"provenance-badge",children:g})}),s.jsxs("td",{children:[f?s.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.25rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm remove ${l.id}`,children:[s.jsxs("p",{children:["Remove connection ",s.jsx("code",{children:l.id}),"? This tears down the provisioned trigger (and channel config, if any)."]}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"button",className:"destructive",onClick:()=>{o(l.id)},disabled:h,children:h?"Removing…":"Remove"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"idle"}),disabled:h,children:"Cancel"})]})]}):s.jsx("button",{type:"button",className:"secondary",disabled:h,onClick:()=>c({kind:"confirming",id:l.id}),"aria-label":`Remove ${l.id}`,children:h?"Removing…":"Remove"}),y&&s.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:s.jsx("code",{children:y})})]})]},l.id)}function kv(l){const{catalog:r,createSt:c}=l,o=c.kind==="submitting",f=p=>r.events.filter(g=>g.module===p),h=p=>r.actions.filter(g=>g.module===p),y=Array.from(new Set(r.events.map(p=>p.module))),v=Array.from(new Set(r.actions.map(p=>p.module)));return s.jsxs("section",{style:{marginTop:"1.5rem"},children:[s.jsxs("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center",flexWrap:"wrap"},children:[s.jsx("h3",{style:{marginRight:"auto"},children:"Build a connection"}),r.templates.map(p=>s.jsxs("button",{type:"button",className:"secondary",onClick:()=>l.onApplyTemplate(p),"data-testid":`preset-${p.module}-${p.key}`,...p.description?{title:p.description}:{},children:["Preset: ",p.title]},`${p.module}/${p.key}`))]}),s.jsxs("form",{onSubmit:p=>void l.onSubmit(p),"aria-label":"Build a connection",children:[s.jsxs("fieldset",{style:{border:"1px solid var(--border, #ddd)",padding:"0.75rem"},children:[s.jsx("legend",{children:"When (source event)"}),s.jsxs("p",{children:[s.jsx("label",{htmlFor:"conn-source-module",children:"Module"}),s.jsx("br",{}),s.jsxs("select",{id:"conn-source-module",value:l.sourceModule,disabled:o,onChange:p=>{l.setSourceModule(p.target.value),l.setSourceEvent("")},children:[s.jsx("option",{value:"",children:"— pick a module —"}),y.map(p=>s.jsx("option",{value:p,children:p},p))]})]}),l.sourceModule&&s.jsxs("p",{children:[s.jsx("label",{htmlFor:"conn-source-event",children:"Event"}),s.jsx("br",{}),s.jsxs("select",{id:"conn-source-event",value:l.sourceEvent,disabled:o,onChange:p=>l.setSourceEvent(p.target.value),children:[s.jsx("option",{value:"",children:"— pick an event —"}),f(l.sourceModule).map(p=>s.jsxs("option",{value:p.key,children:[p.title," (",p.key,")"]},p.key))]})]}),l.sourceModule==="vault"&&s.jsxs("p",{children:[s.jsx("label",{htmlFor:"conn-vault",children:"Vault"}),s.jsx("br",{}),s.jsx("select",{id:"conn-vault",value:l.vault,disabled:o,onChange:p=>l.setVault(p.target.value),children:l.vaults.map(p=>s.jsx("option",{value:p.name,children:p.name},p.name))})]}),s.jsxs("p",{children:[s.jsxs("label",{htmlFor:"conn-filter",children:["Filter ",s.jsx("span",{className:"muted",children:"(JSON — tags / has_metadata / missing_metadata)"})]}),s.jsx("br",{}),s.jsx("textarea",{id:"conn-filter",value:l.filterText,disabled:o,rows:4,style:{width:"100%",fontFamily:"monospace"},onChange:p=>l.setFilterText(p.target.value),placeholder:'{ "tags": ["#channel-message/inbound"] }'})]})]}),s.jsxs("fieldset",{style:{border:"1px solid var(--border, #ddd)",padding:"0.75rem",marginTop:"0.75rem"},children:[s.jsx("legend",{children:"Do (sink action)"}),s.jsxs("p",{children:[s.jsx("label",{htmlFor:"conn-sink-module",children:"Module"}),s.jsx("br",{}),s.jsxs("select",{id:"conn-sink-module",value:l.sinkModule,disabled:o,onChange:p=>{l.setSinkModule(p.target.value),l.setSinkAction("")},children:[s.jsx("option",{value:"",children:"— pick a module —"}),v.map(p=>s.jsx("option",{value:p,children:p},p))]})]}),l.sinkModule&&s.jsxs("p",{children:[s.jsx("label",{htmlFor:"conn-sink-action",children:"Action"}),s.jsx("br",{}),s.jsxs("select",{id:"conn-sink-action",value:l.sinkAction,disabled:o,onChange:p=>l.setSinkAction(p.target.value),children:[s.jsx("option",{value:"",children:"— pick an action —"}),h(l.sinkModule).map(p=>s.jsxs("option",{value:p.key,children:[p.title," (",p.key,")"]},p.key))]})]}),s.jsxs("p",{children:[s.jsxs("label",{htmlFor:"conn-params",children:["Action params ",s.jsxs("span",{className:"muted",children:["(JSON — e.g. ",'{ "channel": "eng" }',")"]})]}),s.jsx("br",{}),s.jsx("textarea",{id:"conn-params",value:l.paramsText,disabled:o,rows:3,style:{width:"100%",fontFamily:"monospace"},onChange:p=>l.setParamsText(p.target.value),placeholder:'{ "channel": "eng" }'})]})]}),c.kind==="error"&&s.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:s.jsx("code",{children:c.message})}),s.jsx("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.75rem"},children:s.jsx("button",{type:"submit",disabled:o,children:o?"Creating…":"Create connection"})})]}),c.kind==="created"&&c.connect&&s.jsx(Uv,{connect:c.connect,onDismiss:()=>l.setCreateSt({kind:"idle"})}),c.kind==="created"&&!c.connect&&s.jsx("div",{className:"success-banner",style:{marginTop:"1rem"},"data-testid":"connection-created",children:"Connection created."})]})}function Uv({connect:l,onDismiss:r}){return s.jsxs("div",{className:"mcp-connect-card",style:{marginTop:"1rem"},"data-testid":"connection-connect-panel",children:[s.jsx("h3",{children:"Connect a session"}),s.jsx("p",{className:"muted",children:"Run these where your Claude Code session will live; authorize in the browser when prompted."}),s.jsxs("div",{className:"mcp-field",children:[s.jsx("span",{className:"mcp-field-label",children:"1 · Register the channel (MCP)"}),s.jsxs("div",{className:"token-box",children:[s.jsx("code",{"data-testid":"connection-mcp-add",children:l.mcpAdd}),s.jsx(Gh,{value:l.mcpAdd})]})]}),s.jsxs("div",{className:"mcp-field",children:[s.jsx("span",{className:"mcp-field-label",children:"2 · Launch a session on the channel"}),s.jsxs("div",{className:"token-box",children:[s.jsx("code",{"data-testid":"connection-launch",children:l.launch}),s.jsx(Gh,{value:l.launch})]}),s.jsxs("p",{className:"muted",style:{marginTop:"0.4rem"},children:["⚠ This launches Claude Code with unrestricted tool access (",s.jsx("code",{children:"--dangerously-skip-permissions"}),") — run it only on a machine you trust for that session."]})]}),s.jsx("div",{style:{marginTop:"0.75rem"},children:s.jsx("button",{type:"button",className:"secondary",onClick:r,children:"Dismiss"})})]})}const Dv=[{to:"/connections",label:"Connections",desc:"Wire a module event to another module's action."},{to:"/modules",label:"Modules",desc:"Install, upgrade, and manage modules."},{to:"/users",label:"Users",desc:"Manage operators and invite members."},{to:"/tokens",label:"Tokens",desc:"Mint and revoke access tokens."},{to:"/permissions",label:"Permissions",desc:"OAuth consent grants per app."},{to:"/settings",label:"Settings",desc:"Canonical URL, install channel, more."}];function Hv(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(null);b.useEffect(()=>{let y=!1;return Ss().then(v=>{y||r({kind:"ok",modules:v.modules.filter(p=>p.installed)})}).catch(v=>{if(y)return;const p=v instanceof Error?v.message:String(v);r({kind:"error",message:p})}),gc().then(v=>{y||o(v.vaults.length)}).catch(()=>{y||o(null)}),()=>{y=!0}},[]);const f=l.kind==="ok"?l.modules:[],h=f.flatMap(y=>y.uis.map(v=>({key:`${y.short}:${v.name}`,label:v.display_name,tagline:v.tagline,href:v.path,ownerLabel:y.display_name})));return s.jsxs("div",{"data-route-content":"true",className:"admin-home",children:[s.jsx("div",{className:"list-header",children:s.jsx("h1",{children:"Hub"})}),s.jsxs("p",{className:"muted",children:["Everything on this hub, in one place. Hub-native sections open here in the admin shell; module surfaces (marked ",s.jsx("span",{className:"ext-mark",children:"↗"}),") open the module's own UI."]}),s.jsxs("section",{className:"home-group","data-testid":"home-administer",children:[s.jsxs("div",{className:"home-group-head",children:[s.jsx("h2",{children:"Administer"}),s.jsx("span",{className:"home-group-tag home-group-tag-hub",children:"hub"})]}),s.jsx("p",{className:"muted home-group-sub",children:"Cross-cutting host admin. Opens here in the shell — the nav stays with you."}),s.jsx("div",{className:"home-grid",children:Dv.map(y=>s.jsxs(tt,{to:y.to,className:"home-card home-card-hub","data-section":y.to,children:[s.jsx("span",{className:"home-card-title",children:y.label}),s.jsx("span",{className:"home-card-desc",children:y.desc})]},y.to))})]}),s.jsxs("section",{className:"home-group","data-testid":"home-modules",children:[s.jsxs("div",{className:"home-group-head",children:[s.jsx("h2",{children:"Modules"}),s.jsx("span",{className:"home-group-tag home-group-tag-module",children:"modules"})]}),s.jsxs("p",{className:"muted home-group-sub",children:["Installed modules. Each opens its own admin surface outside the hub shell. Manage install / upgrade / restart from ",s.jsx(tt,{to:"/modules",children:"Modules"}),"."]}),l.kind==="loading"?s.jsx("p",{className:"muted","data-loading":"true",children:"Loading modules…"}):l.kind==="error"?s.jsxs("p",{className:"muted","data-testid":"home-modules-error",children:["Couldn't load modules (",l.message,"). Open ",s.jsx(tt,{to:"/modules",children:"Modules"})," ","directly."]}):f.length===0?s.jsxs("p",{className:"muted","data-testid":"home-modules-empty",children:["No modules installed yet. ",s.jsx(tt,{to:"/modules",children:"Install one →"})]}):s.jsx("div",{className:"home-grid",children:f.map(y=>y.short==="vault"&&c===0?s.jsx(Lv,{module:y},y.short):s.jsx(Bv,{module:y},y.short))})]}),h.length>0?s.jsxs("section",{className:"home-group","data-testid":"home-surfaces",children:[s.jsxs("div",{className:"home-group-head",children:[s.jsx("h2",{children:"Your surfaces"}),s.jsx("span",{className:"home-group-tag home-group-tag-module",children:"module-owned"})]}),s.jsx("p",{className:"muted home-group-sub",children:"The user-facing apps these modules host. Opens the app — outside the hub shell."}),s.jsx("div",{className:"home-grid",children:h.map(y=>s.jsxs("a",{href:y.href,className:"home-card home-card-surface","data-testid":`home-surface-${y.key}`,children:[s.jsxs("span",{className:"home-card-title",children:[y.label," ",s.jsx("span",{className:"ext-mark",children:"↗"})]}),y.tagline?s.jsx("span",{className:"home-card-desc",children:y.tagline}):null,s.jsxs("span",{className:"home-card-owner",children:["opens ",y.ownerLabel,"'s surface"]})]},y.key))})]}):null]})}function Bv({module:l}){const r=l.config_ui_url??l.management_url;return r?s.jsxs("a",{href:r,className:"home-card home-card-module","data-testid":`home-module-${l.short}`,children:[s.jsxs("span",{className:"home-card-title",children:[l.display_name," ",s.jsx("span",{className:"ext-mark",children:"↗"})]}),l.tagline?s.jsx("span",{className:"home-card-desc",children:l.tagline}):null,s.jsxs("span",{className:"home-card-owner",children:["opens ",l.display_name,"'s own admin"]})]}):s.jsxs("div",{className:"home-card home-card-module home-card-disabled","data-testid":`home-module-${l.short}`,"aria-disabled":"true",children:[s.jsx("span",{className:"home-card-title",children:l.display_name}),l.tagline?s.jsx("span",{className:"home-card-desc",children:l.tagline}):null,s.jsx("span",{className:"home-card-owner home-card-owner-empty",children:"no admin UI yet"})]})}function Lv({module:l}){return s.jsxs("a",{href:"/admin/setup?step=vault",className:"home-card home-card-hub","data-testid":`home-module-${l.short}`,children:[s.jsx("span",{className:"home-card-title",children:l.display_name}),s.jsx("span",{className:"home-card-desc",children:"No vaults yet — create your first vault to start storing notes, tokens, and secrets."}),s.jsx("span",{className:"home-card-owner",children:"create your first vault — opens the setup wizard"})]})}const qv=2e3,Yv=12e4;function Gv(){const[l,r]=b.useState(null),[c,o]=b.useState({kind:"idle"}),f=b.useRef(null),h=b.useRef(0),y=b.useCallback(async()=>{try{r(await ic())}catch{}},[]);b.useEffect(()=>{y()},[y]),b.useEffect(()=>()=>{f.current&&clearInterval(f.current)},[]);const v=b.useCallback(()=>{f.current&&(clearInterval(f.current),f.current=null)},[]),p=b.useCallback((S,j)=>{h.current=Date.now()+Yv,v(),f.current=setInterval(()=>{(async()=>{let O=null,A=null;try{O=await ic()}catch{}try{A=await pv()}catch{}if(O){const R=O.version!==S,k=j!==null&&O.version===j;if(R||k){v(),r(O),o({kind:"succeeded",newVersion:O.version});return}}if((A==null?void 0:A.phase)==="failed"){v(),o({kind:"error",message:A.error??"the hub upgrade failed — check the platform log"});return}if(Date.now()>=h.current){v();const R=(A==null?void 0:A.log.at(-1))??null;o({kind:"timeout",lastLog:R})}})()},qv)},[v]);async function g(){if(!l)return;const S=l.version;o({kind:"starting"});try{const j=await mv();if(j.mode==="redeploy-required"){o({kind:"redeploy-required",targetVersion:j.target_version});return}o({kind:"upgrading",previousVersion:S,targetVersion:j.target_version}),p(S,j.target_version)}catch(j){o({kind:"error",message:j instanceof Error?j.message:String(j)})}}return l?s.jsxs("section",{className:"hub-upgrade-card install-card","data-testid":"hub-upgrade-card",children:[s.jsxs("div",{className:"install-card-body",children:[s.jsxs("h3",{children:["Hub ",s.jsx("span",{className:"muted",children:"(@openparachute/hub)"})]}),s.jsxs("p",{className:"install-card-meta muted",children:["Installed ",s.jsxs("code",{"data-testid":"hub-current-version",children:["v",l.version]})," · source"," ",s.jsx("code",{children:l.source})]}),s.jsx(Xv,{state:c})]}),s.jsx("div",{className:"install-card-actions",children:s.jsx(Zv,{state:c,onUpgrade:()=>void g()})})]}):null}function Zv({state:l,onUpgrade:r}){if(l.kind==="redeploy-required")return s.jsx("span",{className:"muted","data-testid":"hub-redeploy-hint",children:"Redeploy from your platform dashboard"});const c=l.kind==="starting"||l.kind==="upgrading";return s.jsx("button",{type:"button",onClick:r,disabled:c,"data-testid":"hub-upgrade-button",children:c?"Upgrading…":"Upgrade hub"})}function Xv({state:l}){switch(l.kind){case"idle":return null;case"starting":return s.jsx("p",{className:"muted","data-testid":"hub-upgrade-state-starting",children:"Starting the hub upgrade…"});case"upgrading":return s.jsxs("p",{className:"muted","data-testid":"hub-upgrade-state-upgrading",children:["Upgrading",l.targetVersion?` to v${l.targetVersion}`:"","… the hub will restart; this page reconnects automatically."]});case"succeeded":return s.jsxs("p",{className:"muted","data-testid":"hub-upgrade-state-success",children:["Upgraded — the hub is now running ",s.jsxs("code",{children:["v",l.newVersion]}),"."]});case"timeout":return s.jsxs("p",{className:"warn-banner","data-testid":"hub-upgrade-state-timeout",children:["The hub may still be coming up — refresh shortly.",l.lastLog?s.jsxs(s.Fragment,{children:[" ",s.jsxs("span",{className:"dim",children:["Last status: ",l.lastLog]})]}):null]});case"redeploy-required":return s.jsxs("p",{className:"warn-banner","data-testid":"hub-upgrade-state-redeploy",children:["This hub is baked into its container image, so an in-place upgrade wouldn't survive a restart."," ",l.targetVersion?s.jsxs(s.Fragment,{children:["Redeploy from your platform dashboard to move to ",s.jsxs("code",{children:["v",l.targetVersion]}),"."]}):s.jsx(s.Fragment,{children:"Redeploy from your platform dashboard to pick up the latest hub."})]});case"error":return s.jsxs("p",{className:"error-banner","data-testid":"hub-upgrade-state-error",children:["Upgrade failed: ",l.message]})}}function Vv(){if(typeof navigator>"u")return"other";const l=(navigator.platform||"").toLowerCase();return l.includes("mac")?"darwin":l.includes("linux")?"linux":"other"}function Qv(l,r){const c=[];if(l.darwin&&c.push({label:"macOS",command:l.darwin,preferred:r==="darwin"}),l.linux&&c.push({label:"Linux",command:l.linux,preferred:r==="linux"}),l.generic){const o=c.some(f=>f.preferred);c.push({label:"Any platform",command:l.generic,preferred:!o})}return c.sort((o,f)=>Number(f.preferred)-Number(o.preferred))}function Jv({command:l}){const[r,c]=b.useState(!1);async function o(){try{await navigator.clipboard.writeText(l),c(!0),setTimeout(()=>c(!1),1500)}catch{}}return s.jsxs("div",{className:"depcard-cmd",children:[s.jsx("pre",{className:"depcard-cmd-text",children:l}),s.jsx("button",{type:"button",className:"btn btn-secondary depcard-copy",onClick:()=>void o(),"aria-label":"Copy install command",children:r?"Copied":"Copy"})]})}function $v({wire:l}){const r=Vv(),c=Qv(l.install,r);return s.jsxs("div",{className:"depcard","data-testid":"missing-dependency-card",children:[s.jsxs("h3",{className:"depcard-heading",children:[l.binary," isn't installed"]}),l.why?s.jsxs("p",{className:"depcard-why muted",children:["It's needed to ",l.why,"."]}):null,c.length>0?s.jsxs("div",{className:"depcard-installs",children:[s.jsx("p",{className:"depcard-installs-label",children:"Install it:"}),c.map(o=>s.jsxs("div",{className:o.preferred?"depcard-install preferred":"depcard-install",children:[s.jsx("span",{className:"depcard-os",children:o.label}),s.jsx(Jv,{command:o.command})]},o.label))]}):null,l.docs_url?s.jsx("p",{className:"depcard-docs",children:s.jsx("a",{href:l.docs_url,target:"_blank",rel:"noreferrer noopener",children:"Documentation"})}):null,l.sysadmin_hint?s.jsx("p",{className:"depcard-hint muted",children:l.sysadmin_hint}):null]})}function Kv(l){const{error:r,errorDetail:c}=l;return(c==null?void 0:c.error_type)==="missing_dependency"?s.jsx($v,{wire:c}):c!=null&&c.error_description?s.jsx("span",{className:"depcard-fallback",children:c.error_description}):r?s.jsx("span",{className:"depcard-fallback",children:r}):null}function Fv(l){switch(l){case"running":return"active";case"starting":case"restarting":return"pending";case"crashed":return"failing";case"stopped":case null:case void 0:return"inactive";default:return"inactive"}}function Wv(l){if(l==null)return"active";switch(l){case"active":case"pending":case"inactive":case"failing":return l;case"pending-oauth":return"pending";case"disabled":return"inactive";default:return"active"}}const Iv=1e3;function Pv(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState([]),[f,h]=b.useState({}),[y,v]=b.useState({}),p=b.useCallback(async()=>{try{const E=await Ss();r({kind:"ok",catalog:E})}catch(E){const U=E instanceof Error?E.message:String(E);r({kind:"error",message:U})}},[]);b.useEffect(()=>{p()},[p]);const g=b.useRef(null);b.useEffect(()=>{if(c.length===0){g.current&&(clearInterval(g.current),g.current=null);return}if(!g.current)return g.current=setInterval(()=>{Promise.all(c.map(async E=>{var U;try{const X=await lv(E.operationId);o(oe=>oe.map(le=>le.operationId===X.id?{...le,log:X.log,status:X.status,error:X.error,errorDetail:X.error_detail}:le)),(X.status==="succeeded"||X.status==="failed")&&(X.status==="failed"&&((U=X.error_detail)==null?void 0:U.error_type)==="missing_dependency"?p():setTimeout(()=>{o(le=>le.filter(me=>me.operationId!==X.id)),p()},1500))}catch(X){const oe=X instanceof Error?X.message:String(X);o(le=>le.map(me=>me.operationId===E.operationId?{...me,status:"failed",error:oe}:me))}}))},Iv),()=>{g.current&&(clearInterval(g.current),g.current=null)}},[c,p]);async function S(E){v(U=>{const X={...U};return delete X[E],X});try{const U=await Py(E);o(X=>[...X,{kind:"install",operationId:U,short:E,log:[],status:"pending"}])}catch(U){v(X=>({...X,[E]:U instanceof Error?U.message:String(U)}))}}async function j(E){v(U=>{const X={...U};return delete X[E],X});try{const U=await ev(E);o(X=>[...X,{kind:"upgrade",operationId:U,short:E,log:[],status:"pending"}])}catch(U){v(X=>({...X,[E]:U instanceof Error?U.message:String(U)}))}}async function O(E){if(!f[E]){h(U=>({...U,[E]:!0})),v(U=>{const X={...U};return delete X[E],X});try{await tv(E),await p()}catch(U){v(X=>({...X,[E]:U instanceof Error?U.message:String(U)}))}finally{h(U=>({...U,[E]:!1}))}}}async function A(E){if(!f[E]&&window.confirm(`Uninstall ${E}? The container will stop the service, remove the package, and drop its services.json entry. The persistent disk's data dir is left intact.`)){h(U=>({...U,[E]:!0})),v(U=>{const X={...U};return delete X[E],X});try{await av(E),await p()}catch(U){v(X=>({...X,[E]:U instanceof Error?U.message:String(U)}))}finally{h(U=>({...U,[E]:!1}))}}}if(l.kind==="loading")return s.jsx("div",{className:"empty",children:"Loading modules…"});if(l.kind==="error")return l.message.includes("setup_required")?s.jsxs("div",{className:"empty",children:["Hub not yet configured. ",s.jsx("a",{href:"/admin/setup",children:"Finish first-boot setup"})," first."]}):s.jsxs("div",{className:"empty",children:["Failed to load modules: ",l.message,"."," ",s.jsx("button",{type:"button",onClick:()=>void p(),children:"Retry"})]});const R=l.catalog,{modules:k,supervisor_available:Y,module_install_channel:Z}=R,G=k.filter(E=>E.installed),V=k.filter(E=>!E.installed&&E.available),ae=new Set(c.filter(E=>E.kind==="install").map(E=>E.short)),$=V.filter(E=>!ae.has(E.short));async function F(E){if(E!==Z){r({kind:"ok",catalog:{...R,module_install_channel:E}});try{const U=await nv(E);r(X=>X.kind==="ok"?{kind:"ok",catalog:{...X.catalog,module_install_channel:U}}:X)}catch(U){const X=U instanceof Error?U.message:String(U);r({kind:"error",message:`Failed to update channel — ${X}`})}}}return s.jsxs("section",{className:"modules",children:[s.jsx("h1",{children:"Modules"}),s.jsx("p",{className:"muted",children:"Install, upgrade, and manage Parachute modules. Available modules are pinned for the v0.6 release; the marketplace is on the roadmap."}),s.jsx(Gv,{}),s.jsx(l0,{channel:Z,disabled:!Y,onChange:E=>void F(E)}),!Y&&s.jsxs("div",{className:"banner banner-info",children:["This hub is running outside container mode (no supervisor wired). Module install / restart / upgrade is available only under ",s.jsx("code",{children:"parachute serve"}),". On-box installs use"," ",s.jsx("code",{children:"parachute install vault"})," etc. from a shell instead."]}),c.length>0&&s.jsxs("div",{className:"banner","data-testid":"pending-ops-banner",children:[s.jsx("strong",{children:"In progress:"}),s.jsx("ul",{children:c.map(E=>s.jsxs("li",{children:[s.jsx("code",{children:E.short})," · ",E.kind," · status: ",E.status,E.status==="failed"&&(E.errorDetail||E.error)?s.jsx("div",{className:"depcard-wrap",children:Kv({error:E.error,errorDetail:E.errorDetail})}):null,E.log.length>0&&s.jsxs("details",{children:[s.jsxs("summary",{children:[E.log.length," log line(s)"]}),s.jsx("pre",{children:E.log.join(`
|
|
61
|
-
`)})]})]},E.operationId))})]}),s.jsxs("section",{className:"modules-installed","data-testid":"installed-section",children:[s.jsx("h2",{children:"Installed modules"}),G.length===0?s.jsxs("p",{className:"muted","data-testid":"installed-empty",children:["No modules installed yet. Pick one from ",s.jsx("strong",{children:"Install a module"})," below to get started."]}):Zh(G,E=>s.jsx("ul",{className:"module-list",children:E.map(U=>s.jsx(e0,{module:U,supervisorAvailable:Y,syncBusy:!!f[U.short],errorMessage:y[U.short],onUpgrade:()=>void j(U.short),onRestart:()=>void O(U.short),onUninstall:()=>void A(U.short)},U.short))}),"installed")]}),s.jsxs("section",{className:"modules-installable","data-testid":"installable-section",children:[s.jsx("h2",{children:"Install a module"}),$.length===0?s.jsx("p",{className:"muted","data-testid":"installable-empty",children:ae.size>0?"Install in progress — see In progress above.":"All available modules are installed."}):Zh($,E=>s.jsx("ul",{className:"install-list",children:E.map(U=>s.jsx(t0,{module:U,supervisorAvailable:Y,installing:ae.has(U.short),errorMessage:y[U.short],onInstall:()=>void S(U.short)},U.short))}),"installable")]})]})}function Zh(l,r,c){const o=l.filter(h=>h.focus!=="experimental"),f=l.filter(h=>h.focus==="experimental");return s.jsxs(s.Fragment,{children:[o.length>0&&s.jsx("div",{"data-testid":`${c}-core-group`,children:r(o)}),f.length>0&&s.jsxs("div",{className:"modules-experimental","data-testid":`${c}-experimental-group`,children:[s.jsxs("h3",{className:"muted experimental-heading",children:["Experimental"," ",s.jsx("span",{className:"muted",children:"— exploration modules; not part of the core surface"})]}),r(f)]})]})}function e0({module:l,supervisorAvailable:r,syncBusy:c,errorMessage:o,onUpgrade:f,onRestart:h,onUninstall:y}){const v=r&&!c,p=l.installed_version!==l.latest_version&&l.latest_version!==null,g=l.management_url,S=l.config_ui_url;return s.jsxs("li",{className:"module-row","data-short":l.short,children:[s.jsxs("header",{children:[s.jsxs("h2",{children:[l.display_name," ",s.jsxs("span",{className:"muted",children:["(",l.short,")"]})]}),(()=>{const j=a0(l);return s.jsx("span",{className:`status status-${j.cssState}`,"data-state":j.cssState,"data-testid":`module-status-${l.short}`,children:j.label})})()]}),l.tagline?s.jsx("p",{className:"tagline",children:l.tagline}):null,s.jsxs("dl",{className:"meta",children:[s.jsx("dt",{children:"Package"}),s.jsx("dd",{children:s.jsx("code",{children:l.package})}),s.jsx("dt",{children:"Installed"}),s.jsxs("dd",{children:["v",l.installed_version??"unknown",p&&s.jsxs("span",{className:"badge",children:["v",l.latest_version," available"]})]}),l.pid&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"PID"}),s.jsx("dd",{children:l.pid})]})]}),l.uis.length>0&&s.jsx(n0,{uis:l.uis}),s.jsxs("div",{className:"actions",children:[g?s.jsx("a",{className:"btn",href:g,"data-testid":`open-${l.short}`,children:"Open"}):s.jsx("button",{type:"button",className:"btn",disabled:!0,title:S?"No separate Open surface — use Configure for this module's admin UI.":"This module hasn't shipped an admin UI yet.","data-testid":`open-${l.short}`,children:"Open"}),S?s.jsx("a",{className:"btn",href:S,"data-testid":`configure-${l.short}`,children:"Configure"}):null,s.jsx("button",{type:"button",disabled:!v,onClick:h,children:"Restart"}),s.jsx("button",{type:"button",disabled:!v||!p,onClick:f,children:p?`Upgrade to v${l.latest_version}`:"Up to date"}),s.jsx("button",{type:"button",className:"destructive",disabled:!v,onClick:y,children:"Uninstall"})]}),o&&s.jsx("div",{className:"error",children:o})]})}function t0({module:l,supervisorAvailable:r,installing:c,errorMessage:o,onInstall:f}){const h=r&&!c;return s.jsxs("li",{className:"install-card","data-short":l.short,children:[s.jsxs("div",{className:"install-card-body",children:[s.jsxs("h3",{children:[l.display_name," ",s.jsxs("span",{className:"muted",children:["(",l.short,")"]})]}),l.tagline?s.jsx("p",{className:"tagline",children:l.tagline}):null,s.jsxs("p",{className:"muted install-card-meta",children:[s.jsx("code",{children:l.package}),l.latest_version?s.jsxs(s.Fragment,{children:[" · ","latest ",s.jsxs("code",{children:["v",l.latest_version]})]}):null]})]}),s.jsx("div",{className:"install-card-actions",children:s.jsx("button",{type:"button",disabled:!h,onClick:f,children:c?"Installing…":"Install"})}),o&&s.jsx("div",{className:"error",children:o})]})}function a0(l){if(!l.installed)return{cssState:"absent",label:"not installed"};if(!l.supervisor_status)return{cssState:"absent",label:"not supervised"};const r=Fv(l.supervisor_status);return{cssState:r,label:r}}function n0({uis:l}){return s.jsxs("details",{className:"module-uis","data-testid":"module-uis",open:!0,children:[s.jsxs("summary",{children:["Hosted UIs ",s.jsxs("span",{className:"muted",children:["(",l.length,")"]})]}),s.jsx("ul",{className:"ui-sub-units",children:l.map(r=>{const c=Wv(r.status);return s.jsxs("li",{className:"ui-sub-unit","data-name":r.name,children:[r.icon_url&&s.jsx("img",{src:r.icon_url,alt:"",className:"ui-icon",width:20,height:20,loading:"lazy"}),s.jsxs("div",{className:"ui-sub-unit-body",children:[s.jsxs("a",{href:r.path,className:"ui-sub-unit-link",children:[s.jsx("strong",{children:r.display_name}),s.jsxs("span",{className:"muted",children:[" · ",r.path]})]}),r.tagline?s.jsx("p",{className:"tagline",children:r.tagline}):null]}),s.jsx("span",{className:`status status-${c}`,"data-state":c,"data-testid":`ui-status-${r.name}`,children:c})]},r.name)})})]})}function l0({channel:l,disabled:r,onChange:c}){return s.jsxs("fieldset",{className:"channel-toggle","data-testid":"channel-toggle",children:[s.jsx("legend",{children:"Install channel"}),s.jsxs("label",{children:[s.jsx("input",{type:"radio",name:"module-install-channel",value:"latest",checked:l==="latest",disabled:r,onChange:()=>c("latest")}),"Stable (",s.jsx("code",{children:"latest"}),")"]}),s.jsxs("label",{children:[s.jsx("input",{type:"radio",name:"module-install-channel",value:"rc",checked:l==="rc",disabled:r,onChange:()=>c("rc")}),"Release candidates (",s.jsx("code",{children:"rc"}),")"]}),s.jsxs("p",{className:"muted",children:["All future module installs and upgrades use this channel. Existing installed modules are unaffected — use ",s.jsx("strong",{children:"Upgrade"})," to pull a newer version."]}),s.jsxs("p",{className:"muted",children:["More hub settings (canonical URL, etc.) at ",s.jsx(tt,{to:"/settings",children:"Settings"}),"."]})]})}function i0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(""),[f,h]=b.useState(""),[y,v]=b.useState(0),[p,g]=b.useState({kind:"idle"});b.useEffect(()=>{let A=!1;return r({kind:"loading"}),Vy(f?{vault:f}:{}).then(k=>{A||r({kind:"ok",grants:k})}).catch(k=>{if(A)return;const Y=k instanceof Error?k.message:String(k);r({kind:"error",message:Y})}),()=>{A=!0}},[y,f]);function S(A){A.preventDefault(),h(c.trim())}function j(){o(""),h("")}async function O(A){g({kind:"revoking",clientId:A.client_id});try{await Qy(A.client_id),g({kind:"idle"}),v(R=>R+1)}catch(R){const k=R instanceof Q?`revoke failed (${R.status}): ${R.message}`:R instanceof Error?R.message:String(R);g({kind:"error",clientId:A.client_id,message:k})}}return s.jsxs("div",{"data-route-content":"true",children:[s.jsx("div",{className:"list-header",children:s.jsx("h1",{children:"Permissions"})}),s.jsxs("p",{className:"muted",children:["Apps you've granted OAuth scopes to. Revoking a grant forces the consent screen on the next authorize flow — it does ",s.jsx("em",{children:"not"})," invalidate tokens already issued."]}),s.jsxs("form",{onSubmit:S,style:{marginTop:"1rem",marginBottom:"1rem"},children:[s.jsx("label",{htmlFor:"vault-filter",className:"muted",style:{marginRight:"0.5rem"},children:"Filter by vault:"}),s.jsx("input",{id:"vault-filter",type:"text",value:c,onChange:A=>o(A.target.value),placeholder:"e.g. work",style:{marginRight:"0.5rem"}}),s.jsx("button",{type:"submit",children:"Apply"}),f?s.jsx("button",{type:"button",onClick:j,className:"secondary",style:{marginLeft:"0.5rem"},children:"Clear"}):null]}),s0({state:l,revoke:p,setRevoke:g,onConfirm:O,onRetry:()=>v(A=>A+1)})]})}function s0({state:l,revoke:r,setRevoke:c,onConfirm:o,onRetry:f}){return l.kind==="loading"?s.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"}):l.kind==="error"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"error-banner",children:["Couldn't load grants: ",s.jsx("code",{children:l.message})]}),s.jsx("button",{type:"button",onClick:f,className:"secondary",children:"Retry"})]}):l.grants.length===0?s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No grants."}),s.jsx("p",{className:"muted",children:"When an app asks for OAuth scopes and you approve them, the grant lands here. Revoking it forces the consent screen on the next authorize flow."})]}):s.jsx("div",{style:{marginTop:"1rem"},children:l.grants.map(h=>{const y=r.kind==="revoking"&&r.clientId===h.client_id,v=r.kind==="error"&&r.clientId===h.client_id?r:null,p=r.kind==="confirming"&&r.grant.client_id===h.client_id;return s.jsxs("div",{className:"vault-row",children:[s.jsxs("div",{className:"body",children:[s.jsx("div",{className:"name",children:s.jsx("code",{children:h.client_name??h.client_id})}),s.jsxs("div",{className:"dim",children:[s.jsx("span",{className:"muted",children:"granted "}),s.jsx("code",{title:h.granted_at,children:u0(h.granted_at)})]}),s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"scopes: "}),h.scopes.map((g,S)=>s.jsxs("span",{children:[s.jsx("code",{children:g}),S<h.scopes.length-1?" ":null]},g))]}),v?s.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:s.jsx("code",{children:v.message})}):null,p?s.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.5rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm revoke ${h.client_name??h.client_id}`,children:[s.jsxs("p",{children:["Revoke ",s.jsx("code",{children:h.client_name??h.client_id}),"? Next OAuth flow for this app will prompt you to consent again."]}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"button",onClick:()=>{o(h)},disabled:y,children:y?"Revoking…":"Revoke"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"idle"}),disabled:y,children:"Cancel"})]})]}):null]}),p?null:s.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"confirming",grant:h}),"aria-label":`Revoke ${h.client_name??h.client_id}`,children:"Revoke"})]},h.client_id)})})}function u0(l){const r=new Date(l);return Number.isNaN(r.getTime())?l:r.toLocaleString()}function r0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(""),[f,h]=b.useState(!1),[y,v]=b.useState(null),p=b.useCallback(async()=>{try{const R=await pm();r({kind:"ok",setting:R}),o(R.hub_origin??""),v(null)}catch(R){const k=R instanceof Error?R.message:String(R);r({kind:"error",message:k})}},[]);b.useEffect(()=>{p()},[p]);async function g(R){if(R.preventDefault(),f||l.kind!=="ok")return;const k=c.trim(),Y=k.length===0?null:k;h(!0),v(null);try{await Lh(Y),await p()}catch(Z){const G=Z instanceof Error?Z.message:String(Z);v(G)}finally{h(!1)}}async function S(){if(!f&&l.kind==="ok"){h(!0),v(null);try{await Lh(null),await p()}catch(R){const k=R instanceof Error?R.message:String(R);v(k)}finally{h(!1)}}}if(l.kind==="loading")return s.jsx("div",{className:"empty",children:"Loading settings…"});if(l.kind==="error")return s.jsxs("div",{className:"empty",children:["Failed to load settings: ",l.message,"."," ",s.jsx("button",{type:"button",onClick:()=>void p(),children:"Retry"})]});const{setting:j}=l,O=j.hub_origin!==null,A=c.trim()!==(j.hub_origin??"");return s.jsxs("section",{className:"settings",children:[s.jsx("h1",{children:"Hub settings"}),s.jsx("p",{className:"muted",children:"Hub-wide operator controls. Settings here apply to every module + every minted token."}),s.jsxs("section",{className:"settings-block","aria-labelledby":"canonical-hub-url-heading",children:[s.jsx("h2",{id:"canonical-hub-url-heading",children:"Canonical hub URL"}),s.jsxs("dl",{className:"meta","data-testid":"hub-origin-current",children:[s.jsx("dt",{children:"Current value"}),s.jsxs("dd",{children:[s.jsx("code",{children:j.resolved_issuer})," ",s.jsx(c0,{source:j.source,hasStored:O})]})]}),s.jsxs("form",{onSubmit:R=>void g(R),className:"settings-form","data-testid":"hub-origin-form",children:[s.jsxs("label",{htmlFor:"hub-origin-input",children:[s.jsx("span",{children:"Canonical URL"}),s.jsx("input",{id:"hub-origin-input",type:"url",inputMode:"url",placeholder:"https://hub.example.com",value:c,disabled:f,onChange:R=>o(R.target.value),autoComplete:"off",spellCheck:!1})]}),s.jsxs("p",{className:"muted",children:["Set this when you've attached a custom domain. Tokens are minted against this URL — changing it invalidates any tokens already in circulation (the ",s.jsx("code",{children:"iss"})," claim won't match the new issuer on verification). Leave blank to use the request origin (default for Render-assigned URLs)."]}),s.jsxs("div",{className:"actions",children:[s.jsx("button",{type:"submit",disabled:f||!A,children:f?"Saving…":"Save"}),s.jsx("button",{type:"button",className:"destructive",disabled:f||!O,onClick:()=>void S(),children:"Reset to default"})]}),y&&s.jsx("div",{className:"error","data-testid":"hub-origin-save-error",children:y})]})]})]})}function c0({source:l,hasStored:r}){return l==="settings"?s.jsx("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:"from settings"}):l==="env"?s.jsxs("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:["from env var ",s.jsx("code",{children:"PARACHUTE_HUB_ORIGIN"})]}):l==="expose"?s.jsxs("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:["from your ",s.jsx("code",{children:"parachute expose"})," config"]}):s.jsx("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:"from request origin"})}const Pr={scope:"",audience:"",expiresIn:"",subject:"",permissions:""};function o0(){const[l,r]=dm(),c=h0(l.get("status")),o=m0(l.get("source")),[f,h]=b.useState({kind:"loading"}),[y,v]=b.useState(0),[p,g]=b.useState({kind:"idle"}),[S,j]=b.useState(Pr),[O,A]=b.useState({kind:"idle"}),[R,k]=b.useState(!1),[Y,Z]=b.useState(!1);function G(E,U){r(X=>{const oe=new URLSearchParams(X);return U==="all"?oe.delete(E):oe.set(E,U),oe},{replace:!0})}b.useEffect(()=>{let E=!1;return h({kind:"loading"}),Bh(Xh(c,o)).then(U=>{E||h({kind:"ok",tokens:U.tokens,nextCursor:U.next_cursor})}).catch(U=>{if(E)return;const X=U instanceof Error?U.message:String(U);h({kind:"error",message:X})}),()=>{E=!0}},[y,c,o]);async function V(){if(f.kind!=="ok"||!f.nextCursor||Y)return;const E={...Xh(c,o),cursor:f.nextCursor};Z(!0);try{const U=await Bh(E);h({kind:"ok",tokens:[...f.tokens,...U.tokens],nextCursor:U.next_cursor})}catch(U){const X=U instanceof Error?U.message:String(U);h({kind:"error",message:X})}finally{Z(!1)}}async function ae(E){E.preventDefault();const U=S.scope.trim();if(U.length===0){g({kind:"error",message:"scope is required"});return}let X;if(S.permissions.trim().length>0)try{const le=JSON.parse(S.permissions);if(le===null||typeof le!="object"||Array.isArray(le)){g({kind:"error",message:'permissions must be a JSON object (e.g. {"vault":{"default":...}})'});return}X=le}catch(le){const me=le instanceof Error?le.message:String(le);g({kind:"error",message:`permissions is not valid JSON — ${me}`});return}let oe;if(S.expiresIn.trim().length>0){const le=Number(S.expiresIn);if(!Number.isInteger(le)||le<=0){g({kind:"error",message:"expires_in must be a positive integer (seconds)"});return}oe=le}g({kind:"submitting"});try{const le=await mm({scope:U,...S.audience.trim()?{audience:S.audience.trim()}:{},...oe!==void 0?{expires_in:oe}:{},...S.subject.trim()?{subject:S.subject.trim()}:{},...X?{permissions:X}:{}});g({kind:"minted",token:le}),j(Pr),k(!1),v(me=>me+1)}catch(le){const me=le instanceof Q?`mint failed (${le.status}): ${le.message}`:le instanceof Error?le.message:String(le);g({kind:"error",message:me})}}async function $(E){A({kind:"revoking",jti:E});try{await Fy(E),A({kind:"idle"}),v(U=>U+1)}catch(U){const X=U instanceof Q?`revoke failed (${U.status}): ${U.message}`:U instanceof Error?U.message:String(U);A({kind:"error",jti:E,message:X})}}function F(E){typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(E)}return s.jsxs("div",{children:[s.jsxs("div",{className:"list-header",children:[s.jsx("h1",{children:"Tokens"}),s.jsx("button",{type:"button",onClick:()=>k(E=>!E),children:R?"Hide form":"Mint new token"})]}),s.jsxs("p",{className:"muted",children:["The hub's token registry. Every CLI / OAuth / operator-mint writes a row here. Revoking flips ",s.jsx("code",{children:"revoked_at"}),"; resource servers on"," ",s.jsx("code",{children:"@openparachute/scope-guard@^0.2.0"})," reject within ~60s of the next poll."]}),p.kind==="minted"?s.jsxs("div",{className:"mint-banner",children:[s.jsx("h3",{children:"Minted"}),s.jsxs("p",{children:["Your new access token (jti: ",s.jsx("code",{children:p.token.jti}),"):"]}),s.jsx("div",{className:"token-box",children:s.jsx("code",{children:p.token.token})}),s.jsx("p",{className:"warn",children:"This is the only time the JWT is shown. Copy it now — there is no DB-side recovery."}),s.jsxs("div",{className:"actions",children:[s.jsx("button",{type:"button",onClick:()=>F(p.token.token),children:"Copy"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>g({kind:"idle"}),children:"Dismiss"})]})]}):null,R?s.jsx("div",{className:"section",children:s.jsxs("form",{onSubmit:ae,children:[s.jsxs("div",{className:"row",children:[s.jsx("label",{htmlFor:"mint-scope",children:"Scope (space-separated)"}),s.jsx("input",{id:"mint-scope",type:"text",value:S.scope,onChange:E=>j({...S,scope:E.target.value}),placeholder:"e.g. scribe:transcribe vault:default:read",required:!0}),s.jsxs("div",{className:"field-hint",children:["Space-separated ",s.jsx("code",{children:"resource:verb"})," or ",s.jsx("code",{children:"resource:name:verb"})," ","tuples. The hub rejects non-requestable scopes (admin, host:*) per the privilege-diffusion guard."]})]}),s.jsxs("div",{className:"row",children:[s.jsx("label",{htmlFor:"mint-audience",children:"Audience (optional)"}),s.jsx("input",{id:"mint-audience",type:"text",value:S.audience,onChange:E=>j({...S,audience:E.target.value}),placeholder:"inferred from scope when blank"}),s.jsxs("div",{className:"field-hint",children:["Inferred from scope if omitted. ",s.jsx("code",{children:"vault:<name>:<verb>"})," →"," ",s.jsx("code",{children:"vault.<name>"}),"; otherwise the first colon-prefixed scope's namespace; fallback ",s.jsx("code",{children:"hub"}),"."]})]}),s.jsxs("div",{className:"row",children:[s.jsx("label",{htmlFor:"mint-expires-in",children:"Expires in (seconds, optional)"}),s.jsx("input",{id:"mint-expires-in",type:"text",inputMode:"numeric",value:S.expiresIn,onChange:E=>j({...S,expiresIn:E.target.value}),placeholder:"default 90d (7776000)"})]}),s.jsxs("div",{className:"row",children:[s.jsx("label",{htmlFor:"mint-subject",children:"Subject (optional)"}),s.jsx("input",{id:"mint-subject",type:"text",value:S.subject,onChange:E=>j({...S,subject:E.target.value}),placeholder:"defaults to operator's sub"})]}),s.jsxs("div",{className:"row",children:[s.jsx("label",{htmlFor:"mint-permissions",children:"Permissions (JSON object, optional)"}),s.jsx("textarea",{id:"mint-permissions",value:S.permissions,onChange:E=>j({...S,permissions:E.target.value}),placeholder:'e.g. {"vault":{"default":{"write_tags":["health"]}}}',rows:3,style:{width:"100%",fontFamily:"monospace",fontSize:"0.9rem"}})]}),p.kind==="error"?s.jsx("div",{className:"field-error",children:s.jsx("code",{children:p.message})}):null,s.jsxs("div",{className:"actions",children:[s.jsx("button",{type:"submit",disabled:p.kind==="submitting",children:p.kind==="submitting"?"Minting…":"Mint"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>{k(!1),j(Pr),g({kind:"idle"})},children:"Cancel"})]})]})}):null,s.jsxs("div",{style:{marginTop:"1rem",marginBottom:"0.5rem",display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[s.jsx("span",{className:"muted",style:{marginRight:"0.5rem",minWidth:"4rem"},children:"Status:"}),[{value:"all",label:"Show all"},{value:"live",label:"Live only"},{value:"revoked",label:"Revoked only"}].map(E=>s.jsx("button",{type:"button",onClick:()=>G("status",E.value),className:c===E.value?void 0:"secondary","aria-pressed":c===E.value,children:E.label},E.value))]}),s.jsxs("div",{style:{marginBottom:"1rem",display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[s.jsx("span",{className:"muted",style:{marginRight:"0.5rem",minWidth:"4rem"},children:"Source:"}),[{value:"all",label:"All sources"},{value:"oauth_refresh",label:"OAuth"},{value:"operator_mint",label:"Operator"},{value:"cli_mint",label:"CLI mint"}].map(E=>s.jsx("button",{type:"button",onClick:()=>G("source",E.value),className:o===E.value?void 0:"secondary","aria-pressed":o===E.value,children:E.label},E.value))]}),d0({list:f,revoke:O,setRevoke:A,onConfirm:$,onLoadMore:V,onRetry:()=>v(E=>E+1),loadingMore:Y,filtersActive:c!=="all"||o!=="all"})]})}function d0({list:l,revoke:r,setRevoke:c,onConfirm:o,onLoadMore:f,onRetry:h,loadingMore:y,filtersActive:v}){return l.kind==="loading"?s.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"}):l.kind==="error"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"error-banner",children:["Couldn't load tokens: ",s.jsx("code",{children:l.message})]}),s.jsx("button",{type:"button",onClick:h,className:"secondary",children:"Retry"})]}):l.tokens.length===0?v?s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No tokens match the current filter."}),s.jsx("p",{className:"muted",children:'Try widening the Status or Source pills above. The default "Show all / All sources" view shows every registry row.'})]}):s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No tokens."}),s.jsxs("p",{className:"muted",children:["Every CLI mint, OAuth grant, and operator-token rotation lands here. Mint one with the form above, or via ",s.jsx("code",{children:"parachute auth mint-token"}),"."]})]}):s.jsxs("div",{"data-route-content":"true",children:[l.tokens.map(p=>{const g=f0(p),S=r.kind==="revoking"&&r.jti===p.jti,j=r.kind==="confirming"&&r.jti===p.jti,O=r.kind==="error"&&r.jti===p.jti?r:null,A=p.user_id??p.subject??"(unknown)";return s.jsxs("div",{className:"vault-row",children:[s.jsxs("div",{className:"body",children:[s.jsxs("div",{className:"name",children:[s.jsx("code",{title:p.jti,children:fs(p.jti)}),s.jsx("span",{className:`tag${g==="live"?"":" muted"}`,children:g}),s.jsx("span",{className:`tag source-${g0(p.created_via)}`,title:`created_via: ${p.created_via}`,children:p0(p.created_via)})]}),s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"identity: "}),s.jsx("code",{children:A}),p.client_id?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"muted",children:" · client: "}),s.jsx("code",{children:p.client_id})]}):null]}),s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"scope: "}),p.scopes.map((R,k)=>s.jsxs("span",{children:[s.jsx("code",{children:R}),k<p.scopes.length-1?" ":null]},R))]}),s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem",fontSize:"0.82rem"},children:[s.jsx("span",{className:"muted",children:"created "}),s.jsx("code",{title:p.created_at,children:ec(p.created_at)}),s.jsx("span",{className:"muted",children:" · expires "}),s.jsx("code",{title:p.expires_at,children:ec(p.expires_at)}),p.revoked_at?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"muted",children:" · revoked "}),s.jsx("code",{title:p.revoked_at,children:ec(p.revoked_at)})]}):null]}),p.permissions?s.jsxs("details",{style:{marginTop:"0.35rem"},children:[s.jsx("summary",{className:"muted",style:{cursor:"pointer",fontSize:"0.85rem"},children:"permissions"}),s.jsx("pre",{style:{fontSize:"0.82rem",marginTop:"0.25rem"},children:JSON.stringify(p.permissions,null,2)})]}):null,O?s.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:s.jsx("code",{children:O.message})}):null,j?s.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.5rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm revoke ${fs(p.jti)}`,children:[s.jsxs("p",{children:["Revoke ",s.jsx("code",{children:fs(p.jti)}),"? Resource servers reject within ~60s of the next revocation-list poll. This cannot be undone."]}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"button",onClick:()=>{o(p.jti)},disabled:S,children:S?"Revoking…":"Revoke"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"idle"}),disabled:S,children:"Cancel"})]})]}):null]}),!j&&g==="live"?s.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"confirming",jti:p.jti}),"aria-label":`Revoke ${fs(p.jti)}`,children:"Revoke"}):null]},p.jti)}),l.nextCursor?s.jsx("div",{style:{marginTop:"1rem"},children:s.jsx("button",{type:"button",className:"secondary",disabled:y,onClick:()=>{f()},children:y?"Loading…":"Load more"})}):null]})}function f0(l){if(l.revoked_at)return"revoked";const r=new Date(l.expires_at).getTime();return!Number.isNaN(r)&&r<Date.now()?"expired":"live"}function h0(l){return l==="live"||l==="revoked"||l==="all"?l:"all"}function m0(l){return l==="oauth_refresh"||l==="operator_mint"||l==="cli_mint"||l==="all"?l:"all"}function Xh(l,r){const c={};return l==="live"?c.revoked="false":l==="revoked"?c.revoked="true":c.revoked="all",r!=="all"&&(c.createdVia=r),c}function p0(l){switch(l){case"oauth_refresh":return"OAuth";case"operator_mint":return"Operator";case"cli_mint":return"CLI";default:return l}}function g0(l){switch(l){case"oauth_refresh":return"oauth";case"operator_mint":return"operator";case"cli_mint":return"cli";default:return"unknown"}}function fs(l){return l.length<=14?l:`${l.slice(0,8)}…${l.slice(-4)}`}function ec(l){const r=new Date(l);return Number.isNaN(r.getTime())?l:r.toLocaleString()}const y0=1440*60;function v0({hubOrigin:l}){const[r,c]=b.useState({kind:"loading"}),[o,f]=b.useState(0),[h,y]=b.useState(""),[v,p]=b.useState("7"),[g,S]=b.useState({kind:"idle"}),[j,O]=b.useState(!1),[A,R]=b.useState(null);b.useEffect(()=>{let G=!1;return c({kind:"loading"}),dv().then(V=>{G||c({kind:"ok",invites:V})}).catch(V=>{G||c({kind:"error",message:V instanceof Error?V.message:String(V)})}),()=>{G=!0}},[o]);async function k(G){if(G.preventDefault(),g.kind==="submitting")return;S({kind:"submitting"}),O(!1);const V=Number.parseInt(v,10);try{const ae=await fv({...h.trim()!==""?{vault_name:h.trim()}:{},provision_vault:!0,...Number.isFinite(V)&&V>0?{expires_in:V*y0}:{}});S({kind:"created",result:ae}),y(""),f($=>$+1)}catch(ae){S({kind:"error",message:ae instanceof Error?ae.message:String(ae)})}}async function Y(G){if(!A){R(G);try{await hv(G),f(V=>V+1)}catch(V){c({kind:"error",message:V instanceof Error?V.message:String(V)})}finally{R(null)}}}function Z(G){var V;(V=navigator.clipboard)==null||V.writeText(G).then(()=>{O(!0),setTimeout(()=>O(!1),2e3)})}return s.jsxs("section",{style:{marginTop:"2rem"},"data-testid":"invites-section",children:[s.jsx("div",{className:"list-header",children:s.jsx("h2",{children:"Invite links"})}),s.jsx("p",{className:"muted",children:"Generate a one-time, expiring link. The recipient opens it, picks a username and password, and gets their own newly-provisioned vault (they become its owner). No admin-typed default password. Leave the vault name blank to let them name it themselves."}),s.jsx("form",{onSubmit:G=>void k(G),style:{marginBottom:"1rem"},children:s.jsxs("div",{style:{display:"flex",gap:"0.75rem",flexWrap:"wrap",alignItems:"flex-end"},children:[s.jsxs("label",{className:"field",style:{flex:"1 1 14rem"},children:[s.jsx("span",{className:"field-label",children:"Vault name (optional)"}),s.jsx("input",{type:"text",value:h,onChange:G=>y(G.target.value),placeholder:"leave blank → they choose",pattern:"[a-z0-9_-]*",autoComplete:"off",spellCheck:!1})]}),s.jsxs("label",{className:"field",style:{flex:"0 0 8rem"},children:[s.jsx("span",{className:"field-label",children:"Expires (days)"}),s.jsx("input",{type:"number",min:1,max:90,value:v,onChange:G=>p(G.target.value)})]}),s.jsx("button",{type:"submit",disabled:g.kind==="submitting",children:g.kind==="submitting"?"Creating…":"Create invite"})]})}),g.kind==="error"&&s.jsx("div",{className:"error-banner",style:{marginBottom:"1rem"},children:g.message}),g.kind==="created"&&s.jsxs("output",{className:"success-banner",style:{display:"block",marginBottom:"1rem"},children:[s.jsx("strong",{children:"Invite created."})," Copy this link now — it's shown only once and can't be retrieved later. The hub stores only a hash.",s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem",alignItems:"center",flexWrap:"wrap"},children:[s.jsx("code",{style:{wordBreak:"break-all",flex:"1 1 16rem"},children:g.result.url}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>Z(g.result.url),children:j?"Copied!":"Copy link"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>S({kind:"idle"}),children:"Dismiss"})]})]}),r.kind==="loading"&&s.jsx("p",{className:"muted",children:"Loading invites…"}),r.kind==="error"&&s.jsxs("div",{className:"error-banner",children:[r.message,s.jsx("div",{style:{marginTop:"0.5rem"},children:s.jsx("button",{type:"button",className:"secondary",onClick:()=>f(G=>G+1),children:"Retry"})})]}),r.kind==="ok"&&r.invites.length===0&&s.jsx("p",{className:"muted",children:"No invites yet."}),r.kind==="ok"&&r.invites.length>0&&s.jsx("div",{className:"table-scroll",children:s.jsxs("table",{className:"user-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"Vault"}),s.jsx("th",{children:"Role"}),s.jsx("th",{children:"Status"}),s.jsx("th",{children:"Expires"}),s.jsx("th",{children:"Created"}),s.jsx("th",{})]})}),s.jsx("tbody",{children:r.invites.map(G=>s.jsxs("tr",{children:[s.jsx("td",{children:G.vault_name??s.jsx("span",{className:"muted",children:"redeemer chooses"})}),s.jsx("td",{children:G.role==="write"?"owner":G.role}),s.jsx("td",{children:s.jsx("span",{className:`status status-${G.status}`,children:G.status})}),s.jsx("td",{className:"muted",children:new Date(G.expires_at).toLocaleDateString()}),s.jsx("td",{className:"muted",children:new Date(G.created_at).toLocaleDateString()}),s.jsx("td",{children:G.status==="pending"?s.jsx("button",{type:"button",className:"secondary",disabled:A===G.id,onClick:()=>void Y(G.id),children:A===G.id?"Revoking…":"Revoke"}):null})]},G.id))})]})}),l?s.jsxs("p",{className:"muted",style:{marginTop:"0.5rem",fontSize:"0.85em"},children:["Redemption links are served from ",s.jsxs("code",{children:[l,"/account/setup/<token>"]}),"."]}):null]})}const Da=12,b0=/^[a-z0-9_-]+$/,ys=2,vs=32,Vh={username:"",password:"",assignedVaults:[]};function bm({username:l,hubOrigin:r}){const c=`${r||""}/login`;return s.jsxs("div",{className:"muted",style:{marginTop:"0.5rem",fontSize:"0.9em"},children:["Send them to ",s.jsx("code",{children:c})," with username ",s.jsx("code",{children:l})," and this password — they'll be prompted to set a new one on first sign-in."]})}function x0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(0),[f,h]=b.useState(!1),[y,v]=b.useState(Vh),[p,g]=b.useState({kind:"idle"}),[S,j]=b.useState({kind:"idle"}),[O,A]=b.useState({kind:"idle"}),[R,k]=b.useState({kind:"idle"});b.useEffect(()=>{let $=!1;return r({kind:"loading"}),Promise.all([iv(),ov(),pm()]).then(([F,E,U])=>{if($)return;const X=U.resolved_issuer.replace(/\/+$/,"");r({kind:"ok",data:{users:F,vaults:E,hubOrigin:X}})}).catch(F=>{if($)return;const E=F instanceof Error?F.message:String(F);r({kind:"error",message:E})}),()=>{$=!0}},[c]);function Y($){return $.username.length<ys||$.username.length>vs?`Username must be ${ys}-${vs} characters.`:b0.test($.username)?$.password.length<Da?`Password must be at least ${Da} characters.`:null:"Username may only contain lowercase letters, digits, hyphens, and underscores."}async function Z($){$.preventDefault();const F=Y(y);if(F){g({kind:"error",message:F});return}g({kind:"submitting"});const E={username:y.username,password:y.password,assignedVaults:y.assignedVaults};try{const U=await sv(E);v(Vh),g({kind:"created",username:U.username}),o(X=>X+1)}catch(U){const X=U instanceof Q?`Create failed (${U.status}): ${U.message}`:U instanceof Error?U.message:String(U);g({kind:"error",message:X})}}async function G($){j({kind:"deleting",userId:$.id});try{const{revocationLagSeconds:F}=await uv($.id);j({kind:"done",username:$.username,revocationLagSeconds:F}),o(E=>E+1)}catch(F){const E=F instanceof Q?`Delete failed (${F.status}): ${F.message}`:F instanceof Error?F.message:String(F);j({kind:"error",userId:$.id,message:E})}}async function V($,F){k({kind:"submitting",userId:$.id,selected:F});try{await cv($.id,F),k({kind:"done",userId:$.id,username:$.username}),o(E=>E+1)}catch(E){const U=E instanceof Q?`Edit vaults failed (${E.status}): ${E.message}`:E instanceof Error?E.message:String(E);k({kind:"error",userId:$.id,selected:F,message:U})}}async function ae($,F){if(F.length<Da){A({kind:"error",userId:$.id,password:F,message:`Password must be at least ${Da} characters.`});return}A({kind:"submitting",userId:$.id,password:F});try{const{revocationLagSeconds:E}=await rv($.id,F);A({kind:"done",userId:$.id,username:$.username,revocationLagSeconds:E}),o(U=>U+1)}catch(E){const U=E instanceof Q?`Reset failed (${E.status}): ${E.message}`:E instanceof Error?E.message:String(E);A({kind:"error",userId:$.id,password:F,message:U})}}return s.jsxs("div",{"data-route-content":"true",children:[s.jsx("div",{className:"list-header",children:s.jsx("h1",{children:"Users"})}),s.jsxs("p",{className:"muted",children:["Hub user accounts. Each user can be a member of one or more vaults — the OAuth issuer narrows their tokens to ",s.jsx("code",{children:"vault:<assigned>:*"})," scopes for any vault in their list. Users with no assignments can't authorize any vault yet — assign at least one above. The first admin is unrestricted (admin posture). Admin-created users land with a default password and are prompted to change it on first sign-in",l.kind==="ok"?s.jsxs(s.Fragment,{children:[" ","at ",s.jsxs("code",{children:[l.data.hubOrigin,"/login"]})]}):null,"."]}),S.kind==="done"&&s.jsxs("output",{className:"success-banner",style:{display:"block",marginBottom:"0.75rem"},"data-testid":"delete-done-banner",children:["Deleted ",s.jsx("code",{children:S.username}),". Their tokens are revoked. Resource servers (vault, scribe, etc.) cache the revocation list for up to ",S.revocationLagSeconds," ","seconds — if you're deleting because of a suspected compromise, also restart the affected services (e.g. ",s.jsx("code",{children:"parachute restart vault"}),") to flush their cache immediately.",s.jsx("div",{style:{marginTop:"0.5rem"},children:s.jsx("button",{type:"button",className:"secondary",onClick:()=>j({kind:"idle"}),children:"Dismiss"})})]}),j0(l,S,j,G,O,A,ae,R,k,V,l.kind==="ok"?l.data.vaults:[],l.kind==="ok"?l.data.hubOrigin:"",()=>o($=>$+1)),l.kind==="ok"&&s.jsx(E0,{show:f,setShow:h,form:y,setForm:v,vaults:l.data.vaults,hubOrigin:l.data.hubOrigin,createState:p,setCreateState:g,onSubmit:Z}),l.kind==="ok"&&s.jsx(v0,{hubOrigin:l.data.hubOrigin})]})}function j0(l,r,c,o,f,h,y,v,p,g,S,j,O){var k;if(l.kind==="loading")return s.jsx("p",{className:"muted",children:"Loading users…"});if(l.kind==="error")return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"error-banner",children:["Couldn't load users: ",s.jsx("code",{children:l.message})]}),s.jsx("button",{type:"button",onClick:O,className:"secondary",children:"Retry"})]});const{users:A}=l.data;if(A.length===0)return s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No users yet."}),s.jsx("p",{className:"muted",children:"Click Create User below to invite someone."})]});const R=(k=A[0])==null?void 0:k.id;return s.jsx(S0,{users:A,firstAdminId:R,deleteSt:r,setDeleteSt:c,onConfirmDelete:o,resetSt:f,setResetSt:h,onSubmitReset:y,editVaultsSt:v,setEditVaultsSt:p,onSubmitEditVaults:g,availableVaults:S,hubOrigin:j})}function S0({users:l,firstAdminId:r,deleteSt:c,setDeleteSt:o,onConfirmDelete:f,resetSt:h,setResetSt:y,onSubmitReset:v,editVaultsSt:p,setEditVaultsSt:g,onSubmitEditVaults:S,availableVaults:j,hubOrigin:O}){return s.jsx("div",{className:"user-list",style:{marginTop:"1rem"},children:s.jsx("div",{className:"table-scroll",children:s.jsxs("table",{className:"user-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{scope:"col",children:"Username"}),s.jsx("th",{scope:"col",children:"Assigned vaults"}),s.jsx("th",{scope:"col",children:"Password set"}),s.jsx("th",{scope:"col",children:"Created"}),s.jsx("th",{scope:"col",children:"Actions"})]})}),s.jsx("tbody",{children:l.map(A=>{const R=A.id===r,k=c.kind==="deleting"&&c.userId===A.id,Y=c.kind==="confirming"&&c.user.id===A.id,Z=c.kind==="error"&&c.userId===A.id?c:null,G=(h.kind==="open"||h.kind==="submitting"||h.kind==="error")&&h.userId===A.id?h:null,V=h.kind==="done"&&h.userId===A.id?h:null,ae=(p.kind==="open"||p.kind==="submitting"||p.kind==="error")&&p.userId===A.id?p:null,$=p.kind==="done"&&p.userId===A.id?p:null;return s.jsxs("tr",{"data-user-id":A.id,children:[s.jsxs("td",{children:[s.jsx("code",{children:A.username}),R&&s.jsx("span",{className:"badge",style:{marginLeft:"0.5rem"},children:"first admin"})]}),s.jsx("td",{children:A.assigned_vaults.length>0?s.jsx("span",{style:{display:"inline-flex",flexWrap:"wrap",gap:"0.25rem"},children:A.assigned_vaults.map(F=>s.jsx("code",{children:F},F))}):s.jsx("span",{className:"muted",title:R?"First admin is unrestricted (admin posture)":"No vaults assigned — user can't authorize any vault yet",children:"—"})}),s.jsx("td",{children:A.password_changed?s.jsx("span",{"aria-label":"changed",children:"✓"}):s.jsx("span",{className:"status status-pending",title:"User hasn't completed first-sign-in change-password yet",children:"pending first login"})}),s.jsx("td",{children:s.jsx("span",{title:A.created_at,children:T0(A.created_at)})}),s.jsxs("td",{children:[Y?null:s.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[R&&s.jsxs(s.Fragment,{children:[s.jsx("span",{id:`first-admin-tooltip-${A.id}`,className:"sr-only",children:"First admin can't be deleted (would self-lock the hub)"}),s.jsx("span",{id:`first-admin-reset-tooltip-${A.id}`,className:"sr-only",children:"First admin uses /account/change-password directly"}),s.jsx("span",{id:`first-admin-vaults-tooltip-${A.id}`,className:"sr-only",children:"First admin's vault membership is unrestricted by design"})]}),s.jsx("button",{type:"button",className:"secondary",disabled:R||ae!==null||p.kind==="submitting"&&p.userId===A.id,title:R?"First admin's vault membership is unrestricted by design":void 0,"aria-describedby":R?`first-admin-vaults-tooltip-${A.id}`:void 0,onClick:()=>g({kind:"open",userId:A.id,selected:[...A.assigned_vaults]}),"aria-label":`Edit vaults for ${A.username}`,children:"Edit vaults"}),s.jsx("button",{type:"button",className:"secondary",disabled:R||G!==null||h.kind==="submitting"&&h.userId===A.id,title:R?"First admin uses /account/change-password directly":void 0,"aria-describedby":R?`first-admin-reset-tooltip-${A.id}`:void 0,onClick:()=>y({kind:"open",userId:A.id,password:""}),"aria-label":`Reset password for ${A.username}`,children:"Reset password"}),s.jsx("button",{type:"button",className:"secondary",disabled:R||k,title:R?"First admin can't be deleted (would self-lock the hub)":void 0,"aria-describedby":R?`first-admin-tooltip-${A.id}`:void 0,onClick:()=>o({kind:"confirming",user:A}),"aria-label":`Delete ${A.username}`,children:k?"Deleting…":"Delete"})]}),Y&&s.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.25rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm delete ${A.username}`,children:[s.jsxs("p",{children:["Delete ",s.jsx("code",{children:A.username}),"? This revokes their tokens, drops their sessions and grants, and removes the account. The audit trail is preserved — tokens stay with ",s.jsx("code",{children:"revoked_at"})," set, anonymised."]}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"button",className:"destructive",onClick:()=>{f(A)},disabled:k,children:k?"Deleting…":"Delete"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>o({kind:"idle"}),disabled:k,children:"Cancel"})]})]}),Z&&s.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:s.jsx("code",{children:Z.message})}),G&&s.jsx(C0,{user:A,state:G,onCancel:()=>y({kind:"idle"}),onPasswordChange:F=>y({kind:"open",userId:A.id,password:F}),onSubmit:F=>{v(A,F)}}),V&&s.jsxs("output",{className:"success-banner",style:{marginTop:"0.25rem",display:"block"},children:["Password reset for ",s.jsx("code",{children:V.username}),". Hand them the new password and tell them they'll be prompted to change it on first sign-in.",s.jsx(bm,{username:V.username,hubOrigin:O}),s.jsxs("div",{className:"muted",style:{marginTop:"0.5rem",fontSize:"0.85em"},children:["Their existing tokens are revoked. Resource servers (vault, scribe, etc.) cache the revocation list for up to ",V.revocationLagSeconds," ","seconds — if you're resetting because of a suspected compromise, also restart the affected services (e.g. ",s.jsx("code",{children:"parachute restart vault"}),") to flush their cache immediately."]}),s.jsx("div",{style:{marginTop:"0.5rem"},children:s.jsx("button",{type:"button",className:"secondary",onClick:()=>y({kind:"idle"}),children:"Dismiss"})})]}),ae&&s.jsx(N0,{user:A,state:ae,availableVaults:j,onCancel:()=>g({kind:"idle"}),onSelectedChange:F=>g({kind:"open",userId:A.id,selected:F}),onSubmit:F=>{S(A,F)}}),$&&s.jsxs("output",{className:"success-banner",style:{marginTop:"0.25rem",display:"block"},children:["Vault assignments updated for ",s.jsx("code",{children:$.username}),".",s.jsx("div",{style:{marginTop:"0.5rem"},children:s.jsx("button",{type:"button",className:"secondary",onClick:()=>g({kind:"idle"}),children:"Dismiss"})})]})]})]},A.id)})})]})})})}function C0({user:l,state:r,onCancel:c,onPasswordChange:o,onSubmit:f}){const h=r.kind==="submitting",y=r.kind==="error"?r.message:null,v=`reset-password-input-${l.id}`;return s.jsxs("form",{onSubmit:p=>{p.preventDefault(),f(r.password)},"aria-label":`Reset password for ${l.username}`,style:{marginTop:"0.5rem",padding:"0.5rem",background:"var(--bg-soft, #f5f5f5)",borderRadius:"4px"},children:[s.jsxs("p",{style:{margin:0},children:[s.jsxs("label",{htmlFor:v,children:["New temporary password for ",s.jsx("code",{children:l.username})," ",s.jsxs("span",{className:"muted",children:["(min ",Da," chars)"]})]}),s.jsx("br",{}),s.jsx("input",{id:v,type:"password",required:!0,autoComplete:"new-password",minLength:Da,value:r.password,disabled:h,onChange:p=>o(p.target.value)})]}),y&&s.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:s.jsx("code",{children:y})}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"submit",disabled:h,children:h?"Setting…":"Set new password"}),s.jsx("button",{type:"button",className:"secondary",onClick:c,disabled:h,children:"Cancel"})]})]})}function N0({user:l,state:r,availableVaults:c,onCancel:o,onSelectedChange:f,onSubmit:h}){const y=r.kind==="submitting",v=r.kind==="error"?r.message:null,p=`edit-vaults-select-${l.id}`;function g(S){const j=Array.from(S.target.selectedOptions).map(O=>O.value);f(j)}return s.jsxs("form",{onSubmit:S=>{S.preventDefault(),h(r.selected)},"aria-label":`Edit vaults for ${l.username}`,style:{marginTop:"0.5rem",padding:"0.5rem",background:"var(--bg-soft, #f5f5f5)",borderRadius:"4px"},children:[s.jsx("p",{style:{margin:0},children:s.jsxs("label",{htmlFor:p,children:["Vault assignments for ",s.jsx("code",{children:l.username})," ",s.jsx("span",{className:"muted",children:"(empty = no narrowing; shift-click to multi-select)"})]})}),r.selected.length>0&&s.jsx("div",{"data-testid":`edit-vaults-chips-${l.id}`,style:{marginTop:"0.4rem",display:"flex",flexWrap:"wrap",gap:"0.25rem"},children:r.selected.map(S=>s.jsx("code",{style:{padding:"0.1rem 0.4rem",borderRadius:"4px"},children:S},S))}),s.jsx("select",{id:p,multiple:!0,value:r.selected,onChange:g,disabled:y,size:Math.min(Math.max(c.length,3),8),style:{marginTop:"0.4rem",minWidth:"12rem"},children:c.map(S=>s.jsx("option",{value:S,children:S},S))}),c.length===0&&s.jsx("p",{className:"muted",style:{marginTop:"0.25rem"},children:"No vaults registered on this hub yet."}),v&&s.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:s.jsx("code",{children:v})}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"submit",disabled:y,children:y?"Saving…":"Save vault assignments"}),s.jsx("button",{type:"button",className:"secondary",onClick:o,disabled:y,children:"Cancel"})]})]})}function E0({show:l,setShow:r,form:c,setForm:o,vaults:f,hubOrigin:h,createState:y,setCreateState:v,onSubmit:p}){const g=y.kind==="submitting";return s.jsx("section",{style:{marginTop:"1.5rem"},children:l?s.jsxs("form",{onSubmit:S=>void p(S),"aria-label":"Create user",children:[s.jsx("h3",{children:"Create user"}),s.jsxs("p",{children:[s.jsxs("label",{htmlFor:"new-user-username",children:["Username"," ",s.jsxs("span",{className:"muted",children:["(",ys,"-",vs," chars, lowercase letters/digits/hyphens/ underscores)"]})]}),s.jsx("br",{}),s.jsx("input",{id:"new-user-username",type:"text",required:!0,autoComplete:"off",value:c.username,minLength:ys,maxLength:vs,pattern:"[a-z0-9_\\-]+",onChange:S=>o({...c,username:S.target.value})})]}),s.jsxs("p",{children:[s.jsxs("label",{htmlFor:"new-user-password",children:["Password ",s.jsxs("span",{className:"muted",children:["(min ",Da," chars)"]})]}),s.jsx("br",{}),s.jsx("input",{id:"new-user-password",type:"password",required:!0,autoComplete:"new-password",value:c.password,minLength:Da,onChange:S=>o({...c,password:S.target.value})})]}),s.jsxs("p",{children:[s.jsxs("label",{htmlFor:"new-user-vaults",children:["Assigned vaults"," ",s.jsx("span",{className:"muted",children:"(empty = no restriction; shift-click to select multiple)"})]}),s.jsx("br",{}),c.assignedVaults.length>0&&s.jsx("span",{"data-testid":"new-user-vault-chips",style:{display:"inline-flex",flexWrap:"wrap",gap:"0.25rem",marginBottom:"0.25rem"},children:c.assignedVaults.map(S=>s.jsx("code",{children:S},S))}),s.jsx("br",{}),s.jsx("select",{id:"new-user-vaults",multiple:!0,value:c.assignedVaults,onChange:S=>o({...c,assignedVaults:Array.from(S.target.selectedOptions).map(j=>j.value)}),size:Math.min(Math.max(f.length,3),8),style:{minWidth:"12rem"},children:f.map(S=>s.jsx("option",{value:S,children:S},S))}),f.length===0&&s.jsx("span",{className:"muted",style:{marginLeft:"0.5rem"},children:"No vaults registered on this hub yet."})]}),y.kind==="error"&&s.jsx("div",{className:"error-banner",children:s.jsx("code",{children:y.message})}),y.kind==="created"&&s.jsxs("output",{className:"success-banner",children:["User ",s.jsx("code",{children:y.username})," created. They'll be prompted to change their password on first sign-in.",s.jsx(bm,{username:y.username,hubOrigin:h})]}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"submit",disabled:g,children:g?"Creating…":"Create user"}),s.jsx("button",{type:"button",className:"secondary",disabled:g,onClick:()=>{r(!1),v({kind:"idle"})},children:"Close"})]})]}):s.jsx("button",{type:"button",onClick:()=>r(!0),children:"Create User"})})}function T0(l){const r=new Date(l);return Number.isNaN(r.getTime())?l:r.toLocaleString()}const w0="https://parachute.computer/install#connect-mcp-clients";function xm(l){return`${l.replace(/\/+$/,"")}/mcp`}function jm(l,r){return`claude mcp add --transport http parachute-${l} ${xm(r)}`}function _0(l,r,c){return`${jm(l,r)} --header "Authorization: Bearer ${c}"`}function tc({value:l,label:r="Copy"}){const[c,o]=b.useState(!1);return s.jsx("button",{type:"button",className:"secondary",onClick:()=>{typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(l).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},children:c?"Copied ✓":r})}function R0({vaultName:l,vaultUrl:r,embedded:c=!1}){const o=xm(r),f=jm(l,r),[h,y]=b.useState(!1),[v,p]=b.useState({kind:"idle"});async function g(){if(v.kind!=="submitting"){p({kind:"submitting"});try{const O=await mm({scope:`vault:${l}:read vault:${l}:write`});p({kind:"minted",token:O})}catch(O){const A=O instanceof Q?`mint failed (${O.status}): ${O.message}`:O instanceof Error?O.message:String(O);p({kind:"error",message:A})}}}const S=v.kind==="minted"?_0(l,r,v.token.token):null,j=s.jsxs(s.Fragment,{children:[s.jsx("h3",{children:"Connect an MCP client (or connector)"}),s.jsxs("p",{className:"muted",children:["Connect an MCP client — Claude Code, Claude.ai, etc. (sometimes called a connector in ChatGPT and other web UIs) — to the ",s.jsx("code",{children:l})," vault. The client signs in to this hub and reads/writes vault data over MCP."]}),s.jsxs("div",{className:"mcp-field",children:[s.jsx("span",{className:"mcp-field-label",children:"Endpoint"}),s.jsxs("div",{className:"token-box",children:[s.jsx("code",{"data-testid":"mcp-endpoint",children:o}),s.jsx(tc,{value:o})]})]}),s.jsxs("div",{className:"mcp-field",children:[s.jsx("span",{className:"mcp-field-label",children:"Claude Code"}),s.jsxs("div",{className:"token-box",children:[s.jsx("code",{"data-testid":"mcp-add-command",children:f}),s.jsx(tc,{value:f})]}),s.jsx("p",{className:"dim",children:"No token needed — the command triggers browser OAuth on first use (you sign in to this hub and approve access). For other clients, point them at the endpoint above."})]}),s.jsxs("details",{className:"mcp-token-path",open:h,onToggle:O=>y(O.currentTarget.open),children:[s.jsx("summary",{children:"Use a token instead (headless / CI clients)"}),s.jsxs("p",{className:"dim",children:["For clients that can't do browser OAuth, mint a scope-narrow hub token (",s.jsxs("code",{children:["vault:",l,":read vault:",l,":write"]})," ","— not admin) and pass it as a header. Revealed once; copy it now."]}),v.kind==="minted"&&S?s.jsxs("div",{className:"mint-banner","data-testid":"mcp-header-banner",children:[s.jsx("h3",{children:"Token minted"}),s.jsxs("p",{className:"muted",children:["This is the only time the hub shows this token. Copy the command below — it embeds the live token in the ",s.jsx("code",{children:"Authorization"})," header."]}),s.jsxs("div",{className:"token-box",children:[s.jsx("code",{"data-testid":"mcp-header-command",children:S}),s.jsx(tc,{value:S})]}),s.jsxs("p",{className:"warn",children:["⚠ Manage and revoke this token at ",s.jsx("code",{children:"/admin/tokens"}),"."]})]}):s.jsx("div",{className:"actions",children:s.jsx("button",{type:"button",className:"secondary",onClick:()=>{g()},disabled:v.kind==="submitting",children:v.kind==="submitting"?"Minting…":"Mint a token"})}),v.kind==="error"?s.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:s.jsx("code",{children:v.message})}):null]}),s.jsx("p",{className:"dim mcp-docs-link",children:s.jsx("a",{href:w0,target:"_blank",rel:"noreferrer",children:"Full connect docs →"})})]});return c?s.jsx("div",{className:"mcp-connect-card mcp-connect-card-embedded",children:j}):s.jsx("div",{className:"mcp-connect-card",children:j})}const Qh="/vault/admin/";function A0(){const[l,r]=b.useState("detecting"),[c,o]=b.useState({kind:"loading"}),[f,h]=b.useState(0),[y,v]=b.useState({kind:"idle"}),[p,g]=b.useState(null),[S,j]=b.useState({});b.useEffect(()=>{let R=!1;return Ss().then(k=>{if(R)return;const Y=k.modules.find(Z=>Z.short==="vault");if(Y!=null&&Y.installed&&Y.config_ui_url===Qh){r("redirecting"),window.location.replace(Qh);return}r("legacy")}).catch(()=>{R||r("legacy")}),()=>{R=!0}},[]);async function O(R){if(R.managementUrl){v({kind:"minting",name:R.name});try{const k=await hm(R.name),Y=Ky(R.url,R.managementUrl),Z=Y.includes("#")?"&":"#";window.location.assign(`${Y}${Z}token=${k.token}`)}catch(k){const Y=k instanceof Q?`mint failed (${k.status}): ${k.message}`:k instanceof Error?k.message:String(k);v({kind:"error",name:R.name,message:Y})}}}if(b.useEffect(()=>{if(l!=="legacy")return;let R=!1;return gc().then(k=>{R||o({kind:"ok",vaults:k.vaults,moduleInstalled:k.moduleInstalled})}).catch(k=>{if(R)return;const Y=k instanceof Error?k.message:String(k);o({kind:"error",message:Y})}),()=>{R=!0}},[f,l]),b.useEffect(()=>{if(c.kind!=="ok")return;const R=c.vaults.map(Y=>Y.name);if(R.length===0)return;let k=!1;j(Y=>{const Z={...Y};for(const G of R)Z[G]||(Z[G]={kind:"loading"});return Z});for(const Y of R)Zy(Y).then(Z=>{k||j(G=>({...G,[Y]:{kind:"ok",usage:Z}}))}).catch(()=>{k||j(Z=>({...Z,[Y]:{kind:"error"}}))});return()=>{k=!0}},[c]),l!=="legacy")return s.jsxs("div",{children:[s.jsx("div",{className:"list-header",children:s.jsx("h1",{children:"Vaults"})}),s.jsx("p",{className:"muted","data-testid":"vaults-detecting",children:l==="redirecting"?"Opening the vault admin…":"Loading…"})]});if(c.kind==="loading")return s.jsxs("div",{children:[s.jsx("div",{className:"list-header",children:s.jsx("h1",{children:"Vaults"})}),s.jsx("p",{className:"muted",children:"Loading…"})]});if(c.kind==="error")return s.jsxs("div",{children:[s.jsx("div",{className:"list-header",children:s.jsx("h1",{children:"Vaults"})}),s.jsxs("div",{className:"error-banner",children:["Couldn't load vaults: ",s.jsx("code",{children:c.message})]}),s.jsx("button",{type:"button",onClick:()=>h(R=>R+1),className:"secondary",children:"Retry"})]});const A=c.vaults.length===0&&!c.moduleInstalled;return s.jsxs("div",{"data-route-content":"true",children:[s.jsxs("div",{className:"list-header",children:[s.jsxs("h1",{children:["Vaults (",c.vaults.length,")"]}),A?s.jsx(tt,{to:"/modules",children:s.jsx("button",{type:"button",children:"Install vault module"})}):null]}),s.jsxs("p",{className:"muted",children:["Vaults registered with this hub at ",s.jsx("code",{children:"/.well-known/parachute.json"}),"."," ",s.jsx("strong",{children:"Manage"})," opens the vault's own admin app (outside the hub shell); use your browser's back button to return here."]}),c.vaults.length>0?s.jsxs("p",{className:"muted","data-testid":"vaults-legacy-create-hint",children:["To create another vault, upgrade the vault module from ",s.jsx(tt,{to:"/modules",children:"Modules"})," ","(its own admin app includes create), or run"," ",s.jsx("code",{children:"parachute vault create <name>"})," on the host."]}):null,c.vaults.length===0?A?s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No vault module installed."}),s.jsx("p",{className:"muted",children:"The vault backend isn't installed on this hub yet, so there's nothing to provision a vault against. Install it from the Modules page first, then come back here to create your first vault."}),s.jsx("p",{style:{marginTop:"0.75rem"},children:s.jsx(tt,{to:"/modules",children:"Install vault module →"})})]}):s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No vaults yet."}),s.jsx("p",{className:"muted",children:"Create your first vault to start storing tokens, secrets, and notes scoped to this hub."}),s.jsx("p",{style:{marginTop:"0.75rem"},children:s.jsx("a",{href:"/admin/setup?step=vault",children:"Create a vault →"})})]}):s.jsx("div",{style:{marginTop:"1rem"},children:c.vaults.map(R=>{const k=y.kind==="minting"&&y.name===R.name,Y=y.kind==="error"&&y.name===R.name?y:null,Z=p===R.name,G=S[R.name],V=(G==null?void 0:G.kind)==="ok"?`${G.usage.notes} ${G.usage.notes===1?"note":"notes"} · ${Xy(G.usage.totalBytes)}`:(G==null?void 0:G.kind)==="loading"?"…":"—";return s.jsxs("div",{className:"vault-row-group",children:[s.jsxs("div",{className:"vault-row",children:[s.jsxs("div",{className:"body",children:[s.jsxs("div",{className:"name",children:[s.jsx("code",{children:R.name}),s.jsxs("span",{className:"tag muted",title:"Vault version",children:["v",R.version]})]}),s.jsx("div",{className:"dim url",children:s.jsx("code",{children:R.url})}),s.jsx("div",{className:"dim vault-usage","data-testid":`vault-usage-${R.name}`,children:V}),Y?s.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:s.jsx("code",{children:Y.message})}):null]}),s.jsxs("div",{className:"vault-row-actions",children:[s.jsx("button",{type:"button",className:Z?void 0:"secondary","aria-expanded":Z,"aria-label":`Connect an MCP client to vault ${R.name}`,onClick:()=>g(ae=>ae===R.name?null:R.name),children:Z?"Hide connect":"Connect"}),R.managementUrl?s.jsx("button",{type:"button",onClick:()=>{O(R)},disabled:k,"aria-label":`Manage vault ${R.name}`,children:k?"Opening…":"Manage"}):s.jsx("span",{className:"muted",title:"This vault has no admin SPA — manage with parachute-vault on the host.",children:"CLI only"})]})]}),Z?s.jsx(R0,{vaultName:R.name,vaultUrl:R.url}):null]},R.name)})})]})}function Sm(l){return l==="/permissions"||l.startsWith("/permissions/")?"permissions":l==="/tokens"||l.startsWith("/tokens/")?"tokens":l==="/modules"||l.startsWith("/modules/")?"modules":l==="/users"||l.startsWith("/users/")?"users":l==="/connections"||l.startsWith("/connections/")?"connections":l==="/vaults"||l.startsWith("/vaults/")?"vaults":l==="/settings"||l.startsWith("/settings/")?"settings":l.startsWith("/approve-client/")?"approve app":"home"}function M0(l){return`${Sm(l).split(" ").map(c=>c.length>0?c[0].toUpperCase()+c.slice(1):c).join(" ")} · ${fm}`}function z0(){const{pathname:l}=Et(),r=Sm(l),[c,o]=b.useState(null);b.useEffect(()=>{document.title=M0(l)},[l]);const[f,h]=b.useState(!1),[y,v]=b.useState([]);b.useEffect(()=>{let g=!1;return Jy().then(S=>{g||o(S)}).catch(()=>{g||o({hasSession:!1})}),()=>{g=!0}},[]),b.useEffect(()=>{if(!c||!c.hasSession)return;let g=!1;return Ss().then(S=>{g||v(S.modules.filter(j=>j.installed))}).catch(()=>{g||v([])}),()=>{g=!0}},[c]);async function p(g){h(!0);try{await $y(g),window.location.href="/"}catch{h(!1)}}return s.jsxs("div",{className:"page",children:[s.jsxs("nav",{className:"nav",children:[s.jsxs(tt,{to:"/",className:"brand",children:[s.jsx(Dy,{size:18,idSuffix:"spa-nav",className:"brand-mark-icon"}),s.jsx("span",{className:"brand-wordmark",children:fm}),s.jsx("span",{className:"sub",children:r})]}),s.jsx(k0,{me:c,signingOut:f,onSignOut:p}),s.jsx(an,{to:"/",label:"Home",exact:!0}),s.jsx(an,{to:"/connections",label:"Connections"}),s.jsx(an,{to:"/modules",label:"Modules"}),s.jsx(an,{to:"/users",label:"Users"}),s.jsx(an,{to:"/tokens",label:"Tokens"}),s.jsx(an,{to:"/permissions",label:"Permissions"}),s.jsx(an,{to:"/settings",label:"Settings"}),s.jsx("span",{className:"nav-divider","aria-hidden":"true"}),s.jsx(O0,{services:y}),s.jsx("a",{href:"/hub.html",title:"Hub discovery page (top-level)",children:"Discovery"})]}),s.jsxs(ey,{children:[s.jsx(ht,{path:"/",element:s.jsx(Hv,{})}),s.jsx(ht,{path:"/vaults",element:s.jsx(A0,{})}),s.jsx(ht,{path:"/vaults/new",element:s.jsx(Fr,{to:"/vaults",replace:!0})}),s.jsx(ht,{path:"/modules",element:s.jsx(Pv,{})}),s.jsx(ht,{path:"/users",element:s.jsx(x0,{})}),s.jsx(ht,{path:"/connections",element:s.jsx(_v,{})}),s.jsx(ht,{path:"/channels",element:s.jsx(Fr,{to:"/connections",replace:!0})}),s.jsx(ht,{path:"/channels/*",element:s.jsx(Fr,{to:"/connections",replace:!0})}),s.jsx(ht,{path:"/permissions",element:s.jsx(i0,{})}),s.jsx(ht,{path:"/tokens",element:s.jsx(o0,{})}),s.jsx(ht,{path:"/settings",element:s.jsx(r0,{})}),s.jsx(ht,{path:"/approve-client/:clientId",element:s.jsx(Cv,{})}),s.jsx(ht,{path:"*",element:s.jsxs("div",{className:"empty",children:["404 — back to ",s.jsx(tt,{to:"/",children:"Home"}),"."]})})]}),c!=null&&c.hasSession?s.jsx(Sv,{}):null]})}function an({to:l,label:r,alsoActiveAt:c,exact:o}){const{pathname:f}=Et(),v=(o?f===l:f===l||f.startsWith(`${l}/`))||c!==void 0&&f===c;return s.jsx(tt,{to:l,className:v?"nav-link nav-link-active":"nav-link","aria-current":v?"page":void 0,children:r})}function O0({services:l}){return l.length===0?null:s.jsxs("details",{className:"nav-dropdown","data-testid":"installed-services-dropdown",children:[s.jsx("summary",{className:"nav-dropdown-summary",children:"Services"}),s.jsx("div",{className:"nav-dropdown-panel",role:"menu",children:l.map(r=>{const c=r.management_url;return c?s.jsx("a",{className:"nav-dropdown-item",href:c,role:"menuitem","data-testid":`nav-service-${r.short}`,children:r.display_name},r.short):s.jsx("span",{className:"nav-dropdown-item nav-dropdown-item-disabled",role:"menuitem","aria-disabled":"true",title:"This module hasn't shipped an admin UI yet.","data-testid":`nav-service-${r.short}`,children:r.display_name},r.short)})})]})}function k0({me:l,signingOut:r,onSignOut:c}){return l===null?null:l.hasSession?s.jsxs("span",{className:"auth-spa",children:[s.jsxs("span",{className:"muted",children:["Signed in as ",s.jsx("strong",{children:l.user.displayName})]})," ","·"," ",s.jsx("button",{type:"button",className:"auth-spa-signout",disabled:r,onClick:()=>{c(l.csrf)},children:r?"Signing out…":"Sign out"})]}):s.jsx("a",{href:`/login?next=${encodeURIComponent(window.location.pathname)}`,className:"auth-spa",children:"Sign in"})}const Cm=document.getElementById("root");if(!Cm)throw new Error("#root not found");function U0(){const l=window.location.pathname;return l==="/admin"||l.startsWith("/admin/")?"/admin":""}a1.createRoot(Cm).render(s.jsx(b.StrictMode,{children:s.jsx(Ey,{basename:U0(),children:s.jsx(z0,{})})}));
|