@openparachute/vault 0.7.5-rc.7 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/mirror-routes.ts +13 -6
- package/src/routing.ts +36 -0
- package/src/transcription-routes.test.ts +195 -0
- package/src/transcription-routes.ts +327 -0
- package/web/ui/dist/assets/index-g3_KwmRE.js +61 -0
- package/web/ui/dist/index.html +1 -1
- package/web/ui/dist/assets/index-cdAcASvO.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"]'))c(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const p of h.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&c(p)}).observe(document,{childList:!0,subtree:!0});function o(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 c(f){if(f.ep)return;f.ep=!0;const h=o(f);fetch(f.href,h)}})();var Kr={exports:{}},ql={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var wh;function uy(){if(wh)return ql;wh=1;var s=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(c,f,h){var p=null;if(h!==void 0&&(p=""+h),f.key!==void 0&&(p=""+f.key),"key"in f){h={};for(var E in f)E!=="key"&&(h[E]=f[E])}else h=f;return f=h.ref,{$$typeof:s,type:c,key:p,ref:f!==void 0?f:null,props:h}}return ql.Fragment=r,ql.jsx=o,ql.jsxs=o,ql}var Ch;function ry(){return Ch||(Ch=1,Kr.exports=uy()),Kr.exports}var l=ry(),$r={exports:{}},re={};/**
|
|
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 Ah;function cy(){if(Ah)return re;Ah=1;var s=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),p=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),N=Symbol.iterator;function H(j){return j===null||typeof j!="object"?null:(j=N&&j[N]||j["@@iterator"],typeof j=="function"?j:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,D={};function G(j,w,V){this.props=j,this.context=w,this.refs=D,this.updater=V||U}G.prototype.isReactComponent={},G.prototype.setState=function(j,w){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,w,"setState")},G.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function W(){}W.prototype=G.prototype;function L(j,w,V){this.props=j,this.context=w,this.refs=D,this.updater=V||U}var M=L.prototype=new W;M.constructor=L,k(M,G.prototype),M.isPureReactComponent=!0;var J=Array.isArray;function K(){}var X={H:null,A:null,T:null,S:null},ue=Object.prototype.hasOwnProperty;function fe(j,w,V){var Q=V.ref;return{$$typeof:s,type:j,key:w,ref:Q!==void 0?Q:null,props:V}}function He(j,w){return fe(j.type,w,j.props)}function ke(j){return typeof j=="object"&&j!==null&&j.$$typeof===s}function ze(j){var w={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(V){return w[V]})}var ie=/\/+/g;function $(j,w){return typeof j=="object"&&j!==null&&j.key!=null?ze(""+j.key):w.toString(36)}function te(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(K,K):(j.status="pending",j.then(function(w){j.status==="pending"&&(j.status="fulfilled",j.value=w)},function(w){j.status==="pending"&&(j.status="rejected",j.reason=w)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function z(j,w,V,Q,ae){var se=typeof j;(se==="undefined"||se==="boolean")&&(j=null);var Se=!1;if(j===null)Se=!0;else switch(se){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(j.$$typeof){case s:case r:Se=!0;break;case S:return Se=j._init,z(Se(j._payload),w,V,Q,ae)}}if(Se)return ae=ae(j),Se=Q===""?"."+$(j,0):Q,J(ae)?(V="",Se!=null&&(V=Se.replace(ie,"$&/")+"/"),z(ae,w,V,"",function(Ja){return Ja})):ae!=null&&(ke(ae)&&(ae=He(ae,V+(ae.key==null||j&&j.key===ae.key?"":(""+ae.key).replace(ie,"$&/")+"/")+Se)),w.push(ae)),1;Se=0;var lt=Q===""?".":Q+":";if(J(j))for(var qe=0;qe<j.length;qe++)Q=j[qe],se=lt+$(Q,qe),Se+=z(Q,w,V,se,ae);else if(qe=H(j),typeof qe=="function")for(j=qe.call(j),qe=0;!(Q=j.next()).done;)Q=Q.value,se=lt+$(Q,qe++),Se+=z(Q,w,V,se,ae);else if(se==="object"){if(typeof j.then=="function")return z(te(j),w,V,Q,ae);throw w=String(j),Error("Objects are not valid as a React child (found: "+(w==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":w)+"). If you meant to render a collection of children, use an array instead.")}return Se}function Z(j,w,V){if(j==null)return j;var Q=[],ae=0;return z(j,Q,"","",function(se){return w.call(V,se,ae++)}),Q}function ne(j){if(j._status===-1){var w=j._result;w=w(),w.then(function(V){(j._status===0||j._status===-1)&&(j._status=1,j._result=V)},function(V){(j._status===0||j._status===-1)&&(j._status=2,j._result=V)}),j._status===-1&&(j._status=0,j._result=w)}if(j._status===1)return j._result.default;throw j._result}var ve=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var w=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(w))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},F={map:Z,forEach:function(j,w,V){Z(j,function(){w.apply(this,arguments)},V)},count:function(j){var w=0;return Z(j,function(){w++}),w},toArray:function(j){return Z(j,function(w){return w})||[]},only:function(j){if(!ke(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return re.Activity=v,re.Children=F,re.Component=G,re.Fragment=o,re.Profiler=f,re.PureComponent=L,re.StrictMode=c,re.Suspense=x,re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,re.__COMPILER_RUNTIME={__proto__:null,c:function(j){return X.H.useMemoCache(j)}},re.cache=function(j){return function(){return j.apply(null,arguments)}},re.cacheSignal=function(){return null},re.cloneElement=function(j,w,V){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var Q=k({},j.props),ae=j.key;if(w!=null)for(se in w.key!==void 0&&(ae=""+w.key),w)!ue.call(w,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&w.ref===void 0||(Q[se]=w[se]);var se=arguments.length-2;if(se===1)Q.children=V;else if(1<se){for(var Se=Array(se),lt=0;lt<se;lt++)Se[lt]=arguments[lt+2];Q.children=Se}return fe(j.type,ae,Q)},re.createContext=function(j){return j={$$typeof:p,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:h,_context:j},j},re.createElement=function(j,w,V){var Q,ae={},se=null;if(w!=null)for(Q in w.key!==void 0&&(se=""+w.key),w)ue.call(w,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ae[Q]=w[Q]);var Se=arguments.length-2;if(Se===1)ae.children=V;else if(1<Se){for(var lt=Array(Se),qe=0;qe<Se;qe++)lt[qe]=arguments[qe+2];ae.children=lt}if(j&&j.defaultProps)for(Q in Se=j.defaultProps,Se)ae[Q]===void 0&&(ae[Q]=Se[Q]);return fe(j,se,ae)},re.createRef=function(){return{current:null}},re.forwardRef=function(j){return{$$typeof:E,render:j}},re.isValidElement=ke,re.lazy=function(j){return{$$typeof:S,_payload:{_status:-1,_result:j},_init:ne}},re.memo=function(j,w){return{$$typeof:g,type:j,compare:w===void 0?null:w}},re.startTransition=function(j){var w=X.T,V={};X.T=V;try{var Q=j(),ae=X.S;ae!==null&&ae(V,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(K,ve)}catch(se){ve(se)}finally{w!==null&&V.types!==null&&(w.types=V.types),X.T=w}},re.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},re.use=function(j){return X.H.use(j)},re.useActionState=function(j,w,V){return X.H.useActionState(j,w,V)},re.useCallback=function(j,w){return X.H.useCallback(j,w)},re.useContext=function(j){return X.H.useContext(j)},re.useDebugValue=function(){},re.useDeferredValue=function(j,w){return X.H.useDeferredValue(j,w)},re.useEffect=function(j,w){return X.H.useEffect(j,w)},re.useEffectEvent=function(j){return X.H.useEffectEvent(j)},re.useId=function(){return X.H.useId()},re.useImperativeHandle=function(j,w,V){return X.H.useImperativeHandle(j,w,V)},re.useInsertionEffect=function(j,w){return X.H.useInsertionEffect(j,w)},re.useLayoutEffect=function(j,w){return X.H.useLayoutEffect(j,w)},re.useMemo=function(j,w){return X.H.useMemo(j,w)},re.useOptimistic=function(j,w){return X.H.useOptimistic(j,w)},re.useReducer=function(j,w,V){return X.H.useReducer(j,w,V)},re.useRef=function(j){return X.H.useRef(j)},re.useState=function(j){return X.H.useState(j)},re.useSyncExternalStore=function(j,w,V){return X.H.useSyncExternalStore(j,w,V)},re.useTransition=function(){return X.H.useTransition()},re.version="19.2.5",re}var Rh;function oc(){return Rh||(Rh=1,$r.exports=cy()),$r.exports}var y=oc(),Fr={exports:{}},Gl={},Wr={exports:{}},Ir={};/**
|
|
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 kh;function oy(){return kh||(kh=1,(function(s){function r(z,Z){var ne=z.length;z.push(Z);e:for(;0<ne;){var ve=ne-1>>>1,F=z[ve];if(0<f(F,Z))z[ve]=Z,z[ne]=F,ne=ve;else break e}}function o(z){return z.length===0?null:z[0]}function c(z){if(z.length===0)return null;var Z=z[0],ne=z.pop();if(ne!==Z){z[0]=ne;e:for(var ve=0,F=z.length,j=F>>>1;ve<j;){var w=2*(ve+1)-1,V=z[w],Q=w+1,ae=z[Q];if(0>f(V,ne))Q<F&&0>f(ae,V)?(z[ve]=ae,z[Q]=ne,ve=Q):(z[ve]=V,z[w]=ne,ve=w);else if(Q<F&&0>f(ae,ne))z[ve]=ae,z[Q]=ne,ve=Q;else break e}}return Z}function f(z,Z){var ne=z.sortIndex-Z.sortIndex;return ne!==0?ne:z.id-Z.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;s.unstable_now=function(){return h.now()}}else{var p=Date,E=p.now();s.unstable_now=function(){return p.now()-E}}var x=[],g=[],S=1,v=null,N=3,H=!1,U=!1,k=!1,D=!1,G=typeof setTimeout=="function"?setTimeout:null,W=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function M(z){for(var Z=o(g);Z!==null;){if(Z.callback===null)c(g);else if(Z.startTime<=z)c(g),Z.sortIndex=Z.expirationTime,r(x,Z);else break;Z=o(g)}}function J(z){if(k=!1,M(z),!U)if(o(x)!==null)U=!0,K||(K=!0,ze());else{var Z=o(g);Z!==null&&te(J,Z.startTime-z)}}var K=!1,X=-1,ue=5,fe=-1;function He(){return D?!0:!(s.unstable_now()-fe<ue)}function ke(){if(D=!1,K){var z=s.unstable_now();fe=z;var Z=!0;try{e:{U=!1,k&&(k=!1,W(X),X=-1),H=!0;var ne=N;try{t:{for(M(z),v=o(x);v!==null&&!(v.expirationTime>z&&He());){var ve=v.callback;if(typeof ve=="function"){v.callback=null,N=v.priorityLevel;var F=ve(v.expirationTime<=z);if(z=s.unstable_now(),typeof F=="function"){v.callback=F,M(z),Z=!0;break t}v===o(x)&&c(x),M(z)}else c(x);v=o(x)}if(v!==null)Z=!0;else{var j=o(g);j!==null&&te(J,j.startTime-z),Z=!1}}break e}finally{v=null,N=ne,H=!1}Z=void 0}}finally{Z?ze():K=!1}}}var ze;if(typeof L=="function")ze=function(){L(ke)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,$=ie.port2;ie.port1.onmessage=ke,ze=function(){$.postMessage(null)}}else ze=function(){G(ke,0)};function te(z,Z){X=G(function(){z(s.unstable_now())},Z)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(z){z.callback=null},s.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ue=0<z?Math.floor(1e3/z):5},s.unstable_getCurrentPriorityLevel=function(){return N},s.unstable_next=function(z){switch(N){case 1:case 2:case 3:var Z=3;break;default:Z=N}var ne=N;N=Z;try{return z()}finally{N=ne}},s.unstable_requestPaint=function(){D=!0},s.unstable_runWithPriority=function(z,Z){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var ne=N;N=z;try{return Z()}finally{N=ne}},s.unstable_scheduleCallback=function(z,Z,ne){var ve=s.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?ve+ne:ve):ne=ve,z){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=ne+F,z={id:S++,callback:Z,priorityLevel:z,startTime:ne,expirationTime:F,sortIndex:-1},ne>ve?(z.sortIndex=ne,r(g,z),o(x)===null&&z===o(g)&&(k?(W(X),X=-1):k=!0,te(J,ne-ve))):(z.sortIndex=F,r(x,z),U||H||(U=!0,K||(K=!0,ze()))),z},s.unstable_shouldYield=He,s.unstable_wrapCallback=function(z){var Z=N;return function(){var ne=N;N=Z;try{return z.apply(this,arguments)}finally{N=ne}}}})(Ir)),Ir}var zh;function dy(){return zh||(zh=1,Wr.exports=oy()),Wr.exports}var Pr={exports:{}},tt={};/**
|
|
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 fy(){if(Mh)return tt;Mh=1;var s=oc();function r(x){var g="https://react.dev/errors/"+x;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)g+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+x+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var c={d:{f:o,r:function(){throw Error(r(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},f=Symbol.for("react.portal");function h(x,g,S){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:v==null?null:""+v,children:x,containerInfo:g,implementation:S}}var p=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function E(x,g){if(x==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return tt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,tt.createPortal=function(x,g){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(r(299));return h(x,g,null,S)},tt.flushSync=function(x){var g=p.T,S=c.p;try{if(p.T=null,c.p=2,x)return x()}finally{p.T=g,c.p=S,c.d.f()}},tt.preconnect=function(x,g){typeof x=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,c.d.C(x,g))},tt.prefetchDNS=function(x){typeof x=="string"&&c.d.D(x)},tt.preinit=function(x,g){if(typeof x=="string"&&g&&typeof g.as=="string"){var S=g.as,v=E(S,g.crossOrigin),N=typeof g.integrity=="string"?g.integrity:void 0,H=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;S==="style"?c.d.S(x,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:v,integrity:N,fetchPriority:H}):S==="script"&&c.d.X(x,{crossOrigin:v,integrity:N,fetchPriority:H,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},tt.preinitModule=function(x,g){if(typeof x=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var S=E(g.as,g.crossOrigin);c.d.M(x,{crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&c.d.M(x)},tt.preload=function(x,g){if(typeof x=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var S=g.as,v=E(S,g.crossOrigin);c.d.L(x,S,{crossOrigin:v,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})}},tt.preloadModule=function(x,g){if(typeof x=="string")if(g){var S=E(g.as,g.crossOrigin);c.d.m(x,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else c.d.m(x)},tt.requestFormReset=function(x){c.d.r(x)},tt.unstable_batchedUpdates=function(x,g){return x(g)},tt.useFormState=function(x,g,S){return p.H.useFormState(x,g,S)},tt.useFormStatus=function(){return p.H.useHostTransitionStatus()},tt.version="19.2.5",tt}var Oh;function hy(){if(Oh)return Pr.exports;Oh=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(r){console.error(r)}}return s(),Pr.exports=fy(),Pr.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 Dh;function my(){if(Dh)return Gl;Dh=1;var s=dy(),r=oc(),o=hy();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function p(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 E(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 x(e){if(h(e)!==e)throw Error(c(188))}function g(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(c(188));return t!==e?null:e}for(var n=e,a=t;;){var i=n.return;if(i===null)break;var u=i.alternate;if(u===null){if(a=i.return,a!==null){n=a;continue}break}if(i.child===u.child){for(u=i.child;u;){if(u===n)return x(i),e;if(u===a)return x(i),t;u=u.sibling}throw Error(c(188))}if(n.return!==a.return)n=i,a=u;else{for(var d=!1,m=i.child;m;){if(m===n){d=!0,n=i,a=u;break}if(m===a){d=!0,a=i,n=u;break}m=m.sibling}if(!d){for(m=u.child;m;){if(m===n){d=!0,n=u,a=i;break}if(m===a){d=!0,a=u,n=i;break}m=m.sibling}if(!d)throw Error(c(189))}}if(n.alternate!==a)throw Error(c(190))}if(n.tag!==3)throw Error(c(188));return n.stateNode.current===n?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,N=Symbol.for("react.element"),H=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),W=Symbol.for("react.consumer"),L=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),ue=Symbol.for("react.lazy"),fe=Symbol.for("react.activity"),He=Symbol.for("react.memo_cache_sentinel"),ke=Symbol.iterator;function ze(e){return e===null||typeof e!="object"?null:(e=ke&&e[ke]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function $(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case G:return"Profiler";case D:return"StrictMode";case J:return"Suspense";case K:return"SuspenseList";case fe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case U:return"Portal";case L:return e.displayName||"Context";case W:return(e._context.displayName||"Context")+".Consumer";case M:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return t=e.displayName||null,t!==null?t:$(e.type)||"Memo";case ue:t=e._payload,e=e._init;try{return $(e(t))}catch{}}return null}var te=Array.isArray,z=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},ve=[],F=-1;function j(e){return{current:e}}function w(e){0>F||(e.current=ve[F],ve[F]=null,F--)}function V(e,t){F++,ve[F]=e.current,e.current=t}var Q=j(null),ae=j(null),se=j(null),Se=j(null);function lt(e,t){switch(V(se,t),V(ae,e),V(Q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ff(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ff(t),e=Wf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}w(Q),V(Q,e)}function qe(){w(Q),w(ae),w(se)}function Ja(e){e.memoizedState!==null&&V(Se,e);var t=Q.current,n=Wf(t,e.type);t!==n&&(V(ae,e),V(Q,n))}function ti(e){ae.current===e&&(w(Q),w(ae)),Se.current===e&&(w(Se),Ul._currentValue=ne)}var Rs,Tc;function qn(e){if(Rs===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Rs=t&&t[1]||"",Tc=-1<n.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Rs+e+Tc}var ks=!1;function zs(e,t){if(!e||ks)return"";ks=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={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 R=O}Reflect.construct(e,[],Y)}else{try{Y.call()}catch(O){R=O}e.call(Y.prototype)}}else{try{throw Error()}catch(O){R=O}(Y=e())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(O){if(O&&R&&typeof O.stack=="string")return[O.stack,R.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=a.DetermineComponentFrameRoot(),d=u[0],m=u[1];if(d&&m){var b=d.split(`
|
|
44
|
-
`),A=m.split(`
|
|
45
|
-
`);for(i=a=0;a<b.length&&!b[a].includes("DetermineComponentFrameRoot");)a++;for(;i<A.length&&!A[i].includes("DetermineComponentFrameRoot");)i++;if(a===b.length||i===A.length)for(a=b.length-1,i=A.length-1;1<=a&&0<=i&&b[a]!==A[i];)i--;for(;1<=a&&0<=i;a--,i--)if(b[a]!==A[i]){if(a!==1||i!==1)do if(a--,i--,0>i||b[a]!==A[i]){var B=`
|
|
46
|
-
`+b[a].replace(" at new "," at ");return e.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",e.displayName)),B}while(1<=a&&0<=i);break}}}finally{ks=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?qn(n):""}function Bm(e,t){switch(e.tag){case 26:case 27:case 5:return qn(e.type);case 16:return qn("Lazy");case 13:return e.child!==t&&t!==null?qn("Suspense Fallback"):qn("Suspense");case 19:return qn("SuspenseList");case 0:case 15:return zs(e.type,!1);case 11:return zs(e.type.render,!1);case 1:return zs(e.type,!0);case 31:return qn("Activity");default:return""}}function _c(e){try{var t="",n=null;do t+=Bm(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
-
Error generating stack: `+a.message+`
|
|
48
|
-
`+a.stack}}var Ms=Object.prototype.hasOwnProperty,Os=s.unstable_scheduleCallback,Ds=s.unstable_cancelCallback,Lm=s.unstable_shouldYield,qm=s.unstable_requestPaint,ht=s.unstable_now,Gm=s.unstable_getCurrentPriorityLevel,Nc=s.unstable_ImmediatePriority,wc=s.unstable_UserBlockingPriority,ni=s.unstable_NormalPriority,Ym=s.unstable_LowPriority,Cc=s.unstable_IdlePriority,Vm=s.log,Xm=s.unstable_setDisableYieldValue,Ka=null,mt=null;function hn(e){if(typeof Vm=="function"&&Xm(e),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(Ka,e)}catch{}}var pt=Math.clz32?Math.clz32:Jm,Qm=Math.log,Zm=Math.LN2;function Jm(e){return e>>>=0,e===0?32:31-(Qm(e)/Zm|0)|0}var ai=256,li=262144,ii=4194304;function Gn(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 si(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var i=0,u=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var m=a&134217727;return m!==0?(a=m&~u,a!==0?i=Gn(a):(d&=m,d!==0?i=Gn(d):n||(n=m&~e,n!==0&&(i=Gn(n))))):(m=a&~u,m!==0?i=Gn(m):d!==0?i=Gn(d):n||(n=a&~e,n!==0&&(i=Gn(n)))),i===0?0:t!==0&&t!==i&&(t&u)===0&&(u=i&-i,n=t&-t,u>=n||u===32&&(n&4194048)!==0)?t:i}function $a(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Km(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ac(){var e=ii;return ii<<=1,(ii&62914560)===0&&(ii=4194304),e}function Us(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $m(e,t,n,a,i,u){var d=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var m=e.entanglements,b=e.expirationTimes,A=e.hiddenUpdates;for(n=d&~n;0<n;){var B=31-pt(n),Y=1<<B;m[B]=0,b[B]=-1;var R=A[B];if(R!==null)for(A[B]=null,B=0;B<R.length;B++){var O=R[B];O!==null&&(O.lane&=-536870913)}n&=~Y}a!==0&&Rc(e,a,0),u!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=u&~(d&~t))}function Rc(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-pt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function kc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-pt(n),i=1<<a;i&t|e[a]&t&&(e[a]|=t),n&=~i}}function zc(e,t){var n=t&-t;return n=(n&42)!==0?1:Hs(n),(n&(e.suspendedLanes|t))!==0?0:n}function Hs(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 Bs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Mc(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:bh(e.type))}function Oc(e,t){var n=Z.p;try{return Z.p=e,t()}finally{Z.p=n}}var mn=Math.random().toString(36).slice(2),Fe="__reactFiber$"+mn,st="__reactProps$"+mn,ua="__reactContainer$"+mn,Ls="__reactEvents$"+mn,Fm="__reactListeners$"+mn,Wm="__reactHandles$"+mn,Dc="__reactResources$"+mn,Wa="__reactMarker$"+mn;function qs(e){delete e[Fe],delete e[st],delete e[Ls],delete e[Fm],delete e[Wm]}function ra(e){var t=e[Fe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ua]||n[Fe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=lh(e);e!==null;){if(n=e[Fe])return n;e=lh(e)}return t}e=n,n=e.parentNode}return null}function ca(e){if(e=e[Fe]||e[ua]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ia(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function oa(e){var t=e[Dc];return t||(t=e[Dc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ke(e){e[Wa]=!0}var Uc=new Set,Hc={};function Yn(e,t){da(e,t),da(e+"Capture",t)}function da(e,t){for(Hc[e]=t,e=0;e<t.length;e++)Uc.add(t[e])}var Im=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]*$"),Bc={},Lc={};function Pm(e){return Ms.call(Lc,e)?!0:Ms.call(Bc,e)?!1:Im.test(e)?Lc[e]=!0:(Bc[e]=!0,!1)}function ui(e,t,n){if(Pm(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function ri(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Qt(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}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 qc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ep(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var i=a.get,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(d){n=""+d,u.call(this,d)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(d){n=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gs(e){if(!e._valueTracker){var t=qc(e)?"checked":"value";e._valueTracker=ep(e,t,""+e[t])}}function Gc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=qc(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function ci(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 tp=/[\n"\\]/g;function Tt(e){return e.replace(tp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ys(e,t,n,a,i,u,d,m){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Et(t)):e.value!==""+Et(t)&&(e.value=""+Et(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?Vs(e,d,Et(t)):n!=null?Vs(e,d,Et(n)):a!=null&&e.removeAttribute("value"),i==null&&u!=null&&(e.defaultChecked=!!u),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Et(m):e.removeAttribute("name")}function Yc(e,t,n,a,i,u,d,m){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Gs(e);return}n=n!=null?""+Et(n):"",t=t!=null?""+Et(t):n,m||t===e.value||(e.value=t),e.defaultValue=t}a=a??i,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=m?e.checked:!!a,e.defaultChecked=!!a,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),Gs(e)}function Vs(e,t,n){t==="number"&&ci(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function fa(e,t,n,a){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Et(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,a&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Vc(e,t,n){if(t!=null&&(t=""+Et(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Et(n):""}function Xc(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(c(92));if(te(a)){if(1<a.length)throw Error(c(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Et(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Gs(e)}function ha(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var np=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 Qc(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||np.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Zc(e,t,n){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var i in t)a=t[i],t.hasOwnProperty(i)&&n[i]!==a&&Qc(e,i,a)}else for(var u in t)t.hasOwnProperty(u)&&Qc(e,u,t[u])}function Xs(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 ap=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"]]),lp=/^[\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 oi(e){return lp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zt(){}var Qs=null;function Zs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ma=null,pa=null;function Jc(e){var t=ca(e);if(t&&(e=t.stateNode)){var n=e[st]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ys(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Tt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var i=a[st]||null;if(!i)throw Error(c(90));Ys(a,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&Gc(a)}break e;case"textarea":Vc(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&fa(e,!!n.multiple,t,!1)}}}var Js=!1;function Kc(e,t,n){if(Js)return e(t,n);Js=!0;try{var a=e(t);return a}finally{if(Js=!1,(ma!==null||pa!==null)&&(Wi(),ma&&(t=ma,e=pa,pa=ma=null,Jc(t),e)))for(t=0;t<e.length;t++)Jc(e[t])}}function Pa(e,t){var n=e.stateNode;if(n===null)return null;var a=n[st]||null;if(a===null)return null;n=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(c(231,t,typeof n));return n}var Jt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ks=!1;if(Jt)try{var el={};Object.defineProperty(el,"passive",{get:function(){Ks=!0}}),window.addEventListener("test",el,el),window.removeEventListener("test",el,el)}catch{Ks=!1}var pn=null,$s=null,di=null;function $c(){if(di)return di;var e,t=$s,n=t.length,a,i="value"in pn?pn.value:pn.textContent,u=i.length;for(e=0;e<n&&t[e]===i[e];e++);var d=n-e;for(a=1;a<=d&&t[n-a]===i[u-a];a++);return di=i.slice(e,1<a?1-a:void 0)}function fi(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 hi(){return!0}function Fc(){return!1}function ut(e){function t(n,a,i,u,d){this._reactName=n,this._targetInst=i,this.type=a,this.nativeEvent=u,this.target=d,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(n=e[m],this[m]=n?n(u):u[m]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?hi:Fc,this.isPropagationStopped=Fc,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=hi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=hi)},persist:function(){},isPersistent:hi}),t}var Vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mi=ut(Vn),tl=v({},Vn,{view:0,detail:0}),ip=ut(tl),Fs,Ws,nl,pi=v({},tl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ps,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"?(Fs=e.screenX-nl.screenX,Ws=e.screenY-nl.screenY):Ws=Fs=0,nl=e),Fs)},movementY:function(e){return"movementY"in e?e.movementY:Ws}}),Wc=ut(pi),sp=v({},pi,{dataTransfer:0}),up=ut(sp),rp=v({},tl,{relatedTarget:0}),Is=ut(rp),cp=v({},Vn,{animationName:0,elapsedTime:0,pseudoElement:0}),op=ut(cp),dp=v({},Vn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),fp=ut(dp),hp=v({},Vn,{data:0}),Ic=ut(hp),mp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pp={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"},gp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=gp[e])?!!t[e]:!1}function Ps(){return yp}var vp=v({},tl,{key:function(e){if(e.key){var t=mp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?pp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ps,charCode:function(e){return e.type==="keypress"?fi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),xp=ut(vp),bp=v({},pi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pc=ut(bp),jp=v({},tl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ps}),Sp=ut(jp),Ep=v({},Vn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Tp=ut(Ep),_p=v({},pi,{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}),Np=ut(_p),wp=v({},Vn,{newState:0,oldState:0}),Cp=ut(wp),Ap=[9,13,27,32],eu=Jt&&"CompositionEvent"in window,al=null;Jt&&"documentMode"in document&&(al=document.documentMode);var Rp=Jt&&"TextEvent"in window&&!al,eo=Jt&&(!eu||al&&8<al&&11>=al),to=" ",no=!1;function ao(e,t){switch(e){case"keyup":return Ap.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ga=!1;function kp(e,t){switch(e){case"compositionend":return lo(t);case"keypress":return t.which!==32?null:(no=!0,to);case"textInput":return e=t.data,e===to&&no?null:e;default:return null}}function zp(e,t){if(ga)return e==="compositionend"||!eu&&ao(e,t)?(e=$c(),di=$s=pn=null,ga=!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 eo&&t.locale!=="ko"?null:t.data;default:return null}}var Mp={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 io(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Mp[e.type]:t==="textarea"}function so(e,t,n,a){ma?pa?pa.push(a):pa=[a]:ma=a,t=ls(t,"onChange"),0<t.length&&(n=new mi("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var ll=null,il=null;function Op(e){Xf(e,0)}function gi(e){var t=Ia(e);if(Gc(t))return e}function uo(e,t){if(e==="change")return t}var ro=!1;if(Jt){var tu;if(Jt){var nu="oninput"in document;if(!nu){var co=document.createElement("div");co.setAttribute("oninput","return;"),nu=typeof co.oninput=="function"}tu=nu}else tu=!1;ro=tu&&(!document.documentMode||9<document.documentMode)}function oo(){ll&&(ll.detachEvent("onpropertychange",fo),il=ll=null)}function fo(e){if(e.propertyName==="value"&&gi(il)){var t=[];so(t,il,e,Zs(e)),Kc(Op,t)}}function Dp(e,t,n){e==="focusin"?(oo(),ll=t,il=n,ll.attachEvent("onpropertychange",fo)):e==="focusout"&&oo()}function Up(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gi(il)}function Hp(e,t){if(e==="click")return gi(t)}function Bp(e,t){if(e==="input"||e==="change")return gi(t)}function Lp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gt=typeof Object.is=="function"?Object.is:Lp;function sl(e,t){if(gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var i=n[a];if(!Ms.call(t,i)||!gt(e[i],t[i]))return!1}return!0}function ho(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mo(e,t){var n=ho(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ho(n)}}function po(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?po(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function go(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ci(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ci(e.document)}return t}function au(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 qp=Jt&&"documentMode"in document&&11>=document.documentMode,ya=null,lu=null,ul=null,iu=!1;function yo(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;iu||ya==null||ya!==ci(a)||(a=ya,"selectionStart"in a&&au(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),ul&&sl(ul,a)||(ul=a,a=ls(lu,"onSelect"),0<a.length&&(t=new mi("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=ya)))}function Xn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var va={animationend:Xn("Animation","AnimationEnd"),animationiteration:Xn("Animation","AnimationIteration"),animationstart:Xn("Animation","AnimationStart"),transitionrun:Xn("Transition","TransitionRun"),transitionstart:Xn("Transition","TransitionStart"),transitioncancel:Xn("Transition","TransitionCancel"),transitionend:Xn("Transition","TransitionEnd")},su={},vo={};Jt&&(vo=document.createElement("div").style,"AnimationEvent"in window||(delete va.animationend.animation,delete va.animationiteration.animation,delete va.animationstart.animation),"TransitionEvent"in window||delete va.transitionend.transition);function Qn(e){if(su[e])return su[e];if(!va[e])return e;var t=va[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in vo)return su[e]=t[n];return e}var xo=Qn("animationend"),bo=Qn("animationiteration"),jo=Qn("animationstart"),Gp=Qn("transitionrun"),Yp=Qn("transitionstart"),Vp=Qn("transitioncancel"),So=Qn("transitionend"),Eo=new Map,uu="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(" ");uu.push("scrollEnd");function Ot(e,t){Eo.set(e,t),Yn(t,[e])}var yi=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},_t=[],xa=0,ru=0;function vi(){for(var e=xa,t=ru=xa=0;t<e;){var n=_t[t];_t[t++]=null;var a=_t[t];_t[t++]=null;var i=_t[t];_t[t++]=null;var u=_t[t];if(_t[t++]=null,a!==null&&i!==null){var d=a.pending;d===null?i.next=i:(i.next=d.next,d.next=i),a.pending=i}u!==0&&To(n,i,u)}}function xi(e,t,n,a){_t[xa++]=e,_t[xa++]=t,_t[xa++]=n,_t[xa++]=a,ru|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function cu(e,t,n,a){return xi(e,t,n,a),bi(e)}function Zn(e,t){return xi(e,null,null,t),bi(e)}function To(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var i=!1,u=e.return;u!==null;)u.childLanes|=n,a=u.alternate,a!==null&&(a.childLanes|=n),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(i=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,i&&t!==null&&(i=31-pt(n),e=u.hiddenUpdates,a=e[i],a===null?e[i]=[t]:a.push(t),t.lane=n|536870912),u):null}function bi(e){if(50<Al)throw Al=0,vr=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ba={};function Xp(e,t,n,a){this.tag=e,this.key=n,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,t,n,a){return new Xp(e,t,n,a)}function ou(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kt(e,t){var n=e.alternate;return n===null?(n=yt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function _o(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ji(e,t,n,a,i,u){var d=0;if(a=e,typeof e=="function")ou(e)&&(d=1);else if(typeof e=="string")d=$g(e,n,Q.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case fe:return e=yt(31,n,t,i),e.elementType=fe,e.lanes=u,e;case k:return Jn(n.children,i,u,t);case D:d=8,i|=24;break;case G:return e=yt(12,n,t,i|2),e.elementType=G,e.lanes=u,e;case J:return e=yt(13,n,t,i),e.elementType=J,e.lanes=u,e;case K:return e=yt(19,n,t,i),e.elementType=K,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case L:d=10;break e;case W:d=9;break e;case M:d=11;break e;case X:d=14;break e;case ue:d=16,a=null;break e}d=29,n=Error(c(130,e===null?"null":typeof e,"")),a=null}return t=yt(d,n,t,i),t.elementType=e,t.type=a,t.lanes=u,t}function Jn(e,t,n,a){return e=yt(7,e,a,t),e.lanes=n,e}function du(e,t,n){return e=yt(6,e,null,t),e.lanes=n,e}function No(e){var t=yt(18,null,null,0);return t.stateNode=e,t}function fu(e,t,n){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var wo=new WeakMap;function Nt(e,t){if(typeof e=="object"&&e!==null){var n=wo.get(e);return n!==void 0?n:(t={value:e,source:t,stack:_c(t)},wo.set(e,t),t)}return{value:e,source:t,stack:_c(t)}}var ja=[],Sa=0,Si=null,rl=0,wt=[],Ct=0,gn=null,Bt=1,Lt="";function $t(e,t){ja[Sa++]=rl,ja[Sa++]=Si,Si=e,rl=t}function Co(e,t,n){wt[Ct++]=Bt,wt[Ct++]=Lt,wt[Ct++]=gn,gn=e;var a=Bt;e=Lt;var i=32-pt(a)-1;a&=~(1<<i),n+=1;var u=32-pt(t)+i;if(30<u){var d=i-i%5;u=(a&(1<<d)-1).toString(32),a>>=d,i-=d,Bt=1<<32-pt(t)+i|n<<i|a,Lt=u+e}else Bt=1<<u|n<<i|a,Lt=e}function hu(e){e.return!==null&&($t(e,1),Co(e,1,0))}function mu(e){for(;e===Si;)Si=ja[--Sa],ja[Sa]=null,rl=ja[--Sa],ja[Sa]=null;for(;e===gn;)gn=wt[--Ct],wt[Ct]=null,Lt=wt[--Ct],wt[Ct]=null,Bt=wt[--Ct],wt[Ct]=null}function Ao(e,t){wt[Ct++]=Bt,wt[Ct++]=Lt,wt[Ct++]=gn,Bt=t.id,Lt=t.overflow,gn=e}var We=null,Ae=null,ye=!1,yn=null,At=!1,pu=Error(c(519));function vn(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cl(Nt(t,e)),pu}function Ro(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Fe]=e,t[st]=a,n){case"dialog":me("cancel",t),me("close",t);break;case"iframe":case"object":case"embed":me("load",t);break;case"video":case"audio":for(n=0;n<kl.length;n++)me(kl[n],t);break;case"source":me("error",t);break;case"img":case"image":case"link":me("error",t),me("load",t);break;case"details":me("toggle",t);break;case"input":me("invalid",t),Yc(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":me("invalid",t);break;case"textarea":me("invalid",t),Xc(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||Kf(t.textContent,n)?(a.popover!=null&&(me("beforetoggle",t),me("toggle",t)),a.onScroll!=null&&me("scroll",t),a.onScrollEnd!=null&&me("scrollend",t),a.onClick!=null&&(t.onclick=Zt),t=!0):t=!1,t||vn(e,!0)}function ko(e){for(We=e.return;We;)switch(We.tag){case 5:case 31:case 13:At=!1;return;case 27:case 3:At=!0;return;default:We=We.return}}function Ea(e){if(e!==We)return!1;if(!ye)return ko(e),ye=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Mr(e.type,e.memoizedProps)),n=!n),n&&Ae&&vn(e),ko(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ae=ah(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ae=ah(e)}else t===27?(t=Ae,zn(e.type)?(e=Br,Br=null,Ae=e):Ae=t):Ae=We?kt(e.stateNode.nextSibling):null;return!0}function Kn(){Ae=We=null,ye=!1}function gu(){var e=yn;return e!==null&&(dt===null?dt=e:dt.push.apply(dt,e),yn=null),e}function cl(e){yn===null?yn=[e]:yn.push(e)}var yu=j(null),$n=null,Ft=null;function xn(e,t,n){V(yu,t._currentValue),t._currentValue=n}function Wt(e){e._currentValue=yu.current,w(yu)}function vu(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function xu(e,t,n,a){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var u=i.dependencies;if(u!==null){var d=i.child;u=u.firstContext;e:for(;u!==null;){var m=u;u=i;for(var b=0;b<t.length;b++)if(m.context===t[b]){u.lanes|=n,m=u.alternate,m!==null&&(m.lanes|=n),vu(u.return,n,e),a||(d=null);break e}u=m.next}}else if(i.tag===18){if(d=i.return,d===null)throw Error(c(341));d.lanes|=n,u=d.alternate,u!==null&&(u.lanes|=n),vu(d,n,e),d=null}else d=i.child;if(d!==null)d.return=i;else for(d=i;d!==null;){if(d===e){d=null;break}if(i=d.sibling,i!==null){i.return=d.return,d=i;break}d=d.return}i=d}}function Ta(e,t,n,a){e=null;for(var i=t,u=!1;i!==null;){if(!u){if((i.flags&524288)!==0)u=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var d=i.alternate;if(d===null)throw Error(c(387));if(d=d.memoizedProps,d!==null){var m=i.type;gt(i.pendingProps.value,d.value)||(e!==null?e.push(m):e=[m])}}else if(i===Se.current){if(d=i.alternate,d===null)throw Error(c(387));d.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Ul):e=[Ul])}i=i.return}e!==null&&xu(t,e,n,a),t.flags|=262144}function Ei(e){for(e=e.firstContext;e!==null;){if(!gt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Fn(e){$n=e,Ft=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ie(e){return zo($n,e)}function Ti(e,t){return $n===null&&Fn(e),zo(e,t)}function zo(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ft===null){if(e===null)throw Error(c(308));Ft=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ft=Ft.next=t;return n}var Qp=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Zp=s.unstable_scheduleCallback,Jp=s.unstable_NormalPriority,Ve={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function bu(){return{controller:new Qp,data:new Map,refCount:0}}function ol(e){e.refCount--,e.refCount===0&&Zp(Jp,function(){e.controller.abort()})}var dl=null,ju=0,_a=0,Na=null;function Kp(e,t){if(dl===null){var n=dl=[];ju=0,_a=Tr(),Na={status:"pending",value:void 0,then:function(a){n.push(a)}}}return ju++,t.then(Mo,Mo),t}function Mo(){if(--ju===0&&dl!==null){Na!==null&&(Na.status="fulfilled");var e=dl;dl=null,_a=0,Na=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function $p(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(a.status="rejected",a.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),a}var Oo=z.S;z.S=function(e,t){vf=ht(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Kp(e,t),Oo!==null&&Oo(e,t)};var Wn=j(null);function Su(){var e=Wn.current;return e!==null?e:Ce.pooledCache}function _i(e,t){t===null?V(Wn,Wn.current):V(Wn,t.pool)}function Do(){var e=Su();return e===null?null:{parent:Ve._currentValue,pool:e}}var wa=Error(c(460)),Eu=Error(c(474)),Ni=Error(c(542)),wi={then:function(){}};function Uo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ho(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Zt,Zt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Lo(e),e;default:if(typeof t.status=="string")t.then(Zt,Zt);else{if(e=Ce,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=a}},function(a){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Lo(e),e}throw Pn=t,wa}}function In(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Pn=n,wa):n}}var Pn=null;function Bo(){if(Pn===null)throw Error(c(459));var e=Pn;return Pn=null,e}function Lo(e){if(e===wa||e===Ni)throw Error(c(483))}var Ca=null,fl=0;function Ci(e){var t=fl;return fl+=1,Ca===null&&(Ca=[]),Ho(Ca,e,t)}function hl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ai(e,t){throw t.$$typeof===N?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function qo(e){function t(_,T){if(e){var C=_.deletions;C===null?(_.deletions=[T],_.flags|=16):C.push(T)}}function n(_,T){if(!e)return null;for(;T!==null;)t(_,T),T=T.sibling;return null}function a(_){for(var T=new Map;_!==null;)_.key!==null?T.set(_.key,_):T.set(_.index,_),_=_.sibling;return T}function i(_,T){return _=Kt(_,T),_.index=0,_.sibling=null,_}function u(_,T,C){return _.index=C,e?(C=_.alternate,C!==null?(C=C.index,C<T?(_.flags|=67108866,T):C):(_.flags|=67108866,T)):(_.flags|=1048576,T)}function d(_){return e&&_.alternate===null&&(_.flags|=67108866),_}function m(_,T,C,q){return T===null||T.tag!==6?(T=du(C,_.mode,q),T.return=_,T):(T=i(T,C),T.return=_,T)}function b(_,T,C,q){var ee=C.type;return ee===k?B(_,T,C.props.children,q,C.key):T!==null&&(T.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===ue&&In(ee)===T.type)?(T=i(T,C.props),hl(T,C),T.return=_,T):(T=ji(C.type,C.key,C.props,null,_.mode,q),hl(T,C),T.return=_,T)}function A(_,T,C,q){return T===null||T.tag!==4||T.stateNode.containerInfo!==C.containerInfo||T.stateNode.implementation!==C.implementation?(T=fu(C,_.mode,q),T.return=_,T):(T=i(T,C.children||[]),T.return=_,T)}function B(_,T,C,q,ee){return T===null||T.tag!==7?(T=Jn(C,_.mode,q,ee),T.return=_,T):(T=i(T,C),T.return=_,T)}function Y(_,T,C){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=du(""+T,_.mode,C),T.return=_,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case H:return C=ji(T.type,T.key,T.props,null,_.mode,C),hl(C,T),C.return=_,C;case U:return T=fu(T,_.mode,C),T.return=_,T;case ue:return T=In(T),Y(_,T,C)}if(te(T)||ze(T))return T=Jn(T,_.mode,C,null),T.return=_,T;if(typeof T.then=="function")return Y(_,Ci(T),C);if(T.$$typeof===L)return Y(_,Ti(_,T),C);Ai(_,T)}return null}function R(_,T,C,q){var ee=T!==null?T.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return ee!==null?null:m(_,T,""+C,q);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case H:return C.key===ee?b(_,T,C,q):null;case U:return C.key===ee?A(_,T,C,q):null;case ue:return C=In(C),R(_,T,C,q)}if(te(C)||ze(C))return ee!==null?null:B(_,T,C,q,null);if(typeof C.then=="function")return R(_,T,Ci(C),q);if(C.$$typeof===L)return R(_,T,Ti(_,C),q);Ai(_,C)}return null}function O(_,T,C,q,ee){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return _=_.get(C)||null,m(T,_,""+q,ee);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case H:return _=_.get(q.key===null?C:q.key)||null,b(T,_,q,ee);case U:return _=_.get(q.key===null?C:q.key)||null,A(T,_,q,ee);case ue:return q=In(q),O(_,T,C,q,ee)}if(te(q)||ze(q))return _=_.get(C)||null,B(T,_,q,ee,null);if(typeof q.then=="function")return O(_,T,C,Ci(q),ee);if(q.$$typeof===L)return O(_,T,C,Ti(T,q),ee);Ai(T,q)}return null}function I(_,T,C,q){for(var ee=null,xe=null,P=T,oe=T=0,ge=null;P!==null&&oe<C.length;oe++){P.index>oe?(ge=P,P=null):ge=P.sibling;var be=R(_,P,C[oe],q);if(be===null){P===null&&(P=ge);break}e&&P&&be.alternate===null&&t(_,P),T=u(be,T,oe),xe===null?ee=be:xe.sibling=be,xe=be,P=ge}if(oe===C.length)return n(_,P),ye&&$t(_,oe),ee;if(P===null){for(;oe<C.length;oe++)P=Y(_,C[oe],q),P!==null&&(T=u(P,T,oe),xe===null?ee=P:xe.sibling=P,xe=P);return ye&&$t(_,oe),ee}for(P=a(P);oe<C.length;oe++)ge=O(P,_,oe,C[oe],q),ge!==null&&(e&&ge.alternate!==null&&P.delete(ge.key===null?oe:ge.key),T=u(ge,T,oe),xe===null?ee=ge:xe.sibling=ge,xe=ge);return e&&P.forEach(function(Hn){return t(_,Hn)}),ye&&$t(_,oe),ee}function le(_,T,C,q){if(C==null)throw Error(c(151));for(var ee=null,xe=null,P=T,oe=T=0,ge=null,be=C.next();P!==null&&!be.done;oe++,be=C.next()){P.index>oe?(ge=P,P=null):ge=P.sibling;var Hn=R(_,P,be.value,q);if(Hn===null){P===null&&(P=ge);break}e&&P&&Hn.alternate===null&&t(_,P),T=u(Hn,T,oe),xe===null?ee=Hn:xe.sibling=Hn,xe=Hn,P=ge}if(be.done)return n(_,P),ye&&$t(_,oe),ee;if(P===null){for(;!be.done;oe++,be=C.next())be=Y(_,be.value,q),be!==null&&(T=u(be,T,oe),xe===null?ee=be:xe.sibling=be,xe=be);return ye&&$t(_,oe),ee}for(P=a(P);!be.done;oe++,be=C.next())be=O(P,_,oe,be.value,q),be!==null&&(e&&be.alternate!==null&&P.delete(be.key===null?oe:be.key),T=u(be,T,oe),xe===null?ee=be:xe.sibling=be,xe=be);return e&&P.forEach(function(sy){return t(_,sy)}),ye&&$t(_,oe),ee}function we(_,T,C,q){if(typeof C=="object"&&C!==null&&C.type===k&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case H:e:{for(var ee=C.key;T!==null;){if(T.key===ee){if(ee=C.type,ee===k){if(T.tag===7){n(_,T.sibling),q=i(T,C.props.children),q.return=_,_=q;break e}}else if(T.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===ue&&In(ee)===T.type){n(_,T.sibling),q=i(T,C.props),hl(q,C),q.return=_,_=q;break e}n(_,T);break}else t(_,T);T=T.sibling}C.type===k?(q=Jn(C.props.children,_.mode,q,C.key),q.return=_,_=q):(q=ji(C.type,C.key,C.props,null,_.mode,q),hl(q,C),q.return=_,_=q)}return d(_);case U:e:{for(ee=C.key;T!==null;){if(T.key===ee)if(T.tag===4&&T.stateNode.containerInfo===C.containerInfo&&T.stateNode.implementation===C.implementation){n(_,T.sibling),q=i(T,C.children||[]),q.return=_,_=q;break e}else{n(_,T);break}else t(_,T);T=T.sibling}q=fu(C,_.mode,q),q.return=_,_=q}return d(_);case ue:return C=In(C),we(_,T,C,q)}if(te(C))return I(_,T,C,q);if(ze(C)){if(ee=ze(C),typeof ee!="function")throw Error(c(150));return C=ee.call(C),le(_,T,C,q)}if(typeof C.then=="function")return we(_,T,Ci(C),q);if(C.$$typeof===L)return we(_,T,Ti(_,C),q);Ai(_,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,T!==null&&T.tag===6?(n(_,T.sibling),q=i(T,C),q.return=_,_=q):(n(_,T),q=du(C,_.mode,q),q.return=_,_=q),d(_)):n(_,T)}return function(_,T,C,q){try{fl=0;var ee=we(_,T,C,q);return Ca=null,ee}catch(P){if(P===wa||P===Ni)throw P;var xe=yt(29,P,null,_.mode);return xe.lanes=q,xe.return=_,xe}finally{}}}var ea=qo(!0),Go=qo(!1),bn=!1;function Tu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _u(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 jn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sn(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(je&2)!==0){var i=a.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),a.pending=t,t=bi(e),To(e,null,n),t}return xi(e,a,t,n),bi(e)}function ml(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,kc(e,n)}}function Nu(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var i=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var d={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?i=u=d:u=u.next=d,n=n.next}while(n!==null);u===null?i=u=t:u=u.next=t}else i=u=t;n={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var wu=!1;function pl(){if(wu){var e=Na;if(e!==null)throw e}}function gl(e,t,n,a){wu=!1;var i=e.updateQueue;bn=!1;var u=i.firstBaseUpdate,d=i.lastBaseUpdate,m=i.shared.pending;if(m!==null){i.shared.pending=null;var b=m,A=b.next;b.next=null,d===null?u=A:d.next=A,d=b;var B=e.alternate;B!==null&&(B=B.updateQueue,m=B.lastBaseUpdate,m!==d&&(m===null?B.firstBaseUpdate=A:m.next=A,B.lastBaseUpdate=b))}if(u!==null){var Y=i.baseState;d=0,B=A=b=null,m=u;do{var R=m.lane&-536870913,O=R!==m.lane;if(O?(pe&R)===R:(a&R)===R){R!==0&&R===_a&&(wu=!0),B!==null&&(B=B.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var I=e,le=m;R=t;var we=n;switch(le.tag){case 1:if(I=le.payload,typeof I=="function"){Y=I.call(we,Y,R);break e}Y=I;break e;case 3:I.flags=I.flags&-65537|128;case 0:if(I=le.payload,R=typeof I=="function"?I.call(we,Y,R):I,R==null)break e;Y=v({},Y,R);break e;case 2:bn=!0}}R=m.callback,R!==null&&(e.flags|=64,O&&(e.flags|=8192),O=i.callbacks,O===null?i.callbacks=[R]:O.push(R))}else O={lane:R,tag:m.tag,payload:m.payload,callback:m.callback,next:null},B===null?(A=B=O,b=Y):B=B.next=O,d|=R;if(m=m.next,m===null){if(m=i.shared.pending,m===null)break;O=m,m=O.next,O.next=null,i.lastBaseUpdate=O,i.shared.pending=null}}while(!0);B===null&&(b=Y),i.baseState=b,i.firstBaseUpdate=A,i.lastBaseUpdate=B,u===null&&(i.shared.lanes=0),wn|=d,e.lanes=d,e.memoizedState=Y}}function Yo(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Vo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Yo(n[e],t)}var Aa=j(null),Ri=j(0);function Xo(e,t){e=un,V(Ri,e),V(Aa,t),un=e|t.baseLanes}function Cu(){V(Ri,un),V(Aa,Aa.current)}function Au(){un=Ri.current,w(Aa),w(Ri)}var vt=j(null),Rt=null;function En(e){var t=e.alternate;V(Ge,Ge.current&1),V(vt,e),Rt===null&&(t===null||Aa.current!==null||t.memoizedState!==null)&&(Rt=e)}function Ru(e){V(Ge,Ge.current),V(vt,e),Rt===null&&(Rt=e)}function Qo(e){e.tag===22?(V(Ge,Ge.current),V(vt,e),Rt===null&&(Rt=e)):Tn()}function Tn(){V(Ge,Ge.current),V(vt,vt.current)}function xt(e){w(vt),Rt===e&&(Rt=null),w(Ge)}var Ge=j(0);function ki(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Ur(n)||Hr(n)))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 It=0,ce=null,_e=null,Xe=null,zi=!1,Ra=!1,ta=!1,Mi=0,yl=0,ka=null,Fp=0;function Be(){throw Error(c(321))}function ku(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gt(e[n],t[n]))return!1;return!0}function zu(e,t,n,a,i,u){return It=u,ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?Cd:Ju,ta=!1,u=n(a,i),ta=!1,Ra&&(u=Jo(t,n,a,i)),Zo(e),u}function Zo(e){z.H=bl;var t=_e!==null&&_e.next!==null;if(It=0,Xe=_e=ce=null,zi=!1,yl=0,ka=null,t)throw Error(c(300));e===null||Qe||(e=e.dependencies,e!==null&&Ei(e)&&(Qe=!0))}function Jo(e,t,n,a){ce=e;var i=0;do{if(Ra&&(ka=null),yl=0,Ra=!1,25<=i)throw Error(c(301));if(i+=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)}z.H=Ad,u=t(n,a)}while(Ra);return u}function Wp(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?vl(t):t,e=e.useState()[0],(_e!==null?_e.memoizedState:null)!==e&&(ce.flags|=1024),t}function Mu(){var e=Mi!==0;return Mi=0,e}function Ou(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Du(e){if(zi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}zi=!1}It=0,Xe=_e=ce=null,Ra=!1,yl=Mi=0,ka=null}function it(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?ce.memoizedState=Xe=e:Xe=Xe.next=e,Xe}function Ye(){if(_e===null){var e=ce.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Xe===null?ce.memoizedState:Xe.next;if(t!==null)Xe=t,_e=e;else{if(e===null)throw ce.alternate===null?Error(c(467)):Error(c(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},Xe===null?ce.memoizedState=Xe=e:Xe=Xe.next=e}return Xe}function Oi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vl(e){var t=yl;return yl+=1,ka===null&&(ka=[]),e=Ho(ka,e,t),t=ce,(Xe===null?t.memoizedState:Xe.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?Cd:Ju),e}function Di(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return vl(e);if(e.$$typeof===L)return Ie(e)}throw Error(c(438,String(e)))}function Uu(e){var t=null,n=ce.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=ce.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Oi(),ce.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=He;return t.index++,n}function Pt(e,t){return typeof t=="function"?t(e):t}function Ui(e){var t=Ye();return Hu(t,_e,e)}function Hu(e,t,n){var a=e.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=n;var i=e.baseQueue,u=a.pending;if(u!==null){if(i!==null){var d=i.next;i.next=u.next,u.next=d}t.baseQueue=i=u,a.pending=null}if(u=e.baseState,i===null)e.memoizedState=u;else{t=i.next;var m=d=null,b=null,A=t,B=!1;do{var Y=A.lane&-536870913;if(Y!==A.lane?(pe&Y)===Y:(It&Y)===Y){var R=A.revertLane;if(R===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),Y===_a&&(B=!0);else if((It&R)===R){A=A.next,R===_a&&(B=!0);continue}else Y={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},b===null?(m=b=Y,d=u):b=b.next=Y,ce.lanes|=R,wn|=R;Y=A.action,ta&&n(u,Y),u=A.hasEagerState?A.eagerState:n(u,Y)}else R={lane:Y,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},b===null?(m=b=R,d=u):b=b.next=R,ce.lanes|=Y,wn|=Y;A=A.next}while(A!==null&&A!==t);if(b===null?d=u:b.next=m,!gt(u,e.memoizedState)&&(Qe=!0,B&&(n=Na,n!==null)))throw n;e.memoizedState=u,e.baseState=d,e.baseQueue=b,a.lastRenderedState=u}return i===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Bu(e){var t=Ye(),n=t.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=e;var a=n.dispatch,i=n.pending,u=t.memoizedState;if(i!==null){n.pending=null;var d=i=i.next;do u=e(u,d.action),d=d.next;while(d!==i);gt(u,t.memoizedState)||(Qe=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,a]}function Ko(e,t,n){var a=ce,i=Ye(),u=ye;if(u){if(n===void 0)throw Error(c(407));n=n()}else n=t();var d=!gt((_e||i).memoizedState,n);if(d&&(i.memoizedState=n,Qe=!0),i=i.queue,Gu(Wo.bind(null,a,i,e),[e]),i.getSnapshot!==t||d||Xe!==null&&Xe.memoizedState.tag&1){if(a.flags|=2048,za(9,{destroy:void 0},Fo.bind(null,a,i,n,t),null),Ce===null)throw Error(c(349));u||(It&127)!==0||$o(a,t,n)}return n}function $o(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ce.updateQueue,t===null?(t=Oi(),ce.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Fo(e,t,n,a){t.value=n,t.getSnapshot=a,Io(t)&&Po(e)}function Wo(e,t,n){return n(function(){Io(t)&&Po(e)})}function Io(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gt(e,n)}catch{return!0}}function Po(e){var t=Zn(e,2);t!==null&&ft(t,e,2)}function Lu(e){var t=it();if(typeof e=="function"){var n=e;if(e=n(),ta){hn(!0);try{n()}finally{hn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:e},t}function ed(e,t,n,a){return e.baseState=n,Hu(e,_e,typeof a=="function"?a:Pt)}function Ip(e,t,n,a,i){if(Li(e))throw Error(c(485));if(e=t.action,e!==null){var u={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){u.listeners.push(d)}};z.T!==null?n(!0):u.isTransition=!1,a(u),n=t.pending,n===null?(u.next=t.pending=u,td(t,u)):(u.next=n.next,t.pending=n.next=u)}}function td(e,t){var n=t.action,a=t.payload,i=e.state;if(t.isTransition){var u=z.T,d={};z.T=d;try{var m=n(i,a),b=z.S;b!==null&&b(d,m),nd(e,t,m)}catch(A){qu(e,t,A)}finally{u!==null&&d.types!==null&&(u.types=d.types),z.T=u}}else try{u=n(i,a),nd(e,t,u)}catch(A){qu(e,t,A)}}function nd(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){ad(e,t,a)},function(a){return qu(e,t,a)}):ad(e,t,n)}function ad(e,t,n){t.status="fulfilled",t.value=n,ld(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,td(e,n)))}function qu(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,ld(t),t=t.next;while(t!==a)}e.action=null}function ld(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function id(e,t){return t}function sd(e,t){if(ye){var n=Ce.formState;if(n!==null){e:{var a=ce;if(ye){if(Ae){t:{for(var i=Ae,u=At;i.nodeType!==8;){if(!u){i=null;break t}if(i=kt(i.nextSibling),i===null){i=null;break t}}u=i.data,i=u==="F!"||u==="F"?i:null}if(i){Ae=kt(i.nextSibling),a=i.data==="F!";break e}}vn(a)}a=!1}a&&(t=n[0])}}return n=it(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:id,lastRenderedState:t},n.queue=a,n=_d.bind(null,ce,a),a.dispatch=n,a=Lu(!1),u=Zu.bind(null,ce,!1,a.queue),a=it(),i={state:t,dispatch:null,action:e,pending:null},a.queue=i,n=Ip.bind(null,ce,i,u,n),i.dispatch=n,a.memoizedState=e,[t,n,!1]}function ud(e){var t=Ye();return rd(t,_e,e)}function rd(e,t,n){if(t=Hu(e,t,id)[0],e=Ui(Pt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=vl(t)}catch(d){throw d===wa?Ni:d}else a=t;t=Ye();var i=t.queue,u=i.dispatch;return n!==t.memoizedState&&(ce.flags|=2048,za(9,{destroy:void 0},Pp.bind(null,i,n),null)),[a,u,e]}function Pp(e,t){e.action=t}function cd(e){var t=Ye(),n=_e;if(n!==null)return rd(t,n,e);Ye(),t=t.memoizedState,n=Ye();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function za(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=ce.updateQueue,t===null&&(t=Oi(),ce.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function od(){return Ye().memoizedState}function Hi(e,t,n,a){var i=it();ce.flags|=e,i.memoizedState=za(1|t,{destroy:void 0},n,a===void 0?null:a)}function Bi(e,t,n,a){var i=Ye();a=a===void 0?null:a;var u=i.memoizedState.inst;_e!==null&&a!==null&&ku(a,_e.memoizedState.deps)?i.memoizedState=za(t,u,n,a):(ce.flags|=e,i.memoizedState=za(1|t,u,n,a))}function dd(e,t){Hi(8390656,8,e,t)}function Gu(e,t){Bi(2048,8,e,t)}function eg(e){ce.flags|=4;var t=ce.updateQueue;if(t===null)t=Oi(),ce.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function fd(e){var t=Ye().memoizedState;return eg({ref:t,nextImpl:e}),function(){if((je&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function hd(e,t){return Bi(4,2,e,t)}function md(e,t){return Bi(4,4,e,t)}function pd(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gd(e,t,n){n=n!=null?n.concat([e]):null,Bi(4,4,pd.bind(null,t,e),n)}function Yu(){}function yd(e,t){var n=Ye();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&ku(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function vd(e,t){var n=Ye();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&ku(t,a[1]))return a[0];if(a=e(),ta){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[a,t],a}function Vu(e,t,n){return n===void 0||(It&1073741824)!==0&&(pe&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=bf(),ce.lanes|=e,wn|=e,n)}function xd(e,t,n,a){return gt(n,t)?n:Aa.current!==null?(e=Vu(e,n,a),gt(e,t)||(Qe=!0),e):(It&42)===0||(It&1073741824)!==0&&(pe&261930)===0?(Qe=!0,e.memoizedState=n):(e=bf(),ce.lanes|=e,wn|=e,t)}function bd(e,t,n,a,i){var u=Z.p;Z.p=u!==0&&8>u?u:8;var d=z.T,m={};z.T=m,Zu(e,!1,t,n);try{var b=i(),A=z.S;if(A!==null&&A(m,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var B=$p(b,a);xl(e,t,B,St(e))}else xl(e,t,a,St(e))}catch(Y){xl(e,t,{then:function(){},status:"rejected",reason:Y},St())}finally{Z.p=u,d!==null&&m.types!==null&&(d.types=m.types),z.T=d}}function tg(){}function Xu(e,t,n,a){if(e.tag!==5)throw Error(c(476));var i=jd(e).queue;bd(e,i,t,ne,n===null?tg:function(){return Sd(e),n(a)})}function jd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Sd(e){var t=jd(e);t.next===null&&(t=e.alternate.memoizedState),xl(e,t.next.queue,{},St())}function Qu(){return Ie(Ul)}function Ed(){return Ye().memoizedState}function Td(){return Ye().memoizedState}function ng(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=St();e=jn(n);var a=Sn(t,e,n);a!==null&&(ft(a,t,n),ml(a,t,n)),t={cache:bu()},e.payload=t;return}t=t.return}}function ag(e,t,n){var a=St();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Li(e)?Nd(t,n):(n=cu(e,t,n,a),n!==null&&(ft(n,e,a),wd(n,t,a)))}function _d(e,t,n){var a=St();xl(e,t,n,a)}function xl(e,t,n,a){var i={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Li(e))Nd(t,i);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var d=t.lastRenderedState,m=u(d,n);if(i.hasEagerState=!0,i.eagerState=m,gt(m,d))return xi(e,t,i,0),Ce===null&&vi(),!1}catch{}finally{}if(n=cu(e,t,i,a),n!==null)return ft(n,e,a),wd(n,t,a),!0}return!1}function Zu(e,t,n,a){if(a={lane:2,revertLane:Tr(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Li(e)){if(t)throw Error(c(479))}else t=cu(e,n,a,2),t!==null&&ft(t,e,2)}function Li(e){var t=e.alternate;return e===ce||t!==null&&t===ce}function Nd(e,t){Ra=zi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function wd(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,kc(e,n)}}var bl={readContext:Ie,use:Di,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};bl.useEffectEvent=Be;var Cd={readContext:Ie,use:Di,useCallback:function(e,t){return it().memoizedState=[e,t===void 0?null:t],e},useContext:Ie,useEffect:dd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Hi(4194308,4,pd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hi(4194308,4,e,t)},useInsertionEffect:function(e,t){Hi(4,2,e,t)},useMemo:function(e,t){var n=it();t=t===void 0?null:t;var a=e();if(ta){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=it();if(n!==void 0){var i=n(t);if(ta){hn(!0);try{n(t)}finally{hn(!1)}}}else i=t;return a.memoizedState=a.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},a.queue=e,e=e.dispatch=ag.bind(null,ce,e),[a.memoizedState,e]},useRef:function(e){var t=it();return e={current:e},t.memoizedState=e},useState:function(e){e=Lu(e);var t=e.queue,n=_d.bind(null,ce,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Yu,useDeferredValue:function(e,t){var n=it();return Vu(n,e,t)},useTransition:function(){var e=Lu(!1);return e=bd.bind(null,ce,e.queue,!0,!1),it().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=ce,i=it();if(ye){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),Ce===null)throw Error(c(349));(pe&127)!==0||$o(a,t,n)}i.memoizedState=n;var u={value:n,getSnapshot:t};return i.queue=u,dd(Wo.bind(null,a,u,e),[e]),a.flags|=2048,za(9,{destroy:void 0},Fo.bind(null,a,u,n,t),null),n},useId:function(){var e=it(),t=Ce.identifierPrefix;if(ye){var n=Lt,a=Bt;n=(a&~(1<<32-pt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Mi++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Fp++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Qu,useFormState:sd,useActionState:sd,useOptimistic:function(e){var t=it();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Zu.bind(null,ce,!0,n),n.dispatch=t,[e,t]},useMemoCache:Uu,useCacheRefresh:function(){return it().memoizedState=ng.bind(null,ce)},useEffectEvent:function(e){var t=it(),n={impl:e};return t.memoizedState=n,function(){if((je&2)!==0)throw Error(c(440));return n.impl.apply(void 0,arguments)}}},Ju={readContext:Ie,use:Di,useCallback:yd,useContext:Ie,useEffect:Gu,useImperativeHandle:gd,useInsertionEffect:hd,useLayoutEffect:md,useMemo:vd,useReducer:Ui,useRef:od,useState:function(){return Ui(Pt)},useDebugValue:Yu,useDeferredValue:function(e,t){var n=Ye();return xd(n,_e.memoizedState,e,t)},useTransition:function(){var e=Ui(Pt)[0],t=Ye().memoizedState;return[typeof e=="boolean"?e:vl(e),t]},useSyncExternalStore:Ko,useId:Ed,useHostTransitionStatus:Qu,useFormState:ud,useActionState:ud,useOptimistic:function(e,t){var n=Ye();return ed(n,_e,e,t)},useMemoCache:Uu,useCacheRefresh:Td};Ju.useEffectEvent=fd;var Ad={readContext:Ie,use:Di,useCallback:yd,useContext:Ie,useEffect:Gu,useImperativeHandle:gd,useInsertionEffect:hd,useLayoutEffect:md,useMemo:vd,useReducer:Bu,useRef:od,useState:function(){return Bu(Pt)},useDebugValue:Yu,useDeferredValue:function(e,t){var n=Ye();return _e===null?Vu(n,e,t):xd(n,_e.memoizedState,e,t)},useTransition:function(){var e=Bu(Pt)[0],t=Ye().memoizedState;return[typeof e=="boolean"?e:vl(e),t]},useSyncExternalStore:Ko,useId:Ed,useHostTransitionStatus:Qu,useFormState:cd,useActionState:cd,useOptimistic:function(e,t){var n=Ye();return _e!==null?ed(n,_e,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Uu,useCacheRefresh:Td};Ad.useEffectEvent=fd;function Ku(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:v({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var $u={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=St(),i=jn(a);i.payload=t,n!=null&&(i.callback=n),t=Sn(e,i,a),t!==null&&(ft(t,e,a),ml(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=St(),i=jn(a);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Sn(e,i,a),t!==null&&(ft(t,e,a),ml(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=St(),a=jn(n);a.tag=2,t!=null&&(a.callback=t),t=Sn(e,a,n),t!==null&&(ft(t,e,n),ml(t,e,n))}};function Rd(e,t,n,a,i,u,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,d):t.prototype&&t.prototype.isPureReactComponent?!sl(n,a)||!sl(i,u):!0}function kd(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&$u.enqueueReplaceState(t,t.state,null)}function na(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=v({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function zd(e){yi(e)}function Md(e){console.error(e)}function Od(e){yi(e)}function qi(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Dd(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function Fu(e,t,n){return n=jn(n),n.tag=3,n.payload={element:null},n.callback=function(){qi(e,t)},n}function Ud(e){return e=jn(e),e.tag=3,e}function Hd(e,t,n,a){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var u=a.value;e.payload=function(){return i(u)},e.callback=function(){Dd(t,n,a)}}var d=n.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Dd(t,n,a),typeof i!="function"&&(Cn===null?Cn=new Set([this]):Cn.add(this));var m=a.stack;this.componentDidCatch(a.value,{componentStack:m!==null?m:""})})}function lg(e,t,n,a,i){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Ta(t,n,i,!0),n=vt.current,n!==null){switch(n.tag){case 31:case 13:return Rt===null?Ii():n.alternate===null&&Le===0&&(Le=3),n.flags&=-257,n.flags|=65536,n.lanes=i,a===wi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),jr(e,a,i)),!1;case 22:return n.flags|=65536,a===wi?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),jr(e,a,i)),!1}throw Error(c(435,n.tag))}return jr(e,a,i),Ii(),!1}if(ye)return t=vt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,a!==pu&&(e=Error(c(422),{cause:a}),cl(Nt(e,n)))):(a!==pu&&(t=Error(c(423),{cause:a}),cl(Nt(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,a=Nt(a,n),i=Fu(e.stateNode,a,i),Nu(e,i),Le!==4&&(Le=2)),!1;var u=Error(c(520),{cause:a});if(u=Nt(u,n),Cl===null?Cl=[u]:Cl.push(u),Le!==4&&(Le=2),t===null)return!0;a=Nt(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Fu(n.stateNode,a,e),Nu(n,e),!1;case 1:if(t=n.type,u=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Cn===null||!Cn.has(u))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Ud(i),Hd(i,e,n,a),Nu(n,i),!1}n=n.return}while(n!==null);return!1}var Wu=Error(c(461)),Qe=!1;function Pe(e,t,n,a){t.child=e===null?Go(t,null,n,a):ea(t,e.child,n,a)}function Bd(e,t,n,a,i){n=n.render;var u=t.ref;if("ref"in a){var d={};for(var m in a)m!=="ref"&&(d[m]=a[m])}else d=a;return Fn(t),a=zu(e,t,n,d,u,i),m=Mu(),e!==null&&!Qe?(Ou(e,t,i),en(e,t,i)):(ye&&m&&hu(t),t.flags|=1,Pe(e,t,a,i),t.child)}function Ld(e,t,n,a,i){if(e===null){var u=n.type;return typeof u=="function"&&!ou(u)&&u.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=u,qd(e,t,u,a,i)):(e=ji(n.type,null,a,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!ir(e,i)){var d=u.memoizedProps;if(n=n.compare,n=n!==null?n:sl,n(d,a)&&e.ref===t.ref)return en(e,t,i)}return t.flags|=1,e=Kt(u,a),e.ref=t.ref,e.return=t,t.child=e}function qd(e,t,n,a,i){if(e!==null){var u=e.memoizedProps;if(sl(u,a)&&e.ref===t.ref)if(Qe=!1,t.pendingProps=a=u,ir(e,i))(e.flags&131072)!==0&&(Qe=!0);else return t.lanes=e.lanes,en(e,t,i)}return Iu(e,t,n,a,i)}function Gd(e,t,n,a){var i=a.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|n:n,e!==null){for(a=t.child=e.child,i=0;a!==null;)i=i|a.lanes|a.childLanes,a=a.sibling;a=i&~u}else a=0,t.child=null;return Yd(e,t,u,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_i(t,u!==null?u.cachePool:null),u!==null?Xo(t,u):Cu(),Qo(t);else return a=t.lanes=536870912,Yd(e,t,u!==null?u.baseLanes|n:n,n,a)}else u!==null?(_i(t,u.cachePool),Xo(t,u),Tn(),t.memoizedState=null):(e!==null&&_i(t,null),Cu(),Tn());return Pe(e,t,i,n),t.child}function jl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Yd(e,t,n,a,i){var u=Su();return u=u===null?null:{parent:Ve._currentValue,pool:u},t.memoizedState={baseLanes:n,cachePool:u},e!==null&&_i(t,null),Cu(),Qo(t),e!==null&&Ta(e,t,a,!0),t.childLanes=i,null}function Gi(e,t){return t=Vi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Vd(e,t,n){return ea(t,e.child,null,n),e=Gi(t,t.pendingProps),e.flags|=2,xt(t),t.memoizedState=null,e}function ig(e,t,n){var a=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ye){if(a.mode==="hidden")return e=Gi(t,a),t.lanes=536870912,jl(null,e);if(Ru(t),(e=Ae)?(e=nh(e,At),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gn!==null?{id:Bt,overflow:Lt}:null,retryLane:536870912,hydrationErrors:null},n=No(e),n.return=t,t.child=n,We=t,Ae=null)):e=null,e===null)throw vn(t);return t.lanes=536870912,null}return Gi(t,a)}var u=e.memoizedState;if(u!==null){var d=u.dehydrated;if(Ru(t),i)if(t.flags&256)t.flags&=-257,t=Vd(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(Qe||Ta(e,t,n,!1),i=(n&e.childLanes)!==0,Qe||i){if(a=Ce,a!==null&&(d=zc(a,n),d!==0&&d!==u.retryLane))throw u.retryLane=d,Zn(e,d),ft(a,e,d),Wu;Ii(),t=Vd(e,t,n)}else e=u.treeContext,Ae=kt(d.nextSibling),We=t,ye=!0,yn=null,At=!1,e!==null&&Ao(t,e),t=Gi(t,a),t.flags|=4096;return t}return e=Kt(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Yi(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(c(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Iu(e,t,n,a,i){return Fn(t),n=zu(e,t,n,a,void 0,i),a=Mu(),e!==null&&!Qe?(Ou(e,t,i),en(e,t,i)):(ye&&a&&hu(t),t.flags|=1,Pe(e,t,n,i),t.child)}function Xd(e,t,n,a,i,u){return Fn(t),t.updateQueue=null,n=Jo(t,a,n,i),Zo(e),a=Mu(),e!==null&&!Qe?(Ou(e,t,u),en(e,t,u)):(ye&&a&&hu(t),t.flags|=1,Pe(e,t,n,u),t.child)}function Qd(e,t,n,a,i){if(Fn(t),t.stateNode===null){var u=ba,d=n.contextType;typeof d=="object"&&d!==null&&(u=Ie(d)),u=new n(a,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=$u,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=a,u.state=t.memoizedState,u.refs={},Tu(t),d=n.contextType,u.context=typeof d=="object"&&d!==null?Ie(d):ba,u.state=t.memoizedState,d=n.getDerivedStateFromProps,typeof d=="function"&&(Ku(t,n,d,a),u.state=t.memoizedState),typeof n.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&&$u.enqueueReplaceState(u,u.state,null),gl(t,a,u,i),pl(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){u=t.stateNode;var m=t.memoizedProps,b=na(n,m);u.props=b;var A=u.context,B=n.contextType;d=ba,typeof B=="object"&&B!==null&&(d=Ie(B));var Y=n.getDerivedStateFromProps;B=typeof Y=="function"||typeof u.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,B||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(m||A!==d)&&kd(t,u,a,d),bn=!1;var R=t.memoizedState;u.state=R,gl(t,a,u,i),pl(),A=t.memoizedState,m||R!==A||bn?(typeof Y=="function"&&(Ku(t,n,Y,a),A=t.memoizedState),(b=bn||Rd(t,n,b,a,R,A,d))?(B||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=a,t.memoizedState=A),u.props=a,u.state=A,u.context=d,a=b):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{u=t.stateNode,_u(e,t),d=t.memoizedProps,B=na(n,d),u.props=B,Y=t.pendingProps,R=u.context,A=n.contextType,b=ba,typeof A=="object"&&A!==null&&(b=Ie(A)),m=n.getDerivedStateFromProps,(A=typeof m=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(d!==Y||R!==b)&&kd(t,u,a,b),bn=!1,R=t.memoizedState,u.state=R,gl(t,a,u,i),pl();var O=t.memoizedState;d!==Y||R!==O||bn||e!==null&&e.dependencies!==null&&Ei(e.dependencies)?(typeof m=="function"&&(Ku(t,n,m,a),O=t.memoizedState),(B=bn||Rd(t,n,B,a,R,O,b)||e!==null&&e.dependencies!==null&&Ei(e.dependencies))?(A||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,O,b),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,O,b)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),u.props=a,u.state=O,u.context=b,a=B):(typeof u.componentDidUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),a=!1)}return u=a,Yi(e,t),a=(t.flags&128)!==0,u||a?(u=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&a?(t.child=ea(t,e.child,null,i),t.child=ea(t,null,n,i)):Pe(e,t,n,i),t.memoizedState=u.state,e=t.child):e=en(e,t,i),e}function Zd(e,t,n,a){return Kn(),t.flags|=256,Pe(e,t,n,a),t.child}var Pu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function er(e){return{baseLanes:e,cachePool:Do()}}function tr(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=jt),e}function Jd(e,t,n){var a=t.pendingProps,i=!1,u=(t.flags&128)!==0,d;if((d=u)||(d=e!==null&&e.memoizedState===null?!1:(Ge.current&2)!==0),d&&(i=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(ye){if(i?En(t):Tn(),(e=Ae)?(e=nh(e,At),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gn!==null?{id:Bt,overflow:Lt}:null,retryLane:536870912,hydrationErrors:null},n=No(e),n.return=t,t.child=n,We=t,Ae=null)):e=null,e===null)throw vn(t);return Hr(e)?t.lanes=32:t.lanes=536870912,null}var m=a.children;return a=a.fallback,i?(Tn(),i=t.mode,m=Vi({mode:"hidden",children:m},i),a=Jn(a,i,n,null),m.return=t,a.return=t,m.sibling=a,t.child=m,a=t.child,a.memoizedState=er(n),a.childLanes=tr(e,d,n),t.memoizedState=Pu,jl(null,a)):(En(t),nr(t,m))}var b=e.memoizedState;if(b!==null&&(m=b.dehydrated,m!==null)){if(u)t.flags&256?(En(t),t.flags&=-257,t=ar(e,t,n)):t.memoizedState!==null?(Tn(),t.child=e.child,t.flags|=128,t=null):(Tn(),m=a.fallback,i=t.mode,a=Vi({mode:"visible",children:a.children},i),m=Jn(m,i,n,null),m.flags|=2,a.return=t,m.return=t,a.sibling=m,t.child=a,ea(t,e.child,null,n),a=t.child,a.memoizedState=er(n),a.childLanes=tr(e,d,n),t.memoizedState=Pu,t=jl(null,a));else if(En(t),Hr(m)){if(d=m.nextSibling&&m.nextSibling.dataset,d)var A=d.dgst;d=A,a=Error(c(419)),a.stack="",a.digest=d,cl({value:a,source:null,stack:null}),t=ar(e,t,n)}else if(Qe||Ta(e,t,n,!1),d=(n&e.childLanes)!==0,Qe||d){if(d=Ce,d!==null&&(a=zc(d,n),a!==0&&a!==b.retryLane))throw b.retryLane=a,Zn(e,a),ft(d,e,a),Wu;Ur(m)||Ii(),t=ar(e,t,n)}else Ur(m)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Ae=kt(m.nextSibling),We=t,ye=!0,yn=null,At=!1,e!==null&&Ao(t,e),t=nr(t,a.children),t.flags|=4096);return t}return i?(Tn(),m=a.fallback,i=t.mode,b=e.child,A=b.sibling,a=Kt(b,{mode:"hidden",children:a.children}),a.subtreeFlags=b.subtreeFlags&65011712,A!==null?m=Kt(A,m):(m=Jn(m,i,n,null),m.flags|=2),m.return=t,a.return=t,a.sibling=m,t.child=a,jl(null,a),a=t.child,m=e.child.memoizedState,m===null?m=er(n):(i=m.cachePool,i!==null?(b=Ve._currentValue,i=i.parent!==b?{parent:b,pool:b}:i):i=Do(),m={baseLanes:m.baseLanes|n,cachePool:i}),a.memoizedState=m,a.childLanes=tr(e,d,n),t.memoizedState=Pu,jl(e.child,a)):(En(t),n=e.child,e=n.sibling,n=Kt(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=n,t.memoizedState=null,n)}function nr(e,t){return t=Vi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Vi(e,t){return e=yt(22,e,null,t),e.lanes=0,e}function ar(e,t,n){return ea(t,e.child,null,n),e=nr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Kd(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),vu(e.return,t,n)}function lr(e,t,n,a,i,u){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:i,treeForkCount:u}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=a,d.tail=n,d.tailMode=i,d.treeForkCount=u)}function $d(e,t,n){var a=t.pendingProps,i=a.revealOrder,u=a.tail;a=a.children;var d=Ge.current,m=(d&2)!==0;if(m?(d=d&1|2,t.flags|=128):d&=1,V(Ge,d),Pe(e,t,a,n),a=ye?rl:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Kd(e,n,t);else if(e.tag===19)Kd(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ki(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),lr(t,!1,i,n,u,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ki(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}lr(t,!0,n,null,u,a);break;case"together":lr(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function en(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),wn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ta(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,n=Kt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Kt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ir(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ei(e)))}function sg(e,t,n){switch(t.tag){case 3:lt(t,t.stateNode.containerInfo),xn(t,Ve,e.memoizedState.cache),Kn();break;case 27:case 5:Ja(t);break;case 4:lt(t,t.stateNode.containerInfo);break;case 10:xn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ru(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(En(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Jd(e,t,n):(En(t),e=en(e,t,n),e!==null?e.sibling:null);En(t);break;case 19:var i=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Ta(e,t,n,!1),a=(n&t.childLanes)!==0),i){if(a)return $d(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),V(Ge,Ge.current),a)break;return null;case 22:return t.lanes=0,Gd(e,t,n,t.pendingProps);case 24:xn(t,Ve,e.memoizedState.cache)}return en(e,t,n)}function Fd(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Qe=!0;else{if(!ir(e,n)&&(t.flags&128)===0)return Qe=!1,sg(e,t,n);Qe=(e.flags&131072)!==0}else Qe=!1,ye&&(t.flags&1048576)!==0&&Co(t,rl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=In(t.elementType),t.type=e,typeof e=="function")ou(e)?(a=na(e,a),t.tag=1,t=Qd(null,t,e,a,n)):(t.tag=0,t=Iu(null,t,e,a,n));else{if(e!=null){var i=e.$$typeof;if(i===M){t.tag=11,t=Bd(null,t,e,a,n);break e}else if(i===X){t.tag=14,t=Ld(null,t,e,a,n);break e}}throw t=$(e)||e,Error(c(306,t,""))}}return t;case 0:return Iu(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,i=na(a,t.pendingProps),Qd(e,t,a,i,n);case 3:e:{if(lt(t,t.stateNode.containerInfo),e===null)throw Error(c(387));a=t.pendingProps;var u=t.memoizedState;i=u.element,_u(e,t),gl(t,a,null,n);var d=t.memoizedState;if(a=d.cache,xn(t,Ve,a),a!==u.cache&&xu(t,[Ve],n,!0),pl(),a=d.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Zd(e,t,a,n);break e}else if(a!==i){i=Nt(Error(c(424)),t),cl(i),t=Zd(e,t,a,n);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(Ae=kt(e.firstChild),We=t,ye=!0,yn=null,At=!0,n=Go(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Kn(),a===i){t=en(e,t,n);break e}Pe(e,t,a,n)}t=t.child}return t;case 26:return Yi(e,t),e===null?(n=rh(t.type,null,t.pendingProps,null))?t.memoizedState=n:ye||(n=t.type,e=t.pendingProps,a=is(se.current).createElement(n),a[Fe]=t,a[st]=e,et(a,n,e),Ke(a),t.stateNode=a):t.memoizedState=rh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ja(t),e===null&&ye&&(a=t.stateNode=ih(t.type,t.pendingProps,se.current),We=t,At=!0,i=Ae,zn(t.type)?(Br=i,Ae=kt(a.firstChild)):Ae=i),Pe(e,t,t.pendingProps.children,n),Yi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ye&&((i=a=Ae)&&(a=Ug(a,t.type,t.pendingProps,At),a!==null?(t.stateNode=a,We=t,Ae=kt(a.firstChild),At=!1,i=!0):i=!1),i||vn(t)),Ja(t),i=t.type,u=t.pendingProps,d=e!==null?e.memoizedProps:null,a=u.children,Mr(i,u)?a=null:d!==null&&Mr(i,d)&&(t.flags|=32),t.memoizedState!==null&&(i=zu(e,t,Wp,null,null,n),Ul._currentValue=i),Yi(e,t),Pe(e,t,a,n),t.child;case 6:return e===null&&ye&&((e=n=Ae)&&(n=Hg(n,t.pendingProps,At),n!==null?(t.stateNode=n,We=t,Ae=null,e=!0):e=!1),e||vn(t)),null;case 13:return Jd(e,t,n);case 4:return lt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ea(t,null,a,n):Pe(e,t,a,n),t.child;case 11:return Bd(e,t,t.type,t.pendingProps,n);case 7:return Pe(e,t,t.pendingProps,n),t.child;case 8:return Pe(e,t,t.pendingProps.children,n),t.child;case 12:return Pe(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,xn(t,t.type,a.value),Pe(e,t,a.children,n),t.child;case 9:return i=t.type._context,a=t.pendingProps.children,Fn(t),i=Ie(i),a=a(i),t.flags|=1,Pe(e,t,a,n),t.child;case 14:return Ld(e,t,t.type,t.pendingProps,n);case 15:return qd(e,t,t.type,t.pendingProps,n);case 19:return $d(e,t,n);case 31:return ig(e,t,n);case 22:return Gd(e,t,n,t.pendingProps);case 24:return Fn(t),a=Ie(Ve),e===null?(i=Su(),i===null&&(i=Ce,u=bu(),i.pooledCache=u,u.refCount++,u!==null&&(i.pooledCacheLanes|=n),i=u),t.memoizedState={parent:a,cache:i},Tu(t),xn(t,Ve,i)):((e.lanes&n)!==0&&(_u(e,t),gl(t,null,null,n),pl()),i=e.memoizedState,u=t.memoizedState,i.parent!==a?(i={parent:a,cache:a},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),xn(t,Ve,a)):(a=u.cache,xn(t,Ve,a),a!==i.cache&&xu(t,[Ve],n,!0))),Pe(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function tn(e){e.flags|=4}function sr(e,t,n,a,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Tf())e.flags|=8192;else throw Pn=wi,Eu}else e.flags&=-16777217}function Wd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!hh(t))if(Tf())e.flags|=8192;else throw Pn=wi,Eu}function Xi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ac():536870912,e.lanes|=t,Ua|=t)}function Sl(e,t){if(!ye)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Re(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,a|=i.subtreeFlags&65011712,a|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,a|=i.subtreeFlags,a|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function ug(e,t,n){var a=t.pendingProps;switch(mu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return Re(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Wt(Ve),qe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ea(t)?tn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,gu())),Re(t),null;case 26:var i=t.type,u=t.memoizedState;return e===null?(tn(t),u!==null?(Re(t),Wd(t,u)):(Re(t),sr(t,i,null,a,n))):u?u!==e.memoizedState?(tn(t),Re(t),Wd(t,u)):(Re(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&tn(t),Re(t),sr(t,i,e,a,n)),null;case 27:if(ti(t),n=se.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&tn(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return Re(t),null}e=Q.current,Ea(t)?Ro(t):(e=ih(i,a,n),t.stateNode=e,tn(t))}return Re(t),null;case 5:if(ti(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&tn(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return Re(t),null}if(u=Q.current,Ea(t))Ro(t);else{var d=is(se.current);switch(u){case 1:u=d.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:u=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":u=d.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":u=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":u=d.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?d.createElement("select",{is:a.is}):d.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?d.createElement(i,{is:a.is}):d.createElement(i)}}u[Fe]=t,u[st]=a;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(et(u,i,a),i){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&tn(t)}}return Re(t),sr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&tn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(c(166));if(e=se.current,Ea(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,i=We,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[Fe]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Kf(e.nodeValue,n)),e||vn(t,!0)}else e=is(e).createTextNode(a),e[Fe]=t,t.stateNode=e}return Re(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ea(t),n!==null){if(e===null){if(!a)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[Fe]=t}else Kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),e=!1}else n=gu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(xt(t),t):(xt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Re(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ea(t),a!==null&&a.dehydrated!==null){if(e===null){if(!i)throw Error(c(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(c(317));i[Fe]=t}else Kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),i=!1}else i=gu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(xt(t),t):(xt(t),null)}return xt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,i=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(i=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==i&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Xi(t,t.updateQueue),Re(t),null);case 4:return qe(),e===null&&Cr(t.stateNode.containerInfo),Re(t),null;case 10:return Wt(t.type),Re(t),null;case 19:if(w(Ge),a=t.memoizedState,a===null)return Re(t),null;if(i=(t.flags&128)!==0,u=a.rendering,u===null)if(i)Sl(a,!1);else{if(Le!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=ki(e),u!==null){for(t.flags|=128,Sl(a,!1),e=u.updateQueue,t.updateQueue=e,Xi(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)_o(n,e),n=n.sibling;return V(Ge,Ge.current&1|2),ye&&$t(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ht()>$i&&(t.flags|=128,i=!0,Sl(a,!1),t.lanes=4194304)}else{if(!i)if(e=ki(u),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Xi(t,e),Sl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!ye)return Re(t),null}else 2*ht()-a.renderingStartTime>$i&&n!==536870912&&(t.flags|=128,i=!0,Sl(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ht(),e.sibling=null,n=Ge.current,V(Ge,i?n&1|2:n&1),ye&&$t(t,a.treeForkCount),e):(Re(t),null);case 22:case 23:return xt(t),Au(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),n=t.updateQueue,n!==null&&Xi(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&w(Wn),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wt(Ve),Re(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function rg(e,t){switch(mu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wt(Ve),qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ti(t),null;case 31:if(t.memoizedState!==null){if(xt(t),t.alternate===null)throw Error(c(340));Kn()}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(c(340));Kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return w(Ge),null;case 4:return qe(),null;case 10:return Wt(t.type),null;case 22:case 23:return xt(t),Au(),e!==null&&w(Wn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wt(Ve),null;case 25:return null;default:return null}}function Id(e,t){switch(mu(t),t.tag){case 3:Wt(Ve),qe();break;case 26:case 27:case 5:ti(t);break;case 4:qe();break;case 31:t.memoizedState!==null&&xt(t);break;case 13:xt(t);break;case 19:w(Ge);break;case 10:Wt(t.type);break;case 22:case 23:xt(t),Au(),e!==null&&w(Wn);break;case 24:Wt(Ve)}}function El(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&e)===e){a=void 0;var u=n.create,d=n.inst;a=u(),d.destroy=a}n=n.next}while(n!==i)}}catch(m){Te(t,t.return,m)}}function _n(e,t,n){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var u=i.next;a=u;do{if((a.tag&e)===e){var d=a.inst,m=d.destroy;if(m!==void 0){d.destroy=void 0,i=t;var b=n,A=m;try{A()}catch(B){Te(i,b,B)}}}a=a.next}while(a!==u)}}catch(B){Te(t,t.return,B)}}function Pd(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Vo(t,n)}catch(a){Te(e,e.return,a)}}}function ef(e,t,n){n.props=na(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Te(e,t,a)}}function Tl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(i){Te(e,t,i)}}function qt(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(i){Te(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Te(e,t,i)}else n.current=null}function tf(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(i){Te(e,e.return,i)}}function ur(e,t,n){try{var a=e.stateNode;Rg(a,e.type,n,t),a[st]=t}catch(i){Te(e,e.return,i)}}function nf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&zn(e.type)||e.tag===4}function rr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&zn(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 cr(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zt));else if(a!==4&&(a===27&&zn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(cr(e,t,n),e=e.sibling;e!==null;)cr(e,t,n),e=e.sibling}function Qi(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&zn(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Qi(e,t,n),e=e.sibling;e!==null;)Qi(e,t,n),e=e.sibling}function af(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);et(t,a,n),t[Fe]=e,t[st]=n}catch(u){Te(e,e.return,u)}}var nn=!1,Ze=!1,or=!1,lf=typeof WeakSet=="function"?WeakSet:Set,$e=null;function cg(e,t){if(e=e.containerInfo,kr=fs,e=go(e),au(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var i=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var d=0,m=-1,b=-1,A=0,B=0,Y=e,R=null;t:for(;;){for(var O;Y!==n||i!==0&&Y.nodeType!==3||(m=d+i),Y!==u||a!==0&&Y.nodeType!==3||(b=d+a),Y.nodeType===3&&(d+=Y.nodeValue.length),(O=Y.firstChild)!==null;)R=Y,Y=O;for(;;){if(Y===e)break t;if(R===n&&++A===i&&(m=d),R===u&&++B===a&&(b=d),(O=Y.nextSibling)!==null)break;Y=R,R=Y.parentNode}Y=O}n=m===-1||b===-1?null:{start:m,end:b}}else n=null}n=n||{start:0,end:0}}else n=null;for(zr={focusedElem:e,selectionRange:n},fs=!1,$e=t;$e!==null;)if(t=$e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$e=e;else for(;$e!==null;){switch(t=$e,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,n=t,i=u.memoizedProps,u=u.memoizedState,a=n.stateNode;try{var I=na(n.type,i);e=a.getSnapshotBeforeUpdate(I,u),a.__reactInternalSnapshotBeforeUpdate=e}catch(le){Te(n,n.return,le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Dr(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Dr(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,$e=e;break}$e=t.return}}function sf(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:ln(e,n),a&4&&El(5,n);break;case 1:if(ln(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(d){Te(n,n.return,d)}else{var i=na(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){Te(n,n.return,d)}}a&64&&Pd(n),a&512&&Tl(n,n.return);break;case 3:if(ln(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Vo(e,t)}catch(d){Te(n,n.return,d)}}break;case 27:t===null&&a&4&&af(n);case 26:case 5:ln(e,n),t===null&&a&4&&tf(n),a&512&&Tl(n,n.return);break;case 12:ln(e,n);break;case 31:ln(e,n),a&4&&cf(e,n);break;case 13:ln(e,n),a&4&&of(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=vg.bind(null,n),Bg(e,n))));break;case 22:if(a=n.memoizedState!==null||nn,!a){t=t!==null&&t.memoizedState!==null||Ze,i=nn;var u=Ze;nn=a,(Ze=t)&&!u?sn(e,n,(n.subtreeFlags&8772)!==0):ln(e,n),nn=i,Ze=u}break;case 30:break;default:ln(e,n)}}function uf(e){var t=e.alternate;t!==null&&(e.alternate=null,uf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&qs(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 Me=null,rt=!1;function an(e,t,n){for(n=n.child;n!==null;)rf(e,t,n),n=n.sibling}function rf(e,t,n){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(Ka,n)}catch{}switch(n.tag){case 26:Ze||qt(n,t),an(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ze||qt(n,t);var a=Me,i=rt;zn(n.type)&&(Me=n.stateNode,rt=!1),an(e,t,n),Ml(n.stateNode),Me=a,rt=i;break;case 5:Ze||qt(n,t);case 6:if(a=Me,i=rt,Me=null,an(e,t,n),Me=a,rt=i,Me!==null)if(rt)try{(Me.nodeType===9?Me.body:Me.nodeName==="HTML"?Me.ownerDocument.body:Me).removeChild(n.stateNode)}catch(u){Te(n,t,u)}else try{Me.removeChild(n.stateNode)}catch(u){Te(n,t,u)}break;case 18:Me!==null&&(rt?(e=Me,eh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Xa(e)):eh(Me,n.stateNode));break;case 4:a=Me,i=rt,Me=n.stateNode.containerInfo,rt=!0,an(e,t,n),Me=a,rt=i;break;case 0:case 11:case 14:case 15:_n(2,n,t),Ze||_n(4,n,t),an(e,t,n);break;case 1:Ze||(qt(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&ef(n,t,a)),an(e,t,n);break;case 21:an(e,t,n);break;case 22:Ze=(a=Ze)||n.memoizedState!==null,an(e,t,n),Ze=a;break;default:an(e,t,n)}}function cf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Xa(e)}catch(n){Te(t,t.return,n)}}}function of(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Xa(e)}catch(n){Te(t,t.return,n)}}function og(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new lf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new lf),t;default:throw Error(c(435,e.tag))}}function Zi(e,t){var n=og(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var i=xg.bind(null,e,a);a.then(i,i)}})}function ct(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var i=n[a],u=e,d=t,m=d;e:for(;m!==null;){switch(m.tag){case 27:if(zn(m.type)){Me=m.stateNode,rt=!1;break e}break;case 5:Me=m.stateNode,rt=!1;break e;case 3:case 4:Me=m.stateNode.containerInfo,rt=!0;break e}m=m.return}if(Me===null)throw Error(c(160));rf(u,d,i),Me=null,rt=!1,u=i.alternate,u!==null&&(u.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)df(t,e),t=t.sibling}var Dt=null;function df(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ct(t,e),ot(e),a&4&&(_n(3,e,e.return),El(3,e),_n(5,e,e.return));break;case 1:ct(t,e),ot(e),a&512&&(Ze||n===null||qt(n,n.return)),a&64&&nn&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var i=Dt;if(ct(t,e),ot(e),a&512&&(Ze||n===null||qt(n,n.return)),a&4){var u=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(a){case"title":u=i.getElementsByTagName("title")[0],(!u||u[Wa]||u[Fe]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=i.createElement(a),i.head.insertBefore(u,i.querySelector("head > title"))),et(u,a,n),u[Fe]=e,Ke(u),a=u;break e;case"link":var d=dh("link","href",i).get(a+(n.href||""));if(d){for(var m=0;m<d.length;m++)if(u=d[m],u.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&u.getAttribute("rel")===(n.rel==null?null:n.rel)&&u.getAttribute("title")===(n.title==null?null:n.title)&&u.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){d.splice(m,1);break t}}u=i.createElement(a),et(u,a,n),i.head.appendChild(u);break;case"meta":if(d=dh("meta","content",i).get(a+(n.content||""))){for(m=0;m<d.length;m++)if(u=d[m],u.getAttribute("content")===(n.content==null?null:""+n.content)&&u.getAttribute("name")===(n.name==null?null:n.name)&&u.getAttribute("property")===(n.property==null?null:n.property)&&u.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&u.getAttribute("charset")===(n.charSet==null?null:n.charSet)){d.splice(m,1);break t}}u=i.createElement(a),et(u,a,n),i.head.appendChild(u);break;default:throw Error(c(468,a))}u[Fe]=e,Ke(u),a=u}e.stateNode=a}else fh(i,e.type,e.stateNode);else e.stateNode=oh(i,a,e.memoizedProps);else u!==a?(u===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):u.count--,a===null?fh(i,e.type,e.stateNode):oh(i,a,e.memoizedProps)):a===null&&e.stateNode!==null&&ur(e,e.memoizedProps,n.memoizedProps)}break;case 27:ct(t,e),ot(e),a&512&&(Ze||n===null||qt(n,n.return)),n!==null&&a&4&&ur(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ct(t,e),ot(e),a&512&&(Ze||n===null||qt(n,n.return)),e.flags&32){i=e.stateNode;try{ha(i,"")}catch(I){Te(e,e.return,I)}}a&4&&e.stateNode!=null&&(i=e.memoizedProps,ur(e,i,n!==null?n.memoizedProps:i)),a&1024&&(or=!0);break;case 6:if(ct(t,e),ot(e),a&4){if(e.stateNode===null)throw Error(c(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(I){Te(e,e.return,I)}}break;case 3:if(rs=null,i=Dt,Dt=ss(t.containerInfo),ct(t,e),Dt=i,ot(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Xa(t.containerInfo)}catch(I){Te(e,e.return,I)}or&&(or=!1,ff(e));break;case 4:a=Dt,Dt=ss(e.stateNode.containerInfo),ct(t,e),ot(e),Dt=a;break;case 12:ct(t,e),ot(e);break;case 31:ct(t,e),ot(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Zi(e,a)));break;case 13:ct(t,e),ot(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ki=ht()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Zi(e,a)));break;case 22:i=e.memoizedState!==null;var b=n!==null&&n.memoizedState!==null,A=nn,B=Ze;if(nn=A||i,Ze=B||b,ct(t,e),Ze=B,nn=A,ot(e),a&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||b||nn||Ze||aa(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){b=n=t;try{if(u=b.stateNode,i)d=u.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{m=b.stateNode;var Y=b.memoizedProps.style,R=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;m.style.display=R==null||typeof R=="boolean"?"":(""+R).trim()}}catch(I){Te(b,b.return,I)}}}else if(t.tag===6){if(n===null){b=t;try{b.stateNode.nodeValue=i?"":b.memoizedProps}catch(I){Te(b,b.return,I)}}}else if(t.tag===18){if(n===null){b=t;try{var O=b.stateNode;i?th(O,!0):th(b.stateNode,!1)}catch(I){Te(b,b.return,I)}}}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;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,Zi(e,n))));break;case 19:ct(t,e),ot(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Zi(e,a)));break;case 30:break;case 21:break;default:ct(t,e),ot(e)}}function ot(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(nf(a)){n=a;break}a=a.return}if(n==null)throw Error(c(160));switch(n.tag){case 27:var i=n.stateNode,u=rr(e);Qi(e,u,i);break;case 5:var d=n.stateNode;n.flags&32&&(ha(d,""),n.flags&=-33);var m=rr(e);Qi(e,m,d);break;case 3:case 4:var b=n.stateNode.containerInfo,A=rr(e);cr(e,A,b);break;default:throw Error(c(161))}}catch(B){Te(e,e.return,B)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ff(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ff(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ln(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sf(e,t.alternate,t),t=t.sibling}function aa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:_n(4,t,t.return),aa(t);break;case 1:qt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&ef(t,t.return,n),aa(t);break;case 27:Ml(t.stateNode);case 26:case 5:qt(t,t.return),aa(t);break;case 22:t.memoizedState===null&&aa(t);break;case 30:aa(t);break;default:aa(t)}e=e.sibling}}function sn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,i=e,u=t,d=u.flags;switch(u.tag){case 0:case 11:case 15:sn(i,u,n),El(4,u);break;case 1:if(sn(i,u,n),a=u,i=a.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(A){Te(a,a.return,A)}if(a=u,i=a.updateQueue,i!==null){var m=a.stateNode;try{var b=i.shared.hiddenCallbacks;if(b!==null)for(i.shared.hiddenCallbacks=null,i=0;i<b.length;i++)Yo(b[i],m)}catch(A){Te(a,a.return,A)}}n&&d&64&&Pd(u),Tl(u,u.return);break;case 27:af(u);case 26:case 5:sn(i,u,n),n&&a===null&&d&4&&tf(u),Tl(u,u.return);break;case 12:sn(i,u,n);break;case 31:sn(i,u,n),n&&d&4&&cf(i,u);break;case 13:sn(i,u,n),n&&d&4&&of(i,u);break;case 22:u.memoizedState===null&&sn(i,u,n),Tl(u,u.return);break;case 30:break;default:sn(i,u,n)}t=t.sibling}}function dr(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ol(n))}function fr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ol(e))}function Ut(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)hf(e,t,n,a),t=t.sibling}function hf(e,t,n,a){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ut(e,t,n,a),i&2048&&El(9,t);break;case 1:Ut(e,t,n,a);break;case 3:Ut(e,t,n,a),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ol(e)));break;case 12:if(i&2048){Ut(e,t,n,a),e=t.stateNode;try{var u=t.memoizedProps,d=u.id,m=u.onPostCommit;typeof m=="function"&&m(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){Te(t,t.return,b)}}else Ut(e,t,n,a);break;case 31:Ut(e,t,n,a);break;case 13:Ut(e,t,n,a);break;case 23:break;case 22:u=t.stateNode,d=t.alternate,t.memoizedState!==null?u._visibility&2?Ut(e,t,n,a):_l(e,t):u._visibility&2?Ut(e,t,n,a):(u._visibility|=2,Ma(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),i&2048&&dr(d,t);break;case 24:Ut(e,t,n,a),i&2048&&fr(t.alternate,t);break;default:Ut(e,t,n,a)}}function Ma(e,t,n,a,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,d=t,m=n,b=a,A=d.flags;switch(d.tag){case 0:case 11:case 15:Ma(u,d,m,b,i),El(8,d);break;case 23:break;case 22:var B=d.stateNode;d.memoizedState!==null?B._visibility&2?Ma(u,d,m,b,i):_l(u,d):(B._visibility|=2,Ma(u,d,m,b,i)),i&&A&2048&&dr(d.alternate,d);break;case 24:Ma(u,d,m,b,i),i&&A&2048&&fr(d.alternate,d);break;default:Ma(u,d,m,b,i)}t=t.sibling}}function _l(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,i=a.flags;switch(a.tag){case 22:_l(n,a),i&2048&&dr(a.alternate,a);break;case 24:_l(n,a),i&2048&&fr(a.alternate,a);break;default:_l(n,a)}t=t.sibling}}var Nl=8192;function Oa(e,t,n){if(e.subtreeFlags&Nl)for(e=e.child;e!==null;)mf(e,t,n),e=e.sibling}function mf(e,t,n){switch(e.tag){case 26:Oa(e,t,n),e.flags&Nl&&e.memoizedState!==null&&Fg(n,Dt,e.memoizedState,e.memoizedProps);break;case 5:Oa(e,t,n);break;case 3:case 4:var a=Dt;Dt=ss(e.stateNode.containerInfo),Oa(e,t,n),Dt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Nl,Nl=16777216,Oa(e,t,n),Nl=a):Oa(e,t,n));break;default:Oa(e,t,n)}}function pf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function wl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];$e=a,yf(a,e)}pf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)gf(e),e=e.sibling}function gf(e){switch(e.tag){case 0:case 11:case 15:wl(e),e.flags&2048&&_n(9,e,e.return);break;case 3:wl(e);break;case 12:wl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ji(e)):wl(e);break;default:wl(e)}}function Ji(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];$e=a,yf(a,e)}pf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:_n(8,t,t.return),Ji(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ji(t));break;default:Ji(t)}e=e.sibling}}function yf(e,t){for(;$e!==null;){var n=$e;switch(n.tag){case 0:case 11:case 15:_n(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:ol(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,$e=a;else e:for(n=e;$e!==null;){a=$e;var i=a.sibling,u=a.return;if(uf(a),a===n){$e=null;break e}if(i!==null){i.return=u,$e=i;break e}$e=u}}}var dg={getCacheForType:function(e){var t=Ie(Ve),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ie(Ve).controller.signal}},fg=typeof WeakMap=="function"?WeakMap:Map,je=0,Ce=null,he=null,pe=0,Ee=0,bt=null,Nn=!1,Da=!1,hr=!1,un=0,Le=0,wn=0,la=0,mr=0,jt=0,Ua=0,Cl=null,dt=null,pr=!1,Ki=0,vf=0,$i=1/0,Fi=null,Cn=null,Je=0,An=null,Ha=null,rn=0,gr=0,yr=null,xf=null,Al=0,vr=null;function St(){return(je&2)!==0&&pe!==0?pe&-pe:z.T!==null?Tr():Mc()}function bf(){if(jt===0)if((pe&536870912)===0||ye){var e=li;li<<=1,(li&3932160)===0&&(li=262144),jt=e}else jt=536870912;return e=vt.current,e!==null&&(e.flags|=32),jt}function ft(e,t,n){(e===Ce&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)&&(Ba(e,0),Rn(e,pe,jt,!1)),Fa(e,n),((je&2)===0||e!==Ce)&&(e===Ce&&((je&2)===0&&(la|=n),Le===4&&Rn(e,pe,jt,!1)),Gt(e))}function jf(e,t,n){if((je&6)!==0)throw Error(c(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||$a(e,t),i=a?pg(e,t):br(e,t,!0),u=a;do{if(i===0){Da&&!a&&Rn(e,t,0,!1);break}else{if(n=e.current.alternate,u&&!hg(n)){i=br(e,t,!1),u=!1;continue}if(i===2){if(u=t,e.errorRecoveryDisabledLanes&u)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var m=e;i=Cl;var b=m.current.memoizedState.isDehydrated;if(b&&(Ba(m,d).flags|=256),d=br(m,d,!1),d!==2){if(hr&&!b){m.errorRecoveryDisabledLanes|=u,la|=u,i=4;break e}u=dt,dt=i,u!==null&&(dt===null?dt=u:dt.push.apply(dt,u))}i=d}if(u=!1,i!==2)continue}}if(i===1){Ba(e,0),Rn(e,t,0,!0);break}e:{switch(a=e,u=i,u){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Rn(a,t,jt,!Nn);break e;case 2:dt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(i=Ki+300-ht(),10<i)){if(Rn(a,t,jt,!Nn),si(a,0,!0)!==0)break e;rn=t,a.timeoutHandle=If(Sf.bind(null,a,n,dt,Fi,pr,t,jt,la,Ua,Nn,u,"Throttled",-0,0),i);break e}Sf(a,n,dt,Fi,pr,t,jt,la,Ua,Nn,u,null,-0,0)}}break}while(!0);Gt(e)}function Sf(e,t,n,a,i,u,d,m,b,A,B,Y,R,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:Zt},mf(t,u,Y);var I=(u&62914560)===u?Ki-ht():(u&4194048)===u?vf-ht():0;if(I=Wg(Y,I),I!==null){rn=u,e.cancelPendingCommit=I(Rf.bind(null,e,t,u,n,a,i,d,m,b,B,Y,null,R,O)),Rn(e,u,d,!A);return}}Rf(e,t,u,n,a,i,d,m,b)}function hg(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var i=n[a],u=i.getSnapshot;i=i.value;try{if(!gt(u(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 Rn(e,t,n,a){t&=~mr,t&=~la,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var i=t;0<i;){var u=31-pt(i),d=1<<u;a[u]=-1,i&=~d}n!==0&&Rc(e,n,t)}function Wi(){return(je&6)===0?(Rl(0),!1):!0}function xr(){if(he!==null){if(Ee===0)var e=he.return;else e=he,Ft=$n=null,Du(e),Ca=null,fl=0,e=he;for(;e!==null;)Id(e.alternate,e),e=e.return;he=null}}function Ba(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Mg(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),rn=0,xr(),Ce=e,he=n=Kt(e.current,null),pe=t,Ee=0,bt=null,Nn=!1,Da=$a(e,t),hr=!1,Ua=jt=mr=la=wn=Le=0,dt=Cl=null,pr=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var i=31-pt(a),u=1<<i;t|=e[i],a&=~u}return un=t,vi(),n}function Ef(e,t){ce=null,z.H=bl,t===wa||t===Ni?(t=Bo(),Ee=3):t===Eu?(t=Bo(),Ee=4):Ee=t===Wu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,bt=t,he===null&&(Le=1,qi(e,Nt(t,e.current)))}function Tf(){var e=vt.current;return e===null?!0:(pe&4194048)===pe?Rt===null:(pe&62914560)===pe||(pe&536870912)!==0?e===Rt:!1}function _f(){var e=z.H;return z.H=bl,e===null?bl:e}function Nf(){var e=z.A;return z.A=dg,e}function Ii(){Le=4,Nn||(pe&4194048)!==pe&&vt.current!==null||(Da=!0),(wn&134217727)===0&&(la&134217727)===0||Ce===null||Rn(Ce,pe,jt,!1)}function br(e,t,n){var a=je;je|=2;var i=_f(),u=Nf();(Ce!==e||pe!==t)&&(Fi=null,Ba(e,t)),t=!1;var d=Le;e:do try{if(Ee!==0&&he!==null){var m=he,b=bt;switch(Ee){case 8:xr(),d=6;break e;case 3:case 2:case 9:case 6:vt.current===null&&(t=!0);var A=Ee;if(Ee=0,bt=null,La(e,m,b,A),n&&Da){d=0;break e}break;default:A=Ee,Ee=0,bt=null,La(e,m,b,A)}}mg(),d=Le;break}catch(B){Ef(e,B)}while(!0);return t&&e.shellSuspendCounter++,Ft=$n=null,je=a,z.H=i,z.A=u,he===null&&(Ce=null,pe=0,vi()),d}function mg(){for(;he!==null;)wf(he)}function pg(e,t){var n=je;je|=2;var a=_f(),i=Nf();Ce!==e||pe!==t?(Fi=null,$i=ht()+500,Ba(e,t)):Da=$a(e,t);e:do try{if(Ee!==0&&he!==null){t=he;var u=bt;t:switch(Ee){case 1:Ee=0,bt=null,La(e,t,u,1);break;case 2:case 9:if(Uo(u)){Ee=0,bt=null,Cf(t);break}t=function(){Ee!==2&&Ee!==9||Ce!==e||(Ee=7),Gt(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,bt=null,Cf(t)):(Ee=0,bt=null,La(e,t,u,7));break;case 5:var d=null;switch(he.tag){case 26:d=he.memoizedState;case 5:case 27:var m=he;if(d?hh(d):m.stateNode.complete){Ee=0,bt=null;var b=m.sibling;if(b!==null)he=b;else{var A=m.return;A!==null?(he=A,Pi(A)):he=null}break t}}Ee=0,bt=null,La(e,t,u,5);break;case 6:Ee=0,bt=null,La(e,t,u,6);break;case 8:xr(),Le=6;break e;default:throw Error(c(462))}}gg();break}catch(B){Ef(e,B)}while(!0);return Ft=$n=null,z.H=a,z.A=i,je=n,he!==null?0:(Ce=null,pe=0,vi(),Le)}function gg(){for(;he!==null&&!Lm();)wf(he)}function wf(e){var t=Fd(e.alternate,e,un);e.memoizedProps=e.pendingProps,t===null?Pi(e):he=t}function Cf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Xd(n,t,t.pendingProps,t.type,void 0,pe);break;case 11:t=Xd(n,t,t.pendingProps,t.type.render,t.ref,pe);break;case 5:Du(t);default:Id(n,t),t=he=_o(t,un),t=Fd(n,t,un)}e.memoizedProps=e.pendingProps,t===null?Pi(e):he=t}function La(e,t,n,a){Ft=$n=null,Du(t),Ca=null,fl=0;var i=t.return;try{if(lg(e,i,t,n,pe)){Le=1,qi(e,Nt(n,e.current)),he=null;return}}catch(u){if(i!==null)throw he=i,u;Le=1,qi(e,Nt(n,e.current)),he=null;return}t.flags&32768?(ye||a===1?e=!0:Da||(pe&536870912)!==0?e=!1:(Nn=e=!0,(a===2||a===9||a===3||a===6)&&(a=vt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Af(t,e)):Pi(t)}function Pi(e){var t=e;do{if((t.flags&32768)!==0){Af(t,Nn);return}e=t.return;var n=ug(t.alternate,t,un);if(n!==null){he=n;return}if(t=t.sibling,t!==null){he=t;return}he=t=e}while(t!==null);Le===0&&(Le=5)}function Af(e,t){do{var n=rg(e.alternate,e);if(n!==null){n.flags&=32767,he=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){he=e;return}he=e=n}while(e!==null);Le=6,he=null}function Rf(e,t,n,a,i,u,d,m,b){e.cancelPendingCommit=null;do es();while(Je!==0);if((je&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(u=t.lanes|t.childLanes,u|=ru,$m(e,n,u,d,m,b),e===Ce&&(he=Ce=null,pe=0),Ha=t,An=e,rn=n,gr=u,yr=i,xf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,bg(ni,function(){return Df(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=z.T,z.T=null,i=Z.p,Z.p=2,d=je,je|=4;try{cg(e,t,n)}finally{je=d,Z.p=i,z.T=a}}Je=1,kf(),zf(),Mf()}}function kf(){if(Je===1){Je=0;var e=An,t=Ha,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=z.T,z.T=null;var a=Z.p;Z.p=2;var i=je;je|=4;try{df(t,e);var u=zr,d=go(e.containerInfo),m=u.focusedElem,b=u.selectionRange;if(d!==m&&m&&m.ownerDocument&&po(m.ownerDocument.documentElement,m)){if(b!==null&&au(m)){var A=b.start,B=b.end;if(B===void 0&&(B=A),"selectionStart"in m)m.selectionStart=A,m.selectionEnd=Math.min(B,m.value.length);else{var Y=m.ownerDocument||document,R=Y&&Y.defaultView||window;if(R.getSelection){var O=R.getSelection(),I=m.textContent.length,le=Math.min(b.start,I),we=b.end===void 0?le:Math.min(b.end,I);!O.extend&&le>we&&(d=we,we=le,le=d);var _=mo(m,le),T=mo(m,we);if(_&&T&&(O.rangeCount!==1||O.anchorNode!==_.node||O.anchorOffset!==_.offset||O.focusNode!==T.node||O.focusOffset!==T.offset)){var C=Y.createRange();C.setStart(_.node,_.offset),O.removeAllRanges(),le>we?(O.addRange(C),O.extend(T.node,T.offset)):(C.setEnd(T.node,T.offset),O.addRange(C))}}}}for(Y=[],O=m;O=O.parentNode;)O.nodeType===1&&Y.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<Y.length;m++){var q=Y[m];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}fs=!!kr,zr=kr=null}finally{je=i,Z.p=a,z.T=n}}e.current=t,Je=2}}function zf(){if(Je===2){Je=0;var e=An,t=Ha,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=z.T,z.T=null;var a=Z.p;Z.p=2;var i=je;je|=4;try{sf(e,t.alternate,t)}finally{je=i,Z.p=a,z.T=n}}Je=3}}function Mf(){if(Je===4||Je===3){Je=0,qm();var e=An,t=Ha,n=rn,a=xf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Je=5:(Je=0,Ha=An=null,Of(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Cn=null),Bs(n),t=t.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot(Ka,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=z.T,i=Z.p,Z.p=2,z.T=null;try{for(var u=e.onRecoverableError,d=0;d<a.length;d++){var m=a[d];u(m.value,{componentStack:m.stack})}}finally{z.T=t,Z.p=i}}(rn&3)!==0&&es(),Gt(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===vr?Al++:(Al=0,vr=e):Al=0,Rl(0)}}function Of(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ol(t)))}function es(){return kf(),zf(),Mf(),Df()}function Df(){if(Je!==5)return!1;var e=An,t=gr;gr=0;var n=Bs(rn),a=z.T,i=Z.p;try{Z.p=32>n?32:n,z.T=null,n=yr,yr=null;var u=An,d=rn;if(Je=0,Ha=An=null,rn=0,(je&6)!==0)throw Error(c(331));var m=je;if(je|=4,gf(u.current),hf(u,u.current,d,n),je=m,Rl(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(Ka,u)}catch{}return!0}finally{Z.p=i,z.T=a,Of(e,t)}}function Uf(e,t,n){t=Nt(n,t),t=Fu(e.stateNode,t,2),e=Sn(e,t,2),e!==null&&(Fa(e,2),Gt(e))}function Te(e,t,n){if(e.tag===3)Uf(e,e,n);else for(;t!==null;){if(t.tag===3){Uf(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Cn===null||!Cn.has(a))){e=Nt(n,e),n=Ud(2),a=Sn(t,n,2),a!==null&&(Hd(n,a,t,e),Fa(a,2),Gt(a));break}}t=t.return}}function jr(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new fg;var i=new Set;a.set(t,i)}else i=a.get(t),i===void 0&&(i=new Set,a.set(t,i));i.has(n)||(hr=!0,i.add(n),e=yg.bind(null,e,t,n),t.then(e,e))}function yg(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ce===e&&(pe&n)===n&&(Le===4||Le===3&&(pe&62914560)===pe&&300>ht()-Ki?(je&2)===0&&Ba(e,0):mr|=n,Ua===pe&&(Ua=0)),Gt(e)}function Hf(e,t){t===0&&(t=Ac()),e=Zn(e,t),e!==null&&(Fa(e,t),Gt(e))}function vg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Hf(e,n)}function xg(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(c(314))}a!==null&&a.delete(t),Hf(e,n)}function bg(e,t){return Os(e,t)}var ts=null,qa=null,Sr=!1,ns=!1,Er=!1,kn=0;function Gt(e){e!==qa&&e.next===null&&(qa===null?ts=qa=e:qa=qa.next=e),ns=!0,Sr||(Sr=!0,Sg())}function Rl(e,t){if(!Er&&ns){Er=!0;do for(var n=!1,a=ts;a!==null;){if(e!==0){var i=a.pendingLanes;if(i===0)var u=0;else{var d=a.suspendedLanes,m=a.pingedLanes;u=(1<<31-pt(42|e)+1)-1,u&=i&~(d&~m),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,Gf(a,u))}else u=pe,u=si(a,a===Ce?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||$a(a,u)||(n=!0,Gf(a,u));a=a.next}while(n);Er=!1}}function jg(){Bf()}function Bf(){ns=Sr=!1;var e=0;kn!==0&&zg()&&(e=kn);for(var t=ht(),n=null,a=ts;a!==null;){var i=a.next,u=Lf(a,t);u===0?(a.next=null,n===null?ts=i:n.next=i,i===null&&(qa=n)):(n=a,(e!==0||(u&3)!==0)&&(ns=!0)),a=i}Je!==0&&Je!==5||Rl(e),kn!==0&&(kn=0)}function Lf(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,i=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var d=31-pt(u),m=1<<d,b=i[d];b===-1?((m&n)===0||(m&a)!==0)&&(i[d]=Km(m,t)):b<=t&&(e.expiredLanes|=m),u&=~m}if(t=Ce,n=pe,n=si(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Ds(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||$a(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Ds(a),Bs(n)){case 2:case 8:n=wc;break;case 32:n=ni;break;case 268435456:n=Cc;break;default:n=ni}return a=qf.bind(null,e),n=Os(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Ds(a),e.callbackPriority=2,e.callbackNode=null,2}function qf(e,t){if(Je!==0&&Je!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(es()&&e.callbackNode!==n)return null;var a=pe;return a=si(e,e===Ce?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(jf(e,a,t),Lf(e,ht()),e.callbackNode!=null&&e.callbackNode===n?qf.bind(null,e):null)}function Gf(e,t){if(es())return null;jf(e,t,!0)}function Sg(){Og(function(){(je&6)!==0?Os(Nc,jg):Bf()})}function Tr(){if(kn===0){var e=_a;e===0&&(e=ai,ai<<=1,(ai&261888)===0&&(ai=256)),kn=e}return kn}function Yf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:oi(""+e)}function Vf(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Eg(e,t,n,a,i){if(t==="submit"&&n&&n.stateNode===i){var u=Yf((i[st]||null).action),d=a.submitter;d&&(t=(t=d[st]||null)?Yf(t.formAction):d.getAttribute("formAction"),t!==null&&(u=t,d=null));var m=new mi("action","action",null,a,i);e.push({event:m,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(kn!==0){var b=d?Vf(i,d):new FormData(i);Xu(n,{pending:!0,data:b,method:i.method,action:u},null,b)}}else typeof u=="function"&&(m.preventDefault(),b=d?Vf(i,d):new FormData(i),Xu(n,{pending:!0,data:b,method:i.method,action:u},u,b))},currentTarget:i}]})}}for(var _r=0;_r<uu.length;_r++){var Nr=uu[_r],Tg=Nr.toLowerCase(),_g=Nr[0].toUpperCase()+Nr.slice(1);Ot(Tg,"on"+_g)}Ot(xo,"onAnimationEnd"),Ot(bo,"onAnimationIteration"),Ot(jo,"onAnimationStart"),Ot("dblclick","onDoubleClick"),Ot("focusin","onFocus"),Ot("focusout","onBlur"),Ot(Gp,"onTransitionRun"),Ot(Yp,"onTransitionStart"),Ot(Vp,"onTransitionCancel"),Ot(So,"onTransitionEnd"),da("onMouseEnter",["mouseout","mouseover"]),da("onMouseLeave",["mouseout","mouseover"]),da("onPointerEnter",["pointerout","pointerover"]),da("onPointerLeave",["pointerout","pointerover"]),Yn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Yn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Yn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Yn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Yn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Yn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kl="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(" "),Ng=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(kl));function Xf(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],i=a.event;a=a.listeners;e:{var u=void 0;if(t)for(var d=a.length-1;0<=d;d--){var m=a[d],b=m.instance,A=m.currentTarget;if(m=m.listener,b!==u&&i.isPropagationStopped())break e;u=m,i.currentTarget=A;try{u(i)}catch(B){yi(B)}i.currentTarget=null,u=b}else for(d=0;d<a.length;d++){if(m=a[d],b=m.instance,A=m.currentTarget,m=m.listener,b!==u&&i.isPropagationStopped())break e;u=m,i.currentTarget=A;try{u(i)}catch(B){yi(B)}i.currentTarget=null,u=b}}}}function me(e,t){var n=t[Ls];n===void 0&&(n=t[Ls]=new Set);var a=e+"__bubble";n.has(a)||(Qf(t,e,2,!1),n.add(a))}function wr(e,t,n){var a=0;t&&(a|=4),Qf(n,e,a,t)}var as="_reactListening"+Math.random().toString(36).slice(2);function Cr(e){if(!e[as]){e[as]=!0,Uc.forEach(function(n){n!=="selectionchange"&&(Ng.has(n)||wr(n,!1,e),wr(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[as]||(t[as]=!0,wr("selectionchange",!1,t))}}function Qf(e,t,n,a){switch(bh(t)){case 2:var i=ey;break;case 8:i=ty;break;default:i=Vr}n=i.bind(null,t,n,e),i=void 0,!Ks||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),a?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ar(e,t,n,a,i){var u=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var d=a.tag;if(d===3||d===4){var m=a.stateNode.containerInfo;if(m===i)break;if(d===4)for(d=a.return;d!==null;){var b=d.tag;if((b===3||b===4)&&d.stateNode.containerInfo===i)return;d=d.return}for(;m!==null;){if(d=ra(m),d===null)return;if(b=d.tag,b===5||b===6||b===26||b===27){a=u=d;continue e}m=m.parentNode}}a=a.return}Kc(function(){var A=u,B=Zs(n),Y=[];e:{var R=Eo.get(e);if(R!==void 0){var O=mi,I=e;switch(e){case"keypress":if(fi(n)===0)break e;case"keydown":case"keyup":O=xp;break;case"focusin":I="focus",O=Is;break;case"focusout":I="blur",O=Is;break;case"beforeblur":case"afterblur":O=Is;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=Wc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=up;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=Sp;break;case xo:case bo:case jo:O=op;break;case So:O=Tp;break;case"scroll":case"scrollend":O=ip;break;case"wheel":O=Np;break;case"copy":case"cut":case"paste":O=fp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Pc;break;case"toggle":case"beforetoggle":O=Cp}var le=(t&4)!==0,we=!le&&(e==="scroll"||e==="scrollend"),_=le?R!==null?R+"Capture":null:R;le=[];for(var T=A,C;T!==null;){var q=T;if(C=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||C===null||_===null||(q=Pa(T,_),q!=null&&le.push(zl(T,q,C))),we)break;T=T.return}0<le.length&&(R=new O(R,I,null,n,B),Y.push({event:R,listeners:le}))}}if((t&7)===0){e:{if(R=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",R&&n!==Qs&&(I=n.relatedTarget||n.fromElement)&&(ra(I)||I[ua]))break e;if((O||R)&&(R=B.window===B?B:(R=B.ownerDocument)?R.defaultView||R.parentWindow:window,O?(I=n.relatedTarget||n.toElement,O=A,I=I?ra(I):null,I!==null&&(we=h(I),le=I.tag,I!==we||le!==5&&le!==27&&le!==6)&&(I=null)):(O=null,I=A),O!==I)){if(le=Wc,q="onMouseLeave",_="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(le=Pc,q="onPointerLeave",_="onPointerEnter",T="pointer"),we=O==null?R:Ia(O),C=I==null?R:Ia(I),R=new le(q,T+"leave",O,n,B),R.target=we,R.relatedTarget=C,q=null,ra(B)===A&&(le=new le(_,T+"enter",I,n,B),le.target=C,le.relatedTarget=we,q=le),we=q,O&&I)t:{for(le=wg,_=O,T=I,C=0,q=_;q;q=le(q))C++;q=0;for(var ee=T;ee;ee=le(ee))q++;for(;0<C-q;)_=le(_),C--;for(;0<q-C;)T=le(T),q--;for(;C--;){if(_===T||T!==null&&_===T.alternate){le=_;break t}_=le(_),T=le(T)}le=null}else le=null;O!==null&&Zf(Y,R,O,le,!1),I!==null&&we!==null&&Zf(Y,we,I,le,!0)}}e:{if(R=A?Ia(A):window,O=R.nodeName&&R.nodeName.toLowerCase(),O==="select"||O==="input"&&R.type==="file")var xe=uo;else if(io(R))if(ro)xe=Bp;else{xe=Up;var P=Dp}else O=R.nodeName,!O||O.toLowerCase()!=="input"||R.type!=="checkbox"&&R.type!=="radio"?A&&Xs(A.elementType)&&(xe=uo):xe=Hp;if(xe&&(xe=xe(e,A))){so(Y,xe,n,B);break e}P&&P(e,R,A),e==="focusout"&&A&&R.type==="number"&&A.memoizedProps.value!=null&&Vs(R,"number",R.value)}switch(P=A?Ia(A):window,e){case"focusin":(io(P)||P.contentEditable==="true")&&(ya=P,lu=A,ul=null);break;case"focusout":ul=lu=ya=null;break;case"mousedown":iu=!0;break;case"contextmenu":case"mouseup":case"dragend":iu=!1,yo(Y,n,B);break;case"selectionchange":if(qp)break;case"keydown":case"keyup":yo(Y,n,B)}var oe;if(eu)e:{switch(e){case"compositionstart":var ge="onCompositionStart";break e;case"compositionend":ge="onCompositionEnd";break e;case"compositionupdate":ge="onCompositionUpdate";break e}ge=void 0}else ga?ao(e,n)&&(ge="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ge="onCompositionStart");ge&&(eo&&n.locale!=="ko"&&(ga||ge!=="onCompositionStart"?ge==="onCompositionEnd"&&ga&&(oe=$c()):(pn=B,$s="value"in pn?pn.value:pn.textContent,ga=!0)),P=ls(A,ge),0<P.length&&(ge=new Ic(ge,e,null,n,B),Y.push({event:ge,listeners:P}),oe?ge.data=oe:(oe=lo(n),oe!==null&&(ge.data=oe)))),(oe=Rp?kp(e,n):zp(e,n))&&(ge=ls(A,"onBeforeInput"),0<ge.length&&(P=new Ic("onBeforeInput","beforeinput",null,n,B),Y.push({event:P,listeners:ge}),P.data=oe)),Eg(Y,e,A,n,B)}Xf(Y,t)})}function zl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ls(e,t){for(var n=t+"Capture",a=[];e!==null;){var i=e,u=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||u===null||(i=Pa(e,n),i!=null&&a.unshift(zl(e,i,u)),i=Pa(e,t),i!=null&&a.push(zl(e,i,u))),e.tag===3)return a;e=e.return}return[]}function wg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Zf(e,t,n,a,i){for(var u=t._reactName,d=[];n!==null&&n!==a;){var m=n,b=m.alternate,A=m.stateNode;if(m=m.tag,b!==null&&b===a)break;m!==5&&m!==26&&m!==27||A===null||(b=A,i?(A=Pa(n,u),A!=null&&d.unshift(zl(n,A,b))):i||(A=Pa(n,u),A!=null&&d.push(zl(n,A,b)))),n=n.return}d.length!==0&&e.push({event:t,listeners:d})}var Cg=/\r\n?/g,Ag=/\u0000|\uFFFD/g;function Jf(e){return(typeof e=="string"?e:""+e).replace(Cg,`
|
|
49
|
-
`).replace(Ag,"")}function Kf(e,t){return t=Jf(t),Jf(e)===t}function Ne(e,t,n,a,i,u){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ha(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ha(e,""+a);break;case"className":ri(e,"class",a);break;case"tabIndex":ri(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ri(e,n,a);break;case"style":Zc(e,a,u);break;case"data":if(t!=="object"){ri(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=oi(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"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"&&(n==="formAction"?(t!=="input"&&Ne(e,t,"name",i.name,i,null),Ne(e,t,"formEncType",i.formEncType,i,null),Ne(e,t,"formMethod",i.formMethod,i,null),Ne(e,t,"formTarget",i.formTarget,i,null)):(Ne(e,t,"encType",i.encType,i,null),Ne(e,t,"method",i.method,i,null),Ne(e,t,"target",i.target,i,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=oi(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=Zt);break;case"onScroll":a!=null&&me("scroll",e);break;case"onScrollEnd":a!=null&&me("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(c(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=oi(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":me("beforetoggle",e),me("toggle",e),ui(e,"popover",a);break;case"xlinkActuate":Qt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Qt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Qt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Qt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Qt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Qt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":ui(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=ap.get(n)||n,ui(e,n,a))}}function Rr(e,t,n,a,i,u){switch(n){case"style":Zc(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(c(60));e.innerHTML=n}}break;case"children":typeof a=="string"?ha(e,a):(typeof a=="number"||typeof a=="bigint")&&ha(e,""+a);break;case"onScroll":a!=null&&me("scroll",e);break;case"onScrollEnd":a!=null&&me("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Zt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Hc.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),u=e[st]||null,u=u!=null?u[n]:null,typeof u=="function"&&e.removeEventListener(t,u,i),typeof a=="function")){typeof u!="function"&&u!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,i);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):ui(e,n,a)}}}function et(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":me("error",e),me("load",e);var a=!1,i=!1,u;for(u in n)if(n.hasOwnProperty(u)){var d=n[u];if(d!=null)switch(u){case"src":a=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Ne(e,t,u,d,n,null)}}i&&Ne(e,t,"srcSet",n.srcSet,n,null),a&&Ne(e,t,"src",n.src,n,null);return;case"input":me("invalid",e);var m=u=d=i=null,b=null,A=null;for(a in n)if(n.hasOwnProperty(a)){var B=n[a];if(B!=null)switch(a){case"name":i=B;break;case"type":d=B;break;case"checked":b=B;break;case"defaultChecked":A=B;break;case"value":u=B;break;case"defaultValue":m=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(c(137,t));break;default:Ne(e,t,a,B,n,null)}}Yc(e,u,m,b,A,d,i,!1);return;case"select":me("invalid",e),a=d=u=null;for(i in n)if(n.hasOwnProperty(i)&&(m=n[i],m!=null))switch(i){case"value":u=m;break;case"defaultValue":d=m;break;case"multiple":a=m;default:Ne(e,t,i,m,n,null)}t=u,n=d,e.multiple=!!a,t!=null?fa(e,!!a,t,!1):n!=null&&fa(e,!!a,n,!0);return;case"textarea":me("invalid",e),u=i=a=null;for(d in n)if(n.hasOwnProperty(d)&&(m=n[d],m!=null))switch(d){case"value":a=m;break;case"defaultValue":i=m;break;case"children":u=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(c(91));break;default:Ne(e,t,d,m,n,null)}Xc(e,a,i,u);return;case"option":for(b in n)if(n.hasOwnProperty(b)&&(a=n[b],a!=null))switch(b){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Ne(e,t,b,a,n,null)}return;case"dialog":me("beforetoggle",e),me("toggle",e),me("cancel",e),me("close",e);break;case"iframe":case"object":me("load",e);break;case"video":case"audio":for(a=0;a<kl.length;a++)me(kl[a],e);break;case"image":me("error",e),me("load",e);break;case"details":me("toggle",e);break;case"embed":case"source":case"link":me("error",e),me("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(A in n)if(n.hasOwnProperty(A)&&(a=n[A],a!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Ne(e,t,A,a,n,null)}return;default:if(Xs(t)){for(B in n)n.hasOwnProperty(B)&&(a=n[B],a!==void 0&&Rr(e,t,B,a,n,void 0));return}}for(m in n)n.hasOwnProperty(m)&&(a=n[m],a!=null&&Ne(e,t,m,a,n,null))}function Rg(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,u=null,d=null,m=null,b=null,A=null,B=null;for(O in n){var Y=n[O];if(n.hasOwnProperty(O)&&Y!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":b=Y;default:a.hasOwnProperty(O)||Ne(e,t,O,null,a,Y)}}for(var R in a){var O=a[R];if(Y=n[R],a.hasOwnProperty(R)&&(O!=null||Y!=null))switch(R){case"type":u=O;break;case"name":i=O;break;case"checked":A=O;break;case"defaultChecked":B=O;break;case"value":d=O;break;case"defaultValue":m=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(c(137,t));break;default:O!==Y&&Ne(e,t,R,O,a,Y)}}Ys(e,d,m,b,A,B,u,i);return;case"select":O=d=m=R=null;for(u in n)if(b=n[u],n.hasOwnProperty(u)&&b!=null)switch(u){case"value":break;case"multiple":O=b;default:a.hasOwnProperty(u)||Ne(e,t,u,null,a,b)}for(i in a)if(u=a[i],b=n[i],a.hasOwnProperty(i)&&(u!=null||b!=null))switch(i){case"value":R=u;break;case"defaultValue":m=u;break;case"multiple":d=u;default:u!==b&&Ne(e,t,i,u,a,b)}t=m,n=d,a=O,R!=null?fa(e,!!n,R,!1):!!a!=!!n&&(t!=null?fa(e,!!n,t,!0):fa(e,!!n,n?[]:"",!1));return;case"textarea":O=R=null;for(m in n)if(i=n[m],n.hasOwnProperty(m)&&i!=null&&!a.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Ne(e,t,m,null,a,i)}for(d in a)if(i=a[d],u=n[d],a.hasOwnProperty(d)&&(i!=null||u!=null))switch(d){case"value":R=i;break;case"defaultValue":O=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(c(91));break;default:i!==u&&Ne(e,t,d,i,a,u)}Vc(e,R,O);return;case"option":for(var I in n)if(R=n[I],n.hasOwnProperty(I)&&R!=null&&!a.hasOwnProperty(I))switch(I){case"selected":e.selected=!1;break;default:Ne(e,t,I,null,a,R)}for(b in a)if(R=a[b],O=n[b],a.hasOwnProperty(b)&&R!==O&&(R!=null||O!=null))switch(b){case"selected":e.selected=R&&typeof R!="function"&&typeof R!="symbol";break;default:Ne(e,t,b,R,a,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 le in n)R=n[le],n.hasOwnProperty(le)&&R!=null&&!a.hasOwnProperty(le)&&Ne(e,t,le,null,a,R);for(A in a)if(R=a[A],O=n[A],a.hasOwnProperty(A)&&R!==O&&(R!=null||O!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(c(137,t));break;default:Ne(e,t,A,R,a,O)}return;default:if(Xs(t)){for(var we in n)R=n[we],n.hasOwnProperty(we)&&R!==void 0&&!a.hasOwnProperty(we)&&Rr(e,t,we,void 0,a,R);for(B in a)R=a[B],O=n[B],!a.hasOwnProperty(B)||R===O||R===void 0&&O===void 0||Rr(e,t,B,R,a,O);return}}for(var _ in n)R=n[_],n.hasOwnProperty(_)&&R!=null&&!a.hasOwnProperty(_)&&Ne(e,t,_,null,a,R);for(Y in a)R=a[Y],O=n[Y],!a.hasOwnProperty(Y)||R===O||R==null&&O==null||Ne(e,t,Y,R,a,O)}function $f(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function kg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var i=n[a],u=i.transferSize,d=i.initiatorType,m=i.duration;if(u&&m&&$f(d)){for(d=0,m=i.responseEnd,a+=1;a<n.length;a++){var b=n[a],A=b.startTime;if(A>m)break;var B=b.transferSize,Y=b.initiatorType;B&&$f(Y)&&(b=b.responseEnd,d+=B*(b<m?1:(m-A)/(b-A)))}if(--a,t+=8*(u+d)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var kr=null,zr=null;function is(e){return e.nodeType===9?e:e.ownerDocument}function Ff(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 Wf(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 Mr(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 Or=null;function zg(){var e=window.event;return e&&e.type==="popstate"?e===Or?!1:(Or=e,!0):(Or=null,!1)}var If=typeof setTimeout=="function"?setTimeout:void 0,Mg=typeof clearTimeout=="function"?clearTimeout:void 0,Pf=typeof Promise=="function"?Promise:void 0,Og=typeof queueMicrotask=="function"?queueMicrotask:typeof Pf<"u"?function(e){return Pf.resolve(null).then(e).catch(Dg)}:If;function Dg(e){setTimeout(function(){throw e})}function zn(e){return e==="head"}function eh(e,t){var n=t,a=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(i),Xa(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")Ml(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Ml(n);for(var u=n.firstChild;u;){var d=u.nextSibling,m=u.nodeName;u[Wa]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&u.rel.toLowerCase()==="stylesheet"||n.removeChild(u),u=d}}else n==="body"&&Ml(e.ownerDocument.body);n=i}while(n);Xa(t)}function th(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Dr(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Dr(n),qs(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Ug(e,t,n,a){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Wa])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=kt(e.nextSibling),e===null)break}return null}function Hg(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=kt(e.nextSibling),e===null))return null;return e}function nh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=kt(e.nextSibling),e===null))return null;return e}function Ur(e){return e.data==="$?"||e.data==="$~"}function Hr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Bg(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function kt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Br=null;function ah(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return kt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function lh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function ih(e,t,n){switch(t=is(n),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function Ml(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);qs(e)}var zt=new Map,sh=new Set;function ss(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var cn=Z.d;Z.d={f:Lg,r:qg,D:Gg,C:Yg,L:Vg,m:Xg,X:Zg,S:Qg,M:Jg};function Lg(){var e=cn.f(),t=Wi();return e||t}function qg(e){var t=ca(e);t!==null&&t.tag===5&&t.type==="form"?Sd(t):cn.r(e)}var Ga=typeof document>"u"?null:document;function uh(e,t,n){var a=Ga;if(a&&typeof t=="string"&&t){var i=Tt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),sh.has(i)||(sh.add(i),e={rel:e,crossOrigin:n,href:t},a.querySelector(i)===null&&(t=a.createElement("link"),et(t,"link",e),Ke(t),a.head.appendChild(t)))}}function Gg(e){cn.D(e),uh("dns-prefetch",e,null)}function Yg(e,t){cn.C(e,t),uh("preconnect",e,t)}function Vg(e,t,n){cn.L(e,t,n);var a=Ga;if(a&&e&&t){var i='link[rel="preload"][as="'+Tt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Tt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Tt(n.imageSizes)+'"]')):i+='[href="'+Tt(e)+'"]';var u=i;switch(t){case"style":u=Ya(e);break;case"script":u=Va(e)}zt.has(u)||(e=v({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),zt.set(u,e),a.querySelector(i)!==null||t==="style"&&a.querySelector(Ol(u))||t==="script"&&a.querySelector(Dl(u))||(t=a.createElement("link"),et(t,"link",e),Ke(t),a.head.appendChild(t)))}}function Xg(e,t){cn.m(e,t);var n=Ga;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Tt(a)+'"][href="'+Tt(e)+'"]',u=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Va(e)}if(!zt.has(u)&&(e=v({rel:"modulepreload",href:e},t),zt.set(u,e),n.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Dl(u)))return}a=n.createElement("link"),et(a,"link",e),Ke(a),n.head.appendChild(a)}}}function Qg(e,t,n){cn.S(e,t,n);var a=Ga;if(a&&e){var i=oa(a).hoistableStyles,u=Ya(e);t=t||"default";var d=i.get(u);if(!d){var m={loading:0,preload:null};if(d=a.querySelector(Ol(u)))m.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},n),(n=zt.get(u))&&Lr(e,n);var b=d=a.createElement("link");Ke(b),et(b,"link",e),b._p=new Promise(function(A,B){b.onload=A,b.onerror=B}),b.addEventListener("load",function(){m.loading|=1}),b.addEventListener("error",function(){m.loading|=2}),m.loading|=4,us(d,t,a)}d={type:"stylesheet",instance:d,count:1,state:m},i.set(u,d)}}}function Zg(e,t){cn.X(e,t);var n=Ga;if(n&&e){var a=oa(n).hoistableScripts,i=Va(e),u=a.get(i);u||(u=n.querySelector(Dl(i)),u||(e=v({src:e,async:!0},t),(t=zt.get(i))&&qr(e,t),u=n.createElement("script"),Ke(u),et(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function Jg(e,t){cn.M(e,t);var n=Ga;if(n&&e){var a=oa(n).hoistableScripts,i=Va(e),u=a.get(i);u||(u=n.querySelector(Dl(i)),u||(e=v({src:e,async:!0,type:"module"},t),(t=zt.get(i))&&qr(e,t),u=n.createElement("script"),Ke(u),et(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function rh(e,t,n,a){var i=(i=se.current)?ss(i):null;if(!i)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ya(n.href),n=oa(i).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ya(n.href);var u=oa(i).hoistableStyles,d=u.get(e);if(d||(i=i.ownerDocument||i,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=i.querySelector(Ol(e)))&&!u._p&&(d.instance=u,d.state.loading=5),zt.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},zt.set(e,n),u||Kg(i,e,n,d.state))),t&&a===null)throw Error(c(528,""));return d}if(t&&a!==null)throw Error(c(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Va(n),n=oa(i).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Ya(e){return'href="'+Tt(e)+'"'}function Ol(e){return'link[rel="stylesheet"]['+e+"]"}function ch(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Kg(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),et(t,"link",n),Ke(t),e.head.appendChild(t))}function Va(e){return'[src="'+Tt(e)+'"]'}function Dl(e){return"script[async]"+e}function oh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Tt(n.href)+'"]');if(a)return t.instance=a,Ke(a),a;var i=v({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ke(a),et(a,"style",i),us(a,n.precedence,e),t.instance=a;case"stylesheet":i=Ya(n.href);var u=e.querySelector(Ol(i));if(u)return t.state.loading|=4,t.instance=u,Ke(u),u;a=ch(n),(i=zt.get(i))&&Lr(a,i),u=(e.ownerDocument||e).createElement("link"),Ke(u);var d=u;return d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),et(u,"link",a),t.state.loading|=4,us(u,n.precedence,e),t.instance=u;case"script":return u=Va(n.src),(i=e.querySelector(Dl(u)))?(t.instance=i,Ke(i),i):(a=n,(i=zt.get(u))&&(a=v({},n),qr(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),Ke(i),et(i,"link",a),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,us(a,n.precedence,e));return t.instance}function us(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,u=i,d=0;d<a.length;d++){var m=a[d];if(m.dataset.precedence===t)u=m;else if(u!==i)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Lr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function qr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var rs=null;function dh(e,t,n){if(rs===null){var a=new Map,i=rs=new Map;i.set(n,a)}else i=rs,a=i.get(n),a||(a=new Map,i.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var u=n[i];if(!(u[Wa]||u[Fe]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var d=u.getAttribute(t)||"";d=e+d;var m=a.get(d);m?m.push(u):a.set(d,[u])}}return a}function fh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function $g(e,t,n){if(n===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 hh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Fg(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=Ya(a.href),u=t.querySelector(Ol(i));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=cs.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=u,Ke(u);return}u=t.ownerDocument||t,a=ch(a),(i=zt.get(i))&&Lr(a,i),u=u.createElement("link"),Ke(u);var d=u;d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),et(u,"link",a),n.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=cs.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Gr=0;function Wg(e,t){return e.stylesheets&&e.count===0&&ds(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&ds(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Gr===0&&(Gr=62500*kg());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ds(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Gr?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function cs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ds(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var os=null;function ds(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,os=new Map,t.forEach(Ig,e),os=null,cs.call(e))}function Ig(e,t){if(!(t.state.loading&4)){var n=os.get(e);if(n)var a=n.get(null);else{n=new Map,os.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<i.length;u++){var d=i[u];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(n.set(d.dataset.precedence,d),a=d)}a&&n.set(null,a)}i=t.instance,d=i.getAttribute("data-precedence"),u=n.get(d)||a,u===a&&n.set(null,i),n.set(d,i),this.count++,a=cs.bind(this),i.addEventListener("load",a),i.addEventListener("error",a),u?u.parentNode.insertBefore(i,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Ul={$$typeof:L,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function Pg(e,t,n,a,i,u,d,m,b){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Us(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Us(0),this.hiddenUpdates=Us(null),this.identifierPrefix=a,this.onUncaughtError=i,this.onCaughtError=u,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function mh(e,t,n,a,i,u,d,m,b,A,B,Y){return e=new Pg(e,t,n,d,b,A,B,Y,m),t=1,u===!0&&(t|=24),u=yt(3,null,null,t),e.current=u,u.stateNode=e,t=bu(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:a,isDehydrated:n,cache:t},Tu(u),e}function ph(e){return e?(e=ba,e):ba}function gh(e,t,n,a,i,u){i=ph(i),a.context===null?a.context=i:a.pendingContext=i,a=jn(t),a.payload={element:n},u=u===void 0?null:u,u!==null&&(a.callback=u),n=Sn(e,a,t),n!==null&&(ft(n,e,t),ml(n,e,t))}function yh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Yr(e,t){yh(e,t),(e=e.alternate)&&yh(e,t)}function vh(e){if(e.tag===13||e.tag===31){var t=Zn(e,67108864);t!==null&&ft(t,e,67108864),Yr(e,67108864)}}function xh(e){if(e.tag===13||e.tag===31){var t=St();t=Hs(t);var n=Zn(e,t);n!==null&&ft(n,e,t),Yr(e,t)}}var fs=!0;function ey(e,t,n,a){var i=z.T;z.T=null;var u=Z.p;try{Z.p=2,Vr(e,t,n,a)}finally{Z.p=u,z.T=i}}function ty(e,t,n,a){var i=z.T;z.T=null;var u=Z.p;try{Z.p=8,Vr(e,t,n,a)}finally{Z.p=u,z.T=i}}function Vr(e,t,n,a){if(fs){var i=Xr(a);if(i===null)Ar(e,t,a,hs,n),jh(e,a);else if(ay(i,e,t,n,a))a.stopPropagation();else if(jh(e,a),t&4&&-1<ny.indexOf(e)){for(;i!==null;){var u=ca(i);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var d=Gn(u.pendingLanes);if(d!==0){var m=u;for(m.pendingLanes|=2,m.entangledLanes|=2;d;){var b=1<<31-pt(d);m.entanglements[1]|=b,d&=~b}Gt(u),(je&6)===0&&($i=ht()+500,Rl(0))}}break;case 31:case 13:m=Zn(u,2),m!==null&&ft(m,u,2),Wi(),Yr(u,2)}if(u=Xr(a),u===null&&Ar(e,t,a,hs,n),u===i)break;i=u}i!==null&&a.stopPropagation()}else Ar(e,t,a,null,n)}}function Xr(e){return e=Zs(e),Qr(e)}var hs=null;function Qr(e){if(hs=null,e=ra(e),e!==null){var t=h(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=p(t),e!==null)return e;e=null}else if(n===31){if(e=E(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hs=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(Gm()){case Nc:return 2;case wc:return 8;case ni:case Ym:return 32;case Cc:return 268435456;default:return 32}default:return 32}}var Zr=!1,Mn=null,On=null,Dn=null,Hl=new Map,Bl=new Map,Un=[],ny="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 jh(e,t){switch(e){case"focusin":case"focusout":Mn=null;break;case"dragenter":case"dragleave":On=null;break;case"mouseover":case"mouseout":Dn=null;break;case"pointerover":case"pointerout":Hl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bl.delete(t.pointerId)}}function Ll(e,t,n,a,i,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:u,targetContainers:[i]},t!==null&&(t=ca(t),t!==null&&vh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function ay(e,t,n,a,i){switch(t){case"focusin":return Mn=Ll(Mn,e,t,n,a,i),!0;case"dragenter":return On=Ll(On,e,t,n,a,i),!0;case"mouseover":return Dn=Ll(Dn,e,t,n,a,i),!0;case"pointerover":var u=i.pointerId;return Hl.set(u,Ll(Hl.get(u)||null,e,t,n,a,i)),!0;case"gotpointercapture":return u=i.pointerId,Bl.set(u,Ll(Bl.get(u)||null,e,t,n,a,i)),!0}return!1}function Sh(e){var t=ra(e.target);if(t!==null){var n=h(t);if(n!==null){if(t=n.tag,t===13){if(t=p(n),t!==null){e.blockedOn=t,Oc(e.priority,function(){xh(n)});return}}else if(t===31){if(t=E(n),t!==null){e.blockedOn=t,Oc(e.priority,function(){xh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ms(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xr(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Qs=a,n.target.dispatchEvent(a),Qs=null}else return t=ca(n),t!==null&&vh(t),e.blockedOn=n,!1;t.shift()}return!0}function Eh(e,t,n){ms(e)&&n.delete(t)}function ly(){Zr=!1,Mn!==null&&ms(Mn)&&(Mn=null),On!==null&&ms(On)&&(On=null),Dn!==null&&ms(Dn)&&(Dn=null),Hl.forEach(Eh),Bl.forEach(Eh)}function ps(e,t){e.blockedOn===t&&(e.blockedOn=null,Zr||(Zr=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,ly)))}var gs=null;function Th(e){gs!==e&&(gs=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){gs===e&&(gs=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],i=e[t+2];if(typeof a!="function"){if(Qr(a||n)===null)continue;break}var u=ca(n);u!==null&&(e.splice(t,3),t-=3,Xu(u,{pending:!0,data:i,method:n.method,action:a},a,i))}}))}function Xa(e){function t(b){return ps(b,e)}Mn!==null&&ps(Mn,e),On!==null&&ps(On,e),Dn!==null&&ps(Dn,e),Hl.forEach(t),Bl.forEach(t);for(var n=0;n<Un.length;n++){var a=Un[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Un.length&&(n=Un[0],n.blockedOn===null);)Sh(n),n.blockedOn===null&&Un.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var i=n[a],u=n[a+1],d=i[st]||null;if(typeof u=="function")d||Th(n);else if(d){var m=null;if(u&&u.hasAttribute("formAction")){if(i=u,d=u[st]||null)m=d.formAction;else if(Qr(i)!==null)continue}else m=d.action;typeof m=="function"?n[a+1]=m:(n.splice(a,3),a-=3),Th(n)}}}function _h(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(d){return i=d})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),a||setTimeout(n,20)}function n(){if(!a&&!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 a=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Jr(e){this._internalRoot=e}ys.prototype.render=Jr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var n=t.current,a=St();gh(n,a,e,t,null,null)},ys.prototype.unmount=Jr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gh(e.current,2,null,e,null,null),Wi(),t[ua]=null}};function ys(e){this._internalRoot=e}ys.prototype.unstable_scheduleHydration=function(e){if(e){var t=Mc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Un.length&&t!==0&&t<Un[n].priority;n++);Un.splice(n,0,e),n===0&&Sh(e)}};var Nh=r.version;if(Nh!=="19.2.5")throw Error(c(527,Nh,"19.2.5"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=g(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var iy={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vs.isDisabled&&vs.supportsFiber)try{Ka=vs.inject(iy),mt=vs}catch{}}return Gl.createRoot=function(e,t){if(!f(e))throw Error(c(299));var n=!1,a="",i=zd,u=Md,d=Od;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=mh(e,1,!1,null,null,n,a,null,i,u,d,_h),e[ua]=t.current,Cr(e),new Jr(t)},Gl.hydrateRoot=function(e,t,n){if(!f(e))throw Error(c(299));var a=!1,i="",u=zd,d=Md,m=Od,b=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(m=n.onRecoverableError),n.formState!==void 0&&(b=n.formState)),t=mh(e,1,!0,t,n??null,a,i,b,u,d,m,_h),t.context=ph(null),n=t.current,a=St(),a=Hs(a),i=jn(a),i.callback=null,Sn(n,i,a),n=a,t.current.lanes=n,Fa(t,n),Gt(t),e[ua]=t.current,Cr(e),new ys(t)},Gl.version="19.2.5",Gl}var Uh;function py(){if(Uh)return Fr.exports;Uh=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(r){console.error(r)}}return s(),Fr.exports=my(),Fr.exports}var gy=py();/**
|
|
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 Hh="popstate";function Bh(s){return typeof s=="object"&&s!=null&&"pathname"in s&&"search"in s&&"hash"in s&&"state"in s&&"key"in s}function yy(s={}){function r(c,f){var g;let h=(g=f.state)==null?void 0:g.masked,{pathname:p,search:E,hash:x}=h||c.location;return sc("",{pathname:p,search:E,hash:x},f.state&&f.state.usr||null,f.state&&f.state.key||"default",h?{pathname:c.location.pathname,search:c.location.search,hash:c.location.hash}:void 0)}function o(c,f){return typeof f=="string"?f:Ql(f)}return xy(r,o,null,s)}function Ue(s,r){if(s===!1||s===null||typeof s>"u")throw new Error(r)}function Vt(s,r){if(!s){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function vy(){return Math.random().toString(36).substring(2,10)}function Lh(s,r){return{usr:s.state,key:s.key,idx:r,masked:s.unstable_mask?{pathname:s.pathname,search:s.search,hash:s.hash}:void 0}}function sc(s,r,o=null,c,f){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof r=="string"?Qa(r):r,state:o,key:r&&r.key||c||vy(),unstable_mask:f}}function Ql({pathname:s="/",search:r="",hash:o=""}){return r&&r!=="?"&&(s+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(s+=o.charAt(0)==="#"?o:"#"+o),s}function Qa(s){let r={};if(s){let o=s.indexOf("#");o>=0&&(r.hash=s.substring(o),s=s.substring(0,o));let c=s.indexOf("?");c>=0&&(r.search=s.substring(c),s=s.substring(0,c)),s&&(r.pathname=s)}return r}function xy(s,r,o,c={}){let{window:f=document.defaultView,v5Compat:h=!1}=c,p=f.history,E="POP",x=null,g=S();g==null&&(g=0,p.replaceState({...p.state,idx:g},""));function S(){return(p.state||{idx:null}).idx}function v(){E="POP";let D=S(),G=D==null?null:D-g;g=D,x&&x({action:E,location:k.location,delta:G})}function N(D,G){E="PUSH";let W=Bh(D)?D:sc(k.location,D,G);g=S()+1;let L=Lh(W,g),M=k.createHref(W.unstable_mask||W);try{p.pushState(L,"",M)}catch(J){if(J instanceof DOMException&&J.name==="DataCloneError")throw J;f.location.assign(M)}h&&x&&x({action:E,location:k.location,delta:1})}function H(D,G){E="REPLACE";let W=Bh(D)?D:sc(k.location,D,G);g=S();let L=Lh(W,g),M=k.createHref(W.unstable_mask||W);p.replaceState(L,"",M),h&&x&&x({action:E,location:k.location,delta:0})}function U(D){return by(D)}let k={get action(){return E},get location(){return s(f,p)},listen(D){if(x)throw new Error("A history only accepts one active listener");return f.addEventListener(Hh,v),x=D,()=>{f.removeEventListener(Hh,v),x=null}},createHref(D){return r(f,D)},createURL:U,encodeLocation(D){let G=U(D);return{pathname:G.pathname,search:G.search,hash:G.hash}},push:N,replace:H,go(D){return p.go(D)}};return k}function by(s,r=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),Ue(o,"No window.location.(origin|href) available to create URL");let c=typeof s=="string"?s:Ql(s);return c=c.replace(/ $/,"%20"),!r&&c.startsWith("//")&&(c=o+c),new URL(c,o)}function am(s,r,o="/"){return jy(s,r,o,!1)}function jy(s,r,o,c){let f=typeof r=="string"?Qa(r):r,h=dn(f.pathname||"/",o);if(h==null)return null;let p=lm(s);Sy(p);let E=null;for(let x=0;E==null&&x<p.length;++x){let g=My(h);E=ky(p[x],g,c)}return E}function lm(s,r=[],o=[],c="",f=!1){let h=(p,E,x=f,g)=>{let S={relativePath:g===void 0?p.path||"":g,caseSensitive:p.caseSensitive===!0,childrenIndex:E,route:p};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(c)&&x)return;Ue(S.relativePath.startsWith(c),`Absolute route path "${S.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(c.length)}let v=Ht([c,S.relativePath]),N=o.concat(S);p.children&&p.children.length>0&&(Ue(p.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),lm(p.children,r,N,v,x)),!(p.path==null&&!p.index)&&r.push({path:v,score:Ay(v,p.index),routesMeta:N})};return s.forEach((p,E)=>{var x;if(p.path===""||!((x=p.path)!=null&&x.includes("?")))h(p,E);else for(let g of im(p.path))h(p,E,!0,g)}),r}function im(s){let r=s.split("/");if(r.length===0)return[];let[o,...c]=r,f=o.endsWith("?"),h=o.replace(/\?$/,"");if(c.length===0)return f?[h,""]:[h];let p=im(c.join("/")),E=[];return E.push(...p.map(x=>x===""?h:[h,x].join("/"))),f&&E.push(...p),E.map(x=>s.startsWith("/")&&x===""?"/":x)}function Sy(s){s.sort((r,o)=>r.score!==o.score?o.score-r.score:Ry(r.routesMeta.map(c=>c.childrenIndex),o.routesMeta.map(c=>c.childrenIndex)))}var Ey=/^:[\w-]+$/,Ty=3,_y=2,Ny=1,wy=10,Cy=-2,qh=s=>s==="*";function Ay(s,r){let o=s.split("/"),c=o.length;return o.some(qh)&&(c+=Cy),r&&(c+=_y),o.filter(f=>!qh(f)).reduce((f,h)=>f+(Ey.test(h)?Ty:h===""?Ny:wy),c)}function Ry(s,r){return s.length===r.length&&s.slice(0,-1).every((c,f)=>c===r[f])?s[s.length-1]-r[r.length-1]:0}function ky(s,r,o=!1){let{routesMeta:c}=s,f={},h="/",p=[];for(let E=0;E<c.length;++E){let x=c[E],g=E===c.length-1,S=h==="/"?r:r.slice(h.length)||"/",v=Ss({path:x.relativePath,caseSensitive:x.caseSensitive,end:g},S),N=x.route;if(!v&&g&&o&&!c[c.length-1].route.index&&(v=Ss({path:x.relativePath,caseSensitive:x.caseSensitive,end:!1},S)),!v)return null;Object.assign(f,v.params),p.push({params:f,pathname:Ht([h,v.pathname]),pathnameBase:Hy(Ht([h,v.pathnameBase])),route:N}),v.pathnameBase!=="/"&&(h=Ht([h,v.pathnameBase]))}return p}function Ss(s,r){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[o,c]=zy(s.path,s.caseSensitive,s.end),f=r.match(o);if(!f)return null;let h=f[0],p=h.replace(/(.)\/+$/,"$1"),E=f.slice(1);return{params:c.reduce((g,{paramName:S,isOptional:v},N)=>{if(S==="*"){let U=E[N]||"";p=h.slice(0,h.length-U.length).replace(/(.)\/+$/,"$1")}const H=E[N];return v&&!H?g[S]=void 0:g[S]=(H||"").replace(/%2F/g,"/"),g},{}),pathname:h,pathnameBase:p,pattern:s}}function zy(s,r=!1,o=!0){Vt(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let c=[],f="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,E,x,g,S)=>{if(c.push({paramName:E,isOptional:x!=null}),x){let v=S.charAt(g+p.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(c.push({paramName:"*"}),f+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?f+="\\/*$":s!==""&&s!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,r?void 0:"i"),c]}function My(s){try{return s.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Vt(!1,`The URL path "${s}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),s}}function dn(s,r){if(r==="/")return s;if(!s.toLowerCase().startsWith(r.toLowerCase()))return null;let o=r.endsWith("/")?r.length-1:r.length,c=s.charAt(o);return c&&c!=="/"?null:s.slice(o)||"/"}var Oy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Dy(s,r="/"){let{pathname:o,search:c="",hash:f=""}=typeof s=="string"?Qa(s):s,h;return o?(o=um(o),o.startsWith("/")?h=Gh(o.substring(1),"/"):h=Gh(o,r)):h=r,{pathname:h,search:By(c),hash:Ly(f)}}function Gh(s,r){let o=Es(r).split("/");return s.split("/").forEach(f=>{f===".."?o.length>1&&o.pop():f!=="."&&o.push(f)}),o.length>1?o.join("/"):"/"}function ec(s,r,o,c){return`Cannot include a '${s}' character in a manually specified \`to.${r}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Uy(s){return s.filter((r,o)=>o===0||r.route.path&&r.route.path.length>0)}function sm(s){let r=Uy(s);return r.map((o,c)=>c===r.length-1?o.pathname:o.pathnameBase)}function dc(s,r,o,c=!1){let f;typeof s=="string"?f=Qa(s):(f={...s},Ue(!f.pathname||!f.pathname.includes("?"),ec("?","pathname","search",f)),Ue(!f.pathname||!f.pathname.includes("#"),ec("#","pathname","hash",f)),Ue(!f.search||!f.search.includes("#"),ec("#","search","hash",f)));let h=s===""||f.pathname==="",p=h?"/":f.pathname,E;if(p==null)E=o;else{let v=r.length-1;if(!c&&p.startsWith("..")){let N=p.split("/");for(;N[0]==="..";)N.shift(),v-=1;f.pathname=N.join("/")}E=v>=0?r[v]:"/"}let x=Dy(f,E),g=p&&p!=="/"&&p.endsWith("/"),S=(h||p===".")&&o.endsWith("/");return!x.pathname.endsWith("/")&&(g||S)&&(x.pathname+="/"),x}var um=s=>s.replace(/\/\/+/g,"/"),Ht=s=>um(s.join("/")),Es=s=>s.replace(/\/+$/,""),Hy=s=>Es(s).replace(/^\/*/,"/"),By=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,Ly=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,qy=class{constructor(s,r,o,c=!1){this.status=s,this.statusText=r||"",this.internal=c,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function Gy(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function Yy(s){let r=s.map(o=>o.route.path).filter(Boolean);return Ht(r)||"/"}var rm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function cm(s,r){let o=s;if(typeof o!="string"||!Oy.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let c=o,f=!1;if(rm)try{let h=new URL(window.location.href),p=o.startsWith("//")?new URL(h.protocol+o):new URL(o),E=dn(p.pathname,r);p.origin===h.origin&&E!=null?o=E+p.search+p.hash:f=!0}catch{Vt(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:f,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var om=["POST","PUT","PATCH","DELETE"];new Set(om);var Vy=["GET",...om];new Set(Vy);var Za=y.createContext(null);Za.displayName="DataRouter";var Ns=y.createContext(null);Ns.displayName="DataRouterState";var dm=y.createContext(!1);function Xy(){return y.useContext(dm)}var fm=y.createContext({isTransitioning:!1});fm.displayName="ViewTransition";var Qy=y.createContext(new Map);Qy.displayName="Fetchers";var Zy=y.createContext(null);Zy.displayName="Await";var Mt=y.createContext(null);Mt.displayName="Navigation";var Kl=y.createContext(null);Kl.displayName="Location";var Xt=y.createContext({outlet:null,matches:[],isDataRoute:!1});Xt.displayName="Route";var fc=y.createContext(null);fc.displayName="RouteError";var hm="REACT_ROUTER_ERROR",Jy="REDIRECT",Ky="ROUTE_ERROR_RESPONSE";function $y(s){if(s.startsWith(`${hm}:${Jy}:{`))try{let r=JSON.parse(s.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 Fy(s){if(s.startsWith(`${hm}:${Ky}:{`))try{let r=JSON.parse(s.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new qy(r.status,r.statusText,r.data)}catch{}}function Wy(s,{relative:r}={}){Ue($l(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:c}=y.useContext(Mt),{hash:f,pathname:h,search:p}=Wl(s,{relative:r}),E=h;return o!=="/"&&(E=h==="/"?o:Ht([o,h])),c.createHref({pathname:E,search:p,hash:f})}function $l(){return y.useContext(Kl)!=null}function fn(){return Ue($l(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Kl).location}var mm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function pm(s){y.useContext(Mt).static||y.useLayoutEffect(s)}function Iy(){let{isDataRoute:s}=y.useContext(Xt);return s?dv():Py()}function Py(){Ue($l(),"useNavigate() may be used only in the context of a <Router> component.");let s=y.useContext(Za),{basename:r,navigator:o}=y.useContext(Mt),{matches:c}=y.useContext(Xt),{pathname:f}=fn(),h=JSON.stringify(sm(c)),p=y.useRef(!1);return pm(()=>{p.current=!0}),y.useCallback((x,g={})=>{if(Vt(p.current,mm),!p.current)return;if(typeof x=="number"){o.go(x);return}let S=dc(x,JSON.parse(h),f,g.relative==="path");s==null&&r!=="/"&&(S.pathname=S.pathname==="/"?r:Ht([r,S.pathname])),(g.replace?o.replace:o.push)(S,g.state,g)},[r,o,h,f,s])}y.createContext(null);function Fl(){let{matches:s}=y.useContext(Xt),r=s[s.length-1];return(r==null?void 0:r.params)??{}}function Wl(s,{relative:r}={}){let{matches:o}=y.useContext(Xt),{pathname:c}=fn(),f=JSON.stringify(sm(o));return y.useMemo(()=>dc(s,JSON.parse(f),c,r==="path"),[s,f,c,r])}function ev(s,r){return gm(s,r)}function gm(s,r,o){var D;Ue($l(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=y.useContext(Mt),{matches:f}=y.useContext(Xt),h=f[f.length-1],p=h?h.params:{},E=h?h.pathname:"/",x=h?h.pathnameBase:"/",g=h&&h.route;{let G=g&&g.path||"";vm(E,!g||G.endsWith("*")||G.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${E}" (under <Route path="${G}">) 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="${G}"> to <Route path="${G==="/"?"*":`${G}/*`}">.`)}let S=fn(),v;if(r){let G=typeof r=="string"?Qa(r):r;Ue(x==="/"||((D=G.pathname)==null?void 0:D.startsWith(x)),`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 "${x}" but pathname "${G.pathname}" was given in the \`location\` prop.`),v=G}else v=S;let N=v.pathname||"/",H=N;if(x!=="/"){let G=x.replace(/^\//,"").split("/");H="/"+N.replace(/^\//,"").split("/").slice(G.length).join("/")}let U=am(s,{pathname:H});Vt(g||U!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Vt(U==null||U[U.length-1].route.element!==void 0||U[U.length-1].route.Component!==void 0||U[U.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let k=iv(U&&U.map(G=>Object.assign({},G,{params:Object.assign({},p,G.params),pathname:Ht([x,c.encodeLocation?c.encodeLocation(G.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathname]),pathnameBase:G.pathnameBase==="/"?x:Ht([x,c.encodeLocation?c.encodeLocation(G.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathnameBase])})),f,o);return r&&k?y.createElement(Kl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...v},navigationType:"POP"}},k):k}function tv(){let s=ov(),r=Gy(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),o=s instanceof Error?s.stack:null,c="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:c},h={padding:"2px 4px",backgroundColor:c},p=null;return console.error("Error handled by React Router default ErrorBoundary:",s),p=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:h},"ErrorBoundary")," or"," ",y.createElement("code",{style:h},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},r),o?y.createElement("pre",{style:f},o):null,p)}var nv=y.createElement(tv,null),ym=class extends y.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,r){return r.location!==s.location||r.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:r.error,location:r.location,revalidation:s.revalidation||r.revalidation}}componentDidCatch(s,r){this.props.onError?this.props.onError(s,r):console.error("React Router caught the following error during render",s)}render(){let s=this.state.error;if(this.context&&typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){const o=Fy(s.digest);o&&(s=o)}let r=s!==void 0?y.createElement(Xt.Provider,{value:this.props.routeContext},y.createElement(fc.Provider,{value:s,children:this.props.component})):this.props.children;return this.context?y.createElement(av,{error:s},r):r}};ym.contextType=dm;var tc=new WeakMap;function av({children:s,error:r}){let{basename:o}=y.useContext(Mt);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let c=$y(r.digest);if(c){let f=tc.get(r);if(f)throw f;let h=cm(c.location,o);if(rm&&!tc.get(r))if(h.isExternal||c.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:c.replace}));throw tc.set(r,p),p}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return s}function lv({routeContext:s,match:r,children:o}){let c=y.useContext(Za);return c&&c.static&&c.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(Xt.Provider,{value:s},o)}function iv(s,r=[],o){let c=o==null?void 0:o.state;if(s==null){if(!c)return null;if(c.errors)s=c.matches;else if(r.length===0&&!c.initialized&&c.matches.length>0)s=c.matches;else return null}let f=s,h=c==null?void 0:c.errors;if(h!=null){let S=f.findIndex(v=>v.route.id&&(h==null?void 0:h[v.route.id])!==void 0);Ue(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),f=f.slice(0,Math.min(f.length,S+1))}let p=!1,E=-1;if(o&&c){p=c.renderFallback;for(let S=0;S<f.length;S++){let v=f[S];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(E=S),v.route.id){let{loaderData:N,errors:H}=c,U=v.route.loader&&!N.hasOwnProperty(v.route.id)&&(!H||H[v.route.id]===void 0);if(v.route.lazy||U){o.isStatic&&(p=!0),E>=0?f=f.slice(0,E+1):f=[f[0]];break}}}}let x=o==null?void 0:o.onError,g=c&&x?(S,v)=>{var N,H;x(S,{location:c.location,params:((H=(N=c.matches)==null?void 0:N[0])==null?void 0:H.params)??{},unstable_pattern:Yy(c.matches),errorInfo:v})}:void 0;return f.reduceRight((S,v,N)=>{let H,U=!1,k=null,D=null;c&&(H=h&&v.route.id?h[v.route.id]:void 0,k=v.route.errorElement||nv,p&&(E<0&&N===0?(vm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),U=!0,D=null):E===N&&(U=!0,D=v.route.hydrateFallbackElement||null)));let G=r.concat(f.slice(0,N+1)),W=()=>{let L;return H?L=k:U?L=D:v.route.Component?L=y.createElement(v.route.Component,null):v.route.element?L=v.route.element:L=S,y.createElement(lv,{match:v,routeContext:{outlet:S,matches:G,isDataRoute:c!=null},children:L})};return c&&(v.route.ErrorBoundary||v.route.errorElement||N===0)?y.createElement(ym,{location:c.location,revalidation:c.revalidation,component:k,error:H,children:W(),routeContext:{outlet:null,matches:G,isDataRoute:!0},onError:g}):W()},null)}function hc(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sv(s){let r=y.useContext(Za);return Ue(r,hc(s)),r}function uv(s){let r=y.useContext(Ns);return Ue(r,hc(s)),r}function rv(s){let r=y.useContext(Xt);return Ue(r,hc(s)),r}function mc(s){let r=rv(s),o=r.matches[r.matches.length-1];return Ue(o.route.id,`${s} can only be used on routes that contain a unique "id"`),o.route.id}function cv(){return mc("useRouteId")}function ov(){var c;let s=y.useContext(fc),r=uv("useRouteError"),o=mc("useRouteError");return s!==void 0?s:(c=r.errors)==null?void 0:c[o]}function dv(){let{router:s}=sv("useNavigate"),r=mc("useNavigate"),o=y.useRef(!1);return pm(()=>{o.current=!0}),y.useCallback(async(f,h={})=>{Vt(o.current,mm),o.current&&(typeof f=="number"?await s.navigate(f):await s.navigate(f,{fromRouteId:r,...h}))},[s,r])}var Yh={};function vm(s,r,o){!r&&!Yh[s]&&(Yh[s]=!0,Vt(!1,o))}y.memo(fv);function fv({routes:s,future:r,state:o,isStatic:c,onError:f}){return gm(s,void 0,{state:o,isStatic:c,onError:f})}function nt(s){Ue(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function hv({basename:s="/",children:r=null,location:o,navigationType:c="POP",navigator:f,static:h=!1,unstable_useTransitions:p}){Ue(!$l(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let E=s.replace(/^\/*/,"/"),x=y.useMemo(()=>({basename:E,navigator:f,static:h,unstable_useTransitions:p,future:{}}),[E,f,h,p]);typeof o=="string"&&(o=Qa(o));let{pathname:g="/",search:S="",hash:v="",state:N=null,key:H="default",unstable_mask:U}=o,k=y.useMemo(()=>{let D=dn(g,E);return D==null?null:{location:{pathname:D,search:S,hash:v,state:N,key:H,unstable_mask:U},navigationType:c}},[E,g,S,v,N,H,c,U]);return Vt(k!=null,`<Router basename="${E}"> is not able to match the URL "${g}${S}${v}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:y.createElement(Mt.Provider,{value:x},y.createElement(Kl.Provider,{children:r,value:k}))}function nc({children:s,location:r}){return ev(uc(s),r)}function uc(s,r=[]){let o=[];return y.Children.forEach(s,(c,f)=>{if(!y.isValidElement(c))return;let h=[...r,f];if(c.type===y.Fragment){o.push.apply(o,uc(c.props.children,h));return}Ue(c.type===nt,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ue(!c.props.index||!c.props.children,"An index route cannot have child routes.");let p={id:c.props.id||h.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(p.children=uc(c.props.children,h)),o.push(p)}),o}var bs="get",js="application/x-www-form-urlencoded";function ws(s){return typeof HTMLElement<"u"&&s instanceof HTMLElement}function mv(s){return ws(s)&&s.tagName.toLowerCase()==="button"}function pv(s){return ws(s)&&s.tagName.toLowerCase()==="form"}function gv(s){return ws(s)&&s.tagName.toLowerCase()==="input"}function yv(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function vv(s,r){return s.button===0&&(!r||r==="_self")&&!yv(s)}var xs=null;function xv(){if(xs===null)try{new FormData(document.createElement("form"),0),xs=!1}catch{xs=!0}return xs}var bv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ac(s){return s!=null&&!bv.has(s)?(Vt(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${js}"`),null):s}function jv(s,r){let o,c,f,h,p;if(pv(s)){let E=s.getAttribute("action");c=E?dn(E,r):null,o=s.getAttribute("method")||bs,f=ac(s.getAttribute("enctype"))||js,h=new FormData(s)}else if(mv(s)||gv(s)&&(s.type==="submit"||s.type==="image")){let E=s.form;if(E==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let x=s.getAttribute("formaction")||E.getAttribute("action");if(c=x?dn(x,r):null,o=s.getAttribute("formmethod")||E.getAttribute("method")||bs,f=ac(s.getAttribute("formenctype"))||ac(E.getAttribute("enctype"))||js,h=new FormData(E,s),!xv()){let{name:g,type:S,value:v}=s;if(S==="image"){let N=g?`${g}.`:"";h.append(`${N}x`,"0"),h.append(`${N}y`,"0")}else g&&h.append(g,v)}}else{if(ws(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=bs,c=null,f=js,p=s}return h&&f==="text/plain"&&(p=h,h=void 0),{action:c,method:o.toLowerCase(),encType:f,formData:h,body:p}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function pc(s,r){if(s===!1||s===null||typeof s>"u")throw new Error(r)}function xm(s,r,o,c){let f=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return o?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${c}`:f.pathname=`${f.pathname}.${c}`:f.pathname==="/"?f.pathname=`_root.${c}`:r&&dn(f.pathname,r)==="/"?f.pathname=`${Es(r)}/_root.${c}`:f.pathname=`${Es(f.pathname)}.${c}`,f}async function Sv(s,r){if(s.id in r)return r[s.id];try{let o=await import(s.module);return r[s.id]=o,o}catch(o){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ev(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function Tv(s,r,o){let c=await Promise.all(s.map(async f=>{let h=r.routes[f.route.id];if(h){let p=await Sv(h,o);return p.links?p.links():[]}return[]}));return Cv(c.flat(1).filter(Ev).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Vh(s,r,o,c,f,h){let p=(x,g)=>o[g]?x.route.id!==o[g].route.id:!0,E=(x,g)=>{var S;return o[g].pathname!==x.pathname||((S=o[g].route.path)==null?void 0:S.endsWith("*"))&&o[g].params["*"]!==x.params["*"]};return h==="assets"?r.filter((x,g)=>p(x,g)||E(x,g)):h==="data"?r.filter((x,g)=>{var v;let S=c.routes[x.route.id];if(!S||!S.hasLoader)return!1;if(p(x,g)||E(x,g))return!0;if(x.route.shouldRevalidate){let N=x.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((v=o[0])==null?void 0:v.params)||{},nextUrl:new URL(s,window.origin),nextParams:x.params,defaultShouldRevalidate:!0});if(typeof N=="boolean")return N}return!0}):[]}function _v(s,r,{includeHydrateFallback:o}={}){return Nv(s.map(c=>{let f=r.routes[c.route.id];if(!f)return[];let h=[f.module];return f.clientActionModule&&(h=h.concat(f.clientActionModule)),f.clientLoaderModule&&(h=h.concat(f.clientLoaderModule)),o&&f.hydrateFallbackModule&&(h=h.concat(f.hydrateFallbackModule)),f.imports&&(h=h.concat(f.imports)),h}).flat(1))}function Nv(s){return[...new Set(s)]}function wv(s){let r={},o=Object.keys(s).sort();for(let c of o)r[c]=s[c];return r}function Cv(s,r){let o=new Set;return new Set(r),s.reduce((c,f)=>{let h=JSON.stringify(wv(f));return o.has(h)||(o.add(h),c.push({key:h,link:f})),c},[])}function gc(){let s=y.useContext(Za);return pc(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function Av(){let s=y.useContext(Ns);return pc(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var yc=y.createContext(void 0);yc.displayName="FrameworkContext";function vc(){let s=y.useContext(yc);return pc(s,"You must render this element inside a <HydratedRouter> element"),s}function Rv(s,r){let o=y.useContext(yc),[c,f]=y.useState(!1),[h,p]=y.useState(!1),{onFocus:E,onBlur:x,onMouseEnter:g,onMouseLeave:S,onTouchStart:v}=r,N=y.useRef(null);y.useEffect(()=>{if(s==="render"&&p(!0),s==="viewport"){let k=G=>{G.forEach(W=>{p(W.isIntersecting)})},D=new IntersectionObserver(k,{threshold:.5});return N.current&&D.observe(N.current),()=>{D.disconnect()}}},[s]),y.useEffect(()=>{if(c){let k=setTimeout(()=>{p(!0)},100);return()=>{clearTimeout(k)}}},[c]);let H=()=>{f(!0)},U=()=>{f(!1),p(!1)};return o?s!=="intent"?[h,N,{}]:[h,N,{onFocus:Yl(E,H),onBlur:Yl(x,U),onMouseEnter:Yl(g,H),onMouseLeave:Yl(S,U),onTouchStart:Yl(v,H)}]:[!1,N,{}]}function Yl(s,r){return o=>{s&&s(o),o.defaultPrevented||r(o)}}function kv({page:s,...r}){let o=Xy(),{router:c}=gc(),f=y.useMemo(()=>am(c.routes,s,c.basename),[c.routes,s,c.basename]);return f?o?y.createElement(Mv,{page:s,matches:f,...r}):y.createElement(Ov,{page:s,matches:f,...r}):null}function zv(s){let{manifest:r,routeModules:o}=vc(),[c,f]=y.useState([]);return y.useEffect(()=>{let h=!1;return Tv(s,r,o).then(p=>{h||f(p)}),()=>{h=!0}},[s,r,o]),c}function Mv({page:s,matches:r,...o}){let c=fn(),{future:f}=vc(),{basename:h}=gc(),p=y.useMemo(()=>{if(s===c.pathname+c.search+c.hash)return[];let E=xm(s,h,f.unstable_trailingSlashAwareDataRequests,"rsc"),x=!1,g=[];for(let S of r)typeof S.route.shouldRevalidate=="function"?x=!0:g.push(S.route.id);return x&&g.length>0&&E.searchParams.set("_routes",g.join(",")),[E.pathname+E.search]},[h,f.unstable_trailingSlashAwareDataRequests,s,c,r]);return y.createElement(y.Fragment,null,p.map(E=>y.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...o})))}function Ov({page:s,matches:r,...o}){let c=fn(),{future:f,manifest:h,routeModules:p}=vc(),{basename:E}=gc(),{loaderData:x,matches:g}=Av(),S=y.useMemo(()=>Vh(s,r,g,h,c,"data"),[s,r,g,h,c]),v=y.useMemo(()=>Vh(s,r,g,h,c,"assets"),[s,r,g,h,c]),N=y.useMemo(()=>{if(s===c.pathname+c.search+c.hash)return[];let k=new Set,D=!1;if(r.forEach(W=>{var M;let L=h.routes[W.route.id];!L||!L.hasLoader||(!S.some(J=>J.route.id===W.route.id)&&W.route.id in x&&((M=p[W.route.id])!=null&&M.shouldRevalidate)||L.hasClientLoader?D=!0:k.add(W.route.id))}),k.size===0)return[];let G=xm(s,E,f.unstable_trailingSlashAwareDataRequests,"data");return D&&k.size>0&&G.searchParams.set("_routes",r.filter(W=>k.has(W.route.id)).map(W=>W.route.id).join(",")),[G.pathname+G.search]},[E,f.unstable_trailingSlashAwareDataRequests,x,c,h,S,r,s,p]),H=y.useMemo(()=>_v(v,h),[v,h]),U=zv(v);return y.createElement(y.Fragment,null,N.map(k=>y.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...o})),H.map(k=>y.createElement("link",{key:k,rel:"modulepreload",href:k,...o})),U.map(({key:k,link:D})=>y.createElement("link",{key:k,nonce:o.nonce,...D,crossOrigin:D.crossOrigin??o.crossOrigin})))}function Dv(...s){return r=>{s.forEach(o=>{typeof o=="function"?o(r):o!=null&&(o.current=r)})}}var Uv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Uv&&(window.__reactRouterVersion="7.14.2")}catch{}function Hv({basename:s,children:r,unstable_useTransitions:o,window:c}){let f=y.useRef();f.current==null&&(f.current=yy({window:c,v5Compat:!0}));let h=f.current,[p,E]=y.useState({action:h.action,location:h.location}),x=y.useCallback(g=>{o===!1?E(g):y.startTransition(()=>E(g))},[o]);return y.useLayoutEffect(()=>h.listen(x),[h,x]),y.createElement(hv,{basename:s,children:r,location:p.location,navigationType:p.action,navigator:h,unstable_useTransitions:o})}var bm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,De=y.forwardRef(function({onClick:r,discover:o="render",prefetch:c="none",relative:f,reloadDocument:h,replace:p,unstable_mask:E,state:x,target:g,to:S,preventScrollReset:v,viewTransition:N,unstable_defaultShouldRevalidate:H,...U},k){let{basename:D,navigator:G,unstable_useTransitions:W}=y.useContext(Mt),L=typeof S=="string"&&bm.test(S),M=cm(S,D);S=M.to;let J=Wy(S,{relative:f}),K=fn(),X=null;if(E){let te=dc(E,[],K.unstable_mask?K.unstable_mask.pathname:"/",!0);D!=="/"&&(te.pathname=te.pathname==="/"?D:Ht([D,te.pathname])),X=G.createHref(te)}let[ue,fe,He]=Rv(c,U),ke=Gv(S,{replace:p,unstable_mask:E,state:x,target:g,preventScrollReset:v,relative:f,viewTransition:N,unstable_defaultShouldRevalidate:H,unstable_useTransitions:W});function ze(te){r&&r(te),te.defaultPrevented||ke(te)}let ie=!(M.isExternal||h),$=y.createElement("a",{...U,...He,href:(ie?X:void 0)||M.absoluteURL||J,onClick:ie?ze:r,ref:Dv(k,fe),target:g,"data-discover":!L&&o==="render"?"true":void 0});return ue&&!L?y.createElement(y.Fragment,null,$,y.createElement(kv,{page:J})):$});De.displayName="Link";var Bv=y.forwardRef(function({"aria-current":r="page",caseSensitive:o=!1,className:c="",end:f=!1,style:h,to:p,viewTransition:E,children:x,...g},S){let v=Wl(p,{relative:g.relative}),N=fn(),H=y.useContext(Ns),{navigator:U,basename:k}=y.useContext(Mt),D=H!=null&&Zv(v)&&E===!0,G=U.encodeLocation?U.encodeLocation(v).pathname:v.pathname,W=N.pathname,L=H&&H.navigation&&H.navigation.location?H.navigation.location.pathname:null;o||(W=W.toLowerCase(),L=L?L.toLowerCase():null,G=G.toLowerCase()),L&&k&&(L=dn(L,k)||L);const M=G!=="/"&&G.endsWith("/")?G.length-1:G.length;let J=W===G||!f&&W.startsWith(G)&&W.charAt(M)==="/",K=L!=null&&(L===G||!f&&L.startsWith(G)&&L.charAt(G.length)==="/"),X={isActive:J,isPending:K,isTransitioning:D},ue=J?r:void 0,fe;typeof c=="function"?fe=c(X):fe=[c,J?"active":null,K?"pending":null,D?"transitioning":null].filter(Boolean).join(" ");let He=typeof h=="function"?h(X):h;return y.createElement(De,{...g,"aria-current":ue,className:fe,ref:S,style:He,to:p,viewTransition:E},typeof x=="function"?x(X):x)});Bv.displayName="NavLink";var Lv=y.forwardRef(({discover:s="render",fetcherKey:r,navigate:o,reloadDocument:c,replace:f,state:h,method:p=bs,action:E,onSubmit:x,relative:g,preventScrollReset:S,viewTransition:v,unstable_defaultShouldRevalidate:N,...H},U)=>{let{unstable_useTransitions:k}=y.useContext(Mt),D=Xv(),G=Qv(E,{relative:g}),W=p.toLowerCase()==="get"?"get":"post",L=typeof E=="string"&&bm.test(E),M=J=>{if(x&&x(J),J.defaultPrevented)return;J.preventDefault();let K=J.nativeEvent.submitter,X=(K==null?void 0:K.getAttribute("formmethod"))||p,ue=()=>D(K||J.currentTarget,{fetcherKey:r,method:X,navigate:o,replace:f,state:h,relative:g,preventScrollReset:S,viewTransition:v,unstable_defaultShouldRevalidate:N});k&&o!==!1?y.startTransition(()=>ue()):ue()};return y.createElement("form",{ref:U,method:W,action:G,onSubmit:c?x:M,...H,"data-discover":!L&&s==="render"?"true":void 0})});Lv.displayName="Form";function qv(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jm(s){let r=y.useContext(Za);return Ue(r,qv(s)),r}function Gv(s,{target:r,replace:o,unstable_mask:c,state:f,preventScrollReset:h,relative:p,viewTransition:E,unstable_defaultShouldRevalidate:x,unstable_useTransitions:g}={}){let S=Iy(),v=fn(),N=Wl(s,{relative:p});return y.useCallback(H=>{if(vv(H,r)){H.preventDefault();let U=o!==void 0?o:Ql(v)===Ql(N),k=()=>S(s,{replace:U,unstable_mask:c,state:f,preventScrollReset:h,relative:p,viewTransition:E,unstable_defaultShouldRevalidate:x});g?y.startTransition(()=>k()):k()}},[v,S,N,o,c,f,r,s,h,p,E,x,g])}var Yv=0,Vv=()=>`__${String(++Yv)}__`;function Xv(){let{router:s}=jm("useSubmit"),{basename:r}=y.useContext(Mt),o=cv(),c=s.fetch,f=s.navigate;return y.useCallback(async(h,p={})=>{let{action:E,method:x,encType:g,formData:S,body:v}=jv(h,r);if(p.navigate===!1){let N=p.fetcherKey||Vv();await c(N,o,p.action||E,{unstable_defaultShouldRevalidate:p.unstable_defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:S,body:v,formMethod:p.method||x,formEncType:p.encType||g,flushSync:p.flushSync})}else await f(p.action||E,{unstable_defaultShouldRevalidate:p.unstable_defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:S,body:v,formMethod:p.method||x,formEncType:p.encType||g,replace:p.replace,state:p.state,fromRouteId:o,flushSync:p.flushSync,viewTransition:p.viewTransition})},[c,f,r,o])}function Qv(s,{relative:r}={}){let{basename:o}=y.useContext(Mt),c=y.useContext(Xt);Ue(c,"useFormAction must be used inside a RouteContext");let[f]=c.matches.slice(-1),h={...Wl(s||".",{relative:r})},p=fn();if(s==null){h.search=p.search;let E=new URLSearchParams(h.search),x=E.getAll("index");if(x.some(S=>S==="")){E.delete("index"),x.filter(v=>v).forEach(v=>E.append("index",v));let S=E.toString();h.search=S?`?${S}`:""}}return(!s||s===".")&&f.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(h.pathname=h.pathname==="/"?o:Ht([o,h.pathname])),Ql(h)}function Zv(s,{relative:r}={}){let o=y.useContext(fm);Ue(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=jm("useViewTransitionState"),f=Wl(s,{relative:r});if(!o.isTransitioning)return!1;let h=dn(o.currentLocation.pathname,c)||o.currentLocation.pathname,p=dn(o.nextLocation.pathname,c)||o.nextLocation.pathname;return Ss(f.pathname,p)!=null||Ss(f.pathname,h)!=null}const Sm=/^\/vault\/admin(?=\/|$)/,Em=/^\/vault\/([^/]+)\/admin(?=\/|$)/;function xc(){return typeof window>"u"?!1:Sm.test(window.location.pathname)}function Tm(){if(typeof window>"u"||xc())return null;const s=window.location.pathname.match(Em);if(!s)return null;try{return decodeURIComponent(s[1])}catch{return null}}function Jv(){if(typeof window>"u")return"";const s=window.location.pathname;if(Sm.test(s))return"/vault/admin";const r=s.match(Em);return r?`/vault/${r[1]}/admin`:s==="/admin"||s.startsWith("/admin/")?"/admin":""}let Bn=null,Yt=null,ia=null,on=null,Xh=!1;const Kv=.8,$v=1e3,Fv=3e4;function Wv(){if(typeof window>"u")return;const s=window.location.hash;if(!s||s.length<2)return;const r=new URLSearchParams(s.slice(1)),o=r.get("token");if(!o)return;Bn=o,Yt=null,r.delete("token");const c=r.toString(),f=c.length>0?`#${c}`:"",h=`${window.location.pathname}${window.location.search}${f}`;window.history.replaceState(null,"",h)}function bc(){return Bn}function Iv(){Bn=null,Yt=null,on=null,Cs()}async function Zl(s){if(typeof window>"u")return{kind:"network-error",message:"no window"};let r;try{r=await fetch(`/admin/vault-admin-token/${encodeURIComponent(s)}`,{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"})}catch(c){return{kind:"network-error",message:c instanceof Error?c.message:String(c)}}if(r.status===401||r.status===403||r.status===404)return{kind:"auth-required",status:r.status};if(!r.ok)return{kind:"network-error",message:`hub returned ${r.status}`};let o;try{o=await r.json()}catch(c){return{kind:"network-error",message:c instanceof Error?c.message:"could not parse mint response"}}return typeof o.token!="string"||o.token.length===0?{kind:"network-error",message:"mint response missing token"}:(Bn=o.token,Yt=o.expires_at?Pv(o.expires_at):null,on=s,_m(),n0(),{kind:"ok",token:o.token})}function Pv(s){const r=Date.parse(s);return Number.isNaN(r)?null:r}async function Ts(s){if(Bn){if(Yt===null||Yt>Date.now())return{kind:"ok",token:Bn};Bn=null,Yt=null,Cs()}return Zl(s)}async function e0(s){typeof window>"u"||Bn||await Zl(s).catch(()=>{})}function _m(){if(Cs(),Yt===null||on===null||typeof document<"u"&&document.visibilityState==="hidden")return;const s=Date.now(),r=Yt-s;if(r<=0)return;const o=Math.max(Math.floor(r*Kv),$v);ia=setTimeout(()=>{t0()},o)}function Cs(){ia!==null&&(clearTimeout(ia),ia=null)}async function t0(){if(ia=null,on===null)return;const s=await Zl(on);s.kind!=="ok"&&(typeof console<"u"&&console.warn("[vault-admin-spa] proactive token refresh failed; will retry once",s),ia=setTimeout(()=>{ia=null,on!==null&&Zl(on).catch(()=>{})},Fv))}function n0(){Xh||typeof document>"u"||(Xh=!0,document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){Cs();return}if(on!==null){if(Yt!==null&&Yt<=Date.now()){Zl(on).catch(()=>{});return}_m()}}))}class de extends Error{constructor(r,o,c){super(o),this.status=r,this.errorType=c,this.name="HttpError"}}async function Oe(s,r,o={}){let c=bc();if(!c){const g=await Ts(s);if(g.kind!=="ok")throw new de(401,"no admin token — sign in to the hub to refresh");c=g.token}const{headers:f,...h}=o,p=g=>({accept:"application/json",...f??{},authorization:`Bearer ${g}`}),E=await fetch(r,{...h,headers:p(c)});if(E.status!==401)return E;Iv();const x=await Ts(s);return x.kind!=="ok"?E:fetch(r,{...h,headers:p(x.token)})}async function Nm(){const s=await fetch("/vaults/list",{headers:{accept:"application/json"}});if(s.status===404)return[];if(!s.ok)throw new de(s.status,`vaults/list fetch failed: ${s.status}`);return(await s.json()).vaults??[]}async function a0(s){const r=await Oe(s,`/vault/${encodeURIComponent(s)}/`);if(!r.ok)throw new de(r.status,await at(r));return await r.json()}async function l0(s){const r=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror`);if(!r.ok)throw new de(r.status,await at(r));return await r.json()}async function wm(s,r){const o=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(!o.ok)throw new de(o.status,await at(o));return await o.json()}async function i0(s){const r=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/run-now`,{method:"POST"});if(!r.ok)throw new de(r.status,await at(r));return await r.json()}async function s0(s){const r=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/push-now`,{method:"POST"});if(!r.ok)throw new de(r.status,await at(r));return await r.json()}async function jc(s){const r=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth`);if(!r.ok)throw new de(r.status,await at(r));return await r.json()}async function u0(s){const r=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth`,{method:"DELETE"});if(!r.ok)throw new de(r.status,await at(r));return await r.json()}async function r0(s){const r=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/device-code`,{method:"POST"});if(!r.ok)throw new de(r.status,await at(r));return await r.json()}async function c0(s,r){const o=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/poll`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({polling_id:r})});if(!o.ok&&o.status!==404)throw new de(o.status,await at(o));return await o.json()}async function o0(s,r){const o=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/pat`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(!o.ok)throw new de(o.status,await at(o));return await o.json()}async function Cm(s){const r=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/installations`);if(!r.ok){const{message:o,errorType:c}=await Sc(r);throw new de(r.status,o,c)}return await r.json()}async function Am(s){const r=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/repos`);if(!r.ok)throw new de(r.status,await at(r));return await r.json()}async function d0(s,r){const o=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/create-repo`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(!o.ok){const{message:c,errorType:f}=await Sc(o);throw new de(o.status,c,f)}return await o.json()}async function f0(s,r){const o=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/auth/github/select-repo`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(!o.ok)throw new de(o.status,await at(o));return await o.json()}async function h0(s,r){const o=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/import`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(r)});if(o.ok)return{attached:!1,job:await o.json()};if(o.status===409){const c=await o.text();let f,h=c;try{const p=JSON.parse(c);typeof p.job_id=="string"&&p.job_id.length>0&&(f=p.job_id),p.message&&(h=p.message)}catch{}if(f)return{attached:!0,job:await Rm(s,f)};throw new de(409,h,"concurrent_import")}throw new de(o.status,await at(o))}async function Rm(s,r){const o=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/mirror/import/${encodeURIComponent(r)}`);if(!o.ok)throw new de(o.status,await at(o));return await o.json()}async function m0(s){const r=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/embeddings`);if(!r.ok)throw new de(r.status,await at(r));return await r.json()}async function p0(s,r){const o=await Oe(s,`/vault/${encodeURIComponent(s)}/.parachute/embeddings`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:r})});if(!o.ok)throw new de(o.status,await at(o));return await o.json()}async function at(s){return(await Sc(s)).message}async function Sc(s){try{const r=await s.text(),o=JSON.parse(r),c=typeof o.error_type=="string"?o.error_type:void 0;if(o.error_description)return{message:o.error_description,errorType:c};if(o.message)return{message:o.message,errorType:c};if(o.error)return{message:o.error,errorType:c};if(r)return{message:r,errorType:c}}catch{}return{message:`${s.status} ${s.statusText}`}}function km(s){const r=s.split(".");if(r.length!==3)return null;try{const o=r[1].replace(/-/g,"+").replace(/_/g,"/"),c=o.length%4===0?"":"=".repeat(4-o.length%4),f=atob(o+c),h=JSON.parse(f);return h===null||typeof h!="object"?null:h}catch{return null}}function g0(s){if(!s)return[];const r=km(s);if(!r)return[];const o=r.scope;if(typeof o=="string"&&o.length>0)return o.split(/\s+/).filter(f=>f.length>0);const c=r.scopes;return Array.isArray(c)?c.filter(f=>typeof f=="string"&&f.length>0):[]}function Ec(s){return g0(bc()).includes(`vault:${s}:admin`)}function zm(){const s=bc();if(!s)return null;const r=km(s);if(!r)return null;const o=r.iss;return typeof o!="string"||o.length===0?null:o.replace(/\/$/,"")}let Vl=null,Xl=null;function y0(s){const r=Date.parse(s);return Number.isNaN(r)?null:r}async function v0(){if(typeof window>"u")return{kind:"network-error",message:"no window"};let s;try{s=await fetch("/admin/host-admin-token",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"})}catch(o){return{kind:"network-error",message:o instanceof Error?o.message:String(o)}}if(s.status===403)return{kind:"forbidden"};if(s.status===401||s.status===404)return{kind:"auth-required",status:s.status};if(!s.ok)return{kind:"network-error",message:`hub returned ${s.status}`};let r;try{r=await s.json()}catch(o){return{kind:"network-error",message:o instanceof Error?o.message:"could not parse host-admin mint response"}}return typeof r.token!="string"||r.token.length===0?{kind:"network-error",message:"host-admin mint response missing token"}:(Vl=r.token,Xl=r.expires_at?y0(r.expires_at):null,{kind:"ok",token:r.token})}async function _s(){if(Vl){if(Xl===null||Xl>Date.now())return{kind:"ok",token:Vl};Vl=null,Xl=null}return v0()}function x0(){Vl=null,Xl=null}class Ln extends Error{constructor(r,o,c){super(o),this.status=r,this.disposition=c,this.name="HostAdminError"}}async function Il(s,r={}){let o;const c=await _s();if(c.kind!=="ok")throw Qh(c);o=c.token;const{headers:f,...h}=r,p=g=>({accept:"application/json",...f??{},authorization:`Bearer ${g}`}),E=await fetch(s,{...h,headers:p(o)});if(E.status!==401)return E;x0();const x=await _s();if(x.kind!=="ok")throw Qh(x);return fetch(s,{...h,headers:p(x.token)})}function Qh(s){return s.kind==="forbidden"?new Ln(403,"host-admin token mint forbidden — not the hub admin","forbidden"):s.kind==="auth-required"?new Ln(s.status,"no host-admin session — sign in to the hub to manage tokens","auth-required"):new Ln(0,s.message,"network-error")}function Jl(){if(typeof window>"u")return;const s=zm();window.location.href=s?`${s}/account/`:"/account/"}async function b0(){let s;try{s=await fetch("/.well-known/parachute.json",{headers:{accept:"application/json"}})}catch(f){return{kind:"error",message:f instanceof Error?f.message:String(f)}}if(s.status===404)return{kind:"no-hub"};if(!s.ok)return{kind:"error",message:`well-known fetch failed: ${s.status}`};let r;try{r=await s.json()}catch{return{kind:"no-hub"}}const o=Array.isArray(r.vaults)?r.vaults:[],c=[];for(const f of o){const h=f??{};typeof h.name=="string"&&c.push({name:h.name,url:typeof h.url=="string"?h.url:"",version:typeof h.version=="string"?h.version:"",...typeof h.managementUrl=="string"?{managementUrl:h.managementUrl}:{}})}return{kind:"ok",vaults:c}}async function j0(s){var E,x;const r=await fetch(`/admin/vault-admin-token/${encodeURIComponent(s)}`,{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(!r.ok)throw new Error(`vault-admin-token mint failed: ${r.status}`);const o=await r.json();if(typeof o.token!="string"||o.token.length===0)throw new Error("vault-admin-token mint returned no token");const c=await fetch(`/vault/${encodeURIComponent(s)}/.parachute/usage`,{headers:{accept:"application/json",authorization:`Bearer ${o.token}`}});if(!c.ok)throw new Error(`usage fetch failed: ${c.status}`);const f=await c.json(),h=(E=f.counts)==null?void 0:E.notes,p=(x=f.bytes)==null?void 0:x.total;if(typeof h!="number"||typeof p!="number")throw new Error("usage report malformed");return{notes:h,totalBytes:p}}function S0(s){if(!Number.isFinite(s)||s<0)return"0 B";if(s<1024)return`${Math.round(s)} B`;const r=s/1024;if(r<1024)return`${Math.round(r)} KB`;const o=r/1024;return o<1024?`${o.toFixed(1)} MB`:`${(o/1024).toFixed(1)} GB`}const E0=/^[a-z0-9_-]+$/,T0=new Set(["list","new","assets","admin"]);function _0(s){return s.length===0?null:E0.test(s)?s.length<2||s.length>32?"Vault names must be 2–32 characters long.":T0.has(s)?`"${s}" is a reserved name.`:null:"Lowercase letters, numbers, hyphens, and underscores only."}class rc extends Error{constructor(r,o,c){super(o),this.status=r,this.code=c,this.name="VaultsApiError"}}async function Mm(s){let r,o=`${s.status}`;try{const c=await s.json();typeof c.error=="string"&&(r=c.error),o=c.error_description??c.error??o}catch{}return new rc(s.status,o,r)}async function N0(s){const r=await Il("/vaults",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:s})});if(!r.ok)throw await Mm(r);const o=await r.json(),c={name:o.name,url:o.url,version:o.version,created:r.status===201};return o.token&&(c.token=o.token),o.token_guidance&&(c.tokenGuidance=o.token_guidance),c}async function w0(s){const r=await Il(`/vaults/${encodeURIComponent(s)}`,{method:"DELETE",headers:{"content-type":"application/json"},body:JSON.stringify({confirm:s})});if(!r.ok)throw await Mm(r);const o=await r.json();return{name:o.name,cascade:o.cascade,warnings:o.warnings??[]}}const Zh=5e3,C0=3e4;function sa({vaultName:s,status:r,onRecovered:o,ensure:c,serverMessage:f}){const h=r===403,[p,E]=y.useState("probing");if(y.useEffect(()=>{if(h)return;let v=!1;return(async()=>{const N=await(c?c():Ts(s??""));v||E(N.kind==="ok"?"token-rejected":"signed-out")})(),()=>{v=!0}},[s,c,h]),y.useEffect(()=>{if(h||p==="probing")return;let v=!1,N=null;const H=p==="token-rejected"?C0:Zh,U=async()=>{if(v||typeof document<"u"&&document.visibilityState!=="visible")return;if(p==="token-rejected"){o(),N=setTimeout(()=>void U(),H);return}const D=await(c?c():Ts(s??""));if(!v){if(D.kind==="ok"){o();return}N=setTimeout(()=>void U(),H)}},k=()=>{typeof document>"u"||document.visibilityState==="visible"&&(N!==null&&(clearTimeout(N),N=null),U())};return N=setTimeout(()=>void U(),Zh),typeof document<"u"&&document.addEventListener("visibilitychange",k),()=>{v=!0,N!==null&&clearTimeout(N),typeof document<"u"&&document.removeEventListener("visibilitychange",k)}},[s,o,h,c,p]),h)return l.jsxs("div",{className:"warn-banner",role:"status",children:[l.jsxs("p",{style:{margin:"0 0 0.5rem"},children:["You're signed in, but vault management is restricted to the hub admin."," ",l.jsx("a",{href:"/account/",children:"Go to your account →"})]}),l.jsx("p",{className:"dim",style:{margin:0,fontSize:"0.85rem"},children:"Ask the hub admin if you need access to manage this vault."})]});if(p==="token-rejected")return l.jsxs("div",{className:"warn-banner",role:"status",children:[l.jsxs("p",{style:{margin:"0 0 0.5rem"},children:[l.jsx("strong",{children:"You're signed in, but this vault rejected the request."})," ","That's a problem on the server, not with your session — signing in again won't change it."]}),f?l.jsx("p",{className:"dim",style:{margin:"0 0 0.5rem",fontSize:"0.85rem",fontFamily:"var(--mono, monospace)"},children:f}):null,l.jsx("p",{className:"dim",style:{margin:0,fontSize:"0.85rem"},children:"Retrying every 30 seconds. If it persists, check the vault's logs — this usually means the vault can't reach the hub it validates tokens against."})]});const x=A0(),g=`/login?next=${encodeURIComponent(x)}`,S=r===404?"This hub doesn't host a vault by that name.":"You're not signed in to the hub.";return p==="probing"?l.jsx("div",{className:"warn-banner",role:"status",children:l.jsx("p",{style:{margin:0},children:"Checking your session…"})}):l.jsxs("div",{className:"warn-banner",role:"status",children:[l.jsxs("p",{style:{margin:"0 0 0.5rem"},children:[S," ",l.jsx("a",{href:g,children:"Sign in to the hub →"})]}),l.jsx("p",{className:"dim",style:{margin:0,fontSize:"0.85rem"},children:"After signing in, this page will refresh automatically."})]})}function A0(){return typeof window>"u"?"/":`${window.location.pathname}${window.location.search}${window.location.hash}`}function R0(){const[s,r]=y.useState({kind:"loading"}),[o,c]=y.useState({kind:"checking"}),[f,h]=y.useState({}),[p,E]=y.useState({kind:"idle"}),[x,g]=y.useState(""),[S,v]=y.useState({kind:"idle"}),[N,H]=y.useState(0);y.useEffect(()=>{let L=!1;return b0().then(async M=>{if(!L){if(M.kind==="ok"){r({kind:"ok",vaults:M.vaults});return}if(M.kind==="no-hub"){const J=await Nm().catch(()=>[]);if(L)return;r({kind:"no-hub",names:J});return}r({kind:"error",message:M.message})}}),()=>{L=!0}},[N]),y.useEffect(()=>{if(s.kind!=="ok"||o.kind==="ok")return;let L=!1;return _s().then(M=>{L||(M.kind==="ok"?c({kind:"ok"}):M.kind==="forbidden"?c({kind:"banner",status:403}):M.kind==="auth-required"?c({kind:"banner",status:M.status}):c({kind:"banner",status:null}))}),()=>{L=!0}},[s.kind]),y.useEffect(()=>{if(s.kind!=="ok")return;const L=s.vaults.map(J=>J.name);if(L.length===0)return;let M=!1;h(J=>{const K={...J};for(const X of L)K[X]||(K[X]={kind:"loading"});return K});for(const J of L)j0(J).then(K=>{M||h(X=>({...X,[J]:{kind:"ok",usage:K}}))}).catch(()=>{M||h(K=>({...K,[J]:{kind:"error"}}))});return()=>{M=!0}},[s]);const U=y.useCallback(()=>{c({kind:"ok"}),h({}),H(L=>L+1)},[]),k=_0(x);async function D(L){if(L.preventDefault(),!(x.length===0||k)){E({kind:"submitting"});try{const M=await N0(x);E({kind:"created",result:M}),g(""),H(J=>J+1)}catch(M){if(M instanceof Ln){if(M.disposition==="forbidden"){Jl();return}c({kind:"banner",status:M.status||null}),E({kind:"idle"});return}const J=M instanceof rc?`${M.status}: ${M.message}`:M instanceof Error?M.message:String(M);E({kind:"error",message:J})}}}async function G(L){v({kind:"deleting",name:L});try{const M=await w0(L);v({kind:"done",result:M}),h(J=>{const K={...J};return delete K[L],K}),H(J=>J+1)}catch(M){if(M instanceof Ln){if(M.disposition==="forbidden"){Jl();return}c({kind:"banner",status:M.status||null}),v({kind:"idle"});return}const J=M instanceof rc||M instanceof Error?M.message:String(M);v({kind:"error",name:L,message:J})}}if(s.kind==="loading")return l.jsxs("div",{children:[l.jsx("h2",{children:"Vaults"}),l.jsx("p",{className:"muted",children:"Loading…"})]});if(s.kind==="no-hub")return l.jsxs("div",{children:[l.jsx("h2",{children:"Vaults"}),l.jsxs("div",{className:"warn-banner",role:"status",children:[l.jsx("p",{style:{margin:"0 0 0.5rem"},children:"This page is being served directly by the vault daemon — there's no hub on this origin, so vault management (create / delete) isn't available here."}),l.jsxs("p",{className:"dim",style:{margin:0,fontSize:"0.85rem"},children:["The hub origin is the front door: open ",l.jsx("code",{children:"/vault/admin/"})," on your hub (port 1939 by default) to manage vaults. Read-only vault names below."]})]}),s.names.length>0?l.jsx("div",{style:{marginTop:"1rem"},children:s.names.map(L=>l.jsxs("a",{href:`/vault/${encodeURIComponent(L)}/admin/`,className:"vault-row",children:[l.jsx("div",{className:"body",children:l.jsx("div",{className:"name",children:l.jsx("code",{children:L})})}),l.jsx("div",{className:"chev",children:"→"})]},L))}):null]});if(s.kind==="error")return l.jsxs("div",{children:[l.jsx("h2",{children:"Vaults"}),l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:s.message})}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>H(L=>L+1),children:"Retry"})]});const W=o.kind==="ok";return l.jsxs("div",{children:[l.jsx("div",{className:"list-header",children:l.jsxs("h2",{children:["Vaults (",s.vaults.length,")"]})}),o.kind==="banner"?l.jsx(sa,{status:o.status,onRecovered:U,ensure:_s}):null,l.jsxs("p",{className:"muted",children:["Vaults registered with this hub. ",l.jsx("strong",{children:"Manage"})," opens each vault's own admin page (a full page load — use your browser's back button to return here)."]}),S.kind==="done"?l.jsx(z0,{result:S.result,onDismiss:()=>v({kind:"idle"})}):null,s.vaults.length===0?l.jsxs("div",{className:"empty",children:["No vaults yet",W?" — create your first below.":"."]}):l.jsx("div",{style:{marginTop:"1rem"},children:s.vaults.map(L=>{const M=f[L.name],J=(M==null?void 0:M.kind)==="ok"?`${M.usage.notes} ${M.usage.notes===1?"note":"notes"} · ${S0(M.usage.totalBytes)}`:(M==null?void 0:M.kind)==="loading"?"…":"—",K=S.kind==="confirming"&&S.name===L.name,X=S.kind==="deleting"&&S.name===L.name,ue=S.kind==="error"&&S.name===L.name?S.message:null;return l.jsxs("div",{className:"vault-row-group",children:[l.jsxs("div",{className:"vault-row",children:[l.jsxs("div",{className:"body",children:[l.jsxs("div",{className:"name",children:[l.jsx("code",{children:L.name}),L.version?l.jsxs("span",{className:"tag muted",title:"Vault version",children:[" ","v",L.version]}):null]}),l.jsx("div",{className:"dim vault-usage","data-testid":`vault-usage-${L.name}`,children:J}),ue?l.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:l.jsx("code",{children:ue})}):null]}),l.jsxs("div",{className:"vault-row-actions",children:[l.jsx("a",{href:`/vault/${encodeURIComponent(L.name)}/admin/`,children:l.jsx("button",{type:"button",children:"Manage"})}),W?l.jsx("button",{type:"button",className:"secondary",disabled:X,onClick:()=>v(K?{kind:"idle"}:{kind:"confirming",name:L.name,typed:""}),children:X?"Deleting…":"Delete"}):null]})]}),K&&S.kind==="confirming"?l.jsxs("div",{className:"section",style:{marginTop:"0.5rem"},children:[l.jsxs("p",{style:{margin:"0 0 0.5rem"},children:["Deleting ",l.jsx("code",{children:L.name})," permanently destroys its notes and revokes every token, grant, assignment, and invite naming it. Type the vault name to confirm:"]}),l.jsxs("div",{className:"row",style:{display:"flex",gap:"0.5rem"},children:[l.jsx("input",{type:"text","aria-label":`Type ${L.name} to confirm deletion`,placeholder:L.name,value:S.typed,onChange:fe=>v({kind:"confirming",name:L.name,typed:fe.target.value})}),l.jsx("button",{type:"button",disabled:S.typed!==L.name,onClick:()=>void G(L.name),children:"Delete this vault"}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>v({kind:"idle"}),children:"Cancel"})]})]}):null]},L.name)})}),W?l.jsxs("div",{className:"section",style:{marginTop:"1.5rem"},children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Create a vault"}),p.kind==="created"?l.jsx(k0,{result:p.result,onDone:()=>E({kind:"idle"})}):l.jsxs("form",{onSubmit:L=>void D(L),children:[p.kind==="error"?l.jsxs("div",{className:"error-banner",style:{marginBottom:"0.5rem"},children:["Couldn't create vault: ",l.jsx("code",{children:p.message})]}):null,l.jsxs("div",{className:"row",style:{display:"flex",gap:"0.5rem"},children:[l.jsx("input",{id:"new-vault-name",type:"text","aria-label":"New vault name",value:x,onChange:L=>g(L.target.value),placeholder:"e.g. work, home, scratch",disabled:p.kind==="submitting"}),l.jsx("button",{type:"submit",disabled:x.length===0||!!k||p.kind==="submitting",children:p.kind==="submitting"?"Creating…":"Create vault"})]}),k?l.jsx("div",{className:"field-error",children:k}):l.jsxs("div",{className:"dim",style:{fontSize:"0.85rem",marginTop:"0.35rem"},children:["Lowercase letters, numbers, hyphens, underscores. Becomes the path under"," ",l.jsx("code",{children:"/vault/<name>"}),"."]})]})]}):null]})}function k0({result:s,onDone:r}){const[o,c]=y.useState(!1),f=async()=>{if(s.token)try{await navigator.clipboard.writeText(s.token),c(!0),setTimeout(()=>c(!1),2e3)}catch{}};return s.token?l.jsxs("div",{className:"mint-banner",children:[l.jsxs("h4",{style:{margin:"0 0 0.5rem"},children:["Vault ",l.jsx("code",{children:s.name})," created — access token (shown once)"]}),l.jsxs("p",{className:"muted",children:["A hub-issued JWT scoped ",l.jsxs("code",{children:["vault:",s.name,":admin"]}),". This is the only time it's shown — copy it somewhere safe. You don't need it for the OAuth connect path; for a header-auth token later, mint a scope-narrow one with"," ",l.jsxs("code",{children:["parachute auth mint-token --scope vault:",s.name,":read"]}),"."]}),l.jsxs("div",{className:"token-box",children:[l.jsx("code",{children:s.token}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>void f(),children:o?"Copied":"Copy"})]}),l.jsx("div",{className:"actions",style:{marginTop:"0.5rem"},children:l.jsx("button",{type:"button",onClick:r,children:"Done — I've saved the token"})})]}):s.created?l.jsxs("div",{className:"section",children:[l.jsxs("p",{children:["Vault ",l.jsx("code",{children:s.name})," was created",s.tokenGuidance?l.jsxs(l.Fragment,{children:[" ","— ",l.jsx("span",{className:"muted",children:s.tokenGuidance})]}):l.jsx("span",{className:"muted",children:" (no bootstrap token was minted)"}),". Connect over OAuth (no token needed), or mint a scope-narrow header-auth token with"," ",l.jsxs("code",{children:["parachute auth mint-token --scope vault:",s.name,":read"]}),"."]}),l.jsx("button",{type:"button",onClick:r,children:"Done"})]}):l.jsxs("div",{className:"section",children:[l.jsxs("p",{children:["Vault ",l.jsx("code",{children:s.name})," already existed; nothing new was created."]}),l.jsx("button",{type:"button",onClick:r,children:"Continue"})]})}function z0({result:s,onDismiss:r}){const o=s.cascade;return l.jsxs("div",{className:"section",role:"status",style:{marginTop:"0.75rem"},children:[l.jsxs("h3",{style:{margin:"0 0 0.5rem",fontSize:"1rem",fontWeight:500},children:["Vault ",l.jsx("code",{children:s.name})," deleted"]}),l.jsxs("ul",{style:{margin:"0 0 0.5rem"},children:[l.jsxs("li",{children:[o.tokens_revoked," token(s) revoked"]}),l.jsxs("li",{children:[o.grants_rewritten," grant(s) rewritten, ",o.grants_dropped," dropped"]}),l.jsxs("li",{children:[o.user_vaults_removed," user assignment(s) removed"]}),l.jsxs("li",{children:[o.invites_invalidated," invite(s) invalidated"]}),l.jsxs("li",{children:[o.connections_torn_down," connection(s) torn down"]}),l.jsxs("li",{children:["vault data ",o.vault_removed?"removed":"NOT removed","; module"," ",o.module_restarted?"restarted":"not restarted"]})]}),o.orphaned_channels.length>0?l.jsxs("div",{className:"warn-banner",style:{marginBottom:"0.5rem"},children:["Orphaned channel(s) still reference this vault:"," ",o.orphaned_channels.map((c,f)=>l.jsxs("span",{children:[f>0?", ":"",l.jsx("code",{children:c})]},c))," ","— remove them from the channel module's own admin page."]}):null,s.warnings.length>0?l.jsx("div",{className:"warn-banner",style:{marginBottom:"0.5rem"},children:s.warnings.map(c=>l.jsxs("div",{children:[l.jsx("code",{children:c.step}),": ",c.detail]},c.step))}):null,l.jsx("button",{type:"button",className:"secondary",onClick:r,children:"Dismiss"})]})}const M0="https://parachute.computer/install#connect-mcp-clients";function Om(s,r){return`${s.replace(/\/+$/,"")}/vault/${encodeURIComponent(r)}/mcp`}function O0(s,r){return`claude mcp add --transport http parachute-${r} ${Om(s,r)}`}function D0(){var s;return typeof window>"u"||!((s=window.location)!=null&&s.origin)?null:window.location.origin}function Jh({value:s,label:r="Copy"}){const[o,c]=y.useState(!1);return l.jsx("button",{type:"button",className:"secondary",onClick:()=>{typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(s).then(()=>{c(!0),setTimeout(()=>c(!1),2e3)})},children:o?"Copied ✓":r})}function U0({vaultName:s,origin:r,tokensHref:o}){const c=r??D0(),f=c?Om(c,s):`/vault/${encodeURIComponent(s)}/mcp`,h=c?O0(c,s):`claude mcp add --transport http parachute-${s} ${f}`;return l.jsxs("div",{className:"mcp-connect-card",children:[l.jsx("h3",{children:"Connect to your AI"}),l.jsxs("p",{className:"muted",children:["Connect an AI client — Claude.ai (add it as a connector), Claude Code, or any MCP client — to the ",l.jsx("code",{children:s})," vault. The client signs in to this hub and reads/writes vault data over MCP."]}),l.jsxs("div",{className:"mcp-field",children:[l.jsx("span",{className:"mcp-field-label",children:"MCP endpoint"}),l.jsxs("div",{className:"token-box",children:[l.jsx("code",{"data-testid":"mcp-endpoint",children:f}),l.jsx(Jh,{value:f})]}),l.jsx("p",{className:"dim",children:"Claude.ai / ChatGPT: add this URL as a custom connector. You'll sign in to this hub and approve access in the browser."})]}),l.jsxs("div",{className:"mcp-field",children:[l.jsx("span",{className:"mcp-field-label",children:"Claude Code"}),l.jsxs("div",{className:"token-box",children:[l.jsx("code",{"data-testid":"mcp-add-command",children:h}),l.jsx(Jh,{value:h})]}),l.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)."})]}),l.jsxs("p",{className:"dim",children:["Headless / CI / bearer-token clients that can't do browser OAuth: mint a scope-narrow hub token (",l.jsxs("code",{children:["vault:",s,":read vault:",s,":write"]})," — not admin) on the"," ",o?l.jsx(De,{to:o,children:"Tokens page"}):l.jsx("span",{children:"Tokens page"})," and pass it as ",l.jsx("code",{children:'--header "Authorization: Bearer <token>"'}),"."]}),l.jsx("p",{className:"dim mcp-docs-link",children:l.jsx("a",{href:M0,target:"_blank",rel:"noreferrer",children:"Full connect docs →"})})]})}function Kh({vaultName:s}={}){const r=Fl(),o=s??r.name,c=s!==void 0,f=c?"/tokens":`/vault/${encodeURIComponent(o??"")}/tokens`,h=c?"/mirror":`/vault/${encodeURIComponent(o??"")}/mirror`,p=c?"/schema":`/vault/${encodeURIComponent(o??"")}/schema`,E=c?"/embeddings":`/vault/${encodeURIComponent(o??"")}/embeddings`,[x,g]=y.useState({kind:"loading"}),[S,v]=y.useState(0),N=y.useCallback(()=>v(k=>k+1),[]);if(y.useEffect(()=>{let k=!1;if(!o){g({kind:"missing"});return}return g({kind:"loading"}),a0(o).then(D=>{k||g({kind:"ok",vault:D})}).catch(D=>{if(k)return;if(D instanceof de){if(D.status===401||D.status===403){g({kind:"auth-required",status:D.status,message:D.message});return}if(D.status===404){g({kind:"missing"});return}g({kind:"error",message:`${D.status}: ${D.message}`});return}const G=D instanceof Error?D.message:String(D);g({kind:"error",message:G})}),()=>{k=!0}},[o,S]),x.kind==="loading")return l.jsxs("div",{children:[l.jsx("h2",{children:"Vault"}),l.jsx("p",{className:"muted",children:"Loading…"})]});if(x.kind==="auth-required")return l.jsxs("div",{children:[l.jsxs("h2",{children:["Vault ",l.jsx("code",{children:o})]}),l.jsx(sa,{vaultName:o??"",status:x.status,serverMessage:x.message,onRecovered:N}),c?null:l.jsx(De,{to:"/",children:"← Back to vaults"})]});if(x.kind==="missing")return l.jsxs("div",{children:[l.jsx("h2",{children:"Vault not found"}),l.jsxs("p",{className:"muted",children:["No vault named ",l.jsx("code",{children:o})," is registered on this server."]}),c?null:l.jsx(De,{to:"/",children:"← Back to vaults"})]});if(x.kind==="error")return l.jsxs("div",{children:[l.jsxs("h2",{children:["Vault ",l.jsx("code",{children:o})]}),l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:x.message})}),c?null:l.jsx(De,{to:"/",children:"← Back to vaults"})]});const{vault:H}=x,U=`/vault/${H.name}`;return l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Vault ",l.jsx("code",{children:H.name})]}),c?null:l.jsx(De,{to:"/",className:"muted",children:"← All vaults"})]}),l.jsxs("div",{className:"kv section",children:[l.jsx("div",{children:"Name"}),l.jsx("div",{children:l.jsx("code",{children:H.name})}),H.description?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Description"}),l.jsx("div",{children:H.description})]}):null,l.jsx("div",{children:"Mount"}),l.jsx("div",{children:l.jsx("code",{children:U})}),H.createdAt?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Created"}),l.jsx("div",{children:l.jsx("code",{children:H.createdAt})})]}):null]}),l.jsx("div",{className:"section",children:l.jsx(U0,{vaultName:H.name,tokensHref:f})}),l.jsxs("div",{className:"section",children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Stats"}),l.jsxs("div",{className:"stats",children:[l.jsxs("div",{className:"stat",children:[l.jsx("div",{className:"label",children:"Notes"}),l.jsx("div",{className:"value",children:H.stats.totalNotes})]}),l.jsxs("div",{className:"stat",children:[l.jsx("div",{className:"label",children:"Tags"}),l.jsx("div",{className:"value",children:H.stats.tagCount})]}),l.jsxs("div",{className:"stat",children:[l.jsx("div",{className:"label",children:"Attachments"}),l.jsx("div",{className:"value",children:H.stats.attachmentCount})]}),l.jsxs("div",{className:"stat",children:[l.jsx("div",{className:"label",children:"Links"}),l.jsx("div",{className:"value",children:H.stats.linkCount})]})]})]}),l.jsxs("div",{className:"section",children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Manage"}),l.jsxs("ul",{className:"manage-list",children:[l.jsxs("li",{children:[l.jsx(De,{to:f,children:"Tokens →"}),l.jsx("span",{className:"dim",children:" mint, list, and revoke hub access tokens (JWTs)"})]}),l.jsxs("li",{children:[l.jsx(De,{to:h,children:"Git backup →"}),l.jsx("span",{className:"dim",children:" mirror this vault to a git repository on a schedule, or on demand"})]}),l.jsxs("li",{children:[l.jsx(De,{to:p,children:"Schema →"}),l.jsx("span",{className:"dim",children:" edit tag schemas — fields, indexing, hierarchy, strict validation"})]}),l.jsxs("li",{children:[l.jsx(De,{to:E,children:"Semantic search →"}),l.jsx("span",{className:"dim",children:" turn embeddings on or off — rank notes by meaning, not just keywords"})]}),l.jsx(H0,{vaultName:H.name})]})]})]})}function H0({vaultName:s}){const r=zm();if(!r)return l.jsxs("li",{children:[l.jsx("span",{children:"Permissions →"}),l.jsxs("span",{className:"dim",children:[" ","grants are managed on hub (the OAuth issuer); link will be live when hub ships its permissions UI."]})]});const o=`${r}/hub/permissions?vault=${encodeURIComponent(s)}`;return l.jsxs("li",{children:[l.jsx("a",{href:o,children:"Permissions →"}),l.jsxs("span",{className:"dim",children:[" ","grants are managed on hub (the OAuth issuer); link will be live when hub ships its permissions UI."]})]})}function $h({vaultName:s}={}){const r=Fl(),o=s??r.name,c=s!==void 0,f=c?"/":`/vault/${encodeURIComponent(o??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0);y.useEffect(()=>{let S=!1;if(o)return p({kind:"loading"}),m0(o).then(v=>{S||p({kind:"ok",settings:v})}).catch(v=>{if(S)return;if(v instanceof de&&(v.status===401||v.status===403)){p({kind:"auth-required",status:v.status});return}const N=v instanceof Error?v.message:String(v);p({kind:"error",message:N})}),()=>{S=!0}},[o,E]);const g=y.useCallback(()=>x(S=>S+1),[]);return o?l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Semantic search for ",l.jsx("code",{children:o})]}),l.jsx(De,{to:f,className:"muted",children:"← Vault detail"})]}),h.kind==="loading"?l.jsx("p",{className:"muted",children:"Loading…"}):null,h.kind==="auth-required"?l.jsx(sa,{vaultName:o,status:h.status,onRecovered:g}):null,h.kind==="error"?l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:h.message})}):null,h.kind==="ok"?l.jsx(B0,{vaultName:o,settings:h.settings,onSettings:S=>p({kind:"ok",settings:S})}):null]}):l.jsxs("div",{children:[l.jsx("h2",{children:"Semantic search"}),l.jsx("p",{className:"muted",children:"Missing vault name."}),c?null:l.jsx(De,{to:"/",children:"← Back to vaults"})]})}function B0({vaultName:s,settings:r,onSettings:o}){const[c,f]=y.useState(r.enabled),[h,p]=y.useState(!1),[E,x]=y.useState(null),[g,S]=y.useState(!1),v=c!==r.enabled,N=y.useCallback(async()=>{p(!0),x(null),S(!1);try{const H=await p0(s,c);o(H),S(!0)}catch(H){x(H instanceof Error?H.message:String(H))}finally{p(!1)}},[s,c,o]);return l.jsxs("div",{children:[r.env_forced?l.jsxs("div",{className:"warn-banner",role:"status",children:["The ",l.jsx("code",{children:"EMBEDDINGS_ENABLED"})," environment variable is forcing semantic search"," ",l.jsx("strong",{children:r.env_override?"on":"off"}),". This setting is still saved, but the environment override wins until it's removed from ",l.jsx("code",{children:"~/.parachute/vault/.env"}),"."]}):null,r.restart_required?l.jsxs("div",{className:"info-banner",role:"status",children:[g?"Saved. ":"","Semantic search is currently ",l.jsx("strong",{children:r.active?"active":"off"})," in the running vault, but the saved setting wants it ",l.jsx("strong",{children:r.effective?"on":"off"}),"."," ",l.jsx("strong",{children:"Restart the vault to apply."})," The provider is loaded once at boot, so the change takes effect on the next restart."]}):g?l.jsxs("div",{className:"info-banner",role:"status",children:["Saved. Semantic search is ",l.jsx("strong",{children:r.active?"active":"off"}),"."]}):null,l.jsxs("div",{className:"section",children:[l.jsxs("label",{className:"tag-checkbox",children:[l.jsx("input",{type:"checkbox",checked:c,disabled:h,onChange:H=>{f(H.target.checked),S(!1)}}),l.jsx("span",{children:"Enable semantic search (embeddings)"})]}),l.jsxs("p",{className:"dim",style:{margin:"0.6rem 0 0"},children:["Semantic search ranks notes by meaning (",l.jsx("code",{children:"query-notes"})," with ",l.jsx("code",{children:"near_text"}),"), not just keywords. Enabling triggers a one-time model download (~",r.model_download_mb,"MB) on the first embed, then embeds every note on write and backfills existing notes in the background. This is a"," ",l.jsx("strong",{children:"host-wide"})," setting — it affects every vault on this server."]})]}),E?l.jsx("div",{className:"error-banner",style:{marginTop:"1rem"},children:l.jsx("code",{children:E})}):null,l.jsx("div",{className:"actions",children:l.jsx("button",{type:"button",onClick:N,disabled:!v||h,children:h?"Saving…":c?"Enable semantic search":"Disable semantic search"})})]})}const L0=[{value:"events",label:"On change (default)"},{value:"manual",label:"Manual only"}],q0=[{id:"history",label:"History",subtext:"Local audit trail. Hidden under vault data. Events-driven.",apply:s=>({...s,enabled:!0,location:"internal",sync_mode:"events",auto_commit:!0,auto_push:!1})},{id:"live",label:"External folder mirror",subtext:"Visible folder. Open in Obsidian, push to GitHub. Events-driven.",apply:s=>({...s,enabled:!0,location:"external",sync_mode:"events",auto_commit:!0})},{id:"manual",label:"Manual Export",subtext:"Snapshot on demand. No auto-fire.",apply:s=>({...s,enabled:!0,location:"external",sync_mode:"manual",auto_commit:!0,auto_push:!1})}];function Fh({vaultName:s}={}){const r=Fl(),o=s??r.name,c=s!==void 0,f=c?"/":`/vault/${encodeURIComponent(o??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0);y.useEffect(()=>{let S=!1;if(o)return p({kind:"loading"}),l0(o).then(v=>{S||p({kind:"ok",snapshot:v})}).catch(v=>{if(S)return;if(v instanceof de&&(v.status===401||v.status===403)){p({kind:"auth-required",status:v.status});return}const N=v instanceof Error?v.message:String(v);p({kind:"error",message:N})}),()=>{S=!0}},[o,E]);const g=y.useCallback(()=>x(S=>S+1),[]);return o?l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Backup for ",l.jsx("code",{children:o})]}),l.jsx(De,{to:f,className:"muted",children:"← Vault detail"})]}),h.kind==="loading"?l.jsx("p",{className:"muted",children:"Loading…"}):null,h.kind==="auth-required"?l.jsx(sa,{vaultName:o,status:h.status,onRecovered:g}):null,h.kind==="error"?l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:h.message})}):null,h.kind==="ok"?l.jsx(G0,{vaultName:o,snapshot:h.snapshot,onRefresh:()=>x(S=>S+1),onSnapshot:S=>p({kind:"ok",snapshot:S})}):null]}):l.jsxs("div",{children:[l.jsx("h2",{children:"Mirror"}),l.jsx("p",{className:"muted",children:"Missing vault name."}),c?null:l.jsx(De,{to:"/",children:"← Back to vaults"})]})}function G0({vaultName:s,snapshot:r,onRefresh:o,onSnapshot:c}){const f=Ec(s),[h,p]=y.useState(null),[E,x]=y.useState(null);y.useEffect(()=>{if(!f)return;let v=!1;return jc(s).then(N=>{v||p(N)}).catch(N=>{v||x(N instanceof Error?N.message:String(N))}),()=>{v=!0}},[s,f]);const[g,S]=y.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(Y0,{status:r.status,config:r.config,creds:h}),f?null:l.jsxs("div",{className:"warn-banner",children:["You're viewing this page with a read-only token. Saving config + manual run require ",l.jsxs("code",{children:["vault:",s,":admin"]}),`. Re-enter from the hub directory's "Manage" link with an admin-scoped session to make changes.`]}),f?l.jsx(Q0,{vaultName:s,creds:h,credsError:E,onCredsChanged:p,onCredsSaved:()=>{o()},onConfigChanged:o,locationIsExternal:r.config.location==="external"}):null,l.jsxs("div",{className:"section",children:[l.jsx("button",{type:"button",className:"secondary",onClick:()=>S(v=>!v),"aria-expanded":g,children:g?"Hide advanced settings":"Advanced settings"}),g?null:l.jsx("p",{className:"dim",style:{margin:"0.6rem 0 0"},children:"Manual exports, run-now, an external (Obsidian-visible) mirror folder, commit settings, and import-from-a-repo. Most owners never need these."})]}),g?l.jsxs(l.Fragment,{children:[l.jsx(V0,{status:r.status,config:r.config,creds:h,canRun:f&&r.status.enabled,vaultName:s,onSnapshot:c}),l.jsx(X0,{vaultName:s,initial:r.config,readOnly:!f,creds:h,onSaved:v=>{c(v),o()}}),f?l.jsx(tx,{vaultName:s,creds:h}):null]}):null]})}function Y0({status:s,config:r,creds:o}){var p;if(!r.enabled)return l.jsxs("div",{className:"warn-banner",role:"status",children:[l.jsx("strong",{children:"Version history is off."})," This vault isn't saving a local history of changes right now. Open ",l.jsx("strong",{children:"Advanced settings"})," ","below to turn it back on."]});const c=!!(o!=null&&o.active_method),f=r.auto_push&&c,h=(o==null?void 0:o.active_method)==="github_oauth"?(p=o.github_oauth)==null?void 0:p.user_login:void 0;return l.jsxs("div",{className:"mint-banner",role:"status",style:{marginBottom:"1rem"},children:[f?l.jsxs(l.Fragment,{children:[l.jsx("strong",{children:"✓ Version history + backed up off this machine."})," ",h?l.jsxs(l.Fragment,{children:["Every change is saved locally and pushed to GitHub as"," ",l.jsxs("code",{children:["@",h]}),"."]}):l.jsx(l.Fragment,{children:"Every change is saved locally and pushed to your git remote automatically."})]}):l.jsxs(l.Fragment,{children:[l.jsx("strong",{children:"✓ Version history — on."})," Your vault automatically saves a full local history of every change. Want an off-machine copy too? Use ",l.jsx("strong",{children:"Back up to GitHub"})," below."]}),s.last_error?l.jsxs("p",{className:"dim",style:{margin:"0.5rem 0 0"},children:["Heads up — the last backup pass reported an error. See"," ",l.jsx("strong",{children:"Advanced settings"})," below for details."]}):null]})}function V0({status:s,config:r,creds:o,canRun:c,vaultName:f,onSnapshot:h}){const p=r.enabled,[E,x]=y.useState(!1),[g,S]=y.useState(!1),[v,N]=y.useState(null),H=async()=>{x(!0),N(null);try{const G=await i0(f);h(G)}catch(G){N(G instanceof Error?G.message:String(G))}finally{x(!1)}},U=async()=>{S(!0),N(null);try{const G=await s0(f);h(G)}catch(G){N(G instanceof Error?G.message:String(G))}finally{S(!1)}},k=!!(o!=null&&o.active_method)||r.auto_push,D=!c||g||!k;return l.jsxs("div",{className:"section",children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Status"}),l.jsxs("div",{className:"kv",children:[l.jsx("div",{children:"Enabled"}),l.jsx("div",{children:p?l.jsx("code",{children:"yes"}):l.jsx("code",{children:"no"})}),l.jsx("div",{children:"Watch loop"}),l.jsx("div",{children:s.watch_running?l.jsx("code",{children:"running"}):l.jsx("code",{children:"stopped"})}),l.jsx("div",{children:"Path"}),l.jsx("div",{children:s.mirror_path?l.jsx("code",{children:s.mirror_path}):l.jsx("span",{className:"dim",children:"—"})}),l.jsx("div",{children:"Last export"}),l.jsx("div",{children:s.last_export_at?l.jsxs(l.Fragment,{children:[l.jsx("code",{children:s.last_export_at}),s.last_export_notes_count!==null?l.jsxs("span",{className:"dim",children:[" ","· ",s.last_export_notes_count," note",s.last_export_notes_count===1?"":"s"]}):null]}):l.jsx("span",{className:"dim",children:"never"})}),l.jsx("div",{children:"Last commit"}),l.jsx("div",{children:s.last_commit_sha?l.jsx("code",{children:s.last_commit_sha.slice(0,10)}):l.jsx("span",{className:"dim",children:"—"})}),l.jsx("div",{children:"Last push"}),l.jsx("div",{children:s.last_push_at?l.jsxs(l.Fragment,{children:[l.jsx("code",{children:s.last_push_at}),s.last_push_sha?l.jsxs("span",{className:"dim",children:[" ","· ",l.jsx("code",{children:s.last_push_sha.slice(0,10)})]}):null]}):l.jsx("span",{className:"dim",children:"never"})}),s.commits_unpushed!==null&&s.commits_unpushed>0?l.jsxs(l.Fragment,{children:[l.jsx("div",{}),l.jsxs("div",{className:"dim",children:[s.commits_unpushed," commit",s.commits_unpushed===1?"":"s"," ready to push"]})]}):null]}),s.last_push_error?l.jsxs("div",{className:"error-banner",style:{marginTop:"1rem"},children:[l.jsx("strong",{children:"Last push failed:"})," ",l.jsx("code",{children:s.last_push_error})]}):null,s.last_error?l.jsxs("div",{className:"error-banner",style:{marginTop:"1rem"},children:[l.jsx("strong",{children:"Last error:"})," ",l.jsx("code",{children:s.last_error})]}):null,v?l.jsx("div",{className:"error-banner",style:{marginTop:"1rem"},children:l.jsx("code",{children:v})}):null,l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"button",onClick:H,disabled:!c||E,title:p?c?void 0:"Admin scope required to trigger a manual export.":"Enable the mirror first, then trigger a manual export.",children:E?"Running…":"Run export now"}),l.jsx("button",{type:"button",className:"secondary",onClick:U,disabled:D,title:p?c?k?void 0:"Wire credentials or turn on auto-push to push to a remote.":"Admin scope required to push.":"Enable the mirror first, then push.",children:g?"Pushing…":"Push now"})]})]})}function X0({vaultName:s,initial:r,readOnly:o,creds:c,onSaved:f}){const[h,p]=y.useState(r),[E,x]=y.useState(!1),[g,S]=y.useState(!1),[v,N]=y.useState(null),[H,U]=y.useState(null),[k,D]=y.useState(0);y.useEffect(()=>{p(r)},[r]);const G=M=>{const J=M.apply(h);p(J)},W=M=>{p(J=>({...J,sync_mode:M}))},L=async M=>{if(M.preventDefault(),!o){S(!0),N(null),U(null);try{const J=await wm(s,h);f(J),D(K=>K+1),setTimeout(()=>D(0),3e3)}catch(J){if(J instanceof de){const K=J.message;N(K);const X=K.toLowerCase();X.includes("external_path")?U("external_path"):X.includes("commit_template")?U("commit_template"):X.includes("safety_net_seconds")?U("safety_net_seconds"):X.includes("sync_mode")?U("sync_mode"):X.includes("auto_push")?U("auto_push"):X.includes("location")?U("location"):U(null)}else N(J instanceof Error?J.message:String(J))}finally{S(!1)}}};return l.jsxs("form",{className:"section",onSubmit:L,children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Configuration"}),l.jsxs("div",{className:"form-row",children:[l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:h.enabled,disabled:o,onChange:M=>p(J=>({...J,enabled:M.target.checked})),style:{width:"auto",marginRight:"0.5rem"}}),"Enable mirror"]}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:"Master switch. When off, no export / commit / push runs."})]}),l.jsxs("div",{className:"form-row",children:[l.jsx("label",{children:"Presets"}),l.jsxs("p",{className:"dim",style:{marginTop:0,marginBottom:"0.5rem",fontSize:"0.9em"},children:[l.jsx("strong",{children:"History"})," is the default every vault ships with — vault manages the history folder under its own data dir, no path to pick, no remote to configure. ",l.jsx("strong",{children:"External folder mirror"})," +"," ",l.jsx("strong",{children:"Manual Export"})," are for operators who want to point at a visible folder (Obsidian, GitHub)."]}),l.jsx("div",{className:"preset-grid",children:q0.map(M=>l.jsxs("button",{type:"button",className:"preset-card",disabled:o,onClick:()=>G(M),"aria-label":`Apply ${M.label} preset`,children:[l.jsx("strong",{children:M.label}),l.jsx("span",{className:"dim",children:M.subtext})]},M.id))})]}),l.jsxs("div",{className:"form-row",children:[l.jsx("label",{children:"Location"}),l.jsxs("div",{children:[l.jsxs("label",{className:"radio-row",children:[l.jsx("input",{type:"radio",name:"location",value:"internal",checked:h.location==="internal",disabled:o,onChange:()=>p(M=>({...M,location:"internal"}))}),l.jsxs("span",{children:["Internal ",l.jsx("span",{className:"dim",children:"— hidden under vault data dir"})]})]}),l.jsxs("label",{className:"radio-row",children:[l.jsx("input",{type:"radio",name:"location",value:"external",checked:h.location==="external",disabled:o,onChange:()=>p(M=>({...M,location:"external"}))}),l.jsxs("span",{children:["External ",l.jsx("span",{className:"dim",children:"— operator-picked path"})]})]})]})]}),h.location==="external"?l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"external-path",children:"External path"}),l.jsx("input",{id:"external-path",type:"text",value:h.external_path??"",disabled:o,onChange:M=>p(J=>({...J,external_path:M.target.value.length>0?M.target.value:null})),placeholder:"/Users/you/Documents/vault-mirror","aria-invalid":H==="external_path"}),l.jsxs("div",{className:"warn-banner",style:{marginTop:"0.5rem"},role:"alert",children:["Path must exist AND be a git repo (run ",l.jsx("code",{children:"git init"})," first if needed)."]})]}):null,l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"sync-mode-select",children:"Sync mode"}),l.jsx("select",{id:"sync-mode-select",value:h.sync_mode,disabled:o,onChange:M=>W(M.target.value),children:L0.map(M=>l.jsx("option",{value:M.value,children:M.label},M.value))}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:h.sync_mode==="manual"?'No auto-fire. Exports only run when you click "Run export now" (or run `parachute-vault export` from the CLI).':"Every change to a note, tag, or attachment triggers an export within ~500ms. A background safety check runs hourly to catch anything missed."})]}),l.jsxs("div",{className:"form-row",children:[l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:h.auto_commit,disabled:o,onChange:M=>p(J=>({...J,auto_commit:M.target.checked})),style:{width:"auto",marginRight:"0.5rem"}}),"Commit after each export"]}),h.auto_commit?null:l.jsx("p",{className:"hint",style:{marginTop:"0.25rem",fontSize:"0.85em"},children:"Note: the export cursor still advances after each pass. Subsequent runs only re-export notes written since the last pass — even when triggered manually."})]}),h.location==="external"||c!=null&&c.active_method?l.jsxs("div",{className:"form-row",children:[l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:h.auto_push,disabled:o,onChange:M=>p(J=>({...J,auto_push:M.target.checked})),style:{width:"auto",marginRight:"0.5rem"}}),"Push after each commit"]}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0",fontSize:"0.9em"},children:"When credentials are configured, vault can push the mirror's commits to your remote regardless of whether the mirror folder lives under vault's data dir or somewhere visible."}),h.auto_push?c!=null&&c.active_method?l.jsxs("div",{className:"info-banner",style:{marginTop:"0.5rem"},role:"status",children:[c.active_method==="github_oauth"&&c.github_oauth?l.jsxs(l.Fragment,{children:["Will push to ",l.jsxs("code",{children:["@",c.github_oauth.user_login]})," on GitHub."]}):c.active_method==="pat"&&c.pat?l.jsxs(l.Fragment,{children:["Will push using saved credential: ",l.jsx("code",{children:c.pat.label}),"."]}):l.jsx(l.Fragment,{children:"Will push using saved credential."})," ","Failed pushes are logged but won't crash the export."]}):l.jsxs("div",{className:"warn-banner",style:{marginTop:"0.5rem"},role:"alert",children:["Auto-push needs git credentials. Either connect GitHub in the"," ",l.jsx("strong",{children:"Back up to GitHub"})," section above, or paste a Personal Access Token + remote URL there. Failed pushes are logged but won't crash the export."]}):null]}):null,l.jsx("div",{className:"form-row",children:l.jsxs("button",{type:"button",className:"secondary",onClick:()=>x(M=>!M),children:[E?"Hide":"Show"," advanced"]})}),E?l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"commit-template",children:"Commit template"}),l.jsx("input",{id:"commit-template",type:"text",value:h.commit_template,disabled:o,onChange:M=>p(J=>({...J,commit_template:M.target.value})),"aria-invalid":H==="commit_template"}),l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:["Supports ",l.jsx("code",{children:"{{date}}"}),", ",l.jsx("code",{children:"{{notes_changed}}"}),","," ",l.jsx("code",{children:"{{plural}}"}),", ",l.jsx("code",{children:"{{first_note_title}}"}),","," ",l.jsx("code",{children:"{{vault_name}}"}),"."]})]}):null,v?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:v})}):null,k>0?l.jsx("div",{className:"mint-banner",style:{padding:"0.75rem 1rem",marginBottom:"1rem"},role:"status",children:"Saved."}):null,l.jsx("div",{className:"actions",children:l.jsx("button",{type:"submit",disabled:o||g,children:g?"Saving…":"Save"})})]})}function Q0({vaultName:s,creds:r,credsError:o,onCredsChanged:c,onCredsSaved:f,onConfigChanged:h,locationIsExternal:p}){var ve;const[E,x]=y.useState(!1),[g,S]=y.useState(!1),[v,N]=y.useState(!1),[H,U]=y.useState(!1),[k,D]=y.useState(null),[G,W]=y.useState(null),[L,M]=y.useState(null),[J,K]=y.useState(!1),[X,ue]=y.useState(null),[fe,He]=y.useState(null),[ke,ze]=y.useState(0),ie=(r==null?void 0:r.active_method)==="github_oauth"&&!!r.github_oauth;y.useEffect(()=>{if(!ie){ue(null),He(null);return}let F=!1;return Cm(s).then(j=>{F||(ue(j),He(null))}).catch(j=>{F||He(j instanceof Error?j.message:String(j))}),()=>{F=!0}},[s,ie,ke]);const $=()=>ze(F=>F+1),te=(r==null?void 0:r.active_method)!==null&&(r==null?void 0:r.active_method)!==void 0,z=async()=>{if(confirm("Disconnect git remote credentials? Auto-push will stop working until you reconnect.")){U(!0),D(null);try{const F=await u0(s);c(F),M(null)}catch(F){D(F instanceof Error?F.message:String(F))}finally{U(!1)}}},Z=async()=>{K(!0),D(null);try{await wm(s,{enabled:!0}),M(!0),h()}catch(F){D(F instanceof Error?F.message:String(F))}finally{K(!1)}},ne=()=>{x(!1),jc(s).then(F=>c(F)).catch(()=>{})};return l.jsxs("div",{className:"section",id:"git-remote-section",children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:te?"Backed up to a git remote":"Back up to GitHub"}),l.jsx("p",{className:"dim",style:{marginTop:0},children:te?l.jsxs(l.Fragment,{children:["Your vault pushes its history to an off-machine git remote. Credentials are stored on this server with ",l.jsx("code",{children:"0600"})," file permissions — never sent to GitHub or any third party."]}):l.jsxs(l.Fragment,{children:["Keep an off-machine copy: push your vault's history to GitHub (or any HTTPS git host). Credentials are stored on this server with"," ",l.jsx("code",{children:"0600"})," file permissions, never sent to a third party."]})}),!p&&!(r!=null&&r.active_method)?l.jsx("div",{className:"info-banner",style:{marginBottom:"0.75rem"},role:"status",children:"Internal mirrors live under the vault's data directory. To push them to a remote, paste a Personal Access Token + remote URL below — that wires the remote and turns on auto-push automatically."}):null,o?l.jsxs("div",{className:"error-banner",role:"alert",children:["Could not load credential status: ",l.jsx("code",{children:o})]}):null,te?l.jsxs("div",{className:"kv",style:{marginBottom:"0.75rem"},children:[l.jsx("div",{children:"Status"}),l.jsx("div",{children:(r==null?void 0:r.active_method)==="github_oauth"&&r.github_oauth?l.jsxs(l.Fragment,{children:["Connected to ",l.jsxs("code",{children:["@",r.github_oauth.user_login]})," on GitHub"]}):(r==null?void 0:r.active_method)==="pat"&&r.pat?l.jsxs(l.Fragment,{children:["Custom credential: ",l.jsx("code",{children:r.pat.label})]}):null}),(r==null?void 0:r.active_method)==="github_oauth"&&r.github_oauth?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Token"}),l.jsxs("div",{children:[l.jsx("code",{children:r.github_oauth.token_preview})," ",l.jsxs("span",{className:"dim",children:["· scope ",r.github_oauth.scope||"—"," · authorized"," ",r.github_oauth.authorized_at.slice(0,10)]})]})]}):null,(r==null?void 0:r.active_method)==="pat"&&r.pat?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:"Remote"}),l.jsx("div",{children:l.jsx("code",{children:r.pat.remote_url})}),l.jsx("div",{children:"Token"}),l.jsx("div",{children:l.jsx("code",{children:r.pat.token_preview})})]}):null]}):l.jsx("p",{className:"dim",children:"Not connected. Auto-push won't work until you connect. Personal Access Token is the universal path (works with GitHub, GitLab, Gitea, Bitbucket, anything that takes an HTTPS token); the GitHub shortcut just saves a step for GitHub users."}),ie&&fe?l.jsxs("div",{className:"warn-banner",role:"alert",style:{marginBottom:"0.75rem"},children:["Couldn't check the GitHub App install state:"," ",l.jsx("code",{children:fe})," ",l.jsx("button",{type:"button",className:"secondary",onClick:$,children:"Retry"})]}):null,ie&&!X&&!fe?l.jsx("p",{className:"dim",children:"Checking GitHub App installation…"}):null,ie&&X&&!X.installed?l.jsx(Dm,{install:X,onRecheck:$}):null,ie&&X&&X.installed?l.jsxs("div",{style:{marginBottom:"0.75rem"},children:[l.jsxs("div",{className:"kv",style:{marginBottom:"0.75rem"},children:[l.jsx("div",{children:"App installed on"}),l.jsx("div",{children:X.installations.map(F=>l.jsxs("div",{children:[l.jsx("code",{children:F.account_login})," ",l.jsxs("span",{className:"dim",children:["(",F.account_type==="Organization"?"organization":"user"," ·"," ",F.repository_selection==="selected"?"Selected repos only":"All repos",")"]})]},F.id))})]}),l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"button",onClick:()=>S(!0),children:"Choose repository…"}),l.jsx("a",{href:X.install_url,target:"_blank",rel:"noreferrer",className:"dim",style:{alignSelf:"center"},children:"Install on another account or org →"})]})]}):null,k?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:k})}):null,L===!0?l.jsxs("div",{className:"mint-banner",role:"status",style:{marginBottom:"0.75rem"},children:[l.jsx("strong",{children:"History is on ✓"})," — this vault keeps a local git history of every change, ready to push once a repository is wired."," ",l.jsx("button",{type:"button",className:"secondary",onClick:()=>M(null),"aria-label":"Dismiss history note",children:"Dismiss"})]}):null,L==="left_disabled"?l.jsxs("div",{className:"info-banner",role:"status",style:{marginBottom:"0.75rem"},children:[l.jsx("strong",{children:"Version history is still off for this vault"})," (it was switched off earlier, so we didn't flip it behind your back). Backups push the vault's history — turn it on to start recording changes."," ",l.jsx("button",{type:"button",onClick:Z,disabled:J,children:J?"Turning on…":"Turn on history now"})]}):null,L===!1?l.jsxs("div",{className:"warn-banner",role:"alert",style:{marginBottom:"0.75rem"},children:["We tried to turn on version history for this vault but it didn't start — see ",l.jsx("strong",{children:"Advanced settings → Status"})," for the error."]}):null,G?l.jsxs("div",{className:"mint-banner",style:{marginBottom:"0.75rem"},role:"status",children:[l.jsx("strong",{children:"Credentials saved."})," ",(()=>{const F=G,j=F.initial_push.fired&&F.initial_push.pushed?F.initial_push.sha:void 0,w=F.initial_push.fired&&!F.initial_push.pushed?F.initial_push.error:void 0;return F.auto_push_was_already_enabled?j?l.jsxs(l.Fragment,{children:["Auto-push was already on; just pushed"," ",l.jsx("code",{children:j.slice(0,10)}),"."]}):w?l.jsx(l.Fragment,{children:"Auto-push was already on; the push attempt failed — see Advanced settings → Status for details."}):l.jsx(l.Fragment,{children:"Auto-push was already on; nothing to push right now."}):F.auto_push_enabled?j?l.jsxs(l.Fragment,{children:["Auto-push enabled and the first push landed"," ",l.jsx("code",{children:j.slice(0,10)}),". Your next commit will push to the remote too."]}):w?l.jsx(l.Fragment,{children:"Auto-push enabled. The initial push attempt failed — see Advanced settings → Status for the error."}):l.jsx(l.Fragment,{children:"Auto-push enabled. Your next commit will push to the remote."}):l.jsx(l.Fragment,{children:"Credentials wired. Auto-push remains off; flip it on in Advanced settings → Configuration to push commits automatically."})})()," ",l.jsx("button",{type:"button",className:"secondary",onClick:()=>W(null),style:{marginLeft:"0.5rem"},"aria-label":"Dismiss",children:"Dismiss"})]}):null,l.jsx("div",{className:"actions",children:te?l.jsx("button",{type:"button",className:"secondary",onClick:z,disabled:H,children:H?"Disconnecting…":"Disconnect"}):l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button",onClick:()=>N(!0),children:"Use Personal Access Token"}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>x(!0),children:"Connect GitHub (one-click for GitHub users)"})]})}),l.jsx(Z0,{install:X}),E?l.jsx(Wh,{vaultName:s,mode:"connect",onClose:ne,onHistory:M,onConnected:(F,j)=>{c(F),j&&(W(j),f(j)),x(!1)}}):null,g&&ie?l.jsx(Wh,{vaultName:s,mode:"choose-repo",initialLogin:((ve=r==null?void 0:r.github_oauth)==null?void 0:ve.user_login)??"",onClose:()=>S(!1),onHistory:M,onConnected:(F,j)=>{c(F),j&&(W(j),f(j)),S(!1)}}):null,v?l.jsx(W0,{vaultName:s,onClose:()=>N(!1),onSaved:F=>{c(F),W(F),M(F.history_enabled),f(F),N(!1)}}):null]})}function Dm({install:s,onRecheck:r}){return l.jsxs("div",{className:"info-banner",role:"status",style:{marginBottom:"0.75rem"},children:[l.jsxs("p",{style:{marginTop:0},children:[l.jsx("strong",{children:"Authorized ✓ — one step left: install the app so it can reach your repos."})," ","Authorizing told GitHub who you are; installing picks which repositories the app may touch. Until then it can't see any of your private repos."]}),l.jsxs("div",{className:"actions",style:{marginBottom:"0.5rem"},children:[l.jsx("a",{href:s.install_url,target:"_blank",rel:"noreferrer",style:{fontWeight:600},children:"Install on GitHub →"}),l.jsx("button",{type:"button",className:"secondary",onClick:r,children:"I've installed it — check again"})]}),l.jsx("p",{className:"dim",style:{marginBottom:0,fontSize:"0.9em"},children:"Keeping vaults in an organization? Install the app on that org too — the same install link works for every account, as many times as you need."})]})}function Z0({install:s}){const[r,o]=y.useState(!1);return l.jsxs("div",{style:{marginTop:"1rem"},children:[l.jsxs("p",{className:"dim",style:{marginBottom:"0.5rem",fontSize:"0.9em"},children:[s?s.app.is_shared_default?l.jsxs(l.Fragment,{children:["Using the shared Parachute GitHub App (",l.jsx("code",{children:s.app.slug}),")."]}):l.jsxs(l.Fragment,{children:["Using your own GitHub App (",l.jsx("code",{children:s.app.slug}),")."]}):l.jsx(l.Fragment,{children:'"Connect GitHub" uses the shared Parachute GitHub App by default.'})," ",l.jsx("button",{type:"button",className:"secondary",onClick:()=>o(c=>!c),"aria-expanded":r,children:r?"Hide":"Use your own GitHub App"})]}),r?l.jsxs("div",{className:"info-banner",role:"note",children:[l.jsx("p",{style:{marginTop:0},children:"You don't have to trust the shared app: register your own GitHub App and point this vault at it. Your tokens are then minted by an app only you control — your own rate-limit budget, your own blast radius. Taking responsibility for your own data is the point of self-hosting; this makes it one form away."}),l.jsxs("p",{style:{marginBottom:"0.35rem"},children:[l.jsx("strong",{children:"Register the app"})," (GitHub → Settings → Developer settings → GitHub Apps → New GitHub App):"]}),l.jsxs("ul",{style:{marginTop:0},children:[l.jsxs("li",{children:["Repository permissions: ",l.jsx("strong",{children:"Contents — Read and write"}),". Nothing else."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Enable Device Flow"}),' (checkbox under "Identifying and authorizing users").']}),l.jsxs("li",{children:[l.jsx("strong",{children:'Uncheck "Expire user authorization tokens"'})," — an unattended backup daemon can't babysit 8-hour tokens."]}),l.jsx("li",{children:"Webhook: inactive. Callback URL: anything (device flow ignores it)."}),l.jsxs("li",{children:[l.jsx("strong",{children:"Don't generate a private key"})," — Parachute never uses one, and an app with no key can't mint installation tokens behind your back. We recommend against creating one at all."]})]}),l.jsxs("p",{style:{marginBottom:"0.35rem"},children:[l.jsx("strong",{children:"Point this vault at it"})," — set both env vars as a pair in the vault's ",l.jsx("code",{children:".env"}),", then restart the vault:"]}),l.jsx("pre",{style:{margin:"0 0 0.5rem"},children:l.jsx("code",{children:`PARACHUTE_GITHUB_CLIENT_ID=<your app's client ID>
|
|
61
|
-
PARACHUTE_GITHUB_APP_SLUG=<your app's URL slug>`})}),l.jsx("p",{className:"dim",style:{marginBottom:0,fontSize:"0.9em"},children:"Both together — the client ID mints the tokens, the slug builds the install link; mixing apps breaks the connect flow. Then disconnect and reconnect GitHub here to mint tokens from your app."})]}):null]})}function Wh({vaultName:s,mode:r,initialLogin:o,onClose:c,onConnected:f,onHistory:h}){const[p,E]=y.useState(r==="choose-repo"?{kind:"probing",user:{login:o??""}}:{kind:"starting"}),[x,g]=y.useState(Date.now()),S=y.useRef(!1),v=p.kind==="polling";y.useEffect(()=>{if(!v)return;const k=setInterval(()=>g(Date.now()),1e3);return()=>clearInterval(k)},[v]),y.useEffect(()=>()=>{S.current=!0},[]),y.useEffect(()=>{if(p.kind!=="starting")return;let k=!1;return r0(s).then(D=>{k||E({kind:"polling",code:D,pollIntervalMs:Math.max(D.interval,1)*1e3,startedAt:Date.now()})}).catch(D=>{k||E({kind:"error",message:D instanceof Error?D.message:String(D)})}),()=>{k=!0}},[p.kind,s]),y.useEffect(()=>{if(p.kind!=="polling")return;S.current=!1;const k=p.code;let D=!1,G=null,W=p.pollIntervalMs;const L=async()=>{if(!(D||S.current))try{const M=await c0(s,k.polling_id);if(D)return;if(M.state==="granted"){h(M.history_enabled),E({kind:"probing",user:{login:M.user.login}});return}if(M.state==="denied"){E({kind:"error",message:"Authorization denied."});return}if(M.state==="expired"){E({kind:"error",message:"The device code expired. Try again."});return}M.state==="slow_down"&&(W=M.interval*1e3),G=setTimeout(L,W)}catch(M){if(D)return;E({kind:"error",message:M instanceof Error?M.message:String(M)})}};return G=setTimeout(L,W),()=>{D=!0,G&&clearTimeout(G)}},[p,s,h]),y.useEffect(()=>{if(p.kind!=="probing")return;const k=p.user;let D=!1;return Cm(s).then(G=>{D||E(G.installed?{kind:"picker",user:k,install:G}:{kind:"install-needed",user:k,install:G})}).catch(G=>{D||E({kind:"error",message:G instanceof Error?G.message:String(G)})}),()=>{D=!0}},[p,s]);const N=y.useCallback(k=>E({kind:"error",message:k}),[]),H=y.useCallback(()=>{E(k=>k.kind==="picker"?{kind:"probing",user:k.user}:k)},[]),U=async k=>{try{await navigator.clipboard.writeText(k)}catch{}};return l.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true",children:l.jsxs("div",{className:"modal",children:[l.jsxs("div",{className:"list-header",children:[l.jsx("h3",{style:{margin:0},children:r==="choose-repo"?"Choose a repository":"Connect GitHub"}),l.jsx("button",{type:"button",className:"secondary",onClick:c,children:"Close"})]}),p.kind==="starting"?l.jsx("p",{className:"muted",children:"Requesting device code from GitHub…"}):null,p.kind==="polling"?l.jsxs(l.Fragment,{children:[l.jsxs("p",{children:[l.jsx("strong",{children:"Step 1."})," Open"," ",l.jsx("a",{href:p.code.verification_uri,target:"_blank",rel:"noreferrer",children:p.code.verification_uri})," ","in your browser."]}),l.jsxs("p",{children:[l.jsx("strong",{children:"Step 2."})," Enter this code:"]}),l.jsxs("div",{className:"device-code-row",children:[l.jsx("code",{className:"device-code",children:p.code.user_code}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>U(p.code.user_code),children:"Copy"})]}),l.jsxs("p",{className:"dim",children:["Waiting for authorization…"," ",J0(p.code.expires_in,p.startedAt,x)]})]}):null,p.kind==="probing"?l.jsx("p",{className:"muted",children:"Checking where the app is installed…"}):null,p.kind==="install-needed"?l.jsx(Dm,{install:p.install,onRecheck:()=>E({kind:"probing",user:p.user})}):null,p.kind==="picker"?l.jsx($0,{vaultName:s,user:p.user,install:p.install,onPicked:async(k,D)=>{const G=await f0(s,{owner:k,name:D});h(G.history_enabled);const W=await jc(s);f(W,G)},onError:N,onNotInstalled:H}):null,p.kind==="error"?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:p.message})}),l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"button",onClick:()=>E(r==="choose-repo"?{kind:"probing",user:{login:o??""}}:{kind:"starting"}),children:"Try again"}),l.jsx("button",{type:"button",className:"secondary",onClick:c,children:"Close"})]})]}):null]})})}function J0(s,r,o){const c=Math.floor((o-r)/1e3),f=Math.max(0,s-c),h=Math.floor(f/60),p=f%60;return`${h}:${String(p).padStart(2,"0")} remaining`}function K0(s){return s.account_type==="Organization"?`https://github.com/organizations/${encodeURIComponent(s.account_login)}/settings/installations/${s.id}`:`https://github.com/settings/installations/${s.id}`}function $0({vaultName:s,user:r,install:o,onPicked:c,onError:f,onNotInstalled:h}){const[p,E]=y.useState(null),[x,g]=y.useState(!1),[S,v]=y.useState(""),[N,H]=y.useState(null),[U,k]=y.useState(!1),[D,G]=y.useState(""),[W,L]=y.useState(!1),[M,J]=y.useState(!1),[K,X]=y.useState(0);y.useEffect(()=>{let $=!1;return E(null),Am(s).then(te=>{if(!$){if(!te.installed){h();return}E(te.repos),g(!!te.truncated)}}).catch(te=>{$||f(te instanceof Error?te.message:String(te))}),()=>{$=!0}},[s,f,h,K]);const ue=(p??[]).filter($=>S.length===0?!0:$.full_name.toLowerCase().includes(S.toLowerCase())),fe=[];for(const $ of ue){const te=fe[fe.length-1];if(te&&te.login===$.account_login)te.repos.push($);else{const z=fe.find(Z=>Z.login===$.account_login);z?z.repos.push($):fe.push({login:$.account_login,repos:[$]})}}const He=$=>o.installations.find(te=>te.account_login===$),ke=async($,te)=>{H(`${$}/${te}`);try{await c($,te)}catch(z){f(z instanceof Error?z.message:String(z))}finally{H(null)}},ze=async()=>{if(D.trim().length!==0){k(!0);try{const $=await d0(s,{name:D.trim(),description:"Parachute Vault mirror",private:!0});await c($.owner,$.name)}catch($){$ instanceof de&&$.errorType==="app_lacks_admin_permission"?J(!0):f($ instanceof Error?$.message:String($))}finally{k(!1)}}},ie=o.app.is_shared_default||M;return l.jsxs(l.Fragment,{children:[l.jsxs("p",{children:["Authorized as ",l.jsxs("code",{children:["@",r.login]}),". Pick a repository to push the mirror to:"]}),l.jsx("div",{className:"form-row",children:l.jsx("input",{type:"search",placeholder:"Filter by name…",value:S,onChange:$=>v($.target.value)})}),x?l.jsx("p",{className:"muted",style:{fontSize:"0.85em"},children:"Showing the first 300 repos per account. Use the filter above to narrow down — or paste the clone URL directly via Personal Access Token if your repo isn't here."}):null,p===null?l.jsx("p",{className:"muted",children:"Loading repos…"}):null,p!==null?l.jsxs("div",{className:"repo-list",children:[ue.length===0&&S.length>0?l.jsxs("p",{className:"dim",children:['No repos match "',S,'".']}):null,ue.length===0&&S.length===0&&p.length===0?l.jsx("p",{className:"dim",children:`The app installation doesn't include any repos yet — pick some via "Change repo access on GitHub" below, then refresh.`}):null,fe.map($=>{const te=He($.login);return l.jsxs("div",{children:[l.jsxs("p",{className:"dim",style:{margin:"0.5rem 0 0.25rem"},children:[l.jsx("strong",{children:$.login}),te?l.jsxs(l.Fragment,{children:[" ","·"," ",te.account_type==="Organization"?"organization":"user"," ","·"," ",te.repository_selection==="selected"?"Selected repos only":"All repos"]}):null]}),$.repos.map(z=>l.jsxs("button",{type:"button",className:"repo-row",onClick:()=>ke(z.owner,z.name),disabled:N!==null,children:[l.jsxs("span",{children:[l.jsx("strong",{children:z.name}),z.private?l.jsx("span",{className:"dim",children:" · private"}):null]}),l.jsx("span",{className:"dim",children:z.updated_at.slice(0,10)})]},z.full_name))]},$.login)})]}):null,l.jsxs("div",{className:"actions",style:{marginTop:"0.75rem"},children:[l.jsx("button",{type:"button",className:"secondary",onClick:()=>X($=>$+1),children:"Refresh list"}),l.jsx("a",{href:o.install_url,target:"_blank",rel:"noreferrer",className:"dim",style:{alignSelf:"center"},children:"Install on another account or org →"})]}),W?l.jsxs("div",{className:"form-row",style:{marginTop:"0.75rem"},children:[l.jsx("label",{htmlFor:"new-repo-name",children:"New repo name"}),l.jsx("input",{id:"new-repo-name",type:"text",value:D,placeholder:"my-vault-backup",onChange:$=>G($.target.value)}),ie?l.jsx(F0,{install:o,suggestedName:D.trim(),onRefresh:()=>X($=>$+1)}):l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"button",onClick:ze,disabled:U||D.trim().length===0,children:U?"Creating…":"Create"}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>L(!1),disabled:U,children:"Cancel"})]})]}):l.jsx("div",{className:"actions",style:{marginTop:"0.75rem"},children:l.jsx("button",{type:"button",className:"secondary",onClick:()=>L(!0),children:"+ Create new private repo"})})]})}function F0({install:s,suggestedName:r,onRefresh:o}){const c=r.length>0?`https://github.com/new?name=${encodeURIComponent(r)}`:"https://github.com/new";return l.jsxs("div",{className:"info-banner",role:"note",style:{marginTop:"0.5rem"},children:[l.jsx("p",{style:{marginTop:0},children:s.app.is_shared_default?l.jsxs(l.Fragment,{children:["The Parachute app deliberately can't create repos for you (it only holds the ",l.jsx("em",{children:"Contents"})," permission — creating repos would need admin powers a backup doesn't deserve). Three quick steps instead:"]}):l.jsxs(l.Fragment,{children:["Your GitHub App doesn't have the ",l.jsx("em",{children:"Administration"})," permission needed to create repos. Three quick steps instead:"]})}),l.jsxs("ol",{style:{marginTop:0,marginBottom:"0.5rem"},children:[l.jsxs("li",{children:[l.jsx("a",{href:c,target:"_blank",rel:"noreferrer",children:"Create a new repo on GitHub →"})," ",l.jsx("span",{className:"dim",children:"(private; leave it empty — no README or .gitignore)"})]}),l.jsxs("li",{children:["Add it to the app's repo access:"," ",s.installations.length>0?s.installations.map((f,h)=>l.jsxs("span",{children:[h>0?" · ":null,l.jsxs("a",{href:K0(f),target:"_blank",rel:"noreferrer",children:["configure on ",f.account_login," →"]})]},f.id)):l.jsx("a",{href:s.install_url,target:"_blank",rel:"noreferrer",children:"install the app →"})," ",l.jsx("span",{className:"dim",children:'(skip if the installation already grants "All repos")'})]}),l.jsxs("li",{children:["Come back and"," ",l.jsx("button",{type:"button",className:"secondary",onClick:o,children:"Refresh list"})," ","— then pick it."]})]})]})}function W0({vaultName:s,onClose:r,onSaved:o}){const[c,f]=y.useState(""),[h,p]=y.useState(""),[E,x]=y.useState(""),[g,S]=y.useState(!1),[v,N]=y.useState(null),H=async U=>{U.preventDefault(),S(!0),N(null);try{const k=await o0(s,{token:c.trim(),remote_url:h.trim(),label:E.trim()||void 0});o(k)}catch(k){N(k instanceof Error?k.message:String(k))}finally{S(!1)}};return l.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true",children:l.jsxs("div",{className:"modal",children:[l.jsxs("div",{className:"list-header",children:[l.jsx("h3",{style:{margin:0},children:"Use Personal Access Token"}),l.jsx("button",{type:"button",className:"secondary",onClick:r,disabled:g,children:"Close"})]}),l.jsxs("p",{className:"dim",children:["Works for any provider that supports HTTPS push with a token in the URL (GitHub, GitLab, Codeberg, Gitea, …). The token is stored with"," ",l.jsx("code",{children:"0600"})," file perms on this server."]}),l.jsxs("form",{onSubmit:H,children:[l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"pat-token",children:"Token"}),l.jsx("input",{id:"pat-token",type:"password",value:c,autoComplete:"off",onChange:U=>f(U.target.value),placeholder:"ghp_… or glpat-… or similar",required:!0})]}),l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"pat-url",children:"Remote URL"}),l.jsx("input",{id:"pat-url",type:"url",value:h,onChange:U=>p(U.target.value),placeholder:"https://github.com/owner/repo.git",required:!0}),l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:["We'll embed your token in the URL before saving (using GitHub's"," ",l.jsx("code",{children:"x-access-token"})," convention). The URL you see on disk will carry the token; ensure the file isn't shared."]})]}),l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"pat-label",children:"Label (optional)"}),l.jsx("input",{id:"pat-label",type:"text",value:E,onChange:U=>x(U.target.value),placeholder:"GitHub PAT for backup"})]}),v?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:v})}):null,l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"submit",disabled:g,children:g?"Validating…":"Validate & save"}),l.jsx("button",{type:"button",className:"secondary",onClick:r,disabled:g,children:"Cancel"})]})]})]})})}const I0=1500,P0={cloning:"Cloning the repo…",importing:"Importing notes into this vault…",syncing:"Setting up sync back to this repo…"};function ex(s){const r=Math.max(0,Math.floor(s/1e3)),o=Math.floor(r/60),c=r%60;return o>0?`${o}m ${c}s`:`${c}s`}function tx({vaultName:s,creds:r}){const[o,c]=y.useState(""),[f,h]=y.useState("merge"),[p,E]=y.useState(!1),[x,g]=y.useState(""),[S,v]=y.useState(!1),[N,H]=y.useState({kind:"idle"}),[U,k]=y.useState(""),[D,G]=y.useState(!1),W=(r==null?void 0:r.active_method)==="github_oauth"&&r.github_oauth!==null,L=(r==null?void 0:r.active_method)!==null&&(r==null?void 0:r.active_method)!==void 0,M=f!=="replace"||U.trim()===s,J=N.kind!=="running"&&o.trim().length>0&&M&&(!p||x.trim().length>0),K=async()=>{let ie;p?ie={kind:"pat",token:x.trim()}:L?ie=null:ie={kind:"none"};try{const{job:$}=await h0(s,{remote_url:o.trim(),mode:f,credentials:ie,enable_sync:S});H({kind:"running",stage:$.stage,detail:$.detail,jobId:$.job_id,startedAt:Date.parse($.started_at)||Date.now()})}catch($){const te=$ instanceof Error?$.message:String($);H({kind:"error",message:te})}},[X,ue]=y.useState(0),fe=N.kind==="running"?N.startedAt:0;y.useEffect(()=>{if(!fe){ue(0);return}ue(Date.now()-fe);const ie=window.setInterval(()=>ue(Date.now()-fe),1e3);return()=>window.clearInterval(ie)},[fe]);const He=N.kind,ke=N.kind==="running"?N.jobId:null;y.useEffect(()=>{if(He!=="running"||!ke)return;let ie=!1,$=null;const te=async()=>{var z;if(!ie){try{const Z=await Rm(s,ke);if(ie)return;if(Z.status==="running")H({kind:"running",stage:Z.stage,detail:Z.detail,jobId:ke,startedAt:fe});else if(Z.status==="succeeded"&&Z.result){H({kind:"success",result:Z.result,remoteUrl:o.trim(),mode:f});return}else{H({kind:"error",message:((z=Z.error)==null?void 0:z.message)??"The import failed for an unknown reason."});return}}catch(Z){if(ie)return;if(Z instanceof de&&Z.status===404){H({kind:"error",message:"Lost track of this import — the vault restarted while it was running. Check the vault's contents, then retry (merge mode is safe to re-run)."});return}}$=window.setTimeout(()=>void te(),I0)}};return te(),()=>{ie=!0,$!==null&&window.clearTimeout($)}},[He,ke,s]);const ze=()=>{H({kind:"idle"}),k("")};return l.jsxs("div",{className:"section",children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Import from a git repo"}),l.jsxs("p",{className:"dim",style:{marginTop:0},children:["Pull a vault state from a remote git repo into ",l.jsx("strong",{children:"this"})," vault. Use this to load a vault someone has been mirroring, or to sync a vault between machines you control. The remote must be a Parachute vault export (created by ",l.jsx("code",{children:"parachute-vault export"})," or the mirror's export flow)."]}),l.jsxs("div",{className:"warn-banner",style:{marginBottom:"1rem"},role:"note",children:[l.jsx("strong",{children:"One vault per remote."})," Multiple vaults pushing to the same git repo isn't a supported shape — the last push wins, and vaults that diverge silently overwrite each other. Today's working pattern is one vault per remote. Active two-way sync is a future direction; for now, do exports from one place and imports as snapshots elsewhere."]}),N.kind==="success"?l.jsx(nx,{vaultName:s,result:N.result,remoteUrl:N.remoteUrl,mode:N.mode,onReset:ze}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"import-remote-url",children:"Remote URL"}),l.jsx("input",{id:"import-remote-url",type:"text",value:o,placeholder:"https://github.com/aaron/my-vault.git",onChange:ie=>c(ie.target.value),disabled:N.kind==="running"}),W?l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0",fontSize:"0.9em"},children:["Or"," ",l.jsx("button",{type:"button",onClick:()=>G(!0),disabled:N.kind==="running",style:{background:"none",border:"none",padding:0,color:"var(--accent)",textDecoration:"underline",cursor:"pointer",fontSize:"inherit"},children:"pick from your GitHub repos"}),"."]}):null,p?l.jsx("p",{className:"hint",style:{marginTop:"0.35rem",fontSize:"0.85em"},children:"Using the one-time token below. It's used for this clone only — not saved, and not used for backup."}):L?l.jsxs("p",{className:"hint",style:{marginTop:"0.35rem",fontSize:"0.85em"},children:["Using your saved git credentials to ",l.jsx("strong",{children:"read"})," this repo. Reading doesn't change them, and doesn't back anything up."]}):l.jsxs("p",{className:"hint",style:{marginTop:"0.35rem",fontSize:"0.85em"},children:["No saved git credentials — the import will be unauthenticated. Fine for a public repo; a private one will fail with a clear error. For a private repo, use the one-time token below —"," ",l.jsx("strong",{children:"you don't need to set up backup in order to import"}),"."]})]}),l.jsxs("div",{className:"form-row",children:[l.jsx("label",{children:"Mode"}),l.jsxs("label",{className:"radio-row",children:[l.jsx("input",{type:"radio",name:"import-mode",value:"merge",checked:f==="merge",onChange:()=>{h("merge"),k("")},disabled:N.kind==="running"}),l.jsxs("span",{children:[l.jsx("strong",{children:"Merge"})," ",l.jsxs("span",{className:"dim",children:["— upsert by id. Notes in the remote get created/updated; any notes that exist only locally ",l.jsx("strong",{children:"survive"}),"."]})]})]}),l.jsxs("label",{className:"radio-row",children:[l.jsx("input",{type:"radio",name:"import-mode",value:"replace",checked:f==="replace",onChange:()=>h("replace"),disabled:N.kind==="running"}),l.jsxs("span",{children:[l.jsx("strong",{children:"Replace"})," ",l.jsxs("span",{className:"dim",children:["— wipe this vault first, then import. The remote becomes the new source of truth. ",l.jsx("strong",{children:"Destructive."})]})]})]})]}),f==="replace"?l.jsxs("div",{className:"form-row",children:[l.jsxs("div",{className:"error-banner",role:"alert",style:{marginBottom:"0.5rem"},children:[l.jsxs("strong",{children:['Replace will delete every note in vault "',s,'" before importing.']})," To confirm, type the vault name below:"]}),l.jsx("input",{id:"import-confirm-name",type:"text",value:U,placeholder:s,onChange:ie=>k(ie.target.value),disabled:N.kind==="running","aria-label":"Type vault name to confirm"})]}):null,l.jsxs("div",{className:"form-row",children:[l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:p,onChange:ie=>E(ie.target.checked),disabled:N.kind==="running",style:{width:"auto",marginRight:"0.5rem"}}),"Use a one-time token for this import"]}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0",fontSize:"0.85em"},children:"A read-only Personal Access Token is enough. It's used for this clone and then discarded — never saved, never used to push."}),p?l.jsx("input",{id:"import-per-call-pat",type:"password",value:x,placeholder:"ghp_… or similar",onChange:ie=>g(ie.target.value),disabled:N.kind==="running",autoComplete:"off",style:{marginTop:"0.5rem"}}):null]}),l.jsxs("div",{className:"form-row",children:[l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:S,onChange:ie=>v(ie.target.checked),disabled:N.kind==="running",style:{width:"auto",marginRight:"0.5rem"}}),"After importing, also back this vault up to the same repo"]}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0",fontSize:"0.85em"},children:S?l.jsxs(l.Fragment,{children:[l.jsx("strong",{children:"This vault will start pushing to that repo."})," If another machine already backs up there, leave this off — set backup up separately once you've checked the import looks right."]}):l.jsxs(l.Fragment,{children:["Off by default. The import only ",l.jsx("strong",{children:"reads"})," the repo — nothing is written back to it, and your existing backup settings are left alone."]})})]}),N.kind==="error"?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:N.message})}):null,l.jsx("div",{className:"actions",children:l.jsx("button",{type:"button",onClick:K,disabled:!J,title:M?o.trim().length===0?"Provide a remote URL.":p&&x.trim().length===0?"Provide a token for one-time credential.":void 0:"Type the vault name to confirm Replace.",children:N.kind==="running"?"Importing…":"Start import"})}),N.kind==="running"?l.jsxs("div",{className:"form-row","aria-live":"polite",children:[l.jsxs("p",{style:{margin:"0 0 0.25rem"},children:[P0[N.stage]," ",l.jsxs("span",{className:"dim",children:["(",ex(X),")"]})]}),N.detail?l.jsx("p",{className:"dim",style:{margin:0,fontSize:"0.85em",fontFamily:"var(--mono, monospace)"},children:N.detail}):null,l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0",fontSize:"0.85em"},children:"Large vaults can take a while. This keeps running on the server — you can leave this page and come back."})]}):null]}),D?l.jsx(ax,{vaultName:s,onClose:()=>G(!1),onPicked:ie=>{c(ie),G(!1)}}):null]})}function nx({vaultName:s,result:r,remoteUrl:o,mode:c,onReset:f}){return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"mint-banner",role:"status",style:{marginBottom:"0.75rem"},children:[l.jsx("strong",{children:"Import succeeded."})," Imported ",r.notes_imported," note",r.notes_imported===1?"":"s",", ",r.tags_imported," tag schema",r.tags_imported===1?"":"s",", ",r.attachments_imported," ","attachment",r.attachments_imported===1?"":"s",c==="replace"&&r.notes_deleted!==void 0?`, wiped ${r.notes_deleted} pre-existing note${r.notes_deleted===1?"":"s"}`:"","."]}),r.warnings.length>0?l.jsxs("details",{style:{marginBottom:"0.75rem"},children:[l.jsxs("summary",{children:[r.warnings.length," warning",r.warnings.length===1?"":"s"," ","(see details)"]}),l.jsx("ul",{style:{marginTop:"0.5rem"},children:r.warnings.map((h,p)=>l.jsx("li",{children:l.jsx("code",{style:{fontSize:"0.85em"},children:h})},p))})]}):null,r.sync_enabled?l.jsxs("div",{className:"mint-banner",style:{marginBottom:"0.75rem"},role:"status",children:[l.jsx("strong",{children:"Sync enabled."})," Changes to vault ",l.jsx("code",{children:s})," ","now push back to ",l.jsx("code",{children:o})," automatically."]}):r.sync_warning?l.jsxs("div",{className:"info-banner",style:{marginBottom:"0.75rem"},role:"status",children:[l.jsxs("p",{style:{marginTop:0},children:[l.jsx("strong",{children:"Sync not enabled."})," ",r.sync_warning]}),l.jsxs("p",{className:"dim",style:{marginBottom:0,fontSize:"0.9em"},children:["You can still set up Sync from the"," ",l.jsx("button",{type:"button",onClick:()=>{var h;return(h=document.getElementById("git-remote-section"))==null?void 0:h.scrollIntoView({behavior:"smooth",block:"start"})},style:{background:"none",border:"none",padding:0,color:"var(--accent)",textDecoration:"underline",cursor:"pointer",fontSize:"inherit"},children:"Git remote section"})," ","above."]})]}):null,l.jsx("div",{className:"actions",children:l.jsx("button",{type:"button",className:"secondary",onClick:f,children:"Run another import"})})]})}function ax({vaultName:s,onClose:r,onPicked:o}){const[c,f]=y.useState(null),[h,p]=y.useState(!1),[E,x]=y.useState(null),[g,S]=y.useState(""),[v,N]=y.useState(null);y.useEffect(()=>{let U=!1;return Am(s).then(k=>{if(!U){if(!k.installed){x(k.install_url),f([]);return}f(k.repos),p(!!k.truncated)}}).catch(k=>{U||N(k instanceof Error?k.message:String(k))}),()=>{U=!0}},[s]);const H=(c??[]).filter(U=>g.length===0?!0:U.full_name.toLowerCase().includes(g.toLowerCase()));return l.jsx("div",{className:"modal-backdrop",role:"dialog","aria-modal":"true",children:l.jsxs("div",{className:"modal",children:[l.jsxs("div",{className:"list-header",children:[l.jsx("h3",{style:{margin:0},children:"Pick a repo to import from"}),l.jsx("button",{type:"button",className:"secondary",onClick:r,children:"Close"})]}),v?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:v})}):null,E?l.jsxs("div",{className:"info-banner",role:"status",children:["The Parachute GitHub App isn't installed on any of your accounts yet, so there are no repos to list."," ",l.jsx("a",{href:E,target:"_blank",rel:"noreferrer",children:"Install it on GitHub →"})," ","then reopen this picker."]}):null,l.jsx("div",{className:"form-row",children:l.jsx("input",{type:"search",placeholder:"Filter by name…",value:g,onChange:U=>S(U.target.value)})}),h?l.jsx("p",{className:"muted",style:{fontSize:"0.85em"},children:"Showing the first 300 repos per account. Use the filter above to narrow down."}):null,c===null&&!v?l.jsx("p",{className:"muted",children:"Loading repos…"}):null,c!==null?l.jsxs("div",{className:"repo-list",children:[H.length===0&&g.length>0?l.jsxs("p",{className:"dim",children:['No repos match "',g,'".']}):null,H.length===0&&g.length===0&&c.length===0&&!E?l.jsx("p",{className:"dim",children:"The app installation doesn't include any repos."}):null,H.map(U=>l.jsxs("button",{type:"button",className:"repo-row",onClick:()=>o(U.clone_url),children:[l.jsxs("span",{children:[l.jsx("strong",{children:U.name}),U.private?l.jsx("span",{className:"dim",children:" · private"}):null]}),l.jsx("span",{className:"dim",children:U.updated_at.slice(0,10)})]},U.full_name))]}):null]})})}const lx=["string","integer","number","boolean","array","object","reference"],cc=new Set(["string","integer","boolean","reference"]),Pl=s=>`/vault/${encodeURIComponent(s)}/api/tags`;async function ei(s){try{const r=await s.text(),o=JSON.parse(r);return o.message||o.error||r||`${s.status}`}catch{return`${s.status} ${s.statusText}`}}async function ix(s){const r=await Oe(s,`${Pl(s)}?include_schema=true`);if(!r.ok)throw new de(r.status,await ei(r));return await r.json()}async function sx(s,r){const o=await Oe(s,`${Pl(s)}/${encodeURIComponent(r)}`);if(o.status===404)return null;if(!o.ok)throw new de(o.status,await ei(o));return await o.json()}async function ux(s,r){const o=await Oe(s,`${Pl(s)}/${encodeURIComponent(r)}/effective`);if(!o.ok)throw new de(o.status,await ei(o));return await o.json()}async function rx(s,r,o){const c=await Oe(s,`${Pl(s)}/${encodeURIComponent(r)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(o)});if(!c.ok)throw new de(c.status,await ei(c));return await c.json()}async function cx(s,r,o){const c=await Oe(s,`${Pl(s)}/${encodeURIComponent(r)}/conformance`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({fields:o})});if(!c.ok)throw new de(c.status,await ei(c));return await c.json()}function Ih({vaultName:s}={}){const r=Fl(),o=s??r.name,f=s!==void 0?"/":`/vault/${encodeURIComponent(o??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0),[g,S]=y.useState(null);y.useEffect(()=>{let H=!1;if(o)return p({kind:"loading"}),ix(o).then(U=>{H||p({kind:"ok",tags:U})}).catch(U=>{if(!H){if(U instanceof de&&(U.status===401||U.status===403)){p({kind:"auth-required",status:U.status});return}p({kind:"error",message:U instanceof Error?U.message:String(U)})}}),()=>{H=!0}},[o,E]);const v=y.useCallback(()=>x(H=>H+1),[]),N=y.useCallback(()=>x(H=>H+1),[]);return o?l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Schema for ",l.jsx("code",{children:o})]}),l.jsx(De,{to:f,className:"muted",children:"← Vault detail"})]}),l.jsxs("p",{className:"dim",style:{marginTop:0},children:["Tag schemas declare the metadata fields notes carry, which fields are indexed (queryable), and the tag hierarchy. Edits write the live schema directly — the same data an AI sees through ",l.jsx("code",{children:"update-tag"}),"."]}),h.kind==="loading"?l.jsx("p",{className:"muted",children:"Loading…"}):null,h.kind==="auth-required"?l.jsx(sa,{vaultName:o,status:h.status,onRecovered:v}):null,h.kind==="error"?l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:h.message})}):null,h.kind==="ok"?l.jsxs("div",{className:"schema-layout",children:[l.jsx(dx,{tags:h.tags,selected:g,onSelect:S}),g?l.jsx(px,{vaultName:o,tag:g,allTags:h.tags,onSaved:N},g):l.jsx("div",{className:"schema-detail",children:l.jsx("p",{className:"muted",children:"Select a tag to view or edit its schema."})})]}):null]}):l.jsxs("div",{children:[l.jsx("h2",{children:"Schema"}),l.jsx("p",{className:"muted",children:"Missing vault name."})]})}function ox(s){const r=s.fields??{},o=Object.values(r);return{hasSchema:s.description!==null&&s.description!==void 0||o.length>0,indexed:o.filter(c=>c.indexed===!0).length,strict:o.some(c=>c.strict===!0)}}function dx({tags:s,selected:r,onSelect:o}){const c=y.useMemo(()=>[...s].sort((f,h)=>f.name.localeCompare(h.name)),[s]);return l.jsx("div",{className:"schema-taglist",role:"navigation","aria-label":"Tags",children:l.jsxs("ul",{className:"tag-list",children:[c.map(f=>{const h=ox(f);return l.jsx("li",{children:l.jsxs("button",{type:"button",className:`tag-list-item${r===f.name?" selected":""}`,onClick:()=>o(f.name),"aria-current":r===f.name,children:[l.jsx("code",{className:"tag-name",children:f.name}),l.jsxs("span",{className:"tag-meta",children:[l.jsx("span",{className:"dim",children:f.count}),h.hasSchema?l.jsx("span",{className:"badge",children:"schema"}):null,h.indexed>0?l.jsxs("span",{className:"badge",children:[h.indexed," indexed"]}):null,h.strict?l.jsx("span",{className:"badge badge-strict",children:"strict"}):null]})]})},f.name)}),c.length===0?l.jsx("li",{className:"muted",children:"No tags yet."}):null]})})}let fx=0;function Um(){return`row-${fx++}`}function hx(s){return s?Object.entries(s).map(([r,o])=>({key:Um(),name:r,spec:{...o}})):[]}function Ph(s){const r={};for(const o of s){const c=o.name.trim();if(!c)continue;const f={};o.spec.type&&(f.type=o.spec.type),o.spec.enum&&o.spec.enum.length>0&&(f.enum=o.spec.enum),o.spec.required&&(f.required=!0),o.spec.cardinality==="many"&&(f.cardinality="many"),o.spec.indexed&&(f.indexed=!0),o.spec.strict&&(f.strict=!0),o.spec.description&&o.spec.description.trim().length>0&&(f.description=o.spec.description.trim()),r[c]=f}return r}const mx=/^[a-zA-Z_][a-zA-Z0-9_]{0,62}$/;function px({vaultName:s,tag:r,allTags:o,onSaved:c}){const f=Ec(s),[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(0);y.useEffect(()=>{let S=!1;return p({kind:"loading"}),Promise.all([sx(s,r),ux(s,r)]).then(([v,N])=>{if(S)return;p({kind:"ok",record:v??{name:r,count:0,description:null,fields:null,relationships:null,parent_names:null,created_at:null,updated_at:null},effective:N})}).catch(v=>{if(!S){if(v instanceof de&&(v.status===401||v.status===403)){p({kind:"auth-required",status:v.status});return}p({kind:"error",message:v instanceof Error?v.message:String(v)})}}),()=>{S=!0}},[s,r,E]);const g=y.useCallback(()=>x(S=>S+1),[]);return h.kind==="loading"?l.jsx("div",{className:"schema-detail",children:l.jsxs("p",{className:"muted",children:["Loading ",r,"…"]})}):h.kind==="auth-required"?l.jsx("div",{className:"schema-detail",children:l.jsx(sa,{vaultName:s,status:h.status,onRecovered:g})}):h.kind==="error"?l.jsx("div",{className:"schema-detail",children:l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:h.message})})}):l.jsx(gx,{vaultName:s,tag:r,record:h.record,effective:h.effective,allTags:o,isAdmin:f,onSaved:()=>{x(S=>S+1),c()}})}function gx({vaultName:s,tag:r,record:o,effective:c,allTags:f,isAdmin:h,onSaved:p}){const[E,x]=y.useState(o.description??""),[g,S]=y.useState(()=>hx(o.fields)),[v,N]=y.useState(o.parent_names??[]),[H,U]=y.useState(!1),[k,D]=y.useState(null),[G,W]=y.useState(0),[L,M]=y.useState(null),[J,K]=y.useState(!1),[X,ue]=y.useState(!1),fe=y.useMemo(()=>{const w=new Map;for(const V of c.indexed_fields)w.set(V.name,V);return w},[c.indexed_fields]),He=y.useMemo(()=>f.map(w=>w.name).filter(w=>w!==r).sort((w,V)=>w.localeCompare(V)),[f,r]),ke=y.useMemo(()=>{var Q;const w=new Map(f.map(ae=>[ae.name,ae])),V=[];for(const ae of v){const se=w.get(ae);(Q=se==null?void 0:se.parent_names)!=null&&Q.includes(r)&&V.push(ae)}return V},[v,f,r]),ze=y.useMemo(()=>{const w=new Set(Object.entries(o.fields??{}).filter(([,Q])=>Q.indexed===!0).map(([Q])=>Q)),V=new Set(g.filter(Q=>Q.spec.indexed&&Q.name.trim()).map(Q=>Q.name.trim()));for(const Q of V)if(!w.has(Q))return!0;for(const Q of w)if(!V.has(Q))return!0;return!1},[g,o.fields]),ie=y.useMemo(()=>jx(g),[g]),$=()=>{M(null),ue(!1)},te=(w,V,Q)=>{S(ae=>ae.map(se=>se.key===w?{...se,name:Q!==void 0?Q:se.name,spec:{...se.spec,...V}}:se)),$()},z=()=>{S(w=>[...w,{key:Um(),name:"",spec:{type:"string"}}]),$()},Z=w=>{S(V=>V.filter(Q=>Q.key!==w)),$()},ne=w=>{N(V=>V.includes(w)?V.filter(Q=>Q!==w):[...V,w]),$()},ve=async()=>{U(!0),D(null);try{const w=Ph(g);await rx(s,r,{description:E.trim().length>0?E.trim():null,fields:Object.keys(w).length>0?w:null,replace_fields:!0,parent_names:v.length>0?v:null}),W(V=>V+1),$(),setTimeout(()=>W(0),3e3),p()}catch(w){w instanceof de?D(w.message):D(w instanceof Error?w.message:String(w))}finally{U(!1)}},F=async w=>{if(w.preventDefault(),!!h){if(ie.length>0){D(ie[0]);return}if(D(null),L&&L.violating_notes>0||X){await ve();return}K(!0);try{const V=Ph(g),Q=await cx(s,r,V);if(Q.violating_notes>0){M(Q);return}$(),await ve()}catch(V){D(`Could not check existing notes for conformance (${V instanceof Error?V.message:String(V)}). Click Save again to apply anyway — strict fields are still enforced on write.`),M(null),ue(!0)}finally{K(!1)}}},j=!h;return l.jsxs("form",{className:"schema-detail",onSubmit:F,children:[l.jsxs("div",{className:"list-header",children:[l.jsx("h3",{style:{margin:0},children:l.jsx("code",{children:r})}),l.jsxs("span",{className:"dim",children:[o.count," note",o.count===1?"":"s"]})]}),j?l.jsxs("div",{className:"warn-banner",role:"status",children:["You're viewing with a read-only token. Saving requires"," ",l.jsxs("code",{children:["vault:",s,":admin"]}),`. Re-enter from the hub directory's "Manage" link with an admin session to edit.`]}):null,l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"tag-description",children:"Description"}),l.jsx("textarea",{id:"tag-description",value:E,disabled:j,rows:2,onChange:w=>{x(w.target.value),$()},placeholder:"What this tag means + how to use it (sent to AI clients)."})]}),l.jsxs("fieldset",{className:"schema-fields",children:[l.jsx("legend",{children:"Fields"}),g.length===0?l.jsx("p",{className:"dim",children:"No fields declared. Add one to start a schema."}):null,g.map(w=>{var V;return l.jsx(yx,{row:w,readOnly:j,coDeclarers:w.spec.indexed?(((V=fe.get(w.name.trim()))==null?void 0:V.tags)??[]).filter(Q=>Q!==r):[],onChange:(Q,ae)=>te(w.key,Q,ae),onRemove:()=>Z(w.key)},w.key)}),j?null:l.jsx("button",{type:"button",className:"secondary",onClick:z,children:"+ Add field"})]}),l.jsxs("fieldset",{className:"schema-parents",children:[l.jsx("legend",{children:"Parents (hierarchy)"}),l.jsxs("p",{className:"dim",style:{marginTop:0},children:["A note on ",l.jsx("code",{children:r})," inherits the fields of every parent (and their ancestors). Queries for a parent also match this tag."]}),He.length===0?l.jsx("p",{className:"dim",children:"No other tags to pick as parents yet."}):l.jsx("div",{className:"parent-grid",children:He.map(w=>l.jsxs("label",{className:"parent-chip",children:[l.jsx("input",{type:"checkbox",checked:v.includes(w),disabled:j,onChange:()=>ne(w)}),l.jsx("code",{children:w})]},w))}),ke.length>0?l.jsxs("div",{className:"warn-banner",role:"alert",style:{marginTop:"0.5rem"},children:["Cycle warning: ",l.jsx("code",{children:ke.join(", ")})," already list(s) ",l.jsx("code",{children:r})," as a parent. A cycle is tolerated at runtime but is almost always a config bug."]}):null]}),l.jsx(vx,{tag:r,effective:c}),l.jsx(xx,{catalog:c.indexed_fields,tag:r}),ie.length>0?l.jsxs("div",{className:"warn-banner",role:"alert",children:[l.jsx("strong",{children:"Fix before saving:"}),l.jsx("ul",{style:{margin:"0.4rem 0 0"},children:ie.map(w=>l.jsx("li",{children:w},w))})]}):null,ze&&!j?l.jsxs("div",{className:"info-banner",role:"status",children:["This save changes which fields are indexed. Vault will rebuild the backing column + index (an ",l.jsx("code",{children:"ALTER TABLE"})," / index build) — on a large vault this can take a moment."]}):null,L&&L.violating_notes>0?l.jsx(bx,{report:L,tag:r}):null,k?l.jsx("div",{className:"error-banner",role:"alert",children:l.jsx("code",{children:k})}):null,G>0?l.jsx("div",{className:"mint-banner",style:{padding:"0.75rem 1rem",margin:"1rem 0"},role:"status",children:"Saved."}):null,l.jsx("div",{className:"actions",children:l.jsx("button",{type:"submit",disabled:j||H||J,children:H?"Saving…":J?"Checking existing notes…":L&&L.violating_notes>0||X?"Save anyway":"Save"})})]})}function yx({row:s,readOnly:r,coDeclarers:o,onChange:c,onRemove:f}){const{name:h,spec:p}=s,E=cc.has(p.type??""),x=(p.enum??[]).join(", ");return l.jsxs("div",{className:"field-row",children:[l.jsxs("div",{className:"field-row-main",children:[l.jsx("input",{"aria-label":"Field name",className:"field-name-input",type:"text",value:h,disabled:r,placeholder:"field_name",onChange:g=>c({},g.target.value)}),l.jsxs("select",{"aria-label":"Field type",value:p.type??"",disabled:r,onChange:g=>{const S=g.target.value||void 0,v={type:S};S&&!cc.has(S)&&(v.indexed=!1),c(v)},children:[l.jsx("option",{value:"",children:"(any)"}),lx.map(g=>l.jsx("option",{value:g,children:g},g))]}),l.jsxs("label",{className:"field-flag",children:[l.jsx("input",{type:"checkbox",checked:p.required===!0,disabled:r,onChange:g=>c({required:g.target.checked})}),"required"]}),l.jsxs("label",{className:"field-flag",children:[l.jsx("input",{type:"checkbox",checked:p.cardinality==="many",disabled:r,onChange:g=>c({cardinality:g.target.checked?"many":"one"})}),"many"]}),l.jsxs("label",{className:"field-flag",title:E?void 0:"Only string / integer / boolean fields can be indexed",children:[l.jsx("input",{type:"checkbox",checked:p.indexed===!0,disabled:r||!E,onChange:g=>c({indexed:g.target.checked})}),"indexed"]}),l.jsxs("label",{className:"field-flag",children:[l.jsx("input",{type:"checkbox",checked:p.strict===!0,disabled:r,onChange:g=>c({strict:g.target.checked})}),"strict"]}),r?null:l.jsx("button",{type:"button",className:"secondary field-remove",onClick:f,"aria-label":`Remove field ${h||"(unnamed)"}`,children:"✕"})]}),l.jsxs("div",{className:"field-row-extra",children:[l.jsx("input",{"aria-label":"Enum values (comma-separated)",type:"text",className:"field-enum-input",value:x,disabled:r,placeholder:"enum values (comma-separated, optional)",onChange:g=>{const S=g.target.value.split(",").map(v=>v.trim()).filter(v=>v.length>0);c({enum:S})}}),l.jsx("input",{"aria-label":"Field description",type:"text",className:"field-desc-input",value:p.description??"",disabled:r,placeholder:"description (optional)",onChange:g=>c({description:g.target.value})})]}),o.length>0?l.jsxs("p",{className:"dim field-codeclarers",children:["Also indexed by: ",o.map(g=>l.jsx("code",{children:g},g)),". Type + indexed are global across all of these — change them together."]}):null]})}function vx({tag:s,effective:r}){const o=new Set(Object.keys(r.fields??{})),c=Object.entries(r.effective_fields);return l.jsxs("div",{className:"schema-effective section",children:[l.jsx("h4",{style:{margin:"0 0 0.5rem"},children:"Effective fields (what a note actually gets)"}),r.effective_parents.length>0?l.jsxs("p",{className:"dim",style:{marginTop:0},children:["Inherits from: ",r.effective_parents.map(f=>l.jsx("code",{children:f},f))]}):l.jsxs("p",{className:"dim",style:{marginTop:0},children:["No parents — effective fields are just ",l.jsx("code",{children:s}),"'s own."]}),c.length===0?l.jsx("p",{className:"dim",children:"No fields (own or inherited)."}):l.jsxs("table",{className:"schema-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Field"}),l.jsx("th",{children:"Type"}),l.jsx("th",{children:"Source"}),l.jsx("th",{children:"Flags"})]})}),l.jsx("tbody",{children:c.map(([f,h])=>{const p=!o.has(f),E=[h.required?"required":null,h.cardinality==="many"?"many":null,h.strict?"strict":null,h.enum&&h.enum.length>0?`enum[${h.enum.length}]`:null].filter(Boolean);return l.jsxs("tr",{children:[l.jsx("td",{children:l.jsx("code",{children:f})}),l.jsx("td",{children:h.type??l.jsx("span",{className:"dim",children:"any"})}),l.jsx("td",{children:p?l.jsx("span",{className:"badge",children:"inherited"}):l.jsx("span",{className:"dim",children:"own"})}),l.jsx("td",{children:E.length>0?E.join(", "):l.jsx("span",{className:"dim",children:"—"})})]},f)})})]})]})}function xx({catalog:s,tag:r}){return l.jsxs("div",{className:"schema-catalog section",children:[l.jsx("h4",{style:{margin:"0 0 0.5rem"},children:"Indexed fields (what's queryable)"}),s.length===0?l.jsx("p",{className:"dim",children:"No indexed fields in this vault yet."}):l.jsxs("table",{className:"schema-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Field"}),l.jsx("th",{children:"Type"}),l.jsx("th",{children:"Declared by"})]})}),l.jsx("tbody",{children:s.map(o=>l.jsxs("tr",{className:o.tags.includes(r)?"row-this-tag":void 0,children:[l.jsx("td",{children:l.jsx("code",{children:o.name})}),l.jsx("td",{children:o.type}),l.jsx("td",{children:o.tags.map(c=>l.jsx("code",{className:c===r?"tag-self":void 0,children:c},c))})]},o.name))})]})]})}function bx({report:s,tag:r}){return l.jsxs("div",{className:"warn-banner",role:"alert",children:[l.jsxs("strong",{children:[s.violating_notes," existing note",s.violating_notes===1?"":"s"," violate this schema."]})," ","They'll be REJECTED on their next write once you tighten"," ",l.jsx("code",{children:s.checked_fields.join(", ")}),".",l.jsx("p",{style:{margin:"0.5rem 0"},children:"Migrate the existing data first with the CLI:"}),l.jsx("pre",{style:{margin:"0 0 0.5rem",whiteSpace:"pre-wrap"},children:l.jsxs("code",{children:["parachute-vault schema migrate-field ",r," <field> --transform …"]})}),s.sample.length>0?l.jsxs("details",{children:[l.jsxs("summary",{children:["Examples (",s.sample.length," of ",s.violating_notes,")"]}),l.jsx("ul",{style:{margin:"0.4rem 0 0"},children:s.sample.map(o=>l.jsxs("li",{children:[l.jsx("code",{children:o.path??o.id}),": ",o.fields.map(c=>c.reason).join(", ")]},o.id))})]}):null,l.jsxs("p",{className:"dim",style:{margin:"0.5rem 0 0",fontSize:"0.9em"},children:["Click ",l.jsx("strong",{children:"Save anyway"})," to apply the schema regardless — these notes stay readable but reject on edit until migrated."]})]})}function jx(s){const r=[],o=new Set;for(const c of s){const f=c.name.trim();if(f){if(o.has(f)){r.push(`Duplicate field name "${f}".`);continue}o.add(f),c.spec.indexed&&!mx.test(f)&&r.push(`"${f}" can't be indexed — indexed field names must start with a letter or underscore and contain only letters, digits, underscores (max 63 chars).`),c.spec.indexed&&c.spec.type&&!cc.has(c.spec.type)&&r.push(`"${f}" is indexed but type "${c.spec.type}" can't be indexed (use string / integer / boolean).`)}}return r}const Sx=[30,90,180,365],em=90,Ex=1440*60;function Tx(s){if(!s)return null;const r=s.scoped_tags;if(!Array.isArray(r))return null;const o=r.filter(c=>typeof c=="string"&&c.length>0);return o.length>0?o:null}function _x(s){return{jti:s.jti,label:s.subject,scopes:Array.isArray(s.scopes)?s.scopes:[],scoped_tags:Tx(s.permissions),expires_at:s.expires_at??null,revoked_at:s.revoked_at??null,created_at:s.created_at}}async function Nx(s,r){const o={scope:`vault:${s}:${r.verb}`,expires_in:r.ttlDays*Ex,subject:r.label};r.scopedTags.length>0&&(o.permissions={scoped_tags:r.scopedTags});const c=await Il("/api/auth/mint-token",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(o)});if(!c.ok)throw new de(c.status,await As(c));const f=await c.json();return{jti:f.jti,token:f.token,scope:f.scope,expires_at:f.expires_at??null}}async function wx(s){const r=`vault:${s}:`,o=[];let c=null;for(let f=0;f<1e3;f++){const h=new URLSearchParams({revoked:"all"});c&&h.set("cursor",c);const p=await Il(`/api/auth/tokens?${h.toString()}`);if(!p.ok)throw new de(p.status,await As(p));const E=await p.json(),x=Array.isArray(E.tokens)?E.tokens:[];if(o.push(...x),c=E.next_cursor??null,!c)break}return o.filter(f=>Array.isArray(f.scopes)&&f.scopes.some(h=>h.startsWith(r))).map(_x)}async function Cx(s){const r=await Il("/api/auth/revoke-token",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({jti:s})});if(!r.ok)throw new de(r.status,await As(r))}async function Ax(s){const r=await Oe(s,`/vault/${encodeURIComponent(s)}/api/tags`);if(!r.ok)throw new de(r.status,await As(r));const o=await r.json();return Array.isArray(o)?o:[]}async function As(s){try{const r=await s.text(),o=JSON.parse(r);if(o.error_description)return o.error_description;if(o.message)return o.message;if(o.error)return o.error;if(r)return r}catch{}return`${s.status} ${s.statusText}`}const Rx=["read","write","admin"],kx={30:"30 days",90:"90 days",180:"180 days",365:"1 year (max)"};function zx(s){return s instanceof Ln?s.disposition==="forbidden"?(Jl(),{kind:"auth-required",status:403}):s.disposition==="auth-required"?{kind:"auth-required",status:s.status}:{kind:"error",message:s.message}:s instanceof de&&(s.status===401||s.status===403)?{kind:"auth-required",status:s.status}:{kind:"error",message:s instanceof Error?s.message:String(s)}}function tm({vaultName:s}={}){const r=Fl(),o=s??r.name,c=s!==void 0,f=c?"/":`/vault/${encodeURIComponent(o??"")}`,[h,p]=y.useState({kind:"loading"}),[E,x]=y.useState(null),[g,S]=y.useState(null),[v,N]=y.useState(0);y.useEffect(()=>{let k=!1;if(o)return p({kind:"loading"}),wx(o).then(D=>{k||p({kind:"ok",tokens:D})}).catch(D=>{k||p(zx(D))}),()=>{k=!0}},[o,v]);const H=y.useCallback(()=>N(k=>k+1),[]);if(y.useEffect(()=>{if(!E)return;const k=D=>{D.preventDefault(),D.returnValue=""};return window.addEventListener("beforeunload",k),()=>window.removeEventListener("beforeunload",k)},[E]),!o)return l.jsxs("div",{children:[l.jsx("h2",{children:"Tokens"}),l.jsx("p",{className:"muted",children:"Missing vault name."}),c?null:l.jsx(De,{to:"/",children:"← Back to vaults"})]});const U=Ec(o);return l.jsxs("div",{children:[l.jsxs("div",{className:"list-header",children:[l.jsxs("h2",{children:["Tokens for ",l.jsx("code",{children:o})]}),l.jsx(De,{to:f,className:"muted",children:"← Vault detail"})]}),U?null:l.jsxs("div",{className:"warn-banner",children:["You're viewing this page with a read-only token. Mint and revoke require"," ",l.jsxs("code",{children:["vault:",o,":admin"]}),`. Re-enter from the hub directory's "Manage" link with an admin-scoped session to manage tokens.`]}),E?l.jsx(Mx,{result:E,onDismiss:()=>x(null)}):null,h.kind==="ok"&&U&&!E?l.jsx(Ox,{vaultName:o,onMinted:k=>{x(k),N(D=>D+1)}}):null,l.jsxs("div",{className:"section",children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Existing tokens"}),h.kind==="loading"?l.jsx("p",{className:"muted",children:"Loading…"}):null,h.kind==="auth-required"?l.jsx(sa,{vaultName:o,status:h.status,onRecovered:H}):null,h.kind==="error"?l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:h.message})}):null,h.kind==="ok"?l.jsx(Dx,{tokens:h.tokens,allowRevoke:U,confirmingJti:g,onAskConfirm:S,onRevoked:()=>{S(null),N(k=>k+1)}}):null]})]})}function Mx({result:s,onDismiss:r}){const[o,c]=y.useState(!1),f=async()=>{try{await navigator.clipboard.writeText(s.token),c(!0),setTimeout(()=>c(!1),2e3)}catch{}};return l.jsxs("div",{className:"mint-banner",children:[l.jsx("h3",{children:"New token (shown once)"}),l.jsx("p",{className:"muted",children:"This is the only time the vault will show this token. Copy it now and store it somewhere safe — a password manager, the operator's notes, paraclaw's secrets store. If you lose it, revoke it and mint a new one."}),l.jsxs("div",{className:"token-box",children:[l.jsx("code",{children:s.token}),l.jsx("button",{type:"button",onClick:f,className:"secondary",children:o?"Copied":"Copy"})]}),l.jsx("p",{className:"warn",children:"⚠ Don't dismiss this banner until you've saved the token."}),l.jsx("div",{className:"actions",children:l.jsx("button",{type:"button",onClick:r,children:"Done — I've saved the token"})})]})}function Ox({vaultName:s,onMinted:r}){const[o,c]=y.useState(""),[f,h]=y.useState("admin"),[p,E]=y.useState(em),[x,g]=y.useState(!1),[S,v]=y.useState(null),[N,H]=y.useState([]),[U,k]=y.useState(null),[D,G]=y.useState(new Set);y.useEffect(()=>{let K=!1;return Ax(s).then(X=>{if(K)return;const ue=X.map(fe=>fe.name).filter(fe=>!fe.includes("/")).sort();H(ue)}).catch(X=>{K||k(X instanceof Error?X.message:String(X))}),()=>{K=!0}},[s]);const W=o.trim(),L=W.length===0,M=K=>{G(X=>{const ue=new Set(X);return ue.has(K)?ue.delete(K):ue.add(K),ue})},J=async K=>{if(K.preventDefault(),L){v("label required — give the token a recognizable name");return}g(!0),v(null);try{const X=await Nx(s,{verb:f,label:W,scopedTags:[...D],ttlDays:p});r(X),c(""),h("admin"),E(em),G(new Set)}catch(X){if(X instanceof Ln&&X.disposition==="forbidden"){Jl();return}v(X instanceof Error?X.message:String(X))}finally{g(!1)}};return l.jsxs("form",{onSubmit:J,className:"section",children:[l.jsx("h3",{style:{margin:"0 0 0.85rem",fontSize:"1rem",fontWeight:500},children:"Mint a token"}),l.jsx("p",{className:"dim",style:{margin:"0 0 0.85rem"},children:"Issues a hub-signed token (JWT) scoped to this vault. Store it like a password — it's shown once and can't be re-displayed."}),S?l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:S})}):null,l.jsxs("div",{className:"form-row",children:[l.jsxs("label",{htmlFor:"mint-label",children:["Label ",l.jsx("span",{className:"dim",children:"(required)"})]}),l.jsx("input",{id:"mint-label",type:"text",value:o,onChange:K=>c(K.target.value),placeholder:"e.g. ci, paraclaw-prod, my-laptop",maxLength:120,required:!0})]}),l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"mint-scope",children:"Scope"}),l.jsx("select",{id:"mint-scope",value:f,onChange:K=>h(K.target.value),children:Rx.map(K=>l.jsx("option",{value:K,children:K==="read"?"read — query notes only":K==="write"?"write — query + create/update notes":"admin — full control (incl. token mgmt)"},K))}),l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:["Issued as ",l.jsxs("code",{children:["vault:",s,":",f]}),". Lower scopes inherit narrower powers."]})]}),l.jsxs("div",{className:"form-row",children:[l.jsx("label",{htmlFor:"mint-ttl",children:"Expires after"}),l.jsx("select",{id:"mint-ttl",value:p,onChange:K=>E(Number(K.target.value)),children:Sx.map(K=>l.jsx("option",{value:K,children:kx[K]??`${K} days`},K))}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:"The token stops working after this. Rotate before it lapses."})]}),l.jsxs("div",{className:"form-row",children:[l.jsxs("label",{children:["Tag scope ",l.jsx("span",{className:"dim",children:"(optional)"})]}),U?l.jsxs("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:["Couldn't load tags: ",l.jsx("code",{children:U}),". Token will be unscoped."]}):N.length===0?l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:"No root tags in this vault yet — token will see the full vault."}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"tag-picker",children:N.map(K=>l.jsxs("label",{className:"tag-checkbox",children:[l.jsx("input",{type:"checkbox",checked:D.has(K),onChange:()=>M(K)}),l.jsx("code",{children:K})]},K))}),l.jsx("p",{className:"dim",style:{margin:"0.35rem 0 0"},children:D.size===0?"Nothing selected — token sees the full vault (unscoped).":`Token limited to: ${[...D].join(", ")}. Sub-tags (e.g. health/food) are reachable when their root is selected.`})]})]}),l.jsx("div",{className:"actions",children:l.jsx("button",{type:"submit",disabled:x||L,children:x?"Minting…":"Mint token"})})]})}function Dx({tokens:s,allowRevoke:r,confirmingJti:o,onAskConfirm:c,onRevoked:f}){return s.length===0?l.jsx("p",{className:"muted",children:"No tokens yet. Mint one above to get started."}):l.jsx("div",{className:"token-list",children:s.map(h=>l.jsx(Ux,{token:h,allowRevoke:r,confirming:o===h.jti,onAskConfirm:c,onRevoked:f},h.jti))})}function Ux({token:s,allowRevoke:r,confirming:o,onAskConfirm:c,onRevoked:f}){const[h,p]=y.useState(!1),[E,x]=y.useState(null),g=s.revoked_at!==null,S=async()=>{p(!0),x(null);try{await Cx(s.jti),f()}catch(v){if(v instanceof Ln&&v.disposition==="forbidden"){Jl();return}x(v instanceof Error?v.message:String(v)),p(!1)}};return l.jsxs("div",{className:"token-row",children:[l.jsxs("div",{className:"body",children:[l.jsxs("div",{className:"name",children:[l.jsx("strong",{children:s.label??"(unlabeled)"}),l.jsx("code",{className:"dim",children:s.jti}),g?l.jsx("code",{className:"scope-tag",title:"This token has been revoked and no longer works.",children:"revoked"}):null]}),l.jsxs("div",{className:"meta",children:[l.jsx("span",{className:"dim",children:"scopes:"})," ",s.scopes.length>0?s.scopes.map(v=>l.jsx("code",{className:"scope-tag",children:v},v)):l.jsx("span",{className:"dim",children:"(none)"})]}),s.scoped_tags&&s.scoped_tags.length>0?l.jsxs("div",{className:"meta",children:[l.jsx("span",{className:"dim",children:"tags:"})," ",s.scoped_tags.map(v=>l.jsxs("code",{className:"scope-tag tag-pill",children:["#",v]},v))]}):null,l.jsxs("div",{className:"meta dim",children:["created ",s.created_at,s.expires_at?` · expires ${s.expires_at}`:"",g&&s.revoked_at?` · revoked ${s.revoked_at}`:""]}),E?l.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:l.jsx("code",{children:E})}):null]}),r&&!g?o?l.jsxs("div",{className:"actions",children:[l.jsx("button",{type:"button",onClick:S,disabled:h,children:h?"Revoking…":"Confirm revoke"}),l.jsx("button",{type:"button",className:"secondary",onClick:()=>c(null),disabled:h,children:"Cancel"})]}):l.jsx("button",{type:"button",className:"secondary",onClick:()=>c(s.jti),children:"Revoke"}):null]})}function Hx(){const[s,r]=y.useState({kind:"loading"});return y.useEffect(()=>{let o=!1;return Nm().then(c=>{o||r({kind:"ok",vaults:c})}).catch(c=>{if(o)return;const f=c instanceof de?`${c.status}: ${c.message}`:c instanceof Error?c.message:String(c);r({kind:"error",message:f})}),()=>{o=!0}},[]),s.kind==="loading"?l.jsxs("div",{children:[l.jsx("h2",{children:"Vaults"}),l.jsx("p",{className:"muted",children:"Loading…"})]}):s.kind==="error"?l.jsxs("div",{children:[l.jsx("h2",{children:"Vaults"}),l.jsx("div",{className:"error-banner",children:l.jsx("code",{children:s.message})})]}):s.vaults.length===0?l.jsxs("div",{children:[l.jsx("h2",{children:"Vaults"}),l.jsxs("div",{className:"empty",children:["No vaults yet. Run ",l.jsx("code",{children:"parachute-vault create <name>"})," on the host to create one."]})]}):l.jsxs("div",{children:[l.jsx("div",{className:"list-header",children:l.jsx("h2",{children:"Vaults"})}),s.vaults.map(o=>l.jsxs(De,{to:`/vault/${o}`,className:"vault-row",children:[l.jsx("div",{className:"body",children:l.jsx("div",{className:"name",children:l.jsx("code",{children:o})})}),l.jsx("div",{className:"chev",children:"→"})]},o))]})}function Bx(){const s=xc(),r=s?null:Tm();return l.jsxs("div",{className:"page",children:[l.jsxs("nav",{className:"nav",children:[l.jsxs(De,{to:"/",className:"brand",children:["Parachute Vault ",l.jsx("span",{className:"sub",children:"admin"})]}),r?l.jsx(De,{to:"/",children:l.jsx("code",{children:r})}):l.jsx(De,{to:"/",children:"Vaults"})]}),s?l.jsxs(nc,{children:[l.jsx(nt,{path:"/",element:l.jsx(R0,{})}),l.jsx(nt,{path:"*",element:l.jsx(lc,{})})]}):r?l.jsxs(nc,{children:[l.jsx(nt,{path:"/",element:l.jsx(Kh,{vaultName:r})}),l.jsx(nt,{path:"/tokens",element:l.jsx(tm,{vaultName:r})}),l.jsx(nt,{path:"/mirror",element:l.jsx(Fh,{vaultName:r})}),l.jsx(nt,{path:"/schema",element:l.jsx(Ih,{vaultName:r})}),l.jsx(nt,{path:"/embeddings",element:l.jsx($h,{vaultName:r})}),l.jsx(nt,{path:"*",element:l.jsx(lc,{})})]}):l.jsxs(nc,{children:[l.jsx(nt,{path:"/",element:l.jsx(Hx,{})}),l.jsx(nt,{path:"/vault/:name",element:l.jsx(Kh,{})}),l.jsx(nt,{path:"/vault/:name/tokens",element:l.jsx(tm,{})}),l.jsx(nt,{path:"/vault/:name/mirror",element:l.jsx(Fh,{})}),l.jsx(nt,{path:"/vault/:name/schema",element:l.jsx(Ih,{})}),l.jsx(nt,{path:"/vault/:name/embeddings",element:l.jsx($h,{})}),l.jsx(nt,{path:"*",element:l.jsx(lc,{})})]})]})}function lc(){return l.jsxs("div",{className:"empty",children:["404 — back to ",l.jsx(De,{to:"/",children:"vault"}),"."]})}Wv();const Hm=document.getElementById("root");if(!Hm)throw new Error("#root not found");function ic(){gy.createRoot(Hm).render(l.jsx(y.StrictMode,{children:l.jsx(Hv,{basename:Jv(),children:l.jsx(Bx,{})})}))}const nm=Tm();!xc()&&nm?e0(nm).then(ic,ic):ic();
|