@openparachute/hub 0.7.2 → 0.7.3-rc.10

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.
Files changed (66) hide show
  1. package/package.json +1 -1
  2. package/src/__tests__/admin-agent-grants.test.ts +113 -0
  3. package/src/__tests__/admin-vaults.test.ts +20 -5
  4. package/src/__tests__/api-modules.test.ts +65 -10
  5. package/src/__tests__/api-vault-caps.test.ts +232 -0
  6. package/src/__tests__/cli.test.ts +20 -0
  7. package/src/__tests__/hub-command.test.ts +136 -0
  8. package/src/__tests__/hub-origins-env-set.test.ts +273 -0
  9. package/src/__tests__/init.test.ts +148 -0
  10. package/src/__tests__/jwt-sign.test.ts +79 -0
  11. package/src/__tests__/module-manifest.test.ts +3 -1
  12. package/src/__tests__/oauth-client.test.ts +75 -0
  13. package/src/__tests__/oauth-handlers.test.ts +413 -5
  14. package/src/__tests__/public-signup.test.ts +619 -0
  15. package/src/__tests__/rate-limit.test.ts +86 -0
  16. package/src/__tests__/scribe-config.test.ts +117 -0
  17. package/src/__tests__/serve-boot.test.ts +45 -0
  18. package/src/__tests__/serve.test.ts +67 -1
  19. package/src/__tests__/service-spec-discovery.test.ts +22 -2
  20. package/src/__tests__/setup-wizard.test.ts +18 -0
  21. package/src/__tests__/setup.test.ts +129 -15
  22. package/src/__tests__/two-factor-flow.test.ts +94 -0
  23. package/src/__tests__/users.test.ts +33 -0
  24. package/src/__tests__/vault-caps.test.ts +89 -0
  25. package/src/__tests__/vault-hub-origin-env.test.ts +38 -4
  26. package/src/__tests__/wizard-transcription.test.ts +334 -0
  27. package/src/__tests__/wizard.test.ts +146 -0
  28. package/src/account-setup.ts +118 -32
  29. package/src/admin-agent-grants.ts +51 -3
  30. package/src/admin-handlers.ts +53 -16
  31. package/src/admin-login-ui.ts +30 -4
  32. package/src/admin-vaults.ts +9 -1
  33. package/src/api-invites.ts +163 -3
  34. package/src/api-modules-ops.ts +12 -0
  35. package/src/api-modules.ts +47 -13
  36. package/src/api-users.ts +3 -0
  37. package/src/api-vault-caps.ts +206 -0
  38. package/src/cli.ts +35 -1
  39. package/src/commands/hub.ts +173 -0
  40. package/src/commands/init.ts +73 -2
  41. package/src/commands/serve-boot.ts +16 -2
  42. package/src/commands/serve.ts +39 -3
  43. package/src/commands/setup.ts +31 -6
  44. package/src/commands/wizard-transcription.ts +296 -0
  45. package/src/commands/wizard.ts +73 -3
  46. package/src/help.ts +8 -0
  47. package/src/hub-db.ts +108 -1
  48. package/src/hub-origin.ts +64 -0
  49. package/src/hub-server.ts +27 -0
  50. package/src/invites.ts +155 -31
  51. package/src/jwt-sign.ts +72 -3
  52. package/src/module-manifest.ts +23 -9
  53. package/src/oauth-client.ts +102 -12
  54. package/src/oauth-flows-store.ts +12 -0
  55. package/src/oauth-handlers.ts +145 -20
  56. package/src/rate-limit.ts +111 -20
  57. package/src/scribe-config.ts +145 -0
  58. package/src/service-spec.ts +31 -12
  59. package/src/setup-wizard.ts +37 -4
  60. package/src/users.ts +62 -3
  61. package/src/vault-caps.ts +109 -0
  62. package/src/vault-hub-origin-env.ts +109 -16
  63. package/web/ui/dist/assets/{index-DR6R8EFf.css → index--728BX3j.css} +1 -1
  64. package/web/ui/dist/assets/index-DZzX_Enf.js +61 -0
  65. package/web/ui/dist/index.html +2 -2
  66. package/web/ui/dist/assets/index-B5AUE359.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 v of h.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&o(v)}).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 Vr={exports:{}},Yl={};/**
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 Eh;function tv(){if(Eh)return Yl;Eh=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function c(o,f,h){var v=null;if(h!==void 0&&(v=""+h),f.key!==void 0&&(v=""+f.key),"key"in f){h={};for(var y in f)y!=="key"&&(h[y]=f[y])}else h=f;return f=h.ref,{$$typeof:l,type:o,key:v,ref:f!==void 0?f:null,props:h}}return Yl.Fragment=r,Yl.jsx=c,Yl.jsxs=c,Yl}var Th;function av(){return Th||(Th=1,Vr.exports=tv()),Vr.exports}var i=av(),Xr={exports:{}},ce={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var kh;function nv(){if(kh)return ce;kh=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"),v=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),_=Symbol.iterator;function k(N){return N===null||typeof N!="object"?null:(N=_&&N[_]||N["@@iterator"],typeof N=="function"?N:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,q={};function H(N,G,I){this.props=N,this.context=G,this.refs=q,this.updater=I||E}H.prototype.isReactComponent={},H.prototype.setState=function(N,G){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,G,"setState")},H.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function Q(){}Q.prototype=H.prototype;function V(N,G,I){this.props=N,this.context=G,this.refs=q,this.updater=I||E}var P=V.prototype=new Q;P.constructor=V,z(P,H.prototype),P.isPureReactComponent=!0;var J=Array.isArray;function $(){}var w={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function X(N,G,I){var ae=I.ref;return{$$typeof:l,type:N,key:G,ref:ae!==void 0?ae:null,props:I}}function te(N,G){return X(N.type,G,N.props)}function le(N){return typeof N=="object"&&N!==null&&N.$$typeof===l}function ie(N){var G={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(I){return G[I]})}var W=/\/+/g;function ge(N,G){return typeof N=="object"&&N!==null&&N.key!=null?ie(""+N.key):G.toString(36)}function be(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then($,$):(N.status="pending",N.then(function(G){N.status==="pending"&&(N.status="fulfilled",N.value=G)},function(G){N.status==="pending"&&(N.status="rejected",N.reason=G)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function D(N,G,I,ae,oe){var he=typeof N;(he==="undefined"||he==="boolean")&&(N=null);var we=!1;if(N===null)we=!0;else switch(he){case"bigint":case"string":case"number":we=!0;break;case"object":switch(N.$$typeof){case l:case r:we=!0;break;case j:return we=N._init,D(we(N._payload),G,I,ae,oe)}}if(we)return oe=oe(N),we=ae===""?"."+ge(N,0):ae,J(oe)?(I="",we!=null&&(I=we.replace(W,"$&/")+"/"),D(oe,G,I,"",function(Jn){return Jn})):oe!=null&&(le(oe)&&(oe=te(oe,I+(oe.key==null||N&&N.key===oe.key?"":(""+oe.key).replace(W,"$&/")+"/")+we)),G.push(oe)),1;we=0;var lt=ae===""?".":ae+":";if(J(N))for(var Ye=0;Ye<N.length;Ye++)ae=N[Ye],he=lt+ge(ae,Ye),we+=D(ae,G,I,he,oe);else if(Ye=k(N),typeof Ye=="function")for(N=Ye.call(N),Ye=0;!(ae=N.next()).done;)ae=ae.value,he=lt+ge(ae,Ye++),we+=D(ae,G,I,he,oe);else if(he==="object"){if(typeof N.then=="function")return D(be(N),G,I,ae,oe);throw G=String(N),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return we}function K(N,G,I){if(N==null)return N;var ae=[],oe=0;return D(N,ae,"","",function(he){return G.call(I,he,oe++)}),ae}function re(N){if(N._status===-1){var G=N._result;G=G(),G.then(function(I){(N._status===0||N._status===-1)&&(N._status=1,N._result=I)},function(I){(N._status===0||N._status===-1)&&(N._status=2,N._result=I)}),N._status===-1&&(N._status=0,N._result=G)}if(N._status===1)return N._result.default;throw N._result}var ke=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},Me={map:K,forEach:function(N,G,I){K(N,function(){G.apply(this,arguments)},I)},count:function(N){var G=0;return K(N,function(){G++}),G},toArray:function(N){return K(N,function(G){return G})||[]},only:function(N){if(!le(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return ce.Activity=x,ce.Children=Me,ce.Component=H,ce.Fragment=c,ce.Profiler=f,ce.PureComponent=V,ce.StrictMode=o,ce.Suspense=m,ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,ce.__COMPILER_RUNTIME={__proto__:null,c:function(N){return w.H.useMemoCache(N)}},ce.cache=function(N){return function(){return N.apply(null,arguments)}},ce.cacheSignal=function(){return null},ce.cloneElement=function(N,G,I){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var ae=z({},N.props),oe=N.key;if(G!=null)for(he in G.key!==void 0&&(oe=""+G.key),G)!U.call(G,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&G.ref===void 0||(ae[he]=G[he]);var he=arguments.length-2;if(he===1)ae.children=I;else if(1<he){for(var we=Array(he),lt=0;lt<he;lt++)we[lt]=arguments[lt+2];ae.children=we}return X(N.type,oe,ae)},ce.createContext=function(N){return N={$$typeof:v,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:h,_context:N},N},ce.createElement=function(N,G,I){var ae,oe={},he=null;if(G!=null)for(ae in G.key!==void 0&&(he=""+G.key),G)U.call(G,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(oe[ae]=G[ae]);var we=arguments.length-2;if(we===1)oe.children=I;else if(1<we){for(var lt=Array(we),Ye=0;Ye<we;Ye++)lt[Ye]=arguments[Ye+2];oe.children=lt}if(N&&N.defaultProps)for(ae in we=N.defaultProps,we)oe[ae]===void 0&&(oe[ae]=we[ae]);return X(N,he,oe)},ce.createRef=function(){return{current:null}},ce.forwardRef=function(N){return{$$typeof:y,render:N}},ce.isValidElement=le,ce.lazy=function(N){return{$$typeof:j,_payload:{_status:-1,_result:N},_init:re}},ce.memo=function(N,G){return{$$typeof:g,type:N,compare:G===void 0?null:G}},ce.startTransition=function(N){var G=w.T,I={};w.T=I;try{var ae=N(),oe=w.S;oe!==null&&oe(I,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then($,ke)}catch(he){ke(he)}finally{G!==null&&I.types!==null&&(G.types=I.types),w.T=G}},ce.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},ce.use=function(N){return w.H.use(N)},ce.useActionState=function(N,G,I){return w.H.useActionState(N,G,I)},ce.useCallback=function(N,G){return w.H.useCallback(N,G)},ce.useContext=function(N){return w.H.useContext(N)},ce.useDebugValue=function(){},ce.useDeferredValue=function(N,G){return w.H.useDeferredValue(N,G)},ce.useEffect=function(N,G){return w.H.useEffect(N,G)},ce.useEffectEvent=function(N){return w.H.useEffectEvent(N)},ce.useId=function(){return w.H.useId()},ce.useImperativeHandle=function(N,G,I){return w.H.useImperativeHandle(N,G,I)},ce.useInsertionEffect=function(N,G){return w.H.useInsertionEffect(N,G)},ce.useLayoutEffect=function(N,G){return w.H.useLayoutEffect(N,G)},ce.useMemo=function(N,G){return w.H.useMemo(N,G)},ce.useOptimistic=function(N,G){return w.H.useOptimistic(N,G)},ce.useReducer=function(N,G,I){return w.H.useReducer(N,G,I)},ce.useRef=function(N){return w.H.useRef(N)},ce.useState=function(N){return w.H.useState(N)},ce.useSyncExternalStore=function(N,G,I){return w.H.useSyncExternalStore(N,G,I)},ce.useTransition=function(){return w.H.useTransition()},ce.version="19.2.5",ce}var _h;function oc(){return _h||(_h=1,Xr.exports=nv()),Xr.exports}var b=oc(),Qr={exports:{}},Gl={},$r={exports:{}},Jr={};/**
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 Ah;function lv(){return Ah||(Ah=1,(function(l){function r(D,K){var re=D.length;D.push(K);e:for(;0<re;){var ke=re-1>>>1,Me=D[ke];if(0<f(Me,K))D[ke]=K,D[re]=Me,re=ke;else break e}}function c(D){return D.length===0?null:D[0]}function o(D){if(D.length===0)return null;var K=D[0],re=D.pop();if(re!==K){D[0]=re;e:for(var ke=0,Me=D.length,N=Me>>>1;ke<N;){var G=2*(ke+1)-1,I=D[G],ae=G+1,oe=D[ae];if(0>f(I,re))ae<Me&&0>f(oe,I)?(D[ke]=oe,D[ae]=re,ke=ae):(D[ke]=I,D[G]=re,ke=G);else if(ae<Me&&0>f(oe,re))D[ke]=oe,D[ae]=re,ke=ae;else break e}}return K}function f(D,K){var re=D.sortIndex-K.sortIndex;return re!==0?re:D.id-K.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 v=Date,y=v.now();l.unstable_now=function(){return v.now()-y}}var m=[],g=[],j=1,x=null,_=3,k=!1,E=!1,z=!1,q=!1,H=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function P(D){for(var K=c(g);K!==null;){if(K.callback===null)o(g);else if(K.startTime<=D)o(g),K.sortIndex=K.expirationTime,r(m,K);else break;K=c(g)}}function J(D){if(z=!1,P(D),!E)if(c(m)!==null)E=!0,$||($=!0,ie());else{var K=c(g);K!==null&&be(J,K.startTime-D)}}var $=!1,w=-1,U=5,X=-1;function te(){return q?!0:!(l.unstable_now()-X<U)}function le(){if(q=!1,$){var D=l.unstable_now();X=D;var K=!0;try{e:{E=!1,z&&(z=!1,Q(w),w=-1),k=!0;var re=_;try{t:{for(P(D),x=c(m);x!==null&&!(x.expirationTime>D&&te());){var ke=x.callback;if(typeof ke=="function"){x.callback=null,_=x.priorityLevel;var Me=ke(x.expirationTime<=D);if(D=l.unstable_now(),typeof Me=="function"){x.callback=Me,P(D),K=!0;break t}x===c(m)&&o(m),P(D)}else o(m);x=c(m)}if(x!==null)K=!0;else{var N=c(g);N!==null&&be(J,N.startTime-D),K=!1}}break e}finally{x=null,_=re,k=!1}K=void 0}}finally{K?ie():$=!1}}}var ie;if(typeof V=="function")ie=function(){V(le)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,ge=W.port2;W.port1.onmessage=le,ie=function(){ge.postMessage(null)}}else ie=function(){H(le,0)};function be(D,K){w=H(function(){D(l.unstable_now())},K)}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(D){D.callback=null},l.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<D?Math.floor(1e3/D):5},l.unstable_getCurrentPriorityLevel=function(){return _},l.unstable_next=function(D){switch(_){case 1:case 2:case 3:var K=3;break;default:K=_}var re=_;_=K;try{return D()}finally{_=re}},l.unstable_requestPaint=function(){q=!0},l.unstable_runWithPriority=function(D,K){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var re=_;_=D;try{return K()}finally{_=re}},l.unstable_scheduleCallback=function(D,K,re){var ke=l.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?ke+re:ke):re=ke,D){case 1:var Me=-1;break;case 2:Me=250;break;case 5:Me=1073741823;break;case 4:Me=1e4;break;default:Me=5e3}return Me=re+Me,D={id:j++,callback:K,priorityLevel:D,startTime:re,expirationTime:Me,sortIndex:-1},re>ke?(D.sortIndex=re,r(g,D),c(m)===null&&D===c(g)&&(z?(Q(w),w=-1):z=!0,be(J,re-ke))):(D.sortIndex=Me,r(m,D),E||k||(E=!0,$||($=!0,ie()))),D},l.unstable_shouldYield=te,l.unstable_wrapCallback=function(D){var K=_;return function(){var re=_;_=K;try{return D.apply(this,arguments)}finally{_=re}}}})(Jr)),Jr}var Rh;function iv(){return Rh||(Rh=1,$r.exports=lv()),$r.exports}var Kr={exports:{}},at={};/**
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 Mh;function sv(){if(Mh)return at;Mh=1;var l=oc();function r(m){var g="https://react.dev/errors/"+m;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var j=2;j<arguments.length;j++)g+="&args[]="+encodeURIComponent(arguments[j])}return"Minified React error #"+m+"; 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(m,g,j){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:x==null?null:""+x,children:m,containerInfo:g,implementation:j}}var v=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(m,g){if(m==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return at.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,at.createPortal=function(m,g){var j=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(m,g,null,j)},at.flushSync=function(m){var g=v.T,j=o.p;try{if(v.T=null,o.p=2,m)return m()}finally{v.T=g,o.p=j,o.d.f()}},at.preconnect=function(m,g){typeof m=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,o.d.C(m,g))},at.prefetchDNS=function(m){typeof m=="string"&&o.d.D(m)},at.preinit=function(m,g){if(typeof m=="string"&&g&&typeof g.as=="string"){var j=g.as,x=y(j,g.crossOrigin),_=typeof g.integrity=="string"?g.integrity:void 0,k=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;j==="style"?o.d.S(m,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:x,integrity:_,fetchPriority:k}):j==="script"&&o.d.X(m,{crossOrigin:x,integrity:_,fetchPriority:k,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},at.preinitModule=function(m,g){if(typeof m=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var j=y(g.as,g.crossOrigin);o.d.M(m,{crossOrigin:j,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&o.d.M(m)},at.preload=function(m,g){if(typeof m=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var j=g.as,x=y(j,g.crossOrigin);o.d.L(m,j,{crossOrigin:x,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})}},at.preloadModule=function(m,g){if(typeof m=="string")if(g){var j=y(g.as,g.crossOrigin);o.d.m(m,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:j,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else o.d.m(m)},at.requestFormReset=function(m){o.d.r(m)},at.unstable_batchedUpdates=function(m,g){return m(g)},at.useFormState=function(m,g,j){return v.H.useFormState(m,g,j)},at.useFormStatus=function(){return v.H.useHostTransitionStatus()},at.version="19.2.5",at}var zh;function uv(){if(zh)return Kr.exports;zh=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(),Kr.exports=sv(),Kr.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 Oh;function rv(){if(Oh)return Gl;Oh=1;var l=iv(),r=oc(),c=uv();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 v(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(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 m(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 s=a.return;if(s===null)break;var u=s.alternate;if(u===null){if(n=s.return,n!==null){a=n;continue}break}if(s.child===u.child){for(u=s.child;u;){if(u===a)return m(s),e;if(u===n)return m(s),t;u=u.sibling}throw Error(o(188))}if(a.return!==n.return)a=s,n=u;else{for(var d=!1,p=s.child;p;){if(p===a){d=!0,a=s,n=u;break}if(p===n){d=!0,n=s,a=u;break}p=p.sibling}if(!d){for(p=u.child;p;){if(p===a){d=!0,a=u,n=s;break}if(p===n){d=!0,n=u,a=s;break}p=p.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 j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,_=Symbol.for("react.element"),k=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),V=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),te=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function ie(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var W=Symbol.for("react.client.reference");function ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===W?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case z:return"Fragment";case H:return"Profiler";case q:return"StrictMode";case J:return"Suspense";case $:return"SuspenseList";case X:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case V:return e.displayName||"Context";case Q:return(e._context.displayName||"Context")+".Consumer";case P:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case w:return t=e.displayName||null,t!==null?t:ge(e.type)||"Memo";case U:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}var be=Array.isArray,D=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},ke=[],Me=-1;function N(e){return{current:e}}function G(e){0>Me||(e.current=ke[Me],ke[Me]=null,Me--)}function I(e,t){Me++,ke[Me]=e.current,e.current=t}var ae=N(null),oe=N(null),he=N(null),we=N(null);function lt(e,t){switch(I(he,t),I(oe,e),I(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kf(t),e=Ff(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(ae),I(ae,e)}function Ye(){G(ae),G(oe),G(he)}function Jn(e){e.memoizedState!==null&&I(we,e);var t=ae.current,a=Ff(t,e.type);t!==a&&(I(oe,e),I(ae,a))}function Kl(e){oe.current===e&&(G(ae),G(oe)),we.current===e&&(G(we),Hl._currentValue=re)}var Es,Cc;function Ba(e){if(Es===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Es=t&&t[1]||"",Cc=-1<a.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+Es+e+Cc}var Ts=!1;function ks(e,t){if(!e||Ts)return"";Ts=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(O){var M=O}Reflect.construct(e,[],Y)}else{try{Y.call()}catch(O){M=O}e.call(Y.prototype)}}else{try{throw Error()}catch(O){M=O}(Y=e())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(O){if(O&&M&&typeof O.stack=="string")return[O.stack,M.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=n.DetermineComponentFrameRoot(),d=u[0],p=u[1];if(d&&p){var S=d.split(`
44
- `),R=p.split(`
45
- `);for(s=n=0;n<S.length&&!S[n].includes("DetermineComponentFrameRoot");)n++;for(;s<R.length&&!R[s].includes("DetermineComponentFrameRoot");)s++;if(n===S.length||s===R.length)for(n=S.length-1,s=R.length-1;1<=n&&0<=s&&S[n]!==R[s];)s--;for(;1<=n&&0<=s;n--,s--)if(S[n]!==R[s]){if(n!==1||s!==1)do if(n--,s--,0>s||S[n]!==R[s]){var L=`
46
- `+S[n].replace(" at new "," at ");return e.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",e.displayName)),L}while(1<=n&&0<=s);break}}}finally{Ts=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ba(a):""}function Mm(e,t){switch(e.tag){case 26:case 27:case 5:return Ba(e.type);case 16:return Ba("Lazy");case 13:return e.child!==t&&t!==null?Ba("Suspense Fallback"):Ba("Suspense");case 19:return Ba("SuspenseList");case 0:case 15:return ks(e.type,!1);case 11:return ks(e.type.render,!1);case 1:return ks(e.type,!0);case 31:return Ba("Activity");default:return""}}function Nc(e){try{var t="",a=null;do t+=Mm(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
47
- Error generating stack: `+n.message+`
48
- `+n.stack}}var _s=Object.prototype.hasOwnProperty,As=l.unstable_scheduleCallback,Rs=l.unstable_cancelCallback,zm=l.unstable_shouldYield,Om=l.unstable_requestPaint,mt=l.unstable_now,Um=l.unstable_getCurrentPriorityLevel,wc=l.unstable_ImmediatePriority,Ec=l.unstable_UserBlockingPriority,Fl=l.unstable_NormalPriority,Dm=l.unstable_LowPriority,Tc=l.unstable_IdlePriority,Hm=l.log,Lm=l.unstable_setDisableYieldValue,Kn=null,pt=null;function fa(e){if(typeof Hm=="function"&&Lm(e),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode(Kn,e)}catch{}}var gt=Math.clz32?Math.clz32:Ym,Bm=Math.log,qm=Math.LN2;function Ym(e){return e>>>=0,e===0?32:31-(Bm(e)/qm|0)|0}var Wl=256,Il=262144,Pl=4194304;function qa(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072: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 ei(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var s=0,u=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var p=n&134217727;return p!==0?(n=p&~u,n!==0?s=qa(n):(d&=p,d!==0?s=qa(d):a||(a=p&~e,a!==0&&(s=qa(a))))):(p=n&~u,p!==0?s=qa(p):d!==0?s=qa(d):a||(a=n&~e,a!==0&&(s=qa(a)))),s===0?0:t!==0&&t!==s&&(t&u)===0&&(u=s&-s,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:s}function Fn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Gm(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 kc(){var e=Pl;return Pl<<=1,(Pl&62914560)===0&&(Pl=4194304),e}function Ms(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Wn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Zm(e,t,a,n,s,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 p=e.entanglements,S=e.expirationTimes,R=e.hiddenUpdates;for(a=d&~a;0<a;){var L=31-gt(a),Y=1<<L;p[L]=0,S[L]=-1;var M=R[L];if(M!==null)for(R[L]=null,L=0;L<M.length;L++){var O=M[L];O!==null&&(O.lane&=-536870913)}a&=~Y}n!==0&&_c(e,n,0),u!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=u&~(d&~t))}function _c(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 Ac(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-gt(a),s=1<<n;s&t|e[n]&t&&(e[n]|=t),a&=~s}}function Rc(e,t){var a=t&-t;return a=(a&42)!==0?1:zs(a),(a&(e.suspendedLanes|t))!==0?0:a}function zs(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 Os(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Mc(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:bh(e.type))}function zc(e,t){var a=K.p;try{return K.p=e,t()}finally{K.p=a}}var ha=Math.random().toString(36).slice(2),We="__reactFiber$"+ha,ut="__reactProps$"+ha,sn="__reactContainer$"+ha,Us="__reactEvents$"+ha,Vm="__reactListeners$"+ha,Xm="__reactHandles$"+ha,Oc="__reactResources$"+ha,In="__reactMarker$"+ha;function Ds(e){delete e[We],delete e[ut],delete e[Us],delete e[Vm],delete e[Xm]}function un(e){var t=e[We];if(t)return t;for(var a=e.parentNode;a;){if(t=a[sn]||a[We]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=nh(e);e!==null;){if(a=e[We])return a;e=nh(e)}return t}e=a,a=e.parentNode}return null}function rn(e){if(e=e[We]||e[sn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Pn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function cn(e){var t=e[Oc];return t||(t=e[Oc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ke(e){e[In]=!0}var Uc=new Set,Dc={};function Ya(e,t){on(e,t),on(e+"Capture",t)}function on(e,t){for(Dc[e]=t,e=0;e<t.length;e++)Uc.add(t[e])}var Qm=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]*$"),Hc={},Lc={};function $m(e){return _s.call(Lc,e)?!0:_s.call(Hc,e)?!1:Qm.test(e)?Lc[e]=!0:(Hc[e]=!0,!1)}function ti(e,t,a){if($m(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 ai(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 $t(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 Et(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Bc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Jm(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 s=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.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 Hs(e){if(!e._valueTracker){var t=Bc(e)?"checked":"value";e._valueTracker=Jm(e,t,""+e[t])}}function qc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=Bc(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function ni(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 Km=/[\n"\\]/g;function Tt(e){return e.replace(Km,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ls(e,t,a,n,s,u,d,p){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=""+Et(t)):e.value!==""+Et(t)&&(e.value=""+Et(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?Bs(e,d,Et(t)):a!=null?Bs(e,d,Et(a)):n!=null&&e.removeAttribute("value"),s==null&&u!=null&&(e.defaultChecked=!!u),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+Et(p):e.removeAttribute("name")}function Yc(e,t,a,n,s,u,d,p){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)){Hs(e);return}a=a!=null?""+Et(a):"",t=t!=null?""+Et(t):a,p||t===e.value||(e.value=t),e.defaultValue=t}n=n??s,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=p?e.checked:!!n,e.defaultChecked=!!n,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),Hs(e)}function Bs(e,t,a){t==="number"&&ni(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function dn(e,t,a,n){if(e=e.options,t){t={};for(var s=0;s<a.length;s++)t["$"+a[s]]=!0;for(a=0;a<e.length;a++)s=t.hasOwnProperty("$"+e[a].value),e[a].selected!==s&&(e[a].selected=s),s&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Et(a),t=null,s=0;s<e.length;s++){if(e[s].value===a){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Gc(e,t,a){if(t!=null&&(t=""+Et(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Et(a):""}function Zc(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(be(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Et(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Hs(e)}function fn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Fm=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 Vc(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||Fm.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Xc(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 s in t)n=t[s],t.hasOwnProperty(s)&&a[s]!==n&&Vc(e,s,n)}else for(var u in t)t.hasOwnProperty(u)&&Vc(e,u,t[u])}function qs(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 Wm=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"]]),Im=/^[\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 li(e){return Im.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Jt(){}var Ys=null;function Gs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hn=null,mn=null;function Qc(e){var t=rn(e);if(t&&(e=t.stateNode)){var a=e[ut]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ls(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="'+Tt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var s=n[ut]||null;if(!s)throw Error(o(90));Ls(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&qc(n)}break e;case"textarea":Gc(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&dn(e,!!a.multiple,t,!1)}}}var Zs=!1;function $c(e,t,a){if(Zs)return e(t,a);Zs=!0;try{var n=e(t);return n}finally{if(Zs=!1,(hn!==null||mn!==null)&&(Xi(),hn&&(t=hn,e=mn,mn=hn=null,Qc(t),e)))for(t=0;t<e.length;t++)Qc(e[t])}}function el(e,t){var a=e.stateNode;if(a===null)return null;var n=a[ut]||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 Kt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vs=!1;if(Kt)try{var tl={};Object.defineProperty(tl,"passive",{get:function(){Vs=!0}}),window.addEventListener("test",tl,tl),window.removeEventListener("test",tl,tl)}catch{Vs=!1}var ma=null,Xs=null,ii=null;function Jc(){if(ii)return ii;var e,t=Xs,a=t.length,n,s="value"in ma?ma.value:ma.textContent,u=s.length;for(e=0;e<a&&t[e]===s[e];e++);var d=a-e;for(n=1;n<=d&&t[a-n]===s[u-n];n++);return ii=s.slice(e,1<n?1-n:void 0)}function si(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 ui(){return!0}function Kc(){return!1}function rt(e){function t(a,n,s,u,d){this._reactName=a,this._targetInst=s,this.type=n,this.nativeEvent=u,this.target=d,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(a=e[p],this[p]=a?a(u):u[p]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ui:Kc,this.isPropagationStopped=Kc,this}return x(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=ui)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ui)},persist:function(){},isPersistent:ui}),t}var Ga={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ri=rt(Ga),al=x({},Ga,{view:0,detail:0}),Pm=rt(al),Qs,$s,nl,ci=x({},al,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ks,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!==nl&&(nl&&e.type==="mousemove"?(Qs=e.screenX-nl.screenX,$s=e.screenY-nl.screenY):$s=Qs=0,nl=e),Qs)},movementY:function(e){return"movementY"in e?e.movementY:$s}}),Fc=rt(ci),ep=x({},ci,{dataTransfer:0}),tp=rt(ep),ap=x({},al,{relatedTarget:0}),Js=rt(ap),np=x({},Ga,{animationName:0,elapsedTime:0,pseudoElement:0}),lp=rt(np),ip=x({},Ga,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),sp=rt(ip),up=x({},Ga,{data:0}),Wc=rt(up),rp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cp={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},op={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=op[e])?!!t[e]:!1}function Ks(){return dp}var fp=x({},al,{key:function(e){if(e.key){var t=rp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=si(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?cp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ks,charCode:function(e){return e.type==="keypress"?si(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?si(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),hp=rt(fp),mp=x({},ci,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ic=rt(mp),pp=x({},al,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ks}),gp=rt(pp),vp=x({},Ga,{propertyName:0,elapsedTime:0,pseudoElement:0}),yp=rt(vp),bp=x({},ci,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),xp=rt(bp),jp=x({},Ga,{newState:0,oldState:0}),Sp=rt(jp),Cp=[9,13,27,32],Fs=Kt&&"CompositionEvent"in window,ll=null;Kt&&"documentMode"in document&&(ll=document.documentMode);var Np=Kt&&"TextEvent"in window&&!ll,Pc=Kt&&(!Fs||ll&&8<ll&&11>=ll),eo=" ",to=!1;function ao(e,t){switch(e){case"keyup":return Cp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function no(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pn=!1;function wp(e,t){switch(e){case"compositionend":return no(t);case"keypress":return t.which!==32?null:(to=!0,eo);case"textInput":return e=t.data,e===eo&&to?null:e;default:return null}}function Ep(e,t){if(pn)return e==="compositionend"||!Fs&&ao(e,t)?(e=Jc(),ii=Xs=ma=null,pn=!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 Pc&&t.locale!=="ko"?null:t.data;default:return null}}var Tp={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 lo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Tp[e.type]:t==="textarea"}function io(e,t,a,n){hn?mn?mn.push(n):mn=[n]:hn=n,t=Ii(t,"onChange"),0<t.length&&(a=new ri("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var il=null,sl=null;function kp(e){Zf(e,0)}function oi(e){var t=Pn(e);if(qc(t))return e}function so(e,t){if(e==="change")return t}var uo=!1;if(Kt){var Ws;if(Kt){var Is="oninput"in document;if(!Is){var ro=document.createElement("div");ro.setAttribute("oninput","return;"),Is=typeof ro.oninput=="function"}Ws=Is}else Ws=!1;uo=Ws&&(!document.documentMode||9<document.documentMode)}function co(){il&&(il.detachEvent("onpropertychange",oo),sl=il=null)}function oo(e){if(e.propertyName==="value"&&oi(sl)){var t=[];io(t,sl,e,Gs(e)),$c(kp,t)}}function _p(e,t,a){e==="focusin"?(co(),il=t,sl=a,il.attachEvent("onpropertychange",oo)):e==="focusout"&&co()}function Ap(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return oi(sl)}function Rp(e,t){if(e==="click")return oi(t)}function Mp(e,t){if(e==="input"||e==="change")return oi(t)}function zp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vt=typeof Object.is=="function"?Object.is:zp;function ul(e,t){if(vt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var s=a[n];if(!_s.call(t,s)||!vt(e[s],t[s]))return!1}return!0}function fo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ho(e,t){var a=fo(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=fo(a)}}function mo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function po(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ni(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=ni(e.document)}return t}function Ps(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Op=Kt&&"documentMode"in document&&11>=document.documentMode,gn=null,eu=null,rl=null,tu=!1;function go(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;tu||gn==null||gn!==ni(n)||(n=gn,"selectionStart"in n&&Ps(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}),rl&&ul(rl,n)||(rl=n,n=Ii(eu,"onSelect"),0<n.length&&(t=new ri("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=gn)))}function Za(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var vn={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionrun:Za("Transition","TransitionRun"),transitionstart:Za("Transition","TransitionStart"),transitioncancel:Za("Transition","TransitionCancel"),transitionend:Za("Transition","TransitionEnd")},au={},vo={};Kt&&(vo=document.createElement("div").style,"AnimationEvent"in window||(delete vn.animationend.animation,delete vn.animationiteration.animation,delete vn.animationstart.animation),"TransitionEvent"in window||delete vn.transitionend.transition);function Va(e){if(au[e])return au[e];if(!vn[e])return e;var t=vn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in vo)return au[e]=t[a];return e}var yo=Va("animationend"),bo=Va("animationiteration"),xo=Va("animationstart"),Up=Va("transitionrun"),Dp=Va("transitionstart"),Hp=Va("transitioncancel"),jo=Va("transitionend"),So=new Map,nu="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(" ");nu.push("scrollEnd");function Ht(e,t){So.set(e,t),Ya(t,[e])}var di=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)},kt=[],yn=0,lu=0;function fi(){for(var e=yn,t=lu=yn=0;t<e;){var a=kt[t];kt[t++]=null;var n=kt[t];kt[t++]=null;var s=kt[t];kt[t++]=null;var u=kt[t];if(kt[t++]=null,n!==null&&s!==null){var d=n.pending;d===null?s.next=s:(s.next=d.next,d.next=s),n.pending=s}u!==0&&Co(a,s,u)}}function hi(e,t,a,n){kt[yn++]=e,kt[yn++]=t,kt[yn++]=a,kt[yn++]=n,lu|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function iu(e,t,a,n){return hi(e,t,a,n),mi(e)}function Xa(e,t){return hi(e,null,null,t),mi(e)}function Co(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var s=!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||(s=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,s&&t!==null&&(s=31-gt(a),e=u.hiddenUpdates,n=e[s],n===null?e[s]=[t]:n.push(t),t.lane=a|536870912),u):null}function mi(e){if(50<Al)throw Al=0,mr=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var bn={};function Lp(e,t,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,t,a,n){return new Lp(e,t,a,n)}function su(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ft(e,t){var a=e.alternate;return a===null?(a=yt(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 No(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 pi(e,t,a,n,s,u){var d=0;if(n=e,typeof e=="function")su(e)&&(d=1);else if(typeof e=="string")d=Zg(e,a,ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case X:return e=yt(31,a,t,s),e.elementType=X,e.lanes=u,e;case z:return Qa(a.children,s,u,t);case q:d=8,s|=24;break;case H:return e=yt(12,a,t,s|2),e.elementType=H,e.lanes=u,e;case J:return e=yt(13,a,t,s),e.elementType=J,e.lanes=u,e;case $:return e=yt(19,a,t,s),e.elementType=$,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V:d=10;break e;case Q:d=9;break e;case P:d=11;break e;case w: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=yt(d,a,t,s),t.elementType=e,t.type=n,t.lanes=u,t}function Qa(e,t,a,n){return e=yt(7,e,n,t),e.lanes=a,e}function uu(e,t,a){return e=yt(6,e,null,t),e.lanes=a,e}function wo(e){var t=yt(18,null,null,0);return t.stateNode=e,t}function ru(e,t,a){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Eo=new WeakMap;function _t(e,t){if(typeof e=="object"&&e!==null){var a=Eo.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Nc(t)},Eo.set(e,t),t)}return{value:e,source:t,stack:Nc(t)}}var xn=[],jn=0,gi=null,cl=0,At=[],Rt=0,pa=null,Gt=1,Zt="";function Wt(e,t){xn[jn++]=cl,xn[jn++]=gi,gi=e,cl=t}function To(e,t,a){At[Rt++]=Gt,At[Rt++]=Zt,At[Rt++]=pa,pa=e;var n=Gt;e=Zt;var s=32-gt(n)-1;n&=~(1<<s),a+=1;var u=32-gt(t)+s;if(30<u){var d=s-s%5;u=(n&(1<<d)-1).toString(32),n>>=d,s-=d,Gt=1<<32-gt(t)+s|a<<s|n,Zt=u+e}else Gt=1<<u|a<<s|n,Zt=e}function cu(e){e.return!==null&&(Wt(e,1),To(e,1,0))}function ou(e){for(;e===gi;)gi=xn[--jn],xn[jn]=null,cl=xn[--jn],xn[jn]=null;for(;e===pa;)pa=At[--Rt],At[Rt]=null,Zt=At[--Rt],At[Rt]=null,Gt=At[--Rt],At[Rt]=null}function ko(e,t){At[Rt++]=Gt,At[Rt++]=Zt,At[Rt++]=pa,Gt=t.id,Zt=t.overflow,pa=e}var Ie=null,Ue=null,xe=!1,ga=null,Mt=!1,du=Error(o(519));function va(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ol(_t(t,e)),du}function _o(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[We]=e,t[ut]=n,a){case"dialog":pe("cancel",t),pe("close",t);break;case"iframe":case"object":case"embed":pe("load",t);break;case"video":case"audio":for(a=0;a<Ml.length;a++)pe(Ml[a],t);break;case"source":pe("error",t);break;case"img":case"image":case"link":pe("error",t),pe("load",t);break;case"details":pe("toggle",t);break;case"input":pe("invalid",t),Yc(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":pe("invalid",t);break;case"textarea":pe("invalid",t),Zc(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||$f(t.textContent,a)?(n.popover!=null&&(pe("beforetoggle",t),pe("toggle",t)),n.onScroll!=null&&pe("scroll",t),n.onScrollEnd!=null&&pe("scrollend",t),n.onClick!=null&&(t.onclick=Jt),t=!0):t=!1,t||va(e,!0)}function Ao(e){for(Ie=e.return;Ie;)switch(Ie.tag){case 5:case 31:case 13:Mt=!1;return;case 27:case 3:Mt=!0;return;default:Ie=Ie.return}}function Sn(e){if(e!==Ie)return!1;if(!xe)return Ao(e),xe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||_r(e.type,e.memoizedProps)),a=!a),a&&Ue&&va(e),Ao(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ue=ah(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ue=ah(e)}else t===27?(t=Ue,Ra(e.type)?(e=Or,Or=null,Ue=e):Ue=t):Ue=Ie?Ot(e.stateNode.nextSibling):null;return!0}function $a(){Ue=Ie=null,xe=!1}function fu(){var e=ga;return e!==null&&(ft===null?ft=e:ft.push.apply(ft,e),ga=null),e}function ol(e){ga===null?ga=[e]:ga.push(e)}var hu=N(null),Ja=null,It=null;function ya(e,t,a){I(hu,t._currentValue),t._currentValue=a}function Pt(e){e._currentValue=hu.current,G(hu)}function mu(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 pu(e,t,a,n){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var u=s.dependencies;if(u!==null){var d=s.child;u=u.firstContext;e:for(;u!==null;){var p=u;u=s;for(var S=0;S<t.length;S++)if(p.context===t[S]){u.lanes|=a,p=u.alternate,p!==null&&(p.lanes|=a),mu(u.return,a,e),n||(d=null);break e}u=p.next}}else if(s.tag===18){if(d=s.return,d===null)throw Error(o(341));d.lanes|=a,u=d.alternate,u!==null&&(u.lanes|=a),mu(d,a,e),d=null}else d=s.child;if(d!==null)d.return=s;else for(d=s;d!==null;){if(d===e){d=null;break}if(s=d.sibling,s!==null){s.return=d.return,d=s;break}d=d.return}s=d}}function Cn(e,t,a,n){e=null;for(var s=t,u=!1;s!==null;){if(!u){if((s.flags&524288)!==0)u=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var d=s.alternate;if(d===null)throw Error(o(387));if(d=d.memoizedProps,d!==null){var p=s.type;vt(s.pendingProps.value,d.value)||(e!==null?e.push(p):e=[p])}}else if(s===we.current){if(d=s.alternate,d===null)throw Error(o(387));d.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Hl):e=[Hl])}s=s.return}e!==null&&pu(t,e,a,n),t.flags|=262144}function vi(e){for(e=e.firstContext;e!==null;){if(!vt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ka(e){Ja=e,It=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Pe(e){return Ro(Ja,e)}function yi(e,t){return Ja===null&&Ka(e),Ro(e,t)}function Ro(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},It===null){if(e===null)throw Error(o(308));It=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else It=It.next=t;return a}var Bp=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()})}},qp=l.unstable_scheduleCallback,Yp=l.unstable_NormalPriority,Ve={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function gu(){return{controller:new Bp,data:new Map,refCount:0}}function dl(e){e.refCount--,e.refCount===0&&qp(Yp,function(){e.controller.abort()})}var fl=null,vu=0,Nn=0,wn=null;function Gp(e,t){if(fl===null){var a=fl=[];vu=0,Nn=xr(),wn={status:"pending",value:void 0,then:function(n){a.push(n)}}}return vu++,t.then(Mo,Mo),t}function Mo(){if(--vu===0&&fl!==null){wn!==null&&(wn.status="fulfilled");var e=fl;fl=null,Nn=0,wn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Zp(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(s){a.push(s)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var s=0;s<a.length;s++)(0,a[s])(t)},function(s){for(n.status="rejected",n.reason=s,s=0;s<a.length;s++)(0,a[s])(void 0)}),n}var zo=D.S;D.S=function(e,t){vf=mt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Gp(e,t),zo!==null&&zo(e,t)};var Fa=N(null);function yu(){var e=Fa.current;return e!==null?e:ze.pooledCache}function bi(e,t){t===null?I(Fa,Fa.current):I(Fa,t.pool)}function Oo(){var e=yu();return e===null?null:{parent:Ve._currentValue,pool:e}}var En=Error(o(460)),bu=Error(o(474)),xi=Error(o(542)),ji={then:function(){}};function Uo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Do(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,Lo(e),e;default:if(typeof t.status=="string")t.then(Jt,Jt);else{if(e=ze,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=n}},function(n){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Lo(e),e}throw Ia=t,En}}function Wa(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ia=a,En):a}}var Ia=null;function Ho(){if(Ia===null)throw Error(o(459));var e=Ia;return Ia=null,e}function Lo(e){if(e===En||e===xi)throw Error(o(483))}var Tn=null,hl=0;function Si(e){var t=hl;return hl+=1,Tn===null&&(Tn=[]),Do(Tn,e,t)}function ml(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ci(e,t){throw t.$$typeof===_?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Bo(e){function t(T,C){if(e){var A=T.deletions;A===null?(T.deletions=[C],T.flags|=16):A.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 s(T,C){return T=Ft(T,C),T.index=0,T.sibling=null,T}function u(T,C,A){return T.index=A,e?(A=T.alternate,A!==null?(A=A.index,A<C?(T.flags|=67108866,C):A):(T.flags|=67108866,C)):(T.flags|=1048576,C)}function d(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function p(T,C,A,B){return C===null||C.tag!==6?(C=uu(A,T.mode,B),C.return=T,C):(C=s(C,A),C.return=T,C)}function S(T,C,A,B){var se=A.type;return se===z?L(T,C,A.props.children,B,A.key):C!==null&&(C.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===U&&Wa(se)===C.type)?(C=s(C,A.props),ml(C,A),C.return=T,C):(C=pi(A.type,A.key,A.props,null,T.mode,B),ml(C,A),C.return=T,C)}function R(T,C,A,B){return C===null||C.tag!==4||C.stateNode.containerInfo!==A.containerInfo||C.stateNode.implementation!==A.implementation?(C=ru(A,T.mode,B),C.return=T,C):(C=s(C,A.children||[]),C.return=T,C)}function L(T,C,A,B,se){return C===null||C.tag!==7?(C=Qa(A,T.mode,B,se),C.return=T,C):(C=s(C,A),C.return=T,C)}function Y(T,C,A){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=uu(""+C,T.mode,A),C.return=T,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case k:return A=pi(C.type,C.key,C.props,null,T.mode,A),ml(A,C),A.return=T,A;case E:return C=ru(C,T.mode,A),C.return=T,C;case U:return C=Wa(C),Y(T,C,A)}if(be(C)||ie(C))return C=Qa(C,T.mode,A,null),C.return=T,C;if(typeof C.then=="function")return Y(T,Si(C),A);if(C.$$typeof===V)return Y(T,yi(T,C),A);Ci(T,C)}return null}function M(T,C,A,B){var se=C!==null?C.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return se!==null?null:p(T,C,""+A,B);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case k:return A.key===se?S(T,C,A,B):null;case E:return A.key===se?R(T,C,A,B):null;case U:return A=Wa(A),M(T,C,A,B)}if(be(A)||ie(A))return se!==null?null:L(T,C,A,B,null);if(typeof A.then=="function")return M(T,C,Si(A),B);if(A.$$typeof===V)return M(T,C,yi(T,A),B);Ci(T,A)}return null}function O(T,C,A,B,se){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return T=T.get(A)||null,p(C,T,""+B,se);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case k:return T=T.get(B.key===null?A:B.key)||null,S(C,T,B,se);case E:return T=T.get(B.key===null?A:B.key)||null,R(C,T,B,se);case U:return B=Wa(B),O(T,C,A,B,se)}if(be(B)||ie(B))return T=T.get(A)||null,L(C,T,B,se,null);if(typeof B.then=="function")return O(T,C,A,Si(B),se);if(B.$$typeof===V)return O(T,C,A,yi(C,B),se);Ci(C,B)}return null}function ee(T,C,A,B){for(var se=null,je=null,ne=C,fe=C=0,ye=null;ne!==null&&fe<A.length;fe++){ne.index>fe?(ye=ne,ne=null):ye=ne.sibling;var Se=M(T,ne,A[fe],B);if(Se===null){ne===null&&(ne=ye);break}e&&ne&&Se.alternate===null&&t(T,ne),C=u(Se,C,fe),je===null?se=Se:je.sibling=Se,je=Se,ne=ye}if(fe===A.length)return a(T,ne),xe&&Wt(T,fe),se;if(ne===null){for(;fe<A.length;fe++)ne=Y(T,A[fe],B),ne!==null&&(C=u(ne,C,fe),je===null?se=ne:je.sibling=ne,je=ne);return xe&&Wt(T,fe),se}for(ne=n(ne);fe<A.length;fe++)ye=O(ne,T,fe,A[fe],B),ye!==null&&(e&&ye.alternate!==null&&ne.delete(ye.key===null?fe:ye.key),C=u(ye,C,fe),je===null?se=ye:je.sibling=ye,je=ye);return e&&ne.forEach(function(Da){return t(T,Da)}),xe&&Wt(T,fe),se}function ue(T,C,A,B){if(A==null)throw Error(o(151));for(var se=null,je=null,ne=C,fe=C=0,ye=null,Se=A.next();ne!==null&&!Se.done;fe++,Se=A.next()){ne.index>fe?(ye=ne,ne=null):ye=ne.sibling;var Da=M(T,ne,Se.value,B);if(Da===null){ne===null&&(ne=ye);break}e&&ne&&Da.alternate===null&&t(T,ne),C=u(Da,C,fe),je===null?se=Da:je.sibling=Da,je=Da,ne=ye}if(Se.done)return a(T,ne),xe&&Wt(T,fe),se;if(ne===null){for(;!Se.done;fe++,Se=A.next())Se=Y(T,Se.value,B),Se!==null&&(C=u(Se,C,fe),je===null?se=Se:je.sibling=Se,je=Se);return xe&&Wt(T,fe),se}for(ne=n(ne);!Se.done;fe++,Se=A.next())Se=O(ne,T,fe,Se.value,B),Se!==null&&(e&&Se.alternate!==null&&ne.delete(Se.key===null?fe:Se.key),C=u(Se,C,fe),je===null?se=Se:je.sibling=Se,je=Se);return e&&ne.forEach(function(ev){return t(T,ev)}),xe&&Wt(T,fe),se}function Re(T,C,A,B){if(typeof A=="object"&&A!==null&&A.type===z&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case k:e:{for(var se=A.key;C!==null;){if(C.key===se){if(se=A.type,se===z){if(C.tag===7){a(T,C.sibling),B=s(C,A.props.children),B.return=T,T=B;break e}}else if(C.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===U&&Wa(se)===C.type){a(T,C.sibling),B=s(C,A.props),ml(B,A),B.return=T,T=B;break e}a(T,C);break}else t(T,C);C=C.sibling}A.type===z?(B=Qa(A.props.children,T.mode,B,A.key),B.return=T,T=B):(B=pi(A.type,A.key,A.props,null,T.mode,B),ml(B,A),B.return=T,T=B)}return d(T);case E:e:{for(se=A.key;C!==null;){if(C.key===se)if(C.tag===4&&C.stateNode.containerInfo===A.containerInfo&&C.stateNode.implementation===A.implementation){a(T,C.sibling),B=s(C,A.children||[]),B.return=T,T=B;break e}else{a(T,C);break}else t(T,C);C=C.sibling}B=ru(A,T.mode,B),B.return=T,T=B}return d(T);case U:return A=Wa(A),Re(T,C,A,B)}if(be(A))return ee(T,C,A,B);if(ie(A)){if(se=ie(A),typeof se!="function")throw Error(o(150));return A=se.call(A),ue(T,C,A,B)}if(typeof A.then=="function")return Re(T,C,Si(A),B);if(A.$$typeof===V)return Re(T,C,yi(T,A),B);Ci(T,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,C!==null&&C.tag===6?(a(T,C.sibling),B=s(C,A),B.return=T,T=B):(a(T,C),B=uu(A,T.mode,B),B.return=T,T=B),d(T)):a(T,C)}return function(T,C,A,B){try{hl=0;var se=Re(T,C,A,B);return Tn=null,se}catch(ne){if(ne===En||ne===xi)throw ne;var je=yt(29,ne,null,T.mode);return je.lanes=B,je.return=T,je}finally{}}}var Pa=Bo(!0),qo=Bo(!1),ba=!1;function xu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ju(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 xa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ja(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Ce&2)!==0){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,t=mi(e),Co(e,null,a),t}return hi(e,n,t,a),mi(e)}function pl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Ac(e,a)}}function Su(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var s=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?s=u=d:u=u.next=d,a=a.next}while(a!==null);u===null?s=u=t:u=u.next=t}else s=u=t;a={baseState:n.baseState,firstBaseUpdate:s,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 Cu=!1;function gl(){if(Cu){var e=wn;if(e!==null)throw e}}function vl(e,t,a,n){Cu=!1;var s=e.updateQueue;ba=!1;var u=s.firstBaseUpdate,d=s.lastBaseUpdate,p=s.shared.pending;if(p!==null){s.shared.pending=null;var S=p,R=S.next;S.next=null,d===null?u=R:d.next=R,d=S;var L=e.alternate;L!==null&&(L=L.updateQueue,p=L.lastBaseUpdate,p!==d&&(p===null?L.firstBaseUpdate=R:p.next=R,L.lastBaseUpdate=S))}if(u!==null){var Y=s.baseState;d=0,L=R=S=null,p=u;do{var M=p.lane&-536870913,O=M!==p.lane;if(O?(ve&M)===M:(n&M)===M){M!==0&&M===Nn&&(Cu=!0),L!==null&&(L=L.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var ee=e,ue=p;M=t;var Re=a;switch(ue.tag){case 1:if(ee=ue.payload,typeof ee=="function"){Y=ee.call(Re,Y,M);break e}Y=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=ue.payload,M=typeof ee=="function"?ee.call(Re,Y,M):ee,M==null)break e;Y=x({},Y,M);break e;case 2:ba=!0}}M=p.callback,M!==null&&(e.flags|=64,O&&(e.flags|=8192),O=s.callbacks,O===null?s.callbacks=[M]:O.push(M))}else O={lane:M,tag:p.tag,payload:p.payload,callback:p.callback,next:null},L===null?(R=L=O,S=Y):L=L.next=O,d|=M;if(p=p.next,p===null){if(p=s.shared.pending,p===null)break;O=p,p=O.next,O.next=null,s.lastBaseUpdate=O,s.shared.pending=null}}while(!0);L===null&&(S=Y),s.baseState=S,s.firstBaseUpdate=R,s.lastBaseUpdate=L,u===null&&(s.shared.lanes=0),Ea|=d,e.lanes=d,e.memoizedState=Y}}function Yo(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Go(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Yo(a[e],t)}var kn=N(null),Ni=N(0);function Zo(e,t){e=ra,I(Ni,e),I(kn,t),ra=e|t.baseLanes}function Nu(){I(Ni,ra),I(kn,kn.current)}function wu(){ra=Ni.current,G(kn),G(Ni)}var bt=N(null),zt=null;function Sa(e){var t=e.alternate;I(Ge,Ge.current&1),I(bt,e),zt===null&&(t===null||kn.current!==null||t.memoizedState!==null)&&(zt=e)}function Eu(e){I(Ge,Ge.current),I(bt,e),zt===null&&(zt=e)}function Vo(e){e.tag===22?(I(Ge,Ge.current),I(bt,e),zt===null&&(zt=e)):Ca()}function Ca(){I(Ge,Ge.current),I(bt,bt.current)}function xt(e){G(bt),zt===e&&(zt=null),G(Ge)}var Ge=N(0);function wi(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Mr(a)||zr(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 ea=0,de=null,_e=null,Xe=null,Ei=!1,_n=!1,en=!1,Ti=0,yl=0,An=null,Vp=0;function Be(){throw Error(o(321))}function Tu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!vt(e[a],t[a]))return!1;return!0}function ku(e,t,a,n,s,u){return ea=u,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Td:Zu,en=!1,u=a(n,s),en=!1,_n&&(u=Qo(t,a,n,s)),Xo(e),u}function Xo(e){D.H=jl;var t=_e!==null&&_e.next!==null;if(ea=0,Xe=_e=de=null,Ei=!1,yl=0,An=null,t)throw Error(o(300));e===null||Qe||(e=e.dependencies,e!==null&&vi(e)&&(Qe=!0))}function Qo(e,t,a,n){de=e;var s=0;do{if(_n&&(An=null),yl=0,_n=!1,25<=s)throw Error(o(301));if(s+=1,Xe=_e=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}D.H=kd,u=t(a,n)}while(_n);return u}function Xp(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?bl(t):t,e=e.useState()[0],(_e!==null?_e.memoizedState:null)!==e&&(de.flags|=1024),t}function _u(){var e=Ti!==0;return Ti=0,e}function Au(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Ru(e){if(Ei){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ei=!1}ea=0,Xe=_e=de=null,_n=!1,yl=Ti=0,An=null}function it(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?de.memoizedState=Xe=e:Xe=Xe.next=e,Xe}function Ze(){if(_e===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Xe===null?de.memoizedState:Xe.next;if(t!==null)Xe=t,_e=e;else{if(e===null)throw de.alternate===null?Error(o(467)):Error(o(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},Xe===null?de.memoizedState=Xe=e:Xe=Xe.next=e}return Xe}function ki(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bl(e){var t=yl;return yl+=1,An===null&&(An=[]),e=Do(An,e,t),t=de,(Xe===null?t.memoizedState:Xe.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Td:Zu),e}function _i(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return bl(e);if(e.$$typeof===V)return Pe(e)}throw Error(o(438,String(e)))}function Mu(e){var t=null,a=de.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=de.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=ki(),de.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]=te;return t.index++,a}function ta(e,t){return typeof t=="function"?t(e):t}function Ai(e){var t=Ze();return zu(t,_e,e)}function zu(e,t,a){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=a;var s=e.baseQueue,u=n.pending;if(u!==null){if(s!==null){var d=s.next;s.next=u.next,u.next=d}t.baseQueue=s=u,n.pending=null}if(u=e.baseState,s===null)e.memoizedState=u;else{t=s.next;var p=d=null,S=null,R=t,L=!1;do{var Y=R.lane&-536870913;if(Y!==R.lane?(ve&Y)===Y:(ea&Y)===Y){var M=R.revertLane;if(M===0)S!==null&&(S=S.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),Y===Nn&&(L=!0);else if((ea&M)===M){R=R.next,M===Nn&&(L=!0);continue}else Y={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},S===null?(p=S=Y,d=u):S=S.next=Y,de.lanes|=M,Ea|=M;Y=R.action,en&&a(u,Y),u=R.hasEagerState?R.eagerState:a(u,Y)}else M={lane:Y,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},S===null?(p=S=M,d=u):S=S.next=M,de.lanes|=Y,Ea|=Y;R=R.next}while(R!==null&&R!==t);if(S===null?d=u:S.next=p,!vt(u,e.memoizedState)&&(Qe=!0,L&&(a=wn,a!==null)))throw a;e.memoizedState=u,e.baseState=d,e.baseQueue=S,n.lastRenderedState=u}return s===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Ou(e){var t=Ze(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var n=a.dispatch,s=a.pending,u=t.memoizedState;if(s!==null){a.pending=null;var d=s=s.next;do u=e(u,d.action),d=d.next;while(d!==s);vt(u,t.memoizedState)||(Qe=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,n]}function $o(e,t,a){var n=de,s=Ze(),u=xe;if(u){if(a===void 0)throw Error(o(407));a=a()}else a=t();var d=!vt((_e||s).memoizedState,a);if(d&&(s.memoizedState=a,Qe=!0),s=s.queue,Hu(Fo.bind(null,n,s,e),[e]),s.getSnapshot!==t||d||Xe!==null&&Xe.memoizedState.tag&1){if(n.flags|=2048,Rn(9,{destroy:void 0},Ko.bind(null,n,s,a,t),null),ze===null)throw Error(o(349));u||(ea&127)!==0||Jo(n,t,a)}return a}function Jo(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=de.updateQueue,t===null?(t=ki(),de.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Ko(e,t,a,n){t.value=a,t.getSnapshot=n,Wo(t)&&Io(e)}function Fo(e,t,a){return a(function(){Wo(t)&&Io(e)})}function Wo(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!vt(e,a)}catch{return!0}}function Io(e){var t=Xa(e,2);t!==null&&ht(t,e,2)}function Uu(e){var t=it();if(typeof e=="function"){var a=e;if(e=a(),en){fa(!0);try{a()}finally{fa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:e},t}function Po(e,t,a,n){return e.baseState=a,zu(e,_e,typeof n=="function"?n:ta)}function Qp(e,t,a,n,s){if(zi(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){u.listeners.push(d)}};D.T!==null?a(!0):u.isTransition=!1,n(u),a=t.pending,a===null?(u.next=t.pending=u,ed(t,u)):(u.next=a.next,t.pending=a.next=u)}}function ed(e,t){var a=t.action,n=t.payload,s=e.state;if(t.isTransition){var u=D.T,d={};D.T=d;try{var p=a(s,n),S=D.S;S!==null&&S(d,p),td(e,t,p)}catch(R){Du(e,t,R)}finally{u!==null&&d.types!==null&&(u.types=d.types),D.T=u}}else try{u=a(s,n),td(e,t,u)}catch(R){Du(e,t,R)}}function td(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){ad(e,t,n)},function(n){return Du(e,t,n)}):ad(e,t,a)}function ad(e,t,a){t.status="fulfilled",t.value=a,nd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,ed(e,a)))}function Du(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,nd(t),t=t.next;while(t!==n)}e.action=null}function nd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ld(e,t){return t}function id(e,t){if(xe){var a=ze.formState;if(a!==null){e:{var n=de;if(xe){if(Ue){t:{for(var s=Ue,u=Mt;s.nodeType!==8;){if(!u){s=null;break t}if(s=Ot(s.nextSibling),s===null){s=null;break t}}u=s.data,s=u==="F!"||u==="F"?s:null}if(s){Ue=Ot(s.nextSibling),n=s.data==="F!";break e}}va(n)}n=!1}n&&(t=a[0])}}return a=it(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ld,lastRenderedState:t},a.queue=n,a=Nd.bind(null,de,n),n.dispatch=a,n=Uu(!1),u=Gu.bind(null,de,!1,n.queue),n=it(),s={state:t,dispatch:null,action:e,pending:null},n.queue=s,a=Qp.bind(null,de,s,u,a),s.dispatch=a,n.memoizedState=e,[t,a,!1]}function sd(e){var t=Ze();return ud(t,_e,e)}function ud(e,t,a){if(t=zu(e,t,ld)[0],e=Ai(ta)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=bl(t)}catch(d){throw d===En?xi:d}else n=t;t=Ze();var s=t.queue,u=s.dispatch;return a!==t.memoizedState&&(de.flags|=2048,Rn(9,{destroy:void 0},$p.bind(null,s,a),null)),[n,u,e]}function $p(e,t){e.action=t}function rd(e){var t=Ze(),a=_e;if(a!==null)return ud(t,a,e);Ze(),t=t.memoizedState,a=Ze();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function Rn(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=de.updateQueue,t===null&&(t=ki(),de.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 cd(){return Ze().memoizedState}function Ri(e,t,a,n){var s=it();de.flags|=e,s.memoizedState=Rn(1|t,{destroy:void 0},a,n===void 0?null:n)}function Mi(e,t,a,n){var s=Ze();n=n===void 0?null:n;var u=s.memoizedState.inst;_e!==null&&n!==null&&Tu(n,_e.memoizedState.deps)?s.memoizedState=Rn(t,u,a,n):(de.flags|=e,s.memoizedState=Rn(1|t,u,a,n))}function od(e,t){Ri(8390656,8,e,t)}function Hu(e,t){Mi(2048,8,e,t)}function Jp(e){de.flags|=4;var t=de.updateQueue;if(t===null)t=ki(),de.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function dd(e){var t=Ze().memoizedState;return Jp({ref:t,nextImpl:e}),function(){if((Ce&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function fd(e,t){return Mi(4,2,e,t)}function hd(e,t){return Mi(4,4,e,t)}function md(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function pd(e,t,a){a=a!=null?a.concat([e]):null,Mi(4,4,md.bind(null,t,e),a)}function Lu(){}function gd(e,t){var a=Ze();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Tu(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function vd(e,t){var a=Ze();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Tu(t,n[1]))return n[0];if(n=e(),en){fa(!0);try{e()}finally{fa(!1)}}return a.memoizedState=[n,t],n}function Bu(e,t,a){return a===void 0||(ea&1073741824)!==0&&(ve&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=bf(),de.lanes|=e,Ea|=e,a)}function yd(e,t,a,n){return vt(a,t)?a:kn.current!==null?(e=Bu(e,a,n),vt(e,t)||(Qe=!0),e):(ea&42)===0||(ea&1073741824)!==0&&(ve&261930)===0?(Qe=!0,e.memoizedState=a):(e=bf(),de.lanes|=e,Ea|=e,t)}function bd(e,t,a,n,s){var u=K.p;K.p=u!==0&&8>u?u:8;var d=D.T,p={};D.T=p,Gu(e,!1,t,a);try{var S=s(),R=D.S;if(R!==null&&R(p,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var L=Zp(S,n);xl(e,t,L,Ct(e))}else xl(e,t,n,Ct(e))}catch(Y){xl(e,t,{then:function(){},status:"rejected",reason:Y},Ct())}finally{K.p=u,d!==null&&p.types!==null&&(d.types=p.types),D.T=d}}function Kp(){}function qu(e,t,a,n){if(e.tag!==5)throw Error(o(476));var s=xd(e).queue;bd(e,s,t,re,a===null?Kp:function(){return jd(e),a(n)})}function xd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:re},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function jd(e){var t=xd(e);t.next===null&&(t=e.alternate.memoizedState),xl(e,t.next.queue,{},Ct())}function Yu(){return Pe(Hl)}function Sd(){return Ze().memoizedState}function Cd(){return Ze().memoizedState}function Fp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ct();e=xa(a);var n=ja(t,e,a);n!==null&&(ht(n,t,a),pl(n,t,a)),t={cache:gu()},e.payload=t;return}t=t.return}}function Wp(e,t,a){var n=Ct();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},zi(e)?wd(t,a):(a=iu(e,t,a,n),a!==null&&(ht(a,e,n),Ed(a,t,n)))}function Nd(e,t,a){var n=Ct();xl(e,t,a,n)}function xl(e,t,a,n){var s={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(zi(e))wd(t,s);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var d=t.lastRenderedState,p=u(d,a);if(s.hasEagerState=!0,s.eagerState=p,vt(p,d))return hi(e,t,s,0),ze===null&&fi(),!1}catch{}finally{}if(a=iu(e,t,s,n),a!==null)return ht(a,e,n),Ed(a,t,n),!0}return!1}function Gu(e,t,a,n){if(n={lane:2,revertLane:xr(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zi(e)){if(t)throw Error(o(479))}else t=iu(e,a,n,2),t!==null&&ht(t,e,2)}function zi(e){var t=e.alternate;return e===de||t!==null&&t===de}function wd(e,t){_n=Ei=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Ed(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Ac(e,a)}}var jl={readContext:Pe,use:_i,useCallback:Be,useContext:Be,useEffect:Be,useImperativeHandle:Be,useLayoutEffect:Be,useInsertionEffect:Be,useMemo:Be,useReducer:Be,useRef:Be,useState:Be,useDebugValue:Be,useDeferredValue:Be,useTransition:Be,useSyncExternalStore:Be,useId:Be,useHostTransitionStatus:Be,useFormState:Be,useActionState:Be,useOptimistic:Be,useMemoCache:Be,useCacheRefresh:Be};jl.useEffectEvent=Be;var Td={readContext:Pe,use:_i,useCallback:function(e,t){return it().memoizedState=[e,t===void 0?null:t],e},useContext:Pe,useEffect:od,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ri(4194308,4,md.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=it();t=t===void 0?null:t;var n=e();if(en){fa(!0);try{e()}finally{fa(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=it();if(a!==void 0){var s=a(t);if(en){fa(!0);try{a(t)}finally{fa(!1)}}}else s=t;return n.memoizedState=n.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},n.queue=e,e=e.dispatch=Wp.bind(null,de,e),[n.memoizedState,e]},useRef:function(e){var t=it();return e={current:e},t.memoizedState=e},useState:function(e){e=Uu(e);var t=e.queue,a=Nd.bind(null,de,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Lu,useDeferredValue:function(e,t){var a=it();return Bu(a,e,t)},useTransition:function(){var e=Uu(!1);return e=bd.bind(null,de,e.queue,!0,!1),it().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=de,s=it();if(xe){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),ze===null)throw Error(o(349));(ve&127)!==0||Jo(n,t,a)}s.memoizedState=a;var u={value:a,getSnapshot:t};return s.queue=u,od(Fo.bind(null,n,u,e),[e]),n.flags|=2048,Rn(9,{destroy:void 0},Ko.bind(null,n,u,a,t),null),a},useId:function(){var e=it(),t=ze.identifierPrefix;if(xe){var a=Zt,n=Gt;a=(n&~(1<<32-gt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ti++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Vp++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Yu,useFormState:id,useActionState:id,useOptimistic:function(e){var t=it();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Gu.bind(null,de,!0,a),a.dispatch=t,[e,t]},useMemoCache:Mu,useCacheRefresh:function(){return it().memoizedState=Fp.bind(null,de)},useEffectEvent:function(e){var t=it(),a={impl:e};return t.memoizedState=a,function(){if((Ce&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},Zu={readContext:Pe,use:_i,useCallback:gd,useContext:Pe,useEffect:Hu,useImperativeHandle:pd,useInsertionEffect:fd,useLayoutEffect:hd,useMemo:vd,useReducer:Ai,useRef:cd,useState:function(){return Ai(ta)},useDebugValue:Lu,useDeferredValue:function(e,t){var a=Ze();return yd(a,_e.memoizedState,e,t)},useTransition:function(){var e=Ai(ta)[0],t=Ze().memoizedState;return[typeof e=="boolean"?e:bl(e),t]},useSyncExternalStore:$o,useId:Sd,useHostTransitionStatus:Yu,useFormState:sd,useActionState:sd,useOptimistic:function(e,t){var a=Ze();return Po(a,_e,e,t)},useMemoCache:Mu,useCacheRefresh:Cd};Zu.useEffectEvent=dd;var kd={readContext:Pe,use:_i,useCallback:gd,useContext:Pe,useEffect:Hu,useImperativeHandle:pd,useInsertionEffect:fd,useLayoutEffect:hd,useMemo:vd,useReducer:Ou,useRef:cd,useState:function(){return Ou(ta)},useDebugValue:Lu,useDeferredValue:function(e,t){var a=Ze();return _e===null?Bu(a,e,t):yd(a,_e.memoizedState,e,t)},useTransition:function(){var e=Ou(ta)[0],t=Ze().memoizedState;return[typeof e=="boolean"?e:bl(e),t]},useSyncExternalStore:$o,useId:Sd,useHostTransitionStatus:Yu,useFormState:rd,useActionState:rd,useOptimistic:function(e,t){var a=Ze();return _e!==null?Po(a,_e,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Mu,useCacheRefresh:Cd};kd.useEffectEvent=dd;function Vu(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:x({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Xu={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ct(),s=xa(n);s.payload=t,a!=null&&(s.callback=a),t=ja(e,s,n),t!==null&&(ht(t,e,n),pl(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ct(),s=xa(n);s.tag=1,s.payload=t,a!=null&&(s.callback=a),t=ja(e,s,n),t!==null&&(ht(t,e,n),pl(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ct(),n=xa(a);n.tag=2,t!=null&&(n.callback=t),t=ja(e,n,a),t!==null&&(ht(t,e,a),pl(t,e,a))}};function _d(e,t,a,n,s,u,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,u,d):t.prototype&&t.prototype.isPureReactComponent?!ul(a,n)||!ul(s,u):!0}function Ad(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&&Xu.enqueueReplaceState(t,t.state,null)}function tn(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=x({},a));for(var s in e)a[s]===void 0&&(a[s]=e[s])}return a}function Rd(e){di(e)}function Md(e){console.error(e)}function zd(e){di(e)}function Oi(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Od(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Qu(e,t,a){return a=xa(a),a.tag=3,a.payload={element:null},a.callback=function(){Oi(e,t)},a}function Ud(e){return e=xa(e),e.tag=3,e}function Dd(e,t,a,n){var s=a.type.getDerivedStateFromError;if(typeof s=="function"){var u=n.value;e.payload=function(){return s(u)},e.callback=function(){Od(t,a,n)}}var d=a.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Od(t,a,n),typeof s!="function"&&(Ta===null?Ta=new Set([this]):Ta.add(this));var p=n.stack;this.componentDidCatch(n.value,{componentStack:p!==null?p:""})})}function Ip(e,t,a,n,s){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Cn(t,a,s,!0),a=bt.current,a!==null){switch(a.tag){case 31:case 13:return zt===null?Qi():a.alternate===null&&qe===0&&(qe=3),a.flags&=-257,a.flags|=65536,a.lanes=s,n===ji?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),vr(e,n,s)),!1;case 22:return a.flags|=65536,n===ji?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)),vr(e,n,s)),!1}throw Error(o(435,a.tag))}return vr(e,n,s),Qi(),!1}if(xe)return t=bt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,n!==du&&(e=Error(o(422),{cause:n}),ol(_t(e,a)))):(n!==du&&(t=Error(o(423),{cause:n}),ol(_t(t,a))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,n=_t(n,a),s=Qu(e.stateNode,n,s),Su(e,s),qe!==4&&(qe=2)),!1;var u=Error(o(520),{cause:n});if(u=_t(u,a),_l===null?_l=[u]:_l.push(u),qe!==4&&(qe=2),t===null)return!0;n=_t(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=s&-s,a.lanes|=e,e=Qu(a.stateNode,n,e),Su(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,s&=-s,a.lanes|=s,s=Ud(s),Dd(s,e,a,n),Su(a,s),!1}a=a.return}while(a!==null);return!1}var $u=Error(o(461)),Qe=!1;function et(e,t,a,n){t.child=e===null?qo(t,null,a,n):Pa(t,e.child,a,n)}function Hd(e,t,a,n,s){a=a.render;var u=t.ref;if("ref"in n){var d={};for(var p in n)p!=="ref"&&(d[p]=n[p])}else d=n;return Ka(t),n=ku(e,t,a,d,u,s),p=_u(),e!==null&&!Qe?(Au(e,t,s),aa(e,t,s)):(xe&&p&&cu(t),t.flags|=1,et(e,t,n,s),t.child)}function Ld(e,t,a,n,s){if(e===null){var u=a.type;return typeof u=="function"&&!su(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,Bd(e,t,u,n,s)):(e=pi(a.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!tr(e,s)){var d=u.memoizedProps;if(a=a.compare,a=a!==null?a:ul,a(d,n)&&e.ref===t.ref)return aa(e,t,s)}return t.flags|=1,e=Ft(u,n),e.ref=t.ref,e.return=t,t.child=e}function Bd(e,t,a,n,s){if(e!==null){var u=e.memoizedProps;if(ul(u,n)&&e.ref===t.ref)if(Qe=!1,t.pendingProps=n=u,tr(e,s))(e.flags&131072)!==0&&(Qe=!0);else return t.lanes=e.lanes,aa(e,t,s)}return Ju(e,t,a,n,s)}function qd(e,t,a,n){var s=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,s=0;n!==null;)s=s|n.lanes|n.childLanes,n=n.sibling;n=s&~u}else n=0,t.child=null;return Yd(e,t,u,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&bi(t,u!==null?u.cachePool:null),u!==null?Zo(t,u):Nu(),Vo(t);else return n=t.lanes=536870912,Yd(e,t,u!==null?u.baseLanes|a:a,a,n)}else u!==null?(bi(t,u.cachePool),Zo(t,u),Ca(),t.memoizedState=null):(e!==null&&bi(t,null),Nu(),Ca());return et(e,t,s,a),t.child}function Sl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Yd(e,t,a,n,s){var u=yu();return u=u===null?null:{parent:Ve._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&bi(t,null),Nu(),Vo(t),e!==null&&Cn(e,t,n,!0),t.childLanes=s,null}function Ui(e,t){return t=Hi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Gd(e,t,a){return Pa(t,e.child,null,a),e=Ui(t,t.pendingProps),e.flags|=2,xt(t),t.memoizedState=null,e}function Pp(e,t,a){var n=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(xe){if(n.mode==="hidden")return e=Ui(t,n),t.lanes=536870912,Sl(null,e);if(Eu(t),(e=Ue)?(e=th(e,Mt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pa!==null?{id:Gt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},a=wo(e),a.return=t,t.child=a,Ie=t,Ue=null)):e=null,e===null)throw va(t);return t.lanes=536870912,null}return Ui(t,n)}var u=e.memoizedState;if(u!==null){var d=u.dehydrated;if(Eu(t),s)if(t.flags&256)t.flags&=-257,t=Gd(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Qe||Cn(e,t,a,!1),s=(a&e.childLanes)!==0,Qe||s){if(n=ze,n!==null&&(d=Rc(n,a),d!==0&&d!==u.retryLane))throw u.retryLane=d,Xa(e,d),ht(n,e,d),$u;Qi(),t=Gd(e,t,a)}else e=u.treeContext,Ue=Ot(d.nextSibling),Ie=t,xe=!0,ga=null,Mt=!1,e!==null&&ko(t,e),t=Ui(t,n),t.flags|=4096;return t}return e=Ft(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Di(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 Ju(e,t,a,n,s){return Ka(t),a=ku(e,t,a,n,void 0,s),n=_u(),e!==null&&!Qe?(Au(e,t,s),aa(e,t,s)):(xe&&n&&cu(t),t.flags|=1,et(e,t,a,s),t.child)}function Zd(e,t,a,n,s,u){return Ka(t),t.updateQueue=null,a=Qo(t,n,a,s),Xo(e),n=_u(),e!==null&&!Qe?(Au(e,t,u),aa(e,t,u)):(xe&&n&&cu(t),t.flags|=1,et(e,t,a,u),t.child)}function Vd(e,t,a,n,s){if(Ka(t),t.stateNode===null){var u=bn,d=a.contextType;typeof d=="object"&&d!==null&&(u=Pe(d)),u=new a(n,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Xu,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=n,u.state=t.memoizedState,u.refs={},xu(t),d=a.contextType,u.context=typeof d=="object"&&d!==null?Pe(d):bn,u.state=t.memoizedState,d=a.getDerivedStateFromProps,typeof d=="function"&&(Vu(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&&Xu.enqueueReplaceState(u,u.state,null),vl(t,n,u,s),gl(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){u=t.stateNode;var p=t.memoizedProps,S=tn(a,p);u.props=S;var R=u.context,L=a.contextType;d=bn,typeof L=="object"&&L!==null&&(d=Pe(L));var Y=a.getDerivedStateFromProps;L=typeof Y=="function"||typeof u.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,L||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(p||R!==d)&&Ad(t,u,n,d),ba=!1;var M=t.memoizedState;u.state=M,vl(t,n,u,s),gl(),R=t.memoizedState,p||M!==R||ba?(typeof Y=="function"&&(Vu(t,a,Y,n),R=t.memoizedState),(S=ba||_d(t,a,S,n,M,R,d))?(L||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=R),u.props=n,u.state=R,u.context=d,n=S):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{u=t.stateNode,ju(e,t),d=t.memoizedProps,L=tn(a,d),u.props=L,Y=t.pendingProps,M=u.context,R=a.contextType,S=bn,typeof R=="object"&&R!==null&&(S=Pe(R)),p=a.getDerivedStateFromProps,(R=typeof p=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(d!==Y||M!==S)&&Ad(t,u,n,S),ba=!1,M=t.memoizedState,u.state=M,vl(t,n,u,s),gl();var O=t.memoizedState;d!==Y||M!==O||ba||e!==null&&e.dependencies!==null&&vi(e.dependencies)?(typeof p=="function"&&(Vu(t,a,p,n),O=t.memoizedState),(L=ba||_d(t,a,L,n,M,O,S)||e!==null&&e.dependencies!==null&&vi(e.dependencies))?(R||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(n,O,S),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(n,O,S)),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=O),u.props=n,u.state=O,u.context=S,n=L):(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,Di(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=Pa(t,e.child,null,s),t.child=Pa(t,null,a,s)):et(e,t,a,s),t.memoizedState=u.state,e=t.child):e=aa(e,t,s),e}function Xd(e,t,a,n){return $a(),t.flags|=256,et(e,t,a,n),t.child}var Ku={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Fu(e){return{baseLanes:e,cachePool:Oo()}}function Wu(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=St),e}function Qd(e,t,a){var n=t.pendingProps,s=!1,u=(t.flags&128)!==0,d;if((d=u)||(d=e!==null&&e.memoizedState===null?!1:(Ge.current&2)!==0),d&&(s=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(xe){if(s?Sa(t):Ca(),(e=Ue)?(e=th(e,Mt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pa!==null?{id:Gt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},a=wo(e),a.return=t,t.child=a,Ie=t,Ue=null)):e=null,e===null)throw va(t);return zr(e)?t.lanes=32:t.lanes=536870912,null}var p=n.children;return n=n.fallback,s?(Ca(),s=t.mode,p=Hi({mode:"hidden",children:p},s),n=Qa(n,s,a,null),p.return=t,n.return=t,p.sibling=n,t.child=p,n=t.child,n.memoizedState=Fu(a),n.childLanes=Wu(e,d,a),t.memoizedState=Ku,Sl(null,n)):(Sa(t),Iu(t,p))}var S=e.memoizedState;if(S!==null&&(p=S.dehydrated,p!==null)){if(u)t.flags&256?(Sa(t),t.flags&=-257,t=Pu(e,t,a)):t.memoizedState!==null?(Ca(),t.child=e.child,t.flags|=128,t=null):(Ca(),p=n.fallback,s=t.mode,n=Hi({mode:"visible",children:n.children},s),p=Qa(p,s,a,null),p.flags|=2,n.return=t,p.return=t,n.sibling=p,t.child=n,Pa(t,e.child,null,a),n=t.child,n.memoizedState=Fu(a),n.childLanes=Wu(e,d,a),t.memoizedState=Ku,t=Sl(null,n));else if(Sa(t),zr(p)){if(d=p.nextSibling&&p.nextSibling.dataset,d)var R=d.dgst;d=R,n=Error(o(419)),n.stack="",n.digest=d,ol({value:n,source:null,stack:null}),t=Pu(e,t,a)}else if(Qe||Cn(e,t,a,!1),d=(a&e.childLanes)!==0,Qe||d){if(d=ze,d!==null&&(n=Rc(d,a),n!==0&&n!==S.retryLane))throw S.retryLane=n,Xa(e,n),ht(d,e,n),$u;Mr(p)||Qi(),t=Pu(e,t,a)}else Mr(p)?(t.flags|=192,t.child=e.child,t=null):(e=S.treeContext,Ue=Ot(p.nextSibling),Ie=t,xe=!0,ga=null,Mt=!1,e!==null&&ko(t,e),t=Iu(t,n.children),t.flags|=4096);return t}return s?(Ca(),p=n.fallback,s=t.mode,S=e.child,R=S.sibling,n=Ft(S,{mode:"hidden",children:n.children}),n.subtreeFlags=S.subtreeFlags&65011712,R!==null?p=Ft(R,p):(p=Qa(p,s,a,null),p.flags|=2),p.return=t,n.return=t,n.sibling=p,t.child=n,Sl(null,n),n=t.child,p=e.child.memoizedState,p===null?p=Fu(a):(s=p.cachePool,s!==null?(S=Ve._currentValue,s=s.parent!==S?{parent:S,pool:S}:s):s=Oo(),p={baseLanes:p.baseLanes|a,cachePool:s}),n.memoizedState=p,n.childLanes=Wu(e,d,a),t.memoizedState=Ku,Sl(e.child,n)):(Sa(t),a=e.child,e=a.sibling,a=Ft(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 Iu(e,t){return t=Hi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Hi(e,t){return e=yt(22,e,null,t),e.lanes=0,e}function Pu(e,t,a){return Pa(t,e.child,null,a),e=Iu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $d(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),mu(e.return,t,a)}function er(e,t,a,n,s,u){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:s,treeForkCount:u}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=n,d.tail=a,d.tailMode=s,d.treeForkCount=u)}function Jd(e,t,a){var n=t.pendingProps,s=n.revealOrder,u=n.tail;n=n.children;var d=Ge.current,p=(d&2)!==0;if(p?(d=d&1|2,t.flags|=128):d&=1,I(Ge,d),et(e,t,n,a),n=xe?cl:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$d(e,a,t);else if(e.tag===19)$d(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(s){case"forwards":for(a=t.child,s=null;a!==null;)e=a.alternate,e!==null&&wi(e)===null&&(s=a),a=a.sibling;a=s,a===null?(s=t.child,t.child=null):(s=a.sibling,a.sibling=null),er(t,!1,s,a,u,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&wi(e)===null){t.child=s;break}e=s.sibling,s.sibling=a,a=s,s=e}er(t,!0,a,null,u,n);break;case"together":er(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function aa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ea|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Cn(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=Ft(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ft(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function tr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&vi(e)))}function eg(e,t,a){switch(t.tag){case 3:lt(t,t.stateNode.containerInfo),ya(t,Ve,e.memoizedState.cache),$a();break;case 27:case 5:Jn(t);break;case 4:lt(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,Eu(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Sa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Qd(e,t,a):(Sa(t),e=aa(e,t,a),e!==null?e.sibling:null);Sa(t);break;case 19:var s=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Cn(e,t,a,!1),n=(a&t.childLanes)!==0),s){if(n)return Jd(e,t,a);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),I(Ge,Ge.current),n)break;return null;case 22:return t.lanes=0,qd(e,t,a,t.pendingProps);case 24:ya(t,Ve,e.memoizedState.cache)}return aa(e,t,a)}function Kd(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Qe=!0;else{if(!tr(e,a)&&(t.flags&128)===0)return Qe=!1,eg(e,t,a);Qe=(e.flags&131072)!==0}else Qe=!1,xe&&(t.flags&1048576)!==0&&To(t,cl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Wa(t.elementType),t.type=e,typeof e=="function")su(e)?(n=tn(e,n),t.tag=1,t=Vd(null,t,e,n,a)):(t.tag=0,t=Ju(null,t,e,n,a));else{if(e!=null){var s=e.$$typeof;if(s===P){t.tag=11,t=Hd(null,t,e,n,a);break e}else if(s===w){t.tag=14,t=Ld(null,t,e,n,a);break e}}throw t=ge(e)||e,Error(o(306,t,""))}}return t;case 0:return Ju(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,s=tn(n,t.pendingProps),Vd(e,t,n,s,a);case 3:e:{if(lt(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var u=t.memoizedState;s=u.element,ju(e,t),vl(t,n,null,a);var d=t.memoizedState;if(n=d.cache,ya(t,Ve,n),n!==u.cache&&pu(t,[Ve],a,!0),gl(),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=Xd(e,t,n,a);break e}else if(n!==s){s=_t(Error(o(424)),t),ol(s),t=Xd(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(Ue=Ot(e.firstChild),Ie=t,xe=!0,ga=null,Mt=!0,a=qo(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if($a(),n===s){t=aa(e,t,a);break e}et(e,t,n,a)}t=t.child}return t;case 26:return Di(e,t),e===null?(a=uh(t.type,null,t.pendingProps,null))?t.memoizedState=a:xe||(a=t.type,e=t.pendingProps,n=Pi(he.current).createElement(a),n[We]=t,n[ut]=e,tt(n,a,e),Ke(n),t.stateNode=n):t.memoizedState=uh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Jn(t),e===null&&xe&&(n=t.stateNode=lh(t.type,t.pendingProps,he.current),Ie=t,Mt=!0,s=Ue,Ra(t.type)?(Or=s,Ue=Ot(n.firstChild)):Ue=s),et(e,t,t.pendingProps.children,a),Di(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&xe&&((s=n=Ue)&&(n=Ag(n,t.type,t.pendingProps,Mt),n!==null?(t.stateNode=n,Ie=t,Ue=Ot(n.firstChild),Mt=!1,s=!0):s=!1),s||va(t)),Jn(t),s=t.type,u=t.pendingProps,d=e!==null?e.memoizedProps:null,n=u.children,_r(s,u)?n=null:d!==null&&_r(s,d)&&(t.flags|=32),t.memoizedState!==null&&(s=ku(e,t,Xp,null,null,a),Hl._currentValue=s),Di(e,t),et(e,t,n,a),t.child;case 6:return e===null&&xe&&((e=a=Ue)&&(a=Rg(a,t.pendingProps,Mt),a!==null?(t.stateNode=a,Ie=t,Ue=null,e=!0):e=!1),e||va(t)),null;case 13:return Qd(e,t,a);case 4:return lt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Pa(t,null,n,a):et(e,t,n,a),t.child;case 11:return Hd(e,t,t.type,t.pendingProps,a);case 7:return et(e,t,t.pendingProps,a),t.child;case 8:return et(e,t,t.pendingProps.children,a),t.child;case 12:return et(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,ya(t,t.type,n.value),et(e,t,n.children,a),t.child;case 9:return s=t.type._context,n=t.pendingProps.children,Ka(t),s=Pe(s),n=n(s),t.flags|=1,et(e,t,n,a),t.child;case 14:return Ld(e,t,t.type,t.pendingProps,a);case 15:return Bd(e,t,t.type,t.pendingProps,a);case 19:return Jd(e,t,a);case 31:return Pp(e,t,a);case 22:return qd(e,t,a,t.pendingProps);case 24:return Ka(t),n=Pe(Ve),e===null?(s=yu(),s===null&&(s=ze,u=gu(),s.pooledCache=u,u.refCount++,u!==null&&(s.pooledCacheLanes|=a),s=u),t.memoizedState={parent:n,cache:s},xu(t),ya(t,Ve,s)):((e.lanes&a)!==0&&(ju(e,t),vl(t,null,null,a),gl()),s=e.memoizedState,u=t.memoizedState,s.parent!==n?(s={parent:n,cache:n},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),ya(t,Ve,n)):(n=u.cache,ya(t,Ve,n),n!==s.cache&&pu(t,[Ve],a,!0))),et(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function na(e){e.flags|=4}function ar(e,t,a,n,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(Cf())e.flags|=8192;else throw Ia=ji,bu}else e.flags&=-16777217}function Fd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!fh(t))if(Cf())e.flags|=8192;else throw Ia=ji,bu}function Li(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?kc():536870912,e.lanes|=t,Un|=t)}function Cl(e,t){if(!xe)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 De(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var s=e.child;s!==null;)a|=s.lanes|s.childLanes,n|=s.subtreeFlags&65011712,n|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)a|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function tg(e,t,a){var n=t.pendingProps;switch(ou(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return De(t),null;case 1:return De(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Pt(Ve),Ye(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Sn(t)?na(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,fu())),De(t),null;case 26:var s=t.type,u=t.memoizedState;return e===null?(na(t),u!==null?(De(t),Fd(t,u)):(De(t),ar(t,s,null,n,a))):u?u!==e.memoizedState?(na(t),De(t),Fd(t,u)):(De(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&na(t),De(t),ar(t,s,e,n,a)),null;case 27:if(Kl(t),a=he.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&na(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return De(t),null}e=ae.current,Sn(t)?_o(t):(e=lh(s,n,a),t.stateNode=e,na(t))}return De(t),null;case 5:if(Kl(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&na(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return De(t),null}if(u=ae.current,Sn(t))_o(t);else{var d=Pi(he.current);switch(u){case 1:u=d.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:u=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":u=d.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":u=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);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(s,{is:n.is}):d.createElement(s)}}u[We]=t,u[ut]=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(tt(u,s,n),s){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&na(t)}}return De(t),ar(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&na(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=he.current,Sn(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,s=Ie,s!==null)switch(s.tag){case 27:case 5:n=s.memoizedProps}e[We]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||$f(e.nodeValue,a)),e||va(t,!0)}else e=Pi(e).createTextNode(n),e[We]=t,t.stateNode=e}return De(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Sn(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[We]=t}else $a(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;De(t),e=!1}else a=fu(),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 De(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Sn(t),n!==null&&n.dehydrated!==null){if(e===null){if(!s)throw Error(o(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(o(317));s[We]=t}else $a(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;De(t),s=!1}else s=fu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)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,s=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(s=n.alternate.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==s&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Li(t,t.updateQueue),De(t),null);case 4:return Ye(),e===null&&Nr(t.stateNode.containerInfo),De(t),null;case 10:return Pt(t.type),De(t),null;case 19:if(G(Ge),n=t.memoizedState,n===null)return De(t),null;if(s=(t.flags&128)!==0,u=n.rendering,u===null)if(s)Cl(n,!1);else{if(qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=wi(e),u!==null){for(t.flags|=128,Cl(n,!1),e=u.updateQueue,t.updateQueue=e,Li(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)No(a,e),a=a.sibling;return I(Ge,Ge.current&1|2),xe&&Wt(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&mt()>Zi&&(t.flags|=128,s=!0,Cl(n,!1),t.lanes=4194304)}else{if(!s)if(e=wi(u),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Li(t,e),Cl(n,!0),n.tail===null&&n.tailMode==="hidden"&&!u.alternate&&!xe)return De(t),null}else 2*mt()-n.renderingStartTime>Zi&&a!==536870912&&(t.flags|=128,s=!0,Cl(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=Ge.current,I(Ge,s?a&1|2:a&1),xe&&Wt(t,n.treeForkCount),e):(De(t),null);case 22:case 23:return xt(t),wu(),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&&(De(t),t.subtreeFlags&6&&(t.flags|=8192)):De(t),a=t.updateQueue,a!==null&&Li(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&&G(Fa),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Pt(Ve),De(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function ag(e,t){switch(ou(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pt(Ve),Ye(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Kl(t),null;case 31:if(t.memoizedState!==null){if(xt(t),t.alternate===null)throw Error(o(340));$a()}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));$a()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(Ge),null;case 4:return Ye(),null;case 10:return Pt(t.type),null;case 22:case 23:return xt(t),wu(),e!==null&&G(Fa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Pt(Ve),null;case 25:return null;default:return null}}function Wd(e,t){switch(ou(t),t.tag){case 3:Pt(Ve),Ye();break;case 26:case 27:case 5:Kl(t);break;case 4:Ye();break;case 31:t.memoizedState!==null&&xt(t);break;case 13:xt(t);break;case 19:G(Ge);break;case 10:Pt(t.type);break;case 22:case 23:xt(t),wu(),e!==null&&G(Fa);break;case 24:Pt(Ve)}}function Nl(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var s=n.next;a=s;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!==s)}}catch(p){Te(t,t.return,p)}}function Na(e,t,a){try{var n=t.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var u=s.next;n=u;do{if((n.tag&e)===e){var d=n.inst,p=d.destroy;if(p!==void 0){d.destroy=void 0,s=t;var S=a,R=p;try{R()}catch(L){Te(s,S,L)}}}n=n.next}while(n!==u)}}catch(L){Te(t,t.return,L)}}function Id(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Go(t,a)}catch(n){Te(e,e.return,n)}}}function Pd(e,t,a){a.props=tn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Te(e,t,n)}}function wl(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(s){Te(e,t,s)}}function Vt(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(s){Te(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(s){Te(e,t,s)}else a.current=null}function ef(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(s){Te(e,e.return,s)}}function nr(e,t,a){try{var n=e.stateNode;Ng(n,e.type,a,t),n[ut]=t}catch(s){Te(e,e.return,s)}}function tf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ra(e.type)||e.tag===4}function lr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tf(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&&Ra(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 ir(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&&Ra(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(ir(e,t,a),e=e.sibling;e!==null;)ir(e,t,a),e=e.sibling}function Bi(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&&Ra(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Bi(e,t,a),e=e.sibling;e!==null;)Bi(e,t,a),e=e.sibling}function af(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);tt(t,n,a),t[We]=e,t[ut]=a}catch(u){Te(e,e.return,u)}}var la=!1,$e=!1,sr=!1,nf=typeof WeakSet=="function"?WeakSet:Set,Fe=null;function ng(e,t){if(e=e.containerInfo,Tr=ss,e=po(e),Ps(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 s=n.anchorOffset,u=n.focusNode;n=n.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var d=0,p=-1,S=-1,R=0,L=0,Y=e,M=null;t:for(;;){for(var O;Y!==a||s!==0&&Y.nodeType!==3||(p=d+s),Y!==u||n!==0&&Y.nodeType!==3||(S=d+n),Y.nodeType===3&&(d+=Y.nodeValue.length),(O=Y.firstChild)!==null;)M=Y,Y=O;for(;;){if(Y===e)break t;if(M===a&&++R===s&&(p=d),M===u&&++L===n&&(S=d),(O=Y.nextSibling)!==null)break;Y=M,M=Y.parentNode}Y=O}a=p===-1||S===-1?null:{start:p,end:S}}else a=null}a=a||{start:0,end:0}}else a=null;for(kr={focusedElem:e,selectionRange:a},ss=!1,Fe=t;Fe!==null;)if(t=Fe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Fe=e;else for(;Fe!==null;){switch(t=Fe,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++)s=e[a],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,s=u.memoizedProps,u=u.memoizedState,n=a.stateNode;try{var ee=tn(a.type,s);e=n.getSnapshotBeforeUpdate(ee,u),n.__reactInternalSnapshotBeforeUpdate=e}catch(ue){Te(a,a.return,ue)}}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,Fe=e;break}Fe=t.return}}function lf(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:sa(e,a),n&4&&Nl(5,a);break;case 1:if(sa(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(d){Te(a,a.return,d)}else{var s=tn(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){Te(a,a.return,d)}}n&64&&Id(a),n&512&&wl(a,a.return);break;case 3:if(sa(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{Go(e,t)}catch(d){Te(a,a.return,d)}}break;case 27:t===null&&n&4&&af(a);case 26:case 5:sa(e,a),t===null&&n&4&&ef(a),n&512&&wl(a,a.return);break;case 12:sa(e,a);break;case 31:sa(e,a),n&4&&rf(e,a);break;case 13:sa(e,a),n&4&&cf(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=fg.bind(null,a),Mg(e,a))));break;case 22:if(n=a.memoizedState!==null||la,!n){t=t!==null&&t.memoizedState!==null||$e,s=la;var u=$e;la=n,($e=t)&&!u?ua(e,a,(a.subtreeFlags&8772)!==0):sa(e,a),la=s,$e=u}break;case 30:break;default:sa(e,a)}}function sf(e){var t=e.alternate;t!==null&&(e.alternate=null,sf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ds(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var He=null,ct=!1;function ia(e,t,a){for(a=a.child;a!==null;)uf(e,t,a),a=a.sibling}function uf(e,t,a){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(Kn,a)}catch{}switch(a.tag){case 26:$e||Vt(a,t),ia(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:$e||Vt(a,t);var n=He,s=ct;Ra(a.type)&&(He=a.stateNode,ct=!1),ia(e,t,a),Ol(a.stateNode),He=n,ct=s;break;case 5:$e||Vt(a,t);case 6:if(n=He,s=ct,He=null,ia(e,t,a),He=n,ct=s,He!==null)if(ct)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(a.stateNode)}catch(u){Te(a,t,u)}else try{He.removeChild(a.stateNode)}catch(u){Te(a,t,u)}break;case 18:He!==null&&(ct?(e=He,Pf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Zn(e)):Pf(He,a.stateNode));break;case 4:n=He,s=ct,He=a.stateNode.containerInfo,ct=!0,ia(e,t,a),He=n,ct=s;break;case 0:case 11:case 14:case 15:Na(2,a,t),$e||Na(4,a,t),ia(e,t,a);break;case 1:$e||(Vt(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Pd(a,t,n)),ia(e,t,a);break;case 21:ia(e,t,a);break;case 22:$e=(n=$e)||a.memoizedState!==null,ia(e,t,a),$e=n;break;default:ia(e,t,a)}}function rf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Zn(e)}catch(a){Te(t,t.return,a)}}}function cf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Zn(e)}catch(a){Te(t,t.return,a)}}function lg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nf),t;default:throw Error(o(435,e.tag))}}function qi(e,t){var a=lg(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var s=hg.bind(null,e,n);n.then(s,s)}})}function ot(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var s=a[n],u=e,d=t,p=d;e:for(;p!==null;){switch(p.tag){case 27:if(Ra(p.type)){He=p.stateNode,ct=!1;break e}break;case 5:He=p.stateNode,ct=!1;break e;case 3:case 4:He=p.stateNode.containerInfo,ct=!0;break e}p=p.return}if(He===null)throw Error(o(160));uf(u,d,s),He=null,ct=!1,u=s.alternate,u!==null&&(u.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)of(t,e),t=t.sibling}var Lt=null;function of(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ot(t,e),dt(e),n&4&&(Na(3,e,e.return),Nl(3,e),Na(5,e,e.return));break;case 1:ot(t,e),dt(e),n&512&&($e||a===null||Vt(a,a.return)),n&64&&la&&(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 s=Lt;if(ot(t,e),dt(e),n&512&&($e||a===null||Vt(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,s=s.ownerDocument||s;t:switch(n){case"title":u=s.getElementsByTagName("title")[0],(!u||u[In]||u[We]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=s.createElement(n),s.head.insertBefore(u,s.querySelector("head > title"))),tt(u,n,a),u[We]=e,Ke(u),n=u;break e;case"link":var d=oh("link","href",s).get(n+(a.href||""));if(d){for(var p=0;p<d.length;p++)if(u=d[p],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(p,1);break t}}u=s.createElement(n),tt(u,n,a),s.head.appendChild(u);break;case"meta":if(d=oh("meta","content",s).get(n+(a.content||""))){for(p=0;p<d.length;p++)if(u=d[p],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(p,1);break t}}u=s.createElement(n),tt(u,n,a),s.head.appendChild(u);break;default:throw Error(o(468,n))}u[We]=e,Ke(u),n=u}e.stateNode=n}else dh(s,e.type,e.stateNode);else e.stateNode=ch(s,n,e.memoizedProps);else u!==n?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,n===null?dh(s,e.type,e.stateNode):ch(s,n,e.memoizedProps)):n===null&&e.stateNode!==null&&nr(e,e.memoizedProps,a.memoizedProps)}break;case 27:ot(t,e),dt(e),n&512&&($e||a===null||Vt(a,a.return)),a!==null&&n&4&&nr(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ot(t,e),dt(e),n&512&&($e||a===null||Vt(a,a.return)),e.flags&32){s=e.stateNode;try{fn(s,"")}catch(ee){Te(e,e.return,ee)}}n&4&&e.stateNode!=null&&(s=e.memoizedProps,nr(e,s,a!==null?a.memoizedProps:s)),n&1024&&(sr=!0);break;case 6:if(ot(t,e),dt(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(ee){Te(e,e.return,ee)}}break;case 3:if(as=null,s=Lt,Lt=es(t.containerInfo),ot(t,e),Lt=s,dt(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Zn(t.containerInfo)}catch(ee){Te(e,e.return,ee)}sr&&(sr=!1,df(e));break;case 4:n=Lt,Lt=es(e.stateNode.containerInfo),ot(t,e),dt(e),Lt=n;break;case 12:ot(t,e),dt(e);break;case 31:ot(t,e),dt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,qi(e,n)));break;case 13:ot(t,e),dt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Gi=mt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,qi(e,n)));break;case 22:s=e.memoizedState!==null;var S=a!==null&&a.memoizedState!==null,R=la,L=$e;if(la=R||s,$e=L||S,ot(t,e),$e=L,la=R,dt(e),n&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(a===null||S||la||$e||an(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){S=a=t;try{if(u=S.stateNode,s)d=u.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{p=S.stateNode;var Y=S.memoizedProps.style,M=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;p.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(ee){Te(S,S.return,ee)}}}else if(t.tag===6){if(a===null){S=t;try{S.stateNode.nodeValue=s?"":S.memoizedProps}catch(ee){Te(S,S.return,ee)}}}else if(t.tag===18){if(a===null){S=t;try{var O=S.stateNode;s?eh(O,!0):eh(S.stateNode,!1)}catch(ee){Te(S,S.return,ee)}}}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,qi(e,a))));break;case 19:ot(t,e),dt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,qi(e,n)));break;case 30:break;case 21:break;default:ot(t,e),dt(e)}}function dt(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(tf(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var s=a.stateNode,u=lr(e);Bi(e,u,s);break;case 5:var d=a.stateNode;a.flags&32&&(fn(d,""),a.flags&=-33);var p=lr(e);Bi(e,p,d);break;case 3:case 4:var S=a.stateNode.containerInfo,R=lr(e);ir(e,R,S);break;default:throw Error(o(161))}}catch(L){Te(e,e.return,L)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function df(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;df(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function sa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)lf(e,t.alternate,t),t=t.sibling}function an(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Na(4,t,t.return),an(t);break;case 1:Vt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Pd(t,t.return,a),an(t);break;case 27:Ol(t.stateNode);case 26:case 5:Vt(t,t.return),an(t);break;case 22:t.memoizedState===null&&an(t);break;case 30:an(t);break;default:an(t)}e=e.sibling}}function ua(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,s=e,u=t,d=u.flags;switch(u.tag){case 0:case 11:case 15:ua(s,u,a),Nl(4,u);break;case 1:if(ua(s,u,a),n=u,s=n.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(R){Te(n,n.return,R)}if(n=u,s=n.updateQueue,s!==null){var p=n.stateNode;try{var S=s.shared.hiddenCallbacks;if(S!==null)for(s.shared.hiddenCallbacks=null,s=0;s<S.length;s++)Yo(S[s],p)}catch(R){Te(n,n.return,R)}}a&&d&64&&Id(u),wl(u,u.return);break;case 27:af(u);case 26:case 5:ua(s,u,a),a&&n===null&&d&4&&ef(u),wl(u,u.return);break;case 12:ua(s,u,a);break;case 31:ua(s,u,a),a&&d&4&&rf(s,u);break;case 13:ua(s,u,a),a&&d&4&&cf(s,u);break;case 22:u.memoizedState===null&&ua(s,u,a),wl(u,u.return);break;case 30:break;default:ua(s,u,a)}t=t.sibling}}function ur(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&&dl(a))}function rr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&dl(e))}function Bt(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ff(e,t,a,n),t=t.sibling}function ff(e,t,a,n){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Bt(e,t,a,n),s&2048&&Nl(9,t);break;case 1:Bt(e,t,a,n);break;case 3:Bt(e,t,a,n),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&dl(e)));break;case 12:if(s&2048){Bt(e,t,a,n),e=t.stateNode;try{var u=t.memoizedProps,d=u.id,p=u.onPostCommit;typeof p=="function"&&p(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(S){Te(t,t.return,S)}}else Bt(e,t,a,n);break;case 31:Bt(e,t,a,n);break;case 13:Bt(e,t,a,n);break;case 23:break;case 22:u=t.stateNode,d=t.alternate,t.memoizedState!==null?u._visibility&2?Bt(e,t,a,n):El(e,t):u._visibility&2?Bt(e,t,a,n):(u._visibility|=2,Mn(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),s&2048&&ur(d,t);break;case 24:Bt(e,t,a,n),s&2048&&rr(t.alternate,t);break;default:Bt(e,t,a,n)}}function Mn(e,t,a,n,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,d=t,p=a,S=n,R=d.flags;switch(d.tag){case 0:case 11:case 15:Mn(u,d,p,S,s),Nl(8,d);break;case 23:break;case 22:var L=d.stateNode;d.memoizedState!==null?L._visibility&2?Mn(u,d,p,S,s):El(u,d):(L._visibility|=2,Mn(u,d,p,S,s)),s&&R&2048&&ur(d.alternate,d);break;case 24:Mn(u,d,p,S,s),s&&R&2048&&rr(d.alternate,d);break;default:Mn(u,d,p,S,s)}t=t.sibling}}function El(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,s=n.flags;switch(n.tag){case 22:El(a,n),s&2048&&ur(n.alternate,n);break;case 24:El(a,n),s&2048&&rr(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;)hf(e,t,a),e=e.sibling}function hf(e,t,a){switch(e.tag){case 26:zn(e,t,a),e.flags&Tl&&e.memoizedState!==null&&Vg(a,Lt,e.memoizedState,e.memoizedProps);break;case 5:zn(e,t,a);break;case 3:case 4:var n=Lt;Lt=es(e.stateNode.containerInfo),zn(e,t,a),Lt=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 mf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function kl(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];Fe=n,gf(n,e)}mf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)pf(e),e=e.sibling}function pf(e){switch(e.tag){case 0:case 11:case 15:kl(e),e.flags&2048&&Na(9,e,e.return);break;case 3:kl(e);break;case 12:kl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Yi(e)):kl(e);break;default:kl(e)}}function Yi(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];Fe=n,gf(n,e)}mf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Na(8,t,t.return),Yi(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Yi(t));break;default:Yi(t)}e=e.sibling}}function gf(e,t){for(;Fe!==null;){var a=Fe;switch(a.tag){case 0:case 11:case 15:Na(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:dl(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Fe=n;else e:for(a=e;Fe!==null;){n=Fe;var s=n.sibling,u=n.return;if(sf(n),n===a){Fe=null;break e}if(s!==null){s.return=u,Fe=s;break e}Fe=u}}}var ig={getCacheForType:function(e){var t=Pe(Ve),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Pe(Ve).controller.signal}},sg=typeof WeakMap=="function"?WeakMap:Map,Ce=0,ze=null,me=null,ve=0,Ee=0,jt=null,wa=!1,On=!1,cr=!1,ra=0,qe=0,Ea=0,nn=0,or=0,St=0,Un=0,_l=null,ft=null,dr=!1,Gi=0,vf=0,Zi=1/0,Vi=null,Ta=null,Je=0,ka=null,Dn=null,ca=0,fr=0,hr=null,yf=null,Al=0,mr=null;function Ct(){return(Ce&2)!==0&&ve!==0?ve&-ve:D.T!==null?xr():Mc()}function bf(){if(St===0)if((ve&536870912)===0||xe){var e=Il;Il<<=1,(Il&3932160)===0&&(Il=262144),St=e}else St=536870912;return e=bt.current,e!==null&&(e.flags|=32),St}function ht(e,t,a){(e===ze&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)&&(Hn(e,0),_a(e,ve,St,!1)),Wn(e,a),((Ce&2)===0||e!==ze)&&(e===ze&&((Ce&2)===0&&(nn|=a),qe===4&&_a(e,ve,St,!1)),Xt(e))}function xf(e,t,a){if((Ce&6)!==0)throw Error(o(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Fn(e,t),s=n?cg(e,t):gr(e,t,!0),u=n;do{if(s===0){On&&!n&&_a(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!ug(a)){s=gr(e,t,!1),u=!1;continue}if(s===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 p=e;s=_l;var S=p.current.memoizedState.isDehydrated;if(S&&(Hn(p,d).flags|=256),d=gr(p,d,!1),d!==2){if(cr&&!S){p.errorRecoveryDisabledLanes|=u,nn|=u,s=4;break e}u=ft,ft=s,u!==null&&(ft===null?ft=u:ft.push.apply(ft,u))}s=d}if(u=!1,s!==2)continue}}if(s===1){Hn(e,0),_a(e,t,0,!0);break}e:{switch(n=e,u=s,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:_a(n,t,St,!wa);break e;case 2:ft=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(s=Gi+300-mt(),10<s)){if(_a(n,t,St,!wa),ei(n,0,!0)!==0)break e;ca=t,n.timeoutHandle=Wf(jf.bind(null,n,a,ft,Vi,dr,t,St,nn,Un,wa,u,"Throttled",-0,0),s);break e}jf(n,a,ft,Vi,dr,t,St,nn,Un,wa,u,null,-0,0)}}break}while(!0);Xt(e)}function jf(e,t,a,n,s,u,d,p,S,R,L,Y,M,O){if(e.timeoutHandle=-1,Y=t.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Jt},hf(t,u,Y);var ee=(u&62914560)===u?Gi-mt():(u&4194048)===u?vf-mt():0;if(ee=Xg(Y,ee),ee!==null){ca=u,e.cancelPendingCommit=ee(_f.bind(null,e,t,u,a,n,s,d,p,S,L,Y,null,M,O)),_a(e,u,d,!R);return}}_f(e,t,u,a,n,s,d,p,S)}function ug(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 s=a[n],u=s.getSnapshot;s=s.value;try{if(!vt(u(),s))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&=~or,t&=~nn,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var s=t;0<s;){var u=31-gt(s),d=1<<u;n[u]=-1,s&=~d}a!==0&&_c(e,a,t)}function Xi(){return(Ce&6)===0?(Rl(0),!1):!0}function pr(){if(me!==null){if(Ee===0)var e=me.return;else e=me,It=Ja=null,Ru(e),Tn=null,hl=0,e=me;for(;e!==null;)Wd(e.alternate,e),e=e.return;me=null}}function Hn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Tg(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ca=0,pr(),ze=e,me=a=Ft(e.current,null),ve=t,Ee=0,jt=null,wa=!1,On=Fn(e,t),cr=!1,Un=St=or=nn=Ea=qe=0,ft=_l=null,dr=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var s=31-gt(n),u=1<<s;t|=e[s],n&=~u}return ra=t,fi(),a}function Sf(e,t){de=null,D.H=jl,t===En||t===xi?(t=Ho(),Ee=3):t===bu?(t=Ho(),Ee=4):Ee=t===$u?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,jt=t,me===null&&(qe=1,Oi(e,_t(t,e.current)))}function Cf(){var e=bt.current;return e===null?!0:(ve&4194048)===ve?zt===null:(ve&62914560)===ve||(ve&536870912)!==0?e===zt:!1}function Nf(){var e=D.H;return D.H=jl,e===null?jl:e}function wf(){var e=D.A;return D.A=ig,e}function Qi(){qe=4,wa||(ve&4194048)!==ve&&bt.current!==null||(On=!0),(Ea&134217727)===0&&(nn&134217727)===0||ze===null||_a(ze,ve,St,!1)}function gr(e,t,a){var n=Ce;Ce|=2;var s=Nf(),u=wf();(ze!==e||ve!==t)&&(Vi=null,Hn(e,t)),t=!1;var d=qe;e:do try{if(Ee!==0&&me!==null){var p=me,S=jt;switch(Ee){case 8:pr(),d=6;break e;case 3:case 2:case 9:case 6:bt.current===null&&(t=!0);var R=Ee;if(Ee=0,jt=null,Ln(e,p,S,R),a&&On){d=0;break e}break;default:R=Ee,Ee=0,jt=null,Ln(e,p,S,R)}}rg(),d=qe;break}catch(L){Sf(e,L)}while(!0);return t&&e.shellSuspendCounter++,It=Ja=null,Ce=n,D.H=s,D.A=u,me===null&&(ze=null,ve=0,fi()),d}function rg(){for(;me!==null;)Ef(me)}function cg(e,t){var a=Ce;Ce|=2;var n=Nf(),s=wf();ze!==e||ve!==t?(Vi=null,Zi=mt()+500,Hn(e,t)):On=Fn(e,t);e:do try{if(Ee!==0&&me!==null){t=me;var u=jt;t:switch(Ee){case 1:Ee=0,jt=null,Ln(e,t,u,1);break;case 2:case 9:if(Uo(u)){Ee=0,jt=null,Tf(t);break}t=function(){Ee!==2&&Ee!==9||ze!==e||(Ee=7),Xt(e)},u.then(t,t);break e;case 3:Ee=7;break e;case 4:Ee=5;break e;case 7:Uo(u)?(Ee=0,jt=null,Tf(t)):(Ee=0,jt=null,Ln(e,t,u,7));break;case 5:var d=null;switch(me.tag){case 26:d=me.memoizedState;case 5:case 27:var p=me;if(d?fh(d):p.stateNode.complete){Ee=0,jt=null;var S=p.sibling;if(S!==null)me=S;else{var R=p.return;R!==null?(me=R,$i(R)):me=null}break t}}Ee=0,jt=null,Ln(e,t,u,5);break;case 6:Ee=0,jt=null,Ln(e,t,u,6);break;case 8:pr(),qe=6;break e;default:throw Error(o(462))}}og();break}catch(L){Sf(e,L)}while(!0);return It=Ja=null,D.H=n,D.A=s,Ce=a,me!==null?0:(ze=null,ve=0,fi(),qe)}function og(){for(;me!==null&&!zm();)Ef(me)}function Ef(e){var t=Kd(e.alternate,e,ra);e.memoizedProps=e.pendingProps,t===null?$i(e):me=t}function Tf(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Zd(a,t,t.pendingProps,t.type,void 0,ve);break;case 11:t=Zd(a,t,t.pendingProps,t.type.render,t.ref,ve);break;case 5:Ru(t);default:Wd(a,t),t=me=No(t,ra),t=Kd(a,t,ra)}e.memoizedProps=e.pendingProps,t===null?$i(e):me=t}function Ln(e,t,a,n){It=Ja=null,Ru(t),Tn=null,hl=0;var s=t.return;try{if(Ip(e,s,t,a,ve)){qe=1,Oi(e,_t(a,e.current)),me=null;return}}catch(u){if(s!==null)throw me=s,u;qe=1,Oi(e,_t(a,e.current)),me=null;return}t.flags&32768?(xe||n===1?e=!0:On||(ve&536870912)!==0?e=!1:(wa=e=!0,(n===2||n===9||n===3||n===6)&&(n=bt.current,n!==null&&n.tag===13&&(n.flags|=16384))),kf(t,e)):$i(t)}function $i(e){var t=e;do{if((t.flags&32768)!==0){kf(t,wa);return}e=t.return;var a=tg(t.alternate,t,ra);if(a!==null){me=a;return}if(t=t.sibling,t!==null){me=t;return}me=t=e}while(t!==null);qe===0&&(qe=5)}function kf(e,t){do{var a=ag(e.alternate,e);if(a!==null){a.flags&=32767,me=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){me=e;return}me=e=a}while(e!==null);qe=6,me=null}function _f(e,t,a,n,s,u,d,p,S){e.cancelPendingCommit=null;do Ji();while(Je!==0);if((Ce&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=lu,Zm(e,a,u,d,p,S),e===ze&&(me=ze=null,ve=0),Dn=t,ka=e,ca=a,fr=u,hr=s,yf=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,mg(Fl,function(){return Of(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=D.T,D.T=null,s=K.p,K.p=2,d=Ce,Ce|=4;try{ng(e,t,a)}finally{Ce=d,K.p=s,D.T=n}}Je=1,Af(),Rf(),Mf()}}function Af(){if(Je===1){Je=0;var e=ka,t=Dn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=D.T,D.T=null;var n=K.p;K.p=2;var s=Ce;Ce|=4;try{of(t,e);var u=kr,d=po(e.containerInfo),p=u.focusedElem,S=u.selectionRange;if(d!==p&&p&&p.ownerDocument&&mo(p.ownerDocument.documentElement,p)){if(S!==null&&Ps(p)){var R=S.start,L=S.end;if(L===void 0&&(L=R),"selectionStart"in p)p.selectionStart=R,p.selectionEnd=Math.min(L,p.value.length);else{var Y=p.ownerDocument||document,M=Y&&Y.defaultView||window;if(M.getSelection){var O=M.getSelection(),ee=p.textContent.length,ue=Math.min(S.start,ee),Re=S.end===void 0?ue:Math.min(S.end,ee);!O.extend&&ue>Re&&(d=Re,Re=ue,ue=d);var T=ho(p,ue),C=ho(p,Re);if(T&&C&&(O.rangeCount!==1||O.anchorNode!==T.node||O.anchorOffset!==T.offset||O.focusNode!==C.node||O.focusOffset!==C.offset)){var A=Y.createRange();A.setStart(T.node,T.offset),O.removeAllRanges(),ue>Re?(O.addRange(A),O.extend(C.node,C.offset)):(A.setEnd(C.node,C.offset),O.addRange(A))}}}}for(Y=[],O=p;O=O.parentNode;)O.nodeType===1&&Y.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<Y.length;p++){var B=Y[p];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}ss=!!Tr,kr=Tr=null}finally{Ce=s,K.p=n,D.T=a}}e.current=t,Je=2}}function Rf(){if(Je===2){Je=0;var e=ka,t=Dn,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=D.T,D.T=null;var n=K.p;K.p=2;var s=Ce;Ce|=4;try{lf(e,t.alternate,t)}finally{Ce=s,K.p=n,D.T=a}}Je=3}}function Mf(){if(Je===4||Je===3){Je=0,Om();var e=ka,t=Dn,a=ca,n=yf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Je=5:(Je=0,Dn=ka=null,zf(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Ta=null),Os(a),t=t.stateNode,pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot(Kn,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=D.T,s=K.p,K.p=2,D.T=null;try{for(var u=e.onRecoverableError,d=0;d<n.length;d++){var p=n[d];u(p.value,{componentStack:p.stack})}}finally{D.T=t,K.p=s}}(ca&3)!==0&&Ji(),Xt(e),s=e.pendingLanes,(a&261930)!==0&&(s&42)!==0?e===mr?Al++:(Al=0,mr=e):Al=0,Rl(0)}}function zf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,dl(t)))}function Ji(){return Af(),Rf(),Mf(),Of()}function Of(){if(Je!==5)return!1;var e=ka,t=fr;fr=0;var a=Os(ca),n=D.T,s=K.p;try{K.p=32>a?32:a,D.T=null,a=hr,hr=null;var u=ka,d=ca;if(Je=0,Dn=ka=null,ca=0,(Ce&6)!==0)throw Error(o(331));var p=Ce;if(Ce|=4,pf(u.current),ff(u,u.current,d,a),Ce=p,Rl(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(Kn,u)}catch{}return!0}finally{K.p=s,D.T=n,zf(e,t)}}function Uf(e,t,a){t=_t(a,t),t=Qu(e.stateNode,t,2),e=ja(e,t,2),e!==null&&(Wn(e,2),Xt(e))}function Te(e,t,a){if(e.tag===3)Uf(e,e,a);else for(;t!==null;){if(t.tag===3){Uf(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=_t(a,e),a=Ud(2),n=ja(t,a,2),n!==null&&(Dd(a,n,t,e),Wn(n,2),Xt(n));break}}t=t.return}}function vr(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new sg;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(a)||(cr=!0,s.add(a),e=dg.bind(null,e,t,a),t.then(e,e))}function dg(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ze===e&&(ve&a)===a&&(qe===4||qe===3&&(ve&62914560)===ve&&300>mt()-Gi?(Ce&2)===0&&Hn(e,0):or|=a,Un===ve&&(Un=0)),Xt(e)}function Df(e,t){t===0&&(t=kc()),e=Xa(e,t),e!==null&&(Wn(e,t),Xt(e))}function fg(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Df(e,a)}function hg(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(a=s.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),Df(e,a)}function mg(e,t){return As(e,t)}var Ki=null,Bn=null,yr=!1,Fi=!1,br=!1,Aa=0;function Xt(e){e!==Bn&&e.next===null&&(Bn===null?Ki=Bn=e:Bn=Bn.next=e),Fi=!0,yr||(yr=!0,gg())}function Rl(e,t){if(!br&&Fi){br=!0;do for(var a=!1,n=Ki;n!==null;){if(e!==0){var s=n.pendingLanes;if(s===0)var u=0;else{var d=n.suspendedLanes,p=n.pingedLanes;u=(1<<31-gt(42|e)+1)-1,u&=s&~(d&~p),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,qf(n,u))}else u=ve,u=ei(n,n===ze?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||Fn(n,u)||(a=!0,qf(n,u));n=n.next}while(a);br=!1}}function pg(){Hf()}function Hf(){Fi=yr=!1;var e=0;Aa!==0&&Eg()&&(e=Aa);for(var t=mt(),a=null,n=Ki;n!==null;){var s=n.next,u=Lf(n,t);u===0?(n.next=null,a===null?Ki=s:a.next=s,s===null&&(Bn=a)):(a=n,(e!==0||(u&3)!==0)&&(Fi=!0)),n=s}Je!==0&&Je!==5||Rl(e),Aa!==0&&(Aa=0)}function Lf(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var d=31-gt(u),p=1<<d,S=s[d];S===-1?((p&a)===0||(p&n)!==0)&&(s[d]=Gm(p,t)):S<=t&&(e.expiredLanes|=p),u&=~p}if(t=ze,a=ve,a=ei(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Rs(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Fn(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Rs(n),Os(a)){case 2:case 8:a=Ec;break;case 32:a=Fl;break;case 268435456:a=Tc;break;default:a=Fl}return n=Bf.bind(null,e),a=As(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Rs(n),e.callbackPriority=2,e.callbackNode=null,2}function Bf(e,t){if(Je!==0&&Je!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ji()&&e.callbackNode!==a)return null;var n=ve;return n=ei(e,e===ze?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(xf(e,n,t),Lf(e,mt()),e.callbackNode!=null&&e.callbackNode===a?Bf.bind(null,e):null)}function qf(e,t){if(Ji())return null;xf(e,t,!0)}function gg(){kg(function(){(Ce&6)!==0?As(wc,pg):Hf()})}function xr(){if(Aa===0){var e=Nn;e===0&&(e=Wl,Wl<<=1,(Wl&261888)===0&&(Wl=256)),Aa=e}return Aa}function Yf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:li(""+e)}function Gf(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 vg(e,t,a,n,s){if(t==="submit"&&a&&a.stateNode===s){var u=Yf((s[ut]||null).action),d=n.submitter;d&&(t=(t=d[ut]||null)?Yf(t.formAction):d.getAttribute("formAction"),t!==null&&(u=t,d=null));var p=new ri("action","action",null,n,s);e.push({event:p,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Aa!==0){var S=d?Gf(s,d):new FormData(s);qu(a,{pending:!0,data:S,method:s.method,action:u},null,S)}}else typeof u=="function"&&(p.preventDefault(),S=d?Gf(s,d):new FormData(s),qu(a,{pending:!0,data:S,method:s.method,action:u},u,S))},currentTarget:s}]})}}for(var jr=0;jr<nu.length;jr++){var Sr=nu[jr],yg=Sr.toLowerCase(),bg=Sr[0].toUpperCase()+Sr.slice(1);Ht(yg,"on"+bg)}Ht(yo,"onAnimationEnd"),Ht(bo,"onAnimationIteration"),Ht(xo,"onAnimationStart"),Ht("dblclick","onDoubleClick"),Ht("focusin","onFocus"),Ht("focusout","onBlur"),Ht(Up,"onTransitionRun"),Ht(Dp,"onTransitionStart"),Ht(Hp,"onTransitionCancel"),Ht(jo,"onTransitionEnd"),on("onMouseEnter",["mouseout","mouseover"]),on("onMouseLeave",["mouseout","mouseover"]),on("onPointerEnter",["pointerout","pointerover"]),on("onPointerLeave",["pointerout","pointerover"]),Ya("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ya("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ya("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ya("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ya("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ya("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var 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(" "),xg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ml));function Zf(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],s=n.event;n=n.listeners;e:{var u=void 0;if(t)for(var d=n.length-1;0<=d;d--){var p=n[d],S=p.instance,R=p.currentTarget;if(p=p.listener,S!==u&&s.isPropagationStopped())break e;u=p,s.currentTarget=R;try{u(s)}catch(L){di(L)}s.currentTarget=null,u=S}else for(d=0;d<n.length;d++){if(p=n[d],S=p.instance,R=p.currentTarget,p=p.listener,S!==u&&s.isPropagationStopped())break e;u=p,s.currentTarget=R;try{u(s)}catch(L){di(L)}s.currentTarget=null,u=S}}}}function pe(e,t){var a=t[Us];a===void 0&&(a=t[Us]=new Set);var n=e+"__bubble";a.has(n)||(Vf(t,e,2,!1),a.add(n))}function Cr(e,t,a){var n=0;t&&(n|=4),Vf(a,e,n,t)}var Wi="_reactListening"+Math.random().toString(36).slice(2);function Nr(e){if(!e[Wi]){e[Wi]=!0,Uc.forEach(function(a){a!=="selectionchange"&&(xg.has(a)||Cr(a,!1,e),Cr(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wi]||(t[Wi]=!0,Cr("selectionchange",!1,t))}}function Vf(e,t,a,n){switch(bh(t)){case 2:var s=Jg;break;case 8:s=Kg;break;default:s=Br}a=s.bind(null,t,a,e),s=void 0,!Vs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,a,{capture:!0,passive:s}):e.addEventListener(t,a,!0):s!==void 0?e.addEventListener(t,a,{passive:s}):e.addEventListener(t,a,!1)}function wr(e,t,a,n,s){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 p=n.stateNode.containerInfo;if(p===s)break;if(d===4)for(d=n.return;d!==null;){var S=d.tag;if((S===3||S===4)&&d.stateNode.containerInfo===s)return;d=d.return}for(;p!==null;){if(d=un(p),d===null)return;if(S=d.tag,S===5||S===6||S===26||S===27){n=u=d;continue e}p=p.parentNode}}n=n.return}$c(function(){var R=u,L=Gs(a),Y=[];e:{var M=So.get(e);if(M!==void 0){var O=ri,ee=e;switch(e){case"keypress":if(si(a)===0)break e;case"keydown":case"keyup":O=hp;break;case"focusin":ee="focus",O=Js;break;case"focusout":ee="blur",O=Js;break;case"beforeblur":case"afterblur":O=Js;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":O=Fc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=tp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=gp;break;case yo:case bo:case xo:O=lp;break;case jo:O=yp;break;case"scroll":case"scrollend":O=Pm;break;case"wheel":O=xp;break;case"copy":case"cut":case"paste":O=sp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Ic;break;case"toggle":case"beforetoggle":O=Sp}var ue=(t&4)!==0,Re=!ue&&(e==="scroll"||e==="scrollend"),T=ue?M!==null?M+"Capture":null:M;ue=[];for(var C=R,A;C!==null;){var B=C;if(A=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||A===null||T===null||(B=el(C,T),B!=null&&ue.push(zl(C,B,A))),Re)break;C=C.return}0<ue.length&&(M=new O(M,ee,null,a,L),Y.push({event:M,listeners:ue}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",M&&a!==Ys&&(ee=a.relatedTarget||a.fromElement)&&(un(ee)||ee[sn]))break e;if((O||M)&&(M=L.window===L?L:(M=L.ownerDocument)?M.defaultView||M.parentWindow:window,O?(ee=a.relatedTarget||a.toElement,O=R,ee=ee?un(ee):null,ee!==null&&(Re=h(ee),ue=ee.tag,ee!==Re||ue!==5&&ue!==27&&ue!==6)&&(ee=null)):(O=null,ee=R),O!==ee)){if(ue=Fc,B="onMouseLeave",T="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(ue=Ic,B="onPointerLeave",T="onPointerEnter",C="pointer"),Re=O==null?M:Pn(O),A=ee==null?M:Pn(ee),M=new ue(B,C+"leave",O,a,L),M.target=Re,M.relatedTarget=A,B=null,un(L)===R&&(ue=new ue(T,C+"enter",ee,a,L),ue.target=A,ue.relatedTarget=Re,B=ue),Re=B,O&&ee)t:{for(ue=jg,T=O,C=ee,A=0,B=T;B;B=ue(B))A++;B=0;for(var se=C;se;se=ue(se))B++;for(;0<A-B;)T=ue(T),A--;for(;0<B-A;)C=ue(C),B--;for(;A--;){if(T===C||C!==null&&T===C.alternate){ue=T;break t}T=ue(T),C=ue(C)}ue=null}else ue=null;O!==null&&Xf(Y,M,O,ue,!1),ee!==null&&Re!==null&&Xf(Y,Re,ee,ue,!0)}}e:{if(M=R?Pn(R):window,O=M.nodeName&&M.nodeName.toLowerCase(),O==="select"||O==="input"&&M.type==="file")var je=so;else if(lo(M))if(uo)je=Mp;else{je=Ap;var ne=_p}else O=M.nodeName,!O||O.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?R&&qs(R.elementType)&&(je=so):je=Rp;if(je&&(je=je(e,R))){io(Y,je,a,L);break e}ne&&ne(e,M,R),e==="focusout"&&R&&M.type==="number"&&R.memoizedProps.value!=null&&Bs(M,"number",M.value)}switch(ne=R?Pn(R):window,e){case"focusin":(lo(ne)||ne.contentEditable==="true")&&(gn=ne,eu=R,rl=null);break;case"focusout":rl=eu=gn=null;break;case"mousedown":tu=!0;break;case"contextmenu":case"mouseup":case"dragend":tu=!1,go(Y,a,L);break;case"selectionchange":if(Op)break;case"keydown":case"keyup":go(Y,a,L)}var fe;if(Fs)e:{switch(e){case"compositionstart":var ye="onCompositionStart";break e;case"compositionend":ye="onCompositionEnd";break e;case"compositionupdate":ye="onCompositionUpdate";break e}ye=void 0}else pn?ao(e,a)&&(ye="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ye="onCompositionStart");ye&&(Pc&&a.locale!=="ko"&&(pn||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&pn&&(fe=Jc()):(ma=L,Xs="value"in ma?ma.value:ma.textContent,pn=!0)),ne=Ii(R,ye),0<ne.length&&(ye=new Wc(ye,e,null,a,L),Y.push({event:ye,listeners:ne}),fe?ye.data=fe:(fe=no(a),fe!==null&&(ye.data=fe)))),(fe=Np?wp(e,a):Ep(e,a))&&(ye=Ii(R,"onBeforeInput"),0<ye.length&&(ne=new Wc("onBeforeInput","beforeinput",null,a,L),Y.push({event:ne,listeners:ye}),ne.data=fe)),vg(Y,e,R,a,L)}Zf(Y,t)})}function zl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ii(e,t){for(var a=t+"Capture",n=[];e!==null;){var s=e,u=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||u===null||(s=el(e,a),s!=null&&n.unshift(zl(e,s,u)),s=el(e,t),s!=null&&n.push(zl(e,s,u))),e.tag===3)return n;e=e.return}return[]}function jg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xf(e,t,a,n,s){for(var u=t._reactName,d=[];a!==null&&a!==n;){var p=a,S=p.alternate,R=p.stateNode;if(p=p.tag,S!==null&&S===n)break;p!==5&&p!==26&&p!==27||R===null||(S=R,s?(R=el(a,u),R!=null&&d.unshift(zl(a,R,S))):s||(R=el(a,u),R!=null&&d.push(zl(a,R,S)))),a=a.return}d.length!==0&&e.push({event:t,listeners:d})}var Sg=/\r\n?/g,Cg=/\u0000|\uFFFD/g;function Qf(e){return(typeof e=="string"?e:""+e).replace(Sg,`
49
- `).replace(Cg,"")}function $f(e,t){return t=Qf(t),Qf(e)===t}function Ae(e,t,a,n,s,u){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||fn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&fn(e,""+n);break;case"className":ai(e,"class",n);break;case"tabIndex":ai(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":ai(e,a,n);break;case"style":Xc(e,n,u);break;case"data":if(t!=="object"){ai(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=li(""+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"&&Ae(e,t,"name",s.name,s,null),Ae(e,t,"formEncType",s.formEncType,s,null),Ae(e,t,"formMethod",s.formMethod,s,null),Ae(e,t,"formTarget",s.formTarget,s,null)):(Ae(e,t,"encType",s.encType,s,null),Ae(e,t,"method",s.method,s,null),Ae(e,t,"target",s.target,s,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=li(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Jt);break;case"onScroll":n!=null&&pe("scroll",e);break;case"onScrollEnd":n!=null&&pe("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(s.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=li(""+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":pe("beforetoggle",e),pe("toggle",e),ti(e,"popover",n);break;case"xlinkActuate":$t(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":$t(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":$t(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":$t(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":$t(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":$t(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":$t(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":$t(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":$t(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":ti(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=Wm.get(a)||a,ti(e,a,n))}}function Er(e,t,a,n,s,u){switch(a){case"style":Xc(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(s.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof n=="string"?fn(e,n):(typeof n=="number"||typeof n=="bigint")&&fn(e,""+n);break;case"onScroll":n!=null&&pe("scroll",e);break;case"onScrollEnd":n!=null&&pe("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(!Dc.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(s=a.endsWith("Capture"),t=a.slice(2,s?a.length-7:void 0),u=e[ut]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,s),typeof n=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,s);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):ti(e,a,n)}}}function tt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":pe("error",e),pe("load",e);var n=!1,s=!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":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ae(e,t,u,d,a,null)}}s&&Ae(e,t,"srcSet",a.srcSet,a,null),n&&Ae(e,t,"src",a.src,a,null);return;case"input":pe("invalid",e);var p=u=d=s=null,S=null,R=null;for(n in a)if(a.hasOwnProperty(n)){var L=a[n];if(L!=null)switch(n){case"name":s=L;break;case"type":d=L;break;case"checked":S=L;break;case"defaultChecked":R=L;break;case"value":u=L;break;case"defaultValue":p=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(o(137,t));break;default:Ae(e,t,n,L,a,null)}}Yc(e,u,p,S,R,d,s,!1);return;case"select":pe("invalid",e),n=d=u=null;for(s in a)if(a.hasOwnProperty(s)&&(p=a[s],p!=null))switch(s){case"value":u=p;break;case"defaultValue":d=p;break;case"multiple":n=p;default:Ae(e,t,s,p,a,null)}t=u,a=d,e.multiple=!!n,t!=null?dn(e,!!n,t,!1):a!=null&&dn(e,!!n,a,!0);return;case"textarea":pe("invalid",e),u=s=n=null;for(d in a)if(a.hasOwnProperty(d)&&(p=a[d],p!=null))switch(d){case"value":n=p;break;case"defaultValue":s=p;break;case"children":u=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(o(91));break;default:Ae(e,t,d,p,a,null)}Zc(e,n,s,u);return;case"option":for(S in a)if(a.hasOwnProperty(S)&&(n=a[S],n!=null))switch(S){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:Ae(e,t,S,n,a,null)}return;case"dialog":pe("beforetoggle",e),pe("toggle",e),pe("cancel",e),pe("close",e);break;case"iframe":case"object":pe("load",e);break;case"video":case"audio":for(n=0;n<Ml.length;n++)pe(Ml[n],e);break;case"image":pe("error",e),pe("load",e);break;case"details":pe("toggle",e);break;case"embed":case"source":case"link":pe("error",e),pe("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(R in a)if(a.hasOwnProperty(R)&&(n=a[R],n!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ae(e,t,R,n,a,null)}return;default:if(qs(t)){for(L in a)a.hasOwnProperty(L)&&(n=a[L],n!==void 0&&Er(e,t,L,n,a,void 0));return}}for(p in a)a.hasOwnProperty(p)&&(n=a[p],n!=null&&Ae(e,t,p,n,a,null))}function Ng(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 s=null,u=null,d=null,p=null,S=null,R=null,L=null;for(O in a){var Y=a[O];if(a.hasOwnProperty(O)&&Y!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":S=Y;default:n.hasOwnProperty(O)||Ae(e,t,O,null,n,Y)}}for(var M in n){var O=n[M];if(Y=a[M],n.hasOwnProperty(M)&&(O!=null||Y!=null))switch(M){case"type":u=O;break;case"name":s=O;break;case"checked":R=O;break;case"defaultChecked":L=O;break;case"value":d=O;break;case"defaultValue":p=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(o(137,t));break;default:O!==Y&&Ae(e,t,M,O,n,Y)}}Ls(e,d,p,S,R,L,u,s);return;case"select":O=d=p=M=null;for(u in a)if(S=a[u],a.hasOwnProperty(u)&&S!=null)switch(u){case"value":break;case"multiple":O=S;default:n.hasOwnProperty(u)||Ae(e,t,u,null,n,S)}for(s in n)if(u=n[s],S=a[s],n.hasOwnProperty(s)&&(u!=null||S!=null))switch(s){case"value":M=u;break;case"defaultValue":p=u;break;case"multiple":d=u;default:u!==S&&Ae(e,t,s,u,n,S)}t=p,a=d,n=O,M!=null?dn(e,!!a,M,!1):!!n!=!!a&&(t!=null?dn(e,!!a,t,!0):dn(e,!!a,a?[]:"",!1));return;case"textarea":O=M=null;for(p in a)if(s=a[p],a.hasOwnProperty(p)&&s!=null&&!n.hasOwnProperty(p))switch(p){case"value":break;case"children":break;default:Ae(e,t,p,null,n,s)}for(d in n)if(s=n[d],u=a[d],n.hasOwnProperty(d)&&(s!=null||u!=null))switch(d){case"value":M=s;break;case"defaultValue":O=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(o(91));break;default:s!==u&&Ae(e,t,d,s,n,u)}Gc(e,M,O);return;case"option":for(var ee in a)if(M=a[ee],a.hasOwnProperty(ee)&&M!=null&&!n.hasOwnProperty(ee))switch(ee){case"selected":e.selected=!1;break;default:Ae(e,t,ee,null,n,M)}for(S in n)if(M=n[S],O=a[S],n.hasOwnProperty(S)&&M!==O&&(M!=null||O!=null))switch(S){case"selected":e.selected=M&&typeof M!="function"&&typeof M!="symbol";break;default:Ae(e,t,S,M,n,O)}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 ue in a)M=a[ue],a.hasOwnProperty(ue)&&M!=null&&!n.hasOwnProperty(ue)&&Ae(e,t,ue,null,n,M);for(R in n)if(M=n[R],O=a[R],n.hasOwnProperty(R)&&M!==O&&(M!=null||O!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(o(137,t));break;default:Ae(e,t,R,M,n,O)}return;default:if(qs(t)){for(var Re in a)M=a[Re],a.hasOwnProperty(Re)&&M!==void 0&&!n.hasOwnProperty(Re)&&Er(e,t,Re,void 0,n,M);for(L in n)M=n[L],O=a[L],!n.hasOwnProperty(L)||M===O||M===void 0&&O===void 0||Er(e,t,L,M,n,O);return}}for(var T in a)M=a[T],a.hasOwnProperty(T)&&M!=null&&!n.hasOwnProperty(T)&&Ae(e,t,T,null,n,M);for(Y in n)M=n[Y],O=a[Y],!n.hasOwnProperty(Y)||M===O||M==null&&O==null||Ae(e,t,Y,M,n,O)}function Jf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function wg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var s=a[n],u=s.transferSize,d=s.initiatorType,p=s.duration;if(u&&p&&Jf(d)){for(d=0,p=s.responseEnd,n+=1;n<a.length;n++){var S=a[n],R=S.startTime;if(R>p)break;var L=S.transferSize,Y=S.initiatorType;L&&Jf(Y)&&(S=S.responseEnd,d+=L*(S<p?1:(p-R)/(S-R)))}if(--n,t+=8*(u+d)/(s.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 Tr=null,kr=null;function Pi(e){return e.nodeType===9?e:e.ownerDocument}function Kf(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 Ff(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 _r(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 Ar=null;function Eg(){var e=window.event;return e&&e.type==="popstate"?e===Ar?!1:(Ar=e,!0):(Ar=null,!1)}var Wf=typeof setTimeout=="function"?setTimeout:void 0,Tg=typeof clearTimeout=="function"?clearTimeout:void 0,If=typeof Promise=="function"?Promise:void 0,kg=typeof queueMicrotask=="function"?queueMicrotask:typeof If<"u"?function(e){return If.resolve(null).then(e).catch(_g)}:Wf;function _g(e){setTimeout(function(){throw e})}function Ra(e){return e==="head"}function Pf(e,t){var a=t,n=0;do{var s=a.nextSibling;if(e.removeChild(a),s&&s.nodeType===8)if(a=s.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(s),Zn(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,p=u.nodeName;u[In]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=d}}else a==="body"&&Ol(e.ownerDocument.body);a=s}while(a);Zn(t)}function eh(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),Ds(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Ag(e,t,a,n){for(;e.nodeType===1;){var s=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[In])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!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Ot(e.nextSibling),e===null)break}return null}function Rg(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ot(e.nextSibling),e===null))return null;return e}function th(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ot(e.nextSibling),e===null))return null;return e}function Mr(e){return e.data==="$?"||e.data==="$~"}function zr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Mg(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 Ot(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 Or=null;function ah(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ot(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function nh(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 lh(e,t,a){switch(t=Pi(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]);Ds(e)}var Ut=new Map,ih=new Set;function es(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var oa=K.d;K.d={f:zg,r:Og,D:Ug,C:Dg,L:Hg,m:Lg,X:qg,S:Bg,M:Yg};function zg(){var e=oa.f(),t=Xi();return e||t}function Og(e){var t=rn(e);t!==null&&t.tag===5&&t.type==="form"?jd(t):oa.r(e)}var qn=typeof document>"u"?null:document;function sh(e,t,a){var n=qn;if(n&&typeof t=="string"&&t){var s=Tt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof a=="string"&&(s+='[crossorigin="'+a+'"]'),ih.has(s)||(ih.add(s),e={rel:e,crossOrigin:a,href:t},n.querySelector(s)===null&&(t=n.createElement("link"),tt(t,"link",e),Ke(t),n.head.appendChild(t)))}}function Ug(e){oa.D(e),sh("dns-prefetch",e,null)}function Dg(e,t){oa.C(e,t),sh("preconnect",e,t)}function Hg(e,t,a){oa.L(e,t,a);var n=qn;if(n&&e&&t){var s='link[rel="preload"][as="'+Tt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(s+='[imagesrcset="'+Tt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(s+='[imagesizes="'+Tt(a.imageSizes)+'"]')):s+='[href="'+Tt(e)+'"]';var u=s;switch(t){case"style":u=Yn(e);break;case"script":u=Gn(e)}Ut.has(u)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ut.set(u,e),n.querySelector(s)!==null||t==="style"&&n.querySelector(Ul(u))||t==="script"&&n.querySelector(Dl(u))||(t=n.createElement("link"),tt(t,"link",e),Ke(t),n.head.appendChild(t)))}}function Lg(e,t){oa.m(e,t);var a=qn;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Tt(n)+'"][href="'+Tt(e)+'"]',u=s;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Gn(e)}if(!Ut.has(u)&&(e=x({rel:"modulepreload",href:e},t),Ut.set(u,e),a.querySelector(s)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Dl(u)))return}n=a.createElement("link"),tt(n,"link",e),Ke(n),a.head.appendChild(n)}}}function Bg(e,t,a){oa.S(e,t,a);var n=qn;if(n&&e){var s=cn(n).hoistableStyles,u=Yn(e);t=t||"default";var d=s.get(u);if(!d){var p={loading:0,preload:null};if(d=n.querySelector(Ul(u)))p.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ut.get(u))&&Ur(e,a);var S=d=n.createElement("link");Ke(S),tt(S,"link",e),S._p=new Promise(function(R,L){S.onload=R,S.onerror=L}),S.addEventListener("load",function(){p.loading|=1}),S.addEventListener("error",function(){p.loading|=2}),p.loading|=4,ts(d,t,n)}d={type:"stylesheet",instance:d,count:1,state:p},s.set(u,d)}}}function qg(e,t){oa.X(e,t);var a=qn;if(a&&e){var n=cn(a).hoistableScripts,s=Gn(e),u=n.get(s);u||(u=a.querySelector(Dl(s)),u||(e=x({src:e,async:!0},t),(t=Ut.get(s))&&Dr(e,t),u=a.createElement("script"),Ke(u),tt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(s,u))}}function Yg(e,t){oa.M(e,t);var a=qn;if(a&&e){var n=cn(a).hoistableScripts,s=Gn(e),u=n.get(s);u||(u=a.querySelector(Dl(s)),u||(e=x({src:e,async:!0,type:"module"},t),(t=Ut.get(s))&&Dr(e,t),u=a.createElement("script"),Ke(u),tt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(s,u))}}function uh(e,t,a,n){var s=(s=he.current)?es(s):null;if(!s)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Yn(a.href),a=cn(s).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=Yn(a.href);var u=cn(s).hoistableStyles,d=u.get(e);if(d||(s=s.ownerDocument||s,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=s.querySelector(Ul(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||Gg(s,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=Gn(a),a=cn(s).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 Yn(e){return'href="'+Tt(e)+'"'}function Ul(e){return'link[rel="stylesheet"]['+e+"]"}function rh(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function Gg(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}),tt(t,"link",a),Ke(t),e.head.appendChild(t))}function Gn(e){return'[src="'+Tt(e)+'"]'}function Dl(e){return"script[async]"+e}function ch(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Tt(a.href)+'"]');if(n)return t.instance=n,Ke(n),n;var s=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Ke(n),tt(n,"style",s),ts(n,a.precedence,e),t.instance=n;case"stylesheet":s=Yn(a.href);var u=e.querySelector(Ul(s));if(u)return t.state.loading|=4,t.instance=u,Ke(u),u;n=rh(a),(s=Ut.get(s))&&Ur(n,s),u=(e.ownerDocument||e).createElement("link"),Ke(u);var d=u;return d._p=new Promise(function(p,S){d.onload=p,d.onerror=S}),tt(u,"link",n),t.state.loading|=4,ts(u,a.precedence,e),t.instance=u;case"script":return u=Gn(a.src),(s=e.querySelector(Dl(u)))?(t.instance=s,Ke(s),s):(n=a,(s=Ut.get(u))&&(n=x({},a),Dr(n,s)),e=e.ownerDocument||e,s=e.createElement("script"),Ke(s),tt(s,"link",n),e.head.appendChild(s),t.instance=s);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,ts(n,a.precedence,e));return t.instance}function ts(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=n.length?n[n.length-1]:null,u=s,d=0;d<n.length;d++){var p=n[d];if(p.dataset.precedence===t)u=p;else if(u!==s)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Ur(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Dr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var as=null;function oh(e,t,a){if(as===null){var n=new Map,s=as=new Map;s.set(a,n)}else s=as,n=s.get(a),n||(n=new Map,s.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),s=0;s<a.length;s++){var u=a[s];if(!(u[In]||u[We]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var d=u.getAttribute(t)||"";d=e+d;var p=n.get(d);p?p.push(u):n.set(d,[u])}}return n}function dh(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Zg(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 fh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Vg(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 s=Yn(n.href),u=t.querySelector(Ul(s));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ns.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,Ke(u);return}u=t.ownerDocument||t,n=rh(n),(s=Ut.get(s))&&Ur(n,s),u=u.createElement("link"),Ke(u);var d=u;d._p=new Promise(function(p,S){d.onload=p,d.onerror=S}),tt(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=ns.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Hr=0;function Xg(e,t){return e.stylesheets&&e.count===0&&is(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&is(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Hr===0&&(Hr=62500*wg());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&is(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Hr?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(s)}}:null}function ns(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)is(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ls=null;function is(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ls=new Map,t.forEach(Qg,e),ls=null,ns.call(e))}function Qg(e,t){if(!(t.state.loading&4)){var a=ls.get(e);if(a)var n=a.get(null);else{a=new Map,ls.set(e,a);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<s.length;u++){var d=s[u];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(a.set(d.dataset.precedence,d),n=d)}n&&a.set(null,n)}s=t.instance,d=s.getAttribute("data-precedence"),u=a.get(d)||n,u===n&&a.set(null,s),a.set(d,s),this.count++,n=ns.bind(this),s.addEventListener("load",n),s.addEventListener("error",n),u?u.parentNode.insertBefore(s,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Hl={$$typeof:V,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function $g(e,t,a,n,s,u,d,p,S){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=Ms(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ms(0),this.hiddenUpdates=Ms(null),this.identifierPrefix=n,this.onUncaughtError=s,this.onCaughtError=u,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function hh(e,t,a,n,s,u,d,p,S,R,L,Y){return e=new $g(e,t,a,d,S,R,L,Y,p),t=1,u===!0&&(t|=24),u=yt(3,null,null,t),e.current=u,u.stateNode=e,t=gu(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:n,isDehydrated:a,cache:t},xu(u),e}function mh(e){return e?(e=bn,e):bn}function ph(e,t,a,n,s,u){s=mh(s),n.context===null?n.context=s:n.pendingContext=s,n=xa(t),n.payload={element:a},u=u===void 0?null:u,u!==null&&(n.callback=u),a=ja(e,n,t),a!==null&&(ht(a,e,t),pl(a,e,t))}function gh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Lr(e,t){gh(e,t),(e=e.alternate)&&gh(e,t)}function vh(e){if(e.tag===13||e.tag===31){var t=Xa(e,67108864);t!==null&&ht(t,e,67108864),Lr(e,67108864)}}function yh(e){if(e.tag===13||e.tag===31){var t=Ct();t=zs(t);var a=Xa(e,t);a!==null&&ht(a,e,t),Lr(e,t)}}var ss=!0;function Jg(e,t,a,n){var s=D.T;D.T=null;var u=K.p;try{K.p=2,Br(e,t,a,n)}finally{K.p=u,D.T=s}}function Kg(e,t,a,n){var s=D.T;D.T=null;var u=K.p;try{K.p=8,Br(e,t,a,n)}finally{K.p=u,D.T=s}}function Br(e,t,a,n){if(ss){var s=qr(n);if(s===null)wr(e,t,n,us,a),xh(e,n);else if(Wg(s,e,t,a,n))n.stopPropagation();else if(xh(e,n),t&4&&-1<Fg.indexOf(e)){for(;s!==null;){var u=rn(s);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var d=qa(u.pendingLanes);if(d!==0){var p=u;for(p.pendingLanes|=2,p.entangledLanes|=2;d;){var S=1<<31-gt(d);p.entanglements[1]|=S,d&=~S}Xt(u),(Ce&6)===0&&(Zi=mt()+500,Rl(0))}}break;case 31:case 13:p=Xa(u,2),p!==null&&ht(p,u,2),Xi(),Lr(u,2)}if(u=qr(n),u===null&&wr(e,t,n,us,a),u===s)break;s=u}s!==null&&n.stopPropagation()}else wr(e,t,n,null,a)}}function qr(e){return e=Gs(e),Yr(e)}var us=null;function Yr(e){if(us=null,e=un(e),e!==null){var t=h(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=v(t),e!==null)return e;e=null}else if(a===31){if(e=y(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 us=e,null}function bh(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(Um()){case wc:return 2;case Ec:return 8;case Fl:case Dm:return 32;case Tc:return 268435456;default:return 32}default:return 32}}var Gr=!1,Ma=null,za=null,Oa=null,Ll=new Map,Bl=new Map,Ua=[],Fg="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 xh(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":Ll.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bl.delete(t.pointerId)}}function ql(e,t,a,n,s,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:u,targetContainers:[s]},t!==null&&(t=rn(t),t!==null&&vh(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Wg(e,t,a,n,s){switch(t){case"focusin":return Ma=ql(Ma,e,t,a,n,s),!0;case"dragenter":return za=ql(za,e,t,a,n,s),!0;case"mouseover":return Oa=ql(Oa,e,t,a,n,s),!0;case"pointerover":var u=s.pointerId;return Ll.set(u,ql(Ll.get(u)||null,e,t,a,n,s)),!0;case"gotpointercapture":return u=s.pointerId,Bl.set(u,ql(Bl.get(u)||null,e,t,a,n,s)),!0}return!1}function jh(e){var t=un(e.target);if(t!==null){var a=h(t);if(a!==null){if(t=a.tag,t===13){if(t=v(a),t!==null){e.blockedOn=t,zc(e.priority,function(){yh(a)});return}}else if(t===31){if(t=y(a),t!==null){e.blockedOn=t,zc(e.priority,function(){yh(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 rs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=qr(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Ys=n,a.target.dispatchEvent(n),Ys=null}else return t=rn(a),t!==null&&vh(t),e.blockedOn=a,!1;t.shift()}return!0}function Sh(e,t,a){rs(e)&&a.delete(t)}function Ig(){Gr=!1,Ma!==null&&rs(Ma)&&(Ma=null),za!==null&&rs(za)&&(za=null),Oa!==null&&rs(Oa)&&(Oa=null),Ll.forEach(Sh),Bl.forEach(Sh)}function cs(e,t){e.blockedOn===t&&(e.blockedOn=null,Gr||(Gr=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Ig)))}var os=null;function Ch(e){os!==e&&(os=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){os===e&&(os=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],s=e[t+2];if(typeof n!="function"){if(Yr(n||a)===null)continue;break}var u=rn(a);u!==null&&(e.splice(t,3),t-=3,qu(u,{pending:!0,data:s,method:a.method,action:n},n,s))}}))}function Zn(e){function t(S){return cs(S,e)}Ma!==null&&cs(Ma,e),za!==null&&cs(za,e),Oa!==null&&cs(Oa,e),Ll.forEach(t),Bl.forEach(t);for(var a=0;a<Ua.length;a++){var n=Ua[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Ua.length&&(a=Ua[0],a.blockedOn===null);)jh(a),a.blockedOn===null&&Ua.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var s=a[n],u=a[n+1],d=s[ut]||null;if(typeof u=="function")d||Ch(a);else if(d){var p=null;if(u&&u.hasAttribute("formAction")){if(s=u,d=u[ut]||null)p=d.formAction;else if(Yr(s)!==null)continue}else p=d.action;typeof p=="function"?a[n+1]=p:(a.splice(n,3),n-=3),Ch(a)}}}function Nh(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(d){return s=d})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=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,s=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),s!==null&&(s(),s=null)}}}function Zr(e){this._internalRoot=e}ds.prototype.render=Zr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=Ct();ph(a,n,e,t,null,null)},ds.prototype.unmount=Zr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ph(e.current,2,null,e,null,null),Xi(),t[sn]=null}};function ds(e){this._internalRoot=e}ds.prototype.unstable_scheduleHydration=function(e){if(e){var t=Mc();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ua.length&&t!==0&&t<Ua[a].priority;a++);Ua.splice(a,0,e),a===0&&jh(e)}};var wh=r.version;if(wh!=="19.2.5")throw Error(o(527,wh,"19.2.5"));K.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?j(e):null,e=e===null?null:e.stateNode,e};var Pg={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fs.isDisabled&&fs.supportsFiber)try{Kn=fs.inject(Pg),pt=fs}catch{}}return Gl.createRoot=function(e,t){if(!f(e))throw Error(o(299));var a=!1,n="",s=Rd,u=Md,d=zd;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=hh(e,1,!1,null,null,a,n,null,s,u,d,Nh),e[sn]=t.current,Nr(e),new Zr(t)},Gl.hydrateRoot=function(e,t,a){if(!f(e))throw Error(o(299));var n=!1,s="",u=Rd,d=Md,p=zd,S=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(d=a.onCaughtError),a.onRecoverableError!==void 0&&(p=a.onRecoverableError),a.formState!==void 0&&(S=a.formState)),t=hh(e,1,!0,t,a??null,n,s,S,u,d,p,Nh),t.context=mh(null),a=t.current,n=Ct(),n=zs(n),s=xa(n),s.callback=null,ja(a,s,n),a=n,t.current.lanes=a,Wn(t,a),Xt(t),e[sn]=t.current,Nr(e),new ds(t)},Gl.version="19.2.5",Gl}var Uh;function cv(){if(Uh)return Qr.exports;Uh=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(),Qr.exports=rv(),Qr.exports}var ov=cv();/**
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 Dh="popstate";function Hh(l){return typeof l=="object"&&l!=null&&"pathname"in l&&"search"in l&&"hash"in l&&"state"in l&&"key"in l}function dv(l={}){function r(o,f){var g;let h=(g=f.state)==null?void 0:g.masked,{pathname:v,search:y,hash:m}=h||o.location;return sc("",{pathname:v,search:y,hash:m},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:Ql(f)}return hv(r,c,null,l)}function Le(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 fv(){return Math.random().toString(36).substring(2,10)}function Lh(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 sc(l,r,c=null,o,f){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof r=="string"?Vn(r):r,state:c,key:r&&r.key||o||fv(),unstable_mask:f}}function Ql({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 Vn(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 hv(l,r,c,o={}){let{window:f=document.defaultView,v5Compat:h=!1}=o,v=f.history,y="POP",m=null,g=j();g==null&&(g=0,v.replaceState({...v.state,idx:g},""));function j(){return(v.state||{idx:null}).idx}function x(){y="POP";let q=j(),H=q==null?null:q-g;g=q,m&&m({action:y,location:z.location,delta:H})}function _(q,H){y="PUSH";let Q=Hh(q)?q:sc(z.location,q,H);g=j()+1;let V=Lh(Q,g),P=z.createHref(Q.unstable_mask||Q);try{v.pushState(V,"",P)}catch(J){if(J instanceof DOMException&&J.name==="DataCloneError")throw J;f.location.assign(P)}h&&m&&m({action:y,location:z.location,delta:1})}function k(q,H){y="REPLACE";let Q=Hh(q)?q:sc(z.location,q,H);g=j();let V=Lh(Q,g),P=z.createHref(Q.unstable_mask||Q);v.replaceState(V,"",P),h&&m&&m({action:y,location:z.location,delta:0})}function E(q){return mv(q)}let z={get action(){return y},get location(){return l(f,v)},listen(q){if(m)throw new Error("A history only accepts one active listener");return f.addEventListener(Dh,x),m=q,()=>{f.removeEventListener(Dh,x),m=null}},createHref(q){return r(f,q)},createURL:E,encodeLocation(q){let H=E(q);return{pathname:H.pathname,search:H.search,hash:H.hash}},push:_,replace:k,go(q){return v.go(q)}};return z}function mv(l,r=!1){let c="http://localhost";typeof window<"u"&&(c=window.location.origin!=="null"?window.location.origin:window.location.href),Le(c,"No window.location.(origin|href) available to create URL");let o=typeof l=="string"?l:Ql(l);return o=o.replace(/ $/,"%20"),!r&&o.startsWith("//")&&(o=c+o),new URL(o,c)}function Ph(l,r,c="/"){return pv(l,r,c,!1)}function pv(l,r,c,o){let f=typeof r=="string"?Vn(r):r,h=da(f.pathname||"/",c);if(h==null)return null;let v=em(l);gv(v);let y=null;for(let m=0;y==null&&m<v.length;++m){let g=Tv(h);y=wv(v[m],g,o)}return y}function em(l,r=[],c=[],o="",f=!1){let h=(v,y,m=f,g)=>{let j={relativePath:g===void 0?v.path||"":g,caseSensitive:v.caseSensitive===!0,childrenIndex:y,route:v};if(j.relativePath.startsWith("/")){if(!j.relativePath.startsWith(o)&&m)return;Le(j.relativePath.startsWith(o),`Absolute route path "${j.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),j.relativePath=j.relativePath.slice(o.length)}let x=qt([o,j.relativePath]),_=c.concat(j);v.children&&v.children.length>0&&(Le(v.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),em(v.children,r,_,x,m)),!(v.path==null&&!v.index)&&r.push({path:x,score:Cv(x,v.index),routesMeta:_})};return l.forEach((v,y)=>{var m;if(v.path===""||!((m=v.path)!=null&&m.includes("?")))h(v,y);else for(let g of tm(v.path))h(v,y,!0,g)}),r}function tm(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 v=tm(o.join("/")),y=[];return y.push(...v.map(m=>m===""?h:[h,m].join("/"))),f&&y.push(...v),y.map(m=>l.startsWith("/")&&m===""?"/":m)}function gv(l){l.sort((r,c)=>r.score!==c.score?c.score-r.score:Nv(r.routesMeta.map(o=>o.childrenIndex),c.routesMeta.map(o=>o.childrenIndex)))}var vv=/^:[\w-]+$/,yv=3,bv=2,xv=1,jv=10,Sv=-2,Bh=l=>l==="*";function Cv(l,r){let c=l.split("/"),o=c.length;return c.some(Bh)&&(o+=Sv),r&&(o+=bv),c.filter(f=>!Bh(f)).reduce((f,h)=>f+(vv.test(h)?yv:h===""?xv:jv),o)}function Nv(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 wv(l,r,c=!1){let{routesMeta:o}=l,f={},h="/",v=[];for(let y=0;y<o.length;++y){let m=o[y],g=y===o.length-1,j=h==="/"?r:r.slice(h.length)||"/",x=vs({path:m.relativePath,caseSensitive:m.caseSensitive,end:g},j),_=m.route;if(!x&&g&&c&&!o[o.length-1].route.index&&(x=vs({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},j)),!x)return null;Object.assign(f,x.params),v.push({params:f,pathname:qt([h,x.pathname]),pathnameBase:Rv(qt([h,x.pathnameBase])),route:_}),x.pathnameBase!=="/"&&(h=qt([h,x.pathnameBase]))}return v}function vs(l,r){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[c,o]=Ev(l.path,l.caseSensitive,l.end),f=r.match(c);if(!f)return null;let h=f[0],v=h.replace(/(.)\/+$/,"$1"),y=f.slice(1);return{params:o.reduce((g,{paramName:j,isOptional:x},_)=>{if(j==="*"){let E=y[_]||"";v=h.slice(0,h.length-E.length).replace(/(.)\/+$/,"$1")}const k=y[_];return x&&!k?g[j]=void 0:g[j]=(k||"").replace(/%2F/g,"/"),g},{}),pathname:h,pathnameBase:v,pattern:l}}function Ev(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,(v,y,m,g,j)=>{if(o.push({paramName:y,isOptional:m!=null}),m){let x=j.charAt(g+v.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}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 Tv(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 da(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 kv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function _v(l,r="/"){let{pathname:c,search:o="",hash:f=""}=typeof l=="string"?Vn(l):l,h;return c?(c=am(c),c.startsWith("/")?h=qh(c.substring(1),"/"):h=qh(c,r)):h=r,{pathname:h,search:Mv(o),hash:zv(f)}}function qh(l,r){let c=ys(r).split("/");return l.split("/").forEach(f=>{f===".."?c.length>1&&c.pop():f!=="."&&c.push(f)}),c.length>1?c.join("/"):"/"}function Fr(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 Av(l){return l.filter((r,c)=>c===0||r.route.path&&r.route.path.length>0)}function dc(l){let r=Av(l);return r.map((c,o)=>o===r.length-1?c.pathname:c.pathnameBase)}function js(l,r,c,o=!1){let f;typeof l=="string"?f=Vn(l):(f={...l},Le(!f.pathname||!f.pathname.includes("?"),Fr("?","pathname","search",f)),Le(!f.pathname||!f.pathname.includes("#"),Fr("#","pathname","hash",f)),Le(!f.search||!f.search.includes("#"),Fr("#","search","hash",f)));let h=l===""||f.pathname==="",v=h?"/":f.pathname,y;if(v==null)y=c;else{let x=r.length-1;if(!o&&v.startsWith("..")){let _=v.split("/");for(;_[0]==="..";)_.shift(),x-=1;f.pathname=_.join("/")}y=x>=0?r[x]:"/"}let m=_v(f,y),g=v&&v!=="/"&&v.endsWith("/"),j=(h||v===".")&&c.endsWith("/");return!m.pathname.endsWith("/")&&(g||j)&&(m.pathname+="/"),m}var am=l=>l.replace(/\/\/+/g,"/"),qt=l=>am(l.join("/")),ys=l=>l.replace(/\/+$/,""),Rv=l=>ys(l).replace(/^\/*/,"/"),Mv=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,zv=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,Ov=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 Uv(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function Dv(l){let r=l.map(c=>c.route.path).filter(Boolean);return qt(r)||"/"}var nm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function lm(l,r){let c=l;if(typeof c!="string"||!kv.test(c))return{absoluteURL:void 0,isExternal:!1,to:c};let o=c,f=!1;if(nm)try{let h=new URL(window.location.href),v=c.startsWith("//")?new URL(h.protocol+c):new URL(c),y=da(v.pathname,r);v.origin===h.origin&&y!=null?c=y+v.search+v.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 im=["POST","PUT","PATCH","DELETE"];new Set(im);var Hv=["GET",...im];new Set(Hv);var Xn=b.createContext(null);Xn.displayName="DataRouter";var Ss=b.createContext(null);Ss.displayName="DataRouterState";var sm=b.createContext(!1);function Lv(){return b.useContext(sm)}var um=b.createContext({isTransitioning:!1});um.displayName="ViewTransition";var Bv=b.createContext(new Map);Bv.displayName="Fetchers";var qv=b.createContext(null);qv.displayName="Await";var Nt=b.createContext(null);Nt.displayName="Navigation";var $l=b.createContext(null);$l.displayName="Location";var Yt=b.createContext({outlet:null,matches:[],isDataRoute:!1});Yt.displayName="Route";var fc=b.createContext(null);fc.displayName="RouteError";var rm="REACT_ROUTER_ERROR",Yv="REDIRECT",Gv="ROUTE_ERROR_RESPONSE";function Zv(l){if(l.startsWith(`${rm}:${Yv}:{`))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 Vv(l){if(l.startsWith(`${rm}:${Gv}:{`))try{let r=JSON.parse(l.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new Ov(r.status,r.statusText,r.data)}catch{}}function Xv(l,{relative:r}={}){Le(Qn(),"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:v}=Jl(l,{relative:r}),y=h;return c!=="/"&&(y=h==="/"?c:qt([c,h])),o.createHref({pathname:y,search:v,hash:f})}function Qn(){return b.useContext($l)!=null}function wt(){return Le(Qn(),"useLocation() may be used only in the context of a <Router> component."),b.useContext($l).location}var cm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function om(l){b.useContext(Nt).static||b.useLayoutEffect(l)}function hc(){let{isDataRoute:l}=b.useContext(Yt);return l?iy():Qv()}function Qv(){Le(Qn(),"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}=wt(),h=JSON.stringify(dc(o)),v=b.useRef(!1);return om(()=>{v.current=!0}),b.useCallback((m,g={})=>{if(Dt(v.current,cm),!v.current)return;if(typeof m=="number"){c.go(m);return}let j=js(m,JSON.parse(h),f,g.relative==="path");l==null&&r!=="/"&&(j.pathname=j.pathname==="/"?r:qt([r,j.pathname])),(g.replace?c.replace:c.push)(j,g.state,g)},[r,c,h,f,l])}b.createContext(null);function $v(){let{matches:l}=b.useContext(Yt),r=l[l.length-1];return(r==null?void 0:r.params)??{}}function Jl(l,{relative:r}={}){let{matches:c}=b.useContext(Yt),{pathname:o}=wt(),f=JSON.stringify(dc(c));return b.useMemo(()=>js(l,JSON.parse(f),o,r==="path"),[l,f,o,r])}function Jv(l,r){return dm(l,r)}function dm(l,r,c){var q;Le(Qn(),"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],v=h?h.params:{},y=h?h.pathname:"/",m=h?h.pathnameBase:"/",g=h&&h.route;{let H=g&&g.path||"";hm(y,!g||H.endsWith("*")||H.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${H}">) 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="${H}"> to <Route path="${H==="/"?"*":`${H}/*`}">.`)}let j=wt(),x;if(r){let H=typeof r=="string"?Vn(r):r;Le(m==="/"||((q=H.pathname)==null?void 0:q.startsWith(m)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${H.pathname}" was given in the \`location\` prop.`),x=H}else x=j;let _=x.pathname||"/",k=_;if(m!=="/"){let H=m.replace(/^\//,"").split("/");k="/"+_.replace(/^\//,"").split("/").slice(H.length).join("/")}let E=Ph(l,{pathname:k});Dt(g||E!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Dt(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let z=Pv(E&&E.map(H=>Object.assign({},H,{params:Object.assign({},v,H.params),pathname:qt([m,o.encodeLocation?o.encodeLocation(H.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:H.pathname]),pathnameBase:H.pathnameBase==="/"?m:qt([m,o.encodeLocation?o.encodeLocation(H.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:H.pathnameBase])})),f,c);return r&&z?b.createElement($l.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...x},navigationType:"POP"}},z):z}function Kv(){let l=ly(),r=Uv(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},v=null;return console.error("Error handled by React Router default ErrorBoundary:",l),v=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,v)}var Fv=b.createElement(Kv,null),fm=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=Vv(l.digest);c&&(l=c)}let r=l!==void 0?b.createElement(Yt.Provider,{value:this.props.routeContext},b.createElement(fc.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?b.createElement(Wv,{error:l},r):r}};fm.contextType=sm;var Wr=new WeakMap;function Wv({children:l,error:r}){let{basename:c}=b.useContext(Nt);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let o=Zv(r.digest);if(o){let f=Wr.get(r);if(f)throw f;let h=lm(o.location,c);if(nm&&!Wr.get(r))if(h.isExternal||o.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const v=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:o.replace}));throw Wr.set(r,v),v}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return l}function Iv({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 Pv(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 j=f.findIndex(x=>x.route.id&&(h==null?void 0:h[x.route.id])!==void 0);Le(j>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),f=f.slice(0,Math.min(f.length,j+1))}let v=!1,y=-1;if(c&&o){v=o.renderFallback;for(let j=0;j<f.length;j++){let x=f[j];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(y=j),x.route.id){let{loaderData:_,errors:k}=o,E=x.route.loader&&!_.hasOwnProperty(x.route.id)&&(!k||k[x.route.id]===void 0);if(x.route.lazy||E){c.isStatic&&(v=!0),y>=0?f=f.slice(0,y+1):f=[f[0]];break}}}}let m=c==null?void 0:c.onError,g=o&&m?(j,x)=>{var _,k;m(j,{location:o.location,params:((k=(_=o.matches)==null?void 0:_[0])==null?void 0:k.params)??{},unstable_pattern:Dv(o.matches),errorInfo:x})}:void 0;return f.reduceRight((j,x,_)=>{let k,E=!1,z=null,q=null;o&&(k=h&&x.route.id?h[x.route.id]:void 0,z=x.route.errorElement||Fv,v&&(y<0&&_===0?(hm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,q=null):y===_&&(E=!0,q=x.route.hydrateFallbackElement||null)));let H=r.concat(f.slice(0,_+1)),Q=()=>{let V;return k?V=z:E?V=q:x.route.Component?V=b.createElement(x.route.Component,null):x.route.element?V=x.route.element:V=j,b.createElement(Iv,{match:x,routeContext:{outlet:j,matches:H,isDataRoute:o!=null},children:V})};return o&&(x.route.ErrorBoundary||x.route.errorElement||_===0)?b.createElement(fm,{location:o.location,revalidation:o.revalidation,component:z,error:k,children:Q(),routeContext:{outlet:null,matches:H,isDataRoute:!0},onError:g}):Q()},null)}function mc(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ey(l){let r=b.useContext(Xn);return Le(r,mc(l)),r}function ty(l){let r=b.useContext(Ss);return Le(r,mc(l)),r}function ay(l){let r=b.useContext(Yt);return Le(r,mc(l)),r}function pc(l){let r=ay(l),c=r.matches[r.matches.length-1];return Le(c.route.id,`${l} can only be used on routes that contain a unique "id"`),c.route.id}function ny(){return pc("useRouteId")}function ly(){var o;let l=b.useContext(fc),r=ty("useRouteError"),c=pc("useRouteError");return l!==void 0?l:(o=r.errors)==null?void 0:o[c]}function iy(){let{router:l}=ey("useNavigate"),r=pc("useNavigate"),c=b.useRef(!1);return om(()=>{c.current=!0}),b.useCallback(async(f,h={})=>{Dt(c.current,cm),c.current&&(typeof f=="number"?await l.navigate(f):await l.navigate(f,{fromRouteId:r,...h}))},[l,r])}var Yh={};function hm(l,r,c){!r&&!Yh[l]&&(Yh[l]=!0,Dt(!1,c))}b.memo(sy);function sy({routes:l,future:r,state:c,isStatic:o,onError:f}){return dm(l,void 0,{state:c,isStatic:o,onError:f})}function Ir({to:l,replace:r,state:c,relative:o}){Le(Qn(),"<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:v}=wt(),y=hc(),m=js(l,dc(h),v,o==="path"),g=JSON.stringify(m);return b.useEffect(()=>{y(JSON.parse(g),{replace:r,state:c,relative:o})},[y,g,o,r,c]),null}function st(l){Le(!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 uy({basename:l="/",children:r=null,location:c,navigationType:o="POP",navigator:f,static:h=!1,unstable_useTransitions:v}){Le(!Qn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let y=l.replace(/^\/*/,"/"),m=b.useMemo(()=>({basename:y,navigator:f,static:h,unstable_useTransitions:v,future:{}}),[y,f,h,v]);typeof c=="string"&&(c=Vn(c));let{pathname:g="/",search:j="",hash:x="",state:_=null,key:k="default",unstable_mask:E}=c,z=b.useMemo(()=>{let q=da(g,y);return q==null?null:{location:{pathname:q,search:j,hash:x,state:_,key:k,unstable_mask:E},navigationType:o}},[y,g,j,x,_,k,o,E]);return Dt(z!=null,`<Router basename="${y}"> is not able to match the URL "${g}${j}${x}" because it does not start with the basename, so the <Router> won't render anything.`),z==null?null:b.createElement(Nt.Provider,{value:m},b.createElement($l.Provider,{children:r,value:z}))}function ry({children:l,location:r}){return Jv(uc(l),r)}function uc(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,uc(o.props.children,h));return}Le(o.type===st,`[${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>`),Le(!o.props.index||!o.props.children,"An index route cannot have child routes.");let v={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&&(v.children=uc(o.props.children,h)),c.push(v)}),c}var ps="get",gs="application/x-www-form-urlencoded";function Cs(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function cy(l){return Cs(l)&&l.tagName.toLowerCase()==="button"}function oy(l){return Cs(l)&&l.tagName.toLowerCase()==="form"}function dy(l){return Cs(l)&&l.tagName.toLowerCase()==="input"}function fy(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function hy(l,r){return l.button===0&&(!r||r==="_self")&&!fy(l)}function rc(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 my(l,r){let c=rc(l);return r&&r.forEach((o,f)=>{c.has(f)||r.getAll(f).forEach(h=>{c.append(f,h)})}),c}var hs=null;function py(){if(hs===null)try{new FormData(document.createElement("form"),0),hs=!1}catch{hs=!0}return hs}var gy=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Pr(l){return l!=null&&!gy.has(l)?(Dt(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${gs}"`),null):l}function vy(l,r){let c,o,f,h,v;if(oy(l)){let y=l.getAttribute("action");o=y?da(y,r):null,c=l.getAttribute("method")||ps,f=Pr(l.getAttribute("enctype"))||gs,h=new FormData(l)}else if(cy(l)||dy(l)&&(l.type==="submit"||l.type==="image")){let y=l.form;if(y==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=l.getAttribute("formaction")||y.getAttribute("action");if(o=m?da(m,r):null,c=l.getAttribute("formmethod")||y.getAttribute("method")||ps,f=Pr(l.getAttribute("formenctype"))||Pr(y.getAttribute("enctype"))||gs,h=new FormData(y,l),!py()){let{name:g,type:j,value:x}=l;if(j==="image"){let _=g?`${g}.`:"";h.append(`${_}x`,"0"),h.append(`${_}y`,"0")}else g&&h.append(g,x)}}else{if(Cs(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=ps,o=null,f=gs,v=l}return h&&f==="text/plain"&&(v=h,h=void 0),{action:o,method:c.toLowerCase(),encType:f,formData:h,body:v}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function gc(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function mm(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&&da(f.pathname,r)==="/"?f.pathname=`${ys(r)}/_root.${o}`:f.pathname=`${ys(f.pathname)}.${o}`,f}async function yy(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 by(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 xy(l,r,c){let o=await Promise.all(l.map(async f=>{let h=r.routes[f.route.id];if(h){let v=await yy(h,c);return v.links?v.links():[]}return[]}));return Ny(o.flat(1).filter(by).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Gh(l,r,c,o,f,h){let v=(m,g)=>c[g]?m.route.id!==c[g].route.id:!0,y=(m,g)=>{var j;return c[g].pathname!==m.pathname||((j=c[g].route.path)==null?void 0:j.endsWith("*"))&&c[g].params["*"]!==m.params["*"]};return h==="assets"?r.filter((m,g)=>v(m,g)||y(m,g)):h==="data"?r.filter((m,g)=>{var x;let j=o.routes[m.route.id];if(!j||!j.hasLoader)return!1;if(v(m,g)||y(m,g))return!0;if(m.route.shouldRevalidate){let _=m.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((x=c[0])==null?void 0:x.params)||{},nextUrl:new URL(l,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof _=="boolean")return _}return!0}):[]}function jy(l,r,{includeHydrateFallback:c}={}){return Sy(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 Sy(l){return[...new Set(l)]}function Cy(l){let r={},c=Object.keys(l).sort();for(let o of c)r[o]=l[o];return r}function Ny(l,r){let c=new Set;return new Set(r),l.reduce((o,f)=>{let h=JSON.stringify(Cy(f));return c.has(h)||(c.add(h),o.push({key:h,link:f})),o},[])}function vc(){let l=b.useContext(Xn);return gc(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function wy(){let l=b.useContext(Ss);return gc(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var yc=b.createContext(void 0);yc.displayName="FrameworkContext";function bc(){let l=b.useContext(yc);return gc(l,"You must render this element inside a <HydratedRouter> element"),l}function Ey(l,r){let c=b.useContext(yc),[o,f]=b.useState(!1),[h,v]=b.useState(!1),{onFocus:y,onBlur:m,onMouseEnter:g,onMouseLeave:j,onTouchStart:x}=r,_=b.useRef(null);b.useEffect(()=>{if(l==="render"&&v(!0),l==="viewport"){let z=H=>{H.forEach(Q=>{v(Q.isIntersecting)})},q=new IntersectionObserver(z,{threshold:.5});return _.current&&q.observe(_.current),()=>{q.disconnect()}}},[l]),b.useEffect(()=>{if(o){let z=setTimeout(()=>{v(!0)},100);return()=>{clearTimeout(z)}}},[o]);let k=()=>{f(!0)},E=()=>{f(!1),v(!1)};return c?l!=="intent"?[h,_,{}]:[h,_,{onFocus:Zl(y,k),onBlur:Zl(m,E),onMouseEnter:Zl(g,k),onMouseLeave:Zl(j,E),onTouchStart:Zl(x,k)}]:[!1,_,{}]}function Zl(l,r){return c=>{l&&l(c),c.defaultPrevented||r(c)}}function Ty({page:l,...r}){let c=Lv(),{router:o}=vc(),f=b.useMemo(()=>Ph(o.routes,l,o.basename),[o.routes,l,o.basename]);return f?c?b.createElement(_y,{page:l,matches:f,...r}):b.createElement(Ay,{page:l,matches:f,...r}):null}function ky(l){let{manifest:r,routeModules:c}=bc(),[o,f]=b.useState([]);return b.useEffect(()=>{let h=!1;return xy(l,r,c).then(v=>{h||f(v)}),()=>{h=!0}},[l,r,c]),o}function _y({page:l,matches:r,...c}){let o=wt(),{future:f}=bc(),{basename:h}=vc(),v=b.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let y=mm(l,h,f.unstable_trailingSlashAwareDataRequests,"rsc"),m=!1,g=[];for(let j of r)typeof j.route.shouldRevalidate=="function"?m=!0:g.push(j.route.id);return m&&g.length>0&&y.searchParams.set("_routes",g.join(",")),[y.pathname+y.search]},[h,f.unstable_trailingSlashAwareDataRequests,l,o,r]);return b.createElement(b.Fragment,null,v.map(y=>b.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...c})))}function Ay({page:l,matches:r,...c}){let o=wt(),{future:f,manifest:h,routeModules:v}=bc(),{basename:y}=vc(),{loaderData:m,matches:g}=wy(),j=b.useMemo(()=>Gh(l,r,g,h,o,"data"),[l,r,g,h,o]),x=b.useMemo(()=>Gh(l,r,g,h,o,"assets"),[l,r,g,h,o]),_=b.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let z=new Set,q=!1;if(r.forEach(Q=>{var P;let V=h.routes[Q.route.id];!V||!V.hasLoader||(!j.some(J=>J.route.id===Q.route.id)&&Q.route.id in m&&((P=v[Q.route.id])!=null&&P.shouldRevalidate)||V.hasClientLoader?q=!0:z.add(Q.route.id))}),z.size===0)return[];let H=mm(l,y,f.unstable_trailingSlashAwareDataRequests,"data");return q&&z.size>0&&H.searchParams.set("_routes",r.filter(Q=>z.has(Q.route.id)).map(Q=>Q.route.id).join(",")),[H.pathname+H.search]},[y,f.unstable_trailingSlashAwareDataRequests,m,o,h,j,r,l,v]),k=b.useMemo(()=>jy(x,h),[x,h]),E=ky(x);return b.createElement(b.Fragment,null,_.map(z=>b.createElement("link",{key:z,rel:"prefetch",as:"fetch",href:z,...c})),k.map(z=>b.createElement("link",{key:z,rel:"modulepreload",href:z,...c})),E.map(({key:z,link:q})=>b.createElement("link",{key:z,nonce:c.nonce,...q,crossOrigin:q.crossOrigin??c.crossOrigin})))}function Ry(...l){return r=>{l.forEach(c=>{typeof c=="function"?c(r):c!=null&&(c.current=r)})}}var My=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{My&&(window.__reactRouterVersion="7.14.2")}catch{}function zy({basename:l,children:r,unstable_useTransitions:c,window:o}){let f=b.useRef();f.current==null&&(f.current=dv({window:o,v5Compat:!0}));let h=f.current,[v,y]=b.useState({action:h.action,location:h.location}),m=b.useCallback(g=>{c===!1?y(g):b.startTransition(()=>y(g))},[c]);return b.useLayoutEffect(()=>h.listen(m),[h,m]),b.createElement(uy,{basename:l,children:r,location:v.location,navigationType:v.action,navigator:h,unstable_useTransitions:c})}var pm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,nt=b.forwardRef(function({onClick:r,discover:c="render",prefetch:o="none",relative:f,reloadDocument:h,replace:v,unstable_mask:y,state:m,target:g,to:j,preventScrollReset:x,viewTransition:_,unstable_defaultShouldRevalidate:k,...E},z){let{basename:q,navigator:H,unstable_useTransitions:Q}=b.useContext(Nt),V=typeof j=="string"&&pm.test(j),P=lm(j,q);j=P.to;let J=Xv(j,{relative:f}),$=wt(),w=null;if(y){let be=js(y,[],$.unstable_mask?$.unstable_mask.pathname:"/",!0);q!=="/"&&(be.pathname=be.pathname==="/"?q:qt([q,be.pathname])),w=H.createHref(be)}let[U,X,te]=Ey(o,E),le=Hy(j,{replace:v,unstable_mask:y,state:m,target:g,preventScrollReset:x,relative:f,viewTransition:_,unstable_defaultShouldRevalidate:k,unstable_useTransitions:Q});function ie(be){r&&r(be),be.defaultPrevented||le(be)}let W=!(P.isExternal||h),ge=b.createElement("a",{...E,...te,href:(W?w:void 0)||P.absoluteURL||J,onClick:W?ie:r,ref:Ry(z,X),target:g,"data-discover":!V&&c==="render"?"true":void 0});return U&&!V?b.createElement(b.Fragment,null,ge,b.createElement(Ty,{page:J})):ge});nt.displayName="Link";var Oy=b.forwardRef(function({"aria-current":r="page",caseSensitive:c=!1,className:o="",end:f=!1,style:h,to:v,viewTransition:y,children:m,...g},j){let x=Jl(v,{relative:g.relative}),_=wt(),k=b.useContext(Ss),{navigator:E,basename:z}=b.useContext(Nt),q=k!=null&&Gy(x)&&y===!0,H=E.encodeLocation?E.encodeLocation(x).pathname:x.pathname,Q=_.pathname,V=k&&k.navigation&&k.navigation.location?k.navigation.location.pathname:null;c||(Q=Q.toLowerCase(),V=V?V.toLowerCase():null,H=H.toLowerCase()),V&&z&&(V=da(V,z)||V);const P=H!=="/"&&H.endsWith("/")?H.length-1:H.length;let J=Q===H||!f&&Q.startsWith(H)&&Q.charAt(P)==="/",$=V!=null&&(V===H||!f&&V.startsWith(H)&&V.charAt(H.length)==="/"),w={isActive:J,isPending:$,isTransitioning:q},U=J?r:void 0,X;typeof o=="function"?X=o(w):X=[o,J?"active":null,$?"pending":null,q?"transitioning":null].filter(Boolean).join(" ");let te=typeof h=="function"?h(w):h;return b.createElement(nt,{...g,"aria-current":U,className:X,ref:j,style:te,to:v,viewTransition:y},typeof m=="function"?m(w):m)});Oy.displayName="NavLink";var Uy=b.forwardRef(({discover:l="render",fetcherKey:r,navigate:c,reloadDocument:o,replace:f,state:h,method:v=ps,action:y,onSubmit:m,relative:g,preventScrollReset:j,viewTransition:x,unstable_defaultShouldRevalidate:_,...k},E)=>{let{unstable_useTransitions:z}=b.useContext(Nt),q=qy(),H=Yy(y,{relative:g}),Q=v.toLowerCase()==="get"?"get":"post",V=typeof y=="string"&&pm.test(y),P=J=>{if(m&&m(J),J.defaultPrevented)return;J.preventDefault();let $=J.nativeEvent.submitter,w=($==null?void 0:$.getAttribute("formmethod"))||v,U=()=>q($||J.currentTarget,{fetcherKey:r,method:w,navigate:c,replace:f,state:h,relative:g,preventScrollReset:j,viewTransition:x,unstable_defaultShouldRevalidate:_});z&&c!==!1?b.startTransition(()=>U()):U()};return b.createElement("form",{ref:E,method:Q,action:H,onSubmit:o?m:P,...k,"data-discover":!V&&l==="render"?"true":void 0})});Uy.displayName="Form";function Dy(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gm(l){let r=b.useContext(Xn);return Le(r,Dy(l)),r}function Hy(l,{target:r,replace:c,unstable_mask:o,state:f,preventScrollReset:h,relative:v,viewTransition:y,unstable_defaultShouldRevalidate:m,unstable_useTransitions:g}={}){let j=hc(),x=wt(),_=Jl(l,{relative:v});return b.useCallback(k=>{if(hy(k,r)){k.preventDefault();let E=c!==void 0?c:Ql(x)===Ql(_),z=()=>j(l,{replace:E,unstable_mask:o,state:f,preventScrollReset:h,relative:v,viewTransition:y,unstable_defaultShouldRevalidate:m});g?b.startTransition(()=>z()):z()}},[x,j,_,c,o,f,r,l,h,v,y,m,g])}function vm(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(rc(l)),c=b.useRef(!1),o=wt(),f=b.useMemo(()=>my(o.search,c.current?null:r.current),[o.search]),h=hc(),v=b.useCallback((y,m)=>{const g=rc(typeof y=="function"?y(new URLSearchParams(f)):y);c.current=!0,h("?"+g,m)},[h,f]);return[f,v]}var Ly=0,By=()=>`__${String(++Ly)}__`;function qy(){let{router:l}=gm("useSubmit"),{basename:r}=b.useContext(Nt),c=ny(),o=l.fetch,f=l.navigate;return b.useCallback(async(h,v={})=>{let{action:y,method:m,encType:g,formData:j,body:x}=vy(h,r);if(v.navigate===!1){let _=v.fetcherKey||By();await o(_,c,v.action||y,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:j,body:x,formMethod:v.method||m,formEncType:v.encType||g,flushSync:v.flushSync})}else await f(v.action||y,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:j,body:x,formMethod:v.method||m,formEncType:v.encType||g,replace:v.replace,state:v.state,fromRouteId:c,flushSync:v.flushSync,viewTransition:v.viewTransition})},[o,f,r,c])}function Yy(l,{relative:r}={}){let{basename:c}=b.useContext(Nt),o=b.useContext(Yt);Le(o,"useFormAction must be used inside a RouteContext");let[f]=o.matches.slice(-1),h={...Jl(l||".",{relative:r})},v=wt();if(l==null){h.search=v.search;let y=new URLSearchParams(h.search),m=y.getAll("index");if(m.some(j=>j==="")){y.delete("index"),m.filter(x=>x).forEach(x=>y.append("index",x));let j=y.toString();h.search=j?`?${j}`:""}}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])),Ql(h)}function Gy(l,{relative:r}={}){let c=b.useContext(um);Le(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=gm("useViewTransitionState"),f=Jl(l,{relative:r});if(!c.isTransitioning)return!1;let h=da(c.currentLocation.pathname,o)||c.currentLocation.pathname,v=da(c.nextLocation.pathname,o)||c.nextLocation.pathname;return vs(f.pathname,v)!=null||vs(f.pathname,h)!=null}const Zy='<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 ym({size:l=20,idSuffix:r,className:c}){const o=`pc-brand-mark-clip-${r}`;return i.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})">${Zy}</g><defs><clipPath id="${o}"><rect width="24" height="24" fill="white"/></clipPath></defs>`}})}const xc="Parachute";let ln=null,Vl=null;const Vy=3e4;function Xy(){return"/admin/host-admin-token"}function Qy(){const l=`${window.location.pathname}${window.location.search}`;return`/login?next=${encodeURIComponent(l)}`}function Qt(){return window.location.replace(Qy()),new Promise(()=>{})}function $y(){return window.location.replace("/account/"),new Promise(()=>{})}async function Oe(){const l=Date.now();return ln&&ln.expiresAt-l>Vy?ln.token:Vl||(Vl=Jy().finally(()=>{Vl=null}),Vl)}async function Jy(){const l=await fetch(Xy(),{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(l.status===401)return ln=null,Qt();if(l.status===403)return ln=null,$y();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 ln={token:r.token,expiresAt:new Date(r.expires_at).getTime()},r.token}function Ne(){ln=null}class Z extends Error{constructor(r,c){super(c),this.status=r,this.name="HttpError"}}async function jc(){const l=await fetch("/.well-known/parachute.json",{headers:{accept:"application/json"}});if(!l.ok)throw new Z(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 v={name:h.name,url:h.url,version:h.version,path:Ky(h.name,h.url,o)};return h.managementUrl&&(v.managementUrl=h.managementUrl),v})}}function Ky(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 bm(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 Qt();if(!r.ok)throw new Z(r.status,await F(r));const c=await r.json();if(!c.token||!c.expires_at)throw new Z(500,"/admin/vault-admin-token returned malformed body");return{token:c.token,expiresAt:c.expires_at,scopes:c.scopes??[]}}async function Fy(l){var v,y;const r=await bm(l),c=await fetch(`/vault/${encodeURIComponent(l)}/.parachute/usage`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${r.token}`}});if(!c.ok)throw new Z(c.status,await F(c));const o=await c.json(),f=(v=o.counts)==null?void 0:v.notes,h=(y=o.bytes)==null?void 0:y.total;if(typeof f!="number"||typeof h!="number")throw new Z(500,"/.parachute/usage returned malformed body");return{notes:f,totalBytes:h}}function Wy(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 Iy(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 Ne(),new Z(o.status,await F(o));if(!o.ok)throw new Z(o.status,await F(o));return(await o.json()).grants??[]}async function Py(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 Ne(),new Z(c.status,await F(c));if(!c.ok)throw new Z(c.status,await F(c))}async function xm(){const l=await fetch("/api/me",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(!l.ok)throw new Z(l.status,await F(l));return await l.json()}async function e1(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 Z(c.status,await F(c))}let Zh=!1;function t1(l,r){if(/^https?:\/\//i.test(r))return r;const c=l.replace(/\/+$/,"");return r==="/admin"||r==="/admin/"?(Zh||(Zh=!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 Vh(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 Ne(),new Z(h.status,await F(h));if(!h.ok)throw new Z(h.status,await F(h));return await h.json()}async function jm(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 Ne(),new Z(c.status,await F(c));if(!c.ok)throw new Z(c.status,await F(c));return await c.json()}async function a1(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 Ne(),new Z(c.status,await F(c));if(!c.ok)throw new Z(c.status,await F(c));return await c.json()}async function n1(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 Ne(),new Z(c.status,await F(c));if(!c.ok)throw new Z(c.status,await F(c));return await c.json()}async function l1(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 Ne(),new Z(f.status,await F(f));if(!f.ok)throw new Z(f.status,await F(f));return await f.json()}async function Ns(){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 Ne(),new Z(r.status,await F(r));if(!r.ok)throw new Z(r.status,await F(r));return await r.json()}async function ws(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 i1(l){const r=await ws(l,"install");if(r.status===401||r.status===403)throw Ne(),new Z(r.status,await F(r));if(!r.ok)throw new Z(r.status,await F(r));return(await r.json()).operation_id}async function s1(l){const r=await ws(l,"upgrade");if(r.status===401||r.status===403)throw Ne(),new Z(r.status,await F(r));if(!r.ok)throw new Z(r.status,await F(r));return(await r.json()).operation_id}async function u1(l){const r=await ws(l,"restart");if(r.status===401||r.status===403)throw Ne(),new Z(r.status,await F(r));if(!r.ok)throw new Z(r.status,await F(r));return await r.json()}async function r1(l){const r=await ws(l,"uninstall");if(r.status===401||r.status===403)throw Ne(),new Z(r.status,await F(r));if(!r.ok)throw new Z(r.status,await F(r));return await r.json()}async function c1(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 Ne(),new Z(c.status,await F(c));if(!c.ok)throw new Z(c.status,await F(c));return(await c.json()).channel}async function Sm(){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 Ne(),new Z(r.status,await F(r));if(!r.ok)throw new Z(r.status,await F(r));return await r.json()}async function Xh(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 Ne(),new Z(c.status,await F(c));if(!c.ok)throw new Z(c.status,await F(c));return(await c.json()).hub_origin}async function o1(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 Ne(),new Z(c.status,await F(c));if(!c.ok)throw new Z(c.status,await F(c));return await c.json()}async function d1(){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 Ne(),new Z(r.status,await F(r));if(!r.ok)throw new Z(r.status,await F(r));return(await r.json()).users??[]}async function f1(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 Ne(),new Z(c.status,await F(c));if(!c.ok)throw new Z(c.status,await F(c));return(await c.json()).user}async function h1(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&&Ne(),new Z(c.status,await F(c));if(!c.ok)throw new Z(c.status,await F(c));const o=await c.json().catch(()=>({}));return{revocationLagSeconds:typeof o.revocation_lag_seconds=="number"?o.revocation_lag_seconds:60}}async function m1(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&&Ne(),new Z(o.status,await F(o));if(!o.ok)throw new Z(o.status,await F(o));const f=await o.json().catch(()=>({}));return{revocationLagSeconds:typeof f.revocation_lag_seconds=="number"?f.revocation_lag_seconds:60}}async function p1(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&&Ne(),new Z(o.status,await F(o));if(!o.ok)throw new Z(o.status,await F(o))}async function Cm(){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 Ne(),new Z(r.status,await F(r));if(!r.ok)throw new Z(r.status,await F(r));return(await r.json()).vaults??[]}async function g1(){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 Ne(),new Z(r.status,await F(r));if(!r.ok)throw new Z(r.status,await F(r));return(await r.json()).invites??[]}async function v1(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 Ne(),new Z(c.status,await F(c));if(!c.ok)throw new Z(c.status,await F(c));return await c.json()}async function y1(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 Ne(),new Z(c.status,await F(c));if(!c.ok)throw new Z(c.status,await F(c))}async function cc(){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 Ne(),new Z(r.status,await F(r));if(!r.ok)throw new Z(r.status,await F(r));return await r.json()}async function b1(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 Ne(),new Z(c.status,await F(c));if(!c.ok)throw new Z(c.status,await F(c));return await c.json()}async function x1(){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 Ne(),new Z(r.status,await F(r));if(!r.ok)throw new Z(r.status,await F(r));return await r.json()}async function Sc(){const l=await fetch("/api/admin-lock",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(l.status===401)return Qt();if(!l.ok)throw new Z(l.status,await F(l));return await l.json()}async function $n(l,r,c={}){return await fetch(`/api/admin-lock${l}`,{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},credentials:"same-origin",body:JSON.stringify({__csrf:r,...c})})}async function j1(l,r){const c=await $n("/unlock",l,{pin:r});if(!c.ok)throw new Z(c.status,await F(c));return await c.json().catch(()=>({})),Sc()}async function S1(l){const r=await $n("/lock",l);if(!r.ok)throw new Z(r.status,await F(r))}async function C1(l){const r=await $n("/heartbeat",l);if(!r.ok)throw new Z(r.status,await F(r));return await r.json()}async function N1(l,r,c){const o={pin:r};c!==void 0&&(o.idle_seconds=c);const f=await $n("/set",l,o);if(!f.ok)throw new Z(f.status,await F(f))}async function w1(l,r,c,o){const f={new_pin:r};c&&(f.current_pin=c),o!==void 0&&(f.idle_seconds=o);const h=await $n("/change",l,f);if(!h.ok)throw new Z(h.status,await F(h))}async function E1(l,r){const c={};r&&(c.current_pin=r);const o=await $n("/remove",l,c);if(!o.ok)throw new Z(o.status,await F(o))}async function F(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 T1(){const l=await fetch("/api/connections/catalog",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(l.status===401)return Qt();if(!l.ok)throw new Z(l.status,await F(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 k1(){const l=await fetch("/admin/connections",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(l.status===401)return Qt();if(!l.ok)throw new Z(l.status,await F(l));const r=await l.json();return Array.isArray(r.connections)?r.connections:[]}async function _1(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 Qt();if(!r.ok)throw new Z(r.status,await F(r));const c=await r.json();if(!c.connection||typeof c.connection.id!="string")throw new Z(500,"/admin/connections returned a malformed connection body");return{connection:c.connection,...c.connect?{connect:c.connect}:{}}}async function A1(l){const r=await fetch(`/admin/connections/${encodeURIComponent(l)}/approve`,{method:"POST",headers:{accept:"application/json"},credentials:"same-origin"});if(r.status===401){await Qt();return}if(!r.ok)throw new Z(r.status,await F(r))}async function R1(l){const r=await fetch(`/admin/connections/${encodeURIComponent(l)}`,{method:"DELETE",headers:{accept:"application/json"},credentials:"same-origin"});if(r.status===401){await Qt();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 Z(207,c)}if(!r.ok)throw new Z(r.status,await F(r))}async function M1(){const l=await Oe(),r=await fetch("/admin/grants",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${l}`}});if(r.status===401||r.status===403)throw Ne(),new Z(r.status,await F(r));if(!r.ok)throw new Z(r.status,await F(r));const c=await r.json();return Array.isArray(c.grants)?c.grants:[]}async function ec(l,r){const c=await fetch(`/admin/grants/${encodeURIComponent(l)}/approve`,{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},credentials:"same-origin",body:JSON.stringify(r!==void 0?{token:r}:{})});if(c.status===401)return Qt();if(!c.ok)throw new Z(c.status,await F(c));return await c.json()}async function z1(l){const r=await fetch(`/admin/grants/${encodeURIComponent(l)}/revoke`,{method:"POST",headers:{accept:"application/json"},credentials:"same-origin"});if(r.status===401){await Qt();return}if(!r.ok)throw new Z(r.status,await F(r))}const O1=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 tc(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 U1(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 D1(){const[l,r]=b.useState(null),[c,o]=b.useState(!1),[f,h]=b.useState(!1),[v,y]=b.useState(null),m=b.useCallback(async()=>{h(!0);try{const g=await cc();r(g),y(new Date)}catch{}finally{h(!1)}},[]);return b.useEffect(()=>{m()},[m]),b.useEffect(()=>{const g=()=>{m()};window.addEventListener("focus",g);const j=window.setInterval(()=>{m()},O1);return()=>{window.removeEventListener("focus",g),window.clearInterval(j)}},[m]),l?i.jsxs("footer",{className:"hub-version-badge","data-testid":"hub-version-badge",children:[i.jsxs("button",{type:"button",className:"hub-version-badge-summary",onClick:()=>o(g=>!g),"aria-expanded":c,"data-testid":"hub-version-badge-summary",children:["Hub ",i.jsx("strong",{children:l.version})," · running"," ",i.jsx("span",{"data-testid":"hub-version-badge-uptime",children:Qh(l.uptime_ms)})," ·"," ",i.jsx("span",{className:"hub-version-badge-source","data-testid":"hub-version-badge-source",children:l.source})]}),c?i.jsxs("div",{className:"hub-version-badge-panel","data-testid":"hub-version-badge-panel",children:[i.jsxs("dl",{children:[i.jsx("dt",{children:"Hub"}),i.jsx("dd",{children:i.jsxs("code",{children:["@openparachute/hub ",l.version]})}),i.jsx("dt",{children:"Source"}),i.jsx("dd",{children:U1(l)}),i.jsx("dt",{children:"Started"}),i.jsxs("dd",{children:[tc(l.started_at)," (",Qh(l.uptime_ms)," ago)"]}),l.container_build_time?i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"Built"}),i.jsx("dd",{children:tc(l.container_build_time)})]}):null,l.render_commit?i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"Commit"}),i.jsxs("dd",{children:[i.jsx("code",{children:l.render_commit.slice(0,8)}),l.render_branch?i.jsxs(i.Fragment,{children:[" on ",i.jsx("code",{children:l.render_branch})]}):null]})]}):null,v?i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"Last checked"}),i.jsx("dd",{children:tc(v.toISOString())})]}):null]}),i.jsx("button",{type:"button",className:"hub-version-badge-refresh secondary",onClick:()=>void m(),disabled:f,"data-testid":"hub-version-badge-refresh",children:f?"Refreshing…":"Refresh"})]}):null]}):null}function H1({csrf:l,onUnlocked:r}){const[c,o]=b.useState(""),[f,h]=b.useState(!1),[v,y]=b.useState(null),m=b.useRef(null);b.useEffect(()=>{var j;(j=m.current)==null||j.focus()},[]);async function g(j){var x;if(j.preventDefault(),!f){h(!0),y(null);try{await j1(l,c),o(""),r()}catch(_){const k=_ instanceof Z?_.status===429?"Too many attempts — wait a moment and try again.":"Incorrect PIN.":_ instanceof Error?_.message:"Unlock failed.";y(k),o(""),(x=m.current)==null||x.focus()}finally{h(!1)}}}return i.jsx("main",{className:"lock-screen","data-testid":"admin-lock-screen","aria-label":"Admin console locked",children:i.jsxs("div",{className:"lock-card",children:[i.jsx(ym,{size:32,idSuffix:"lock",className:"lock-brand-mark"}),i.jsxs("h1",{className:"lock-title",children:[xc," is locked"]}),i.jsx("p",{className:"muted lock-sub",children:"Enter your PIN to unlock the admin console."}),i.jsxs("form",{onSubmit:j=>void g(j),className:"lock-form",children:[i.jsx("label",{htmlFor:"admin-lock-pin",className:"visually-hidden",children:"PIN"}),i.jsx("input",{id:"admin-lock-pin",ref:m,type:"password",inputMode:"numeric",autoComplete:"off",pattern:"[0-9]*",maxLength:12,placeholder:"••••",value:c,disabled:f,onChange:j=>o(j.target.value.replace(/[^0-9]/g,"")),className:"lock-pin-input","data-testid":"admin-lock-pin-input","aria-invalid":v?"true":void 0}),i.jsx("button",{type:"submit",disabled:f||c.length<4,"data-testid":"admin-lock-unlock",children:f?"Unlocking…":"Unlock"})]}),v&&i.jsx("div",{className:"error lock-error",role:"alert","data-testid":"admin-lock-error",children:v})]})})}const L1=3e4;function B1(l,r){const[c,o]=b.useState(!0),[f,h]=b.useState(!1),[v,y]=b.useState(!1),m=b.useRef(null),g=b.useRef(0),j=b.useRef(900),x=b.useRef(l),_=b.useRef(!1);x.current=l,_.current=f;const k=b.useCallback(()=>{m.current&&(clearTimeout(m.current),m.current=null)},[]),E=b.useCallback(()=>{k(),m.current=setTimeout(()=>h(!0),Math.max(1,j.current)*1e3)},[k]),z=b.useCallback(H=>{y(H.configured),h(H.locked),j.current=H.idle_seconds,H.configured&&!H.locked?E():k()},[E,k]),q=b.useCallback(()=>{r&&Sc().then(z).catch(()=>{}).finally(()=>o(!1))},[r,z]);return b.useEffect(()=>{if(!r){o(!1);return}q()},[r,q]),b.useEffect(()=>{if(!r||!v)return;function H(){if(_.current)return;E();const P=Date.now();if(P-g.current<L1)return;g.current=P;const J=x.current;J&&C1(J).then($=>{$.locked?h(!0):j.current=$.idle_seconds}).catch(()=>{})}const Q=["pointerdown","keydown","scroll","mousemove"];for(const P of Q)window.addEventListener(P,H,{passive:!0});function V(){q()}return window.addEventListener("focus",V),()=>{for(const P of Q)window.removeEventListener(P,H);window.removeEventListener("focus",V)}},[r,v,E,q]),b.useEffect(()=>()=>k(),[k]),{loading:c,locked:f,configured:v,refresh:q}}function q1(){const{clientId:l}=$v(),r=l??"",[c]=vm(),o=Y1(c.get("return_to")),[f,h]=b.useState({kind:"loading"}),[v,y]=b.useState({kind:"idle"}),[m,g]=b.useState(0);b.useEffect(()=>{if(!r){h({kind:"error",message:"missing client id in URL"});return}let x=!1;return h({kind:"loading"}),n1(r).then(_=>{x||(h({kind:"ok",client:_}),_.status==="approved"&&(y({kind:"approved",alreadyApproved:!0}),o&&window.location.assign(o)))}).catch(_=>{if(x)return;if(_ instanceof Z&&_.status===404){h({kind:"not_found"});return}const k=_ instanceof Error?_.message:String(_);h({kind:"error",message:k})}),()=>{x=!0}},[r,m,o]);async function j(){y({kind:"approving"});try{const x=await l1(r,o||void 0);if(x.redirect_to&&Nm(x.redirect_to)){window.location.assign(x.redirect_to);return}y({kind:"approved",alreadyApproved:x.already_approved})}catch(x){const _=x instanceof Z?`approve failed (${x.status}): ${x.message}`:x instanceof Error?x.message:String(x);y({kind:"error",message:_})}}return i.jsxs("div",{children:[i.jsx("div",{className:"list-header",children:i.jsx("h2",{children:"Approve app"})}),G1({loadState:f,action:v,onApprove:j,onRetry:()=>g(x=>x+1)})]})}function Nm(l){return!(!l||!l.startsWith("/")||l.startsWith("//"))}function Y1(l){return l===null?null:Nm(l)?l:null}function G1({loadState:l,action:r,onApprove:c,onRetry:o}){if(l.kind==="loading")return i.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"});if(l.kind==="not_found")return i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"Unknown client."}),i.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."," ",i.jsx(nt,{to:"/permissions",children:"Back to permissions"}),"."]})]});if(l.kind==="error")return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"error-banner",children:["Couldn't load the client: ",i.jsx("code",{children:l.message})]}),i.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 i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:r.alreadyApproved?"Already approved.":"Approved."}),i.jsxs("p",{className:"muted",children:[i.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."]}),i.jsx("p",{className:"muted",style:{marginTop:"1rem"},children:i.jsx(nt,{to:"/permissions",children:"View permissions"})})]});const v=r.kind==="approving",y=r.kind==="error"?r.message:null;return i.jsxs("div",{children:[i.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."}),i.jsx("div",{className:"vault-row",style:{marginTop:"1rem"},children:i.jsxs("div",{className:"body",children:[i.jsx("div",{className:"name",children:i.jsx("code",{children:h})}),i.jsxs("div",{className:"dim",children:[i.jsx("span",{className:"muted",children:"client_id: "}),i.jsx("code",{children:f.client_id})]}),i.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[i.jsx("span",{className:"muted",children:"redirect_uris: "}),f.redirect_uris.map((m,g)=>i.jsxs("span",{children:[i.jsx("code",{children:m}),g<f.redirect_uris.length-1?" ":null]},m))]}),f.scopes.length>0?i.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[i.jsx("span",{className:"muted",children:"requested scopes: "}),f.scopes.map((m,g)=>i.jsxs("span",{children:[i.jsx("code",{children:Z1(m)}),g<f.scopes.length-1?" ":null]},m)),f.scopes.some(wm)?i.jsxs("p",{className:"muted",style:{marginTop:"0.4rem",fontStyle:"italic",fontSize:"0.85rem"},children:[i.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,i.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[i.jsx("span",{className:"muted",children:"registered: "}),i.jsx("code",{title:f.registered_at,children:f.registered_at})]}),y?i.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:i.jsx("code",{children:y})}):null]})}),i.jsxs("div",{style:{marginTop:"1rem",display:"flex",gap:"0.5rem"},children:[i.jsx("button",{type:"button",onClick:()=>{c()},disabled:v,children:v?"Approving…":`Approve ${h}`}),i.jsx(nt,{to:"/permissions",className:"secondary",style:{alignSelf:"center"},children:"Cancel"})]})]})}function Z1(l){return wm(l)?`vault:*:${l.split(":")[1]}`:l}function wm(l){const r=l.split(":");if(r.length!==2||r[0]!=="vault")return!1;const c=r[1];return c==="read"||c==="write"}function V1(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 ac(l,r){return l instanceof Z?`${r} failed (${l.status}): ${l.message}`:l instanceof Error?l.message:String(l)}function $h({value:l,label:r="Copy"}){const[c,o]=b.useState(!1);return i.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 X1(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(0),[f,h]=b.useState({kind:"idle"}),[v,y]=b.useState({kind:"idle"}),[m,g]=b.useState({kind:"idle"}),[j,x]=b.useState(""),[_,k]=b.useState(""),[E,z]=b.useState(""),[q,H]=b.useState(""),[Q,V]=b.useState(""),[P,J]=b.useState(""),[$,w]=b.useState("");b.useEffect(()=>{let ie=!1;return r({kind:"loading"}),Promise.all([k1(),T1(),jc()]).then(([W,ge,be])=>{ie||(r({kind:"ok",data:{connections:W,catalog:ge,vaults:be.vaults}}),z(D=>{var K;return D||((K=be.vaults[0])==null?void 0:K.name)||""}))}).catch(W=>{ie||r({kind:"error",message:W instanceof Error?W.message:String(W)})}),()=>{ie=!0}},[c]);function U(ie){x(ie.source.module),k(ie.source.event),V(ie.sink.module),J(ie.sink.action),H(ie.source.filter?JSON.stringify(ie.source.filter,null,2):"");const W=V1(ie);w(Object.keys(W).length>0?JSON.stringify(W,null,2):""),h({kind:"idle"})}async function X(ie){if(ie.preventDefault(),!j||!_||!Q||!P){h({kind:"error",message:"Pick a source event and a sink action."});return}let W,ge;try{W=q.trim()?JSON.parse(q):void 0}catch{h({kind:"error",message:"Filter is not valid JSON."});return}try{ge=$.trim()?JSON.parse($):void 0}catch{h({kind:"error",message:"Action params are not valid JSON."});return}if(j==="vault"&&!E){h({kind:"error",message:"Pick a vault for the source event."});return}h({kind:"submitting"});try{const be=await _1({source:{module:j,...j==="vault"?{vault:E}:{},event:_,...W?{filter:W}:{}},sink:{module:Q,action:P,...ge?{params:ge}:{}}});h({kind:"created",...be.connect?{connect:be.connect}:{}}),o(D=>D+1)}catch(be){h({kind:"error",message:ac(be,"Create")})}}async function te(ie){y({kind:"removing",id:ie});try{await R1(ie),y({kind:"idle"}),o(W=>W+1)}catch(W){y({kind:"error",id:ie,message:ac(W,"Remove")})}}async function le(ie){if(m.kind!=="approving"){g({kind:"approving",id:ie});try{await A1(ie),g({kind:"idle"}),o(W=>W+1)}catch(W){g({kind:"error",id:ie,message:ac(W,"Approve")})}}}return i.jsxs("div",{"data-route-content":"true",children:[i.jsx("div",{className:"list-header",children:i.jsx("h1",{children:"Connections"})}),i.jsxs("p",{className:"muted",children:["A connection wires ",i.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."]}),Q1(l,v,y,te,m,le,()=>o(ie=>ie+1)),l.kind==="ok"&&i.jsx(W1,{catalog:l.data.catalog,vaults:l.data.vaults,sourceModule:j,setSourceModule:x,sourceEvent:_,setSourceEvent:k,vault:E,setVault:z,filterText:q,setFilterText:H,sinkModule:Q,setSinkModule:V,sinkAction:P,setSinkAction:J,paramsText:$,setParamsText:w,createSt:f,setCreateSt:h,onSubmit:X,onApplyTemplate:U})]})}function Q1(l,r,c,o,f,h,v){if(l.kind==="loading")return i.jsx("p",{className:"muted",children:"Loading connections…"});if(l.kind==="error")return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"error-banner",children:["Couldn't load connections: ",i.jsx("code",{children:l.message})]}),i.jsx("button",{type:"button",onClick:v,className:"secondary",children:"Retry"})]});const{connections:y}=l.data;return y.length===0?i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"No connections yet."}),i.jsx("p",{className:"muted",children:"Build one below, or start from a module's preset."})]}):i.jsx(K1,{connections:y,removeSt:r,setRemoveSt:c,onConfirmRemove:o,approveSt:f,onApprove:h})}function Em(l){return l.requested_by&&l.requested_by.length>0?l.requested_by:"custom"}function $1(l){return l==="custom"?"Custom (built here)":`Added from ${l}`}function J1(l){const r=new Map;for(const c of l){const o=Em(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 K1({connections:l,removeSt:r,setRemoveSt:c,onConfirmRemove:o,approveSt:f,onApprove:h}){const v=J1(l);return i.jsx(i.Fragment,{children:v.map(([y,m])=>i.jsxs("div",{className:"channel-list",style:{marginTop:"1rem"},"data-provenance-group":y,children:[i.jsx("h3",{style:{marginBottom:"0.25rem"},children:$1(y)}),i.jsx("div",{className:"table-scroll",children:i.jsxs("table",{className:"channel-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{scope:"col",children:"Connection"}),i.jsx("th",{scope:"col",children:"When"}),i.jsx("th",{scope:"col",children:"Do"}),i.jsx("th",{scope:"col",children:"Source"}),i.jsx("th",{scope:"col",children:"Actions"})]})}),i.jsx("tbody",{children:m.map(g=>F1(g,r,c,o,f,h))})]})})]},y))})}function F1(l,r,c,o,f,h){const v=r.kind==="confirming"&&r.id===l.id,y=r.kind==="removing"&&r.id===l.id,m=r.kind==="error"&&r.id===l.id?r.message:null,g=l.status==="pending",j=f.kind==="approving"&&f.id===l.id,x=f.kind==="error"&&f.id===l.id?f.message:null,_=`${l.source.module}.${l.source.event}${l.source.vault?` (${l.source.vault})`:""}`,k=`${l.sink.module}.${l.sink.action}`,E=Em(l);return i.jsxs("tr",{"data-connection-id":l.id,"data-requested-by":E,children:[i.jsxs("td",{children:[i.jsx("code",{children:l.id}),g&&i.jsxs(i.Fragment,{children:[" ",i.jsx("span",{className:"tag","data-testid":"pending-badge",title:`A module claimed a credential it already holds${l.provisioned.scope?` (${l.provisioned.scope})`:""} — approving lets it renew before expiry. Nothing new is granted.`,children:"pending approval"})]})]}),i.jsx("td",{children:i.jsx("code",{children:_})}),i.jsx("td",{children:i.jsx("code",{children:k})}),i.jsx("td",{children:E==="custom"?i.jsx("span",{className:"muted",children:"custom"}):i.jsx("span",{className:"tag","data-testid":"provenance-badge",children:E})}),i.jsxs("td",{children:[g&&i.jsx("button",{type:"button",disabled:j,onClick:()=>void h(l.id),"aria-label":`Approve ${l.id}`,"data-testid":"approve-connection",style:{marginRight:"0.5rem"},children:j?"Approving…":"Approve"}),v?i.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.25rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm remove ${l.id}`,children:[i.jsxs("p",{children:["Remove connection ",i.jsx("code",{children:l.id}),"? This tears down the provisioned trigger (and channel config, if any)."]}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[i.jsx("button",{type:"button",className:"destructive",onClick:()=>{o(l.id)},disabled:y,children:y?"Removing…":"Remove"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"idle"}),disabled:y,children:"Cancel"})]})]}):i.jsx("button",{type:"button",className:"secondary",disabled:y,onClick:()=>c({kind:"confirming",id:l.id}),"aria-label":`Remove ${l.id}`,children:y?"Removing…":"Remove"}),m&&i.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:i.jsx("code",{children:m})}),x&&i.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:i.jsx("code",{children:x})})]})]},l.id)}function W1(l){const{catalog:r,createSt:c}=l,o=c.kind==="submitting",f=m=>r.events.filter(g=>g.module===m),h=m=>r.actions.filter(g=>g.module===m),v=Array.from(new Set(r.events.map(m=>m.module))),y=Array.from(new Set(r.actions.map(m=>m.module)));return i.jsxs("section",{style:{marginTop:"1.5rem"},children:[i.jsxs("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center",flexWrap:"wrap"},children:[i.jsx("h3",{style:{marginRight:"auto"},children:"Build a connection"}),r.templates.map(m=>i.jsxs("button",{type:"button",className:"secondary",onClick:()=>l.onApplyTemplate(m),"data-testid":`preset-${m.module}-${m.key}`,...m.description?{title:m.description}:{},children:["Preset: ",m.title]},`${m.module}/${m.key}`))]}),i.jsxs("form",{onSubmit:m=>void l.onSubmit(m),"aria-label":"Build a connection",children:[i.jsxs("fieldset",{style:{border:"1px solid var(--border, #ddd)",padding:"0.75rem"},children:[i.jsx("legend",{children:"When (source event)"}),i.jsxs("p",{children:[i.jsx("label",{htmlFor:"conn-source-module",children:"Module"}),i.jsx("br",{}),i.jsxs("select",{id:"conn-source-module",value:l.sourceModule,disabled:o,onChange:m=>{l.setSourceModule(m.target.value),l.setSourceEvent("")},children:[i.jsx("option",{value:"",children:"— pick a module —"}),v.map(m=>i.jsx("option",{value:m,children:m},m))]})]}),l.sourceModule&&i.jsxs("p",{children:[i.jsx("label",{htmlFor:"conn-source-event",children:"Event"}),i.jsx("br",{}),i.jsxs("select",{id:"conn-source-event",value:l.sourceEvent,disabled:o,onChange:m=>l.setSourceEvent(m.target.value),children:[i.jsx("option",{value:"",children:"— pick an event —"}),f(l.sourceModule).map(m=>i.jsxs("option",{value:m.key,children:[m.title," (",m.key,")"]},m.key))]})]}),l.sourceModule==="vault"&&i.jsxs("p",{children:[i.jsx("label",{htmlFor:"conn-vault",children:"Vault"}),i.jsx("br",{}),i.jsx("select",{id:"conn-vault",value:l.vault,disabled:o,onChange:m=>l.setVault(m.target.value),children:l.vaults.map(m=>i.jsx("option",{value:m.name,children:m.name},m.name))})]}),i.jsxs("p",{children:[i.jsxs("label",{htmlFor:"conn-filter",children:["Filter ",i.jsx("span",{className:"muted",children:"(JSON — tags / has_metadata / missing_metadata)"})]}),i.jsx("br",{}),i.jsx("textarea",{id:"conn-filter",value:l.filterText,disabled:o,rows:4,style:{width:"100%",fontFamily:"monospace"},onChange:m=>l.setFilterText(m.target.value),placeholder:'{ "tags": ["#agent-message/inbound"] }'})]})]}),i.jsxs("fieldset",{style:{border:"1px solid var(--border, #ddd)",padding:"0.75rem",marginTop:"0.75rem"},children:[i.jsx("legend",{children:"Do (sink action)"}),i.jsxs("p",{children:[i.jsx("label",{htmlFor:"conn-sink-module",children:"Module"}),i.jsx("br",{}),i.jsxs("select",{id:"conn-sink-module",value:l.sinkModule,disabled:o,onChange:m=>{l.setSinkModule(m.target.value),l.setSinkAction("")},children:[i.jsx("option",{value:"",children:"— pick a module —"}),y.map(m=>i.jsx("option",{value:m,children:m},m))]})]}),l.sinkModule&&i.jsxs("p",{children:[i.jsx("label",{htmlFor:"conn-sink-action",children:"Action"}),i.jsx("br",{}),i.jsxs("select",{id:"conn-sink-action",value:l.sinkAction,disabled:o,onChange:m=>l.setSinkAction(m.target.value),children:[i.jsx("option",{value:"",children:"— pick an action —"}),h(l.sinkModule).map(m=>i.jsxs("option",{value:m.key,children:[m.title," (",m.key,")"]},m.key))]})]}),i.jsxs("p",{children:[i.jsxs("label",{htmlFor:"conn-params",children:["Action params ",i.jsxs("span",{className:"muted",children:["(JSON — e.g. ",'{ "channel": "eng" }',")"]})]}),i.jsx("br",{}),i.jsx("textarea",{id:"conn-params",value:l.paramsText,disabled:o,rows:3,style:{width:"100%",fontFamily:"monospace"},onChange:m=>l.setParamsText(m.target.value),placeholder:'{ "channel": "eng" }'})]})]}),c.kind==="error"&&i.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:i.jsx("code",{children:c.message})}),i.jsx("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.75rem"},children:i.jsx("button",{type:"submit",disabled:o,children:o?"Creating…":"Create connection"})})]}),c.kind==="created"&&c.connect&&i.jsx(I1,{connect:c.connect,onDismiss:()=>l.setCreateSt({kind:"idle"})}),c.kind==="created"&&!c.connect&&i.jsx("div",{className:"success-banner",style:{marginTop:"1rem"},"data-testid":"connection-created",children:"Connection created."})]})}function I1({connect:l,onDismiss:r}){return i.jsxs("div",{className:"mcp-connect-card",style:{marginTop:"1rem"},"data-testid":"connection-connect-panel",children:[i.jsx("h3",{children:"Connect a session"}),i.jsx("p",{className:"muted",children:"Run these where your Claude Code session will live; authorize in the browser when prompted."}),i.jsxs("div",{className:"mcp-field",children:[i.jsx("span",{className:"mcp-field-label",children:"1 · Register the channel (MCP)"}),i.jsxs("div",{className:"token-box",children:[i.jsx("code",{"data-testid":"connection-mcp-add",children:l.mcpAdd}),i.jsx($h,{value:l.mcpAdd})]})]}),i.jsxs("div",{className:"mcp-field",children:[i.jsx("span",{className:"mcp-field-label",children:"2 · Launch a session on the channel"}),i.jsxs("div",{className:"token-box",children:[i.jsx("code",{"data-testid":"connection-launch",children:l.launch}),i.jsx($h,{value:l.launch})]}),i.jsxs("p",{className:"muted",style:{marginTop:"0.4rem"},children:["⚠ This launches Claude Code with unrestricted tool access (",i.jsx("code",{children:"--dangerously-skip-permissions"}),") — run it only on a machine you trust for that session."]})]}),i.jsx("div",{style:{marginTop:"0.75rem"},children:i.jsx("button",{type:"button",className:"secondary",onClick:r,children:"Dismiss"})})]})}function Xl(l,r){return l instanceof Z||l instanceof Error?l.message:`${r} failed`}function P1(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState({kind:"idle"}),[f,h]=b.useState(0);b.useEffect(()=>{let j=!1;return r({kind:"loading"}),M1().then(x=>{j||r({kind:"ok",grants:x})}).catch(x=>{j||r({kind:"error",message:Xl(x,"Load")})}),()=>{j=!0}},[f]);async function v(j){o({kind:"working",id:j});try{await ec(j),o({kind:"idle"}),h(x=>x+1)}catch(x){o({kind:"error",id:j,message:Xl(x,"Approve")})}}async function y(j,x){if(x.trim().length===0){o({kind:"error",id:j,message:"Paste the API token before approving."});return}o({kind:"working",id:j});try{await ec(j,x),o({kind:"idle"}),h(_=>_+1)}catch(_){o({kind:"error",id:j,message:Xl(_,"Approve")})}}async function m(j){o({kind:"working",id:j});try{const x=await ec(j);if(x.authorizeUrl){window.location.assign(x.authorizeUrl);return}o({kind:"idle"}),h(_=>_+1)}catch(x){o({kind:"error",id:j,message:Xl(x,"Connect")})}}async function g(j){o({kind:"working",id:j});try{await z1(j),o({kind:"idle"}),h(x=>x+1)}catch(x){o({kind:"error",id:j,message:Xl(x,"Revoke")})}}return i.jsxs("div",{"data-route-content":"true",children:[i.jsx("div",{className:"list-header",children:i.jsx("h1",{children:"Grants"})}),i.jsxs("p",{className:"muted",children:["Agents declare connections they want beyond their own vault — other vaults (tag-scoped) and external service credentials. Each one waits here for your approval. A vault note can only"," ",i.jsx("em",{children:"request"}),"; nothing is granted until you approve it below."]}),e0(l,c,o,{onApproveVault:v,onApproveService:y,onConnectMcp:m,onRevoke:g,onRetry:()=>h(j=>j+1)})]})}function e0(l,r,c,o){if(l.kind==="loading")return i.jsx("p",{className:"muted",children:"Loading grants…"});if(l.kind==="error")return i.jsxs("div",{children:[i.jsx("div",{className:"error-banner",children:l.message}),i.jsx("button",{type:"button",onClick:o.onRetry,className:"secondary",children:"Retry"})]});if(l.grants.length===0)return i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"No grant requests yet."}),i.jsx("p",{className:"muted",children:"When an agent declares a connection it wants, it shows up here for approval."})]});const f=new Map;for(const v of l.grants){const y=f.get(v.agent)??[];y.push(v),f.set(v.agent,y)}const h=[...f.keys()].sort();return i.jsx("div",{className:"grants-groups",children:h.map(v=>i.jsxs("section",{"aria-label":`Grants for ${v}`,style:{marginBottom:"1.5rem"},children:[i.jsx("h3",{style:{marginBottom:"0.25rem"},children:v}),i.jsx("div",{className:"table-scroll",children:i.jsxs("table",{className:"channel-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Connection"}),i.jsx("th",{children:"Status"}),i.jsx("th",{children:"Actions"})]})}),i.jsx("tbody",{children:(f.get(v)??[]).map(y=>i.jsx(a0,{grant:y,rowSt:r,setRowSt:c,actions:o},y.id))})]})})]},v))})}function t0(l){if(l.kind==="vault"){const r=l.access??"read",c=l.tags&&l.tags.length>0?` (${l.tags.join(", ")})`:"";return`vault: ${l.target} · ${r}${c}`}if(l.kind==="service"){const r=l.inject&&l.inject.length>0?` · inject: ${l.inject.join("+")}`:"";return`service: ${l.target}${r}`}return`mcp: ${l.target}`}function a0({grant:l,rowSt:r,setRowSt:c,actions:o}){const f=r.kind==="working"&&r.id===l.id,h=r.kind==="error"&&r.id===l.id?r.message:null,v=l.connection,y=v.kind==="mcp",m=v.kind==="service",g=l.status!=="approved",j=r.kind==="pasting"&&r.id===l.id?r.token:null;return i.jsxs("tr",{"data-grant-id":l.id,children:[i.jsxs("td",{children:[i.jsx("code",{children:t0(v)}),y&&i.jsx("span",{className:"muted",children:" — remote MCP (OAuth)"})]}),i.jsxs("td",{children:[i.jsx("span",{className:`status status-${l.status}`,children:l.status}),l.reason&&i.jsxs("span",{className:"muted",children:[" — ",l.reason]})]}),i.jsxs("td",{children:[g&&v.kind==="vault"&&i.jsx("button",{type:"button",className:"primary",disabled:f,onClick:()=>o.onApproveVault(l.id),children:f?"Approving…":l.status==="revoked"?"Re-approve":"Approve"}),g&&y&&j===null&&i.jsxs("span",{style:{display:"inline-flex",gap:"0.5rem",alignItems:"center"},children:[i.jsx("button",{type:"button",className:"primary",disabled:f,onClick:()=>o.onConnectMcp(l.id),children:f?"Connecting…":l.status==="needs_consent"?"Reconnect":"Connect"}),i.jsx("button",{type:"button",className:"secondary",disabled:f,onClick:()=>c({kind:"pasting",id:l.id,token:""}),children:"Paste a token instead"})]}),g&&m&&j===null&&i.jsx("button",{type:"button",className:"primary",disabled:f,onClick:()=>c({kind:"pasting",id:l.id,token:""}),children:l.status==="revoked"?"Re-approve…":"Approve…"}),g&&(m||y)&&j!==null&&i.jsxs("span",{style:{display:"inline-flex",gap:"0.5rem",alignItems:"center"},children:[i.jsx("input",{type:"password","aria-label":`API token for ${v.target}`,placeholder:`${v.target} API token`,value:j,onChange:x=>c({kind:"pasting",id:l.id,token:x.target.value})}),i.jsx("button",{type:"button",className:"primary",disabled:f,onClick:()=>o.onApproveService(l.id,j),children:f?"Approving…":"Save & approve"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"idle"}),children:"Cancel"})]}),l.status==="approved"&&i.jsx("button",{type:"button",className:"secondary",disabled:f,onClick:()=>o.onRevoke(l.id),children:f?"Revoking…":"Revoke"}),h&&i.jsxs("span",{className:"error-inline",children:[" ",h]})]})]})}const n0=[{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 l0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(null);b.useEffect(()=>{let v=!1;return Ns().then(y=>{v||r({kind:"ok",modules:y.modules.filter(m=>m.installed)})}).catch(y=>{if(v)return;const m=y instanceof Error?y.message:String(y);r({kind:"error",message:m})}),jc().then(y=>{v||o(y.vaults.length)}).catch(()=>{v||o(null)}),()=>{v=!0}},[]);const f=l.kind==="ok"?l.modules:[],h=f.flatMap(v=>v.uis.map(y=>({key:`${v.short}:${y.name}`,label:y.display_name,tagline:y.tagline,href:y.path,ownerLabel:v.display_name})));return i.jsxs("div",{"data-route-content":"true",className:"admin-home",children:[i.jsx("div",{className:"list-header",children:i.jsx("h1",{children:"Hub"})}),i.jsxs("p",{className:"muted",children:["Everything on this hub, in one place. Hub-native sections open here in the admin shell; module surfaces (marked ",i.jsx("span",{className:"ext-mark",children:"↗"}),") open the module's own UI."]}),i.jsxs("section",{className:"home-group","data-testid":"home-administer",children:[i.jsxs("div",{className:"home-group-head",children:[i.jsx("h2",{children:"Administer"}),i.jsx("span",{className:"home-group-tag home-group-tag-hub",children:"hub"})]}),i.jsx("p",{className:"muted home-group-sub",children:"Cross-cutting host admin. Opens here in the shell — the nav stays with you."}),i.jsx("div",{className:"home-grid",children:n0.map(v=>i.jsxs(nt,{to:v.to,className:"home-card home-card-hub","data-section":v.to,children:[i.jsx("span",{className:"home-card-title",children:v.label}),i.jsx("span",{className:"home-card-desc",children:v.desc})]},v.to))})]}),i.jsxs("section",{className:"home-group","data-testid":"home-modules",children:[i.jsxs("div",{className:"home-group-head",children:[i.jsx("h2",{children:"Modules"}),i.jsx("span",{className:"home-group-tag home-group-tag-module",children:"modules"})]}),i.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 ",i.jsx(nt,{to:"/modules",children:"Modules"}),"."]}),l.kind==="loading"?i.jsx("p",{className:"muted","data-loading":"true",children:"Loading modules…"}):l.kind==="error"?i.jsxs("p",{className:"muted","data-testid":"home-modules-error",children:["Couldn't load modules (",l.message,"). Open ",i.jsx(nt,{to:"/modules",children:"Modules"})," ","directly."]}):f.length===0?i.jsxs("p",{className:"muted","data-testid":"home-modules-empty",children:["No modules installed yet. ",i.jsx(nt,{to:"/modules",children:"Install one →"})]}):i.jsx("div",{className:"home-grid",children:f.map(v=>v.short==="vault"&&c===0?i.jsx(s0,{module:v},v.short):i.jsx(i0,{module:v},v.short))})]}),h.length>0?i.jsxs("section",{className:"home-group","data-testid":"home-surfaces",children:[i.jsxs("div",{className:"home-group-head",children:[i.jsx("h2",{children:"Your surfaces"}),i.jsx("span",{className:"home-group-tag home-group-tag-module",children:"module-owned"})]}),i.jsx("p",{className:"muted home-group-sub",children:"The user-facing apps these modules host. Opens the app — outside the hub shell."}),i.jsx("div",{className:"home-grid",children:h.map(v=>i.jsxs("a",{href:v.href,className:"home-card home-card-surface","data-testid":`home-surface-${v.key}`,children:[i.jsxs("span",{className:"home-card-title",children:[v.label," ",i.jsx("span",{className:"ext-mark",children:"↗"})]}),v.tagline?i.jsx("span",{className:"home-card-desc",children:v.tagline}):null,i.jsxs("span",{className:"home-card-owner",children:["opens ",v.ownerLabel,"'s surface"]})]},v.key))})]}):null]})}function i0({module:l}){const r=l.config_ui_url??l.management_url;return r?i.jsxs("a",{href:r,className:"home-card home-card-module","data-testid":`home-module-${l.short}`,children:[i.jsxs("span",{className:"home-card-title",children:[l.display_name," ",i.jsx("span",{className:"ext-mark",children:"↗"})]}),l.tagline?i.jsx("span",{className:"home-card-desc",children:l.tagline}):null,i.jsxs("span",{className:"home-card-owner",children:["opens ",l.display_name,"'s own admin"]})]}):i.jsxs("div",{className:"home-card home-card-module home-card-disabled","data-testid":`home-module-${l.short}`,"aria-disabled":"true",children:[i.jsx("span",{className:"home-card-title",children:l.display_name}),l.tagline?i.jsx("span",{className:"home-card-desc",children:l.tagline}):null,i.jsx("span",{className:"home-card-owner home-card-owner-empty",children:"no admin UI yet"})]})}function s0({module:l}){return i.jsxs("a",{href:"/admin/setup?step=vault",className:"home-card home-card-hub","data-testid":`home-module-${l.short}`,children:[i.jsx("span",{className:"home-card-title",children:l.display_name}),i.jsx("span",{className:"home-card-desc",children:"No vaults yet — create your first vault to start storing notes, tokens, and secrets."}),i.jsx("span",{className:"home-card-owner",children:"create your first vault — opens the setup wizard"})]})}const u0=2e3,r0=12e4;function c0(){const[l,r]=b.useState(null),[c,o]=b.useState({kind:"idle"}),f=b.useRef(null),h=b.useRef(0),v=b.useCallback(async()=>{try{r(await cc())}catch{}},[]);b.useEffect(()=>{v()},[v]),b.useEffect(()=>()=>{f.current&&clearInterval(f.current)},[]);const y=b.useCallback(()=>{f.current&&(clearInterval(f.current),f.current=null)},[]),m=b.useCallback((j,x)=>{h.current=Date.now()+r0,y(),f.current=setInterval(()=>{(async()=>{let _=null,k=null;try{_=await cc()}catch{}try{k=await x1()}catch{}if(_){const E=_.version!==j,z=x!==null&&_.version===x;if(E||z){y(),r(_),o({kind:"succeeded",newVersion:_.version});return}}if((k==null?void 0:k.phase)==="failed"){y(),o({kind:"error",message:k.error??"the hub upgrade failed — check the platform log"});return}if(Date.now()>=h.current){y();const E=(k==null?void 0:k.log.at(-1))??null;o({kind:"timeout",lastLog:E})}})()},u0)},[y]);async function g(){if(!l)return;const j=l.version;o({kind:"starting"});try{const x=await b1();if(x.mode==="redeploy-required"){o({kind:"redeploy-required",targetVersion:x.target_version});return}o({kind:"upgrading",previousVersion:j,targetVersion:x.target_version}),m(j,x.target_version)}catch(x){o({kind:"error",message:x instanceof Error?x.message:String(x)})}}return l?i.jsxs("section",{className:"hub-upgrade-card install-card","data-testid":"hub-upgrade-card",children:[i.jsxs("div",{className:"install-card-body",children:[i.jsxs("h3",{children:["Hub ",i.jsx("span",{className:"muted",children:"(@openparachute/hub)"})]}),i.jsxs("p",{className:"install-card-meta muted",children:["Installed ",i.jsxs("code",{"data-testid":"hub-current-version",children:["v",l.version]})," · source"," ",i.jsx("code",{children:l.source})]}),i.jsx(d0,{state:c})]}),i.jsx("div",{className:"install-card-actions",children:i.jsx(o0,{state:c,onUpgrade:()=>void g()})})]}):null}function o0({state:l,onUpgrade:r}){if(l.kind==="redeploy-required")return i.jsx("span",{className:"muted","data-testid":"hub-redeploy-hint",children:"Redeploy from your platform dashboard"});const c=l.kind==="starting"||l.kind==="upgrading";return i.jsx("button",{type:"button",onClick:r,disabled:c,"data-testid":"hub-upgrade-button",children:c?"Upgrading…":"Upgrade hub"})}function d0({state:l}){switch(l.kind){case"idle":return null;case"starting":return i.jsx("p",{className:"muted","data-testid":"hub-upgrade-state-starting",children:"Starting the hub upgrade…"});case"upgrading":return i.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 i.jsxs("p",{className:"muted","data-testid":"hub-upgrade-state-success",children:["Upgraded — the hub is now running ",i.jsxs("code",{children:["v",l.newVersion]}),"."]});case"timeout":return i.jsxs("p",{className:"warn-banner","data-testid":"hub-upgrade-state-timeout",children:["The hub may still be coming up — refresh shortly.",l.lastLog?i.jsxs(i.Fragment,{children:[" ",i.jsxs("span",{className:"dim",children:["Last status: ",l.lastLog]})]}):null]});case"redeploy-required":return i.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?i.jsxs(i.Fragment,{children:["Redeploy from your platform dashboard to move to ",i.jsxs("code",{children:["v",l.targetVersion]}),"."]}):i.jsx(i.Fragment,{children:"Redeploy from your platform dashboard to pick up the latest hub."})]});case"error":return i.jsxs("p",{className:"error-banner","data-testid":"hub-upgrade-state-error",children:["Upgrade failed: ",l.message]})}}function f0(){if(typeof navigator>"u")return"other";const l=(navigator.platform||"").toLowerCase();return l.includes("mac")?"darwin":l.includes("linux")?"linux":"other"}function h0(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 m0({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 i.jsxs("div",{className:"depcard-cmd",children:[i.jsx("pre",{className:"depcard-cmd-text",children:l}),i.jsx("button",{type:"button",className:"btn btn-secondary depcard-copy",onClick:()=>void o(),"aria-label":"Copy install command",children:r?"Copied":"Copy"})]})}function p0({wire:l}){const r=f0(),c=h0(l.install,r);return i.jsxs("div",{className:"depcard","data-testid":"missing-dependency-card",children:[i.jsxs("h3",{className:"depcard-heading",children:[l.binary," isn't installed"]}),l.why?i.jsxs("p",{className:"depcard-why muted",children:["It's needed to ",l.why,"."]}):null,c.length>0?i.jsxs("div",{className:"depcard-installs",children:[i.jsx("p",{className:"depcard-installs-label",children:"Install it:"}),c.map(o=>i.jsxs("div",{className:o.preferred?"depcard-install preferred":"depcard-install",children:[i.jsx("span",{className:"depcard-os",children:o.label}),i.jsx(m0,{command:o.command})]},o.label))]}):null,l.docs_url?i.jsx("p",{className:"depcard-docs",children:i.jsx("a",{href:l.docs_url,target:"_blank",rel:"noreferrer noopener",children:"Documentation"})}):null,l.sysadmin_hint?i.jsx("p",{className:"depcard-hint muted",children:l.sysadmin_hint}):null]})}function g0(l){const{error:r,errorDetail:c}=l;return(c==null?void 0:c.error_type)==="missing_dependency"?i.jsx(p0,{wire:c}):c!=null&&c.error_description?i.jsx("span",{className:"depcard-fallback",children:c.error_description}):r?i.jsx("span",{className:"depcard-fallback",children:r}):null}function v0(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 y0(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 b0=1e3;function x0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState([]),[f,h]=b.useState({}),[v,y]=b.useState({}),m=b.useCallback(async()=>{try{const w=await Ns();r({kind:"ok",catalog:w})}catch(w){const U=w instanceof Error?w.message:String(w);r({kind:"error",message:U})}},[]);b.useEffect(()=>{m()},[m]);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 w=>{var U;try{const X=await o1(w.operationId);o(te=>te.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"?m():setTimeout(()=>{o(le=>le.filter(ie=>ie.operationId!==X.id)),m()},1500))}catch(X){const te=X instanceof Error?X.message:String(X);o(le=>le.map(ie=>ie.operationId===w.operationId?{...ie,status:"failed",error:te}:ie))}}))},b0),()=>{g.current&&(clearInterval(g.current),g.current=null)}},[c,m]);async function j(w){y(U=>{const X={...U};return delete X[w],X});try{const U=await i1(w);o(X=>[...X,{kind:"install",operationId:U,short:w,log:[],status:"pending"}])}catch(U){y(X=>({...X,[w]:U instanceof Error?U.message:String(U)}))}}async function x(w){y(U=>{const X={...U};return delete X[w],X});try{const U=await s1(w);o(X=>[...X,{kind:"upgrade",operationId:U,short:w,log:[],status:"pending"}])}catch(U){y(X=>({...X,[w]:U instanceof Error?U.message:String(U)}))}}async function _(w){if(!f[w]){h(U=>({...U,[w]:!0})),y(U=>{const X={...U};return delete X[w],X});try{await u1(w),await m()}catch(U){y(X=>({...X,[w]:U instanceof Error?U.message:String(U)}))}finally{h(U=>({...U,[w]:!1}))}}}async function k(w){if(!f[w]&&window.confirm(`Uninstall ${w}? 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,[w]:!0})),y(U=>{const X={...U};return delete X[w],X});try{await r1(w),await m()}catch(U){y(X=>({...X,[w]:U instanceof Error?U.message:String(U)}))}finally{h(U=>({...U,[w]:!1}))}}}if(l.kind==="loading")return i.jsx("div",{className:"empty",children:"Loading modules…"});if(l.kind==="error")return l.message.includes("setup_required")?i.jsxs("div",{className:"empty",children:["Hub not yet configured. ",i.jsx("a",{href:"/admin/setup",children:"Finish first-boot setup"})," first."]}):i.jsxs("div",{className:"empty",children:["Failed to load modules: ",l.message,"."," ",i.jsx("button",{type:"button",onClick:()=>void m(),children:"Retry"})]});const E=l.catalog,{modules:z,supervisor_available:q,module_install_channel:H}=E,Q=z.filter(w=>w.installed),V=z.filter(w=>!w.installed&&w.available),P=new Set(c.filter(w=>w.kind==="install").map(w=>w.short)),J=V.filter(w=>!P.has(w.short));async function $(w){if(w!==H){r({kind:"ok",catalog:{...E,module_install_channel:w}});try{const U=await c1(w);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 i.jsxs("section",{className:"modules",children:[i.jsx("h1",{children:"Modules"}),i.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."}),i.jsx(c0,{}),i.jsx(w0,{channel:H,disabled:!q,onChange:w=>void $(w)}),!q&&i.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 ",i.jsx("code",{children:"parachute serve"}),". On-box installs use"," ",i.jsx("code",{children:"parachute install vault"})," etc. from a shell instead."]}),c.length>0&&i.jsxs("div",{className:"banner","data-testid":"pending-ops-banner",children:[i.jsx("strong",{children:"In progress:"}),i.jsx("ul",{children:c.map(w=>i.jsxs("li",{children:[i.jsx("code",{children:w.short})," · ",w.kind," · status: ",w.status,w.status==="failed"&&(w.errorDetail||w.error)?i.jsx("div",{className:"depcard-wrap",children:g0({error:w.error,errorDetail:w.errorDetail})}):null,w.log.length>0&&i.jsxs("details",{children:[i.jsxs("summary",{children:[w.log.length," log line(s)"]}),i.jsx("pre",{children:w.log.join(`
61
- `)})]})]},w.operationId))})]}),i.jsxs("section",{className:"modules-installed","data-testid":"installed-section",children:[i.jsx("h2",{children:"Installed modules"}),Q.length===0?i.jsxs("p",{className:"muted","data-testid":"installed-empty",children:["No modules installed yet. Pick one from ",i.jsx("strong",{children:"Install a module"})," below to get started."]}):Jh(Q,w=>i.jsx("ul",{className:"module-list",children:w.map(U=>i.jsx(j0,{module:U,supervisorAvailable:q,syncBusy:!!f[U.short],errorMessage:v[U.short],onUpgrade:()=>void x(U.short),onRestart:()=>void _(U.short),onUninstall:()=>void k(U.short)},U.short))}),"installed")]}),i.jsxs("section",{className:"modules-installable","data-testid":"installable-section",children:[i.jsx("h2",{children:"Install a module"}),J.length===0?i.jsx("p",{className:"muted","data-testid":"installable-empty",children:P.size>0?"Install in progress — see In progress above.":"All available modules are installed."}):Jh(J,w=>i.jsx("ul",{className:"install-list",children:w.map(U=>i.jsx(S0,{module:U,supervisorAvailable:q,installing:P.has(U.short),errorMessage:v[U.short],onInstall:()=>void j(U.short)},U.short))}),"installable")]})]})}function Jh(l,r,c){const o=l.filter(h=>h.focus!=="experimental"),f=l.filter(h=>h.focus==="experimental");return i.jsxs(i.Fragment,{children:[o.length>0&&i.jsx("div",{"data-testid":`${c}-core-group`,children:r(o)}),f.length>0&&i.jsxs("div",{className:"modules-experimental","data-testid":`${c}-experimental-group`,children:[i.jsxs("h3",{className:"muted experimental-heading",children:["Experimental"," ",i.jsx("span",{className:"muted",children:"— exploration modules; not part of the core surface"})]}),r(f)]})]})}function j0({module:l,supervisorAvailable:r,syncBusy:c,errorMessage:o,onUpgrade:f,onRestart:h,onUninstall:v}){const y=r&&!c,m=l.installed_version!==l.latest_version&&l.latest_version!==null,g=l.management_url,j=l.config_ui_url;return i.jsxs("li",{className:"module-row","data-short":l.short,children:[i.jsxs("header",{children:[i.jsxs("h2",{children:[l.display_name," ",i.jsxs("span",{className:"muted",children:["(",l.short,")"]})]}),(()=>{const x=C0(l);return i.jsx("span",{className:`status status-${x.cssState}`,"data-state":x.cssState,"data-testid":`module-status-${l.short}`,children:x.label})})()]}),l.tagline?i.jsx("p",{className:"tagline",children:l.tagline}):null,i.jsxs("dl",{className:"meta",children:[i.jsx("dt",{children:"Package"}),i.jsx("dd",{children:i.jsx("code",{children:l.package})}),i.jsx("dt",{children:"Installed"}),i.jsxs("dd",{children:["v",l.installed_version??"unknown",m&&i.jsxs("span",{className:"badge",children:["v",l.latest_version," available"]})]}),l.pid&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"PID"}),i.jsx("dd",{children:l.pid})]})]}),l.uis.length>0&&i.jsx(N0,{uis:l.uis}),i.jsxs("div",{className:"actions",children:[g?i.jsx("a",{className:"btn",href:g,"data-testid":`open-${l.short}`,children:"Open"}):i.jsx("button",{type:"button",className:"btn",disabled:!0,title:j?"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"}),j?i.jsx("a",{className:"btn",href:j,"data-testid":`configure-${l.short}`,children:"Configure"}):null,i.jsx("button",{type:"button",disabled:!y,onClick:h,children:"Restart"}),i.jsx("button",{type:"button",disabled:!y||!m,onClick:f,children:m?`Upgrade to v${l.latest_version}`:"Up to date"}),i.jsx("button",{type:"button",className:"destructive",disabled:!y,onClick:v,children:"Uninstall"})]}),o&&i.jsx("div",{className:"error",children:o})]})}function S0({module:l,supervisorAvailable:r,installing:c,errorMessage:o,onInstall:f}){const h=r&&!c;return i.jsxs("li",{className:"install-card","data-short":l.short,children:[i.jsxs("div",{className:"install-card-body",children:[i.jsxs("h3",{children:[l.display_name," ",i.jsxs("span",{className:"muted",children:["(",l.short,")"]})]}),l.tagline?i.jsx("p",{className:"tagline",children:l.tagline}):null,i.jsxs("p",{className:"muted install-card-meta",children:[i.jsx("code",{children:l.package}),l.latest_version?i.jsxs(i.Fragment,{children:[" · ","latest ",i.jsxs("code",{children:["v",l.latest_version]})]}):null]})]}),i.jsx("div",{className:"install-card-actions",children:i.jsx("button",{type:"button",disabled:!h,onClick:f,children:c?"Installing…":"Install"})}),o&&i.jsx("div",{className:"error",children:o})]})}function C0(l){if(!l.installed)return{cssState:"absent",label:"not installed"};if(!l.supervisor_status)return{cssState:"absent",label:"not supervised"};const r=v0(l.supervisor_status);return{cssState:r,label:r}}function N0({uis:l}){return i.jsxs("details",{className:"module-uis","data-testid":"module-uis",open:!0,children:[i.jsxs("summary",{children:["Hosted UIs ",i.jsxs("span",{className:"muted",children:["(",l.length,")"]})]}),i.jsx("ul",{className:"ui-sub-units",children:l.map(r=>{const c=y0(r.status);return i.jsxs("li",{className:"ui-sub-unit","data-name":r.name,children:[r.icon_url&&i.jsx("img",{src:r.icon_url,alt:"",className:"ui-icon",width:20,height:20,loading:"lazy"}),i.jsxs("div",{className:"ui-sub-unit-body",children:[i.jsxs("a",{href:r.path,className:"ui-sub-unit-link",children:[i.jsx("strong",{children:r.display_name}),i.jsxs("span",{className:"muted",children:[" · ",r.path]})]}),r.tagline?i.jsx("p",{className:"tagline",children:r.tagline}):null]}),i.jsx("span",{className:`status status-${c}`,"data-state":c,"data-testid":`ui-status-${r.name}`,children:c})]},r.name)})})]})}function w0({channel:l,disabled:r,onChange:c}){return i.jsxs("fieldset",{className:"channel-toggle","data-testid":"channel-toggle",children:[i.jsx("legend",{children:"Install channel"}),i.jsxs("label",{children:[i.jsx("input",{type:"radio",name:"module-install-channel",value:"latest",checked:l==="latest",disabled:r,onChange:()=>c("latest")}),"Stable (",i.jsx("code",{children:"latest"}),")"]}),i.jsxs("label",{children:[i.jsx("input",{type:"radio",name:"module-install-channel",value:"rc",checked:l==="rc",disabled:r,onChange:()=>c("rc")}),"Release candidates (",i.jsx("code",{children:"rc"}),")"]}),i.jsxs("p",{className:"muted",children:["All future module installs and upgrades use this channel. Existing installed modules are unaffected — use ",i.jsx("strong",{children:"Upgrade"})," to pull a newer version."]}),i.jsxs("p",{className:"muted",children:["More hub settings (canonical URL, etc.) at ",i.jsx(nt,{to:"/settings",children:"Settings"}),"."]})]})}function E0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(""),[f,h]=b.useState(""),[v,y]=b.useState(0),[m,g]=b.useState({kind:"idle"});b.useEffect(()=>{let k=!1;return r({kind:"loading"}),Iy(f?{vault:f}:{}).then(z=>{k||r({kind:"ok",grants:z})}).catch(z=>{if(k)return;const q=z instanceof Error?z.message:String(z);r({kind:"error",message:q})}),()=>{k=!0}},[v,f]);function j(k){k.preventDefault(),h(c.trim())}function x(){o(""),h("")}async function _(k){g({kind:"revoking",clientId:k.client_id});try{await Py(k.client_id),g({kind:"idle"}),y(E=>E+1)}catch(E){const z=E instanceof Z?`revoke failed (${E.status}): ${E.message}`:E instanceof Error?E.message:String(E);g({kind:"error",clientId:k.client_id,message:z})}}return i.jsxs("div",{"data-route-content":"true",children:[i.jsx("div",{className:"list-header",children:i.jsx("h1",{children:"Permissions"})}),i.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 ",i.jsx("em",{children:"not"})," invalidate tokens already issued."]}),i.jsxs("form",{onSubmit:j,style:{marginTop:"1rem",marginBottom:"1rem"},children:[i.jsx("label",{htmlFor:"vault-filter",className:"muted",style:{marginRight:"0.5rem"},children:"Filter by vault:"}),i.jsx("input",{id:"vault-filter",type:"text",value:c,onChange:k=>o(k.target.value),placeholder:"e.g. work",style:{marginRight:"0.5rem"}}),i.jsx("button",{type:"submit",children:"Apply"}),f?i.jsx("button",{type:"button",onClick:x,className:"secondary",style:{marginLeft:"0.5rem"},children:"Clear"}):null]}),T0({state:l,revoke:m,setRevoke:g,onConfirm:_,onRetry:()=>y(k=>k+1)})]})}function T0({state:l,revoke:r,setRevoke:c,onConfirm:o,onRetry:f}){return l.kind==="loading"?i.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"}):l.kind==="error"?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"error-banner",children:["Couldn't load grants: ",i.jsx("code",{children:l.message})]}),i.jsx("button",{type:"button",onClick:f,className:"secondary",children:"Retry"})]}):l.grants.length===0?i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"No grants."}),i.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."})]}):i.jsx("div",{style:{marginTop:"1rem"},children:l.grants.map(h=>{const v=r.kind==="revoking"&&r.clientId===h.client_id,y=r.kind==="error"&&r.clientId===h.client_id?r:null,m=r.kind==="confirming"&&r.grant.client_id===h.client_id;return i.jsxs("div",{className:"vault-row",children:[i.jsxs("div",{className:"body",children:[i.jsx("div",{className:"name",children:i.jsx("code",{children:h.client_name??h.client_id})}),i.jsxs("div",{className:"dim",children:[i.jsx("span",{className:"muted",children:"granted "}),i.jsx("code",{title:h.granted_at,children:k0(h.granted_at)})]}),i.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[i.jsx("span",{className:"muted",children:"scopes: "}),h.scopes.map((g,j)=>i.jsxs("span",{children:[i.jsx("code",{children:g}),j<h.scopes.length-1?" ":null]},g))]}),y?i.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:i.jsx("code",{children:y.message})}):null,m?i.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:[i.jsxs("p",{children:["Revoke ",i.jsx("code",{children:h.client_name??h.client_id}),"? Next OAuth flow for this app will prompt you to consent again."]}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[i.jsx("button",{type:"button",onClick:()=>{o(h)},disabled:v,children:v?"Revoking…":"Revoke"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"idle"}),disabled:v,children:"Cancel"})]})]}):null]}),m?null:i.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 k0(l){const r=new Date(l);return Number.isNaN(r.getTime())?l:r.toLocaleString()}function _0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(""),[f,h]=b.useState(!1),[v,y]=b.useState(null),m=b.useCallback(async()=>{try{const E=await Sm();r({kind:"ok",setting:E}),o(E.hub_origin??""),y(null)}catch(E){const z=E instanceof Error?E.message:String(E);r({kind:"error",message:z})}},[]);b.useEffect(()=>{m()},[m]);async function g(E){if(E.preventDefault(),f||l.kind!=="ok")return;const z=c.trim(),q=z.length===0?null:z;h(!0),y(null);try{await Xh(q),await m()}catch(H){const Q=H instanceof Error?H.message:String(H);y(Q)}finally{h(!1)}}async function j(){if(!f&&l.kind==="ok"){h(!0),y(null);try{await Xh(null),await m()}catch(E){const z=E instanceof Error?E.message:String(E);y(z)}finally{h(!1)}}}if(l.kind==="loading")return i.jsx("div",{className:"empty",children:"Loading settings…"});if(l.kind==="error")return i.jsxs("div",{className:"empty",children:["Failed to load settings: ",l.message,"."," ",i.jsx("button",{type:"button",onClick:()=>void m(),children:"Retry"})]});const{setting:x}=l,_=x.hub_origin!==null,k=c.trim()!==(x.hub_origin??"");return i.jsxs("section",{className:"settings",children:[i.jsx("h1",{children:"Hub settings"}),i.jsx("p",{className:"muted",children:"Hub-wide operator controls. Settings here apply to every module + every minted token."}),i.jsxs("section",{className:"settings-block","aria-labelledby":"canonical-hub-url-heading",children:[i.jsx("h2",{id:"canonical-hub-url-heading",children:"Canonical hub URL"}),i.jsxs("dl",{className:"meta","data-testid":"hub-origin-current",children:[i.jsx("dt",{children:"Current value"}),i.jsxs("dd",{children:[i.jsx("code",{children:x.resolved_issuer})," ",i.jsx(R0,{source:x.source,hasStored:_})]})]}),i.jsxs("form",{onSubmit:E=>void g(E),className:"settings-form","data-testid":"hub-origin-form",children:[i.jsxs("label",{htmlFor:"hub-origin-input",children:[i.jsx("span",{children:"Canonical URL"}),i.jsx("input",{id:"hub-origin-input",type:"url",inputMode:"url",placeholder:"https://hub.example.com",value:c,disabled:f,onChange:E=>o(E.target.value),autoComplete:"off",spellCheck:!1})]}),i.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 ",i.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)."]}),i.jsxs("div",{className:"actions",children:[i.jsx("button",{type:"submit",disabled:f||!k,children:f?"Saving…":"Save"}),i.jsx("button",{type:"button",className:"destructive",disabled:f||!_,onClick:()=>void j(),children:"Reset to default"})]}),v&&i.jsx("div",{className:"error","data-testid":"hub-origin-save-error",children:v})]})]}),i.jsx(A0,{})]})}function A0(){const[l,r]=b.useState(null),[c,o]=b.useState(null),[f,h]=b.useState(null),[v,y]=b.useState(""),[m,g]=b.useState(""),[j,x]=b.useState(""),[_,k]=b.useState("15"),[E,z]=b.useState(!1),[q,H]=b.useState(null),[Q,V]=b.useState(null),P=b.useCallback(async()=>{try{const[te,le]=await Promise.all([Sc(),xm()]);r(te),o(le.hasSession?le.csrf:null),k(String(Math.round(te.idle_seconds/60))),h(null)}catch(te){h(te instanceof Error?te.message:String(te))}},[]);b.useEffect(()=>{P()},[P]);function J(){const te=Number.parseInt(_,10);if(Number.isFinite(te))return Math.max(1,te)*60}async function $(te){if(te.preventDefault(),!(E||!c)){if(H(null),V(null),!/^[0-9]{4,12}$/.test(v)){H("PIN must be 4–12 digits.");return}if(v!==m){H("PINs don't match.");return}z(!0);try{await N1(c,v,J()),y(""),g(""),V("Screen lock enabled."),await P()}catch(le){H(le instanceof Error?le.message:String(le))}finally{z(!1)}}}async function w(te){if(te.preventDefault(),!(E||!c)){if(H(null),V(null),!/^[0-9]{4,12}$/.test(v)){H("New PIN must be 4–12 digits.");return}if(v!==m){H("PINs don't match.");return}z(!0);try{await w1(c,v,j||void 0,J()),y(""),g(""),x(""),V("PIN updated."),await P()}catch(le){H(le instanceof Error?le.message:String(le))}finally{z(!1)}}}async function U(){if(!(E||!c)){H(null),V(null),z(!0);try{await E1(c,j||void 0),x(""),V("Screen lock disabled."),await P()}catch(te){H(te instanceof Error?te.message:String(te))}finally{z(!1)}}}const X=(l==null?void 0:l.configured)??!1;return i.jsxs("section",{className:"settings-block","aria-labelledby":"admin-lock-heading","data-testid":"admin-lock-settings",children:[i.jsx("h2",{id:"admin-lock-heading",children:"Admin screen lock"}),i.jsxs("p",{className:"muted",children:["An optional PIN that locks the whole admin console after a period of inactivity — a phone-style lock for a remotely-exposed hub. Off by default; the OAuth flow for your connected apps is never affected. ",i.jsx("strong",{children:"Note:"})," this guards the exposed web portal only — anyone with shell access to the box bypasses it (that's an OS / disk-encryption concern)."]}),f?i.jsxs("div",{className:"error","data-testid":"admin-lock-load-error",children:["Failed to load lock status: ",f,"."," ",i.jsx("button",{type:"button",onClick:()=>void P(),children:"Retry"})]}):i.jsxs(i.Fragment,{children:[i.jsxs("p",{children:["Status:"," ",i.jsx("span",{className:`lock-status-pill ${X?"lock-status-on":"lock-status-off"}`,"data-testid":"admin-lock-status-pill",children:X?"Enabled":"Off"})]}),X?i.jsxs("form",{onSubmit:te=>void w(te),className:"lock-settings-form",children:[i.jsxs("label",{children:["Current PIN",i.jsx("input",{type:"password",inputMode:"numeric",autoComplete:"off",value:j,disabled:E,onChange:te=>x(te.target.value.replace(/[^0-9]/g,"")),"data-testid":"admin-lock-current-pin"})]}),i.jsxs("label",{children:["New PIN (4–12 digits)",i.jsx("input",{type:"password",inputMode:"numeric",autoComplete:"off",value:v,disabled:E,onChange:te=>y(te.target.value.replace(/[^0-9]/g,"")),"data-testid":"admin-lock-new-pin"})]}),i.jsxs("label",{children:["Confirm new PIN",i.jsx("input",{type:"password",inputMode:"numeric",autoComplete:"off",value:m,disabled:E,onChange:te=>g(te.target.value.replace(/[^0-9]/g,"")),"data-testid":"admin-lock-new-pin2"})]}),i.jsxs("label",{children:["Lock after (minutes idle)",i.jsx("input",{type:"number",min:1,max:1440,value:_,disabled:E,onChange:te=>k(te.target.value),"data-testid":"admin-lock-idle"})]}),i.jsxs("div",{className:"actions",children:[i.jsx("button",{type:"submit",disabled:E,"data-testid":"admin-lock-change",children:E?"Saving…":"Update PIN"}),i.jsx("button",{type:"button",className:"destructive",disabled:E,onClick:()=>void U(),"data-testid":"admin-lock-remove",children:"Remove lock"})]})]}):i.jsxs("form",{onSubmit:te=>void $(te),className:"lock-settings-form",children:[i.jsxs("label",{children:["PIN (4–12 digits)",i.jsx("input",{type:"password",inputMode:"numeric",autoComplete:"off",value:v,disabled:E,onChange:te=>y(te.target.value.replace(/[^0-9]/g,"")),"data-testid":"admin-lock-set-pin"})]}),i.jsxs("label",{children:["Confirm PIN",i.jsx("input",{type:"password",inputMode:"numeric",autoComplete:"off",value:m,disabled:E,onChange:te=>g(te.target.value.replace(/[^0-9]/g,"")),"data-testid":"admin-lock-set-pin2"})]}),i.jsxs("label",{children:["Lock after (minutes idle)",i.jsx("input",{type:"number",min:1,max:1440,value:_,disabled:E,onChange:te=>k(te.target.value),"data-testid":"admin-lock-idle"})]}),i.jsx("div",{className:"actions",children:i.jsx("button",{type:"submit",disabled:E,"data-testid":"admin-lock-enable",children:E?"Saving…":"Enable screen lock"})})]}),q&&i.jsx("div",{className:"error","data-testid":"admin-lock-form-error",children:q}),Q&&i.jsx("p",{className:"muted","data-testid":"admin-lock-notice",children:Q})]})]})}function R0({source:l,hasStored:r}){return l==="settings"?i.jsx("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:"from settings"}):l==="env"?i.jsxs("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:["from env var ",i.jsx("code",{children:"PARACHUTE_HUB_ORIGIN"})]}):l==="expose"?i.jsxs("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:["from your ",i.jsx("code",{children:"parachute expose"})," config"]}):i.jsx("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:"from request origin"})}const nc={scope:"",audience:"",expiresIn:"",subject:"",permissions:""};function M0(){const[l,r]=vm(),c=U0(l.get("status")),o=D0(l.get("source")),[f,h]=b.useState({kind:"loading"}),[v,y]=b.useState(0),[m,g]=b.useState({kind:"idle"}),[j,x]=b.useState(nc),[_,k]=b.useState({kind:"idle"}),[E,z]=b.useState(!1),[q,H]=b.useState(!1);function Q(w,U){r(X=>{const te=new URLSearchParams(X);return U==="all"?te.delete(w):te.set(w,U),te},{replace:!0})}b.useEffect(()=>{let w=!1;return h({kind:"loading"}),Vh(Kh(c,o)).then(U=>{w||h({kind:"ok",tokens:U.tokens,nextCursor:U.next_cursor})}).catch(U=>{if(w)return;const X=U instanceof Error?U.message:String(U);h({kind:"error",message:X})}),()=>{w=!0}},[v,c,o]);async function V(){if(f.kind!=="ok"||!f.nextCursor||q)return;const w={...Kh(c,o),cursor:f.nextCursor};H(!0);try{const U=await Vh(w);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{H(!1)}}async function P(w){w.preventDefault();const U=j.scope.trim();if(U.length===0){g({kind:"error",message:"scope is required"});return}let X;if(j.permissions.trim().length>0)try{const le=JSON.parse(j.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 ie=le instanceof Error?le.message:String(le);g({kind:"error",message:`permissions is not valid JSON — ${ie}`});return}let te;if(j.expiresIn.trim().length>0){const le=Number(j.expiresIn);if(!Number.isInteger(le)||le<=0){g({kind:"error",message:"expires_in must be a positive integer (seconds)"});return}te=le}g({kind:"submitting"});try{const le=await jm({scope:U,...j.audience.trim()?{audience:j.audience.trim()}:{},...te!==void 0?{expires_in:te}:{},...j.subject.trim()?{subject:j.subject.trim()}:{},...X?{permissions:X}:{}});g({kind:"minted",token:le}),x(nc),z(!1),y(ie=>ie+1)}catch(le){const ie=le instanceof Z?`mint failed (${le.status}): ${le.message}`:le instanceof Error?le.message:String(le);g({kind:"error",message:ie})}}async function J(w){k({kind:"revoking",jti:w});try{await a1(w),k({kind:"idle"}),y(U=>U+1)}catch(U){const X=U instanceof Z?`revoke failed (${U.status}): ${U.message}`:U instanceof Error?U.message:String(U);k({kind:"error",jti:w,message:X})}}function $(w){typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(w)}return i.jsxs("div",{children:[i.jsxs("div",{className:"list-header",children:[i.jsx("h1",{children:"Tokens"}),i.jsx("button",{type:"button",onClick:()=>z(w=>!w),children:E?"Hide form":"Mint new token"})]}),i.jsxs("p",{className:"muted",children:["The hub's token registry. Every CLI / OAuth / operator-mint writes a row here. Revoking flips ",i.jsx("code",{children:"revoked_at"}),"; resource servers on"," ",i.jsx("code",{children:"@openparachute/scope-guard@^0.2.0"})," reject within ~60s of the next poll."]}),m.kind==="minted"?i.jsxs("div",{className:"mint-banner",children:[i.jsx("h3",{children:"Minted"}),i.jsxs("p",{children:["Your new access token (jti: ",i.jsx("code",{children:m.token.jti}),"):"]}),i.jsx("div",{className:"token-box",children:i.jsx("code",{children:m.token.token})}),i.jsx("p",{className:"warn",children:"This is the only time the JWT is shown. Copy it now — there is no DB-side recovery."}),i.jsxs("div",{className:"actions",children:[i.jsx("button",{type:"button",onClick:()=>$(m.token.token),children:"Copy"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>g({kind:"idle"}),children:"Dismiss"})]})]}):null,E?i.jsx("div",{className:"section",children:i.jsxs("form",{onSubmit:P,children:[i.jsxs("div",{className:"row",children:[i.jsx("label",{htmlFor:"mint-scope",children:"Scope (space-separated)"}),i.jsx("input",{id:"mint-scope",type:"text",value:j.scope,onChange:w=>x({...j,scope:w.target.value}),placeholder:"e.g. scribe:transcribe vault:default:read",required:!0}),i.jsxs("div",{className:"field-hint",children:["Space-separated ",i.jsx("code",{children:"resource:verb"})," or ",i.jsx("code",{children:"resource:name:verb"})," ","tuples. The hub rejects non-requestable scopes (admin, host:*) per the privilege-diffusion guard."]})]}),i.jsxs("div",{className:"row",children:[i.jsx("label",{htmlFor:"mint-audience",children:"Audience (optional)"}),i.jsx("input",{id:"mint-audience",type:"text",value:j.audience,onChange:w=>x({...j,audience:w.target.value}),placeholder:"inferred from scope when blank"}),i.jsxs("div",{className:"field-hint",children:["Inferred from scope if omitted. ",i.jsx("code",{children:"vault:<name>:<verb>"})," →"," ",i.jsx("code",{children:"vault.<name>"}),"; otherwise the first colon-prefixed scope's namespace; fallback ",i.jsx("code",{children:"hub"}),"."]})]}),i.jsxs("div",{className:"row",children:[i.jsx("label",{htmlFor:"mint-expires-in",children:"Expires in (seconds, optional)"}),i.jsx("input",{id:"mint-expires-in",type:"text",inputMode:"numeric",value:j.expiresIn,onChange:w=>x({...j,expiresIn:w.target.value}),placeholder:"default 90d (7776000)"})]}),i.jsxs("div",{className:"row",children:[i.jsx("label",{htmlFor:"mint-subject",children:"Subject (optional)"}),i.jsx("input",{id:"mint-subject",type:"text",value:j.subject,onChange:w=>x({...j,subject:w.target.value}),placeholder:"defaults to operator's sub"})]}),i.jsxs("div",{className:"row",children:[i.jsx("label",{htmlFor:"mint-permissions",children:"Permissions (JSON object, optional)"}),i.jsx("textarea",{id:"mint-permissions",value:j.permissions,onChange:w=>x({...j,permissions:w.target.value}),placeholder:'e.g. {"vault":{"default":{"write_tags":["health"]}}}',rows:3,style:{width:"100%",fontFamily:"monospace",fontSize:"0.9rem"}})]}),m.kind==="error"?i.jsx("div",{className:"field-error",children:i.jsx("code",{children:m.message})}):null,i.jsxs("div",{className:"actions",children:[i.jsx("button",{type:"submit",disabled:m.kind==="submitting",children:m.kind==="submitting"?"Minting…":"Mint"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>{z(!1),x(nc),g({kind:"idle"})},children:"Cancel"})]})]})}):null,i.jsxs("div",{style:{marginTop:"1rem",marginBottom:"0.5rem",display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[i.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(w=>i.jsx("button",{type:"button",onClick:()=>Q("status",w.value),className:c===w.value?void 0:"secondary","aria-pressed":c===w.value,children:w.label},w.value))]}),i.jsxs("div",{style:{marginBottom:"1rem",display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[i.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(w=>i.jsx("button",{type:"button",onClick:()=>Q("source",w.value),className:o===w.value?void 0:"secondary","aria-pressed":o===w.value,children:w.label},w.value))]}),z0({list:f,revoke:_,setRevoke:k,onConfirm:J,onLoadMore:V,onRetry:()=>y(w=>w+1),loadingMore:q,filtersActive:c!=="all"||o!=="all"})]})}function z0({list:l,revoke:r,setRevoke:c,onConfirm:o,onLoadMore:f,onRetry:h,loadingMore:v,filtersActive:y}){return l.kind==="loading"?i.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"}):l.kind==="error"?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"error-banner",children:["Couldn't load tokens: ",i.jsx("code",{children:l.message})]}),i.jsx("button",{type:"button",onClick:h,className:"secondary",children:"Retry"})]}):l.tokens.length===0?y?i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"No tokens match the current filter."}),i.jsx("p",{className:"muted",children:'Try widening the Status or Source pills above. The default "Show all / All sources" view shows every registry row.'})]}):i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"No tokens."}),i.jsxs("p",{className:"muted",children:["Every CLI mint, OAuth grant, and operator-token rotation lands here. Mint one with the form above, or via ",i.jsx("code",{children:"parachute auth mint-token"}),"."]})]}):i.jsxs("div",{"data-route-content":"true",children:[l.tokens.map(m=>{const g=O0(m),j=r.kind==="revoking"&&r.jti===m.jti,x=r.kind==="confirming"&&r.jti===m.jti,_=r.kind==="error"&&r.jti===m.jti?r:null,k=m.user_id??m.subject??"(unknown)";return i.jsxs("div",{className:"vault-row",children:[i.jsxs("div",{className:"body",children:[i.jsxs("div",{className:"name",children:[i.jsx("code",{title:m.jti,children:ms(m.jti)}),i.jsx("span",{className:`tag${g==="live"?"":" muted"}`,children:g}),i.jsx("span",{className:`tag source-${L0(m.created_via)}`,title:`created_via: ${m.created_via}`,children:H0(m.created_via)})]}),i.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[i.jsx("span",{className:"muted",children:"identity: "}),i.jsx("code",{children:k}),m.client_id?i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"muted",children:" · client: "}),i.jsx("code",{children:m.client_id})]}):null]}),i.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[i.jsx("span",{className:"muted",children:"scope: "}),m.scopes.map((E,z)=>i.jsxs("span",{children:[i.jsx("code",{children:E}),z<m.scopes.length-1?" ":null]},E))]}),i.jsxs("div",{className:"dim",style:{marginTop:"0.25rem",fontSize:"0.82rem"},children:[i.jsx("span",{className:"muted",children:"created "}),i.jsx("code",{title:m.created_at,children:lc(m.created_at)}),i.jsx("span",{className:"muted",children:" · expires "}),i.jsx("code",{title:m.expires_at,children:lc(m.expires_at)}),m.revoked_at?i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"muted",children:" · revoked "}),i.jsx("code",{title:m.revoked_at,children:lc(m.revoked_at)})]}):null]}),m.permissions?i.jsxs("details",{style:{marginTop:"0.35rem"},children:[i.jsx("summary",{className:"muted",style:{cursor:"pointer",fontSize:"0.85rem"},children:"permissions"}),i.jsx("pre",{style:{fontSize:"0.82rem",marginTop:"0.25rem"},children:JSON.stringify(m.permissions,null,2)})]}):null,_?i.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:i.jsx("code",{children:_.message})}):null,x?i.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.5rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm revoke ${ms(m.jti)}`,children:[i.jsxs("p",{children:["Revoke ",i.jsx("code",{children:ms(m.jti)}),"? Resource servers reject within ~60s of the next revocation-list poll. This cannot be undone."]}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[i.jsx("button",{type:"button",onClick:()=>{o(m.jti)},disabled:j,children:j?"Revoking…":"Revoke"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"idle"}),disabled:j,children:"Cancel"})]})]}):null]}),!x&&g==="live"?i.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"confirming",jti:m.jti}),"aria-label":`Revoke ${ms(m.jti)}`,children:"Revoke"}):null]},m.jti)}),l.nextCursor?i.jsx("div",{style:{marginTop:"1rem"},children:i.jsx("button",{type:"button",className:"secondary",disabled:v,onClick:()=>{f()},children:v?"Loading…":"Load more"})}):null]})}function O0(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 U0(l){return l==="live"||l==="revoked"||l==="all"?l:"all"}function D0(l){return l==="oauth_refresh"||l==="operator_mint"||l==="cli_mint"||l==="all"?l:"all"}function Kh(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 H0(l){switch(l){case"oauth_refresh":return"OAuth";case"operator_mint":return"Operator";case"cli_mint":return"CLI";default:return l}}function L0(l){switch(l){case"oauth_refresh":return"oauth";case"operator_mint":return"operator";case"cli_mint":return"cli";default:return"unknown"}}function ms(l){return l.length<=14?l:`${l.slice(0,8)}…${l.slice(-4)}`}function lc(l){const r=new Date(l);return Number.isNaN(r.getTime())?l:r.toLocaleString()}const B0=1440*60;function q0(l){return l.provision_vault?"owner (new vault)":l.vault_name===null?"account only":l.role==="read"?"read-only (shared)":"read & write (shared)"}function Fh(l){const r=l.username!==null?`an account for "${l.username}"`:"an account (they pick the username)";if(l.provision_vault){const o=l.vault_name!==null?`their own new vault "${l.vault_name}"`:"their own new vault (they name it)";return`Creates ${r} + ${o}, as owner.`}if(l.vault_name===null)return`Creates ${r} with no vault access yet.`;const c=l.role==="read"?"read-only":"read & write";return`Creates ${r} with ${c} access to your existing vault "${l.vault_name}".`}function Y0(l,r,c){const o=l.username!==null?` Your username will be "${l.username}".`:"",f=l.provision_vault?l.vault_name!==null?` You'll get your own new vault ("${l.vault_name}").`:" You'll get your own new vault.":l.vault_name!==null?` You'll get ${l.role==="read"?"read-only":"read & write"} access to the vault "${l.vault_name}".`:"",h=new Date(c).toLocaleDateString();return`You're invited to my Parachute. Open this link to set your password and claim your account.${o}${f} The link works once and expires ${h}: ${r}`}function G0({hubOrigin:l}){const[r,c]=b.useState({kind:"loading"}),[o,f]=b.useState(0),[h,v]=b.useState(""),[y,m]=b.useState("provision"),[g,j]=b.useState(""),[x,_]=b.useState(""),[k,E]=b.useState("read"),[z,q]=b.useState([]),[H,Q]=b.useState("7"),[V,P]=b.useState({kind:"idle"}),[J,$]=b.useState(null),[w,U]=b.useState(null),X={username:h.trim()!==""?h.trim():null,vault_name:y==="share"?x!==""?x:null:g.trim()!==""?g.trim():null,role:y==="share"?k:"write",provision_vault:y==="provision"};b.useEffect(()=>{let W=!1;return c({kind:"loading"}),Promise.all([g1(),Cm()]).then(([ge,be])=>{W||(c({kind:"ok",invites:ge}),q(be))}).catch(ge=>{W||c({kind:"error",message:ge instanceof Error?ge.message:String(ge)})}),()=>{W=!0}},[o]);async function te(W){if(W.preventDefault(),V.kind==="submitting")return;if(y==="share"&&x===""){P({kind:"error",message:"Pick which existing vault to share before creating the invite."});return}P({kind:"submitting"}),$(null);const ge=Number.parseInt(H,10),be={...h.trim()!==""?{username:h.trim()}:{},...Number.isFinite(ge)&&ge>0?{expires_in:ge*B0}:{},...y==="share"?{vault_name:x,provision_vault:!1,role:k}:{...g.trim()!==""?{vault_name:g.trim()}:{},provision_vault:!0}};try{const D=await v1(be);P({kind:"created",result:D}),v(""),j(""),_(""),f(K=>K+1)}catch(D){P({kind:"error",message:D instanceof Error?D.message:String(D)})}}async function le(W){if(!w){U(W);try{await y1(W),f(ge=>ge+1)}catch(ge){c({kind:"error",message:ge instanceof Error?ge.message:String(ge)})}finally{U(null)}}}function ie(W,ge){var be;(be=navigator.clipboard)==null||be.writeText(W).then(()=>{$(ge),setTimeout(()=>$(null),2e3)})}return i.jsxs("section",{style:{marginTop:"2rem"},"data-testid":"invites-section",children:[i.jsx("div",{className:"list-header",children:i.jsx("h2",{children:"Invite links"})}),i.jsx("p",{className:"muted",children:"Generate a one-time, expiring link. The recipient opens it and picks their password — no admin-typed default password. Either provision them a new vault of their own, or share an existing vault read-only or read & write. Pre-naming the username makes the link a named deliverable (the recipient can't change it)."}),i.jsxs("form",{onSubmit:W=>void te(W),style:{marginBottom:"1rem"},children:[i.jsxs("div",{style:{display:"flex",gap:"0.75rem",flexWrap:"wrap",alignItems:"flex-end"},children:[i.jsxs("label",{className:"field",style:{flex:"1 1 10rem"},children:[i.jsx("span",{className:"field-label",children:"Username (optional)"}),i.jsx("input",{type:"text",value:h,onChange:W=>v(W.target.value),placeholder:"leave blank → they choose",pattern:"[a-z0-9_-]*",minLength:2,maxLength:32,autoComplete:"off",spellCheck:!1})]}),i.jsxs("label",{className:"field",style:{flex:"0 0 14rem"},children:[i.jsx("span",{className:"field-label",children:"Vault access"}),i.jsxs("select",{value:y,onChange:W=>m(W.target.value==="share"?"share":"provision"),children:[i.jsx("option",{value:"provision",children:"Create a new vault for them"}),i.jsx("option",{value:"share",children:"Share an existing vault"})]})]}),y==="provision"?i.jsxs("label",{className:"field",style:{flex:"1 1 12rem"},children:[i.jsx("span",{className:"field-label",children:"New vault name (optional)"}),i.jsx("input",{type:"text",value:g,onChange:W=>j(W.target.value),placeholder:"leave blank → they choose",pattern:"[a-z0-9_-]*",autoComplete:"off",spellCheck:!1})]}):i.jsxs(i.Fragment,{children:[i.jsxs("label",{className:"field",style:{flex:"1 1 10rem"},children:[i.jsx("span",{className:"field-label",children:"Vault"}),i.jsxs("select",{value:x,onChange:W=>_(W.target.value),required:!0,children:[i.jsx("option",{value:"",children:"Pick a vault…"}),z.map(W=>i.jsx("option",{value:W,children:W},W))]})]}),i.jsxs("label",{className:"field",style:{flex:"0 0 9rem"},children:[i.jsx("span",{className:"field-label",children:"Role"}),i.jsxs("select",{value:k,onChange:W=>E(W.target.value==="write"?"write":"read"),children:[i.jsx("option",{value:"read",children:"Read-only"}),i.jsx("option",{value:"write",children:"Read & write"})]})]})]}),i.jsxs("label",{className:"field",style:{flex:"0 0 8rem"},children:[i.jsx("span",{className:"field-label",children:"Expires (days)"}),i.jsx("input",{type:"number",min:1,max:90,value:H,onChange:W=>Q(W.target.value)})]}),i.jsx("button",{type:"submit",disabled:V.kind==="submitting",children:V.kind==="submitting"?"Creating…":"Create invite"})]}),i.jsx("p",{className:"muted",style:{marginTop:"0.5rem"},"data-testid":"invite-preview",children:y==="share"&&x===""?"Pick the existing vault to share to finish configuring this link.":Fh(X)})]}),V.kind==="error"&&i.jsx("div",{className:"error-banner",style:{marginBottom:"1rem"},children:V.message}),V.kind==="created"&&i.jsxs("output",{className:"success-banner",style:{display:"block",marginBottom:"1rem"},children:[i.jsx("strong",{children:"Invite created."})," ",Fh(V.result.invite),i.jsx("br",{}),`Copy it now — the link is shown only once and can't be retrieved later (the hub stores only a hash). "Copy message" includes a ready-to-send note telling the recipient what the link does.`,i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem",alignItems:"center",flexWrap:"wrap"},children:[i.jsx("code",{style:{wordBreak:"break-all",flex:"1 1 16rem"},children:V.result.url}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>ie(V.result.url,"link"),children:J==="link"?"Copied!":"Copy link"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>ie(Y0(V.result.invite,V.result.url,V.result.invite.expires_at),"message"),children:J==="message"?"Copied!":"Copy message"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>P({kind:"idle"}),children:"Dismiss"})]})]}),r.kind==="loading"&&i.jsx("p",{className:"muted",children:"Loading invites…"}),r.kind==="error"&&i.jsxs("div",{className:"error-banner",children:[r.message,i.jsx("div",{style:{marginTop:"0.5rem"},children:i.jsx("button",{type:"button",className:"secondary",onClick:()=>f(W=>W+1),children:"Retry"})})]}),r.kind==="ok"&&r.invites.length===0&&i.jsx("p",{className:"muted",children:"No invites yet."}),r.kind==="ok"&&r.invites.length>0&&i.jsx("div",{className:"table-scroll",children:i.jsxs("table",{className:"user-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"For"}),i.jsx("th",{children:"Vault"}),i.jsx("th",{children:"Access"}),i.jsx("th",{children:"Status"}),i.jsx("th",{children:"Expires"}),i.jsx("th",{children:"Created"}),i.jsx("th",{})]})}),i.jsx("tbody",{children:r.invites.map(W=>i.jsxs("tr",{children:[i.jsx("td",{children:W.username??i.jsx("span",{className:"muted",children:"they choose"})}),i.jsx("td",{children:W.vault_name??i.jsx("span",{className:"muted",children:"redeemer chooses"})}),i.jsx("td",{children:q0(W)}),i.jsx("td",{children:i.jsx("span",{className:`status status-${W.status}`,children:W.status})}),i.jsx("td",{className:"muted",children:new Date(W.expires_at).toLocaleDateString()}),i.jsx("td",{className:"muted",children:new Date(W.created_at).toLocaleDateString()}),i.jsx("td",{children:W.status==="pending"?i.jsx("button",{type:"button",className:"secondary",disabled:w===W.id,onClick:()=>void le(W.id),children:w===W.id?"Revoking…":"Revoke"}):null})]},W.id))})]})}),l?i.jsxs("p",{className:"muted",style:{marginTop:"0.5rem",fontSize:"0.85em"},children:["Redemption links are served from ",i.jsxs("code",{children:[l,"/account/setup/<token>"]}),"."]}):null]})}const La=12,Z0=/^[a-z0-9_-]+$/,bs=2,xs=32,Wh={username:"",password:"",assignedVaults:[]};function Tm({username:l,hubOrigin:r}){const c=`${r||""}/login`;return i.jsxs("div",{className:"muted",style:{marginTop:"0.5rem",fontSize:"0.9em"},children:["Send them to ",i.jsx("code",{children:c})," with username ",i.jsx("code",{children:l})," and this password — they'll be prompted to set a new one on first sign-in."]})}function V0(){const[l,r]=b.useState({kind:"loading"}),[c,o]=b.useState(0),[f,h]=b.useState(!1),[v,y]=b.useState(Wh),[m,g]=b.useState({kind:"idle"}),[j,x]=b.useState({kind:"idle"}),[_,k]=b.useState({kind:"idle"}),[E,z]=b.useState({kind:"idle"});b.useEffect(()=>{let J=!1;return r({kind:"loading"}),Promise.all([d1(),Cm(),Sm()]).then(([$,w,U])=>{if(J)return;const X=U.resolved_issuer.replace(/\/+$/,"");r({kind:"ok",data:{users:$,vaults:w,hubOrigin:X}})}).catch($=>{if(J)return;const w=$ instanceof Error?$.message:String($);r({kind:"error",message:w})}),()=>{J=!0}},[c]);function q(J){return J.username.length<bs||J.username.length>xs?`Username must be ${bs}-${xs} characters.`:Z0.test(J.username)?J.password.length<La?`Password must be at least ${La} characters.`:null:"Username may only contain lowercase letters, digits, hyphens, and underscores."}async function H(J){J.preventDefault();const $=q(v);if($){g({kind:"error",message:$});return}g({kind:"submitting"});const w={username:v.username,password:v.password,assignedVaults:v.assignedVaults};try{const U=await f1(w);y(Wh),g({kind:"created",username:U.username}),o(X=>X+1)}catch(U){const X=U instanceof Z?`Create failed (${U.status}): ${U.message}`:U instanceof Error?U.message:String(U);g({kind:"error",message:X})}}async function Q(J){x({kind:"deleting",userId:J.id});try{const{revocationLagSeconds:$}=await h1(J.id);x({kind:"done",username:J.username,revocationLagSeconds:$}),o(w=>w+1)}catch($){const w=$ instanceof Z?`Delete failed (${$.status}): ${$.message}`:$ instanceof Error?$.message:String($);x({kind:"error",userId:J.id,message:w})}}async function V(J,$){z({kind:"submitting",userId:J.id,selected:$});try{await p1(J.id,$),z({kind:"done",userId:J.id,username:J.username}),o(w=>w+1)}catch(w){const U=w instanceof Z?`Edit vaults failed (${w.status}): ${w.message}`:w instanceof Error?w.message:String(w);z({kind:"error",userId:J.id,selected:$,message:U})}}async function P(J,$){if($.length<La){k({kind:"error",userId:J.id,password:$,message:`Password must be at least ${La} characters.`});return}k({kind:"submitting",userId:J.id,password:$});try{const{revocationLagSeconds:w}=await m1(J.id,$);k({kind:"done",userId:J.id,username:J.username,revocationLagSeconds:w}),o(U=>U+1)}catch(w){const U=w instanceof Z?`Reset failed (${w.status}): ${w.message}`:w instanceof Error?w.message:String(w);k({kind:"error",userId:J.id,password:$,message:U})}}return i.jsxs("div",{"data-route-content":"true",children:[i.jsx("div",{className:"list-header",children:i.jsx("h1",{children:"Users"})}),i.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 ",i.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"?i.jsxs(i.Fragment,{children:[" ","at ",i.jsxs("code",{children:[l.data.hubOrigin,"/login"]})]}):null,"."]}),j.kind==="done"&&i.jsxs("output",{className:"success-banner",style:{display:"block",marginBottom:"0.75rem"},"data-testid":"delete-done-banner",children:["Deleted ",i.jsx("code",{children:j.username}),". Their tokens are revoked. Resource servers (vault, scribe, etc.) cache the revocation list for up to ",j.revocationLagSeconds," ","seconds — if you're deleting because of a suspected compromise, also restart the affected services (e.g. ",i.jsx("code",{children:"parachute restart vault"}),") to flush their cache immediately.",i.jsx("div",{style:{marginTop:"0.5rem"},children:i.jsx("button",{type:"button",className:"secondary",onClick:()=>x({kind:"idle"}),children:"Dismiss"})})]}),X0(l,j,x,Q,_,k,P,E,z,V,l.kind==="ok"?l.data.vaults:[],l.kind==="ok"?l.data.hubOrigin:"",()=>o(J=>J+1)),l.kind==="ok"&&i.jsx(K0,{show:f,setShow:h,form:v,setForm:y,vaults:l.data.vaults,hubOrigin:l.data.hubOrigin,createState:m,setCreateState:g,onSubmit:H}),l.kind==="ok"&&i.jsx(G0,{hubOrigin:l.data.hubOrigin})]})}function X0(l,r,c,o,f,h,v,y,m,g,j,x,_){var z;if(l.kind==="loading")return i.jsx("p",{className:"muted",children:"Loading users…"});if(l.kind==="error")return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"error-banner",children:["Couldn't load users: ",i.jsx("code",{children:l.message})]}),i.jsx("button",{type:"button",onClick:_,className:"secondary",children:"Retry"})]});const{users:k}=l.data;if(k.length===0)return i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"No users yet."}),i.jsx("p",{className:"muted",children:"Click Create User below to invite someone."})]});const E=(z=k[0])==null?void 0:z.id;return i.jsx(Q0,{users:k,firstAdminId:E,deleteSt:r,setDeleteSt:c,onConfirmDelete:o,resetSt:f,setResetSt:h,onSubmitReset:v,editVaultsSt:y,setEditVaultsSt:m,onSubmitEditVaults:g,availableVaults:j,hubOrigin:x})}function Q0({users:l,firstAdminId:r,deleteSt:c,setDeleteSt:o,onConfirmDelete:f,resetSt:h,setResetSt:v,onSubmitReset:y,editVaultsSt:m,setEditVaultsSt:g,onSubmitEditVaults:j,availableVaults:x,hubOrigin:_}){return i.jsx("div",{className:"user-list",style:{marginTop:"1rem"},children:i.jsx("div",{className:"table-scroll",children:i.jsxs("table",{className:"user-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{scope:"col",children:"Username"}),i.jsx("th",{scope:"col",children:"Assigned vaults"}),i.jsx("th",{scope:"col",children:"Password set"}),i.jsx("th",{scope:"col",children:"Created"}),i.jsx("th",{scope:"col",children:"Actions"})]})}),i.jsx("tbody",{children:l.map(k=>{const E=k.id===r,z=c.kind==="deleting"&&c.userId===k.id,q=c.kind==="confirming"&&c.user.id===k.id,H=c.kind==="error"&&c.userId===k.id?c:null,Q=(h.kind==="open"||h.kind==="submitting"||h.kind==="error")&&h.userId===k.id?h:null,V=h.kind==="done"&&h.userId===k.id?h:null,P=(m.kind==="open"||m.kind==="submitting"||m.kind==="error")&&m.userId===k.id?m:null,J=m.kind==="done"&&m.userId===k.id?m:null;return i.jsxs("tr",{"data-user-id":k.id,children:[i.jsxs("td",{children:[i.jsx("code",{children:k.username}),E&&i.jsx("span",{className:"badge",style:{marginLeft:"0.5rem"},children:"first admin"})]}),i.jsx("td",{children:k.assigned_vaults.length>0?i.jsx("span",{style:{display:"inline-flex",flexWrap:"wrap",gap:"0.25rem"},children:k.assigned_vaults.map($=>i.jsx("code",{children:$},$))}):i.jsx("span",{className:"muted",title:E?"First admin is unrestricted (admin posture)":"No vaults assigned — user can't authorize any vault yet",children:"—"})}),i.jsx("td",{children:k.password_changed?i.jsx("span",{"aria-label":"changed",children:"✓"}):i.jsx("span",{className:"status status-pending",title:"User hasn't completed first-sign-in change-password yet",children:"pending first login"})}),i.jsx("td",{children:i.jsx("span",{title:k.created_at,children:F0(k.created_at)})}),i.jsxs("td",{children:[q?null:i.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[E&&i.jsxs(i.Fragment,{children:[i.jsx("span",{id:`first-admin-tooltip-${k.id}`,className:"sr-only",children:"First admin can't be deleted (would self-lock the hub)"}),i.jsx("span",{id:`first-admin-reset-tooltip-${k.id}`,className:"sr-only",children:"First admin uses /account/change-password directly"}),i.jsx("span",{id:`first-admin-vaults-tooltip-${k.id}`,className:"sr-only",children:"First admin's vault membership is unrestricted by design"})]}),i.jsx("button",{type:"button",className:"secondary",disabled:E||P!==null||m.kind==="submitting"&&m.userId===k.id,title:E?"First admin's vault membership is unrestricted by design":void 0,"aria-describedby":E?`first-admin-vaults-tooltip-${k.id}`:void 0,onClick:()=>g({kind:"open",userId:k.id,selected:[...k.assigned_vaults]}),"aria-label":`Edit vaults for ${k.username}`,children:"Edit vaults"}),i.jsx("button",{type:"button",className:"secondary",disabled:E||Q!==null||h.kind==="submitting"&&h.userId===k.id,title:E?"First admin uses /account/change-password directly":void 0,"aria-describedby":E?`first-admin-reset-tooltip-${k.id}`:void 0,onClick:()=>v({kind:"open",userId:k.id,password:""}),"aria-label":`Reset password for ${k.username}`,children:"Reset password"}),i.jsx("button",{type:"button",className:"secondary",disabled:E||z,title:E?"First admin can't be deleted (would self-lock the hub)":void 0,"aria-describedby":E?`first-admin-tooltip-${k.id}`:void 0,onClick:()=>o({kind:"confirming",user:k}),"aria-label":`Delete ${k.username}`,children:z?"Deleting…":"Delete"})]}),q&&i.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.25rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm delete ${k.username}`,children:[i.jsxs("p",{children:["Delete ",i.jsx("code",{children:k.username}),"? This revokes their tokens, drops their sessions and grants, and removes the account. The audit trail is preserved — tokens stay with ",i.jsx("code",{children:"revoked_at"})," set, anonymised."]}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[i.jsx("button",{type:"button",className:"destructive",onClick:()=>{f(k)},disabled:z,children:z?"Deleting…":"Delete"}),i.jsx("button",{type:"button",className:"secondary",onClick:()=>o({kind:"idle"}),disabled:z,children:"Cancel"})]})]}),H&&i.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:i.jsx("code",{children:H.message})}),Q&&i.jsx($0,{user:k,state:Q,onCancel:()=>v({kind:"idle"}),onPasswordChange:$=>v({kind:"open",userId:k.id,password:$}),onSubmit:$=>{y(k,$)}}),V&&i.jsxs("output",{className:"success-banner",style:{marginTop:"0.25rem",display:"block"},children:["Password reset for ",i.jsx("code",{children:V.username}),". Hand them the new password and tell them they'll be prompted to change it on first sign-in.",i.jsx(Tm,{username:V.username,hubOrigin:_}),i.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. ",i.jsx("code",{children:"parachute restart vault"}),") to flush their cache immediately."]}),i.jsx("div",{style:{marginTop:"0.5rem"},children:i.jsx("button",{type:"button",className:"secondary",onClick:()=>v({kind:"idle"}),children:"Dismiss"})})]}),P&&i.jsx(J0,{user:k,state:P,availableVaults:x,onCancel:()=>g({kind:"idle"}),onSelectedChange:$=>g({kind:"open",userId:k.id,selected:$}),onSubmit:$=>{j(k,$)}}),J&&i.jsxs("output",{className:"success-banner",style:{marginTop:"0.25rem",display:"block"},children:["Vault assignments updated for ",i.jsx("code",{children:J.username}),".",i.jsx("div",{style:{marginTop:"0.5rem"},children:i.jsx("button",{type:"button",className:"secondary",onClick:()=>g({kind:"idle"}),children:"Dismiss"})})]})]})]},k.id)})})]})})})}function $0({user:l,state:r,onCancel:c,onPasswordChange:o,onSubmit:f}){const h=r.kind==="submitting",v=r.kind==="error"?r.message:null,y=`reset-password-input-${l.id}`;return i.jsxs("form",{onSubmit:m=>{m.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:[i.jsxs("p",{style:{margin:0},children:[i.jsxs("label",{htmlFor:y,children:["New temporary password for ",i.jsx("code",{children:l.username})," ",i.jsxs("span",{className:"muted",children:["(min ",La," chars)"]})]}),i.jsx("br",{}),i.jsx("input",{id:y,type:"password",required:!0,autoComplete:"new-password",minLength:La,value:r.password,disabled:h,onChange:m=>o(m.target.value)})]}),v&&i.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:i.jsx("code",{children:v})}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[i.jsx("button",{type:"submit",disabled:h,children:h?"Setting…":"Set new password"}),i.jsx("button",{type:"button",className:"secondary",onClick:c,disabled:h,children:"Cancel"})]})]})}function J0({user:l,state:r,availableVaults:c,onCancel:o,onSelectedChange:f,onSubmit:h}){const v=r.kind==="submitting",y=r.kind==="error"?r.message:null,m=`edit-vaults-select-${l.id}`;function g(j){const x=Array.from(j.target.selectedOptions).map(_=>_.value);f(x)}return i.jsxs("form",{onSubmit:j=>{j.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:[i.jsx("p",{style:{margin:0},children:i.jsxs("label",{htmlFor:m,children:["Vault assignments for ",i.jsx("code",{children:l.username})," ",i.jsx("span",{className:"muted",children:"(empty = no narrowing; shift-click to multi-select)"})]})}),r.selected.length>0&&i.jsx("div",{"data-testid":`edit-vaults-chips-${l.id}`,style:{marginTop:"0.4rem",display:"flex",flexWrap:"wrap",gap:"0.25rem"},children:r.selected.map(j=>i.jsx("code",{style:{padding:"0.1rem 0.4rem",borderRadius:"4px"},children:j},j))}),i.jsx("select",{id:m,multiple:!0,value:r.selected,onChange:g,disabled:v,size:Math.min(Math.max(c.length,3),8),style:{marginTop:"0.4rem",minWidth:"12rem"},children:c.map(j=>i.jsx("option",{value:j,children:j},j))}),c.length===0&&i.jsx("p",{className:"muted",style:{marginTop:"0.25rem"},children:"No vaults registered on this hub yet."}),y&&i.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:i.jsx("code",{children:y})}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[i.jsx("button",{type:"submit",disabled:v,children:v?"Saving…":"Save vault assignments"}),i.jsx("button",{type:"button",className:"secondary",onClick:o,disabled:v,children:"Cancel"})]})]})}function K0({show:l,setShow:r,form:c,setForm:o,vaults:f,hubOrigin:h,createState:v,setCreateState:y,onSubmit:m}){const g=v.kind==="submitting";return i.jsx("section",{style:{marginTop:"1.5rem"},children:l?i.jsxs("form",{onSubmit:j=>void m(j),"aria-label":"Create user",children:[i.jsx("h3",{children:"Create user"}),i.jsxs("p",{children:[i.jsxs("label",{htmlFor:"new-user-username",children:["Username"," ",i.jsxs("span",{className:"muted",children:["(",bs,"-",xs," chars, lowercase letters/digits/hyphens/ underscores)"]})]}),i.jsx("br",{}),i.jsx("input",{id:"new-user-username",type:"text",required:!0,autoComplete:"off",value:c.username,minLength:bs,maxLength:xs,pattern:"[a-z0-9_\\-]+",onChange:j=>o({...c,username:j.target.value})})]}),i.jsxs("p",{children:[i.jsxs("label",{htmlFor:"new-user-password",children:["Password ",i.jsxs("span",{className:"muted",children:["(min ",La," chars)"]})]}),i.jsx("br",{}),i.jsx("input",{id:"new-user-password",type:"password",required:!0,autoComplete:"new-password",value:c.password,minLength:La,onChange:j=>o({...c,password:j.target.value})})]}),i.jsxs("p",{children:[i.jsxs("label",{htmlFor:"new-user-vaults",children:["Assigned vaults"," ",i.jsx("span",{className:"muted",children:"(empty = no restriction; shift-click to select multiple)"})]}),i.jsx("br",{}),c.assignedVaults.length>0&&i.jsx("span",{"data-testid":"new-user-vault-chips",style:{display:"inline-flex",flexWrap:"wrap",gap:"0.25rem",marginBottom:"0.25rem"},children:c.assignedVaults.map(j=>i.jsx("code",{children:j},j))}),i.jsx("br",{}),i.jsx("select",{id:"new-user-vaults",multiple:!0,value:c.assignedVaults,onChange:j=>o({...c,assignedVaults:Array.from(j.target.selectedOptions).map(x=>x.value)}),size:Math.min(Math.max(f.length,3),8),style:{minWidth:"12rem"},children:f.map(j=>i.jsx("option",{value:j,children:j},j))}),f.length===0&&i.jsx("span",{className:"muted",style:{marginLeft:"0.5rem"},children:"No vaults registered on this hub yet."})]}),v.kind==="error"&&i.jsx("div",{className:"error-banner",children:i.jsx("code",{children:v.message})}),v.kind==="created"&&i.jsxs("output",{className:"success-banner",children:["User ",i.jsx("code",{children:v.username})," created. They'll be prompted to change their password on first sign-in.",i.jsx(Tm,{username:v.username,hubOrigin:h})]}),i.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[i.jsx("button",{type:"submit",disabled:g,children:g?"Creating…":"Create user"}),i.jsx("button",{type:"button",className:"secondary",disabled:g,onClick:()=>{r(!1),y({kind:"idle"})},children:"Close"})]})]}):i.jsx("button",{type:"button",onClick:()=>r(!0),children:"Create User"})})}function F0(l){const r=new Date(l);return Number.isNaN(r.getTime())?l:r.toLocaleString()}const W0="https://parachute.computer/install#connect-mcp-clients";function km(l){return`${l.replace(/\/+$/,"")}/mcp`}function _m(l,r){return`claude mcp add --transport http parachute-${l} ${km(r)}`}function I0(l,r,c){return`${_m(l,r)} --header "Authorization: Bearer ${c}"`}function ic({value:l,label:r="Copy"}){const[c,o]=b.useState(!1);return i.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 P0({vaultName:l,vaultUrl:r,embedded:c=!1}){const o=km(r),f=_m(l,r),[h,v]=b.useState(!1),[y,m]=b.useState({kind:"idle"});async function g(){if(y.kind!=="submitting"){m({kind:"submitting"});try{const _=await jm({scope:`vault:${l}:read vault:${l}:write`});m({kind:"minted",token:_})}catch(_){const k=_ instanceof Z?`mint failed (${_.status}): ${_.message}`:_ instanceof Error?_.message:String(_);m({kind:"error",message:k})}}}const j=y.kind==="minted"?I0(l,r,y.token.token):null,x=i.jsxs(i.Fragment,{children:[i.jsx("h3",{children:"Connect an MCP client (or connector)"}),i.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 ",i.jsx("code",{children:l})," vault. The client signs in to this hub and reads/writes vault data over MCP."]}),i.jsxs("div",{className:"mcp-field",children:[i.jsx("span",{className:"mcp-field-label",children:"Endpoint"}),i.jsxs("div",{className:"token-box",children:[i.jsx("code",{"data-testid":"mcp-endpoint",children:o}),i.jsx(ic,{value:o})]})]}),i.jsxs("div",{className:"mcp-field",children:[i.jsx("span",{className:"mcp-field-label",children:"Claude Code"}),i.jsxs("div",{className:"token-box",children:[i.jsx("code",{"data-testid":"mcp-add-command",children:f}),i.jsx(ic,{value:f})]}),i.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."})]}),i.jsxs("details",{className:"mcp-token-path",open:h,onToggle:_=>v(_.currentTarget.open),children:[i.jsx("summary",{children:"Use a token instead (headless / CI clients)"}),i.jsxs("p",{className:"dim",children:["For clients that can't do browser OAuth, mint a scope-narrow hub token (",i.jsxs("code",{children:["vault:",l,":read vault:",l,":write"]})," ","— not admin) and pass it as a header. Revealed once; copy it now."]}),y.kind==="minted"&&j?i.jsxs("div",{className:"mint-banner","data-testid":"mcp-header-banner",children:[i.jsx("h3",{children:"Token minted"}),i.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 ",i.jsx("code",{children:"Authorization"})," header."]}),i.jsxs("div",{className:"token-box",children:[i.jsx("code",{"data-testid":"mcp-header-command",children:j}),i.jsx(ic,{value:j})]}),i.jsxs("p",{className:"warn",children:["⚠ Manage and revoke this token at ",i.jsx("code",{children:"/admin/tokens"}),"."]})]}):i.jsx("div",{className:"actions",children:i.jsx("button",{type:"button",className:"secondary",onClick:()=>{g()},disabled:y.kind==="submitting",children:y.kind==="submitting"?"Minting…":"Mint a token"})}),y.kind==="error"?i.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:i.jsx("code",{children:y.message})}):null]}),i.jsx("p",{className:"dim mcp-docs-link",children:i.jsx("a",{href:W0,target:"_blank",rel:"noreferrer",children:"Full connect docs →"})})]});return c?i.jsx("div",{className:"mcp-connect-card mcp-connect-card-embedded",children:x}):i.jsx("div",{className:"mcp-connect-card",children:x})}const Ih="/vault/admin/";function eb(){const[l,r]=b.useState("detecting"),[c,o]=b.useState({kind:"loading"}),[f,h]=b.useState(0),[v,y]=b.useState({kind:"idle"}),[m,g]=b.useState(null),[j,x]=b.useState({});b.useEffect(()=>{let E=!1;return Ns().then(z=>{if(E)return;const q=z.modules.find(H=>H.short==="vault");if(q!=null&&q.installed&&q.config_ui_url===Ih){r("redirecting"),window.location.replace(Ih);return}r("legacy")}).catch(()=>{E||r("legacy")}),()=>{E=!0}},[]);async function _(E){if(E.managementUrl){y({kind:"minting",name:E.name});try{const z=await bm(E.name),q=t1(E.url,E.managementUrl),H=q.includes("#")?"&":"#";window.location.assign(`${q}${H}token=${z.token}`)}catch(z){const q=z instanceof Z?`mint failed (${z.status}): ${z.message}`:z instanceof Error?z.message:String(z);y({kind:"error",name:E.name,message:q})}}}if(b.useEffect(()=>{if(l!=="legacy")return;let E=!1;return jc().then(z=>{E||o({kind:"ok",vaults:z.vaults,moduleInstalled:z.moduleInstalled})}).catch(z=>{if(E)return;const q=z instanceof Error?z.message:String(z);o({kind:"error",message:q})}),()=>{E=!0}},[f,l]),b.useEffect(()=>{if(c.kind!=="ok")return;const E=c.vaults.map(q=>q.name);if(E.length===0)return;let z=!1;x(q=>{const H={...q};for(const Q of E)H[Q]||(H[Q]={kind:"loading"});return H});for(const q of E)Fy(q).then(H=>{z||x(Q=>({...Q,[q]:{kind:"ok",usage:H}}))}).catch(()=>{z||x(H=>({...H,[q]:{kind:"error"}}))});return()=>{z=!0}},[c]),l!=="legacy")return i.jsxs("div",{children:[i.jsx("div",{className:"list-header",children:i.jsx("h1",{children:"Vaults"})}),i.jsx("p",{className:"muted","data-testid":"vaults-detecting",children:l==="redirecting"?"Opening the vault admin…":"Loading…"})]});if(c.kind==="loading")return i.jsxs("div",{children:[i.jsx("div",{className:"list-header",children:i.jsx("h1",{children:"Vaults"})}),i.jsx("p",{className:"muted",children:"Loading…"})]});if(c.kind==="error")return i.jsxs("div",{children:[i.jsx("div",{className:"list-header",children:i.jsx("h1",{children:"Vaults"})}),i.jsxs("div",{className:"error-banner",children:["Couldn't load vaults: ",i.jsx("code",{children:c.message})]}),i.jsx("button",{type:"button",onClick:()=>h(E=>E+1),className:"secondary",children:"Retry"})]});const k=c.vaults.length===0&&!c.moduleInstalled;return i.jsxs("div",{"data-route-content":"true",children:[i.jsxs("div",{className:"list-header",children:[i.jsxs("h1",{children:["Vaults (",c.vaults.length,")"]}),k?i.jsx(nt,{to:"/modules",children:i.jsx("button",{type:"button",children:"Install vault module"})}):null]}),i.jsxs("p",{className:"muted",children:["Vaults registered with this hub at ",i.jsx("code",{children:"/.well-known/parachute.json"}),"."," ",i.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?i.jsxs("p",{className:"muted","data-testid":"vaults-legacy-create-hint",children:["To create another vault, upgrade the vault module from ",i.jsx(nt,{to:"/modules",children:"Modules"})," ","(its own admin app includes create), or run"," ",i.jsx("code",{children:"parachute vault create <name>"})," on the host."]}):null,c.vaults.length===0?k?i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"No vault module installed."}),i.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."}),i.jsx("p",{style:{marginTop:"0.75rem"},children:i.jsx(nt,{to:"/modules",children:"Install vault module →"})})]}):i.jsxs("div",{className:"empty empty-rich",children:[i.jsx("p",{className:"empty-headline",children:"No vaults yet."}),i.jsx("p",{className:"muted",children:"Create your first vault to start storing tokens, secrets, and notes scoped to this hub."}),i.jsx("p",{style:{marginTop:"0.75rem"},children:i.jsx("a",{href:"/admin/setup?step=vault",children:"Create a vault →"})})]}):i.jsx("div",{style:{marginTop:"1rem"},children:c.vaults.map(E=>{const z=v.kind==="minting"&&v.name===E.name,q=v.kind==="error"&&v.name===E.name?v:null,H=m===E.name,Q=j[E.name],V=(Q==null?void 0:Q.kind)==="ok"?`${Q.usage.notes} ${Q.usage.notes===1?"note":"notes"} · ${Wy(Q.usage.totalBytes)}`:(Q==null?void 0:Q.kind)==="loading"?"…":"—";return i.jsxs("div",{className:"vault-row-group",children:[i.jsxs("div",{className:"vault-row",children:[i.jsxs("div",{className:"body",children:[i.jsxs("div",{className:"name",children:[i.jsx("code",{children:E.name}),i.jsxs("span",{className:"tag muted",title:"Vault version",children:["v",E.version]})]}),i.jsx("div",{className:"dim url",children:i.jsx("code",{children:E.url})}),i.jsx("div",{className:"dim vault-usage","data-testid":`vault-usage-${E.name}`,children:V}),q?i.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:i.jsx("code",{children:q.message})}):null]}),i.jsxs("div",{className:"vault-row-actions",children:[i.jsx("button",{type:"button",className:H?void 0:"secondary","aria-expanded":H,"aria-label":`Connect an MCP client to vault ${E.name}`,onClick:()=>g(P=>P===E.name?null:E.name),children:H?"Hide connect":"Connect"}),E.managementUrl?i.jsx("button",{type:"button",onClick:()=>{_(E)},disabled:z,"aria-label":`Manage vault ${E.name}`,children:z?"Opening…":"Manage"}):i.jsx("span",{className:"muted",title:"This vault has no admin SPA — manage with parachute-vault on the host.",children:"CLI only"})]})]}),H?i.jsx(P0,{vaultName:E.name,vaultUrl:E.url}):null]},E.name)})})]})}function Am(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 tb(l){return`${Am(l).split(" ").map(c=>c.length>0?c[0].toUpperCase()+c.slice(1):c).join(" ")} · ${xc}`}function ab(){const{pathname:l}=wt(),r=Am(l),[c,o]=b.useState(null);b.useEffect(()=>{document.title=tb(l)},[l]);const[f,h]=b.useState(!1),[v,y]=b.useState([]),m=c!=null&&c.hasSession?c.csrf:null,g=B1(m,!!(c!=null&&c.hasSession));b.useEffect(()=>{let _=!1;return xm().then(k=>{_||o(k)}).catch(()=>{_||o({hasSession:!1})}),()=>{_=!0}},[]),b.useEffect(()=>{if(!c||!c.hasSession)return;let _=!1;return Ns().then(k=>{_||y(k.modules.filter(E=>E.installed))}).catch(()=>{_||y([])}),()=>{_=!0}},[c]),b.useEffect(()=>{g.locked&&Ne()},[g.locked]);async function j(){if(m){try{await S1(m)}catch{}Ne(),g.refresh()}}async function x(_){h(!0);try{await e1(_),window.location.href="/"}catch{h(!1)}}return g.locked&&m?i.jsx(H1,{csrf:m,onUnlocked:g.refresh}):i.jsxs("div",{className:"page",children:[i.jsxs("nav",{className:"nav",children:[i.jsxs(nt,{to:"/",className:"brand",children:[i.jsx(ym,{size:18,idSuffix:"spa-nav",className:"brand-mark-icon"}),i.jsx("span",{className:"brand-wordmark",children:xc}),i.jsx("span",{className:"sub",children:r})]}),i.jsx(lb,{me:c,signingOut:f,onSignOut:x}),c!=null&&c.hasSession&&g.configured?i.jsx("button",{type:"button",className:"auth-spa-signout","data-testid":"admin-lock-now",title:"Lock the admin console now",onClick:()=>void j(),children:"Lock now"}):null,i.jsx(Ha,{to:"/",label:"Home",exact:!0}),i.jsx(Ha,{to:"/connections",label:"Connections"}),i.jsx(Ha,{to:"/grants",label:"Grants"}),i.jsx(Ha,{to:"/modules",label:"Modules"}),i.jsx(Ha,{to:"/users",label:"Users"}),i.jsx(Ha,{to:"/tokens",label:"Tokens"}),i.jsx(Ha,{to:"/permissions",label:"Permissions"}),i.jsx(Ha,{to:"/settings",label:"Settings"}),i.jsx("span",{className:"nav-divider","aria-hidden":"true"}),i.jsx(nb,{services:v}),i.jsx("a",{href:"/hub.html",title:"Hub discovery page (top-level)",children:"Discovery"})]}),i.jsxs(ry,{children:[i.jsx(st,{path:"/",element:i.jsx(l0,{})}),i.jsx(st,{path:"/vaults",element:i.jsx(eb,{})}),i.jsx(st,{path:"/vaults/new",element:i.jsx(Ir,{to:"/vaults",replace:!0})}),i.jsx(st,{path:"/modules",element:i.jsx(x0,{})}),i.jsx(st,{path:"/users",element:i.jsx(V0,{})}),i.jsx(st,{path:"/connections",element:i.jsx(X1,{})}),i.jsx(st,{path:"/grants",element:i.jsx(P1,{})}),i.jsx(st,{path:"/channels",element:i.jsx(Ir,{to:"/connections",replace:!0})}),i.jsx(st,{path:"/channels/*",element:i.jsx(Ir,{to:"/connections",replace:!0})}),i.jsx(st,{path:"/permissions",element:i.jsx(E0,{})}),i.jsx(st,{path:"/tokens",element:i.jsx(M0,{})}),i.jsx(st,{path:"/settings",element:i.jsx(_0,{})}),i.jsx(st,{path:"/approve-client/:clientId",element:i.jsx(q1,{})}),i.jsx(st,{path:"*",element:i.jsxs("div",{className:"empty",children:["404 — back to ",i.jsx(nt,{to:"/",children:"Home"}),"."]})})]}),c!=null&&c.hasSession?i.jsx(D1,{}):null]})}function Ha({to:l,label:r,alsoActiveAt:c,exact:o}){const{pathname:f}=wt(),y=(o?f===l:f===l||f.startsWith(`${l}/`))||c!==void 0&&f===c;return i.jsx(nt,{to:l,className:y?"nav-link nav-link-active":"nav-link","aria-current":y?"page":void 0,children:r})}function nb({services:l}){return l.length===0?null:i.jsxs("details",{className:"nav-dropdown","data-testid":"installed-services-dropdown",children:[i.jsx("summary",{className:"nav-dropdown-summary",children:"Services"}),i.jsx("div",{className:"nav-dropdown-panel",role:"menu",children:l.map(r=>{const c=r.management_url;return c?i.jsx("a",{className:"nav-dropdown-item",href:c,role:"menuitem","data-testid":`nav-service-${r.short}`,children:r.display_name},r.short):i.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 lb({me:l,signingOut:r,onSignOut:c}){return l===null?null:l.hasSession?i.jsxs("span",{className:"auth-spa",children:[i.jsxs("span",{className:"muted",children:["Signed in as ",i.jsx("strong",{children:l.user.displayName})]})," ","·"," ",i.jsx("button",{type:"button",className:"auth-spa-signout",disabled:r,onClick:()=>{c(l.csrf)},children:r?"Signing out…":"Sign out"})]}):i.jsx("a",{href:`/login?next=${encodeURIComponent(window.location.pathname)}`,className:"auth-spa",children:"Sign in"})}const Rm=document.getElementById("root");if(!Rm)throw new Error("#root not found");function ib(){const l=window.location.pathname;return l==="/admin"||l.startsWith("/admin/")?"/admin":""}ov.createRoot(Rm).render(i.jsx(b.StrictMode,{children:i.jsx(zy,{basename:ib(),children:i.jsx(ab,{})})}));