@ashlr/hub 3.3.0 → 3.3.2
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/CHANGELOG.md +46 -2
- package/README.md +51 -38
- package/dist/build-identity.json +2 -2
- package/dist/cli/completions.js +1 -2
- package/dist/cli/completions.js.map +1 -1
- package/dist/cli/dashboard.js +5 -4
- package/dist/cli/dashboard.js.map +1 -1
- package/dist/cli/help.js +7 -10
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/index.js +0 -10
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/serve.js +7 -3
- package/dist/cli/serve.js.map +1 -1
- package/dist/cli/setup.d.ts +5 -3
- package/dist/cli/setup.js +14 -7
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/update.js +3 -1
- package/dist/cli/update.js.map +1 -1
- package/dist/core/daemon/activation-permit.d.ts +33 -268
- package/dist/core/daemon/activation-permit.js +106 -1111
- package/dist/core/daemon/activation-permit.js.map +1 -1
- package/dist/core/daemon/loop.d.ts +1 -13
- package/dist/core/daemon/loop.js +10 -113
- package/dist/core/daemon/loop.js.map +1 -1
- package/dist/core/daemon/service-install-authority.d.ts +5 -1
- package/dist/core/daemon/service-install-authority.js +7 -20
- package/dist/core/daemon/service-install-authority.js.map +1 -1
- package/dist/core/fleet/automerge-pass.js +28 -77
- package/dist/core/fleet/automerge-pass.js.map +1 -1
- package/dist/core/fleet/decisions-ledger.js +1 -1
- package/dist/core/fleet/decisions-ledger.js.map +1 -1
- package/dist/core/fleet/judge-trace.js +2 -1
- package/dist/core/fleet/judge-trace.js.map +1 -1
- package/dist/core/fleet/manager.d.ts +6 -0
- package/dist/core/fleet/manager.js +35 -17
- package/dist/core/fleet/manager.js.map +1 -1
- package/dist/core/fleet/post-merge-credit-label.d.ts +10 -0
- package/dist/core/fleet/post-merge-credit-label.js +13 -0
- package/dist/core/fleet/post-merge-credit-label.js.map +1 -0
- package/dist/core/fleet/post-merge-credit.d.ts +20 -38
- package/dist/core/fleet/post-merge-credit.js +38 -39
- package/dist/core/fleet/post-merge-credit.js.map +1 -1
- package/dist/core/fleet/self-improve.d.ts +7 -7
- package/dist/core/fleet/self-improve.js +104 -20
- package/dist/core/fleet/self-improve.js.map +1 -1
- package/dist/core/fleet/status.js +0 -1
- package/dist/core/fleet/status.js.map +1 -1
- package/dist/core/foundry/automerge-scope-policy.d.ts +2 -2
- package/dist/core/foundry/automerge-scope-policy.js +2 -9
- package/dist/core/foundry/automerge-scope-policy.js.map +1 -1
- package/dist/core/goals/store.js +60 -20
- package/dist/core/goals/store.js.map +1 -1
- package/dist/core/inbox/apply.js +3 -5
- package/dist/core/inbox/apply.js.map +1 -1
- package/dist/core/inbox/merge.d.ts +0 -84
- package/dist/core/inbox/merge.js +23 -277
- package/dist/core/inbox/merge.js.map +1 -1
- package/dist/core/learn/reflect.js +10 -0
- package/dist/core/learn/reflect.js.map +1 -1
- package/dist/core/onboard.d.ts +2 -0
- package/dist/core/onboard.js +9 -3
- package/dist/core/onboard.js.map +1 -1
- package/dist/core/run/orchestrator.js +2 -0
- package/dist/core/run/orchestrator.js.map +1 -1
- package/dist/core/types.d.ts +5 -4
- package/dist/core/types.js.map +1 -1
- package/dist/core/web/api.d.ts +6 -0
- package/dist/core/web/api.js +69 -11
- package/dist/core/web/api.js.map +1 -1
- package/dist/core/web/public/app.js +5 -1
- package/dist/core/web/public/next/assets/index-CDHQraxS.css +1 -0
- package/dist/core/web/public/next/assets/index-zVKD9krw.js +69 -0
- package/dist/core/web/public/next/assets/{index-Ct0mf8n4.js.map → index-zVKD9krw.js.map} +1 -1
- package/dist/core/web/public/next/index.html +2 -2
- package/dist/core/web/read-session-revocations.d.ts +26 -0
- package/dist/core/web/read-session-revocations.js +48 -0
- package/dist/core/web/read-session-revocations.js.map +1 -0
- package/dist/core/web/server.js +73 -27
- package/dist/core/web/server.js.map +1 -1
- package/dist/core/web/static.d.ts +1 -1
- package/dist/core/web/static.js +54 -20
- package/dist/core/web/static.js.map +1 -1
- package/dist/release-dependency-inventory.json +1 -1
- package/docs/RUNTIME_ACTIVATION_AUTHORITY.md +0 -11
- package/node_modules/fast-uri/index.js +201 -48
- package/node_modules/fast-uri/lib/schemes.js +9 -4
- package/node_modules/fast-uri/lib/utils.js +388 -91
- package/node_modules/fast-uri/package.json +1 -1
- package/node_modules/fast-uri/test/component-safe-serialization.test.js +105 -0
- package/node_modules/fast-uri/test/equal.test.js +31 -3
- package/node_modules/fast-uri/test/fixtures/uri-js-parse.json +2 -0
- package/node_modules/fast-uri/test/ipv6-canonical.test.js +34 -0
- package/node_modules/fast-uri/test/ipv6-validation.test.js +90 -0
- package/node_modules/fast-uri/test/malformed-percent.test.js +77 -0
- package/node_modules/fast-uri/test/malformed-urn.test.js +61 -0
- package/node_modules/fast-uri/test/parse.test.js +7 -3
- package/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
- package/node_modules/fast-uri/test/reserved-path-normalization.test.js +109 -0
- package/node_modules/fast-uri/test/scheme-validation.test.js +124 -0
- package/node_modules/fast-uri/test/security-normalization.test.js +101 -0
- package/node_modules/fast-uri/test/security.test.js +75 -3
- package/node_modules/fast-uri/test/urn-full-input.test.js +29 -0
- package/node_modules/fast-uri/test/websocket-query-preservation.test.js +24 -0
- package/node_modules/qs/.github/THREAT_MODEL.md +3 -3
- package/node_modules/qs/CHANGELOG.md +26 -0
- package/node_modules/qs/README.md +19 -1
- package/node_modules/qs/dist/qs.js +25 -25
- package/node_modules/qs/eslint.config.mjs +1 -1
- package/node_modules/qs/lib/parse.js +16 -6
- package/node_modules/qs/lib/stringify.js +23 -8
- package/node_modules/qs/lib/utils.js +57 -11
- package/node_modules/qs/package.json +8 -7
- package/node_modules/qs/test/parse.js +419 -0
- package/node_modules/qs/test/stringify.js +317 -0
- package/node_modules/qs/test/utils.js +206 -0
- package/package.json +5 -4
- package/schema/config.schema.json +7 -7
- package/dist/cli/activation.d.ts +0 -41
- package/dist/cli/activation.js +0 -485
- package/dist/cli/activation.js.map +0 -1
- package/dist/core/web/public/next/assets/index-CY0U241s.css +0 -1
- package/dist/core/web/public/next/assets/index-Ct0mf8n4.js +0 -69
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))r(d);new MutationObserver(d=>{for(const h of d)if(h.type==="childList")for(const m of h.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&r(m)}).observe(document,{childList:!0,subtree:!0});function u(d){const h={};return d.integrity&&(h.integrity=d.integrity),d.referrerPolicy&&(h.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?h.credentials="include":d.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function r(d){if(d.ep)return;d.ep=!0;const h=u(d);fetch(d.href,h)}})();var Nu={exports:{}},Ks={};/**
|
|
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 kp;function Uy(){if(kp)return Ks;kp=1;var s=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function u(r,d,h){var m=null;if(h!==void 0&&(m=""+h),d.key!==void 0&&(m=""+d.key),"key"in d){h={};for(var v in d)v!=="key"&&(h[v]=d[v])}else h=d;return d=h.ref,{$$typeof:s,type:r,key:m,ref:d!==void 0?d:null,props:h}}return Ks.Fragment=o,Ks.jsx=u,Ks.jsxs=u,Ks}var Ap;function By(){return Ap||(Ap=1,Nu.exports=Uy()),Nu.exports}var a=By(),wu={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 Rp;function Hy(){if(Rp)return re;Rp=1;var s=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),m=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),w=Symbol.iterator;function z(S){return S===null||typeof S!="object"?null:(S=w&&S[w]||S["@@iterator"],typeof S=="function"?S:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,T={};function C(S,O,J){this.props=S,this.context=O,this.refs=T,this.updater=J||L}C.prototype.isReactComponent={},C.prototype.setState=function(S,O){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,O,"setState")},C.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function G(){}G.prototype=C.prototype;function Y(S,O,J){this.props=S,this.context=O,this.refs=T,this.updater=J||L}var F=Y.prototype=new G;F.constructor=Y,D(F,C.prototype),F.isPureReactComponent=!0;var q=Array.isArray;function I(){}var K={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function ce(S,O,J){var ee=J.ref;return{$$typeof:s,type:S,key:O,ref:ee!==void 0?ee:null,props:J}}function ge(S,O){return ce(S.type,O,S.props)}function se(S){return typeof S=="object"&&S!==null&&S.$$typeof===s}function ve(S){var O={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(J){return O[J]})}var Je=/\/+/g;function ne(S,O){return typeof S=="object"&&S!==null&&S.key!=null?ve(""+S.key):O.toString(36)}function le(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(I,I):(S.status="pending",S.then(function(O){S.status==="pending"&&(S.status="fulfilled",S.value=O)},function(O){S.status==="pending"&&(S.status="rejected",S.reason=O)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function M(S,O,J,ee,de){var ye=typeof S;(ye==="undefined"||ye==="boolean")&&(S=null);var $e=!1;if(S===null)$e=!0;else switch(ye){case"bigint":case"string":case"number":$e=!0;break;case"object":switch(S.$$typeof){case s:case o:$e=!0;break;case b:return $e=S._init,M($e(S._payload),O,J,ee,de)}}if($e)return de=de(S),$e=ee===""?"."+ne(S,0):ee,q(de)?(J="",$e!=null&&(J=$e.replace(Je,"$&/")+"/"),M(de,O,J,"",function(es){return es})):de!=null&&(se(de)&&(de=ge(de,J+(de.key==null||S&&S.key===de.key?"":(""+de.key).replace(Je,"$&/")+"/")+$e)),O.push(de)),1;$e=0;var Et=ee===""?".":ee+":";if(q(S))for(var lt=0;lt<S.length;lt++)ee=S[lt],ye=Et+ne(ee,lt),$e+=M(ee,O,J,ye,de);else if(lt=z(S),typeof lt=="function")for(S=lt.call(S),lt=0;!(ee=S.next()).done;)ee=ee.value,ye=Et+ne(ee,lt++),$e+=M(ee,O,J,ye,de);else if(ye==="object"){if(typeof S.then=="function")return M(le(S),O,J,ee,de);throw O=String(S),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.")}return $e}function X(S,O,J){if(S==null)return S;var ee=[],de=0;return M(S,ee,"","",function(ye){return O.call(J,ye,de++)}),ee}function Z(S){if(S._status===-1){var O=S._result;O=O(),O.then(function(J){(S._status===0||S._status===-1)&&(S._status=1,S._result=J)},function(J){(S._status===0||S._status===-1)&&(S._status=2,S._result=J)}),S._status===-1&&(S._status=0,S._result=O)}if(S._status===1)return S._result.default;throw S._result}var Q=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var O=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(O))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},P={map:X,forEach:function(S,O,J){X(S,function(){O.apply(this,arguments)},J)},count:function(S){var O=0;return X(S,function(){O++}),O},toArray:function(S){return X(S,function(O){return O})||[]},only:function(S){if(!se(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return re.Activity=x,re.Children=P,re.Component=C,re.Fragment=u,re.Profiler=d,re.PureComponent=Y,re.StrictMode=r,re.Suspense=g,re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,re.__COMPILER_RUNTIME={__proto__:null,c:function(S){return K.H.useMemoCache(S)}},re.cache=function(S){return function(){return S.apply(null,arguments)}},re.cacheSignal=function(){return null},re.cloneElement=function(S,O,J){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var ee=D({},S.props),de=S.key;if(O!=null)for(ye in O.key!==void 0&&(de=""+O.key),O)!V.call(O,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&O.ref===void 0||(ee[ye]=O[ye]);var ye=arguments.length-2;if(ye===1)ee.children=J;else if(1<ye){for(var $e=Array(ye),Et=0;Et<ye;Et++)$e[Et]=arguments[Et+2];ee.children=$e}return ce(S.type,de,ee)},re.createContext=function(S){return S={$$typeof:m,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:h,_context:S},S},re.createElement=function(S,O,J){var ee,de={},ye=null;if(O!=null)for(ee in O.key!==void 0&&(ye=""+O.key),O)V.call(O,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(de[ee]=O[ee]);var $e=arguments.length-2;if($e===1)de.children=J;else if(1<$e){for(var Et=Array($e),lt=0;lt<$e;lt++)Et[lt]=arguments[lt+2];de.children=Et}if(S&&S.defaultProps)for(ee in $e=S.defaultProps,$e)de[ee]===void 0&&(de[ee]=$e[ee]);return ce(S,ye,de)},re.createRef=function(){return{current:null}},re.forwardRef=function(S){return{$$typeof:v,render:S}},re.isValidElement=se,re.lazy=function(S){return{$$typeof:b,_payload:{_status:-1,_result:S},_init:Z}},re.memo=function(S,O){return{$$typeof:p,type:S,compare:O===void 0?null:O}},re.startTransition=function(S){var O=K.T,J={};K.T=J;try{var ee=S(),de=K.S;de!==null&&de(J,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(I,Q)}catch(ye){Q(ye)}finally{O!==null&&J.types!==null&&(O.types=J.types),K.T=O}},re.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},re.use=function(S){return K.H.use(S)},re.useActionState=function(S,O,J){return K.H.useActionState(S,O,J)},re.useCallback=function(S,O){return K.H.useCallback(S,O)},re.useContext=function(S){return K.H.useContext(S)},re.useDebugValue=function(){},re.useDeferredValue=function(S,O){return K.H.useDeferredValue(S,O)},re.useEffect=function(S,O){return K.H.useEffect(S,O)},re.useEffectEvent=function(S){return K.H.useEffectEvent(S)},re.useId=function(){return K.H.useId()},re.useImperativeHandle=function(S,O,J){return K.H.useImperativeHandle(S,O,J)},re.useInsertionEffect=function(S,O){return K.H.useInsertionEffect(S,O)},re.useLayoutEffect=function(S,O){return K.H.useLayoutEffect(S,O)},re.useMemo=function(S,O){return K.H.useMemo(S,O)},re.useOptimistic=function(S,O){return K.H.useOptimistic(S,O)},re.useReducer=function(S,O,J){return K.H.useReducer(S,O,J)},re.useRef=function(S){return K.H.useRef(S)},re.useState=function(S){return K.H.useState(S)},re.useSyncExternalStore=function(S,O,J){return K.H.useSyncExternalStore(S,O,J)},re.useTransition=function(){return K.H.useTransition()},re.version="19.2.8",re}var Cp;function cd(){return Cp||(Cp=1,wu.exports=Hy()),wu.exports}var y=cd(),Tu={exports:{}},Zs={},Eu={exports:{}},ku={};/**
|
|
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 Dp;function qy(){return Dp||(Dp=1,(function(s){function o(M,X){var Z=M.length;M.push(X);e:for(;0<Z;){var Q=Z-1>>>1,P=M[Q];if(0<d(P,X))M[Q]=X,M[Z]=P,Z=Q;else break e}}function u(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var X=M[0],Z=M.pop();if(Z!==X){M[0]=Z;e:for(var Q=0,P=M.length,S=P>>>1;Q<S;){var O=2*(Q+1)-1,J=M[O],ee=O+1,de=M[ee];if(0>d(J,Z))ee<P&&0>d(de,J)?(M[Q]=de,M[ee]=Z,Q=ee):(M[Q]=J,M[O]=Z,Q=O);else if(ee<P&&0>d(de,Z))M[Q]=de,M[ee]=Z,Q=ee;else break e}}return X}function d(M,X){var Z=M.sortIndex-X.sortIndex;return Z!==0?Z:M.id-X.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 m=Date,v=m.now();s.unstable_now=function(){return m.now()-v}}var g=[],p=[],b=1,x=null,w=3,z=!1,L=!1,D=!1,T=!1,C=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;function F(M){for(var X=u(p);X!==null;){if(X.callback===null)r(p);else if(X.startTime<=M)r(p),X.sortIndex=X.expirationTime,o(g,X);else break;X=u(p)}}function q(M){if(D=!1,F(M),!L)if(u(g)!==null)L=!0,I||(I=!0,ve());else{var X=u(p);X!==null&&le(q,X.startTime-M)}}var I=!1,K=-1,V=5,ce=-1;function ge(){return T?!0:!(s.unstable_now()-ce<V)}function se(){if(T=!1,I){var M=s.unstable_now();ce=M;var X=!0;try{e:{L=!1,D&&(D=!1,G(K),K=-1),z=!0;var Z=w;try{t:{for(F(M),x=u(g);x!==null&&!(x.expirationTime>M&&ge());){var Q=x.callback;if(typeof Q=="function"){x.callback=null,w=x.priorityLevel;var P=Q(x.expirationTime<=M);if(M=s.unstable_now(),typeof P=="function"){x.callback=P,F(M),X=!0;break t}x===u(g)&&r(g),F(M)}else r(g);x=u(g)}if(x!==null)X=!0;else{var S=u(p);S!==null&&le(q,S.startTime-M),X=!1}}break e}finally{x=null,w=Z,z=!1}X=void 0}}finally{X?ve():I=!1}}}var ve;if(typeof Y=="function")ve=function(){Y(se)};else if(typeof MessageChannel<"u"){var Je=new MessageChannel,ne=Je.port2;Je.port1.onmessage=se,ve=function(){ne.postMessage(null)}}else ve=function(){C(se,0)};function le(M,X){K=C(function(){M(s.unstable_now())},X)}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(M){M.callback=null},s.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<M?Math.floor(1e3/M):5},s.unstable_getCurrentPriorityLevel=function(){return w},s.unstable_next=function(M){switch(w){case 1:case 2:case 3:var X=3;break;default:X=w}var Z=w;w=X;try{return M()}finally{w=Z}},s.unstable_requestPaint=function(){T=!0},s.unstable_runWithPriority=function(M,X){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var Z=w;w=M;try{return X()}finally{w=Z}},s.unstable_scheduleCallback=function(M,X,Z){var Q=s.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?Q+Z:Q):Z=Q,M){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=Z+P,M={id:b++,callback:X,priorityLevel:M,startTime:Z,expirationTime:P,sortIndex:-1},Z>Q?(M.sortIndex=Z,o(p,M),u(g)===null&&M===u(p)&&(D?(G(K),K=-1):D=!0,le(q,Z-Q))):(M.sortIndex=P,o(g,M),L||z||(L=!0,I||(I=!0,ve()))),M},s.unstable_shouldYield=ge,s.unstable_wrapCallback=function(M){var X=w;return function(){var Z=w;w=X;try{return M.apply(this,arguments)}finally{w=Z}}}})(ku)),ku}var Mp;function Gy(){return Mp||(Mp=1,Eu.exports=qy()),Eu.exports}var Au={exports:{}},Nt={};/**
|
|
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 $p;function Qy(){if($p)return Nt;$p=1;var s=cd();function o(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(){}var r={d:{f:u,r:function(){throw Error(o(522))},D:u,C:u,L:u,m:u,X:u,S:u,M:u},p:0,findDOMNode:null},d=Symbol.for("react.portal");function h(g,p,b){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:x==null?null:""+x,children:g,containerInfo:p,implementation:b}}var m=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Nt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Nt.createPortal=function(g,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(o(299));return h(g,p,null,b)},Nt.flushSync=function(g){var p=m.T,b=r.p;try{if(m.T=null,r.p=2,g)return g()}finally{m.T=p,r.p=b,r.d.f()}},Nt.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(g,p))},Nt.prefetchDNS=function(g){typeof g=="string"&&r.d.D(g)},Nt.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var b=p.as,x=v(b,p.crossOrigin),w=typeof p.integrity=="string"?p.integrity:void 0,z=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?r.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:x,integrity:w,fetchPriority:z}):b==="script"&&r.d.X(g,{crossOrigin:x,integrity:w,fetchPriority:z,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Nt.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=v(p.as,p.crossOrigin);r.d.M(g,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(g)},Nt.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,x=v(b,p.crossOrigin);r.d.L(g,b,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Nt.preloadModule=function(g,p){if(typeof g=="string")if(p){var b=v(p.as,p.crossOrigin);r.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(g)},Nt.requestFormReset=function(g){r.d.r(g)},Nt.unstable_batchedUpdates=function(g,p){return g(p)},Nt.useFormState=function(g,p,b){return m.H.useFormState(g,p,b)},Nt.useFormStatus=function(){return m.H.useHostTransitionStatus()},Nt.version="19.2.8",Nt}var Lp;function g_(){if(Lp)return Au.exports;Lp=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(o){console.error(o)}}return s(),Au.exports=Qy(),Au.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 Op;function Yy(){if(Op)return Zs;Op=1;var s=Gy(),o=cd(),u=g_();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(h(e)!==e)throw Error(r(188))}function p(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,n=t;;){var i=l.return;if(i===null)break;var c=i.alternate;if(c===null){if(n=i.return,n!==null){l=n;continue}break}if(i.child===c.child){for(c=i.child;c;){if(c===l)return g(i),e;if(c===n)return g(i),t;c=c.sibling}throw Error(r(188))}if(l.return!==n.return)l=i,n=c;else{for(var f=!1,_=i.child;_;){if(_===l){f=!0,l=i,n=c;break}if(_===n){f=!0,n=i,l=c;break}_=_.sibling}if(!f){for(_=c.child;_;){if(_===l){f=!0,l=c,n=i;break}if(_===n){f=!0,n=c,l=i;break}_=_.sibling}if(!f)throw Error(r(189))}}if(l.alternate!==n)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,w=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),ge=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function ve(e){return e===null||typeof e!="object"?null:(e=se&&e[se]||e["@@iterator"],typeof e=="function"?e:null)}var Je=Symbol.for("react.client.reference");function ne(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Je?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case D:return"Fragment";case C:return"Profiler";case T:return"StrictMode";case q:return"Suspense";case I:return"SuspenseList";case ce:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case L:return"Portal";case Y:return e.displayName||"Context";case G:return(e._context.displayName||"Context")+".Consumer";case F:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return t=e.displayName||null,t!==null?t:ne(e.type)||"Memo";case V:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var le=Array.isArray,M=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},Q=[],P=-1;function S(e){return{current:e}}function O(e){0>P||(e.current=Q[P],Q[P]=null,P--)}function J(e,t){P++,Q[P]=e.current,e.current=t}var ee=S(null),de=S(null),ye=S(null),$e=S(null);function Et(e,t){switch(J(ye,t),J(de,e),J(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Wm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Wm(t),e=Im(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}O(ee),J(ee,e)}function lt(){O(ee),O(de),O(ye)}function es(e){e.memoizedState!==null&&J($e,e);var t=ee.current,l=Im(t,e.type);t!==l&&(J(de,e),J(ee,l))}function fi(e){de.current===e&&(O(ee),O(de)),$e.current===e&&(O($e),Qs._currentValue=Z)}var so,Td;function wn(e){if(so===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);so=t&&t[1]||"",Td=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+so+e+Td}var io=!1;function co(e,t){if(!e||io)return"";io=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch($){var R=$}Reflect.construct(e,[],H)}else{try{H.call()}catch($){R=$}e.call(H.prototype)}}else{try{throw Error()}catch($){R=$}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch($){if($&&R&&typeof $.stack=="string")return[$.stack,R.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=n.DetermineComponentFrameRoot(),f=c[0],_=c[1];if(f&&_){var j=f.split(`
|
|
44
|
+
`),A=_.split(`
|
|
45
|
+
`);for(i=n=0;n<j.length&&!j[n].includes("DetermineComponentFrameRoot");)n++;for(;i<A.length&&!A[i].includes("DetermineComponentFrameRoot");)i++;if(n===j.length||i===A.length)for(n=j.length-1,i=A.length-1;1<=n&&0<=i&&j[n]!==A[i];)i--;for(;1<=n&&0<=i;n--,i--)if(j[n]!==A[i]){if(n!==1||i!==1)do if(n--,i--,0>i||j[n]!==A[i]){var U=`
|
|
46
|
+
`+j[n].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),U}while(1<=n&&0<=i);break}}}finally{io=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?wn(l):""}function pg(e,t){switch(e.tag){case 26:case 27:case 5:return wn(e.type);case 16:return wn("Lazy");case 13:return e.child!==t&&t!==null?wn("Suspense Fallback"):wn("Suspense");case 19:return wn("SuspenseList");case 0:case 15:return co(e.type,!1);case 11:return co(e.type.render,!1);case 1:return co(e.type,!0);case 31:return wn("Activity");default:return""}}function Ed(e){try{var t="",l=null;do t+=pg(e,l),l=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
+
Error generating stack: `+n.message+`
|
|
48
|
+
`+n.stack}}var oo=Object.prototype.hasOwnProperty,ro=s.unstable_scheduleCallback,uo=s.unstable_cancelCallback,_g=s.unstable_shouldYield,gg=s.unstable_requestPaint,zt=s.unstable_now,vg=s.unstable_getCurrentPriorityLevel,kd=s.unstable_ImmediatePriority,Ad=s.unstable_UserBlockingPriority,hi=s.unstable_NormalPriority,yg=s.unstable_LowPriority,Rd=s.unstable_IdlePriority,xg=s.log,bg=s.unstable_setDisableYieldValue,ts=null,Ut=null;function Jl(e){if(typeof xg=="function"&&bg(e),Ut&&typeof Ut.setStrictMode=="function")try{Ut.setStrictMode(ts,e)}catch{}}var Bt=Math.clz32?Math.clz32:Ng,jg=Math.log,Sg=Math.LN2;function Ng(e){return e>>>=0,e===0?32:31-(jg(e)/Sg|0)|0}var mi=256,pi=262144,_i=4194304;function Tn(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 gi(e,t,l){var n=e.pendingLanes;if(n===0)return 0;var i=0,c=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var _=n&134217727;return _!==0?(n=_&~c,n!==0?i=Tn(n):(f&=_,f!==0?i=Tn(f):l||(l=_&~e,l!==0&&(i=Tn(l))))):(_=n&~c,_!==0?i=Tn(_):f!==0?i=Tn(f):l||(l=n&~e,l!==0&&(i=Tn(l)))),i===0?0:t!==0&&t!==i&&(t&c)===0&&(c=i&-i,l=t&-t,c>=l||c===32&&(l&4194048)!==0)?t:i}function ls(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function wg(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 Cd(){var e=_i;return _i<<=1,(_i&62914560)===0&&(_i=4194304),e}function fo(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function ns(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Tg(e,t,l,n,i,c){var f=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var _=e.entanglements,j=e.expirationTimes,A=e.hiddenUpdates;for(l=f&~l;0<l;){var U=31-Bt(l),H=1<<U;_[U]=0,j[U]=-1;var R=A[U];if(R!==null)for(A[U]=null,U=0;U<R.length;U++){var $=R[U];$!==null&&($.lane&=-536870913)}l&=~H}n!==0&&Dd(e,n,0),c!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=c&~(f&~t))}function Dd(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Bt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|l&261930}function Md(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var n=31-Bt(l),i=1<<n;i&t|e[n]&t&&(e[n]|=t),l&=~i}}function $d(e,t){var l=t&-t;return l=(l&42)!==0?1:ho(l),(l&(e.suspendedLanes|t))!==0?0:l}function ho(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 mo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ld(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:bp(e.type))}function Od(e,t){var l=X.p;try{return X.p=e,t()}finally{X.p=l}}var Fl=Math.random().toString(36).slice(2),yt="__reactFiber$"+Fl,Rt="__reactProps$"+Fl,ea="__reactContainer$"+Fl,po="__reactEvents$"+Fl,Eg="__reactListeners$"+Fl,kg="__reactHandles$"+Fl,zd="__reactResources$"+Fl,as="__reactMarker$"+Fl;function _o(e){delete e[yt],delete e[Rt],delete e[po],delete e[Eg],delete e[kg]}function ta(e){var t=e[yt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[ea]||l[yt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=sp(e);e!==null;){if(l=e[yt])return l;e=sp(e)}return t}e=l,l=e.parentNode}return null}function la(e){if(e=e[yt]||e[ea]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ss(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function na(e){var t=e[zd];return t||(t=e[zd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function pt(e){e[as]=!0}var Ud=new Set,Bd={};function En(e,t){aa(e,t),aa(e+"Capture",t)}function aa(e,t){for(Bd[e]=t,e=0;e<t.length;e++)Ud.add(t[e])}var Ag=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]*$"),Hd={},qd={};function Rg(e){return oo.call(qd,e)?!0:oo.call(Hd,e)?!1:Ag.test(e)?qd[e]=!0:(Hd[e]=!0,!1)}function vi(e,t,l){if(Rg(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function yi(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Tl(e,t,l,n){if(n===null)e.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+n)}}function Jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Gd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Cg(e,t,l){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,c=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(f){l=""+f,c.call(this,f)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(f){l=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function go(e){if(!e._valueTracker){var t=Gd(e)?"checked":"value";e._valueTracker=Cg(e,t,""+e[t])}}function Qd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),n="";return e&&(n=Gd(e)?e.checked?"true":"false":e.value),e=n,e!==l?(t.setValue(e),!0):!1}function xi(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 Dg=/[\n"\\]/g;function Ft(e){return e.replace(Dg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function vo(e,t,l,n,i,c,f,_){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Jt(t)):e.value!==""+Jt(t)&&(e.value=""+Jt(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?yo(e,f,Jt(t)):l!=null?yo(e,f,Jt(l)):n!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+Jt(_):e.removeAttribute("name")}function Yd(e,t,l,n,i,c,f,_){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||l!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){go(e);return}l=l!=null?""+Jt(l):"",t=t!=null?""+Jt(t):l,_||t===e.value||(e.value=t),e.defaultValue=t}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=_?e.checked:!!n,e.defaultChecked=!!n,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),go(e)}function yo(e,t,l){t==="number"&&xi(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function sa(e,t,l,n){if(e=e.options,t){t={};for(var i=0;i<l.length;i++)t["$"+l[i]]=!0;for(l=0;l<e.length;l++)i=t.hasOwnProperty("$"+e[l].value),e[l].selected!==i&&(e[l].selected=i),i&&n&&(e[l].defaultSelected=!0)}else{for(l=""+Jt(l),t=null,i=0;i<e.length;i++){if(e[i].value===l){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Vd(e,t,l){if(t!=null&&(t=""+Jt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Jt(l):""}function Xd(e,t,l,n){if(t==null){if(n!=null){if(l!=null)throw Error(r(92));if(le(n)){if(1<n.length)throw Error(r(93));n=n[0]}l=n}l==null&&(l=""),t=l}l=Jt(t),e.defaultValue=l,n=e.textContent,n===l&&n!==""&&n!==null&&(e.value=n),go(e)}function ia(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Mg=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 Kd(e,t,l){var n=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,l):typeof l!="number"||l===0||Mg.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Zd(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var i in t)n=t[i],t.hasOwnProperty(i)&&l[i]!==n&&Kd(e,i,n)}else for(var c in t)t.hasOwnProperty(c)&&Kd(e,c,t[c])}function xo(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 $g=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"]]),Lg=/^[\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 bi(e){return Lg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function El(){}var bo=null;function jo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ca=null,oa=null;function Jd(e){var t=la(e);if(t&&(e=t.stateNode)){var l=e[Rt]||null;e:switch(e=t.stateNode,t.type){case"input":if(vo(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Ft(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var n=l[t];if(n!==e&&n.form===e.form){var i=n[Rt]||null;if(!i)throw Error(r(90));vo(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<l.length;t++)n=l[t],n.form===e.form&&Qd(n)}break e;case"textarea":Vd(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&sa(e,!!l.multiple,t,!1)}}}var So=!1;function Fd(e,t,l){if(So)return e(t,l);So=!0;try{var n=e(t);return n}finally{if(So=!1,(ca!==null||oa!==null)&&(oc(),ca&&(t=ca,e=oa,oa=ca=null,Jd(t),e)))for(t=0;t<e.length;t++)Jd(e[t])}}function is(e,t){var l=e.stateNode;if(l===null)return null;var n=l[Rt]||null;if(n===null)return null;l=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var kl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),No=!1;if(kl)try{var cs={};Object.defineProperty(cs,"passive",{get:function(){No=!0}}),window.addEventListener("test",cs,cs),window.removeEventListener("test",cs,cs)}catch{No=!1}var Wl=null,wo=null,ji=null;function Wd(){if(ji)return ji;var e,t=wo,l=t.length,n,i="value"in Wl?Wl.value:Wl.textContent,c=i.length;for(e=0;e<l&&t[e]===i[e];e++);var f=l-e;for(n=1;n<=f&&t[l-n]===i[c-n];n++);return ji=i.slice(e,1<n?1-n:void 0)}function Si(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ni(){return!0}function Id(){return!1}function Ct(e){function t(l,n,i,c,f){this._reactName=l,this._targetInst=i,this.type=n,this.nativeEvent=c,this.target=f,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(l=e[_],this[_]=l?l(c):c[_]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Ni:Id,this.isPropagationStopped=Id,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ni)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ni)},persist:function(){},isPersistent:Ni}),t}var kn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wi=Ct(kn),os=x({},kn,{view:0,detail:0}),Og=Ct(os),To,Eo,rs,Ti=x({},os,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ao,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!==rs&&(rs&&e.type==="mousemove"?(To=e.screenX-rs.screenX,Eo=e.screenY-rs.screenY):Eo=To=0,rs=e),To)},movementY:function(e){return"movementY"in e?e.movementY:Eo}}),Pd=Ct(Ti),zg=x({},Ti,{dataTransfer:0}),Ug=Ct(zg),Bg=x({},os,{relatedTarget:0}),ko=Ct(Bg),Hg=x({},kn,{animationName:0,elapsedTime:0,pseudoElement:0}),qg=Ct(Hg),Gg=x({},kn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Qg=Ct(Gg),Yg=x({},kn,{data:0}),ef=Ct(Yg),Vg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xg={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"},Kg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Kg[e])?!!t[e]:!1}function Ao(){return Zg}var Jg=x({},os,{key:function(e){if(e.key){var t=Vg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Si(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Xg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ao,charCode:function(e){return e.type==="keypress"?Si(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Si(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Fg=Ct(Jg),Wg=x({},Ti,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tf=Ct(Wg),Ig=x({},os,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ao}),Pg=Ct(Ig),ev=x({},kn,{propertyName:0,elapsedTime:0,pseudoElement:0}),tv=Ct(ev),lv=x({},Ti,{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}),nv=Ct(lv),av=x({},kn,{newState:0,oldState:0}),sv=Ct(av),iv=[9,13,27,32],Ro=kl&&"CompositionEvent"in window,us=null;kl&&"documentMode"in document&&(us=document.documentMode);var cv=kl&&"TextEvent"in window&&!us,lf=kl&&(!Ro||us&&8<us&&11>=us),nf=" ",af=!1;function sf(e,t){switch(e){case"keyup":return iv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ra=!1;function ov(e,t){switch(e){case"compositionend":return cf(t);case"keypress":return t.which!==32?null:(af=!0,nf);case"textInput":return e=t.data,e===nf&&af?null:e;default:return null}}function rv(e,t){if(ra)return e==="compositionend"||!Ro&&sf(e,t)?(e=Wd(),ji=wo=Wl=null,ra=!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 lf&&t.locale!=="ko"?null:t.data;default:return null}}var uv={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 of(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!uv[e.type]:t==="textarea"}function rf(e,t,l,n){ca?oa?oa.push(n):oa=[n]:ca=n,t=pc(t,"onChange"),0<t.length&&(l=new wi("onChange","change",null,l,n),e.push({event:l,listeners:t}))}var ds=null,fs=null;function dv(e){Vm(e,0)}function Ei(e){var t=ss(e);if(Qd(t))return e}function uf(e,t){if(e==="change")return t}var df=!1;if(kl){var Co;if(kl){var Do="oninput"in document;if(!Do){var ff=document.createElement("div");ff.setAttribute("oninput","return;"),Do=typeof ff.oninput=="function"}Co=Do}else Co=!1;df=Co&&(!document.documentMode||9<document.documentMode)}function hf(){ds&&(ds.detachEvent("onpropertychange",mf),fs=ds=null)}function mf(e){if(e.propertyName==="value"&&Ei(fs)){var t=[];rf(t,fs,e,jo(e)),Fd(dv,t)}}function fv(e,t,l){e==="focusin"?(hf(),ds=t,fs=l,ds.attachEvent("onpropertychange",mf)):e==="focusout"&&hf()}function hv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ei(fs)}function mv(e,t){if(e==="click")return Ei(t)}function pv(e,t){if(e==="input"||e==="change")return Ei(t)}function _v(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ht=typeof Object.is=="function"?Object.is:_v;function hs(e,t){if(Ht(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),n=Object.keys(t);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var i=l[n];if(!oo.call(t,i)||!Ht(e[i],t[i]))return!1}return!0}function pf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _f(e,t){var l=pf(e);e=0;for(var n;l;){if(l.nodeType===3){if(n=e+l.textContent.length,e<=t&&n>=t)return{node:l,offset:t-e};e=n}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=pf(l)}}function gf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=xi(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=xi(e.document)}return t}function Mo(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 gv=kl&&"documentMode"in document&&11>=document.documentMode,ua=null,$o=null,ms=null,Lo=!1;function yf(e,t,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Lo||ua==null||ua!==xi(n)||(n=ua,"selectionStart"in n&&Mo(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),ms&&hs(ms,n)||(ms=n,n=pc($o,"onSelect"),0<n.length&&(t=new wi("onSelect","select",null,t,l),e.push({event:t,listeners:n}),t.target=ua)))}function An(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var da={animationend:An("Animation","AnimationEnd"),animationiteration:An("Animation","AnimationIteration"),animationstart:An("Animation","AnimationStart"),transitionrun:An("Transition","TransitionRun"),transitionstart:An("Transition","TransitionStart"),transitioncancel:An("Transition","TransitionCancel"),transitionend:An("Transition","TransitionEnd")},Oo={},xf={};kl&&(xf=document.createElement("div").style,"AnimationEvent"in window||(delete da.animationend.animation,delete da.animationiteration.animation,delete da.animationstart.animation),"TransitionEvent"in window||delete da.transitionend.transition);function Rn(e){if(Oo[e])return Oo[e];if(!da[e])return e;var t=da[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in xf)return Oo[e]=t[l];return e}var bf=Rn("animationend"),jf=Rn("animationiteration"),Sf=Rn("animationstart"),vv=Rn("transitionrun"),yv=Rn("transitionstart"),xv=Rn("transitioncancel"),Nf=Rn("transitionend"),wf=new Map,zo="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(" ");zo.push("scrollEnd");function rl(e,t){wf.set(e,t),En(t,[e])}var ki=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)},Wt=[],fa=0,Uo=0;function Ai(){for(var e=fa,t=Uo=fa=0;t<e;){var l=Wt[t];Wt[t++]=null;var n=Wt[t];Wt[t++]=null;var i=Wt[t];Wt[t++]=null;var c=Wt[t];if(Wt[t++]=null,n!==null&&i!==null){var f=n.pending;f===null?i.next=i:(i.next=f.next,f.next=i),n.pending=i}c!==0&&Tf(l,i,c)}}function Ri(e,t,l,n){Wt[fa++]=e,Wt[fa++]=t,Wt[fa++]=l,Wt[fa++]=n,Uo|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Bo(e,t,l,n){return Ri(e,t,l,n),Ci(e)}function Cn(e,t){return Ri(e,null,null,t),Ci(e)}function Tf(e,t,l){e.lanes|=l;var n=e.alternate;n!==null&&(n.lanes|=l);for(var i=!1,c=e.return;c!==null;)c.childLanes|=l,n=c.alternate,n!==null&&(n.childLanes|=l),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(i=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,i&&t!==null&&(i=31-Bt(l),e=c.hiddenUpdates,n=e[i],n===null?e[i]=[t]:n.push(t),t.lane=l|536870912),c):null}function Ci(e){if(50<Os)throw Os=0,Zr=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ha={};function bv(e,t,l,n){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qt(e,t,l,n){return new bv(e,t,l,n)}function Ho(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Al(e,t){var l=e.alternate;return l===null?(l=qt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Ef(e,t){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Di(e,t,l,n,i,c){var f=0;if(n=e,typeof e=="function")Ho(e)&&(f=1);else if(typeof e=="string")f=Ty(e,l,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ce:return e=qt(31,l,t,i),e.elementType=ce,e.lanes=c,e;case D:return Dn(l.children,i,c,t);case T:f=8,i|=24;break;case C:return e=qt(12,l,t,i|2),e.elementType=C,e.lanes=c,e;case q:return e=qt(13,l,t,i),e.elementType=q,e.lanes=c,e;case I:return e=qt(19,l,t,i),e.elementType=I,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Y:f=10;break e;case G:f=9;break e;case F:f=11;break e;case K:f=14;break e;case V:f=16,n=null;break e}f=29,l=Error(r(130,e===null?"null":typeof e,"")),n=null}return t=qt(f,l,t,i),t.elementType=e,t.type=n,t.lanes=c,t}function Dn(e,t,l,n){return e=qt(7,e,n,t),e.lanes=l,e}function qo(e,t,l){return e=qt(6,e,null,t),e.lanes=l,e}function kf(e){var t=qt(18,null,null,0);return t.stateNode=e,t}function Go(e,t,l){return t=qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Af=new WeakMap;function It(e,t){if(typeof e=="object"&&e!==null){var l=Af.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Ed(t)},Af.set(e,t),t)}return{value:e,source:t,stack:Ed(t)}}var ma=[],pa=0,Mi=null,ps=0,Pt=[],el=0,Il=null,vl=1,yl="";function Rl(e,t){ma[pa++]=ps,ma[pa++]=Mi,Mi=e,ps=t}function Rf(e,t,l){Pt[el++]=vl,Pt[el++]=yl,Pt[el++]=Il,Il=e;var n=vl;e=yl;var i=32-Bt(n)-1;n&=~(1<<i),l+=1;var c=32-Bt(t)+i;if(30<c){var f=i-i%5;c=(n&(1<<f)-1).toString(32),n>>=f,i-=f,vl=1<<32-Bt(t)+i|l<<i|n,yl=c+e}else vl=1<<c|l<<i|n,yl=e}function Qo(e){e.return!==null&&(Rl(e,1),Rf(e,1,0))}function Yo(e){for(;e===Mi;)Mi=ma[--pa],ma[pa]=null,ps=ma[--pa],ma[pa]=null;for(;e===Il;)Il=Pt[--el],Pt[el]=null,yl=Pt[--el],Pt[el]=null,vl=Pt[--el],Pt[el]=null}function Cf(e,t){Pt[el++]=vl,Pt[el++]=yl,Pt[el++]=Il,vl=t.id,yl=t.overflow,Il=e}var xt=null,Ye=null,Te=!1,Pl=null,tl=!1,Vo=Error(r(519));function en(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw _s(It(t,e)),Vo}function Df(e){var t=e.stateNode,l=e.type,n=e.memoizedProps;switch(t[yt]=e,t[Rt]=n,l){case"dialog":be("cancel",t),be("close",t);break;case"iframe":case"object":case"embed":be("load",t);break;case"video":case"audio":for(l=0;l<Us.length;l++)be(Us[l],t);break;case"source":be("error",t);break;case"img":case"image":case"link":be("error",t),be("load",t);break;case"details":be("toggle",t);break;case"input":be("invalid",t),Yd(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":be("invalid",t);break;case"textarea":be("invalid",t),Xd(t,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||n.suppressHydrationWarning===!0||Jm(t.textContent,l)?(n.popover!=null&&(be("beforetoggle",t),be("toggle",t)),n.onScroll!=null&&be("scroll",t),n.onScrollEnd!=null&&be("scrollend",t),n.onClick!=null&&(t.onclick=El),t=!0):t=!1,t||en(e,!0)}function Mf(e){for(xt=e.return;xt;)switch(xt.tag){case 5:case 31:case 13:tl=!1;return;case 27:case 3:tl=!0;return;default:xt=xt.return}}function _a(e){if(e!==xt)return!1;if(!Te)return Mf(e),Te=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||ru(e.type,e.memoizedProps)),l=!l),l&&Ye&&en(e),Mf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ye=ap(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ye=ap(e)}else t===27?(t=Ye,pn(e.type)?(e=mu,mu=null,Ye=e):Ye=t):Ye=xt?nl(e.stateNode.nextSibling):null;return!0}function Mn(){Ye=xt=null,Te=!1}function Xo(){var e=Pl;return e!==null&&(Lt===null?Lt=e:Lt.push.apply(Lt,e),Pl=null),e}function _s(e){Pl===null?Pl=[e]:Pl.push(e)}var Ko=S(null),$n=null,Cl=null;function tn(e,t,l){J(Ko,t._currentValue),t._currentValue=l}function Dl(e){e._currentValue=Ko.current,O(Ko)}function Zo(e,t,l){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===l)break;e=e.return}}function Jo(e,t,l,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var c=i.dependencies;if(c!==null){var f=i.child;c=c.firstContext;e:for(;c!==null;){var _=c;c=i;for(var j=0;j<t.length;j++)if(_.context===t[j]){c.lanes|=l,_=c.alternate,_!==null&&(_.lanes|=l),Zo(c.return,l,e),n||(f=null);break e}c=_.next}}else if(i.tag===18){if(f=i.return,f===null)throw Error(r(341));f.lanes|=l,c=f.alternate,c!==null&&(c.lanes|=l),Zo(f,l,e),f=null}else f=i.child;if(f!==null)f.return=i;else for(f=i;f!==null;){if(f===e){f=null;break}if(i=f.sibling,i!==null){i.return=f.return,f=i;break}f=f.return}i=f}}function ga(e,t,l,n){e=null;for(var i=t,c=!1;i!==null;){if(!c){if((i.flags&524288)!==0)c=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var f=i.alternate;if(f===null)throw Error(r(387));if(f=f.memoizedProps,f!==null){var _=i.type;Ht(i.pendingProps.value,f.value)||(e!==null?e.push(_):e=[_])}}else if(i===$e.current){if(f=i.alternate,f===null)throw Error(r(387));f.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Qs):e=[Qs])}i=i.return}e!==null&&Jo(t,e,l,n),t.flags|=262144}function $i(e){for(e=e.firstContext;e!==null;){if(!Ht(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ln(e){$n=e,Cl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function bt(e){return $f($n,e)}function Li(e,t){return $n===null&&Ln(e),$f(e,t)}function $f(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Cl===null){if(e===null)throw Error(r(308));Cl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Cl=Cl.next=t;return l}var jv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Sv=s.unstable_scheduleCallback,Nv=s.unstable_NormalPriority,ot={$$typeof:Y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fo(){return{controller:new jv,data:new Map,refCount:0}}function gs(e){e.refCount--,e.refCount===0&&Sv(Nv,function(){e.controller.abort()})}var vs=null,Wo=0,va=0,ya=null;function wv(e,t){if(vs===null){var l=vs=[];Wo=0,va=eu(),ya={status:"pending",value:void 0,then:function(n){l.push(n)}}}return Wo++,t.then(Lf,Lf),t}function Lf(){if(--Wo===0&&vs!==null){ya!==null&&(ya.status="fulfilled");var e=vs;vs=null,va=0,ya=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Tv(e,t){var l=[],n={status:"pending",value:null,reason:null,then:function(i){l.push(i)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var i=0;i<l.length;i++)(0,l[i])(t)},function(i){for(n.status="rejected",n.reason=i,i=0;i<l.length;i++)(0,l[i])(void 0)}),n}var Of=M.S;M.S=function(e,t){ym=zt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&wv(e,t),Of!==null&&Of(e,t)};var On=S(null);function Io(){var e=On.current;return e!==null?e:qe.pooledCache}function Oi(e,t){t===null?J(On,On.current):J(On,t.pool)}function zf(){var e=Io();return e===null?null:{parent:ot._currentValue,pool:e}}var xa=Error(r(460)),Po=Error(r(474)),zi=Error(r(542)),Ui={then:function(){}};function Uf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Bf(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(El,El),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,qf(e),e;default:if(typeof t.status=="string")t.then(El,El);else{if(e=qe,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=n}},function(n){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,qf(e),e}throw Un=t,xa}}function zn(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Un=l,xa):l}}var Un=null;function Hf(){if(Un===null)throw Error(r(459));var e=Un;return Un=null,e}function qf(e){if(e===xa||e===zi)throw Error(r(483))}var ba=null,ys=0;function Bi(e){var t=ys;return ys+=1,ba===null&&(ba=[]),Bf(ba,e,t)}function xs(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Hi(e,t){throw t.$$typeof===w?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Gf(e){function t(E,N){if(e){var k=E.deletions;k===null?(E.deletions=[N],E.flags|=16):k.push(N)}}function l(E,N){if(!e)return null;for(;N!==null;)t(E,N),N=N.sibling;return null}function n(E){for(var N=new Map;E!==null;)E.key!==null?N.set(E.key,E):N.set(E.index,E),E=E.sibling;return N}function i(E,N){return E=Al(E,N),E.index=0,E.sibling=null,E}function c(E,N,k){return E.index=k,e?(k=E.alternate,k!==null?(k=k.index,k<N?(E.flags|=67108866,N):k):(E.flags|=67108866,N)):(E.flags|=1048576,N)}function f(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function _(E,N,k,B){return N===null||N.tag!==6?(N=qo(k,E.mode,B),N.return=E,N):(N=i(N,k),N.return=E,N)}function j(E,N,k,B){var ae=k.type;return ae===D?U(E,N,k.props.children,B,k.key):N!==null&&(N.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===V&&zn(ae)===N.type)?(N=i(N,k.props),xs(N,k),N.return=E,N):(N=Di(k.type,k.key,k.props,null,E.mode,B),xs(N,k),N.return=E,N)}function A(E,N,k,B){return N===null||N.tag!==4||N.stateNode.containerInfo!==k.containerInfo||N.stateNode.implementation!==k.implementation?(N=Go(k,E.mode,B),N.return=E,N):(N=i(N,k.children||[]),N.return=E,N)}function U(E,N,k,B,ae){return N===null||N.tag!==7?(N=Dn(k,E.mode,B,ae),N.return=E,N):(N=i(N,k),N.return=E,N)}function H(E,N,k){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=qo(""+N,E.mode,k),N.return=E,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case z:return k=Di(N.type,N.key,N.props,null,E.mode,k),xs(k,N),k.return=E,k;case L:return N=Go(N,E.mode,k),N.return=E,N;case V:return N=zn(N),H(E,N,k)}if(le(N)||ve(N))return N=Dn(N,E.mode,k,null),N.return=E,N;if(typeof N.then=="function")return H(E,Bi(N),k);if(N.$$typeof===Y)return H(E,Li(E,N),k);Hi(E,N)}return null}function R(E,N,k,B){var ae=N!==null?N.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return ae!==null?null:_(E,N,""+k,B);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case z:return k.key===ae?j(E,N,k,B):null;case L:return k.key===ae?A(E,N,k,B):null;case V:return k=zn(k),R(E,N,k,B)}if(le(k)||ve(k))return ae!==null?null:U(E,N,k,B,null);if(typeof k.then=="function")return R(E,N,Bi(k),B);if(k.$$typeof===Y)return R(E,N,Li(E,k),B);Hi(E,k)}return null}function $(E,N,k,B,ae){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return E=E.get(k)||null,_(N,E,""+B,ae);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case z:return E=E.get(B.key===null?k:B.key)||null,j(N,E,B,ae);case L:return E=E.get(B.key===null?k:B.key)||null,A(N,E,B,ae);case V:return B=zn(B),$(E,N,k,B,ae)}if(le(B)||ve(B))return E=E.get(k)||null,U(N,E,B,ae,null);if(typeof B.then=="function")return $(E,N,k,Bi(B),ae);if(B.$$typeof===Y)return $(E,N,k,Li(N,B),ae);Hi(N,B)}return null}function W(E,N,k,B){for(var ae=null,Ee=null,te=N,he=N=0,Ne=null;te!==null&&he<k.length;he++){te.index>he?(Ne=te,te=null):Ne=te.sibling;var ke=R(E,te,k[he],B);if(ke===null){te===null&&(te=Ne);break}e&&te&&ke.alternate===null&&t(E,te),N=c(ke,N,he),Ee===null?ae=ke:Ee.sibling=ke,Ee=ke,te=Ne}if(he===k.length)return l(E,te),Te&&Rl(E,he),ae;if(te===null){for(;he<k.length;he++)te=H(E,k[he],B),te!==null&&(N=c(te,N,he),Ee===null?ae=te:Ee.sibling=te,Ee=te);return Te&&Rl(E,he),ae}for(te=n(te);he<k.length;he++)Ne=$(te,E,he,k[he],B),Ne!==null&&(e&&Ne.alternate!==null&&te.delete(Ne.key===null?he:Ne.key),N=c(Ne,N,he),Ee===null?ae=Ne:Ee.sibling=Ne,Ee=Ne);return e&&te.forEach(function(xn){return t(E,xn)}),Te&&Rl(E,he),ae}function ie(E,N,k,B){if(k==null)throw Error(r(151));for(var ae=null,Ee=null,te=N,he=N=0,Ne=null,ke=k.next();te!==null&&!ke.done;he++,ke=k.next()){te.index>he?(Ne=te,te=null):Ne=te.sibling;var xn=R(E,te,ke.value,B);if(xn===null){te===null&&(te=Ne);break}e&&te&&xn.alternate===null&&t(E,te),N=c(xn,N,he),Ee===null?ae=xn:Ee.sibling=xn,Ee=xn,te=Ne}if(ke.done)return l(E,te),Te&&Rl(E,he),ae;if(te===null){for(;!ke.done;he++,ke=k.next())ke=H(E,ke.value,B),ke!==null&&(N=c(ke,N,he),Ee===null?ae=ke:Ee.sibling=ke,Ee=ke);return Te&&Rl(E,he),ae}for(te=n(te);!ke.done;he++,ke=k.next())ke=$(te,E,he,ke.value,B),ke!==null&&(e&&ke.alternate!==null&&te.delete(ke.key===null?he:ke.key),N=c(ke,N,he),Ee===null?ae=ke:Ee.sibling=ke,Ee=ke);return e&&te.forEach(function(zy){return t(E,zy)}),Te&&Rl(E,he),ae}function He(E,N,k,B){if(typeof k=="object"&&k!==null&&k.type===D&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case z:e:{for(var ae=k.key;N!==null;){if(N.key===ae){if(ae=k.type,ae===D){if(N.tag===7){l(E,N.sibling),B=i(N,k.props.children),B.return=E,E=B;break e}}else if(N.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===V&&zn(ae)===N.type){l(E,N.sibling),B=i(N,k.props),xs(B,k),B.return=E,E=B;break e}l(E,N);break}else t(E,N);N=N.sibling}k.type===D?(B=Dn(k.props.children,E.mode,B,k.key),B.return=E,E=B):(B=Di(k.type,k.key,k.props,null,E.mode,B),xs(B,k),B.return=E,E=B)}return f(E);case L:e:{for(ae=k.key;N!==null;){if(N.key===ae)if(N.tag===4&&N.stateNode.containerInfo===k.containerInfo&&N.stateNode.implementation===k.implementation){l(E,N.sibling),B=i(N,k.children||[]),B.return=E,E=B;break e}else{l(E,N);break}else t(E,N);N=N.sibling}B=Go(k,E.mode,B),B.return=E,E=B}return f(E);case V:return k=zn(k),He(E,N,k,B)}if(le(k))return W(E,N,k,B);if(ve(k)){if(ae=ve(k),typeof ae!="function")throw Error(r(150));return k=ae.call(k),ie(E,N,k,B)}if(typeof k.then=="function")return He(E,N,Bi(k),B);if(k.$$typeof===Y)return He(E,N,Li(E,k),B);Hi(E,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,N!==null&&N.tag===6?(l(E,N.sibling),B=i(N,k),B.return=E,E=B):(l(E,N),B=qo(k,E.mode,B),B.return=E,E=B),f(E)):l(E,N)}return function(E,N,k,B){try{ys=0;var ae=He(E,N,k,B);return ba=null,ae}catch(te){if(te===xa||te===zi)throw te;var Ee=qt(29,te,null,E.mode);return Ee.lanes=B,Ee.return=E,Ee}finally{}}}var Bn=Gf(!0),Qf=Gf(!1),ln=!1;function er(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tr(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 nn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function an(e,t,l){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(De&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=Ci(e),Tf(e,null,l),t}return Ri(e,n,t,l),Ci(e)}function bs(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,Md(e,l)}}function lr(e,t){var l=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var i=null,c=null;if(l=l.firstBaseUpdate,l!==null){do{var f={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};c===null?i=c=f:c=c.next=f,l=l.next}while(l!==null);c===null?i=c=t:c=c.next=t}else i=c=t;l={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:c,shared:n.shared,callbacks:n.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var nr=!1;function js(){if(nr){var e=ya;if(e!==null)throw e}}function Ss(e,t,l,n){nr=!1;var i=e.updateQueue;ln=!1;var c=i.firstBaseUpdate,f=i.lastBaseUpdate,_=i.shared.pending;if(_!==null){i.shared.pending=null;var j=_,A=j.next;j.next=null,f===null?c=A:f.next=A,f=j;var U=e.alternate;U!==null&&(U=U.updateQueue,_=U.lastBaseUpdate,_!==f&&(_===null?U.firstBaseUpdate=A:_.next=A,U.lastBaseUpdate=j))}if(c!==null){var H=i.baseState;f=0,U=A=j=null,_=c;do{var R=_.lane&-536870913,$=R!==_.lane;if($?(Se&R)===R:(n&R)===R){R!==0&&R===va&&(nr=!0),U!==null&&(U=U.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var W=e,ie=_;R=t;var He=l;switch(ie.tag){case 1:if(W=ie.payload,typeof W=="function"){H=W.call(He,H,R);break e}H=W;break e;case 3:W.flags=W.flags&-65537|128;case 0:if(W=ie.payload,R=typeof W=="function"?W.call(He,H,R):W,R==null)break e;H=x({},H,R);break e;case 2:ln=!0}}R=_.callback,R!==null&&(e.flags|=64,$&&(e.flags|=8192),$=i.callbacks,$===null?i.callbacks=[R]:$.push(R))}else $={lane:R,tag:_.tag,payload:_.payload,callback:_.callback,next:null},U===null?(A=U=$,j=H):U=U.next=$,f|=R;if(_=_.next,_===null){if(_=i.shared.pending,_===null)break;$=_,_=$.next,$.next=null,i.lastBaseUpdate=$,i.shared.pending=null}}while(!0);U===null&&(j=H),i.baseState=j,i.firstBaseUpdate=A,i.lastBaseUpdate=U,c===null&&(i.shared.lanes=0),un|=f,e.lanes=f,e.memoizedState=H}}function Yf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Vf(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Yf(l[e],t)}var ja=S(null),qi=S(0);function Xf(e,t){e=ql,J(qi,e),J(ja,t),ql=e|t.baseLanes}function ar(){J(qi,ql),J(ja,ja.current)}function sr(){ql=qi.current,O(ja),O(qi)}var Gt=S(null),ll=null;function sn(e){var t=e.alternate;J(nt,nt.current&1),J(Gt,e),ll===null&&(t===null||ja.current!==null||t.memoizedState!==null)&&(ll=e)}function ir(e){J(nt,nt.current),J(Gt,e),ll===null&&(ll=e)}function Kf(e){e.tag===22?(J(nt,nt.current),J(Gt,e),ll===null&&(ll=e)):cn()}function cn(){J(nt,nt.current),J(Gt,Gt.current)}function Qt(e){O(Gt),ll===e&&(ll=null),O(nt)}var nt=S(0);function Gi(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||fu(l)||hu(l)))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 Ml=0,fe=null,Ue=null,rt=null,Qi=!1,Sa=!1,Hn=!1,Yi=0,Ns=0,Na=null,Ev=0;function Ie(){throw Error(r(321))}function cr(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Ht(e[l],t[l]))return!1;return!0}function or(e,t,l,n,i,c){return Ml=c,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Rh:Sr,Hn=!1,c=l(n,i),Hn=!1,Sa&&(c=Jf(t,l,n,i)),Zf(e),c}function Zf(e){M.H=Es;var t=Ue!==null&&Ue.next!==null;if(Ml=0,rt=Ue=fe=null,Qi=!1,Ns=0,Na=null,t)throw Error(r(300));e===null||ut||(e=e.dependencies,e!==null&&$i(e)&&(ut=!0))}function Jf(e,t,l,n){fe=e;var i=0;do{if(Sa&&(Na=null),Ns=0,Sa=!1,25<=i)throw Error(r(301));if(i+=1,rt=Ue=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}M.H=Ch,c=t(l,n)}while(Sa);return c}function kv(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?ws(t):t,e=e.useState()[0],(Ue!==null?Ue.memoizedState:null)!==e&&(fe.flags|=1024),t}function rr(){var e=Yi!==0;return Yi=0,e}function ur(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function dr(e){if(Qi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qi=!1}Ml=0,rt=Ue=fe=null,Sa=!1,Ns=Yi=0,Na=null}function kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?fe.memoizedState=rt=e:rt=rt.next=e,rt}function at(){if(Ue===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=Ue.next;var t=rt===null?fe.memoizedState:rt.next;if(t!==null)rt=t,Ue=e;else{if(e===null)throw fe.alternate===null?Error(r(467)):Error(r(310));Ue=e,e={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},rt===null?fe.memoizedState=rt=e:rt=rt.next=e}return rt}function Vi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ws(e){var t=Ns;return Ns+=1,Na===null&&(Na=[]),e=Bf(Na,e,t),t=fe,(rt===null?t.memoizedState:rt.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Rh:Sr),e}function Xi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ws(e);if(e.$$typeof===Y)return bt(e)}throw Error(r(438,String(e)))}function fr(e){var t=null,l=fe.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var n=fe.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Vi(),fe.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),n=0;n<e;n++)l[n]=ge;return t.index++,l}function $l(e,t){return typeof t=="function"?t(e):t}function Ki(e){var t=at();return hr(t,Ue,e)}function hr(e,t,l){var n=e.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=l;var i=e.baseQueue,c=n.pending;if(c!==null){if(i!==null){var f=i.next;i.next=c.next,c.next=f}t.baseQueue=i=c,n.pending=null}if(c=e.baseState,i===null)e.memoizedState=c;else{t=i.next;var _=f=null,j=null,A=t,U=!1;do{var H=A.lane&-536870913;if(H!==A.lane?(Se&H)===H:(Ml&H)===H){var R=A.revertLane;if(R===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),H===va&&(U=!0);else if((Ml&R)===R){A=A.next,R===va&&(U=!0);continue}else H={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},j===null?(_=j=H,f=c):j=j.next=H,fe.lanes|=R,un|=R;H=A.action,Hn&&l(c,H),c=A.hasEagerState?A.eagerState:l(c,H)}else R={lane:H,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},j===null?(_=j=R,f=c):j=j.next=R,fe.lanes|=H,un|=H;A=A.next}while(A!==null&&A!==t);if(j===null?f=c:j.next=_,!Ht(c,e.memoizedState)&&(ut=!0,U&&(l=ya,l!==null)))throw l;e.memoizedState=c,e.baseState=f,e.baseQueue=j,n.lastRenderedState=c}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function mr(e){var t=at(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var n=l.dispatch,i=l.pending,c=t.memoizedState;if(i!==null){l.pending=null;var f=i=i.next;do c=e(c,f.action),f=f.next;while(f!==i);Ht(c,t.memoizedState)||(ut=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),l.lastRenderedState=c}return[c,n]}function Ff(e,t,l){var n=fe,i=at(),c=Te;if(c){if(l===void 0)throw Error(r(407));l=l()}else l=t();var f=!Ht((Ue||i).memoizedState,l);if(f&&(i.memoizedState=l,ut=!0),i=i.queue,gr(Pf.bind(null,n,i,e),[e]),i.getSnapshot!==t||f||rt!==null&&rt.memoizedState.tag&1){if(n.flags|=2048,wa(9,{destroy:void 0},If.bind(null,n,i,l,t),null),qe===null)throw Error(r(349));c||(Ml&127)!==0||Wf(n,t,l)}return l}function Wf(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=fe.updateQueue,t===null?(t=Vi(),fe.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function If(e,t,l,n){t.value=l,t.getSnapshot=n,eh(t)&&th(e)}function Pf(e,t,l){return l(function(){eh(t)&&th(e)})}function eh(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Ht(e,l)}catch{return!0}}function th(e){var t=Cn(e,2);t!==null&&Ot(t,e,2)}function pr(e){var t=kt();if(typeof e=="function"){var l=e;if(e=l(),Hn){Jl(!0);try{l()}finally{Jl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$l,lastRenderedState:e},t}function lh(e,t,l,n){return e.baseState=l,hr(e,Ue,typeof n=="function"?n:$l)}function Av(e,t,l,n,i){if(Fi(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){c.listeners.push(f)}};M.T!==null?l(!0):c.isTransition=!1,n(c),l=t.pending,l===null?(c.next=t.pending=c,nh(t,c)):(c.next=l.next,t.pending=l.next=c)}}function nh(e,t){var l=t.action,n=t.payload,i=e.state;if(t.isTransition){var c=M.T,f={};M.T=f;try{var _=l(i,n),j=M.S;j!==null&&j(f,_),ah(e,t,_)}catch(A){_r(e,t,A)}finally{c!==null&&f.types!==null&&(c.types=f.types),M.T=c}}else try{c=l(i,n),ah(e,t,c)}catch(A){_r(e,t,A)}}function ah(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){sh(e,t,n)},function(n){return _r(e,t,n)}):sh(e,t,l)}function sh(e,t,l){t.status="fulfilled",t.value=l,ih(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,nh(e,l)))}function _r(e,t,l){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=l,ih(t),t=t.next;while(t!==n)}e.action=null}function ih(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ch(e,t){return t}function oh(e,t){if(Te){var l=qe.formState;if(l!==null){e:{var n=fe;if(Te){if(Ye){t:{for(var i=Ye,c=tl;i.nodeType!==8;){if(!c){i=null;break t}if(i=nl(i.nextSibling),i===null){i=null;break t}}c=i.data,i=c==="F!"||c==="F"?i:null}if(i){Ye=nl(i.nextSibling),n=i.data==="F!";break e}}en(n)}n=!1}n&&(t=l[0])}}return l=kt(),l.memoizedState=l.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ch,lastRenderedState:t},l.queue=n,l=Eh.bind(null,fe,n),n.dispatch=l,n=pr(!1),c=jr.bind(null,fe,!1,n.queue),n=kt(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,l=Av.bind(null,fe,i,c,l),i.dispatch=l,n.memoizedState=e,[t,l,!1]}function rh(e){var t=at();return uh(t,Ue,e)}function uh(e,t,l){if(t=hr(e,t,ch)[0],e=Ki($l)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=ws(t)}catch(f){throw f===xa?zi:f}else n=t;t=at();var i=t.queue,c=i.dispatch;return l!==t.memoizedState&&(fe.flags|=2048,wa(9,{destroy:void 0},Rv.bind(null,i,l),null)),[n,c,e]}function Rv(e,t){e.action=t}function dh(e){var t=at(),l=Ue;if(l!==null)return uh(t,l,e);at(),t=t.memoizedState,l=at();var n=l.queue.dispatch;return l.memoizedState=e,[t,n,!1]}function wa(e,t,l,n){return e={tag:e,create:l,deps:n,inst:t,next:null},t=fe.updateQueue,t===null&&(t=Vi(),fe.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(n=l.next,l.next=e,e.next=n,t.lastEffect=e),e}function fh(){return at().memoizedState}function Zi(e,t,l,n){var i=kt();fe.flags|=e,i.memoizedState=wa(1|t,{destroy:void 0},l,n===void 0?null:n)}function Ji(e,t,l,n){var i=at();n=n===void 0?null:n;var c=i.memoizedState.inst;Ue!==null&&n!==null&&cr(n,Ue.memoizedState.deps)?i.memoizedState=wa(t,c,l,n):(fe.flags|=e,i.memoizedState=wa(1|t,c,l,n))}function hh(e,t){Zi(8390656,8,e,t)}function gr(e,t){Ji(2048,8,e,t)}function Cv(e){fe.flags|=4;var t=fe.updateQueue;if(t===null)t=Vi(),fe.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function mh(e){var t=at().memoizedState;return Cv({ref:t,nextImpl:e}),function(){if((De&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function ph(e,t){return Ji(4,2,e,t)}function _h(e,t){return Ji(4,4,e,t)}function gh(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function vh(e,t,l){l=l!=null?l.concat([e]):null,Ji(4,4,gh.bind(null,t,e),l)}function vr(){}function yh(e,t){var l=at();t=t===void 0?null:t;var n=l.memoizedState;return t!==null&&cr(t,n[1])?n[0]:(l.memoizedState=[e,t],e)}function xh(e,t){var l=at();t=t===void 0?null:t;var n=l.memoizedState;if(t!==null&&cr(t,n[1]))return n[0];if(n=e(),Hn){Jl(!0);try{e()}finally{Jl(!1)}}return l.memoizedState=[n,t],n}function yr(e,t,l){return l===void 0||(Ml&1073741824)!==0&&(Se&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=bm(),fe.lanes|=e,un|=e,l)}function bh(e,t,l,n){return Ht(l,t)?l:ja.current!==null?(e=yr(e,l,n),Ht(e,t)||(ut=!0),e):(Ml&42)===0||(Ml&1073741824)!==0&&(Se&261930)===0?(ut=!0,e.memoizedState=l):(e=bm(),fe.lanes|=e,un|=e,t)}function jh(e,t,l,n,i){var c=X.p;X.p=c!==0&&8>c?c:8;var f=M.T,_={};M.T=_,jr(e,!1,t,l);try{var j=i(),A=M.S;if(A!==null&&A(_,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var U=Tv(j,n);Ts(e,t,U,Xt(e))}else Ts(e,t,n,Xt(e))}catch(H){Ts(e,t,{then:function(){},status:"rejected",reason:H},Xt())}finally{X.p=c,f!==null&&_.types!==null&&(f.types=_.types),M.T=f}}function Dv(){}function xr(e,t,l,n){if(e.tag!==5)throw Error(r(476));var i=Sh(e).queue;jh(e,i,t,Z,l===null?Dv:function(){return Nh(e),l(n)})}function Sh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$l,lastRenderedState:Z},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$l,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Nh(e){var t=Sh(e);t.next===null&&(t=e.alternate.memoizedState),Ts(e,t.next.queue,{},Xt())}function br(){return bt(Qs)}function wh(){return at().memoizedState}function Th(){return at().memoizedState}function Mv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Xt();e=nn(l);var n=an(t,e,l);n!==null&&(Ot(n,t,l),bs(n,t,l)),t={cache:Fo()},e.payload=t;return}t=t.return}}function $v(e,t,l){var n=Xt();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Fi(e)?kh(t,l):(l=Bo(e,t,l,n),l!==null&&(Ot(l,e,n),Ah(l,t,n)))}function Eh(e,t,l){var n=Xt();Ts(e,t,l,n)}function Ts(e,t,l,n){var i={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Fi(e))kh(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var f=t.lastRenderedState,_=c(f,l);if(i.hasEagerState=!0,i.eagerState=_,Ht(_,f))return Ri(e,t,i,0),qe===null&&Ai(),!1}catch{}finally{}if(l=Bo(e,t,i,n),l!==null)return Ot(l,e,n),Ah(l,t,n),!0}return!1}function jr(e,t,l,n){if(n={lane:2,revertLane:eu(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fi(e)){if(t)throw Error(r(479))}else t=Bo(e,l,n,2),t!==null&&Ot(t,e,2)}function Fi(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function kh(e,t){Sa=Qi=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Ah(e,t,l){if((l&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,Md(e,l)}}var Es={readContext:bt,use:Xi,useCallback:Ie,useContext:Ie,useEffect:Ie,useImperativeHandle:Ie,useLayoutEffect:Ie,useInsertionEffect:Ie,useMemo:Ie,useReducer:Ie,useRef:Ie,useState:Ie,useDebugValue:Ie,useDeferredValue:Ie,useTransition:Ie,useSyncExternalStore:Ie,useId:Ie,useHostTransitionStatus:Ie,useFormState:Ie,useActionState:Ie,useOptimistic:Ie,useMemoCache:Ie,useCacheRefresh:Ie};Es.useEffectEvent=Ie;var Rh={readContext:bt,use:Xi,useCallback:function(e,t){return kt().memoizedState=[e,t===void 0?null:t],e},useContext:bt,useEffect:hh,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Zi(4194308,4,gh.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Zi(4194308,4,e,t)},useInsertionEffect:function(e,t){Zi(4,2,e,t)},useMemo:function(e,t){var l=kt();t=t===void 0?null:t;var n=e();if(Hn){Jl(!0);try{e()}finally{Jl(!1)}}return l.memoizedState=[n,t],n},useReducer:function(e,t,l){var n=kt();if(l!==void 0){var i=l(t);if(Hn){Jl(!0);try{l(t)}finally{Jl(!1)}}}else i=t;return n.memoizedState=n.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},n.queue=e,e=e.dispatch=$v.bind(null,fe,e),[n.memoizedState,e]},useRef:function(e){var t=kt();return e={current:e},t.memoizedState=e},useState:function(e){e=pr(e);var t=e.queue,l=Eh.bind(null,fe,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:vr,useDeferredValue:function(e,t){var l=kt();return yr(l,e,t)},useTransition:function(){var e=pr(!1);return e=jh.bind(null,fe,e.queue,!0,!1),kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var n=fe,i=kt();if(Te){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),qe===null)throw Error(r(349));(Se&127)!==0||Wf(n,t,l)}i.memoizedState=l;var c={value:l,getSnapshot:t};return i.queue=c,hh(Pf.bind(null,n,c,e),[e]),n.flags|=2048,wa(9,{destroy:void 0},If.bind(null,n,c,l,t),null),l},useId:function(){var e=kt(),t=qe.identifierPrefix;if(Te){var l=yl,n=vl;l=(n&~(1<<32-Bt(n)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Yi++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Ev++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:br,useFormState:oh,useActionState:oh,useOptimistic:function(e){var t=kt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=jr.bind(null,fe,!0,l),l.dispatch=t,[e,t]},useMemoCache:fr,useCacheRefresh:function(){return kt().memoizedState=Mv.bind(null,fe)},useEffectEvent:function(e){var t=kt(),l={impl:e};return t.memoizedState=l,function(){if((De&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Sr={readContext:bt,use:Xi,useCallback:yh,useContext:bt,useEffect:gr,useImperativeHandle:vh,useInsertionEffect:ph,useLayoutEffect:_h,useMemo:xh,useReducer:Ki,useRef:fh,useState:function(){return Ki($l)},useDebugValue:vr,useDeferredValue:function(e,t){var l=at();return bh(l,Ue.memoizedState,e,t)},useTransition:function(){var e=Ki($l)[0],t=at().memoizedState;return[typeof e=="boolean"?e:ws(e),t]},useSyncExternalStore:Ff,useId:wh,useHostTransitionStatus:br,useFormState:rh,useActionState:rh,useOptimistic:function(e,t){var l=at();return lh(l,Ue,e,t)},useMemoCache:fr,useCacheRefresh:Th};Sr.useEffectEvent=mh;var Ch={readContext:bt,use:Xi,useCallback:yh,useContext:bt,useEffect:gr,useImperativeHandle:vh,useInsertionEffect:ph,useLayoutEffect:_h,useMemo:xh,useReducer:mr,useRef:fh,useState:function(){return mr($l)},useDebugValue:vr,useDeferredValue:function(e,t){var l=at();return Ue===null?yr(l,e,t):bh(l,Ue.memoizedState,e,t)},useTransition:function(){var e=mr($l)[0],t=at().memoizedState;return[typeof e=="boolean"?e:ws(e),t]},useSyncExternalStore:Ff,useId:wh,useHostTransitionStatus:br,useFormState:dh,useActionState:dh,useOptimistic:function(e,t){var l=at();return Ue!==null?lh(l,Ue,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:fr,useCacheRefresh:Th};Ch.useEffectEvent=mh;function Nr(e,t,l,n){t=e.memoizedState,l=l(n,t),l=l==null?t:x({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var wr={enqueueSetState:function(e,t,l){e=e._reactInternals;var n=Xt(),i=nn(n);i.payload=t,l!=null&&(i.callback=l),t=an(e,i,n),t!==null&&(Ot(t,e,n),bs(t,e,n))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var n=Xt(),i=nn(n);i.tag=1,i.payload=t,l!=null&&(i.callback=l),t=an(e,i,n),t!==null&&(Ot(t,e,n),bs(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Xt(),n=nn(l);n.tag=2,t!=null&&(n.callback=t),t=an(e,n,l),t!==null&&(Ot(t,e,l),bs(t,e,l))}};function Dh(e,t,l,n,i,c,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,c,f):t.prototype&&t.prototype.isPureReactComponent?!hs(l,n)||!hs(i,c):!0}function Mh(e,t,l,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,n),t.state!==e&&wr.enqueueReplaceState(t,t.state,null)}function qn(e,t){var l=t;if("ref"in t){l={};for(var n in t)n!=="ref"&&(l[n]=t[n])}if(e=e.defaultProps){l===t&&(l=x({},l));for(var i in e)l[i]===void 0&&(l[i]=e[i])}return l}function $h(e){ki(e)}function Lh(e){console.error(e)}function Oh(e){ki(e)}function Wi(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function zh(e,t,l){try{var n=e.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function Tr(e,t,l){return l=nn(l),l.tag=3,l.payload={element:null},l.callback=function(){Wi(e,t)},l}function Uh(e){return e=nn(e),e.tag=3,e}function Bh(e,t,l,n){var i=l.type.getDerivedStateFromError;if(typeof i=="function"){var c=n.value;e.payload=function(){return i(c)},e.callback=function(){zh(t,l,n)}}var f=l.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){zh(t,l,n),typeof i!="function"&&(dn===null?dn=new Set([this]):dn.add(this));var _=n.stack;this.componentDidCatch(n.value,{componentStack:_!==null?_:""})})}function Lv(e,t,l,n,i){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=l.alternate,t!==null&&ga(t,l,i,!0),l=Gt.current,l!==null){switch(l.tag){case 31:case 13:return ll===null?rc():l.alternate===null&&Pe===0&&(Pe=3),l.flags&=-257,l.flags|=65536,l.lanes=i,n===Ui?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([n]):t.add(n),Wr(e,n,i)),!1;case 22:return l.flags|=65536,n===Ui?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([n]):l.add(n)),Wr(e,n,i)),!1}throw Error(r(435,l.tag))}return Wr(e,n,i),rc(),!1}if(Te)return t=Gt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==Vo&&(e=Error(r(422),{cause:n}),_s(It(e,l)))):(n!==Vo&&(t=Error(r(423),{cause:n}),_s(It(t,l))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=It(n,l),i=Tr(e.stateNode,n,i),lr(e,i),Pe!==4&&(Pe=2)),!1;var c=Error(r(520),{cause:n});if(c=It(c,l),Ls===null?Ls=[c]:Ls.push(c),Pe!==4&&(Pe=2),t===null)return!0;n=It(n,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=i&-i,l.lanes|=e,e=Tr(l.stateNode,n,e),lr(l,e),!1;case 1:if(t=l.type,c=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(dn===null||!dn.has(c))))return l.flags|=65536,i&=-i,l.lanes|=i,i=Uh(i),Bh(i,e,l,n),lr(l,i),!1}l=l.return}while(l!==null);return!1}var Er=Error(r(461)),ut=!1;function jt(e,t,l,n){t.child=e===null?Qf(t,null,l,n):Bn(t,e.child,l,n)}function Hh(e,t,l,n,i){l=l.render;var c=t.ref;if("ref"in n){var f={};for(var _ in n)_!=="ref"&&(f[_]=n[_])}else f=n;return Ln(t),n=or(e,t,l,f,c,i),_=rr(),e!==null&&!ut?(ur(e,t,i),Ll(e,t,i)):(Te&&_&&Qo(t),t.flags|=1,jt(e,t,n,i),t.child)}function qh(e,t,l,n,i){if(e===null){var c=l.type;return typeof c=="function"&&!Ho(c)&&c.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=c,Gh(e,t,c,n,i)):(e=Di(l.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!Lr(e,i)){var f=c.memoizedProps;if(l=l.compare,l=l!==null?l:hs,l(f,n)&&e.ref===t.ref)return Ll(e,t,i)}return t.flags|=1,e=Al(c,n),e.ref=t.ref,e.return=t,t.child=e}function Gh(e,t,l,n,i){if(e!==null){var c=e.memoizedProps;if(hs(c,n)&&e.ref===t.ref)if(ut=!1,t.pendingProps=n=c,Lr(e,i))(e.flags&131072)!==0&&(ut=!0);else return t.lanes=e.lanes,Ll(e,t,i)}return kr(e,t,l,n,i)}function Qh(e,t,l,n){var i=n.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|l:l,e!==null){for(n=t.child=e.child,i=0;n!==null;)i=i|n.lanes|n.childLanes,n=n.sibling;n=i&~c}else n=0,t.child=null;return Yh(e,t,c,l,n)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Oi(t,c!==null?c.cachePool:null),c!==null?Xf(t,c):ar(),Kf(t);else return n=t.lanes=536870912,Yh(e,t,c!==null?c.baseLanes|l:l,l,n)}else c!==null?(Oi(t,c.cachePool),Xf(t,c),cn(),t.memoizedState=null):(e!==null&&Oi(t,null),ar(),cn());return jt(e,t,i,l),t.child}function ks(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Yh(e,t,l,n,i){var c=Io();return c=c===null?null:{parent:ot._currentValue,pool:c},t.memoizedState={baseLanes:l,cachePool:c},e!==null&&Oi(t,null),ar(),Kf(t),e!==null&&ga(e,t,n,!0),t.childLanes=i,null}function Ii(e,t){return t=ec({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Vh(e,t,l){return Bn(t,e.child,null,l),e=Ii(t,t.pendingProps),e.flags|=2,Qt(t),t.memoizedState=null,e}function Ov(e,t,l){var n=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(n.mode==="hidden")return e=Ii(t,n),t.lanes=536870912,ks(null,e);if(ir(t),(e=Ye)?(e=np(e,tl),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Il!==null?{id:vl,overflow:yl}:null,retryLane:536870912,hydrationErrors:null},l=kf(e),l.return=t,t.child=l,xt=t,Ye=null)):e=null,e===null)throw en(t);return t.lanes=536870912,null}return Ii(t,n)}var c=e.memoizedState;if(c!==null){var f=c.dehydrated;if(ir(t),i)if(t.flags&256)t.flags&=-257,t=Vh(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(ut||ga(e,t,l,!1),i=(l&e.childLanes)!==0,ut||i){if(n=qe,n!==null&&(f=$d(n,l),f!==0&&f!==c.retryLane))throw c.retryLane=f,Cn(e,f),Ot(n,e,f),Er;rc(),t=Vh(e,t,l)}else e=c.treeContext,Ye=nl(f.nextSibling),xt=t,Te=!0,Pl=null,tl=!1,e!==null&&Cf(t,e),t=Ii(t,n),t.flags|=4096;return t}return e=Al(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Pi(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function kr(e,t,l,n,i){return Ln(t),l=or(e,t,l,n,void 0,i),n=rr(),e!==null&&!ut?(ur(e,t,i),Ll(e,t,i)):(Te&&n&&Qo(t),t.flags|=1,jt(e,t,l,i),t.child)}function Xh(e,t,l,n,i,c){return Ln(t),t.updateQueue=null,l=Jf(t,n,l,i),Zf(e),n=rr(),e!==null&&!ut?(ur(e,t,c),Ll(e,t,c)):(Te&&n&&Qo(t),t.flags|=1,jt(e,t,l,c),t.child)}function Kh(e,t,l,n,i){if(Ln(t),t.stateNode===null){var c=ha,f=l.contextType;typeof f=="object"&&f!==null&&(c=bt(f)),c=new l(n,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=wr,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=n,c.state=t.memoizedState,c.refs={},er(t),f=l.contextType,c.context=typeof f=="object"&&f!==null?bt(f):ha,c.state=t.memoizedState,f=l.getDerivedStateFromProps,typeof f=="function"&&(Nr(t,l,f,n),c.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(f=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),f!==c.state&&wr.enqueueReplaceState(c,c.state,null),Ss(t,n,c,i),js(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){c=t.stateNode;var _=t.memoizedProps,j=qn(l,_);c.props=j;var A=c.context,U=l.contextType;f=ha,typeof U=="object"&&U!==null&&(f=bt(U));var H=l.getDerivedStateFromProps;U=typeof H=="function"||typeof c.getSnapshotBeforeUpdate=="function",_=t.pendingProps!==_,U||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(_||A!==f)&&Mh(t,c,n,f),ln=!1;var R=t.memoizedState;c.state=R,Ss(t,n,c,i),js(),A=t.memoizedState,_||R!==A||ln?(typeof H=="function"&&(Nr(t,l,H,n),A=t.memoizedState),(j=ln||Dh(t,l,j,n,R,A,f))?(U||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=A),c.props=n,c.state=A,c.context=f,n=j):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,tr(e,t),f=t.memoizedProps,U=qn(l,f),c.props=U,H=t.pendingProps,R=c.context,A=l.contextType,j=ha,typeof A=="object"&&A!==null&&(j=bt(A)),_=l.getDerivedStateFromProps,(A=typeof _=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(f!==H||R!==j)&&Mh(t,c,n,j),ln=!1,R=t.memoizedState,c.state=R,Ss(t,n,c,i),js();var $=t.memoizedState;f!==H||R!==$||ln||e!==null&&e.dependencies!==null&&$i(e.dependencies)?(typeof _=="function"&&(Nr(t,l,_,n),$=t.memoizedState),(U=ln||Dh(t,l,U,n,R,$,j)||e!==null&&e.dependencies!==null&&$i(e.dependencies))?(A||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,$,j),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,$,j)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||f===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=$),c.props=n,c.state=$,c.context=j,n=U):(typeof c.componentDidUpdate!="function"||f===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),n=!1)}return c=n,Pi(e,t),n=(t.flags&128)!==0,c||n?(c=t.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&n?(t.child=Bn(t,e.child,null,i),t.child=Bn(t,null,l,i)):jt(e,t,l,i),t.memoizedState=c.state,e=t.child):e=Ll(e,t,i),e}function Zh(e,t,l,n){return Mn(),t.flags|=256,jt(e,t,l,n),t.child}var Ar={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Rr(e){return{baseLanes:e,cachePool:zf()}}function Cr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Vt),e}function Jh(e,t,l){var n=t.pendingProps,i=!1,c=(t.flags&128)!==0,f;if((f=c)||(f=e!==null&&e.memoizedState===null?!1:(nt.current&2)!==0),f&&(i=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(i?sn(t):cn(),(e=Ye)?(e=np(e,tl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Il!==null?{id:vl,overflow:yl}:null,retryLane:536870912,hydrationErrors:null},l=kf(e),l.return=t,t.child=l,xt=t,Ye=null)):e=null,e===null)throw en(t);return hu(e)?t.lanes=32:t.lanes=536870912,null}var _=n.children;return n=n.fallback,i?(cn(),i=t.mode,_=ec({mode:"hidden",children:_},i),n=Dn(n,i,l,null),_.return=t,n.return=t,_.sibling=n,t.child=_,n=t.child,n.memoizedState=Rr(l),n.childLanes=Cr(e,f,l),t.memoizedState=Ar,ks(null,n)):(sn(t),Dr(t,_))}var j=e.memoizedState;if(j!==null&&(_=j.dehydrated,_!==null)){if(c)t.flags&256?(sn(t),t.flags&=-257,t=Mr(e,t,l)):t.memoizedState!==null?(cn(),t.child=e.child,t.flags|=128,t=null):(cn(),_=n.fallback,i=t.mode,n=ec({mode:"visible",children:n.children},i),_=Dn(_,i,l,null),_.flags|=2,n.return=t,_.return=t,n.sibling=_,t.child=n,Bn(t,e.child,null,l),n=t.child,n.memoizedState=Rr(l),n.childLanes=Cr(e,f,l),t.memoizedState=Ar,t=ks(null,n));else if(sn(t),hu(_)){if(f=_.nextSibling&&_.nextSibling.dataset,f)var A=f.dgst;f=A,n=Error(r(419)),n.stack="",n.digest=f,_s({value:n,source:null,stack:null}),t=Mr(e,t,l)}else if(ut||ga(e,t,l,!1),f=(l&e.childLanes)!==0,ut||f){if(f=qe,f!==null&&(n=$d(f,l),n!==0&&n!==j.retryLane))throw j.retryLane=n,Cn(e,n),Ot(f,e,n),Er;fu(_)||rc(),t=Mr(e,t,l)}else fu(_)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,Ye=nl(_.nextSibling),xt=t,Te=!0,Pl=null,tl=!1,e!==null&&Cf(t,e),t=Dr(t,n.children),t.flags|=4096);return t}return i?(cn(),_=n.fallback,i=t.mode,j=e.child,A=j.sibling,n=Al(j,{mode:"hidden",children:n.children}),n.subtreeFlags=j.subtreeFlags&65011712,A!==null?_=Al(A,_):(_=Dn(_,i,l,null),_.flags|=2),_.return=t,n.return=t,n.sibling=_,t.child=n,ks(null,n),n=t.child,_=e.child.memoizedState,_===null?_=Rr(l):(i=_.cachePool,i!==null?(j=ot._currentValue,i=i.parent!==j?{parent:j,pool:j}:i):i=zf(),_={baseLanes:_.baseLanes|l,cachePool:i}),n.memoizedState=_,n.childLanes=Cr(e,f,l),t.memoizedState=Ar,ks(e.child,n)):(sn(t),l=e.child,e=l.sibling,l=Al(l,{mode:"visible",children:n.children}),l.return=t,l.sibling=null,e!==null&&(f=t.deletions,f===null?(t.deletions=[e],t.flags|=16):f.push(e)),t.child=l,t.memoizedState=null,l)}function Dr(e,t){return t=ec({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ec(e,t){return e=qt(22,e,null,t),e.lanes=0,e}function Mr(e,t,l){return Bn(t,e.child,null,l),e=Dr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Fh(e,t,l){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Zo(e.return,t,l)}function $r(e,t,l,n,i,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:i,treeForkCount:c}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=n,f.tail=l,f.tailMode=i,f.treeForkCount=c)}function Wh(e,t,l){var n=t.pendingProps,i=n.revealOrder,c=n.tail;n=n.children;var f=nt.current,_=(f&2)!==0;if(_?(f=f&1|2,t.flags|=128):f&=1,J(nt,f),jt(e,t,n,l),n=Te?ps:0,!_&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Fh(e,l,t);else if(e.tag===19)Fh(e,l,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(l=t.child,i=null;l!==null;)e=l.alternate,e!==null&&Gi(e)===null&&(i=l),l=l.sibling;l=i,l===null?(i=t.child,t.child=null):(i=l.sibling,l.sibling=null),$r(t,!1,i,l,c,n);break;case"backwards":case"unstable_legacy-backwards":for(l=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Gi(e)===null){t.child=i;break}e=i.sibling,i.sibling=l,l=i,i=e}$r(t,!0,l,null,c,n);break;case"together":$r(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Ll(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),un|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(ga(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=Al(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Al(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Lr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&$i(e)))}function zv(e,t,l){switch(t.tag){case 3:Et(t,t.stateNode.containerInfo),tn(t,ot,e.memoizedState.cache),Mn();break;case 27:case 5:es(t);break;case 4:Et(t,t.stateNode.containerInfo);break;case 10:tn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ir(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(sn(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Jh(e,t,l):(sn(t),e=Ll(e,t,l),e!==null?e.sibling:null);sn(t);break;case 19:var i=(e.flags&128)!==0;if(n=(l&t.childLanes)!==0,n||(ga(e,t,l,!1),n=(l&t.childLanes)!==0),i){if(n)return Wh(e,t,l);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),J(nt,nt.current),n)break;return null;case 22:return t.lanes=0,Qh(e,t,l,t.pendingProps);case 24:tn(t,ot,e.memoizedState.cache)}return Ll(e,t,l)}function Ih(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)ut=!0;else{if(!Lr(e,l)&&(t.flags&128)===0)return ut=!1,zv(e,t,l);ut=(e.flags&131072)!==0}else ut=!1,Te&&(t.flags&1048576)!==0&&Rf(t,ps,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=zn(t.elementType),t.type=e,typeof e=="function")Ho(e)?(n=qn(e,n),t.tag=1,t=Kh(null,t,e,n,l)):(t.tag=0,t=kr(null,t,e,n,l));else{if(e!=null){var i=e.$$typeof;if(i===F){t.tag=11,t=Hh(null,t,e,n,l);break e}else if(i===K){t.tag=14,t=qh(null,t,e,n,l);break e}}throw t=ne(e)||e,Error(r(306,t,""))}}return t;case 0:return kr(e,t,t.type,t.pendingProps,l);case 1:return n=t.type,i=qn(n,t.pendingProps),Kh(e,t,n,i,l);case 3:e:{if(Et(t,t.stateNode.containerInfo),e===null)throw Error(r(387));n=t.pendingProps;var c=t.memoizedState;i=c.element,tr(e,t),Ss(t,n,null,l);var f=t.memoizedState;if(n=f.cache,tn(t,ot,n),n!==c.cache&&Jo(t,[ot],l,!0),js(),n=f.element,c.isDehydrated)if(c={element:n,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Zh(e,t,n,l);break e}else if(n!==i){i=It(Error(r(424)),t),_s(i),t=Zh(e,t,n,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ye=nl(e.firstChild),xt=t,Te=!0,Pl=null,tl=!0,l=Qf(t,null,n,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Mn(),n===i){t=Ll(e,t,l);break e}jt(e,t,n,l)}t=t.child}return t;case 26:return Pi(e,t),e===null?(l=rp(t.type,null,t.pendingProps,null))?t.memoizedState=l:Te||(l=t.type,e=t.pendingProps,n=_c(ye.current).createElement(l),n[yt]=t,n[Rt]=e,St(n,l,e),pt(n),t.stateNode=n):t.memoizedState=rp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return es(t),e===null&&Te&&(n=t.stateNode=ip(t.type,t.pendingProps,ye.current),xt=t,tl=!0,i=Ye,pn(t.type)?(mu=i,Ye=nl(n.firstChild)):Ye=i),jt(e,t,t.pendingProps.children,l),Pi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((i=n=Ye)&&(n=hy(n,t.type,t.pendingProps,tl),n!==null?(t.stateNode=n,xt=t,Ye=nl(n.firstChild),tl=!1,i=!0):i=!1),i||en(t)),es(t),i=t.type,c=t.pendingProps,f=e!==null?e.memoizedProps:null,n=c.children,ru(i,c)?n=null:f!==null&&ru(i,f)&&(t.flags|=32),t.memoizedState!==null&&(i=or(e,t,kv,null,null,l),Qs._currentValue=i),Pi(e,t),jt(e,t,n,l),t.child;case 6:return e===null&&Te&&((e=l=Ye)&&(l=my(l,t.pendingProps,tl),l!==null?(t.stateNode=l,xt=t,Ye=null,e=!0):e=!1),e||en(t)),null;case 13:return Jh(e,t,l);case 4:return Et(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Bn(t,null,n,l):jt(e,t,n,l),t.child;case 11:return Hh(e,t,t.type,t.pendingProps,l);case 7:return jt(e,t,t.pendingProps,l),t.child;case 8:return jt(e,t,t.pendingProps.children,l),t.child;case 12:return jt(e,t,t.pendingProps.children,l),t.child;case 10:return n=t.pendingProps,tn(t,t.type,n.value),jt(e,t,n.children,l),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,Ln(t),i=bt(i),n=n(i),t.flags|=1,jt(e,t,n,l),t.child;case 14:return qh(e,t,t.type,t.pendingProps,l);case 15:return Gh(e,t,t.type,t.pendingProps,l);case 19:return Wh(e,t,l);case 31:return Ov(e,t,l);case 22:return Qh(e,t,l,t.pendingProps);case 24:return Ln(t),n=bt(ot),e===null?(i=Io(),i===null&&(i=qe,c=Fo(),i.pooledCache=c,c.refCount++,c!==null&&(i.pooledCacheLanes|=l),i=c),t.memoizedState={parent:n,cache:i},er(t),tn(t,ot,i)):((e.lanes&l)!==0&&(tr(e,t),Ss(t,null,null,l),js()),i=e.memoizedState,c=t.memoizedState,i.parent!==n?(i={parent:n,cache:n},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),tn(t,ot,n)):(n=c.cache,tn(t,ot,n),n!==i.cache&&Jo(t,[ot],l,!0))),jt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Ol(e){e.flags|=4}function Or(e,t,l,n,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(wm())e.flags|=8192;else throw Un=Ui,Po}else e.flags&=-16777217}function Ph(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!mp(t))if(wm())e.flags|=8192;else throw Un=Ui,Po}function tc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Cd():536870912,e.lanes|=t,Aa|=t)}function As(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Ve(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,n=0;if(t)for(var i=e.child;i!==null;)l|=i.lanes|i.childLanes,n|=i.subtreeFlags&65011712,n|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)l|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=l,t}function Uv(e,t,l){var n=t.pendingProps;switch(Yo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ve(t),null;case 1:return Ve(t),null;case 3:return l=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Dl(ot),lt(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(_a(t)?Ol(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xo())),Ve(t),null;case 26:var i=t.type,c=t.memoizedState;return e===null?(Ol(t),c!==null?(Ve(t),Ph(t,c)):(Ve(t),Or(t,i,null,n,l))):c?c!==e.memoizedState?(Ol(t),Ve(t),Ph(t,c)):(Ve(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Ol(t),Ve(t),Or(t,i,e,n,l)),null;case 27:if(fi(t),l=ye.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Ol(t);else{if(!n){if(t.stateNode===null)throw Error(r(166));return Ve(t),null}e=ee.current,_a(t)?Df(t):(e=ip(i,n,l),t.stateNode=e,Ol(t))}return Ve(t),null;case 5:if(fi(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Ol(t);else{if(!n){if(t.stateNode===null)throw Error(r(166));return Ve(t),null}if(c=ee.current,_a(t))Df(t);else{var f=_c(ye.current);switch(c){case 1:c=f.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:c=f.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":c=f.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":c=f.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":c=f.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof n.is=="string"?f.createElement("select",{is:n.is}):f.createElement("select"),n.multiple?c.multiple=!0:n.size&&(c.size=n.size);break;default:c=typeof n.is=="string"?f.createElement(i,{is:n.is}):f.createElement(i)}}c[yt]=t,c[Rt]=n;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)c.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=c;e:switch(St(c,i,n),i){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Ol(t)}}return Ve(t),Or(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Ol(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(r(166));if(e=ye.current,_a(t)){if(e=t.stateNode,l=t.memoizedProps,n=null,i=xt,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}e[yt]=t,e=!!(e.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||Jm(e.nodeValue,l)),e||en(t,!0)}else e=_c(e).createTextNode(n),e[yt]=t,t.stateNode=e}return Ve(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(n=_a(t),l!==null){if(e===null){if(!n)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[yt]=t}else Mn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),e=!1}else l=Xo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Qt(t),t):(Qt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ve(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=_a(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(r(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));i[yt]=t}else Mn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),i=!1}else i=Xo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Qt(t),t):(Qt(t),null)}return Qt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=n!==null,e=e!==null&&e.memoizedState!==null,l&&(n=t.child,i=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(i=n.alternate.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==i&&(n.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),tc(t,t.updateQueue),Ve(t),null);case 4:return lt(),e===null&&au(t.stateNode.containerInfo),Ve(t),null;case 10:return Dl(t.type),Ve(t),null;case 19:if(O(nt),n=t.memoizedState,n===null)return Ve(t),null;if(i=(t.flags&128)!==0,c=n.rendering,c===null)if(i)As(n,!1);else{if(Pe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Gi(e),c!==null){for(t.flags|=128,As(n,!1),e=c.updateQueue,t.updateQueue=e,tc(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Ef(l,e),l=l.sibling;return J(nt,nt.current&1|2),Te&&Rl(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&zt()>ic&&(t.flags|=128,i=!0,As(n,!1),t.lanes=4194304)}else{if(!i)if(e=Gi(c),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,tc(t,e),As(n,!0),n.tail===null&&n.tailMode==="hidden"&&!c.alternate&&!Te)return Ve(t),null}else 2*zt()-n.renderingStartTime>ic&&l!==536870912&&(t.flags|=128,i=!0,As(n,!1),t.lanes=4194304);n.isBackwards?(c.sibling=t.child,t.child=c):(e=n.last,e!==null?e.sibling=c:t.child=c,n.last=c)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=zt(),e.sibling=null,l=nt.current,J(nt,i?l&1|2:l&1),Te&&Rl(t,n.treeForkCount),e):(Ve(t),null);case 22:case 23:return Qt(t),sr(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(l&536870912)!==0&&(t.flags&128)===0&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(t),l=t.updateQueue,l!==null&&tc(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==l&&(t.flags|=2048),e!==null&&O(On),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Dl(ot),Ve(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Bv(e,t){switch(Yo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Dl(ot),lt(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fi(t),null;case 31:if(t.memoizedState!==null){if(Qt(t),t.alternate===null)throw Error(r(340));Mn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Qt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Mn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(nt),null;case 4:return lt(),null;case 10:return Dl(t.type),null;case 22:case 23:return Qt(t),sr(),e!==null&&O(On),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Dl(ot),null;case 25:return null;default:return null}}function em(e,t){switch(Yo(t),t.tag){case 3:Dl(ot),lt();break;case 26:case 27:case 5:fi(t);break;case 4:lt();break;case 31:t.memoizedState!==null&&Qt(t);break;case 13:Qt(t);break;case 19:O(nt);break;case 10:Dl(t.type);break;case 22:case 23:Qt(t),sr(),e!==null&&O(On);break;case 24:Dl(ot)}}function Rs(e,t){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var i=n.next;l=i;do{if((l.tag&e)===e){n=void 0;var c=l.create,f=l.inst;n=c(),f.destroy=n}l=l.next}while(l!==i)}}catch(_){Oe(t,t.return,_)}}function on(e,t,l){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var c=i.next;n=c;do{if((n.tag&e)===e){var f=n.inst,_=f.destroy;if(_!==void 0){f.destroy=void 0,i=t;var j=l,A=_;try{A()}catch(U){Oe(i,j,U)}}}n=n.next}while(n!==c)}}catch(U){Oe(t,t.return,U)}}function tm(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Vf(t,l)}catch(n){Oe(e,e.return,n)}}}function lm(e,t,l){l.props=qn(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(n){Oe(e,t,n)}}function Cs(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof l=="function"?e.refCleanup=l(n):l.current=n}}catch(i){Oe(e,t,i)}}function xl(e,t){var l=e.ref,n=e.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(i){Oe(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(i){Oe(e,t,i)}else l.current=null}function nm(e){var t=e.type,l=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break e;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(i){Oe(e,e.return,i)}}function zr(e,t,l){try{var n=e.stateNode;cy(n,e.type,l,t),n[Rt]=t}catch(i){Oe(e,e.return,i)}}function am(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&pn(e.type)||e.tag===4}function Ur(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||am(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&&pn(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 Br(e,t,l){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=El));else if(n!==4&&(n===27&&pn(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Br(e,t,l),e=e.sibling;e!==null;)Br(e,t,l),e=e.sibling}function lc(e,t,l){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(n!==4&&(n===27&&pn(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(lc(e,t,l),e=e.sibling;e!==null;)lc(e,t,l),e=e.sibling}function sm(e){var t=e.stateNode,l=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);St(t,n,l),t[yt]=e,t[Rt]=l}catch(c){Oe(e,e.return,c)}}var zl=!1,dt=!1,Hr=!1,im=typeof WeakSet=="function"?WeakSet:Set,_t=null;function Hv(e,t){if(e=e.containerInfo,cu=Sc,e=vf(e),Mo(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var n=l.getSelection&&l.getSelection();if(n&&n.rangeCount!==0){l=n.anchorNode;var i=n.anchorOffset,c=n.focusNode;n=n.focusOffset;try{l.nodeType,c.nodeType}catch{l=null;break e}var f=0,_=-1,j=-1,A=0,U=0,H=e,R=null;t:for(;;){for(var $;H!==l||i!==0&&H.nodeType!==3||(_=f+i),H!==c||n!==0&&H.nodeType!==3||(j=f+n),H.nodeType===3&&(f+=H.nodeValue.length),($=H.firstChild)!==null;)R=H,H=$;for(;;){if(H===e)break t;if(R===l&&++A===i&&(_=f),R===c&&++U===n&&(j=f),($=H.nextSibling)!==null)break;H=R,R=H.parentNode}H=$}l=_===-1||j===-1?null:{start:_,end:j}}else l=null}l=l||{start:0,end:0}}else l=null;for(ou={focusedElem:e,selectionRange:l},Sc=!1,_t=t;_t!==null;)if(t=_t,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_t=e;else for(;_t!==null;){switch(t=_t,c=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(l=0;l<e.length;l++)i=e[l],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,l=t,i=c.memoizedProps,c=c.memoizedState,n=l.stateNode;try{var W=qn(l.type,i);e=n.getSnapshotBeforeUpdate(W,c),n.__reactInternalSnapshotBeforeUpdate=e}catch(ie){Oe(l,l.return,ie)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)du(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":du(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(r(163))}if(e=t.sibling,e!==null){e.return=t.return,_t=e;break}_t=t.return}}function cm(e,t,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:Bl(e,l),n&4&&Rs(5,l);break;case 1:if(Bl(e,l),n&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(f){Oe(l,l.return,f)}else{var i=qn(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){Oe(l,l.return,f)}}n&64&&tm(l),n&512&&Cs(l,l.return);break;case 3:if(Bl(e,l),n&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Vf(e,t)}catch(f){Oe(l,l.return,f)}}break;case 27:t===null&&n&4&&sm(l);case 26:case 5:Bl(e,l),t===null&&n&4&&nm(l),n&512&&Cs(l,l.return);break;case 12:Bl(e,l);break;case 31:Bl(e,l),n&4&&um(e,l);break;case 13:Bl(e,l),n&4&&dm(e,l),n&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Jv.bind(null,l),py(e,l))));break;case 22:if(n=l.memoizedState!==null||zl,!n){t=t!==null&&t.memoizedState!==null||dt,i=zl;var c=dt;zl=n,(dt=t)&&!c?Hl(e,l,(l.subtreeFlags&8772)!==0):Bl(e,l),zl=i,dt=c}break;case 30:break;default:Bl(e,l)}}function om(e){var t=e.alternate;t!==null&&(e.alternate=null,om(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&_o(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 Xe=null,Dt=!1;function Ul(e,t,l){for(l=l.child;l!==null;)rm(e,t,l),l=l.sibling}function rm(e,t,l){if(Ut&&typeof Ut.onCommitFiberUnmount=="function")try{Ut.onCommitFiberUnmount(ts,l)}catch{}switch(l.tag){case 26:dt||xl(l,t),Ul(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:dt||xl(l,t);var n=Xe,i=Dt;pn(l.type)&&(Xe=l.stateNode,Dt=!1),Ul(e,t,l),Hs(l.stateNode),Xe=n,Dt=i;break;case 5:dt||xl(l,t);case 6:if(n=Xe,i=Dt,Xe=null,Ul(e,t,l),Xe=n,Dt=i,Xe!==null)if(Dt)try{(Xe.nodeType===9?Xe.body:Xe.nodeName==="HTML"?Xe.ownerDocument.body:Xe).removeChild(l.stateNode)}catch(c){Oe(l,t,c)}else try{Xe.removeChild(l.stateNode)}catch(c){Oe(l,t,c)}break;case 18:Xe!==null&&(Dt?(e=Xe,tp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),za(e)):tp(Xe,l.stateNode));break;case 4:n=Xe,i=Dt,Xe=l.stateNode.containerInfo,Dt=!0,Ul(e,t,l),Xe=n,Dt=i;break;case 0:case 11:case 14:case 15:on(2,l,t),dt||on(4,l,t),Ul(e,t,l);break;case 1:dt||(xl(l,t),n=l.stateNode,typeof n.componentWillUnmount=="function"&&lm(l,t,n)),Ul(e,t,l);break;case 21:Ul(e,t,l);break;case 22:dt=(n=dt)||l.memoizedState!==null,Ul(e,t,l),dt=n;break;default:Ul(e,t,l)}}function um(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{za(e)}catch(l){Oe(t,t.return,l)}}}function dm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{za(e)}catch(l){Oe(t,t.return,l)}}function qv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new im),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new im),t;default:throw Error(r(435,e.tag))}}function nc(e,t){var l=qv(e);t.forEach(function(n){if(!l.has(n)){l.add(n);var i=Fv.bind(null,e,n);n.then(i,i)}})}function Mt(e,t){var l=t.deletions;if(l!==null)for(var n=0;n<l.length;n++){var i=l[n],c=e,f=t,_=f;e:for(;_!==null;){switch(_.tag){case 27:if(pn(_.type)){Xe=_.stateNode,Dt=!1;break e}break;case 5:Xe=_.stateNode,Dt=!1;break e;case 3:case 4:Xe=_.stateNode.containerInfo,Dt=!0;break e}_=_.return}if(Xe===null)throw Error(r(160));rm(c,f,i),Xe=null,Dt=!1,c=i.alternate,c!==null&&(c.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)fm(t,e),t=t.sibling}var ul=null;function fm(e,t){var l=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Mt(t,e),$t(e),n&4&&(on(3,e,e.return),Rs(3,e),on(5,e,e.return));break;case 1:Mt(t,e),$t(e),n&512&&(dt||l===null||xl(l,l.return)),n&64&&zl&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?n:l.concat(n))));break;case 26:var i=ul;if(Mt(t,e),$t(e),n&512&&(dt||l===null||xl(l,l.return)),n&4){var c=l!==null?l.memoizedState:null;if(n=e.memoizedState,l===null)if(n===null)if(e.stateNode===null){e:{n=e.type,l=e.memoizedProps,i=i.ownerDocument||i;t:switch(n){case"title":c=i.getElementsByTagName("title")[0],(!c||c[as]||c[yt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=i.createElement(n),i.head.insertBefore(c,i.querySelector("head > title"))),St(c,n,l),c[yt]=e,pt(c),n=c;break e;case"link":var f=fp("link","href",i).get(n+(l.href||""));if(f){for(var _=0;_<f.length;_++)if(c=f[_],c.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&c.getAttribute("rel")===(l.rel==null?null:l.rel)&&c.getAttribute("title")===(l.title==null?null:l.title)&&c.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){f.splice(_,1);break t}}c=i.createElement(n),St(c,n,l),i.head.appendChild(c);break;case"meta":if(f=fp("meta","content",i).get(n+(l.content||""))){for(_=0;_<f.length;_++)if(c=f[_],c.getAttribute("content")===(l.content==null?null:""+l.content)&&c.getAttribute("name")===(l.name==null?null:l.name)&&c.getAttribute("property")===(l.property==null?null:l.property)&&c.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&c.getAttribute("charset")===(l.charSet==null?null:l.charSet)){f.splice(_,1);break t}}c=i.createElement(n),St(c,n,l),i.head.appendChild(c);break;default:throw Error(r(468,n))}c[yt]=e,pt(c),n=c}e.stateNode=n}else hp(i,e.type,e.stateNode);else e.stateNode=dp(i,n,e.memoizedProps);else c!==n?(c===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):c.count--,n===null?hp(i,e.type,e.stateNode):dp(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&zr(e,e.memoizedProps,l.memoizedProps)}break;case 27:Mt(t,e),$t(e),n&512&&(dt||l===null||xl(l,l.return)),l!==null&&n&4&&zr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Mt(t,e),$t(e),n&512&&(dt||l===null||xl(l,l.return)),e.flags&32){i=e.stateNode;try{ia(i,"")}catch(W){Oe(e,e.return,W)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,zr(e,i,l!==null?l.memoizedProps:i)),n&1024&&(Hr=!0);break;case 6:if(Mt(t,e),$t(e),n&4){if(e.stateNode===null)throw Error(r(162));n=e.memoizedProps,l=e.stateNode;try{l.nodeValue=n}catch(W){Oe(e,e.return,W)}}break;case 3:if(yc=null,i=ul,ul=gc(t.containerInfo),Mt(t,e),ul=i,$t(e),n&4&&l!==null&&l.memoizedState.isDehydrated)try{za(t.containerInfo)}catch(W){Oe(e,e.return,W)}Hr&&(Hr=!1,hm(e));break;case 4:n=ul,ul=gc(e.stateNode.containerInfo),Mt(t,e),$t(e),ul=n;break;case 12:Mt(t,e),$t(e);break;case 31:Mt(t,e),$t(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,nc(e,n)));break;case 13:Mt(t,e),$t(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(sc=zt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,nc(e,n)));break;case 22:i=e.memoizedState!==null;var j=l!==null&&l.memoizedState!==null,A=zl,U=dt;if(zl=A||i,dt=U||j,Mt(t,e),dt=U,zl=A,$t(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(l===null||j||zl||dt||Gn(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){j=l=t;try{if(c=j.stateNode,i)f=c.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none";else{_=j.stateNode;var H=j.memoizedProps.style,R=H!=null&&H.hasOwnProperty("display")?H.display:null;_.style.display=R==null||typeof R=="boolean"?"":(""+R).trim()}}catch(W){Oe(j,j.return,W)}}}else if(t.tag===6){if(l===null){j=t;try{j.stateNode.nodeValue=i?"":j.memoizedProps}catch(W){Oe(j,j.return,W)}}}else if(t.tag===18){if(l===null){j=t;try{var $=j.stateNode;i?lp($,!0):lp(j.stateNode,!1)}catch(W){Oe(j,j.return,W)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,nc(e,l))));break;case 19:Mt(t,e),$t(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,nc(e,n)));break;case 30:break;case 21:break;default:Mt(t,e),$t(e)}}function $t(e){var t=e.flags;if(t&2){try{for(var l,n=e.return;n!==null;){if(am(n)){l=n;break}n=n.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var i=l.stateNode,c=Ur(e);lc(e,c,i);break;case 5:var f=l.stateNode;l.flags&32&&(ia(f,""),l.flags&=-33);var _=Ur(e);lc(e,_,f);break;case 3:case 4:var j=l.stateNode.containerInfo,A=Ur(e);Br(e,A,j);break;default:throw Error(r(161))}}catch(U){Oe(e,e.return,U)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function hm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;hm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Bl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)cm(e,t.alternate,t),t=t.sibling}function Gn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:on(4,t,t.return),Gn(t);break;case 1:xl(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&lm(t,t.return,l),Gn(t);break;case 27:Hs(t.stateNode);case 26:case 5:xl(t,t.return),Gn(t);break;case 22:t.memoizedState===null&&Gn(t);break;case 30:Gn(t);break;default:Gn(t)}e=e.sibling}}function Hl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,c=t,f=c.flags;switch(c.tag){case 0:case 11:case 15:Hl(i,c,l),Rs(4,c);break;case 1:if(Hl(i,c,l),n=c,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(A){Oe(n,n.return,A)}if(n=c,i=n.updateQueue,i!==null){var _=n.stateNode;try{var j=i.shared.hiddenCallbacks;if(j!==null)for(i.shared.hiddenCallbacks=null,i=0;i<j.length;i++)Yf(j[i],_)}catch(A){Oe(n,n.return,A)}}l&&f&64&&tm(c),Cs(c,c.return);break;case 27:sm(c);case 26:case 5:Hl(i,c,l),l&&n===null&&f&4&&nm(c),Cs(c,c.return);break;case 12:Hl(i,c,l);break;case 31:Hl(i,c,l),l&&f&4&&um(i,c);break;case 13:Hl(i,c,l),l&&f&4&&dm(i,c);break;case 22:c.memoizedState===null&&Hl(i,c,l),Cs(c,c.return);break;case 30:break;default:Hl(i,c,l)}t=t.sibling}}function qr(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&gs(l))}function Gr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&gs(e))}function dl(e,t,l,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)mm(e,t,l,n),t=t.sibling}function mm(e,t,l,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:dl(e,t,l,n),i&2048&&Rs(9,t);break;case 1:dl(e,t,l,n);break;case 3:dl(e,t,l,n),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&gs(e)));break;case 12:if(i&2048){dl(e,t,l,n),e=t.stateNode;try{var c=t.memoizedProps,f=c.id,_=c.onPostCommit;typeof _=="function"&&_(f,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){Oe(t,t.return,j)}}else dl(e,t,l,n);break;case 31:dl(e,t,l,n);break;case 13:dl(e,t,l,n);break;case 23:break;case 22:c=t.stateNode,f=t.alternate,t.memoizedState!==null?c._visibility&2?dl(e,t,l,n):Ds(e,t):c._visibility&2?dl(e,t,l,n):(c._visibility|=2,Ta(e,t,l,n,(t.subtreeFlags&10256)!==0||!1)),i&2048&&qr(f,t);break;case 24:dl(e,t,l,n),i&2048&&Gr(t.alternate,t);break;default:dl(e,t,l,n)}}function Ta(e,t,l,n,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,f=t,_=l,j=n,A=f.flags;switch(f.tag){case 0:case 11:case 15:Ta(c,f,_,j,i),Rs(8,f);break;case 23:break;case 22:var U=f.stateNode;f.memoizedState!==null?U._visibility&2?Ta(c,f,_,j,i):Ds(c,f):(U._visibility|=2,Ta(c,f,_,j,i)),i&&A&2048&&qr(f.alternate,f);break;case 24:Ta(c,f,_,j,i),i&&A&2048&&Gr(f.alternate,f);break;default:Ta(c,f,_,j,i)}t=t.sibling}}function Ds(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,n=t,i=n.flags;switch(n.tag){case 22:Ds(l,n),i&2048&&qr(n.alternate,n);break;case 24:Ds(l,n),i&2048&&Gr(n.alternate,n);break;default:Ds(l,n)}t=t.sibling}}var Ms=8192;function Ea(e,t,l){if(e.subtreeFlags&Ms)for(e=e.child;e!==null;)pm(e,t,l),e=e.sibling}function pm(e,t,l){switch(e.tag){case 26:Ea(e,t,l),e.flags&Ms&&e.memoizedState!==null&&Ey(l,ul,e.memoizedState,e.memoizedProps);break;case 5:Ea(e,t,l);break;case 3:case 4:var n=ul;ul=gc(e.stateNode.containerInfo),Ea(e,t,l),ul=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Ms,Ms=16777216,Ea(e,t,l),Ms=n):Ea(e,t,l));break;default:Ea(e,t,l)}}function _m(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 $s(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];_t=n,vm(n,e)}_m(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)gm(e),e=e.sibling}function gm(e){switch(e.tag){case 0:case 11:case 15:$s(e),e.flags&2048&&on(9,e,e.return);break;case 3:$s(e);break;case 12:$s(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ac(e)):$s(e);break;default:$s(e)}}function ac(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];_t=n,vm(n,e)}_m(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:on(8,t,t.return),ac(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,ac(t));break;default:ac(t)}e=e.sibling}}function vm(e,t){for(;_t!==null;){var l=_t;switch(l.tag){case 0:case 11:case 15:on(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:gs(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,_t=n;else e:for(l=e;_t!==null;){n=_t;var i=n.sibling,c=n.return;if(om(n),n===l){_t=null;break e}if(i!==null){i.return=c,_t=i;break e}_t=c}}}var Gv={getCacheForType:function(e){var t=bt(ot),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return bt(ot).controller.signal}},Qv=typeof WeakMap=="function"?WeakMap:Map,De=0,qe=null,xe=null,Se=0,Le=0,Yt=null,rn=!1,ka=!1,Qr=!1,ql=0,Pe=0,un=0,Qn=0,Yr=0,Vt=0,Aa=0,Ls=null,Lt=null,Vr=!1,sc=0,ym=0,ic=1/0,cc=null,dn=null,ht=0,fn=null,Ra=null,Gl=0,Xr=0,Kr=null,xm=null,Os=0,Zr=null;function Xt(){return(De&2)!==0&&Se!==0?Se&-Se:M.T!==null?eu():Ld()}function bm(){if(Vt===0)if((Se&536870912)===0||Te){var e=pi;pi<<=1,(pi&3932160)===0&&(pi=262144),Vt=e}else Vt=536870912;return e=Gt.current,e!==null&&(e.flags|=32),Vt}function Ot(e,t,l){(e===qe&&(Le===2||Le===9)||e.cancelPendingCommit!==null)&&(Ca(e,0),hn(e,Se,Vt,!1)),ns(e,l),((De&2)===0||e!==qe)&&(e===qe&&((De&2)===0&&(Qn|=l),Pe===4&&hn(e,Se,Vt,!1)),bl(e))}function jm(e,t,l){if((De&6)!==0)throw Error(r(327));var n=!l&&(t&127)===0&&(t&e.expiredLanes)===0||ls(e,t),i=n?Xv(e,t):Fr(e,t,!0),c=n;do{if(i===0){ka&&!n&&hn(e,t,0,!1);break}else{if(l=e.current.alternate,c&&!Yv(l)){i=Fr(e,t,!1),c=!1;continue}if(i===2){if(c=t,e.errorRecoveryDisabledLanes&c)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var _=e;i=Ls;var j=_.current.memoizedState.isDehydrated;if(j&&(Ca(_,f).flags|=256),f=Fr(_,f,!1),f!==2){if(Qr&&!j){_.errorRecoveryDisabledLanes|=c,Qn|=c,i=4;break e}c=Lt,Lt=i,c!==null&&(Lt===null?Lt=c:Lt.push.apply(Lt,c))}i=f}if(c=!1,i!==2)continue}}if(i===1){Ca(e,0),hn(e,t,0,!0);break}e:{switch(n=e,c=i,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:hn(n,t,Vt,!rn);break e;case 2:Lt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(i=sc+300-zt(),10<i)){if(hn(n,t,Vt,!rn),gi(n,0,!0)!==0)break e;Gl=t,n.timeoutHandle=Pm(Sm.bind(null,n,l,Lt,cc,Vr,t,Vt,Qn,Aa,rn,c,"Throttled",-0,0),i);break e}Sm(n,l,Lt,cc,Vr,t,Vt,Qn,Aa,rn,c,null,-0,0)}}break}while(!0);bl(e)}function Sm(e,t,l,n,i,c,f,_,j,A,U,H,R,$){if(e.timeoutHandle=-1,H=t.subtreeFlags,H&8192||(H&16785408)===16785408){H={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:El},pm(t,c,H);var W=(c&62914560)===c?sc-zt():(c&4194048)===c?ym-zt():0;if(W=ky(H,W),W!==null){Gl=c,e.cancelPendingCommit=W(Cm.bind(null,e,t,c,l,n,i,f,_,j,U,H,null,R,$)),hn(e,c,f,!A);return}}Cm(e,t,c,l,n,i,f,_,j)}function Yv(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var n=0;n<l.length;n++){var i=l[n],c=i.getSnapshot;i=i.value;try{if(!Ht(c(),i))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 hn(e,t,l,n){t&=~Yr,t&=~Qn,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var c=31-Bt(i),f=1<<c;n[c]=-1,i&=~f}l!==0&&Dd(e,l,t)}function oc(){return(De&6)===0?(zs(0),!1):!0}function Jr(){if(xe!==null){if(Le===0)var e=xe.return;else e=xe,Cl=$n=null,dr(e),ba=null,ys=0,e=xe;for(;e!==null;)em(e.alternate,e),e=e.return;xe=null}}function Ca(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,uy(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Gl=0,Jr(),qe=e,xe=l=Al(e.current,null),Se=t,Le=0,Yt=null,rn=!1,ka=ls(e,t),Qr=!1,Aa=Vt=Yr=Qn=un=Pe=0,Lt=Ls=null,Vr=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var i=31-Bt(n),c=1<<i;t|=e[i],n&=~c}return ql=t,Ai(),l}function Nm(e,t){fe=null,M.H=Es,t===xa||t===zi?(t=Hf(),Le=3):t===Po?(t=Hf(),Le=4):Le=t===Er?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Yt=t,xe===null&&(Pe=1,Wi(e,It(t,e.current)))}function wm(){var e=Gt.current;return e===null?!0:(Se&4194048)===Se?ll===null:(Se&62914560)===Se||(Se&536870912)!==0?e===ll:!1}function Tm(){var e=M.H;return M.H=Es,e===null?Es:e}function Em(){var e=M.A;return M.A=Gv,e}function rc(){Pe=4,rn||(Se&4194048)!==Se&&Gt.current!==null||(ka=!0),(un&134217727)===0&&(Qn&134217727)===0||qe===null||hn(qe,Se,Vt,!1)}function Fr(e,t,l){var n=De;De|=2;var i=Tm(),c=Em();(qe!==e||Se!==t)&&(cc=null,Ca(e,t)),t=!1;var f=Pe;e:do try{if(Le!==0&&xe!==null){var _=xe,j=Yt;switch(Le){case 8:Jr(),f=6;break e;case 3:case 2:case 9:case 6:Gt.current===null&&(t=!0);var A=Le;if(Le=0,Yt=null,Da(e,_,j,A),l&&ka){f=0;break e}break;default:A=Le,Le=0,Yt=null,Da(e,_,j,A)}}Vv(),f=Pe;break}catch(U){Nm(e,U)}while(!0);return t&&e.shellSuspendCounter++,Cl=$n=null,De=n,M.H=i,M.A=c,xe===null&&(qe=null,Se=0,Ai()),f}function Vv(){for(;xe!==null;)km(xe)}function Xv(e,t){var l=De;De|=2;var n=Tm(),i=Em();qe!==e||Se!==t?(cc=null,ic=zt()+500,Ca(e,t)):ka=ls(e,t);e:do try{if(Le!==0&&xe!==null){t=xe;var c=Yt;t:switch(Le){case 1:Le=0,Yt=null,Da(e,t,c,1);break;case 2:case 9:if(Uf(c)){Le=0,Yt=null,Am(t);break}t=function(){Le!==2&&Le!==9||qe!==e||(Le=7),bl(e)},c.then(t,t);break e;case 3:Le=7;break e;case 4:Le=5;break e;case 7:Uf(c)?(Le=0,Yt=null,Am(t)):(Le=0,Yt=null,Da(e,t,c,7));break;case 5:var f=null;switch(xe.tag){case 26:f=xe.memoizedState;case 5:case 27:var _=xe;if(f?mp(f):_.stateNode.complete){Le=0,Yt=null;var j=_.sibling;if(j!==null)xe=j;else{var A=_.return;A!==null?(xe=A,uc(A)):xe=null}break t}}Le=0,Yt=null,Da(e,t,c,5);break;case 6:Le=0,Yt=null,Da(e,t,c,6);break;case 8:Jr(),Pe=6;break e;default:throw Error(r(462))}}Kv();break}catch(U){Nm(e,U)}while(!0);return Cl=$n=null,M.H=n,M.A=i,De=l,xe!==null?0:(qe=null,Se=0,Ai(),Pe)}function Kv(){for(;xe!==null&&!_g();)km(xe)}function km(e){var t=Ih(e.alternate,e,ql);e.memoizedProps=e.pendingProps,t===null?uc(e):xe=t}function Am(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Xh(l,t,t.pendingProps,t.type,void 0,Se);break;case 11:t=Xh(l,t,t.pendingProps,t.type.render,t.ref,Se);break;case 5:dr(t);default:em(l,t),t=xe=Ef(t,ql),t=Ih(l,t,ql)}e.memoizedProps=e.pendingProps,t===null?uc(e):xe=t}function Da(e,t,l,n){Cl=$n=null,dr(t),ba=null,ys=0;var i=t.return;try{if(Lv(e,i,t,l,Se)){Pe=1,Wi(e,It(l,e.current)),xe=null;return}}catch(c){if(i!==null)throw xe=i,c;Pe=1,Wi(e,It(l,e.current)),xe=null;return}t.flags&32768?(Te||n===1?e=!0:ka||(Se&536870912)!==0?e=!1:(rn=e=!0,(n===2||n===9||n===3||n===6)&&(n=Gt.current,n!==null&&n.tag===13&&(n.flags|=16384))),Rm(t,e)):uc(t)}function uc(e){var t=e;do{if((t.flags&32768)!==0){Rm(t,rn);return}e=t.return;var l=Uv(t.alternate,t,ql);if(l!==null){xe=l;return}if(t=t.sibling,t!==null){xe=t;return}xe=t=e}while(t!==null);Pe===0&&(Pe=5)}function Rm(e,t){do{var l=Bv(e.alternate,e);if(l!==null){l.flags&=32767,xe=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){xe=e;return}xe=e=l}while(e!==null);Pe=6,xe=null}function Cm(e,t,l,n,i,c,f,_,j){e.cancelPendingCommit=null;do dc();while(ht!==0);if((De&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(c=t.lanes|t.childLanes,c|=Uo,Tg(e,l,c,f,_,j),e===qe&&(xe=qe=null,Se=0),Ra=t,fn=e,Gl=l,Xr=c,Kr=i,xm=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Wv(hi,function(){return Om(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=M.T,M.T=null,i=X.p,X.p=2,f=De,De|=4;try{Hv(e,t,l)}finally{De=f,X.p=i,M.T=n}}ht=1,Dm(),Mm(),$m()}}function Dm(){if(ht===1){ht=0;var e=fn,t=Ra,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=M.T,M.T=null;var n=X.p;X.p=2;var i=De;De|=4;try{fm(t,e);var c=ou,f=vf(e.containerInfo),_=c.focusedElem,j=c.selectionRange;if(f!==_&&_&&_.ownerDocument&&gf(_.ownerDocument.documentElement,_)){if(j!==null&&Mo(_)){var A=j.start,U=j.end;if(U===void 0&&(U=A),"selectionStart"in _)_.selectionStart=A,_.selectionEnd=Math.min(U,_.value.length);else{var H=_.ownerDocument||document,R=H&&H.defaultView||window;if(R.getSelection){var $=R.getSelection(),W=_.textContent.length,ie=Math.min(j.start,W),He=j.end===void 0?ie:Math.min(j.end,W);!$.extend&&ie>He&&(f=He,He=ie,ie=f);var E=_f(_,ie),N=_f(_,He);if(E&&N&&($.rangeCount!==1||$.anchorNode!==E.node||$.anchorOffset!==E.offset||$.focusNode!==N.node||$.focusOffset!==N.offset)){var k=H.createRange();k.setStart(E.node,E.offset),$.removeAllRanges(),ie>He?($.addRange(k),$.extend(N.node,N.offset)):(k.setEnd(N.node,N.offset),$.addRange(k))}}}}for(H=[],$=_;$=$.parentNode;)$.nodeType===1&&H.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<H.length;_++){var B=H[_];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}Sc=!!cu,ou=cu=null}finally{De=i,X.p=n,M.T=l}}e.current=t,ht=2}}function Mm(){if(ht===2){ht=0;var e=fn,t=Ra,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=M.T,M.T=null;var n=X.p;X.p=2;var i=De;De|=4;try{cm(e,t.alternate,t)}finally{De=i,X.p=n,M.T=l}}ht=3}}function $m(){if(ht===4||ht===3){ht=0,gg();var e=fn,t=Ra,l=Gl,n=xm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ht=5:(ht=0,Ra=fn=null,Lm(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(dn=null),mo(l),t=t.stateNode,Ut&&typeof Ut.onCommitFiberRoot=="function")try{Ut.onCommitFiberRoot(ts,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=M.T,i=X.p,X.p=2,M.T=null;try{for(var c=e.onRecoverableError,f=0;f<n.length;f++){var _=n[f];c(_.value,{componentStack:_.stack})}}finally{M.T=t,X.p=i}}(Gl&3)!==0&&dc(),bl(e),i=e.pendingLanes,(l&261930)!==0&&(i&42)!==0?e===Zr?Os++:(Os=0,Zr=e):Os=0,zs(0)}}function Lm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,gs(t)))}function dc(){return Dm(),Mm(),$m(),Om()}function Om(){if(ht!==5)return!1;var e=fn,t=Xr;Xr=0;var l=mo(Gl),n=M.T,i=X.p;try{X.p=32>l?32:l,M.T=null,l=Kr,Kr=null;var c=fn,f=Gl;if(ht=0,Ra=fn=null,Gl=0,(De&6)!==0)throw Error(r(331));var _=De;if(De|=4,gm(c.current),mm(c,c.current,f,l),De=_,zs(0,!1),Ut&&typeof Ut.onPostCommitFiberRoot=="function")try{Ut.onPostCommitFiberRoot(ts,c)}catch{}return!0}finally{X.p=i,M.T=n,Lm(e,t)}}function zm(e,t,l){t=It(l,t),t=Tr(e.stateNode,t,2),e=an(e,t,2),e!==null&&(ns(e,2),bl(e))}function Oe(e,t,l){if(e.tag===3)zm(e,e,l);else for(;t!==null;){if(t.tag===3){zm(t,e,l);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(dn===null||!dn.has(n))){e=It(l,e),l=Uh(2),n=an(t,l,2),n!==null&&(Bh(l,n,t,e),ns(n,2),bl(n));break}}t=t.return}}function Wr(e,t,l){var n=e.pingCache;if(n===null){n=e.pingCache=new Qv;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(l)||(Qr=!0,i.add(l),e=Zv.bind(null,e,t,l),t.then(e,e))}function Zv(e,t,l){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,qe===e&&(Se&l)===l&&(Pe===4||Pe===3&&(Se&62914560)===Se&&300>zt()-sc?(De&2)===0&&Ca(e,0):Yr|=l,Aa===Se&&(Aa=0)),bl(e)}function Um(e,t){t===0&&(t=Cd()),e=Cn(e,t),e!==null&&(ns(e,t),bl(e))}function Jv(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Um(e,l)}function Fv(e,t){var l=0;switch(e.tag){case 31:case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(l=i.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(r(314))}n!==null&&n.delete(t),Um(e,l)}function Wv(e,t){return ro(e,t)}var fc=null,Ma=null,Ir=!1,hc=!1,Pr=!1,mn=0;function bl(e){e!==Ma&&e.next===null&&(Ma===null?fc=Ma=e:Ma=Ma.next=e),hc=!0,Ir||(Ir=!0,Pv())}function zs(e,t){if(!Pr&&hc){Pr=!0;do for(var l=!1,n=fc;n!==null;){if(e!==0){var i=n.pendingLanes;if(i===0)var c=0;else{var f=n.suspendedLanes,_=n.pingedLanes;c=(1<<31-Bt(42|e)+1)-1,c&=i&~(f&~_),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(l=!0,Gm(n,c))}else c=Se,c=gi(n,n===qe?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(c&3)===0||ls(n,c)||(l=!0,Gm(n,c));n=n.next}while(l);Pr=!1}}function Iv(){Bm()}function Bm(){hc=Ir=!1;var e=0;mn!==0&&ry()&&(e=mn);for(var t=zt(),l=null,n=fc;n!==null;){var i=n.next,c=Hm(n,t);c===0?(n.next=null,l===null?fc=i:l.next=i,i===null&&(Ma=l)):(l=n,(e!==0||(c&3)!==0)&&(hc=!0)),n=i}ht!==0&&ht!==5||zs(e),mn!==0&&(mn=0)}function Hm(e,t){for(var l=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var f=31-Bt(c),_=1<<f,j=i[f];j===-1?((_&l)===0||(_&n)!==0)&&(i[f]=wg(_,t)):j<=t&&(e.expiredLanes|=_),c&=~_}if(t=qe,l=Se,l=gi(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,l===0||e===t&&(Le===2||Le===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&uo(n),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||ls(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(n!==null&&uo(n),mo(l)){case 2:case 8:l=Ad;break;case 32:l=hi;break;case 268435456:l=Rd;break;default:l=hi}return n=qm.bind(null,e),l=ro(l,n),e.callbackPriority=t,e.callbackNode=l,t}return n!==null&&n!==null&&uo(n),e.callbackPriority=2,e.callbackNode=null,2}function qm(e,t){if(ht!==0&&ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(dc()&&e.callbackNode!==l)return null;var n=Se;return n=gi(e,e===qe?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(jm(e,n,t),Hm(e,zt()),e.callbackNode!=null&&e.callbackNode===l?qm.bind(null,e):null)}function Gm(e,t){if(dc())return null;jm(e,t,!0)}function Pv(){dy(function(){(De&6)!==0?ro(kd,Iv):Bm()})}function eu(){if(mn===0){var e=va;e===0&&(e=mi,mi<<=1,(mi&261888)===0&&(mi=256)),mn=e}return mn}function Qm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:bi(""+e)}function Ym(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function ey(e,t,l,n,i){if(t==="submit"&&l&&l.stateNode===i){var c=Qm((i[Rt]||null).action),f=n.submitter;f&&(t=(t=f[Rt]||null)?Qm(t.formAction):f.getAttribute("formAction"),t!==null&&(c=t,f=null));var _=new wi("action","action",null,n,i);e.push({event:_,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(mn!==0){var j=f?Ym(i,f):new FormData(i);xr(l,{pending:!0,data:j,method:i.method,action:c},null,j)}}else typeof c=="function"&&(_.preventDefault(),j=f?Ym(i,f):new FormData(i),xr(l,{pending:!0,data:j,method:i.method,action:c},c,j))},currentTarget:i}]})}}for(var tu=0;tu<zo.length;tu++){var lu=zo[tu],ty=lu.toLowerCase(),ly=lu[0].toUpperCase()+lu.slice(1);rl(ty,"on"+ly)}rl(bf,"onAnimationEnd"),rl(jf,"onAnimationIteration"),rl(Sf,"onAnimationStart"),rl("dblclick","onDoubleClick"),rl("focusin","onFocus"),rl("focusout","onBlur"),rl(vv,"onTransitionRun"),rl(yv,"onTransitionStart"),rl(xv,"onTransitionCancel"),rl(Nf,"onTransitionEnd"),aa("onMouseEnter",["mouseout","mouseover"]),aa("onMouseLeave",["mouseout","mouseover"]),aa("onPointerEnter",["pointerout","pointerover"]),aa("onPointerLeave",["pointerout","pointerover"]),En("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),En("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),En("onBeforeInput",["compositionend","keypress","textInput","paste"]),En("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),En("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),En("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Us="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(" "),ny=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Us));function Vm(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var n=e[l],i=n.event;n=n.listeners;e:{var c=void 0;if(t)for(var f=n.length-1;0<=f;f--){var _=n[f],j=_.instance,A=_.currentTarget;if(_=_.listener,j!==c&&i.isPropagationStopped())break e;c=_,i.currentTarget=A;try{c(i)}catch(U){ki(U)}i.currentTarget=null,c=j}else for(f=0;f<n.length;f++){if(_=n[f],j=_.instance,A=_.currentTarget,_=_.listener,j!==c&&i.isPropagationStopped())break e;c=_,i.currentTarget=A;try{c(i)}catch(U){ki(U)}i.currentTarget=null,c=j}}}}function be(e,t){var l=t[po];l===void 0&&(l=t[po]=new Set);var n=e+"__bubble";l.has(n)||(Xm(t,e,2,!1),l.add(n))}function nu(e,t,l){var n=0;t&&(n|=4),Xm(l,e,n,t)}var mc="_reactListening"+Math.random().toString(36).slice(2);function au(e){if(!e[mc]){e[mc]=!0,Ud.forEach(function(l){l!=="selectionchange"&&(ny.has(l)||nu(l,!1,e),nu(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[mc]||(t[mc]=!0,nu("selectionchange",!1,t))}}function Xm(e,t,l,n){switch(bp(t)){case 2:var i=Cy;break;case 8:i=Dy;break;default:i=yu}l=i.bind(null,t,l,e),i=void 0,!No||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,l,{capture:!0,passive:i}):e.addEventListener(t,l,!0):i!==void 0?e.addEventListener(t,l,{passive:i}):e.addEventListener(t,l,!1)}function su(e,t,l,n,i){var c=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var f=n.tag;if(f===3||f===4){var _=n.stateNode.containerInfo;if(_===i)break;if(f===4)for(f=n.return;f!==null;){var j=f.tag;if((j===3||j===4)&&f.stateNode.containerInfo===i)return;f=f.return}for(;_!==null;){if(f=ta(_),f===null)return;if(j=f.tag,j===5||j===6||j===26||j===27){n=c=f;continue e}_=_.parentNode}}n=n.return}Fd(function(){var A=c,U=jo(l),H=[];e:{var R=wf.get(e);if(R!==void 0){var $=wi,W=e;switch(e){case"keypress":if(Si(l)===0)break e;case"keydown":case"keyup":$=Fg;break;case"focusin":W="focus",$=ko;break;case"focusout":W="blur",$=ko;break;case"beforeblur":case"afterblur":$=ko;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":$=Pd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=Ug;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=Pg;break;case bf:case jf:case Sf:$=qg;break;case Nf:$=tv;break;case"scroll":case"scrollend":$=Og;break;case"wheel":$=nv;break;case"copy":case"cut":case"paste":$=Qg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=tf;break;case"toggle":case"beforetoggle":$=sv}var ie=(t&4)!==0,He=!ie&&(e==="scroll"||e==="scrollend"),E=ie?R!==null?R+"Capture":null:R;ie=[];for(var N=A,k;N!==null;){var B=N;if(k=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||k===null||E===null||(B=is(N,E),B!=null&&ie.push(Bs(N,B,k))),He)break;N=N.return}0<ie.length&&(R=new $(R,W,null,l,U),H.push({event:R,listeners:ie}))}}if((t&7)===0){e:{if(R=e==="mouseover"||e==="pointerover",$=e==="mouseout"||e==="pointerout",R&&l!==bo&&(W=l.relatedTarget||l.fromElement)&&(ta(W)||W[ea]))break e;if(($||R)&&(R=U.window===U?U:(R=U.ownerDocument)?R.defaultView||R.parentWindow:window,$?(W=l.relatedTarget||l.toElement,$=A,W=W?ta(W):null,W!==null&&(He=h(W),ie=W.tag,W!==He||ie!==5&&ie!==27&&ie!==6)&&(W=null)):($=null,W=A),$!==W)){if(ie=Pd,B="onMouseLeave",E="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(ie=tf,B="onPointerLeave",E="onPointerEnter",N="pointer"),He=$==null?R:ss($),k=W==null?R:ss(W),R=new ie(B,N+"leave",$,l,U),R.target=He,R.relatedTarget=k,B=null,ta(U)===A&&(ie=new ie(E,N+"enter",W,l,U),ie.target=k,ie.relatedTarget=He,B=ie),He=B,$&&W)t:{for(ie=ay,E=$,N=W,k=0,B=E;B;B=ie(B))k++;B=0;for(var ae=N;ae;ae=ie(ae))B++;for(;0<k-B;)E=ie(E),k--;for(;0<B-k;)N=ie(N),B--;for(;k--;){if(E===N||N!==null&&E===N.alternate){ie=E;break t}E=ie(E),N=ie(N)}ie=null}else ie=null;$!==null&&Km(H,R,$,ie,!1),W!==null&&He!==null&&Km(H,He,W,ie,!0)}}e:{if(R=A?ss(A):window,$=R.nodeName&&R.nodeName.toLowerCase(),$==="select"||$==="input"&&R.type==="file")var Ee=uf;else if(of(R))if(df)Ee=pv;else{Ee=hv;var te=fv}else $=R.nodeName,!$||$.toLowerCase()!=="input"||R.type!=="checkbox"&&R.type!=="radio"?A&&xo(A.elementType)&&(Ee=uf):Ee=mv;if(Ee&&(Ee=Ee(e,A))){rf(H,Ee,l,U);break e}te&&te(e,R,A),e==="focusout"&&A&&R.type==="number"&&A.memoizedProps.value!=null&&yo(R,"number",R.value)}switch(te=A?ss(A):window,e){case"focusin":(of(te)||te.contentEditable==="true")&&(ua=te,$o=A,ms=null);break;case"focusout":ms=$o=ua=null;break;case"mousedown":Lo=!0;break;case"contextmenu":case"mouseup":case"dragend":Lo=!1,yf(H,l,U);break;case"selectionchange":if(gv)break;case"keydown":case"keyup":yf(H,l,U)}var he;if(Ro)e:{switch(e){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else ra?sf(e,l)&&(Ne="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Ne="onCompositionStart");Ne&&(lf&&l.locale!=="ko"&&(ra||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&ra&&(he=Wd()):(Wl=U,wo="value"in Wl?Wl.value:Wl.textContent,ra=!0)),te=pc(A,Ne),0<te.length&&(Ne=new ef(Ne,e,null,l,U),H.push({event:Ne,listeners:te}),he?Ne.data=he:(he=cf(l),he!==null&&(Ne.data=he)))),(he=cv?ov(e,l):rv(e,l))&&(Ne=pc(A,"onBeforeInput"),0<Ne.length&&(te=new ef("onBeforeInput","beforeinput",null,l,U),H.push({event:te,listeners:Ne}),te.data=he)),ey(H,e,A,l,U)}Vm(H,t)})}function Bs(e,t,l){return{instance:e,listener:t,currentTarget:l}}function pc(e,t){for(var l=t+"Capture",n=[];e!==null;){var i=e,c=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||c===null||(i=is(e,l),i!=null&&n.unshift(Bs(e,i,c)),i=is(e,t),i!=null&&n.push(Bs(e,i,c))),e.tag===3)return n;e=e.return}return[]}function ay(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Km(e,t,l,n,i){for(var c=t._reactName,f=[];l!==null&&l!==n;){var _=l,j=_.alternate,A=_.stateNode;if(_=_.tag,j!==null&&j===n)break;_!==5&&_!==26&&_!==27||A===null||(j=A,i?(A=is(l,c),A!=null&&f.unshift(Bs(l,A,j))):i||(A=is(l,c),A!=null&&f.push(Bs(l,A,j)))),l=l.return}f.length!==0&&e.push({event:t,listeners:f})}var sy=/\r\n?/g,iy=/\u0000|\uFFFD/g;function Zm(e){return(typeof e=="string"?e:""+e).replace(sy,`
|
|
49
|
+
`).replace(iy,"")}function Jm(e,t){return t=Zm(t),Zm(e)===t}function Be(e,t,l,n,i,c){switch(l){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||ia(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&ia(e,""+n);break;case"className":yi(e,"class",n);break;case"tabIndex":yi(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":yi(e,l,n);break;case"style":Zd(e,n,c);break;case"data":if(t!=="object"){yi(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=bi(""+n),e.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(l==="formAction"?(t!=="input"&&Be(e,t,"name",i.name,i,null),Be(e,t,"formEncType",i.formEncType,i,null),Be(e,t,"formMethod",i.formMethod,i,null),Be(e,t,"formTarget",i.formTarget,i,null)):(Be(e,t,"encType",i.encType,i,null),Be(e,t,"method",i.method,i,null),Be(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=bi(""+n),e.setAttribute(l,n);break;case"onClick":n!=null&&(e.onclick=El);break;case"onScroll":n!=null&&be("scroll",e);break;case"onScrollEnd":n!=null&&be("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(r(61));if(l=n.__html,l!=null){if(i.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}l=bi(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""+n):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":n===!0?e.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,n):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(l,n):e.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(l):e.setAttribute(l,n);break;case"popover":be("beforetoggle",e),be("toggle",e),vi(e,"popover",n);break;case"xlinkActuate":Tl(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Tl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Tl(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Tl(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Tl(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Tl(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Tl(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Tl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Tl(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":vi(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=$g.get(l)||l,vi(e,l,n))}}function iu(e,t,l,n,i,c){switch(l){case"style":Zd(e,n,c);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(r(61));if(l=n.__html,l!=null){if(i.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof n=="string"?ia(e,n):(typeof n=="number"||typeof n=="bigint")&&ia(e,""+n);break;case"onScroll":n!=null&&be("scroll",e);break;case"onScrollEnd":n!=null&&be("scrollend",e);break;case"onClick":n!=null&&(e.onclick=El);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Bd.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(i=l.endsWith("Capture"),t=l.slice(2,i?l.length-7:void 0),c=e[Rt]||null,c=c!=null?c[l]:null,typeof c=="function"&&e.removeEventListener(t,c,i),typeof n=="function")){typeof c!="function"&&c!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,n,i);break e}l in e?e[l]=n:n===!0?e.setAttribute(l,""):vi(e,l,n)}}}function St(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":be("error",e),be("load",e);var n=!1,i=!1,c;for(c in l)if(l.hasOwnProperty(c)){var f=l[c];if(f!=null)switch(c){case"src":n=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Be(e,t,c,f,l,null)}}i&&Be(e,t,"srcSet",l.srcSet,l,null),n&&Be(e,t,"src",l.src,l,null);return;case"input":be("invalid",e);var _=c=f=i=null,j=null,A=null;for(n in l)if(l.hasOwnProperty(n)){var U=l[n];if(U!=null)switch(n){case"name":i=U;break;case"type":f=U;break;case"checked":j=U;break;case"defaultChecked":A=U;break;case"value":c=U;break;case"defaultValue":_=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,t));break;default:Be(e,t,n,U,l,null)}}Yd(e,c,_,j,A,f,i,!1);return;case"select":be("invalid",e),n=f=c=null;for(i in l)if(l.hasOwnProperty(i)&&(_=l[i],_!=null))switch(i){case"value":c=_;break;case"defaultValue":f=_;break;case"multiple":n=_;default:Be(e,t,i,_,l,null)}t=c,l=f,e.multiple=!!n,t!=null?sa(e,!!n,t,!1):l!=null&&sa(e,!!n,l,!0);return;case"textarea":be("invalid",e),c=i=n=null;for(f in l)if(l.hasOwnProperty(f)&&(_=l[f],_!=null))switch(f){case"value":n=_;break;case"defaultValue":i=_;break;case"children":c=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(91));break;default:Be(e,t,f,_,l,null)}Xd(e,n,i,c);return;case"option":for(j in l)if(l.hasOwnProperty(j)&&(n=l[j],n!=null))switch(j){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:Be(e,t,j,n,l,null)}return;case"dialog":be("beforetoggle",e),be("toggle",e),be("cancel",e),be("close",e);break;case"iframe":case"object":be("load",e);break;case"video":case"audio":for(n=0;n<Us.length;n++)be(Us[n],e);break;case"image":be("error",e),be("load",e);break;case"details":be("toggle",e);break;case"embed":case"source":case"link":be("error",e),be("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 l)if(l.hasOwnProperty(A)&&(n=l[A],n!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Be(e,t,A,n,l,null)}return;default:if(xo(t)){for(U in l)l.hasOwnProperty(U)&&(n=l[U],n!==void 0&&iu(e,t,U,n,l,void 0));return}}for(_ in l)l.hasOwnProperty(_)&&(n=l[_],n!=null&&Be(e,t,_,n,l,null))}function cy(e,t,l,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,c=null,f=null,_=null,j=null,A=null,U=null;for($ in l){var H=l[$];if(l.hasOwnProperty($)&&H!=null)switch($){case"checked":break;case"value":break;case"defaultValue":j=H;default:n.hasOwnProperty($)||Be(e,t,$,null,n,H)}}for(var R in n){var $=n[R];if(H=l[R],n.hasOwnProperty(R)&&($!=null||H!=null))switch(R){case"type":c=$;break;case"name":i=$;break;case"checked":A=$;break;case"defaultChecked":U=$;break;case"value":f=$;break;case"defaultValue":_=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(r(137,t));break;default:$!==H&&Be(e,t,R,$,n,H)}}vo(e,f,_,j,A,U,c,i);return;case"select":$=f=_=R=null;for(c in l)if(j=l[c],l.hasOwnProperty(c)&&j!=null)switch(c){case"value":break;case"multiple":$=j;default:n.hasOwnProperty(c)||Be(e,t,c,null,n,j)}for(i in n)if(c=n[i],j=l[i],n.hasOwnProperty(i)&&(c!=null||j!=null))switch(i){case"value":R=c;break;case"defaultValue":_=c;break;case"multiple":f=c;default:c!==j&&Be(e,t,i,c,n,j)}t=_,l=f,n=$,R!=null?sa(e,!!l,R,!1):!!n!=!!l&&(t!=null?sa(e,!!l,t,!0):sa(e,!!l,l?[]:"",!1));return;case"textarea":$=R=null;for(_ in l)if(i=l[_],l.hasOwnProperty(_)&&i!=null&&!n.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:Be(e,t,_,null,n,i)}for(f in n)if(i=n[f],c=l[f],n.hasOwnProperty(f)&&(i!=null||c!=null))switch(f){case"value":R=i;break;case"defaultValue":$=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(r(91));break;default:i!==c&&Be(e,t,f,i,n,c)}Vd(e,R,$);return;case"option":for(var W in l)if(R=l[W],l.hasOwnProperty(W)&&R!=null&&!n.hasOwnProperty(W))switch(W){case"selected":e.selected=!1;break;default:Be(e,t,W,null,n,R)}for(j in n)if(R=n[j],$=l[j],n.hasOwnProperty(j)&&R!==$&&(R!=null||$!=null))switch(j){case"selected":e.selected=R&&typeof R!="function"&&typeof R!="symbol";break;default:Be(e,t,j,R,n,$)}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 ie in l)R=l[ie],l.hasOwnProperty(ie)&&R!=null&&!n.hasOwnProperty(ie)&&Be(e,t,ie,null,n,R);for(A in n)if(R=n[A],$=l[A],n.hasOwnProperty(A)&&R!==$&&(R!=null||$!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(137,t));break;default:Be(e,t,A,R,n,$)}return;default:if(xo(t)){for(var He in l)R=l[He],l.hasOwnProperty(He)&&R!==void 0&&!n.hasOwnProperty(He)&&iu(e,t,He,void 0,n,R);for(U in n)R=n[U],$=l[U],!n.hasOwnProperty(U)||R===$||R===void 0&&$===void 0||iu(e,t,U,R,n,$);return}}for(var E in l)R=l[E],l.hasOwnProperty(E)&&R!=null&&!n.hasOwnProperty(E)&&Be(e,t,E,null,n,R);for(H in n)R=n[H],$=l[H],!n.hasOwnProperty(H)||R===$||R==null&&$==null||Be(e,t,H,R,n,$)}function Fm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function oy(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var i=l[n],c=i.transferSize,f=i.initiatorType,_=i.duration;if(c&&_&&Fm(f)){for(f=0,_=i.responseEnd,n+=1;n<l.length;n++){var j=l[n],A=j.startTime;if(A>_)break;var U=j.transferSize,H=j.initiatorType;U&&Fm(H)&&(j=j.responseEnd,f+=U*(j<_?1:(_-A)/(j-A)))}if(--n,t+=8*(c+f)/(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 cu=null,ou=null;function _c(e){return e.nodeType===9?e:e.ownerDocument}function Wm(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 Im(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 ru(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 uu=null;function ry(){var e=window.event;return e&&e.type==="popstate"?e===uu?!1:(uu=e,!0):(uu=null,!1)}var Pm=typeof setTimeout=="function"?setTimeout:void 0,uy=typeof clearTimeout=="function"?clearTimeout:void 0,ep=typeof Promise=="function"?Promise:void 0,dy=typeof queueMicrotask=="function"?queueMicrotask:typeof ep<"u"?function(e){return ep.resolve(null).then(e).catch(fy)}:Pm;function fy(e){setTimeout(function(){throw e})}function pn(e){return e==="head"}function tp(e,t){var l=t,n=0;do{var i=l.nextSibling;if(e.removeChild(l),i&&i.nodeType===8)if(l=i.data,l==="/$"||l==="/&"){if(n===0){e.removeChild(i),za(t);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")Hs(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Hs(l);for(var c=l.firstChild;c;){var f=c.nextSibling,_=c.nodeName;c[as]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&c.rel.toLowerCase()==="stylesheet"||l.removeChild(c),c=f}}else l==="body"&&Hs(e.ownerDocument.body);l=i}while(l);za(t)}function lp(e,t){var l=e;e=0;do{var n=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=n}while(l)}function du(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":du(l),_o(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function hy(e,t,l,n){for(;e.nodeType===1;){var i=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[as])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=nl(e.nextSibling),e===null)break}return null}function my(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=nl(e.nextSibling),e===null))return null;return e}function np(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=nl(e.nextSibling),e===null))return null;return e}function fu(e){return e.data==="$?"||e.data==="$~"}function hu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function py(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var n=function(){t(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function nl(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 mu=null;function ap(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return nl(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function sp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function ip(e,t,l){switch(t=_c(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Hs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);_o(e)}var al=new Map,cp=new Set;function gc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ql=X.d;X.d={f:_y,r:gy,D:vy,C:yy,L:xy,m:by,X:Sy,S:jy,M:Ny};function _y(){var e=Ql.f(),t=oc();return e||t}function gy(e){var t=la(e);t!==null&&t.tag===5&&t.type==="form"?Nh(t):Ql.r(e)}var $a=typeof document>"u"?null:document;function op(e,t,l){var n=$a;if(n&&typeof t=="string"&&t){var i=Ft(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof l=="string"&&(i+='[crossorigin="'+l+'"]'),cp.has(i)||(cp.add(i),e={rel:e,crossOrigin:l,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),St(t,"link",e),pt(t),n.head.appendChild(t)))}}function vy(e){Ql.D(e),op("dns-prefetch",e,null)}function yy(e,t){Ql.C(e,t),op("preconnect",e,t)}function xy(e,t,l){Ql.L(e,t,l);var n=$a;if(n&&e&&t){var i='link[rel="preload"][as="'+Ft(t)+'"]';t==="image"&&l&&l.imageSrcSet?(i+='[imagesrcset="'+Ft(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(i+='[imagesizes="'+Ft(l.imageSizes)+'"]')):i+='[href="'+Ft(e)+'"]';var c=i;switch(t){case"style":c=La(e);break;case"script":c=Oa(e)}al.has(c)||(e=x({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),al.set(c,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(qs(c))||t==="script"&&n.querySelector(Gs(c))||(t=n.createElement("link"),St(t,"link",e),pt(t),n.head.appendChild(t)))}}function by(e,t){Ql.m(e,t);var l=$a;if(l&&e){var n=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Ft(n)+'"][href="'+Ft(e)+'"]',c=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Oa(e)}if(!al.has(c)&&(e=x({rel:"modulepreload",href:e},t),al.set(c,e),l.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Gs(c)))return}n=l.createElement("link"),St(n,"link",e),pt(n),l.head.appendChild(n)}}}function jy(e,t,l){Ql.S(e,t,l);var n=$a;if(n&&e){var i=na(n).hoistableStyles,c=La(e);t=t||"default";var f=i.get(c);if(!f){var _={loading:0,preload:null};if(f=n.querySelector(qs(c)))_.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},l),(l=al.get(c))&&pu(e,l);var j=f=n.createElement("link");pt(j),St(j,"link",e),j._p=new Promise(function(A,U){j.onload=A,j.onerror=U}),j.addEventListener("load",function(){_.loading|=1}),j.addEventListener("error",function(){_.loading|=2}),_.loading|=4,vc(f,t,n)}f={type:"stylesheet",instance:f,count:1,state:_},i.set(c,f)}}}function Sy(e,t){Ql.X(e,t);var l=$a;if(l&&e){var n=na(l).hoistableScripts,i=Oa(e),c=n.get(i);c||(c=l.querySelector(Gs(i)),c||(e=x({src:e,async:!0},t),(t=al.get(i))&&_u(e,t),c=l.createElement("script"),pt(c),St(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function Ny(e,t){Ql.M(e,t);var l=$a;if(l&&e){var n=na(l).hoistableScripts,i=Oa(e),c=n.get(i);c||(c=l.querySelector(Gs(i)),c||(e=x({src:e,async:!0,type:"module"},t),(t=al.get(i))&&_u(e,t),c=l.createElement("script"),pt(c),St(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function rp(e,t,l,n){var i=(i=ye.current)?gc(i):null;if(!i)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=La(l.href),l=na(i).hoistableStyles,n=l.get(t),n||(n={type:"style",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=La(l.href);var c=na(i).hoistableStyles,f=c.get(e);if(f||(i=i.ownerDocument||i,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,f),(c=i.querySelector(qs(e)))&&!c._p&&(f.instance=c,f.state.loading=5),al.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},al.set(e,l),c||wy(i,e,l,f.state))),t&&n===null)throw Error(r(528,""));return f}if(t&&n!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Oa(l),l=na(i).hoistableScripts,n=l.get(t),n||(n={type:"script",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function La(e){return'href="'+Ft(e)+'"'}function qs(e){return'link[rel="stylesheet"]['+e+"]"}function up(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function wy(e,t,l,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),St(t,"link",l),pt(t),e.head.appendChild(t))}function Oa(e){return'[src="'+Ft(e)+'"]'}function Gs(e){return"script[async]"+e}function dp(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Ft(l.href)+'"]');if(n)return t.instance=n,pt(n),n;var i=x({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),pt(n),St(n,"style",i),vc(n,l.precedence,e),t.instance=n;case"stylesheet":i=La(l.href);var c=e.querySelector(qs(i));if(c)return t.state.loading|=4,t.instance=c,pt(c),c;n=up(l),(i=al.get(i))&&pu(n,i),c=(e.ownerDocument||e).createElement("link"),pt(c);var f=c;return f._p=new Promise(function(_,j){f.onload=_,f.onerror=j}),St(c,"link",n),t.state.loading|=4,vc(c,l.precedence,e),t.instance=c;case"script":return c=Oa(l.src),(i=e.querySelector(Gs(c)))?(t.instance=i,pt(i),i):(n=l,(i=al.get(c))&&(n=x({},l),_u(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),pt(i),St(i,"link",n),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,vc(n,l.precedence,e));return t.instance}function vc(e,t,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,c=i,f=0;f<n.length;f++){var _=n[f];if(_.dataset.precedence===t)c=_;else if(c!==i)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function pu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function _u(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var yc=null;function fp(e,t,l){if(yc===null){var n=new Map,i=yc=new Map;i.set(l,n)}else i=yc,n=i.get(l),n||(n=new Map,i.set(l,n));if(n.has(e))return n;for(n.set(e,null),l=l.getElementsByTagName(e),i=0;i<l.length;i++){var c=l[i];if(!(c[as]||c[yt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var f=c.getAttribute(t)||"";f=e+f;var _=n.get(f);_?_.push(c):n.set(f,[c])}}return n}function hp(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Ty(e,t,l){if(l===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 mp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ey(e,t,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var i=La(n.href),c=t.querySelector(qs(i));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=xc.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=c,pt(c);return}c=t.ownerDocument||t,n=up(n),(i=al.get(i))&&pu(n,i),c=c.createElement("link"),pt(c);var f=c;f._p=new Promise(function(_,j){f.onload=_,f.onerror=j}),St(c,"link",n),l.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=xc.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var gu=0;function ky(e,t){return e.stylesheets&&e.count===0&&jc(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var n=setTimeout(function(){if(e.stylesheets&&jc(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&gu===0&&(gu=62500*oy());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&jc(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>gu?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(i)}}:null}function xc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var bc=null;function jc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,bc=new Map,t.forEach(Ay,e),bc=null,xc.call(e))}function Ay(e,t){if(!(t.state.loading&4)){var l=bc.get(e);if(l)var n=l.get(null);else{l=new Map,bc.set(e,l);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<i.length;c++){var f=i[c];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(l.set(f.dataset.precedence,f),n=f)}n&&l.set(null,n)}i=t.instance,f=i.getAttribute("data-precedence"),c=l.get(f)||n,c===n&&l.set(null,i),l.set(f,i),this.count++,n=xc.bind(this),i.addEventListener("load",n),i.addEventListener("error",n),c?c.parentNode.insertBefore(i,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qs={$$typeof:Y,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function Ry(e,t,l,n,i,c,f,_,j){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=fo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fo(0),this.hiddenUpdates=fo(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=c,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function pp(e,t,l,n,i,c,f,_,j,A,U,H){return e=new Ry(e,t,l,f,j,A,U,H,_),t=1,c===!0&&(t|=24),c=qt(3,null,null,t),e.current=c,c.stateNode=e,t=Fo(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:n,isDehydrated:l,cache:t},er(c),e}function _p(e){return e?(e=ha,e):ha}function gp(e,t,l,n,i,c){i=_p(i),n.context===null?n.context=i:n.pendingContext=i,n=nn(t),n.payload={element:l},c=c===void 0?null:c,c!==null&&(n.callback=c),l=an(e,n,t),l!==null&&(Ot(l,e,t),bs(l,e,t))}function vp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function vu(e,t){vp(e,t),(e=e.alternate)&&vp(e,t)}function yp(e){if(e.tag===13||e.tag===31){var t=Cn(e,67108864);t!==null&&Ot(t,e,67108864),vu(e,67108864)}}function xp(e){if(e.tag===13||e.tag===31){var t=Xt();t=ho(t);var l=Cn(e,t);l!==null&&Ot(l,e,t),vu(e,t)}}var Sc=!0;function Cy(e,t,l,n){var i=M.T;M.T=null;var c=X.p;try{X.p=2,yu(e,t,l,n)}finally{X.p=c,M.T=i}}function Dy(e,t,l,n){var i=M.T;M.T=null;var c=X.p;try{X.p=8,yu(e,t,l,n)}finally{X.p=c,M.T=i}}function yu(e,t,l,n){if(Sc){var i=xu(n);if(i===null)su(e,t,n,Nc,l),jp(e,n);else if($y(i,e,t,l,n))n.stopPropagation();else if(jp(e,n),t&4&&-1<My.indexOf(e)){for(;i!==null;){var c=la(i);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var f=Tn(c.pendingLanes);if(f!==0){var _=c;for(_.pendingLanes|=2,_.entangledLanes|=2;f;){var j=1<<31-Bt(f);_.entanglements[1]|=j,f&=~j}bl(c),(De&6)===0&&(ic=zt()+500,zs(0))}}break;case 31:case 13:_=Cn(c,2),_!==null&&Ot(_,c,2),oc(),vu(c,2)}if(c=xu(n),c===null&&su(e,t,n,Nc,l),c===i)break;i=c}i!==null&&n.stopPropagation()}else su(e,t,n,null,l)}}function xu(e){return e=jo(e),bu(e)}var Nc=null;function bu(e){if(Nc=null,e=ta(e),e!==null){var t=h(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=m(t),e!==null)return e;e=null}else if(l===31){if(e=v(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Nc=e,null}function bp(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(vg()){case kd:return 2;case Ad:return 8;case hi:case yg:return 32;case Rd:return 268435456;default:return 32}default:return 32}}var ju=!1,_n=null,gn=null,vn=null,Ys=new Map,Vs=new Map,yn=[],My="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 jp(e,t){switch(e){case"focusin":case"focusout":_n=null;break;case"dragenter":case"dragleave":gn=null;break;case"mouseover":case"mouseout":vn=null;break;case"pointerover":case"pointerout":Ys.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vs.delete(t.pointerId)}}function Xs(e,t,l,n,i,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:l,eventSystemFlags:n,nativeEvent:c,targetContainers:[i]},t!==null&&(t=la(t),t!==null&&yp(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function $y(e,t,l,n,i){switch(t){case"focusin":return _n=Xs(_n,e,t,l,n,i),!0;case"dragenter":return gn=Xs(gn,e,t,l,n,i),!0;case"mouseover":return vn=Xs(vn,e,t,l,n,i),!0;case"pointerover":var c=i.pointerId;return Ys.set(c,Xs(Ys.get(c)||null,e,t,l,n,i)),!0;case"gotpointercapture":return c=i.pointerId,Vs.set(c,Xs(Vs.get(c)||null,e,t,l,n,i)),!0}return!1}function Sp(e){var t=ta(e.target);if(t!==null){var l=h(t);if(l!==null){if(t=l.tag,t===13){if(t=m(l),t!==null){e.blockedOn=t,Od(e.priority,function(){xp(l)});return}}else if(t===31){if(t=v(l),t!==null){e.blockedOn=t,Od(e.priority,function(){xp(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function wc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=xu(e.nativeEvent);if(l===null){l=e.nativeEvent;var n=new l.constructor(l.type,l);bo=n,l.target.dispatchEvent(n),bo=null}else return t=la(l),t!==null&&yp(t),e.blockedOn=l,!1;t.shift()}return!0}function Np(e,t,l){wc(e)&&l.delete(t)}function Ly(){ju=!1,_n!==null&&wc(_n)&&(_n=null),gn!==null&&wc(gn)&&(gn=null),vn!==null&&wc(vn)&&(vn=null),Ys.forEach(Np),Vs.forEach(Np)}function Tc(e,t){e.blockedOn===t&&(e.blockedOn=null,ju||(ju=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Ly)))}var Ec=null;function wp(e){Ec!==e&&(Ec=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){Ec===e&&(Ec=null);for(var t=0;t<e.length;t+=3){var l=e[t],n=e[t+1],i=e[t+2];if(typeof n!="function"){if(bu(n||l)===null)continue;break}var c=la(l);c!==null&&(e.splice(t,3),t-=3,xr(c,{pending:!0,data:i,method:l.method,action:n},n,i))}}))}function za(e){function t(j){return Tc(j,e)}_n!==null&&Tc(_n,e),gn!==null&&Tc(gn,e),vn!==null&&Tc(vn,e),Ys.forEach(t),Vs.forEach(t);for(var l=0;l<yn.length;l++){var n=yn[l];n.blockedOn===e&&(n.blockedOn=null)}for(;0<yn.length&&(l=yn[0],l.blockedOn===null);)Sp(l),l.blockedOn===null&&yn.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var i=l[n],c=l[n+1],f=i[Rt]||null;if(typeof c=="function")f||wp(l);else if(f){var _=null;if(c&&c.hasAttribute("formAction")){if(i=c,f=c[Rt]||null)_=f.formAction;else if(bu(i)!==null)continue}else _=f.action;typeof _=="function"?l[n+1]=_:(l.splice(n,3),n-=3),wp(l)}}}function Tp(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(f){return i=f})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Su(e){this._internalRoot=e}kc.prototype.render=Su.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,n=Xt();gp(l,n,e,t,null,null)},kc.prototype.unmount=Su.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gp(e.current,2,null,e,null,null),oc(),t[ea]=null}};function kc(e){this._internalRoot=e}kc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ld();e={blockedOn:null,target:e,priority:t};for(var l=0;l<yn.length&&t!==0&&t<yn[l].priority;l++);yn.splice(l,0,e),l===0&&Sp(e)}};var Ep=o.version;if(Ep!=="19.2.8")throw Error(r(527,Ep,"19.2.8"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Oy={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ac=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ac.isDisabled&&Ac.supportsFiber)try{ts=Ac.inject(Oy),Ut=Ac}catch{}}return Zs.createRoot=function(e,t){if(!d(e))throw Error(r(299));var l=!1,n="",i=$h,c=Lh,f=Oh;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=pp(e,1,!1,null,null,l,n,null,i,c,f,Tp),e[ea]=t.current,au(e),new Su(t)},Zs.hydrateRoot=function(e,t,l){if(!d(e))throw Error(r(299));var n=!1,i="",c=$h,f=Lh,_=Oh,j=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(i=l.identifierPrefix),l.onUncaughtError!==void 0&&(c=l.onUncaughtError),l.onCaughtError!==void 0&&(f=l.onCaughtError),l.onRecoverableError!==void 0&&(_=l.onRecoverableError),l.formState!==void 0&&(j=l.formState)),t=pp(e,1,!0,t,l??null,n,i,j,c,f,_,Tp),t.context=_p(null),l=t.current,n=Xt(),n=ho(n),i=nn(n),i.callback=null,an(l,i,n),l=n,t.current.lanes=l,ns(t,l),bl(t),e[ea]=t.current,au(e),new kc(t)},Zs.version="19.2.8",Zs}var zp;function Vy(){if(zp)return Tu.exports;zp=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(o){console.error(o)}}return s(),Tu.exports=Yy(),Tu.exports}var Xy=Vy();/**
|
|
50
|
+
* react-router v7.18.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 od=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,v_=/^[\\/]{2}/;function Ky(s,o){return o+s.replace(/\\/g,"/")}var Up="popstate";function Bp(s){return typeof s=="object"&&s!=null&&"pathname"in s&&"search"in s&&"hash"in s&&"state"in s&&"key"in s}function Zy(s={}){function o(d,h){let{pathname:m="/",search:v="",hash:g=""}=In(d.location.hash.substring(1));return!m.startsWith("/")&&!m.startsWith(".")&&(m="/"+m),Fu("",{pathname:m,search:v,hash:g},h.state&&h.state.usr||null,h.state&&h.state.key||"default")}function u(d,h){let m=d.document.querySelector("base"),v="";if(m&&m.getAttribute("href")){let g=d.location.href,p=g.indexOf("#");v=p===-1?g:g.slice(0,p)}return v+"#"+(typeof h=="string"?h:ni(h))}function r(d,h){cl(d.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(h)})`)}return Fy(o,u,r,s)}function Ze(s,o){if(s===!1||s===null||typeof s>"u")throw new Error(o)}function cl(s,o){if(!s){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function Jy(){return Math.random().toString(36).substring(2,10)}function Hp(s,o){return{usr:s.state,key:s.key,idx:o,masked:s.mask?{pathname:s.pathname,search:s.search,hash:s.hash}:void 0}}function Fu(s,o,u=null,r,d){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof o=="string"?In(o):o,state:u,key:o&&o.key||r||Jy(),mask:d}}function ni({pathname:s="/",search:o="",hash:u=""}){return o&&o!=="?"&&(s+=o.charAt(0)==="?"?o:"?"+o),u&&u!=="#"&&(s+=u.charAt(0)==="#"?u:"#"+u),s}function In(s){let o={};if(s){let u=s.indexOf("#");u>=0&&(o.hash=s.substring(u),s=s.substring(0,u));let r=s.indexOf("?");r>=0&&(o.search=s.substring(r),s=s.substring(0,r)),s&&(o.pathname=s)}return o}function Fy(s,o,u,r={}){let{window:d=document.defaultView,v5Compat:h=!1}=r,m=d.history,v="POP",g=null,p=b();p==null&&(p=0,m.replaceState({...m.state,idx:p},""));function b(){return(m.state||{idx:null}).idx}function x(){v="POP";let T=b(),C=T==null?null:T-p;p=T,g&&g({action:v,location:D.location,delta:C})}function w(T,C){v="PUSH";let G=Bp(T)?T:Fu(D.location,T,C);u&&u(G,T),p=b()+1;let Y=Hp(G,p),F=D.createHref(G.mask||G);try{m.pushState(Y,"",F)}catch(q){if(q instanceof DOMException&&q.name==="DataCloneError")throw q;d.location.assign(F)}h&&g&&g({action:v,location:D.location,delta:1})}function z(T,C){v="REPLACE";let G=Bp(T)?T:Fu(D.location,T,C);u&&u(G,T),p=b();let Y=Hp(G,p),F=D.createHref(G.mask||G);m.replaceState(Y,"",F),h&&g&&g({action:v,location:D.location,delta:0})}function L(T){return Wy(d,T)}let D={get action(){return v},get location(){return s(d,m)},listen(T){if(g)throw new Error("A history only accepts one active listener");return d.addEventListener(Up,x),g=T,()=>{d.removeEventListener(Up,x),g=null}},createHref(T){return o(d,T)},createURL:L,encodeLocation(T){let C=L(T);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:w,replace:z,go(T){return m.go(T)}};return D}function Wy(s,o,u=!1){let r="http://localhost";s&&(r=s.location.origin!=="null"?s.location.origin:s.location.href),Ze(r,"No window.location.(origin|href) available to create URL");let d=typeof o=="string"?o:ni(o);return d=d.replace(/ $/,"%20"),!u&&v_.test(d)&&(d=r+d),new URL(d,r)}function y_(s,o,u="/"){return Iy(s,o,u,!1)}function Iy(s,o,u,r,d){let h=typeof o=="string"?In(o):o,m=Kl(h.pathname||"/",u);if(m==null)return null;let v=Py(s),g=null,p=ux(m);for(let b=0;g==null&&b<v.length;++b)g=rx(v[b],p,r);return g}function Py(s){let o=x_(s);return ex(o),o}function x_(s,o=[],u=[],r="",d=!1){let h=(m,v,g=d,p)=>{let b={relativePath:p===void 0?m.path||"":p,caseSensitive:m.caseSensitive===!0,childrenIndex:v,route:m};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(r)&&g)return;Ze(b.relativePath.startsWith(r),`Absolute route path "${b.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(r.length)}let x=_l([r,b.relativePath]),w=u.concat(b);m.children&&m.children.length>0&&(Ze(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),x_(m.children,o,w,x,g)),!(m.path==null&&!m.index)&&o.push({path:x,score:cx(x,m.index),routesMeta:w.map((z,L)=>{let[D,T]=S_(z.relativePath,z.caseSensitive,L===w.length-1);return{...z,matcher:D,compiledParams:T}})})};return s.forEach((m,v)=>{if(m.path===""||!m.path?.includes("?"))h(m,v);else for(let g of b_(m.path))h(m,v,!0,g)}),o}function b_(s){let o=s.split("/");if(o.length===0)return[];let[u,...r]=o,d=u.endsWith("?"),h=u.replace(/\?$/,"");if(r.length===0)return d?[h,""]:[h];let m=b_(r.join("/")),v=[];return v.push(...m.map(g=>g===""?h:[h,g].join("/"))),d&&v.push(...m),v.map(g=>s.startsWith("/")&&g===""?"/":g)}function ex(s){s.sort((o,u)=>o.score!==u.score?u.score-o.score:ox(o.routesMeta.map(r=>r.childrenIndex),u.routesMeta.map(r=>r.childrenIndex)))}var tx=/^:[\w-]+$/,lx=3,nx=2,ax=1,sx=10,ix=-2,qp=s=>s==="*";function cx(s,o){let u=s.split("/"),r=u.length;return u.some(qp)&&(r+=ix),o&&(r+=nx),u.filter(d=>!qp(d)).reduce((d,h)=>d+(tx.test(h)?lx:h===""?ax:sx),r)}function ox(s,o){return s.length===o.length&&s.slice(0,-1).every((r,d)=>r===o[d])?s[s.length-1]-o[o.length-1]:0}function rx(s,o,u=!1){let{routesMeta:r}=s,d={},h="/",m=[];for(let v=0;v<r.length;++v){let g=r[v],p=v===r.length-1,b=h==="/"?o:o.slice(h.length)||"/",x={path:g.relativePath,caseSensitive:g.caseSensitive,end:p},w=g.matcher&&g.compiledParams?j_(x,b,g.matcher,g.compiledParams):Yc(x,b),z=g.route;if(!w&&p&&u&&!r[r.length-1].route.index&&(w=Yc({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},b)),!w)return null;Object.assign(d,w.params),m.push({params:d,pathname:_l([h,w.pathname]),pathnameBase:hx(_l([h,w.pathnameBase])),route:z}),w.pathnameBase!=="/"&&(h=_l([h,w.pathnameBase]))}return m}function Yc(s,o){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[u,r]=S_(s.path,s.caseSensitive,s.end);return j_(s,o,u,r)}function j_(s,o,u,r){let d=o.match(u);if(!d)return null;let h=d[0],m=h.replace(/(.)\/+$/,"$1"),v=d.slice(1);return{params:r.reduce((p,{paramName:b,isOptional:x},w)=>{if(b==="*"){let L=v[w]||"";m=h.slice(0,h.length-L.length).replace(/(.)\/+$/,"$1")}const z=v[w];return x&&!z?p[b]=void 0:p[b]=(z||"").replace(/%2F/g,"/"),p},{}),pathname:h,pathnameBase:m,pattern:s}}function S_(s,o=!1,u=!0){cl(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 r=[],d="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,v,g,p,b)=>{if(r.push({paramName:v,isOptional:g!=null}),g){let x=b.charAt(p+m.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(r.push({paramName:"*"}),d+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):u?d+="\\/*$":s!==""&&s!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,o?void 0:"i"),r]}function ux(s){try{return s.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return cl(!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 (${o}).`),s}}function Kl(s,o){if(o==="/")return s;if(!s.toLowerCase().startsWith(o.toLowerCase()))return null;let u=o.endsWith("/")?o.length-1:o.length,r=s.charAt(u);return r&&r!=="/"?null:s.slice(u)||"/"}function dx(s,o="/"){let{pathname:u,search:r="",hash:d=""}=typeof s=="string"?In(s):s,h;return u?(u=N_(u),u.startsWith("/")?h=Gp(u.substring(1),"/"):h=Gp(u,o)):h=o,{pathname:h,search:mx(r),hash:px(d)}}function Gp(s,o){let u=Vc(o).split("/");return s.split("/").forEach(d=>{d===".."?u.length>1&&u.pop():d!=="."&&u.push(d)}),u.length>1?u.join("/"):"/"}function Ru(s,o,u,r){return`Cannot include a '${s}' character in a manually specified \`to.${o}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${u}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function fx(s){return s.filter((o,u)=>u===0||o.route.path&&o.route.path.length>0)}function rd(s){let o=fx(s);return o.map((u,r)=>r===o.length-1?u.pathname:u.pathnameBase)}function Fc(s,o,u,r=!1){let d;typeof s=="string"?d=In(s):(d={...s},Ze(!d.pathname||!d.pathname.includes("?"),Ru("?","pathname","search",d)),Ze(!d.pathname||!d.pathname.includes("#"),Ru("#","pathname","hash",d)),Ze(!d.search||!d.search.includes("#"),Ru("#","search","hash",d)));let h=s===""||d.pathname==="",m=h?"/":d.pathname,v;if(m==null)v=u;else{let x=o.length-1;if(!r&&m.startsWith("..")){let w=m.split("/");for(;w[0]==="..";)w.shift(),x-=1;d.pathname=w.join("/")}v=x>=0?o[x]:"/"}let g=dx(d,v),p=m&&m!=="/"&&m.endsWith("/"),b=(h||m===".")&&u.endsWith("/");return!g.pathname.endsWith("/")&&(p||b)&&(g.pathname+="/"),g}var N_=s=>s.replace(/[\\/]{2,}/g,"/"),_l=s=>N_(s.join("/")),Vc=s=>s.replace(/\/+$/,""),hx=s=>Vc(s).replace(/^\/*/,"/"),mx=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,px=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,_x=class{constructor(s,o,u,r=!1){this.status=s,this.statusText=o||"",this.internal=r,u instanceof Error?(this.data=u.toString(),this.error=u):this.data=u}};function gx(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function vx(s){let o=s.map(u=>u.route.path).filter(Boolean);return _l(o)||"/"}var w_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function T_(s,o){let u=s;if(typeof u!="string"||!od.test(u))return{absoluteURL:void 0,isExternal:!1,to:u};let r=u,d=!1;if(w_)try{let h=new URL(window.location.href),m=v_.test(u)?new URL(Ky(u,h.protocol)):new URL(u),v=Kl(m.pathname,o);m.origin===h.origin&&v!=null?u=v+m.search+m.hash:d=!0}catch{cl(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:d,to:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var E_=["POST","PUT","PATCH","DELETE"];new Set(E_);var yx=["GET",...E_];new Set(yx);var xx=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function bx(s){try{return xx.includes(new URL(s).protocol)}catch{return!1}}var Wa=y.createContext(null);Wa.displayName="DataRouter";var Wc=y.createContext(null);Wc.displayName="DataRouterState";var k_=y.createContext(!1);function jx(){return y.useContext(k_)}var A_=y.createContext({isTransitioning:!1});A_.displayName="ViewTransition";var Sx=y.createContext(new Map);Sx.displayName="Fetchers";var Nx=y.createContext(null);Nx.displayName="Await";var Zt=y.createContext(null);Zt.displayName="Navigation";var ci=y.createContext(null);ci.displayName="Location";var ol=y.createContext({outlet:null,matches:[],isDataRoute:!1});ol.displayName="Route";var ud=y.createContext(null);ud.displayName="RouteError";var R_="REACT_ROUTER_ERROR",wx="REDIRECT",Tx="ROUTE_ERROR_RESPONSE";function Ex(s){if(s.startsWith(`${R_}:${wx}:{`))try{let o=JSON.parse(s.slice(28));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string"&&typeof o.location=="string"&&typeof o.reloadDocument=="boolean"&&typeof o.replace=="boolean")return o}catch{}}function kx(s){if(s.startsWith(`${R_}:${Tx}:{`))try{let o=JSON.parse(s.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new _x(o.status,o.statusText,o.data)}catch{}}function Ax(s,{relative:o}={}){Ze(Ia(),"useHref() may be used only in the context of a <Router> component.");let{basename:u,navigator:r}=y.useContext(Zt),{hash:d,pathname:h,search:m}=oi(s,{relative:o}),v=h;return u!=="/"&&(v=h==="/"?u:_l([u,h])),r.createHref({pathname:v,search:m,hash:d})}function Ia(){return y.useContext(ci)!=null}function gl(){return Ze(Ia(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(ci).location}var C_="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function D_(s){y.useContext(Zt).static||y.useLayoutEffect(s)}function Ic(){let{isDataRoute:s}=y.useContext(ol);return s?Yx():Rx()}function Rx(){Ze(Ia(),"useNavigate() may be used only in the context of a <Router> component.");let s=y.useContext(Wa),{basename:o,navigator:u}=y.useContext(Zt),{matches:r}=y.useContext(ol),{pathname:d}=gl(),h=JSON.stringify(rd(r)),m=y.useRef(!1);return D_(()=>{m.current=!0}),y.useCallback((g,p={})=>{if(cl(m.current,C_),!m.current)return;if(typeof g=="number"){u.go(g);return}let b=Fc(g,JSON.parse(h),d,p.relative==="path");s==null&&o!=="/"&&(b.pathname=b.pathname==="/"?o:_l([o,b.pathname])),(p.replace?u.replace:u.push)(b,p.state,p)},[o,u,h,d,s])}var Cx=y.createContext(null);function Dx(s){let o=y.useContext(ol).outlet;return y.useMemo(()=>o&&y.createElement(Cx.Provider,{value:s},o),[o,s])}function dd(){let{matches:s}=y.useContext(ol);return s[s.length-1]?.params??{}}function oi(s,{relative:o}={}){let{matches:u}=y.useContext(ol),{pathname:r}=gl(),d=JSON.stringify(rd(u));return y.useMemo(()=>Fc(s,JSON.parse(d),r,o==="path"),[s,d,r,o])}function Mx(s,o){return M_(s,o)}function M_(s,o,u){Ze(Ia(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=y.useContext(Zt),{matches:d}=y.useContext(ol),h=d[d.length-1],m=h?h.params:{},v=h?h.pathname:"/",g=h?h.pathnameBase:"/",p=h&&h.route;{let T=p&&p.path||"";L_(v,!p||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${v}" (under <Route path="${T}">) 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="${T}"> to <Route path="${T==="/"?"*":`${T}/*`}">.`)}let b=gl(),x;if(o){let T=typeof o=="string"?In(o):o;Ze(g==="/"||T.pathname?.startsWith(g),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${T.pathname}" was given in the \`location\` prop.`),x=T}else x=b;let w=x.pathname||"/",z=w;if(g!=="/"){let T=g.replace(/^\//,"").split("/");z="/"+w.replace(/^\//,"").split("/").slice(T.length).join("/")}let L=u&&u.state.matches.length?u.state.matches.map(T=>Object.assign(T,{route:u.manifest[T.route.id]||T.route})):y_(s,{pathname:z});cl(p||L!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),cl(L==null||L[L.length-1].route.element!==void 0||L[L.length-1].route.Component!==void 0||L[L.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let D=Ux(L&&L.map(T=>Object.assign({},T,{params:Object.assign({},m,T.params),pathname:_l([g,r.encodeLocation?r.encodeLocation(T.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?g:_l([g,r.encodeLocation?r.encodeLocation(T.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathnameBase])})),d,u);return o&&D?y.createElement(ci.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...x},navigationType:"POP"}},D):D}function $x(){let s=Qx(),o=gx(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),u=s instanceof Error?s.stack:null,r="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:r},h={padding:"2px 4px",backgroundColor:r},m=null;return console.error("Error handled by React Router default ErrorBoundary:",s),m=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"}},o),u?y.createElement("pre",{style:d},u):null,m)}var Lx=y.createElement($x,null),$_=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,o){return o.location!==s.location||o.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:o.error,location:o.location,revalidation:s.revalidation||o.revalidation}}componentDidCatch(s,o){this.props.onError?this.props.onError(s,o):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 u=kx(s.digest);u&&(s=u)}let o=s!==void 0?y.createElement(ol.Provider,{value:this.props.routeContext},y.createElement(ud.Provider,{value:s,children:this.props.component})):this.props.children;return this.context?y.createElement(Ox,{error:s},o):o}};$_.contextType=k_;var Cu=new WeakMap;function Ox({children:s,error:o}){let{basename:u}=y.useContext(Zt);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let r=Ex(o.digest);if(r){let d=Cu.get(o);if(d)throw d;let h=T_(r.location,u),m=h.absoluteURL||h.to;if(bx(m))throw new Error("Invalid redirect location");if(w_&&!Cu.get(o))if(h.isExternal||r.reloadDocument)window.location.href=m;else{const v=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:r.replace}));throw Cu.set(o,v),v}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m}`})}}return s}function zx({routeContext:s,match:o,children:u}){let r=y.useContext(Wa);return r&&r.static&&r.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=o.route.id),y.createElement(ol.Provider,{value:s},u)}function Ux(s,o=[],u){let r=u?.state;if(s==null){if(!r)return null;if(r.errors)s=r.matches;else if(o.length===0&&!r.initialized&&r.matches.length>0)s=r.matches;else return null}let d=s,h=r?.errors;if(h!=null){let b=d.findIndex(x=>x.route.id&&h?.[x.route.id]!==void 0);Ze(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),d=d.slice(0,Math.min(d.length,b+1))}let m=!1,v=-1;if(u&&r){m=r.renderFallback;for(let b=0;b<d.length;b++){let x=d[b];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(v=b),x.route.id){let{loaderData:w,errors:z}=r,L=x.route.loader&&!w.hasOwnProperty(x.route.id)&&(!z||z[x.route.id]===void 0);if(x.route.lazy||L){u.isStatic&&(m=!0),v>=0?d=d.slice(0,v+1):d=[d[0]];break}}}}let g=u?.onError,p=r&&g?(b,x)=>{g(b,{location:r.location,params:r.matches?.[0]?.params??{},pattern:vx(r.matches),errorInfo:x})}:void 0;return d.reduceRight((b,x,w)=>{let z,L=!1,D=null,T=null;r&&(z=h&&x.route.id?h[x.route.id]:void 0,D=x.route.errorElement||Lx,m&&(v<0&&w===0?(L_("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),L=!0,T=null):v===w&&(L=!0,T=x.route.hydrateFallbackElement||null)));let C=o.concat(d.slice(0,w+1)),G=()=>{let Y;return z?Y=D:L?Y=T:x.route.Component?Y=y.createElement(x.route.Component,null):x.route.element?Y=x.route.element:Y=b,y.createElement(zx,{match:x,routeContext:{outlet:b,matches:C,isDataRoute:r!=null},children:Y})};return r&&(x.route.ErrorBoundary||x.route.errorElement||w===0)?y.createElement($_,{location:r.location,revalidation:r.revalidation,component:D,error:z,children:G(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:p}):G()},null)}function fd(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Bx(s){let o=y.useContext(Wa);return Ze(o,fd(s)),o}function Hx(s){let o=y.useContext(Wc);return Ze(o,fd(s)),o}function qx(s){let o=y.useContext(ol);return Ze(o,fd(s)),o}function hd(s){let o=qx(s),u=o.matches[o.matches.length-1];return Ze(u.route.id,`${s} can only be used on routes that contain a unique "id"`),u.route.id}function Gx(){return hd("useRouteId")}function Qx(){let s=y.useContext(ud),o=Hx("useRouteError"),u=hd("useRouteError");return s!==void 0?s:o.errors?.[u]}function Yx(){let{router:s}=Bx("useNavigate"),o=hd("useNavigate"),u=y.useRef(!1);return D_(()=>{u.current=!0}),y.useCallback(async(d,h={})=>{cl(u.current,C_),u.current&&(typeof d=="number"?await s.navigate(d):await s.navigate(d,{fromRouteId:o,...h}))},[s,o])}var Qp={};function L_(s,o,u){!o&&!Qp[s]&&(Qp[s]=!0,cl(!1,u))}y.memo(Vx);function Vx({routes:s,manifest:o,future:u,state:r,isStatic:d,onError:h}){return M_(s,void 0,{manifest:o,state:r,isStatic:d,onError:h})}function Yp({to:s,replace:o,state:u,relative:r}){Ze(Ia(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=y.useContext(Zt);cl(!d,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:h}=y.useContext(ol),{pathname:m}=gl(),v=Ic(),g=Fc(s,rd(h),m,r==="path"),p=JSON.stringify(g);return y.useEffect(()=>{v(JSON.parse(p),{replace:o,state:u,relative:r})},[v,p,r,o,u]),null}function Xx(s){return Dx(s.context)}function it(s){Ze(!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 Kx({basename:s="/",children:o=null,location:u,navigationType:r="POP",navigator:d,static:h=!1,useTransitions:m}){Ze(!Ia(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let v=s.replace(/^\/*/,"/"),g=y.useMemo(()=>({basename:v,navigator:d,static:h,useTransitions:m,future:{}}),[v,d,h,m]);typeof u=="string"&&(u=In(u));let{pathname:p="/",search:b="",hash:x="",state:w=null,key:z="default",mask:L}=u,D=y.useMemo(()=>{let T=Kl(p,v);return T==null?null:{location:{pathname:T,search:b,hash:x,state:w,key:z,mask:L},navigationType:r}},[v,p,b,x,w,z,r,L]);return cl(D!=null,`<Router basename="${v}"> is not able to match the URL "${p}${b}${x}" because it does not start with the basename, so the <Router> won't render anything.`),D==null?null:y.createElement(Zt.Provider,{value:g},y.createElement(ci.Provider,{children:o,value:D}))}function Zx({children:s,location:o}){return Mx(Wu(s),o)}function Wu(s,o=[]){let u=[];return y.Children.forEach(s,(r,d)=>{if(!y.isValidElement(r))return;let h=[...o,d];if(r.type===y.Fragment){u.push.apply(u,Wu(r.props.children,h));return}Ze(r.type===it,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ze(!r.props.index||!r.props.children,"An index route cannot have child routes.");let m={id:r.props.id||h.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(m.children=Wu(r.props.children,h)),u.push(m)}),u}var Bc="get",Hc="application/x-www-form-urlencoded";function Pc(s){return typeof HTMLElement<"u"&&s instanceof HTMLElement}function Jx(s){return Pc(s)&&s.tagName.toLowerCase()==="button"}function Fx(s){return Pc(s)&&s.tagName.toLowerCase()==="form"}function Wx(s){return Pc(s)&&s.tagName.toLowerCase()==="input"}function Ix(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function Px(s,o){return s.button===0&&(!o||o==="_self")&&!Ix(s)}var Rc=null;function e1(){if(Rc===null)try{new FormData(document.createElement("form"),0),Rc=!1}catch{Rc=!0}return Rc}var t1=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Du(s){return s!=null&&!t1.has(s)?(cl(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Hc}"`),null):s}function l1(s,o){let u,r,d,h,m;if(Fx(s)){let v=s.getAttribute("action");r=v?Kl(v,o):null,u=s.getAttribute("method")||Bc,d=Du(s.getAttribute("enctype"))||Hc,h=new FormData(s)}else if(Jx(s)||Wx(s)&&(s.type==="submit"||s.type==="image")){let v=s.form;if(v==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=s.getAttribute("formaction")||v.getAttribute("action");if(r=g?Kl(g,o):null,u=s.getAttribute("formmethod")||v.getAttribute("method")||Bc,d=Du(s.getAttribute("formenctype"))||Du(v.getAttribute("enctype"))||Hc,h=new FormData(v,s),!e1()){let{name:p,type:b,value:x}=s;if(b==="image"){let w=p?`${p}.`:"";h.append(`${w}x`,"0"),h.append(`${w}y`,"0")}else p&&h.append(p,x)}}else{if(Pc(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');u=Bc,r=null,d=Hc,m=s}return h&&d==="text/plain"&&(m=h,h=void 0),{action:r,method:u.toLowerCase(),encType:d,formData:h,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function md(s,o){if(s===!1||s===null||typeof s>"u")throw new Error(o)}function O_(s,o,u,r){let d=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return u?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${r}`:d.pathname=`${d.pathname}.${r}`:d.pathname==="/"?d.pathname=`_root.${r}`:o&&Kl(d.pathname,o)==="/"?d.pathname=`${Vc(o)}/_root.${r}`:d.pathname=`${Vc(d.pathname)}.${r}`,d}async function n1(s,o){if(s.id in o)return o[s.id];try{let u=await import(s.module);return o[s.id]=u,u}catch(u){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(u),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function a1(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 s1(s,o,u){let r=await Promise.all(s.map(async d=>{let h=o.routes[d.route.id];if(h){let m=await n1(h,u);return m.links?m.links():[]}return[]}));return r1(r.flat(1).filter(a1).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Vp(s,o,u,r,d,h){let m=(g,p)=>u[p]?g.route.id!==u[p].route.id:!0,v=(g,p)=>u[p].pathname!==g.pathname||u[p].route.path?.endsWith("*")&&u[p].params["*"]!==g.params["*"];return h==="assets"?o.filter((g,p)=>m(g,p)||v(g,p)):h==="data"?o.filter((g,p)=>{let b=r.routes[g.route.id];if(!b||!b.hasLoader)return!1;if(m(g,p)||v(g,p))return!0;if(g.route.shouldRevalidate){let x=g.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:u[0]?.params||{},nextUrl:new URL(s,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function i1(s,o,{includeHydrateFallback:u}={}){return c1(s.map(r=>{let d=o.routes[r.route.id];if(!d)return[];let h=[d.module];return d.clientActionModule&&(h=h.concat(d.clientActionModule)),d.clientLoaderModule&&(h=h.concat(d.clientLoaderModule)),u&&d.hydrateFallbackModule&&(h=h.concat(d.hydrateFallbackModule)),d.imports&&(h=h.concat(d.imports)),h}).flat(1))}function c1(s){return[...new Set(s)]}function o1(s){let o={},u=Object.keys(s).sort();for(let r of u)o[r]=s[r];return o}function r1(s,o){let u=new Set;return new Set(o),s.reduce((r,d)=>{let h=JSON.stringify(o1(d));return u.has(h)||(u.add(h),r.push({key:h,link:d})),r},[])}function pd(){let s=y.useContext(Wa);return md(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function u1(){let s=y.useContext(Wc);return md(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var _d=y.createContext(void 0);_d.displayName="FrameworkContext";function eo(){let s=y.useContext(_d);return md(s,"You must render this element inside a <HydratedRouter> element"),s}function d1(s,o){let u=y.useContext(_d),[r,d]=y.useState(!1),[h,m]=y.useState(!1),{onFocus:v,onBlur:g,onMouseEnter:p,onMouseLeave:b,onTouchStart:x}=o,w=y.useRef(null);y.useEffect(()=>{if(s==="render"&&m(!0),s==="viewport"){let D=C=>{C.forEach(G=>{m(G.isIntersecting)})},T=new IntersectionObserver(D,{threshold:.5});return w.current&&T.observe(w.current),()=>{T.disconnect()}}},[s]),y.useEffect(()=>{if(r){let D=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(D)}}},[r]);let z=()=>{d(!0)},L=()=>{d(!1),m(!1)};return u?s!=="intent"?[h,w,{}]:[h,w,{onFocus:Js(v,z),onBlur:Js(g,L),onMouseEnter:Js(p,z),onMouseLeave:Js(b,L),onTouchStart:Js(x,z)}]:[!1,w,{}]}function Js(s,o){return u=>{s&&s(u),u.defaultPrevented||o(u)}}function f1({page:s,...o}){let u=jx(),{nonce:r}=eo(),{router:d}=pd(),h=y.useMemo(()=>y_(d.routes,s,d.basename),[d.routes,s,d.basename]);return h?(o.nonce==null&&r&&(o={...o,nonce:r}),u?y.createElement(m1,{page:s,matches:h,...o}):y.createElement(p1,{page:s,matches:h,...o})):null}function h1(s){let{manifest:o,routeModules:u}=eo(),[r,d]=y.useState([]);return y.useEffect(()=>{let h=!1;return s1(s,o,u).then(m=>{h||d(m)}),()=>{h=!0}},[s,o,u]),r}function m1({page:s,matches:o,...u}){let r=gl(),{future:d}=eo(),{basename:h}=pd(),m=y.useMemo(()=>{if(s===r.pathname+r.search+r.hash)return[];let v=O_(s,h,d.v8_trailingSlashAwareDataRequests,"rsc"),g=!1,p=[];for(let b of o)typeof b.route.shouldRevalidate=="function"?g=!0:p.push(b.route.id);return g&&p.length>0&&v.searchParams.set("_routes",p.join(",")),[v.pathname+v.search]},[h,d.v8_trailingSlashAwareDataRequests,s,r,o]);return y.createElement(y.Fragment,null,m.map(v=>y.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...u})))}function p1({page:s,matches:o,...u}){let r=gl(),{future:d,manifest:h,routeModules:m}=eo(),{basename:v}=pd(),{loaderData:g,matches:p}=u1(),b=y.useMemo(()=>Vp(s,o,p,h,r,"data"),[s,o,p,h,r]),x=y.useMemo(()=>Vp(s,o,p,h,r,"assets"),[s,o,p,h,r]),w=y.useMemo(()=>{if(s===r.pathname+r.search+r.hash)return[];let D=new Set,T=!1;if(o.forEach(G=>{let Y=h.routes[G.route.id];!Y||!Y.hasLoader||(!b.some(F=>F.route.id===G.route.id)&&G.route.id in g&&m[G.route.id]?.shouldRevalidate||Y.hasClientLoader?T=!0:D.add(G.route.id))}),D.size===0)return[];let C=O_(s,v,d.v8_trailingSlashAwareDataRequests,"data");return T&&D.size>0&&C.searchParams.set("_routes",o.filter(G=>D.has(G.route.id)).map(G=>G.route.id).join(",")),[C.pathname+C.search]},[v,d.v8_trailingSlashAwareDataRequests,g,r,h,b,o,s,m]),z=y.useMemo(()=>i1(x,h),[x,h]),L=h1(x);return y.createElement(y.Fragment,null,w.map(D=>y.createElement("link",{key:D,rel:"prefetch",as:"fetch",href:D,...u})),z.map(D=>y.createElement("link",{key:D,rel:"modulepreload",href:D,...u})),L.map(({key:D,link:T})=>y.createElement("link",{key:D,nonce:u.nonce,...T,crossOrigin:T.crossOrigin??u.crossOrigin})))}function _1(...s){return o=>{s.forEach(u=>{typeof u=="function"?u(o):u!=null&&(u.current=o)})}}var g1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{g1&&(window.__reactRouterVersion="7.18.2")}catch{}function v1({basename:s,children:o,useTransitions:u,window:r}){let d=y.useRef();d.current==null&&(d.current=Zy({window:r,v5Compat:!0}));let h=d.current,[m,v]=y.useState({action:h.action,location:h.location}),g=y.useCallback(p=>{u===!1?v(p):y.startTransition(()=>v(p))},[u]);return y.useLayoutEffect(()=>h.listen(g),[h,g]),y.createElement(Kx,{basename:s,children:o,location:m.location,navigationType:m.action,navigator:h,useTransitions:u})}var ri=y.forwardRef(function({onClick:o,discover:u="render",prefetch:r="none",relative:d,reloadDocument:h,replace:m,mask:v,state:g,target:p,to:b,preventScrollReset:x,viewTransition:w,defaultShouldRevalidate:z,...L},D){let{basename:T,navigator:C,useTransitions:G}=y.useContext(Zt),Y=typeof b=="string"&&od.test(b),F=T_(b,T);b=F.to;let q=Ax(b,{relative:d}),I=gl(),K=null;if(v){let le=Fc(v,[],I.mask?I.mask.pathname:"/",!0);T!=="/"&&(le.pathname=le.pathname==="/"?T:_l([T,le.pathname])),K=C.createHref(le)}let[V,ce,ge]=d1(r,L),se=b1(b,{replace:m,mask:v,state:g,target:p,preventScrollReset:x,relative:d,viewTransition:w,defaultShouldRevalidate:z,useTransitions:G});function ve(le){o&&o(le),le.defaultPrevented||se(le)}let Je=!(F.isExternal||h),ne=y.createElement("a",{...L,...ge,href:(Je?K:void 0)||F.absoluteURL||q,onClick:Je?ve:o,ref:_1(D,ce),target:p,"data-discover":!Y&&u==="render"?"true":void 0});return V&&!Y?y.createElement(y.Fragment,null,ne,y.createElement(f1,{page:q})):ne});ri.displayName="Link";var z_=y.forwardRef(function({"aria-current":o="page",caseSensitive:u=!1,className:r="",end:d=!1,style:h,to:m,viewTransition:v,children:g,...p},b){let x=oi(m,{relative:p.relative}),w=gl(),z=y.useContext(Wc),{navigator:L,basename:D}=y.useContext(Zt),T=z!=null&&T1(x)&&v===!0,C=L.encodeLocation?L.encodeLocation(x).pathname:x.pathname,G=w.pathname,Y=z&&z.navigation&&z.navigation.location?z.navigation.location.pathname:null;u||(G=G.toLowerCase(),Y=Y?Y.toLowerCase():null,C=C.toLowerCase()),Y&&D&&(Y=Kl(Y,D)||Y);const F=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let q=G===C||!d&&G.startsWith(C)&&G.charAt(F)==="/",I=Y!=null&&(Y===C||!d&&Y.startsWith(C)&&Y.charAt(C.length)==="/"),K={isActive:q,isPending:I,isTransitioning:T},V=q?o:void 0,ce;typeof r=="function"?ce=r(K):ce=[r,q?"active":null,I?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let ge=typeof h=="function"?h(K):h;return y.createElement(ri,{...p,"aria-current":V,className:ce,ref:b,style:ge,to:m,viewTransition:v},typeof g=="function"?g(K):g)});z_.displayName="NavLink";var y1=y.forwardRef(({discover:s="render",fetcherKey:o,navigate:u,reloadDocument:r,replace:d,state:h,method:m=Bc,action:v,onSubmit:g,relative:p,preventScrollReset:b,viewTransition:x,defaultShouldRevalidate:w,...z},L)=>{let{useTransitions:D}=y.useContext(Zt),T=N1(),C=w1(v,{relative:p}),G=m.toLowerCase()==="get"?"get":"post",Y=typeof v=="string"&&od.test(v),F=q=>{if(g&&g(q),q.defaultPrevented)return;q.preventDefault();let I=q.nativeEvent.submitter,K=I?.getAttribute("formmethod")||m,V=()=>T(I||q.currentTarget,{fetcherKey:o,method:K,navigate:u,replace:d,state:h,relative:p,preventScrollReset:b,viewTransition:x,defaultShouldRevalidate:w});D&&u!==!1?y.startTransition(()=>V()):V()};return y.createElement("form",{ref:L,method:G,action:C,onSubmit:r?g:F,...z,"data-discover":!Y&&s==="render"?"true":void 0})});y1.displayName="Form";function x1(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function U_(s){let o=y.useContext(Wa);return Ze(o,x1(s)),o}function b1(s,{target:o,replace:u,mask:r,state:d,preventScrollReset:h,relative:m,viewTransition:v,defaultShouldRevalidate:g,useTransitions:p}={}){let b=Ic(),x=gl(),w=oi(s,{relative:m});return y.useCallback(z=>{if(Px(z,o)){z.preventDefault();let L=u!==void 0?u:ni(x)===ni(w),D=()=>b(s,{replace:L,mask:r,state:d,preventScrollReset:h,relative:m,viewTransition:v,defaultShouldRevalidate:g});p?y.startTransition(()=>D()):D()}},[x,b,w,u,r,d,o,s,h,m,v,g,p])}var j1=0,S1=()=>`__${String(++j1)}__`;function N1(){let{router:s}=U_("useSubmit"),{basename:o}=y.useContext(Zt),u=Gx(),r=s.fetch,d=s.navigate;return y.useCallback(async(h,m={})=>{let{action:v,method:g,encType:p,formData:b,body:x}=l1(h,o);if(m.navigate===!1){let w=m.fetcherKey||S1();await r(w,u,m.action||v,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:x,formMethod:m.method||g,formEncType:m.encType||p,flushSync:m.flushSync})}else await d(m.action||v,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:x,formMethod:m.method||g,formEncType:m.encType||p,replace:m.replace,state:m.state,fromRouteId:u,flushSync:m.flushSync,viewTransition:m.viewTransition})},[r,d,o,u])}function w1(s,{relative:o}={}){let{basename:u}=y.useContext(Zt),r=y.useContext(ol);Ze(r,"useFormAction must be used inside a RouteContext");let[d]=r.matches.slice(-1),h={...oi(s||".",{relative:o})},m=gl();if(s==null){h.search=m.search;let v=new URLSearchParams(h.search),g=v.getAll("index");if(g.some(b=>b==="")){v.delete("index"),g.filter(x=>x).forEach(x=>v.append("index",x));let b=v.toString();h.search=b?`?${b}`:""}}return(!s||s===".")&&d.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),u!=="/"&&(h.pathname=h.pathname==="/"?u:_l([u,h.pathname])),ni(h)}function T1(s,{relative:o}={}){let u=y.useContext(A_);Ze(u!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=U_("useViewTransitionState"),d=oi(s,{relative:o});if(!u.isTransitioning)return!1;let h=Kl(u.currentLocation.pathname,r)||u.currentLocation.pathname,m=Kl(u.nextLocation.pathname,r)||u.nextLocation.pathname;return Yc(d.pathname,m)!=null||Yc(d.pathname,h)!=null}var B_=g_();const H_=[{id:"overview",label:"Overview",leaves:[{path:"/overview",label:"Fleet Dashboard",description:"Repos, activity, runs, swarms, MCP health, genome, and daemon status at a glance.",implemented:!0}]},{id:"journal",label:"Journal",leaves:[{path:"/journal",label:"Work Journal",description:"Chronological, filterable, scrubable record of runs, merges, judge verdicts, and daemon ticks — with live streaming into any in-progress run.",implemented:!0}]},{id:"work",label:"Work",leaves:[{path:"/work/runs",label:"Runs",description:"Dispatched goal runs and their token burn.",implemented:!0},{path:"/work/swarms",label:"Swarms",description:"Multi-task DAG runs with live burndown.",implemented:!0}]},{id:"inbox",label:"Inbox",leaves:[{path:"/inbox",label:"Proposals",description:"Review, filter, and approve/reject proposals — including history (rejected/approved).",implemented:!0}]},{id:"control",label:"Control",leaves:[{path:"/control/daemon",label:"Daemon",description:"Autonomous operator state, spend, and direction mode.",implemented:!0},{path:"/control/fleet",label:"Fleet",description:"Queue depth, lease health, and the kill switch.",implemented:!0},{path:"/control/security",label:"Security",description:"Supply-chain / binshield findings from the cached backlog.",implemented:!0}]},{id:"intelligence",label:"Intelligence",leaves:[{path:"/intelligence/pulse",label:"Pulse",description:"Activity rollups over the dashboard window.",implemented:!0},{path:"/intelligence/genome",label:"Genome",description:"Cross-repo knowledge search and recall.",implemented:!0},{path:"/intelligence/production",label:"Production",description:"Ships-per-day, judge verdicts, auto-merges.",implemented:!0}]},{id:"portfolio",label:"Portfolio",leaves:[{path:"/portfolio",label:"Portfolio",description:"Org-level roll-up across enrolled repos.",implemented:!0}]},{id:"goals",label:"Goals",leaves:[{path:"/goals",label:"Goals",description:"Active goals and milestone progress.",implemented:!0}]}],q_=H_.flatMap(s=>s.leaves),E1="_sidebar_vbjva_1",k1="_brand_vbjva_11",A1="_brandMark_vbjva_19",R1="_group_vbjva_23",C1="_groupLabel_vbjva_27",D1="_leaves_vbjva_37",M1="_link_vbjva_43",$1="_active_vbjva_60",L1="_soon_vbjva_66",jl={sidebar:E1,brand:k1,brandMark:A1,group:R1,groupLabel:C1,leaves:D1,link:M1,active:$1,soon:L1};function O1(){return a.jsxs("nav",{className:jl.sidebar,"aria-label":"Primary",children:[a.jsxs("div",{className:jl.brand,children:[a.jsx("span",{className:jl.brandMark,"aria-hidden":"true",children:"▲"}),a.jsx("span",{className:jl.brandName,children:"ashlr"})]}),H_.map(s=>a.jsxs("div",{className:jl.group,children:[a.jsx("h2",{className:jl.groupLabel,children:s.label}),a.jsx("ul",{className:jl.leaves,children:s.leaves.map(o=>a.jsx("li",{children:a.jsxs(z_,{to:o.path,className:({isActive:u})=>`${jl.link} ${u?jl.active:""}`,children:[o.label,o.implemented?null:a.jsx("span",{className:jl.soon,children:"soon"})]})},o.path))})]},s.id))]})}const z1={data:void 0,error:void 0,status:"idle",updatedAt:null},Ka=new Map;function gd(s){let o=Ka.get(s);return o||(o={snapshot:z1,inFlight:null,fetcher:null,subscribers:new Set},Ka.set(s,o)),o}function Mu(s,o){s.snapshot={...s.snapshot,...o}}function Xp(s){const o=Ka.get(s);if(o)for(const u of o.subscribers)u()}function U1(s,o){const u=gd(s);return u.subscribers.add(o),()=>{u.subscribers.delete(o)}}function Iu(s){return gd(s).snapshot}function to(s,o){const u=gd(s);return u.fetcher=o,u.inFlight||(Mu(u,{status:u.snapshot.data!==void 0?"refreshing":"loading"}),Xp(s),u.inFlight=o().then(r=>{Mu(u,{data:r,error:void 0,status:"success",updatedAt:Date.now()})}).catch(r=>{Mu(u,{error:r instanceof Error?r:new Error(String(r)),status:"error"})}).finally(()=>{u.inFlight=null,Xp(s)})),u.inFlight}function wt(s){const o=Ka.get(s);!o||!o.fetcher||to(s,o.fetcher)}function Xc(s){for(const o of Ka.keys())o.startsWith(s)&&wt(o)}function B1(){Ka.clear()}const Kp="ashlr.readClientProof.v1",H1=/^[a-f0-9]{64}$/,vd=1200*1e3;function q1(){const s=new Uint8Array(32);return crypto.getRandomValues(s),Array.from(s,o=>o.toString(16).padStart(2,"0")).join("")}function G1(){try{const o=sessionStorage.getItem(Kp);if(o&&H1.test(o))return o}catch{}const s=q1();try{sessionStorage.setItem(Kp,s)}catch{}return s}let G_=G1(),ui=null,Qa=null,Kc={phase:"checking",checked:!1,mutationTokenHeldUntil:null};const Pu=new Set;function Q1(){for(const s of Pu)s()}function Pa(s){Kc={...Kc,...s},Q1()}function yd(s){return Pu.add(s),()=>Pu.delete(s)}function Fn(){return Kc}function Q_(){return G_}async function Y1(s){const o=s.trim();if(!/^[a-f0-9]{64}$/.test(o))throw new Error("That does not look like a read token — expected 64 hex characters.");const u=await fetch("/api/session",{method:"POST",credentials:"same-origin",headers:{"x-ashlr-token":o,"x-ashlr-read-client":G_}});if(u.status===204){Pa({phase:"authenticated",checked:!0});return}throw u.status===401?new Error("Server rejected that token. Double-check the value ashlr serve printed."):new Error(`Unexpected response establishing session (HTTP ${u.status}).`)}function Y_(){Kc.phase==="authenticated"&&(xd(),B1(),Pa({phase:"unauthenticated",checked:!0}))}function V1(s){Pa({phase:s?"authenticated":"unauthenticated",checked:!0})}function V_(){return ui}function Za(){return ui!==null}function X_(){Qa&&clearTimeout(Qa),Qa=setTimeout(()=>xd(),vd)}function X1(s){ui=s;const o=Date.now()+vd;Pa({mutationTokenHeldUntil:o}),X_()}function K_(){if(ui===null)return;const s=Date.now()+vd;Pa({mutationTokenHeldUntil:s}),X_()}function xd(){ui=null,Qa&&(clearTimeout(Qa),Qa=null),Pa({mutationTokenHeldUntil:null})}const K1=["runs","swarms","inbox","daemon","daemon-observation","fleet-activity-ping","fleet-activity-observation","snapshot","session-expired"],Z1={runs:["runs"],swarms:["swarms"],inbox:["inbox"],daemon:["daemon","control-snapshot"],"daemon-observation":["daemon","control-snapshot"],"fleet-activity-ping":["fleet-activity","fleet"],"fleet-activity-observation":["fleet-activity","fleet"],snapshot:["dashboard-snapshot"],"session-expired":[]},J1=new Map;let Ya=null,Va=null,lo=0;function F1(){return Math.min(1e3*2**lo,15e3)}function Z_(){Ya&&(Ya.close(),Ya=null),Va&&(clearTimeout(Va),Va=null)}function W1(){Va||(Va=setTimeout(()=>{Va=null,lo+=1,J_()},F1()))}function J_(){if(Fn().phase!=="authenticated")return;Z_();const s=`/api/events?client=${encodeURIComponent(Q_())}`,o=new EventSource(s,{withCredentials:!0});Ya=o,o.onopen=()=>{lo=0};for(const u of K1)o.addEventListener(u,r=>{const d=r;let h;try{h=JSON.parse(d.data)}catch{h=void 0}for(const v of Z1[u])wt(v);u==="inbox"&&(Xc("inbox-list:"),Xc("proposal-detail-")),u==="session-expired"&&Y_();const m=J1.get(u);if(m)for(const v of m)v(h)});o.onerror=()=>{o.close(),Ya===o&&(Ya=null),Fn().phase==="authenticated"&&W1()}}yd(()=>{Fn().phase==="authenticated"?(lo=0,J_()):Z_()});function Ce(s){const o=y.useSyncExternalStore(y.useCallback(u=>U1(s.key,u),[s.key]),()=>Iu(s.key),()=>Iu(s.key));return y.useEffect(()=>{to(s.key,()=>s.fetch())},[s.key]),o}function Zc(s){return y.useCallback(()=>{to(s.key,()=>s.fetch())},[s])}function I1(){return y.useSyncExternalStore(yd,()=>Fn().phase,()=>Fn().phase)}function bd(){const s=y.useSyncExternalStore(yd,()=>Fn().mutationTokenHeldUntil,()=>Fn().mutationTokenHeldUntil);return{hasHold:Za(),token:V_(),heldUntil:s,setToken:X1,touch:K_,clear:xd}}const P1=180*1e3,Zp=7200*1e3,eb=1440*60*1e3;function tb(s){const o=s.toLowerCase();return o.includes("proposal")||o.includes("inbox")?"/inbox":o.includes("security")||o.includes("audit")?"/control/security":o.includes("evidence")||o.includes("fleet")||o.includes("queue")?"/control/fleet":"/control/daemon"}function lb(s){const o=[],u=Date.now();for(const m of s.fleet?.nextActions??[])o.push({id:`next-action-${m.id}`,category:"action-required",severity:m.priority,title:m.label,detail:m.detail,ts:new Date(u).toISOString(),actionHref:tb(m.id),actionLabel:"Inspect"});const r=s.fleet?.autonomousShipReadiness;r&&(r.verdict==="blocked"&&r.topBlocker?o.push({id:`readiness-blocked-${r.topBlocker.id}`,category:"readiness",severity:r.topBlocker.severity,title:"Autonomous readiness is blocked",detail:r.topBlocker.detail,ts:r.freshness.generatedAt,actionHref:"/control/fleet",actionLabel:"Inspect fleet"}):r.verdict==="unknown"&&o.push({id:"readiness-unknown",category:"readiness",severity:"medium",title:"Autonomous readiness is unknown",detail:"Fresh, authoritative state is required before autonomous operation can be treated as clear.",ts:r.freshness.generatedAt,actionHref:"/control/fleet",actionLabel:"Inspect fleet"}));const d=s.control?.security;if(d?.available){if(d.counts.critical>0){const m=d.findings.find(v=>v.severity==="critical");o.push({id:"security-critical",category:"security",severity:"critical",title:`${d.counts.critical} critical security finding${d.counts.critical===1?"":"s"}`,detail:m?`${m.repo}: ${m.title}`:"See the security backlog for details.",ts:new Date(u).toISOString(),actionHref:"/control/security",actionLabel:"Review findings"})}else if(d.counts.high>0){const m=d.findings.find(v=>v.severity==="high");o.push({id:"security-high",category:"security",severity:"high",title:`${d.counts.high} high-severity security finding${d.counts.high===1?"":"s"}`,detail:m?`${m.repo}: ${m.title}`:"See the security backlog for details.",ts:new Date(u).toISOString(),actionHref:"/control/security",actionLabel:"Review findings"})}}for(const m of s.control?.limits??[])m.standing==="over"?o.push({id:`budget-over-${m.backend}-${m.window}`,category:"budget",severity:"high",title:`${m.backend} is over its ${m.window} limit`,detail:`${m.used.toLocaleString()} / ${m.max.toLocaleString()} used.`,ts:new Date(u).toISOString(),actionHref:"/control/daemon",actionLabel:"Review usage"}):m.standing==="warn"&&o.push({id:`budget-warn-${m.backend}-${m.window}`,category:"budget",severity:"medium",title:`${m.backend} is approaching its ${m.window} limit`,detail:`${m.used.toLocaleString()} / ${m.max.toLocaleString()} used.`,ts:new Date(u).toISOString(),actionHref:"/control/daemon",actionLabel:"Review usage"});const h=s.control?.daemon;if(h&&(h.sourceQuality.sourceState!=="healthy"||h.sourceQuality.complete===!1)){const m=h.sourceQuality.reason;o.push({id:"daemon-health-degraded",category:"daemon-health",severity:m==="missing"||m==="unavailable"?"high":"medium",title:"Daemon state cannot be confirmed",detail:m?`Source: ${m}.`:"The daemon state source is degraded or incomplete.",ts:new Date(u).toISOString(),actionHref:"/control/daemon",actionLabel:"Inspect daemon",sourceQuality:h.sourceQuality})}if(s.inbox&&s.inbox.pending>0){const m=s.inbox.proposals.reduce((p,b)=>{const x=new Date(b.createdAt).getTime();return p===null||x<p?x:p},null),v=m!==null?u-m:0,g=v>Zp?"high":"medium";o.push({id:"proposal-backlog",category:"proposal",severity:g,title:`${s.inbox.pending} proposal${s.inbox.pending===1?"":"s"} awaiting review`,detail:v>Zp?`Oldest has been waiting ${Math.round(v/(3600*1e3))}h.`:"Approve, reject, or leave for autonomous handling per policy.",ts:m!==null?new Date(m).toISOString():new Date(u).toISOString(),actionHref:"/inbox",actionLabel:"Open inbox"})}for(const m of s.runs??[]){if(m.status==="failed"||m.status==="aborted"){if(u-new Date(m.updatedAt).getTime()>eb)continue;o.push({id:`run-failed-${m.id}`,category:"run",severity:m.status==="failed"?"high":"medium",title:`Run ${m.status}: ${m.goal}`,detail:m.result??m.terminationReason??`Run ${m.id} ${m.status}.`,ts:m.updatedAt,actionHref:`/work/runs/${m.id}`,actionLabel:"Open run"});continue}if(m.status==="running"){const v=u-new Date(m.updatedAt).getTime();v>P1&&o.push({id:`run-stalled-${m.id}`,category:"run",severity:"medium",title:`No update from a running run in ${Math.round(v/6e4)}m`,detail:m.goal,ts:m.updatedAt,actionHref:`/work/runs/${m.id}`,actionLabel:"Watch live"})}}return o}function nb(s){const o={critical:0,high:1,medium:2,low:3,info:4};return[...s].sort((u,r)=>{const d=o[u.severity]-o[r.severity];return d!==0?d:new Date(r.ts).getTime()-new Date(u.ts).getTime()})}const F_="ashlr.notifications.mutedCategories.v1",jd="ashlr.notifications.desktopEnabled.v1";function ab(){try{const s=localStorage.getItem(F_);if(!s)return new Set;const o=JSON.parse(s);if(Array.isArray(o))return new Set(o)}catch{}return new Set}function sb(s){try{localStorage.setItem(F_,JSON.stringify([...s]))}catch{}}function ib(){try{return localStorage.getItem(jd)==="1"}catch{return!1}}function Sd(){return typeof Notification>"u"?"unsupported":Notification.permission}const Sn=ab();let ed=[],ai=!1,Ja=ib();const $u=new Set;let W_={items:[],panelOpen:!1,mutedCategories:[...Sn],desktopEnabled:Ja,desktopPermission:Sd()};const td=new Set;function cb(){for(const s of td)s()}function Pn(){W_={items:nb(ed.filter(o=>!Sn.has(o.category))),panelOpen:ai,mutedCategories:[...Sn],desktopEnabled:Ja,desktopPermission:Sd()},cb()}function ob(s){return td.add(s),()=>td.delete(s)}function Jp(){return W_}function rb(s){const o=new Set(ed.map(u=>u.id));if(ed=s,Ja&&Sd()==="granted"){for(const u of s)if(!Sn.has(u.category)&&!(u.severity!=="critical"&&u.severity!=="high")&&!(o.has(u.id)||$u.has(u.id))){$u.add(u.id);try{new Notification(u.title,{body:u.detail,tag:u.id})}catch{}}}for(const u of s)$u.add(u.id);Pn()}function ub(){ai=!0,Pn()}function Lu(){ai=!1,Pn()}function db(){ai=!ai,Pn()}function fb(s){return Sn.has(s)}function hb(s,o){o?Sn.add(s):Sn.delete(s),sb(Sn),Pn()}async function mb(){if(typeof Notification>"u")return"unsupported";let s=Notification.permission;s==="default"&&(s=await Notification.requestPermission()),Ja=s==="granted";try{localStorage.setItem(jd,Ja?"1":"0")}catch{}return Pn(),s}function pb(){Ja=!1;try{localStorage.setItem(jd,"0")}catch{}Pn()}function I_(){return y.useSyncExternalStore(ob,Jp,Jp)}const _b="_bell_c1uhc_1",gb="_badge_c1uhc_25",vb="_badgeUrgent_c1uhc_41",Ou={bell:_b,badge:gb,badgeUrgent:vb};function yb(){const{items:s}=I_(),o=s.filter(r=>r.severity==="critical"||r.severity==="high").length,u=s.length;return a.jsxs("button",{type:"button",className:Ou.bell,onClick:db,"aria-haspopup":"dialog","aria-label":u===0?"Notifications, none open":`Notifications, ${u} open, ${o} urgent`,children:[a.jsx("span",{"aria-hidden":"true",children:"🔔"}),u>0?a.jsx("span",{className:`${Ou.badge} ${o>0?Ou.badgeUrgent:""}`,"aria-hidden":"true",children:u>99?"99+":u}):null]})}const xb="_backdrop_lqpd9_1",bb="_dialog_lqpd9_13",jb="_title_lqpd9_25",zu={backdrop:xb,dialog:bb,title:jb},Sb=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function di({open:s,onClose:o,titleId:u,title:r,children:d,initialFocusRef:h,widthClassName:m}){const v=y.useRef(null),g=y.useRef(null);return y.useEffect(()=>s?(g.current=document.activeElement,(h?.current??v.current)?.focus({preventScroll:!0}),()=>{g.current?.focus?.({preventScroll:!0})}):void 0,[s]),y.useEffect(()=>{if(!s)return;function p(b){if(b.key==="Escape"){b.stopPropagation(),o();return}if(b.key!=="Tab")return;const x=v.current;if(!x)return;const w=Array.from(x.querySelectorAll(Sb)).filter(D=>D.offsetParent!==null);if(w.length===0)return;const z=w[0],L=w[w.length-1];b.shiftKey&&document.activeElement===z?(b.preventDefault(),L.focus()):!b.shiftKey&&document.activeElement===L&&(b.preventDefault(),z.focus())}return document.addEventListener("keydown",p,!0),()=>document.removeEventListener("keydown",p,!0)},[s,o]),s?B_.createPortal(a.jsx("div",{className:zu.backdrop,onMouseDown:p=>p.target===p.currentTarget&&o(),children:a.jsxs("div",{ref:v,className:`${zu.dialog} ${m??""}`,role:"dialog","aria-modal":"true","aria-labelledby":u,tabIndex:-1,children:[a.jsx("h2",{id:u,className:zu.title,children:r}),d]})}),document.body):null}const Nb="_unknown_14ftv_1",wb="_dot_14ftv_11",Tb="_badge_14ftv_19",ld={unknown:Nb,dot:wb,badge:Tb};function Xa(s){return s?s.sourceState==="healthy"&&s.complete!==!1:!0}function Re({quality:s,children:o,renderControl:u,label:r}){if(Xa(s))return a.jsxs(a.Fragment,{children:[o,u?.()]});const d=s?.reason;return a.jsxs("span",{className:ld.unknown,title:d?`Unavailable: ${d}`:"Source data unavailable",children:[a.jsx("span",{className:ld.dot,"aria-hidden":"true"}),"unknown",r?a.jsxs("span",{className:"visually-hidden",children:[" (",r,")"]}):null]})}function Eb({quality:s,label:o}){return Xa(s)?null:a.jsxs("span",{className:ld.badge,title:s?.reason??"Source data unavailable",children:[o?`${o}: `:"","unknown"]})}const kb="_badge_w420y_1",Ab="_dot_w420y_13",Rb="_neutral_w420y_20",Cb="_info_w420y_28",Db="_running_w420y_36",Mb="_pulse_w420y_1",$b="_success_w420y_45",Lb="_warning_w420y_53",Ob="_danger_w420y_61",zb="_unknown_w420y_69",Ub="_phaseDot_w420y_78",qc={badge:kb,dot:Ab,neutral:Rb,info:Cb,running:Db,pulse:Mb,success:$b,warning:Lb,danger:Ob,unknown:zb,phaseDot:Ub},Bb={pending:"neutral",queued:"neutral",waiting:"neutral",running:"running",active:"running",in_progress:"running",building:"running",applying:"running",done:"success",success:"success",succeeded:"success",applied:"success",merged:"success",ready:"success",approved:"success",ship:"success",review:"warning",degraded:"warning",paused:"warning",noise:"neutral",failed:"danger",error:"danger",errored:"danger",rejected:"danger",harmful:"danger",cancelled:"neutral",canceled:"neutral",unknown:"unknown"};function P_(s){return s?Bb[s.toLowerCase()]??"neutral":"unknown"}function We({status:s,tone:o,children:u}){const r=o??P_(s);return a.jsxs("span",{className:`${qc.badge} ${qc[r]}`,children:[a.jsx("span",{className:qc.dot,"aria-hidden":"true"}),u??s]})}function Hb({index:s}){const o=(s%6+6)%6;return a.jsx("span",{className:qc.phaseDot,style:{background:`var(--phase-${o+1})`},"aria-hidden":"true"})}function qb(s){switch(s){case"critical":return"danger";case"high":return"warning";case"medium":return"running";case"low":return"neutral";case"info":return"info"}}const Uu={"action-required":"Action required",readiness:"Autonomous readiness",security:"Security",budget:"Budget & limits","daemon-health":"Daemon health",proposal:"Proposals",run:"Runs","log-source":"Log source"},Gb="_item_1gxz9_1",Qb="_top_1gxz9_15",Yb="_category_1gxz9_21",Vb="_time_1gxz9_26",Xb="_title_1gxz9_32",Kb="_detail_1gxz9_39",Zb="_actions_1gxz9_45",Jb="_actionLink_1gxz9_52",Fb="_muteBtn_1gxz9_58",Yl={item:Gb,top:Qb,category:Yb,time:Vb,title:Xb,detail:Kb,actions:Zb,actionLink:Jb,muteBtn:Fb};function Wb(s){const o=Math.max(0,Math.round((Date.now()-new Date(s).getTime())/1e3));if(o<5)return"just now";if(o<60)return`${o}s ago`;const u=Math.round(o/60);if(u<60)return`${u}m ago`;const r=Math.round(u/60);return r<48?`${r}h ago`:`${Math.round(r/24)}d ago`}function Ib({item:s}){const o=fb(s.category);return a.jsxs("article",{className:Yl.item,"data-focus-key":`notification-${s.id}`,children:[a.jsxs("div",{className:Yl.top,children:[a.jsx(We,{status:s.severity,tone:qb(s.severity),children:s.severity.toUpperCase()}),a.jsx("span",{className:Yl.category,children:Uu[s.category]}),a.jsx("span",{className:Yl.time,title:new Date(s.ts).toLocaleString(),children:Wb(s.ts)})]}),a.jsx("h3",{className:Yl.title,children:s.title}),a.jsx("p",{className:Yl.detail,children:s.sourceQuality?a.jsx(Re,{quality:s.sourceQuality,label:s.title,children:s.detail}):s.detail}),a.jsxs("div",{className:Yl.actions,children:[s.actionHref?a.jsx("a",{className:Yl.actionLink,href:`#${s.actionHref}`,"data-focus-key":`notification-${s.id}-action`,children:s.actionLabel??"Open"}):null,a.jsx("button",{type:"button",className:Yl.muteBtn,onClick:()=>hb(s.category,!o),"aria-pressed":o,children:o?`Unmute ${Uu[s.category]}`:`Mute ${Uu[s.category]}`})]})]})}class Fa extends Error{constructor(o,u,r){super(o),this.status=u,this.path=r,this.name="ApiError"}}class Nd extends Fa{constructor(o){super("This server was started without --allow-dispatch, so mutations are disabled.",404,o),this.name="DispatchDisabledError"}}async function mt(s,o){const u=await fetch(s,{method:"GET",credentials:"same-origin",headers:{"x-ashlr-read-client":Q_()},signal:o});if(u.status===401)throw Y_(),new Fa("Read session expired.",401,s);if(!u.ok)throw new Fa(`GET ${s} failed (HTTP ${u.status}).`,u.status,s);return await u.json()}async function Pb(s,o,u){const r=await fetch(s,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","x-ashlr-token":u},body:JSON.stringify(o??{})});if(r.status===404)throw new Nd(s);if(r.status===401)throw new Fa("Mutation token was rejected.",401,s);if(!r.ok){let d="";try{const h=await r.json();d=h.error?`: ${h.error}`:""}catch{}throw new Fa(`POST ${s} failed (HTTP ${r.status})${d}.`,r.status,s)}if(r.status!==204)return await r.json()}const Zn={key:"dashboard-snapshot",fetch:s=>mt("/api/snapshot",s)},si={key:"control-snapshot",fetch:s=>mt("/api/control",s)},wd={key:"runs",fetch:s=>mt("/api/runs",s)};function eg(s){return{key:`run-detail-${s}`,fetch:o=>mt(`/api/run/${encodeURIComponent(s)}`,o)}}const ej={key:"swarms",fetch:s=>mt("/api/swarms",s)};function tj(s){return{key:`swarm-detail-${s}`,fetch:o=>mt(`/api/swarm/${encodeURIComponent(s)}`,o)}}const lj={key:"daemon",fetch:s=>mt("/api/daemon-observation",s)},nd={key:"fleet",fetch:s=>mt("/api/fleet",s)},tg={key:"fleet-activity",fetch:s=>mt("/api/fleet-activity",s)},nj={key:"goals",fetch:s=>mt("/api/goals",s)},aj={key:"vision-mission",fetch:s=>mt("/api/vision/mission",s)},lg={key:"inbox",fetch:s=>mt("/api/inbox",s)};function sj(s={}){const o=new URLSearchParams;s.status!==void 0&&o.set("status",s.status),s.since!==void 0&&o.set("since",s.since),s.limit!==void 0&&o.set("limit",String(s.limit));const u=o.toString();return{key:`inbox-list:${s.status??"pending"}:${s.since??""}:${s.limit??""}`,fetch:r=>mt(`/api/inbox${u?`?${u}`:""}`,r)}}function ng(s){return{key:`proposal-detail-${s}`,fetch:o=>mt(`/api/inbox/${encodeURIComponent(s)}`,o)}}const Fp={key:"control-logs-observation",fetch:s=>mt("/api/logs-observation?tail=200",s)};function ij(s){return{key:`pulse-${s}`,fetch:o=>mt(`/api/pulse?window=${s}`,o)}}function cj(s){return typeof s=="object"&&s!==null&&"entry"in s&&"score"in s}function oj(s){const o=s.trim();return{key:o?`genome-search-${o}`:"genome-list",fetch:u=>mt(o?`/api/genome?q=${encodeURIComponent(o)}`:"/api/genome",u)}}function rj(s){return{key:`models-${s}`,fetch:o=>mt(`/api/models?window=${s}`,o)}}const uj={key:"portfolio",fetch:s=>mt("/api/portfolio",s)},dj=8e3;function fj(){const s=Ce(si),o=Ce(nd),u=Ce(wd),r=Ce(lg),d=Zc(si),h=Zc(nd);y.useEffect(()=>{const b=setInterval(()=>{d(),h()},dj);return()=>clearInterval(b)},[d,h]);const m=s.data,v=o.data,g=u.data,p=r.data;y.useEffect(()=>{rb(lb({control:m,fleet:v,runs:g,inbox:p}))},[m,v,g,p])}const hj="_drawer_itt3q_1",mj="_titleRow_itt3q_16",pj="_closeBtn_itt3q_23",_j="_header_itt3q_37",gj="_desktopToggle_itt3q_42",vj="_clear_itt3q_57",yj="_list_itt3q_66",xj="_journalLink_itt3q_77",bn={drawer:hj,titleRow:mj,closeBtn:pj,header:_j,desktopToggle:gj,clear:vj,list:yj,journalLink:xj};function bj(){fj();const{items:s,panelOpen:o,desktopEnabled:u,desktopPermission:r}=I_(),d=y.useRef(null);async function h(){u?pb():await mb()}return a.jsxs(di,{open:o,onClose:Lu,titleId:"notification-center-title",title:a.jsxs("span",{className:bn.titleRow,children:[a.jsx("span",{children:"Notifications"}),a.jsx("button",{type:"button",ref:d,className:bn.closeBtn,onClick:Lu,"aria-label":"Close notifications",children:"×"})]}),widthClassName:bn.drawer,initialFocusRef:d,children:[a.jsx("div",{className:bn.header,children:a.jsx("button",{type:"button",className:bn.desktopToggle,onClick:()=>void h(),disabled:r==="unsupported"||r==="denied",children:r==="unsupported"?"Desktop alerts not supported in this browser":r==="denied"?"Desktop alerts blocked in browser settings":u?"🔔 Desktop alerts on":"🔕 Desktop alerts off — enable"})}),s.length===0?a.jsxs("div",{className:bn.clear,children:[a.jsx("strong",{children:"Nothing needs you right now."}),a.jsx("span",{children:"The fleet is operating within its observed authority."})]}):a.jsx("ul",{className:bn.list,children:s.map(m=>a.jsx("li",{children:a.jsx(Ib,{item:m})},m.id))}),a.jsx("a",{href:"#/journal",className:bn.journalLink,onClick:Lu,children:"See full history in the Work Journal →"})]})}const jj="_topbar_nwlse_1",Sj="_paletteTrigger_nwlse_12",Nj="_kbd_nwlse_32",wj="_actions_nwlse_41",Tj="_lockedIndicator_nwlse_47",Ej="_lockBtn_nwlse_52",kj="_themeBtn_nwlse_60",Yn={topbar:jj,paletteTrigger:Sj,kbd:Nj,actions:wj,lockedIndicator:Tj,lockBtn:Ej,themeBtn:kj},ag="ashlr.theme.v1";function Aj(s){const o=document.documentElement;s==="system"?o.removeAttribute("data-theme"):o.setAttribute("data-theme",s)}function Rj(){try{const s=localStorage.getItem(ag);if(s==="light"||s==="dark"||s==="system")return s}catch{}return"system"}function Cj({onOpenPalette:s}){const[o,u]=y.useState(Rj),r=bd();y.useEffect(()=>{Aj(o);try{localStorage.setItem(ag,o)}catch{}},[o]);function d(){u(h=>h==="system"?"light":h==="light"?"dark":"system")}return a.jsxs("header",{className:Yn.topbar,children:[a.jsxs("button",{type:"button",className:Yn.paletteTrigger,onClick:s,children:[a.jsx("span",{children:"Search or run a command"}),a.jsx("kbd",{className:Yn.kbd,children:"⌘K"})]}),a.jsxs("div",{className:Yn.actions,children:[a.jsx(yb,{}),r.hasHold?a.jsx("button",{type:"button",className:Yn.lockBtn,onClick:r.clear,title:"Lock actions now",children:"🔓 Unlocked"}):a.jsx("span",{className:Yn.lockedIndicator,title:"Actions require the dispatch token",children:"🔒 Locked"}),a.jsx("button",{type:"button",className:Yn.themeBtn,onClick:d,"aria-label":`Theme: ${o}`,children:o==="system"?"🖥️":o==="light"?"☀️":"🌙"})]}),a.jsx(bj,{})]})}class Dj extends Error{constructor(){super("No mutation token held for this session yet."),this.name="MissingMutationTokenError"}}async function no(s,o){const u=V_();if(!u)throw new Dj;const r=await Pb(s,o,u);return K_(),r}async function sg(){await no("/api/fleet/pause",{}),wt("dashboard-snapshot"),wt("control-snapshot"),wt("fleet"),wt("fleet-activity")}async function ig(){await no("/api/fleet/resume",{}),wt("dashboard-snapshot"),wt("control-snapshot"),wt("fleet"),wt("fleet-activity")}async function cg(s){await no(`/api/inbox/${encodeURIComponent(s)}/approve`,{}),wt("inbox"),wt("dashboard-snapshot"),wt(`proposal-detail-${s}`),Xc("inbox-list:")}async function og(s){await no(`/api/inbox/${encodeURIComponent(s)}/reject`,{}),wt("inbox"),wt("dashboard-snapshot"),wt(`proposal-detail-${s}`),Xc("inbox-list:")}const Mj=q_.map(s=>({id:`nav:${s.path}`,title:s.label,subtitle:s.description,group:"Navigate",run:o=>o(s.path)})),$j=[{id:"action:pause-fleet",title:"Pause fleet",subtitle:"Engage the fleet kill switch",group:"Actions",keywords:["stop","kill","halt"],requiresMutationToken:!0,run:async()=>{await sg()}},{id:"action:resume-fleet",title:"Resume fleet",subtitle:"Clear the fleet kill switch",group:"Actions",keywords:["start","unpause"],requiresMutationToken:!0,run:async()=>{await ig()}},{id:"action:open-notifications",title:"Open notification centre",subtitle:"What needs you right now, ranked by severity",group:"Actions",keywords:["alerts","attention","bell","needs you"],run:()=>{ub()}}],Wp=[...Mj,...$j];function Lj(s){const o=s.trim().toLowerCase();return o?Wp.filter(u=>{const r=[u.title,u.subtitle??"",...u.keywords??[]].join(" ").toLowerCase();return o.split(/\s+/).every(d=>r.includes(d))}):Wp}const Oj="_body_1kukj_1",zj="_form_1kukj_8",Uj="_label_1kukj_14",Bj="_inputRow_1kukj_19",Hj="_input_1kukj_19",qj="_reveal_1kukj_40",Gj="_error_1kukj_51",Qj="_actions_1kukj_56",Yj="_cancel_1kukj_63",Vj="_submit_1kukj_72",Sl={body:Oj,form:zj,label:Uj,inputRow:Bj,input:Hj,reveal:qj,error:Gj,actions:Qj,cancel:Yj,submit:Vj},Xj=/^[a-f0-9]{64}$/;function ao({open:s,onClose:o,onUnlocked:u,reason:r}){const{setToken:d}=bd(),[h,m]=y.useState(""),[v,g]=y.useState(!1),[p,b]=y.useState(null),x=y.useRef(null),w=y.useId(),z=y.useId();function L(D){D.preventDefault();const T=h.trim();if(!Xj.test(T)){b("Expected 64 hex characters — the mutation token ashlr serve printed.");return}d(T),m(""),b(null),o(),u?.()}return a.jsxs(di,{open:s,onClose:o,titleId:w,title:"Unlock actions",initialFocusRef:x,children:[a.jsxs("p",{className:Sl.body,children:[r??"This action mutates the fleet and requires the dispatch token."," It is held in memory only, for this browser tab, and is cleared automatically after 20 minutes idle."]}),a.jsxs("form",{onSubmit:L,className:Sl.form,noValidate:!0,children:[a.jsx("label",{htmlFor:z,className:Sl.label,children:"Mutation token"}),a.jsxs("div",{className:Sl.inputRow,children:[a.jsx("input",{ref:x,id:z,type:v?"text":"password",autoComplete:"off",autoCorrect:"off",spellCheck:!1,className:Sl.input,value:h,onChange:D=>m(D.target.value),"aria-invalid":p?!0:void 0,placeholder:"64 hex characters"}),a.jsx("button",{type:"button",className:Sl.reveal,onClick:()=>g(D=>!D),"aria-pressed":v,children:v?"Hide":"Show"})]}),p?a.jsx("p",{className:Sl.error,role:"alert",children:p}):null,a.jsxs("div",{className:Sl.actions,children:[a.jsx("button",{type:"button",className:Sl.cancel,onClick:o,children:"Cancel"}),a.jsx("button",{type:"submit",className:Sl.submit,disabled:h.trim().length===0,children:"Unlock"})]})]})]})}const Kj="_region_1s6sa_1",Zj="_toast_1s6sa_12",Jj="_success_1s6sa_27",Fj="_danger_1s6sa_30",Wj="_dismiss_1s6sa_34",Cc={region:Kj,toast:Zj,"slide-in":"_slide-in_1s6sa_1",success:Jj,danger:Fj,dismiss:Wj},rg=y.createContext(null);function Ij(){const s=y.useContext(rg);if(!s)throw new Error("useToast() called outside <ToastProvider>");return s}const Pj=5e3;function e0({children:s}){const[o,u]=y.useState([]),r=y.useRef(0),d=y.useCallback(v=>{u(g=>g.filter(p=>p.id!==v))},[]),h=y.useCallback((v,g="neutral")=>{const p=r.current++;u(b=>[...b,{id:p,message:v,tone:g}]),setTimeout(()=>d(p),Pj)},[d]),m=y.useMemo(()=>({show:h}),[h]);return a.jsxs(rg.Provider,{value:m,children:[s,a.jsx("div",{className:Cc.region,role:"status","aria-live":"polite",children:o.map(v=>a.jsxs("div",{className:`${Cc.toast} ${Cc[v.tone]}`,children:[a.jsx("span",{children:v.message}),a.jsx("button",{type:"button",className:Cc.dismiss,onClick:()=>d(v.id),"aria-label":"Dismiss",children:"×"})]},v.id))})]})}const t0="_backdrop_1odjm_1",l0="_panel_1odjm_12",n0="_input_1odjm_24",a0="_list_1odjm_37",s0="_item_1odjm_42",i0="_active_1odjm_51",c0="_itemTitle_1odjm_55",o0="_itemSubtitle_1odjm_61",r0="_itemGroup_1odjm_67",u0="_empty_1odjm_75",Nl={backdrop:t0,panel:l0,input:n0,list:a0,item:s0,active:i0,itemTitle:c0,itemSubtitle:o0,itemGroup:r0,empty:u0};function d0(s){y.useEffect(()=>{function o(u){(u.metaKey||u.ctrlKey)&&u.key.toLowerCase()==="k"&&(u.preventDefault(),s(!0))}return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[s])}function f0({open:s,onClose:o}){const[u,r]=y.useState(""),[d,h]=y.useState(0),[m,v]=y.useState(null),g=y.useRef(null),p=y.useRef(null),b=y.useRef(null),x=y.useId(),w=Ic(),z=Ij(),L=y.useMemo(()=>Lj(u),[u]);y.useEffect(()=>(s&&(b.current=document.activeElement instanceof HTMLElement?document.activeElement:null,r(""),h(0),requestAnimationFrame(()=>g.current?.focus())),()=>{s&&b.current?.focus()}),[s]),y.useEffect(()=>{if(!s)return;function C(G){if(G.key!=="Tab")return;const Y=p.current?.querySelectorAll('input, button, [href], [tabindex]:not([tabindex="-1"])');if(!Y?.length)return;const F=Y[0],q=Y[Y.length-1];G.shiftKey&&document.activeElement===F?(G.preventDefault(),q?.focus()):!G.shiftKey&&document.activeElement===q&&(G.preventDefault(),F?.focus())}return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[s]),y.useEffect(()=>{h(0)},[u]);async function D(C){if(C.requiresMutationToken&&!Za()){v(C),o();return}o();try{await C.run(G=>w(G))}catch(G){z.show(G instanceof Error?G.message:"Command failed.","danger")}}function T(C){if(C.key==="Escape"){o();return}if(C.key==="ArrowDown")C.preventDefault(),h(G=>Math.min(G+1,L.length-1));else if(C.key==="ArrowUp")C.preventDefault(),h(G=>Math.max(G-1,0));else if(C.key==="Enter"){C.preventDefault();const G=L[d];G&&D(G)}}return s?B_.createPortal(a.jsx("div",{className:Nl.backdrop,onMouseDown:C=>C.target===C.currentTarget&&o(),children:a.jsxs("div",{ref:p,className:Nl.panel,role:"dialog","aria-modal":"true","aria-label":"Command palette",children:[a.jsx("input",{ref:g,className:Nl.input,value:u,onChange:C=>r(C.target.value),onKeyDown:T,placeholder:"Navigate or run a command…",role:"combobox","aria-expanded":"true","aria-controls":x,"aria-activedescendant":L[d]?`cmd-${L[d].id}`:void 0,autoComplete:"off"}),a.jsx("ul",{id:x,role:"listbox",className:Nl.list,children:L.length===0?a.jsx("li",{className:Nl.empty,children:"No matching commands."}):L.map((C,G)=>a.jsxs("li",{id:`cmd-${C.id}`,role:"option","aria-selected":G===d,className:`${Nl.item} ${G===d?Nl.active:""}`,onMouseEnter:()=>h(G),onMouseDown:Y=>{Y.preventDefault(),D(C)},children:[a.jsx("span",{className:Nl.itemTitle,children:C.title}),C.subtitle?a.jsx("span",{className:Nl.itemSubtitle,children:C.subtitle}):null,a.jsx("span",{className:Nl.itemGroup,children:C.group})]},C.id))})]})}),document.body):m?a.jsx(ao,{open:!0,reason:`"${m.title}" requires the dispatch token.`,onClose:()=>v(null),onUnlocked:()=>{const C=m;v(null),D(C)}}):null}const h0="_wrap_1759l_1",m0="_title_1759l_14",p0="_detail_1759l_21",_0="_retry_1759l_27",Dc={wrap:h0,title:m0,detail:p0,retry:_0};class g0 extends y.Component{state={error:null};static getDerivedStateFromError(o){return{error:o}}componentDidCatch(o,u){console.error("[ashlr] view crashed while rendering",o,u.componentStack)}componentDidUpdate(o){this.state.error&&o.resetKey!==this.props.resetKey&&this.setState({error:null})}render(){return this.state.error?a.jsxs("div",{className:Dc.wrap,role:"alert",children:[a.jsx("p",{className:Dc.title,children:"This view hit an error and couldn't render."}),a.jsxs("p",{className:Dc.detail,children:[this.state.error.message||"Unknown error."," — the rest of ashlr is still working; pick another view from the sidebar, or retry this one."]}),a.jsx("button",{type:"button",className:Dc.retry,onClick:()=>this.setState({error:null}),children:"Retry this view"})]}):this.props.children}}const Bu=new Map;function Ip(s){const o=document.activeElement,u=o instanceof HTMLElement&&s.contains(o)?o.getAttribute("data-focus-key"):null,r=new Map;return s.querySelectorAll("details[data-state-key]").forEach(d=>{const h=d.getAttribute("data-state-key");h&&r.set(h,d.open)}),{scrollTop:s.scrollTop,focusKey:u,details:r}}function v0(s,o){if(s.querySelectorAll("details[data-state-key]").forEach(r=>{const d=r.getAttribute("data-state-key");d&&o.details.has(d)&&(r.open=o.details.get(d))}),s.scrollTop=o.scrollTop,!o.focusKey)return;const u=s.querySelector(`[data-focus-key="${CSS.escape(o.focusKey)}"]`);if(u){try{u.focus({preventScroll:!0})}catch{u.focus()}s.scrollTop=o.scrollTop}}function Zl(s,o){const u=y.useRef(s);u.current=s,y.useLayoutEffect(()=>{const r=o.current;if(!r)return;const d=Bu.get(s);d&&v0(r,d)},[s]),y.useEffect(()=>{const r=o.current;if(!r)return;let d=0;function h(){cancelAnimationFrame(d),d=requestAnimationFrame(()=>{r&&Bu.set(u.current,Ip(r))})}return r.addEventListener("scroll",h,{passive:!0}),document.addEventListener("focusout",h),document.addEventListener("toggle",h,!0),()=>{cancelAnimationFrame(d),r.removeEventListener("scroll",h),document.removeEventListener("focusout",h),document.removeEventListener("toggle",h,!0),Bu.set(u.current,Ip(r))}},[o])}const y0="_shell_2db09_1",x0="_body_2db09_9",b0="_main_2db09_17",Hu={shell:y0,body:x0,main:b0};function j0(){const s=y.useRef(null),o=gl(),[u,r]=y.useState(!1);return Zl(o.pathname,s),d0(r),a.jsxs("div",{className:Hu.shell,children:[a.jsx(O1,{}),a.jsxs("div",{className:Hu.body,children:[a.jsx(Cj,{onOpenPalette:()=>r(!0)}),a.jsx("main",{ref:s,className:Hu.main,id:"main-content",tabIndex:-1,children:a.jsx(g0,{resetKey:o.pathname,children:a.jsx(Xx,{})})})]}),a.jsx(f0,{open:u,onClose:()=>r(!1)})]})}const S0="_wrap_152mr_1",N0="_title_152mr_6",w0="_description_152mr_13",T0="_note_152mr_19",Mc={wrap:S0,title:N0,description:w0,note:T0};function E0({title:s,description:o}){return a.jsxs("div",{className:Mc.wrap,children:[a.jsx("h1",{className:Mc.title,children:s}),a.jsx("p",{className:Mc.description,children:o}),a.jsx("p",{className:Mc.note,children:"Not built yet — this route, its nav entry, and its ⌘K command all already work."})]})}const k0="_root_15oa4_1",A0="_spinner_15oa4_9",Pp={root:k0,spinner:A0};function Tt({label:s="Refreshing"}){return a.jsxs("span",{className:Pp.root,role:"status","aria-live":"polite",children:[a.jsx("span",{className:Pp.spinner,"aria-hidden":"true"}),a.jsx("span",{className:"visually-hidden",children:s})]})}const R0="_grid_6kplz_1",C0="_card_6kplz_7",D0="_title_6kplz_17",M0="_stat_6kplz_23",$0="_caption_6kplz_29",L0="_line_6kplz_35",O0="_row_6kplz_40",z0="_cell_6kplz_48",pl={grid:R0,card:C0,title:D0,stat:M0,caption:$0,line:L0,row:O0,cell:z0};function tt({width:s="100%"}){return a.jsx("div",{className:`skeleton ${pl.line}`,style:{width:s}})}function U0(){return a.jsxs("div",{className:pl.card,children:[a.jsx("div",{className:`skeleton ${pl.title}`}),a.jsx("div",{className:`skeleton ${pl.stat}`}),a.jsx("div",{className:`skeleton ${pl.caption}`})]})}function ct(){return a.jsxs("div",{className:pl.row,children:[a.jsx("div",{className:`skeleton ${pl.cell}`,style:{width:"18%"}}),a.jsx("div",{className:`skeleton ${pl.cell}`,style:{width:"38%"}}),a.jsx("div",{className:`skeleton ${pl.cell}`,style:{width:"14%"}}),a.jsx("div",{className:`skeleton ${pl.cell}`,style:{width:"10%"}})]})}function ii({count:s=4}){return a.jsx("div",{className:pl.grid,children:Array.from({length:s},(o,u)=>a.jsx(U0,{},u))})}const B0="_grid_1exd8_1",H0="_stat_1exd8_7",q0="_statLabel_1exd8_17",G0="_statValue_1exd8_24",Q0="_statCaption_1exd8_30",li={grid:B0,stat:H0,statLabel:q0,statValue:G0,statCaption:Q0};function Y0(){return a.jsx(ii,{count:6})}function Ua({label:s,value:o,caption:u}){return a.jsxs("div",{className:li.stat,children:[a.jsx("span",{className:li.statLabel,children:s}),a.jsx("span",{className:li.statValue,children:o}),u?a.jsx("span",{className:li.statCaption,children:u}):null]})}function V0({snapshot:s}){const o=s.mcp.filter(u=>u.ok).length;return a.jsxs("div",{className:li.grid,children:[a.jsx(Ua,{label:"Repos",value:String(s.repos.total),caption:`${s.repos.dirty} dirty · ${s.repos.stale} stale`}),a.jsx(Ua,{label:"Tools",value:`${s.tools.installed}/${s.tools.total}`,caption:"installed"}),a.jsx(Ua,{label:"Activity",value:String(s.activity.sessions),caption:`${s.activity.tokens.toLocaleString()} tok · $${s.activity.estCostUsd.toFixed(2)}`}),a.jsx(Ua,{label:"MCP",value:`${o}/${s.mcp.length}`,caption:"reachable"}),a.jsx(Ua,{label:"Genome",value:String(s.genome.entries),caption:`${s.genome.projects} projects`}),a.jsx(Ua,{label:"Inbox",value:String(s.inbox.pending),caption:"pending"})]})}const X0="_panel_1gx0q_3",K0="_panelHeader_1gx0q_10",Z0="_panelTitle_1gx0q_25",J0="_panelBody_1gx0q_33",F0="_emptyState_1gx0q_37",et={panel:X0,panelHeader:K0,panelTitle:Z0,panelBody:J0,emptyState:F0},W0="_table_78j3m_1",I0="_statusCol_78j3m_27",P0="_tokensCol_78j3m_31",eS="_goalLink_78j3m_35",tS="_tokens_78j3m_31",Fs={table:W0,statusCol:I0,tokensCol:P0,goalLink:eS,tokens:tS};function lS(){return a.jsxs("details",{className:et.panel,open:!0,"data-state-key":"fleet-dashboard-runs",children:[a.jsx("summary",{className:et.panelHeader,children:a.jsx("span",{className:et.panelTitle,children:"Recent runs"})}),a.jsxs("div",{className:et.panelBody,children:[a.jsx(ct,{}),a.jsx(ct,{}),a.jsx(ct,{})]})]})}function nS({runs:s}){return a.jsxs("details",{className:et.panel,open:!0,"data-state-key":"fleet-dashboard-runs",children:[a.jsxs("summary",{className:et.panelHeader,children:[a.jsx("span",{className:et.panelTitle,children:"Recent runs"}),a.jsx("span",{className:"text-tertiary text-xs",children:s.length})]}),a.jsx("div",{className:et.panelBody,children:s.length===0?a.jsx("p",{className:et.emptyState,children:"No runs yet."}):a.jsxs("table",{className:Fs.table,children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{scope:"col",children:"Goal"}),a.jsx("th",{scope:"col",className:Fs.statusCol,children:"Status"}),a.jsx("th",{scope:"col",className:Fs.tokensCol,children:"Tokens"})]})}),a.jsx("tbody",{children:s.map(o=>a.jsxs("tr",{children:[a.jsx("td",{children:a.jsx("a",{href:`#/work/runs/${o.id}`,"data-focus-key":`run-${o.id}`,className:Fs.goalLink,title:o.goal,children:o.goal})}),a.jsx("td",{children:a.jsx(We,{status:o.status})}),a.jsx("td",{className:Fs.tokens,children:o.tokens.toLocaleString()})]},o.id))})]})})]})}const aS="_list_1fq6m_1",sS="_item_1fq6m_7",iS="_itemHeader_1fq6m_13",cS="_goal_1fq6m_21",oS="_burndown_1fq6m_42",rS="_burndownTrack_1fq6m_48",uS="_burndownFill_1fq6m_56",dS="_burndownLabel_1fq6m_63",jn={list:aS,item:sS,itemHeader:iS,goal:cS,burndown:oS,burndownTrack:rS,burndownFill:uS,burndownLabel:dS};function fS({swarms:s}){return a.jsxs("details",{className:et.panel,open:!0,"data-state-key":"fleet-dashboard-swarms",children:[a.jsxs("summary",{className:et.panelHeader,children:[a.jsx("span",{className:et.panelTitle,children:"Swarms"}),a.jsx("span",{className:"text-tertiary text-xs",children:s.length})]}),a.jsx("div",{className:et.panelBody,children:s.length===0?a.jsx("p",{className:et.emptyState,children:"No active swarms."}):a.jsx("ul",{className:jn.list,children:s.map((o,u)=>{const r=o.tasksTotal>0?Math.round(o.tasksDone/o.tasksTotal*100):0;return a.jsxs("li",{className:jn.item,children:[a.jsxs("a",{href:`#/work/swarms/${o.id}`,"data-focus-key":`swarm-${o.id}`,className:jn.itemHeader,title:o.goal,children:[o.phase?a.jsx(Hb,{index:u}):null,a.jsx("span",{className:jn.goal,children:o.goal}),a.jsx(We,{status:o.status})]}),a.jsxs("div",{className:jn.burndown,children:[a.jsx("div",{className:jn.burndownTrack,children:a.jsx("div",{className:jn.burndownFill,style:{width:`${r}%`}})}),a.jsxs("span",{className:jn.burndownLabel,children:[o.tasksDone,"/",o.tasksTotal,o.phase?` · ${o.phase}`:""]})]})]},o.id)})})})]})}const hS="_grid_qy4m7_1",mS={grid:hS};function pS(){return a.jsxs("details",{className:et.panel,open:!0,"data-state-key":"fleet-dashboard-daemon",children:[a.jsx("summary",{className:et.panelHeader,children:a.jsx("span",{className:et.panelTitle,children:"Daemon"})}),a.jsx("div",{className:et.panelBody,children:a.jsx(tt,{width:"40%"})})]})}function _S({daemon:s}){return a.jsxs("details",{className:et.panel,open:!0,"data-state-key":"fleet-dashboard-daemon",children:[a.jsxs("summary",{className:et.panelHeader,children:[a.jsx("span",{className:et.panelTitle,children:"Daemon"}),a.jsx(Re,{quality:s.sourceQuality,label:"daemon state",children:a.jsx(We,{status:s.running?"running":"pending",children:s.running?"running":"stopped"})})]}),a.jsx("div",{className:et.panelBody,children:a.jsxs("dl",{className:mS.grid,children:[a.jsxs("div",{children:[a.jsx("dt",{children:"Runtime state"}),a.jsx("dd",{children:a.jsx(Re,{quality:s.sourceQuality,label:"runtime state",children:s.runtimeState})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"PID"}),a.jsx("dd",{children:a.jsx(Re,{quality:s.sourceQuality,label:"pid",children:s.pid??"—"})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Today's spend"}),a.jsx("dd",{children:a.jsxs(Re,{quality:s.sourceQuality,label:"spend",children:["$",s.todaySpentUsd.toFixed(2)]})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Direction mode"}),a.jsx("dd",{children:a.jsx(Re,{quality:s.sourceQuality,label:"direction mode",children:s.activeDirectionMode??"none"})})]})]})})]})}const gS="_view_1nttk_1",vS="_header_1nttk_8",yS="_title_1nttk_14",xS="_freshness_1nttk_20",bS="_freshnessLabel_1nttk_26",jS="_panels_1nttk_32",SS="_error_1nttk_39",Kn={view:gS,header:vS,title:yS,freshness:xS,freshnessLabel:bS,panels:jS,error:SS};function NS(){const s=Ce(Zn),o=Ce(si);return a.jsxs("div",{className:Kn.view,children:[a.jsxs("header",{className:Kn.header,children:[a.jsx("h1",{className:Kn.title,children:"Fleet Dashboard"}),a.jsxs("div",{className:Kn.freshness,"aria-live":"polite",children:[s.status==="refreshing"?a.jsx(Tt,{}):null,s.updatedAt?a.jsxs("span",{className:Kn.freshnessLabel,children:["Updated ",wS(s.updatedAt)]}):null]})]}),s.status==="loading"?a.jsx(Y0,{}):s.status==="error"?a.jsx(e_,{message:s.error?.message??"Failed to load snapshot."}):s.data?a.jsx(V0,{snapshot:s.data}):null,a.jsxs("div",{className:Kn.panels,children:[s.status==="loading"?a.jsx(lS,{}):s.data?a.jsx(nS,{runs:s.data.runs}):null,s.data?a.jsx(fS,{swarms:s.data.swarms}):null,o.status==="loading"?a.jsx(pS,{}):o.status==="error"?a.jsx(e_,{message:o.error?.message??"Failed to load control snapshot."}):o.data?a.jsx(_S,{daemon:o.data.daemon}):null]})]})}function e_({message:s}){return a.jsx("div",{className:Kn.error,role:"alert",children:s})}function wS(s){const o=Math.max(0,Math.round((Date.now()-s)/1e3));return o<5?"just now":o<60?`${o}s ago`:`${Math.round(o/60)}m ago`}const Jc=2e3,TS=Jc*4;function ES(s){return s?`${s.status}:${s.steps.length}:${s.updatedAt}`:null}function kS(s){const o=y.useMemo(()=>eg(s),[s]),u=Ce(o),r=Zc(o),[d,h]=y.useState(null),[m,v]=y.useState(null),[,g]=y.useState(0),p=ES(u.data);y.useEffect(()=>{p!==null&&h(Date.now())},[p]);const b=u.data?u.data.status!=="running":!1,x=u.error instanceof Fa&&u.error.status===404;y.useEffect(()=>{if(b||x)return;const z=setInterval(()=>{r(),v(Date.now()),g(L=>L+1)},Jc);return()=>clearInterval(z)},[r,b,x]);let w;return x?w="not-found":u.status==="error"&&u.data===void 0?w="error":u.status==="loading"?w="connecting":u.data?u.data.status!=="running"?w="done":d!==null&&Date.now()-d>TS?w="stalled":w="live":w="connecting",{phase:w,run:u.data,error:u.error,lastChangedAt:d,lastPolledAt:m,pollNow:()=>{r(),v(Date.now())}}}const AS="_panel_15uot_1",RS="_header_15uot_12",CS="_headerTop_15uot_18",DS="_title_15uot_25",MS="_statRow_15uot_35",$S="_banner_15uot_53",LS="_bannerWarning_15uot_64",OS="_bannerDanger_15uot_69",zS="_bannerDot_15uot_74",US="_transcript_15uot_102",BS="_empty_15uot_120",HS="_step_15uot_127",qS="_stepKind_15uot_140",GS="_stepTime_15uot_160",QS="_stepTask_15uot_164",YS="_stepSummary_15uot_171",VS="_stepUsage_15uot_176",ze={panel:AS,header:RS,headerTop:CS,title:DS,statRow:MS,banner:$S,bannerWarning:LS,bannerDanger:OS,bannerDot:zS,transcript:US,empty:BS,step:HS,stepKind:qS,stepTime:GS,stepTask:QS,stepSummary:YS,stepUsage:VS},XS={plan:"Plan",model:"Model",tool:"Tool",synthesize:"Synthesize"};function KS(s,o){const u=new Date(s).getTime(),r=o?new Date(o).getTime():Date.now(),d=Math.max(0,Math.round((r-u)/1e3));if(d<60)return`${d}s`;const h=Math.floor(d/60),m=d%60;return`${h}m ${m}s`}function ZS(s){try{return new Date(s).toLocaleTimeString(void 0,{hour12:!1})}catch{return s}}function JS({phase:s,lastChangedAt:o,error:u}){if(s==="connecting")return a.jsxs("div",{className:ze.banner,role:"status",children:[a.jsx("span",{className:ze.bannerDot,"data-tone":"connecting","aria-hidden":"true"}),"Connecting to run…"]});if(s==="not-found")return a.jsxs("div",{className:`${ze.banner} ${ze.bannerDanger}`,role:"alert",children:[a.jsx("span",{className:ze.bannerDot,"data-tone":"danger","aria-hidden":"true"}),"Run not found. It may have been pruned from disk since this link was opened."]});if(s==="error")return a.jsxs("div",{className:`${ze.banner} ${ze.bannerDanger}`,role:"alert",children:[a.jsx("span",{className:ze.bannerDot,"data-tone":"danger","aria-hidden":"true"}),"Stream disconnected",u?`: ${u.message}`:"",". Retrying every ",Jc/1e3,"s…"]});if(s==="stalled"){const r=o?Math.round((Date.now()-o)/1e3):null;return a.jsxs("div",{className:`${ze.banner} ${ze.bannerWarning}`,role:"status","aria-live":"polite",children:[a.jsx("span",{className:ze.bannerDot,"data-tone":"warning","aria-hidden":"true"}),"No change observed",r!==null?` in ${r}s`:""," — this run may be stalled, or is simply quiet between steps. Still polling."]})}return s==="live"?a.jsxs("div",{className:ze.banner,role:"status",children:[a.jsx("span",{className:ze.bannerDot,"data-tone":"live","aria-hidden":"true"}),"Live · polling every ",Jc/1e3,"s (server refresh floor ~1.5s — this cannot be faster than that)"]}):a.jsxs("div",{className:ze.banner,role:"status",children:[a.jsx("span",{className:ze.bannerDot,"data-tone":"done","aria-hidden":"true"}),"Run finished — no longer polling."]})}function FS(){return a.jsxs("div",{className:ze.panel,children:[a.jsx(tt,{width:"40%"}),a.jsx(tt,{width:"90%"}),a.jsx(tt,{width:"70%"})]})}function ug({runId:s}){const o=kS(s),{phase:u,run:r,error:d,lastChangedAt:h}=o,m=y.useRef(null),v=y.useRef(!0);y.useEffect(()=>{const p=m.current;!p||!v.current||(p.scrollTop=p.scrollHeight)},[r?.steps.length]);function g(){const p=m.current;if(!p)return;const b=p.scrollHeight-p.scrollTop-p.clientHeight;v.current=b<48}return!r&&u==="connecting"?a.jsx(FS,{}):a.jsxs("div",{className:ze.panel,children:[a.jsxs("header",{className:ze.header,children:[a.jsxs("div",{className:ze.headerTop,children:[a.jsx("h3",{className:ze.title,children:r?.goal??`Run ${s}`}),r?a.jsx(We,{status:r.status}):null]}),r?a.jsxs("dl",{className:ze.statRow,children:[a.jsxs("div",{children:[a.jsx("dt",{children:"Elapsed"}),a.jsx("dd",{children:KS(r.createdAt,r.status==="running"?void 0:r.updatedAt)})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Tokens"}),a.jsxs("dd",{children:[r.usage.tokensIn.toLocaleString()," in / ",r.usage.tokensOut.toLocaleString()," out"]})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Cost"}),a.jsxs("dd",{children:["$",r.usage.estCostUsd.toFixed(3)]})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Steps"}),a.jsx("dd",{children:r.steps.length})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Tasks"}),a.jsxs("dd",{children:[r.tasks.filter(p=>p.status==="done").length,"/",r.tasks.length]})]})]}):null]}),a.jsx(JS,{phase:u,lastChangedAt:h,error:d}),a.jsx("div",{ref:m,className:ze.transcript,onScroll:g,tabIndex:0,role:"log","aria-label":"Run step transcript",children:!r||r.steps.length===0?a.jsx("p",{className:ze.empty,children:"No steps recorded yet."}):r.steps.map((p,b)=>a.jsxs("div",{className:ze.step,"data-focus-key":`run-stream-step-${b}`,children:[a.jsx("span",{className:ze.stepKind,"data-kind":p.kind,children:XS[p.kind]??p.kind}),a.jsx("span",{className:ze.stepTime,title:p.ts,children:ZS(p.ts)}),a.jsx("span",{className:ze.stepTask,children:p.taskId}),a.jsx("span",{className:ze.stepSummary,children:p.summary}),p.usage?a.jsxs("span",{className:ze.stepUsage,children:[(p.usage.tokensIn+p.usage.tokensOut).toLocaleString()," tok"]}):null]},`${p.ts}-${b}`))})]})}const WS="_strip_21e8x_1",IS="_label_21e8x_11",PS="_list_21e8x_20",eN="_watchBtn_21e8x_29",tN="_pulse_21e8x_46",lN="_dialogWidth_21e8x_70",Ba={strip:WS,label:IS,list:PS,watchBtn:eN,pulse:tN,dialogWidth:lN};function nN(){const s=Ce(Zn),[o,u]=y.useState(null),r=(s.data?.runs??[]).filter(d=>d.status==="running");return r.length===0?null:a.jsxs("div",{className:Ba.strip,children:[a.jsx("span",{className:Ba.label,children:"Live now"}),a.jsx("ul",{className:Ba.list,children:r.map(d=>a.jsx("li",{children:a.jsxs("button",{type:"button",className:Ba.watchBtn,onClick:()=>u(d.id),children:[a.jsx("span",{className:Ba.pulse,"aria-hidden":"true"}),d.goal]})},d.id))}),a.jsx(di,{open:o!==null,onClose:()=>u(null),titleId:"live-now-title",title:"Watching live",widthClassName:Ba.dialogWidth,children:o?a.jsx(ug,{runId:o}):null})]})}const aN="_bar_1kce8_1",sN="_search_1kce8_12",iN="_sources_1kce8_28",cN="_sourceOption_1kce8_34",oN="_windowSelect_1kce8_43",Ws={bar:aN,search:sN,sources:iN,sourceOption:cN,windowSelect:oN},dg=[{value:"run",label:"Runs"},{value:"merge",label:"Merges"},{value:"proposal",label:"Proposals"},{value:"agent-action",label:"Agent actions"},{value:"daemon-tick",label:"Daemon ticks"}],t_=[{value:"1h",label:"Last hour",ms:3600*1e3},{value:"24h",label:"Last 24h",ms:1440*60*1e3},{value:"7d",label:"Last 7 days",ms:10080*60*1e3},{value:"all",label:"All available",ms:null}];function rN({sources:s,onSourcesChange:o,query:u,onQueryChange:r,windowValue:d,onWindowChange:h}){function m(v){const g=new Set(s);g.has(v)?g.delete(v):g.add(v),o(g)}return a.jsxs("div",{className:Ws.bar,children:[a.jsx("input",{type:"search",className:Ws.search,placeholder:"Search title, detail, repo…",value:u,onChange:v=>r(v.target.value),"aria-label":"Search the work journal"}),a.jsx("div",{className:Ws.sources,role:"group","aria-label":"Filter by source",children:dg.map(v=>a.jsxs("label",{className:Ws.sourceOption,children:[a.jsx("input",{type:"checkbox",checked:s.has(v.value),onChange:()=>m(v.value)}),v.label]},v.value))}),a.jsx("select",{className:Ws.windowSelect,value:d,onChange:v=>{const g=t_.find(p=>p.value===v.target.value);h(v.target.value,g?.ms??null)},"aria-label":"Time window",children:t_.map(v=>a.jsx("option",{value:v.value,children:v.label},v.value))})]})}const uN=new Set(dg.map(s=>s.value));function dN(s){switch(s){case"merge":return"merged";case"dispatch":return"running";case"tick":return"info";case"info":default:return"pending"}}function fN(s){const o=[];for(const[u,r]of(s.logs?.entries??[]).entries())o.push({id:`log-${r.ts}-${u}`,ts:r.ts,source:"daemon-tick",title:r.kind==="merge"?"Daemon merge":r.kind==="dispatch"?"Daemon dispatch":"Daemon tick",detail:r.msg+(r.dryRun?" (dry run)":""),statusLabel:dN(r.kind),sourceQuality:s.logs?.sourceQuality});for(const[u,r]of(s.fleetActivity?.recentTicks??[]).entries())o.push({id:`fleet-tick-${r.ts}-${u}`,ts:r.ts,source:"daemon-tick",title:"Fleet tick",detail:[r.reason,r.directionReason].filter(Boolean).join(" — ")||`${r.merged} merged, $${r.spentUsd.toFixed(2)} spent`,statusLabel:r.dryRun?"pending":"info",sourceQuality:s.fleetActivity?.recentTicksSourceQuality});for(const[u,r]of(s.fleetActivity?.recentMerges??[]).entries())o.push({id:`merge-${r.ts}-${u}`,ts:r.ts,source:"merge",title:`Merged in ${r.repo??"unknown repo"}`,detail:`${r.engine??"unknown engine"}${r.proposalId?` · proposal ${r.proposalId}`:""}`,repo:r.repo??void 0,statusLabel:"merged",sourceQuality:s.fleetActivity?.recentMergesSourceQuality,drillIn:r.proposalId?{proposalId:r.proposalId}:void 0});for(const[u,r]of(s.fleetActivity?.recentActions??[]).entries())o.push({id:`action-${r.ts}-${u}`,ts:r.ts,source:"agent-action",title:r.proseDigest??r.summary??r.action,detail:r.summary,repo:r.repo,statusLabel:r.outcome,drillIn:r.proposalId?{proposalId:r.proposalId}:r.runId?{runId:r.runId}:void 0});for(const u of s.runs??[])o.push({id:`run-${u.id}`,ts:u.updatedAt,source:"run",title:u.goal,detail:u.result??u.terminationReason??`${u.steps.length} step(s), ${u.tasks.length} task(s)`,statusLabel:u.status,drillIn:{runId:u.id}});for(const u of s.inbox?.proposals??[])o.push({id:`proposal-pending-${u.id}`,ts:u.createdAt,source:"proposal",title:u.title,detail:`${u.kind} · ${u.origin}`,repo:u.repo,statusLabel:"pending",drillIn:{proposalId:u.id}});return o.sort((u,r)=>new Date(r.ts).getTime()-new Date(u.ts).getTime()),o}function hN(s,o){const u=Date.now(),r=o.query.trim().toLowerCase();return s.filter(d=>!(!o.sources.has(d.source)||o.windowMs!==null&&u-new Date(d.ts).getTime()>o.windowMs||r&&!`${d.title} ${d.detail} ${d.repo??""} ${d.statusLabel}`.toLowerCase().includes(r)))}function mN(s,o){const u=Date.now(),r=3600*1e3,d=[];for(let h=o-1;h>=0;h--)d.push({bucketStartMs:u-h*r,count:0});for(const h of s){const m=new Date(h.ts).getTime(),v=u-m;if(v<0||v>o*r)continue;const g=o-1-Math.floor(v/r);g>=0&&g<d.length&&(d[g].count+=1)}return d}const pN="_strip_h22ae_1",_N="_bar_h22ae_12",gN="_fill_h22ae_33",qu={strip:pN,bar:_N,fill:gN};function vN({entries:s,hours:o,onScrubTo:u}){const r=mN(s,o),d=Math.max(1,...r.map(h=>h.count));return a.jsx("div",{className:qu.strip,role:"group","aria-label":`Activity density over the last ${o} hours`,children:r.map(h=>{const m=Math.round(h.count/d*100),v=new Date(h.bucketStartMs).toLocaleTimeString(void 0,{hour:"numeric"});return a.jsx("button",{type:"button",className:qu.bar,onClick:()=>u(h.bucketStartMs),disabled:h.count===0,title:`${v}: ${h.count} entr${h.count===1?"y":"ies"}`,"aria-label":`${v}: ${h.count} entries`,children:a.jsx("span",{className:qu.fill,style:{height:`${Math.max(m,h.count>0?8:0)}%`}})},h.bucketStartMs)})})}const yN="_detailBody_bgyq9_1",xN="_grid_bgyq9_10",bN="_rationale_bgyq9_27",jN="_diffDetails_bgyq9_34",SN="_diff_bgyq9_34",NN="_error_bgyq9_56",Vn={detailBody:yN,grid:xN,rationale:bN,diffDetails:jN,diff:SN,error:NN};function wN({proposalId:s}){const o=Ce(ng(s));if(o.status==="loading")return a.jsx(tt,{width:"80%"});if(o.status==="error")return a.jsxs("p",{className:Vn.error,children:["Could not load proposal ",s,": ",o.error?.message??"not found on disk (it may have been pruned)."]});const u=o.data;return u?a.jsxs("div",{className:Vn.detailBody,children:[a.jsxs("dl",{className:Vn.grid,children:[a.jsxs("div",{children:[a.jsx("dt",{children:"Status"}),a.jsx("dd",{children:a.jsx(We,{status:u.status})})]}),u.riskClass?a.jsxs("div",{children:[a.jsx("dt",{children:"Risk"}),a.jsx("dd",{children:u.riskClass})]}):null,u.taste?a.jsxs("div",{children:[a.jsx("dt",{children:"Judge verdict"}),a.jsxs("dd",{children:[u.taste.verdict," · alignment ",u.taste.alignment,"/10 · ambition ",u.taste.ambition,"/10 · design"," ",u.taste.design,"/10"]})]}):null,u.decisionReason?a.jsxs("div",{children:[a.jsx("dt",{children:"Decision"}),a.jsx("dd",{children:u.decisionReason})]}):null,u.learningSource?a.jsxs("div",{children:[a.jsx("dt",{children:"Learning source"}),a.jsx("dd",{children:u.learningSource})]}):null]}),u.taste?.rationale?a.jsx("p",{className:Vn.rationale,children:u.taste.rationale}):null,u.diff?a.jsxs("details",{className:Vn.diffDetails,children:[a.jsxs("summary",{children:["Diff (",u.diff.split(`
|
|
61
|
+
`).length," lines)"]}),a.jsx("pre",{className:Vn.diff,children:u.diff})]}):a.jsx("p",{className:Vn.error,children:"No diff recorded for this proposal."})]}):null}function TN({drillIn:s}){return s.runId?a.jsx(ug,{runId:s.runId}):s.proposalId?a.jsx(wN,{proposalId:s.proposalId}):null}const EN="_row_194dy_1",kN="_summary_194dy_9",AN="_sourceTag_194dy_31",RN="_when_194dy_53",CN="_repo_194dy_61",DN="_title_194dy_70",MN="_expandHint_194dy_80",$N="_body_194dy_86",LN="_detailText_194dy_90",Vl={row:EN,summary:kN,sourceTag:AN,when:RN,repo:CN,title:DN,expandHint:MN,body:$N,detailText:LN},ON={"daemon-tick":"Daemon",merge:"Merge","agent-action":"Agent",run:"Run",proposal:"Proposal"};function zN(s){const o=new Date(s);return`${o.toLocaleDateString(void 0,{month:"short",day:"numeric"})} ${o.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}`}function UN({entry:s}){const o=!!s.drillIn,[u,r]=y.useState(!1);return a.jsxs("details",{className:Vl.row,"data-state-key":`journal-${s.id}`,onToggle:d=>r(d.currentTarget.open),children:[a.jsxs("summary",{className:Vl.summary,"data-focus-key":`journal-${s.id}`,children:[a.jsx("span",{className:Vl.sourceTag,"data-source":s.source,children:ON[s.source]}),a.jsx("span",{className:Vl.when,title:s.ts,children:zN(s.ts)}),a.jsx(We,{status:s.statusLabel}),s.repo?a.jsx("span",{className:Vl.repo,children:s.repo}):null,a.jsx("span",{className:Vl.title,children:s.title}),a.jsx(Eb,{quality:s.sourceQuality}),o?a.jsx("span",{className:Vl.expandHint,"aria-hidden":"true",children:"why? ▾"}):null]}),a.jsxs("div",{className:Vl.body,children:[a.jsx("p",{className:Vl.detailText,children:s.detail}),u&&s.drillIn?a.jsx(TN,{drillIn:s.drillIn}):null]})]})}const BN="_view_1omi1_1",HN="_header_1omi1_9",qN="_title_1omi1_16",GN="_windowNote_1omi1_23",QN="_freshness_1omi1_30",YN="_freshnessLabel_1omi1_37",VN="_errorBanner_1omi1_42",XN="_panel_1omi1_50",KN="_list_1omi1_57",ZN="_empty_1omi1_63",fl={view:BN,header:HN,title:qN,windowNote:GN,freshness:QN,freshnessLabel:YN,errorBanner:VN,panel:XN,list:KN,empty:ZN},JN=8e3;function FN(s){const o=Math.max(0,Math.round((Date.now()-s)/1e3));return o<5?"just now":o<60?`${o}s ago`:`${Math.round(o/60)}m ago`}function WN(){const s=Ce(Fp),o=Ce(tg),u=Ce(wd),r=Ce(lg),d=Zc(Fp);y.useEffect(()=>{const q=setInterval(d,JN);return()=>clearInterval(q)},[d]);const[h,m]=y.useState(new Set(uN)),[v,g]=y.useState(""),[p,b]=y.useState("24h"),[x,w]=y.useState(1440*60*1e3),z=y.useMemo(()=>fN({logs:s.data,fleetActivity:o.data,runs:u.data,inbox:r.data}),[s.data,o.data,u.data,r.data]),L=y.useMemo(()=>hN(z,{sources:h,query:v,windowMs:x}),[z,h,v,x]),D=y.useRef(new Map);function T(q){const K=L.find(V=>new Date(V.ts).getTime()<=q+36e5);K&&D.current.get(K.id)?.scrollIntoView({behavior:"smooth",block:"center"})}const C=s.status==="loading"&&o.status==="loading"&&u.status==="loading"&&r.status==="loading",G=[s,o,u,r].some(q=>q.status==="refreshing"),Y=Math.max(s.updatedAt??0,o.updatedAt??0,u.updatedAt??0,r.updatedAt??0),F=[s.status==="error"?`daemon log: ${s.error?.message}`:null,o.status==="error"?`fleet activity: ${o.error?.message}`:null,u.status==="error"?`runs: ${u.error?.message}`:null,r.status==="error"?`inbox: ${r.error?.message}`:null].filter(q=>q!==null);return a.jsxs("div",{className:fl.view,children:[a.jsxs("header",{className:fl.header,children:[a.jsxs("div",{children:[a.jsx("h1",{className:fl.title,children:"Work Journal"}),a.jsx("p",{className:fl.windowNote,children:"Merges the daemon log (last 200 lines), fleet activity (last ~20 merges/ticks/agent actions), recent runs (last 200), and the pending-proposal inbox. The read API does not expose the full on-disk history beyond this window."})]}),a.jsxs("div",{className:fl.freshness,"aria-live":"polite",children:[G?a.jsx(Tt,{}):null,Y>0?a.jsxs("span",{className:fl.freshnessLabel,children:["Updated ",FN(Y)]}):null]})]}),F.length>0?a.jsxs("div",{className:fl.errorBanner,role:"alert",children:["Some sources failed to load: ",F.join("; ")]}):null,a.jsx(nN,{}),C?a.jsxs("div",{className:fl.panel,children:[a.jsx(ct,{}),a.jsx(ct,{}),a.jsx(ct,{}),a.jsx(ct,{})]}):a.jsxs(a.Fragment,{children:[a.jsx(vN,{entries:z,hours:24,onScrubTo:T}),a.jsx(rN,{sources:h,onSourcesChange:m,query:v,onQueryChange:g,windowValue:p,onWindowChange:(q,I)=>{b(q),w(I)}}),a.jsx("div",{className:fl.panel,children:L.length===0?a.jsx("p",{className:fl.empty,children:"Nothing matches the current filters in this window."}):a.jsx("ul",{className:fl.list,children:L.map(q=>a.jsx("li",{ref:I=>{I?D.current.set(q.id,I):D.current.delete(q.id)},children:a.jsx(UN,{entry:q})},q.id))})})]})]})}const IN="_figure_1si9v_1",PN="_caption_1si9v_12",e2="_title_1si9v_20",t2="_description_1si9v_26",l2="_plot_1si9v_31",n2="_tableDisclosure_1si9v_36",a2="_tableBody_1si9v_61",s2="_caveat_1si9v_65",i2="_empty_1si9v_75",Xl={figure:IN,caption:PN,title:e2,description:t2,plot:l2,tableDisclosure:n2,tableBody:a2,caveat:s2,empty:i2};function Nn({title:s,description:o,caveat:u,children:r,table:d,empty:h,emptyMessage:m="No data for this window."}){return a.jsxs("figure",{className:Xl.figure,children:[a.jsxs("figcaption",{className:Xl.caption,children:[a.jsx("span",{className:Xl.title,children:s}),o?a.jsx("span",{className:Xl.description,children:o}):null]}),u?a.jsx("p",{className:Xl.caveat,role:"note",children:u}):null,h?a.jsx("p",{className:Xl.empty,children:m}):a.jsx("div",{className:Xl.plot,children:r}),d?a.jsxs("details",{className:Xl.tableDisclosure,children:[a.jsx("summary",{children:"View as table"}),a.jsx("div",{className:Xl.tableBody,children:d})]}):null]})}const c2="_legend_4pgvn_1",o2="_item_4pgvn_10",r2="_swatch_4pgvn_18",u2="_swatchLine_4pgvn_25",$c={legend:c2,item:o2,swatch:r2,swatchLine:u2};function d2({items:s}){return s.length<2?null:a.jsx("ul",{className:$c.legend,children:s.map(o=>a.jsxs("li",{className:$c.item,children:[a.jsx("span",{className:o.kind==="line"?$c.swatchLine:$c.swatch,style:{background:o.color},"aria-hidden":"true"}),o.label]},o.label))})}const Gu=7;function Lc(s){return`var(--chart-series-${(s%Gu+Gu)%Gu+1})`}const f2="var(--chart-sequential)",ad="var(--chart-grid)",sd="var(--chart-axis)",h2="_svg_djmd1_1",m2="_gridline_djmd1_7",p2="_axis_djmd1_12",_2="_axisLabel_djmd1_17",g2="_line_djmd1_23",v2="_area_djmd1_30",y2="_marker_djmd1_35",x2="_endLabel_djmd1_40",b2="_crosshairLine_djmd1_46",j2="_overlay_djmd1_52",S2="_wrap_djmd1_57",N2="_tooltip_djmd1_61",w2="_tooltipDate_djmd1_77",T2="_tooltipRow_djmd1_82",E2="_tooltipKey_djmd1_88",k2="_tooltipValue_djmd1_94",A2="_tooltipGap_djmd1_99",gt={svg:h2,gridline:m2,axis:p2,axisLabel:_2,line:g2,area:v2,marker:y2,endLabel:x2,crosshairLine:b2,overlay:j2,wrap:S2,tooltip:N2,tooltipDate:w2,tooltipRow:T2,tooltipKey:E2,tooltipValue:k2,tooltipGap:A2},Ha=640,Xn=44,Qu=12,Oc=12,zc=24,R2=4;function C2(s){const o=[];let u=[];for(const r of s){if(r.y===null){u.length&&o.push(u),u=[];continue}u.push({x:r.x,y:r.y})}return u.length&&o.push(u),o}function D2(s,o,u){if(o<=s)return[s];const r=(o-s)/u;return Array.from({length:u+1},(d,h)=>s+r*h)}function M2({series:s,height:o=200,area:u=!1,formatX:r=m=>String(m),formatY:d=m=>String(m),ariaLabel:h}){const m=y.useRef(null),[v,g]=y.useState(null),[p,b]=y.useState(null),x=s.flatMap(ne=>ne.points.map(le=>le.x)),w=s.flatMap(ne=>ne.points.map(le=>le.y)).filter(ne=>ne!==null);if(x.length===0)return a.jsx("p",{children:"No data."});const z=Math.min(...x),L=Math.max(...x),D=Math.min(0,...w),T=Math.max(1e-4,...w),C=L-z||1,G=T-D||1,Y=Ha-Xn-Qu,F=o-Oc-zc,q=ne=>Xn+(ne-z)/C*Y,I=ne=>Oc+F-(ne-D)/G*F,K=D2(D,T,R2),V=Array.from(new Set(x)).sort((ne,le)=>ne-le);function ce(ne){const le=m.current;if(!le)return null;const M=le.getBoundingClientRect(),X=(ne-M.left)/M.width*Ha,Z=z+(X-Xn)/Y*C;let Q=V[0],P=1/0;for(const S of V){const O=Math.abs(S-Z);O<P&&(P=O,Q=S)}return Q}function ge(ne){const le=ce(ne.clientX);if(le===null)return;g(le);const M=m.current;if(M){const X=M.getBoundingClientRect(),Z=q(le)/Ha*X.width;b({left:Z,top:0})}}const se=s.length>=2,ve=s.length>=1&&s.length<=4,Je=v!==null?s.map(ne=>({series:ne,point:ne.points.find(le=>le.x===v)??null})):null;return a.jsxs("div",{className:gt.wrap,children:[a.jsxs("svg",{ref:m,className:gt.svg,viewBox:`0 0 ${Ha} ${o}`,role:"img","aria-label":h,onPointerMove:ge,onPointerLeave:()=>g(null),children:[K.map((ne,le)=>a.jsxs("g",{children:[a.jsx("line",{x1:Xn,x2:Ha-Qu,y1:I(ne),y2:I(ne),className:gt.gridline,stroke:ad}),a.jsx("text",{x:Xn-6,y:I(ne),dy:"0.32em",textAnchor:"end",className:gt.axisLabel,children:d(ne)})]},le)),a.jsx("line",{x1:Xn,x2:Ha-Qu,y1:o-zc,y2:o-zc,className:gt.axis,stroke:sd}),V.length>1?[V[0],V[V.length-1]].map((ne,le)=>a.jsx("text",{x:q(ne),y:o-6,textAnchor:le===0?"start":"end",className:gt.axisLabel,children:r(ne)},le)):null,s.map((ne,le)=>{const M=Lc(le),X=C2(ne.points);return a.jsxs("g",{children:[u&&s.length===1?X.map((Z,Q)=>{const P=Z.map((S,O)=>`${O===0?"M":"L"}${q(S.x)},${I(S.y)}`).join(" ")+` L${q(Z[Z.length-1].x)},${I(D)} L${q(Z[0].x)},${I(D)} Z`;return a.jsx("path",{d:P,fill:M,className:gt.area},Q)}):null,X.map((Z,Q)=>a.jsx("path",{d:Z.map((P,S)=>`${S===0?"M":"L"}${q(P.x)},${I(P.y)}`).join(" "),stroke:M,className:gt.line},Q)),ve&&X.length?(()=>{const Z=X[X.length-1],Q=Z[Z.length-1];return a.jsx("text",{x:q(Q.x)+4,y:I(Q.y),dy:"0.32em",className:gt.endLabel,fill:M,children:ne.label})})():null]},ne.id)}),v!==null?a.jsx("line",{x1:q(v),x2:q(v),y1:Oc,y2:o-zc,className:gt.crosshairLine}):null,v!==null?s.map((ne,le)=>{const M=ne.points.find(X=>X.x===v);return!M||M.y===null?null:a.jsx("circle",{cx:q(M.x),cy:I(M.y),r:4,fill:Lc(le),className:gt.marker},ne.id)}):null,a.jsx("rect",{x:Xn,y:Oc,width:Y,height:F,className:gt.overlay,onFocus:()=>g(V[V.length-1]??null)})]}),Je&&p?a.jsxs("div",{className:gt.tooltip,style:{left:p.left,top:p.top},children:[a.jsx("div",{className:gt.tooltipDate,children:r(v)}),Je.map(({series:ne,point:le},M)=>a.jsxs("div",{className:gt.tooltipRow,children:[a.jsx("span",{className:gt.tooltipKey,style:{background:Lc(M)},"aria-hidden":"true"}),le&&le.y!==null?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:gt.tooltipValue,children:d(le.y)}),se?a.jsx("span",{children:ne.label}):null]}):a.jsxs("span",{className:gt.tooltipGap,children:["no data",se?` — ${ne.label}`:""]})]},ne.id))]}):null,se?a.jsx(d2,{items:s.map((ne,le)=>({label:ne.label,color:Lc(le),kind:"line"}))}):null]})}const $2="_svg_o4jfa_1",L2="_bar_o4jfa_6",O2="_baseline_o4jfa_15",z2="_axisLabel_o4jfa_25",U2="_valueLabel_o4jfa_31",B2="_categoryLabel_o4jfa_38",H2="_hitArea_o4jfa_44",q2="_tooltip_o4jfa_49",G2="_tooltipValue_o4jfa_63",Q2="_tooltipLabel_o4jfa_68",Y2="_wrap_o4jfa_73",ft={svg:$2,bar:L2,baseline:O2,axisLabel:z2,valueLabel:U2,categoryLabel:B2,hitArea:H2,tooltip:q2,tooltipValue:G2,tooltipLabel:Q2,wrap:Y2},Uc=24,vt=10;function Wn({data:s,height:o=160,orientation:u="vertical",color:r=f2,formatValue:d=m=>String(m),ariaLabel:h}){const m=y.useId(),[v,g]=y.useState(null),p=s.map(q=>q.value).filter(q=>q!==null),b=Math.max(0,...p,1e-4),x=Math.min(0,...p),w=b-x||1;if(u==="horizontal"){const K=Math.min(Uc,Math.max(14,Math.floor((o-vt)/s.length)-vt)),V=420,ce=s.length*(K+vt)+vt,ge=120+V+48;return a.jsxs("div",{className:ft.wrap,children:[a.jsxs("svg",{className:ft.svg,width:ge,height:ce,viewBox:`0 0 ${ge} ${ce}`,role:"img","aria-label":h,children:[a.jsx("line",{x1:120,y1:0,x2:120,y2:ce,className:ft.baseline,stroke:sd}),s.map((se,ve)=>{const Je=vt+ve*(K+vt),ne=se.value!==null?(se.value-x)/w*V:0;return a.jsxs("g",{children:[a.jsx("text",{x:112,y:Je+K/2,dy:"0.32em",textAnchor:"end",className:ft.categoryLabel,children:se.label.length>22?`${se.label.slice(0,21)}…`:se.label}),se.value===null?a.jsx("line",{x1:124,y1:Je+K/2,x2:134,y2:Je+K/2,stroke:ad,strokeWidth:2,strokeDasharray:"2 2"}):a.jsxs(a.Fragment,{children:[a.jsx("rect",{x:120,y:Je,width:Math.max(2,ne),height:K,rx:4,fill:r,className:ft.bar}),a.jsx("text",{x:120+Math.max(2,ne)+6,y:Je+K/2,dy:"0.32em",className:ft.valueLabel,children:d(se.value)})]}),a.jsx("rect",{className:ft.hitArea,x:0,y:Je-vt/2,width:ge,height:K+vt,tabIndex:0,role:"img","aria-label":`${se.label}: ${se.value===null?"no data":d(se.value)}`,onPointerEnter:()=>g(ve),onPointerLeave:()=>g(le=>le===ve?null:le),onFocus:()=>g(ve),onBlur:()=>g(le=>le===ve?null:le)})]},se.label+ve)})]}),v!==null?a.jsxs("div",{className:ft.tooltip,style:{left:128,top:vt+v*(K+vt)-4},children:[a.jsx("span",{className:ft.tooltipValue,children:s[v].value===null?"no data":d(s[v].value)}),a.jsx("span",{className:ft.tooltipLabel,children:s[v].label})]}):null]})}const z=s.length?Math.max(Uc,0):Uc,L=Math.min(Uc,z),D=20,T=30,C=o,G=C+D+T,Y=s.length*(L+vt)+vt,F=D+C-(0-x)/w*C;return a.jsxs("div",{className:ft.wrap,children:[a.jsxs("svg",{className:ft.svg,width:Y,height:G,viewBox:`0 0 ${Y} ${G}`,role:"img","aria-label":h,children:[a.jsx("line",{x1:0,y1:F,x2:Y,y2:F,className:ft.baseline,stroke:sd}),s.map((q,I)=>{const K=vt+I*(L+vt),V=q.value!==null?Math.abs(q.value-x)/w*C:0,ce=q.value!==null&&q.value>=0?F-V:F;return a.jsxs("g",{children:[q.value===null?a.jsx("line",{x1:K+L/2-5,y1:F,x2:K+L/2+5,y2:F,stroke:ad,strokeWidth:2,strokeDasharray:"2 2"}):a.jsxs(a.Fragment,{children:[a.jsx("rect",{x:K,y:ce,width:L,height:Math.max(2,V),rx:4,fill:r,className:ft.bar}),a.jsx("text",{x:K+L/2,y:ce-4,textAnchor:"middle",className:ft.valueLabel,children:d(q.value)})]}),a.jsx("text",{x:K+L/2,y:G-8,textAnchor:"middle",className:ft.axisLabel,children:q.label.length>10?`${q.label.slice(0,9)}…`:q.label}),a.jsx("rect",{className:ft.hitArea,x:K-vt/2,y:0,width:L+vt,height:G,tabIndex:0,role:"img","aria-label":`${q.label}: ${q.value===null?"no data":d(q.value)}`,onPointerEnter:()=>g(I),onPointerLeave:()=>g(ge=>ge===I?null:ge),onFocus:()=>g(I),onBlur:()=>g(ge=>ge===I?null:ge)})]},q.label+I)})]}),v!==null?a.jsxs("div",{className:ft.tooltip,style:{left:vt+v*(L+vt),top:0},id:`${m}-tooltip`,children:[a.jsx("span",{className:ft.tooltipValue,children:s[v].value===null?"no data":d(s[v].value)}),a.jsx("span",{className:ft.tooltipLabel,children:s[v].label})]}):null]})}const V2="_line_gomyo_6",X2="_dot_gomyo_14",l_={line:V2,dot:X2};function K2({points:s,width:o=72,height:u=24,ariaLabel:r}){const d=s.filter(L=>L!==null);if(d.length<2)return a.jsx("svg",{width:o,height:u,viewBox:`0 0 ${o} ${u}`,role:"img","aria-label":r});const h=Math.min(...d,0),v=Math.max(...d,0)-h||1,g=o/Math.max(1,s.length-1),p=L=>u-(L-h)/v*(u-2)-1,b=[];let x=[];s.forEach((L,D)=>{if(L===null){x.length&&b.push(x),x=[];return}x.push({x:D*g,y:p(L)})}),x.length&&b.push(x);const w=s.map(L=>L!==null).lastIndexOf(!0),z=w>=0?{x:w*g,y:p(s[w])}:null;return a.jsxs("svg",{width:o,height:u,viewBox:`0 0 ${o} ${u}`,role:"img","aria-label":r,children:[b.map((L,D)=>a.jsx("path",{className:l_.line,d:L.map((T,C)=>`${C===0?"M":"L"}${T.x.toFixed(1)},${T.y.toFixed(1)}`).join(" ")},D)),z?a.jsx("circle",{className:l_.dot,cx:z.x,cy:z.y,r:2}):null]})}function Ga(s){if(!Number.isFinite(s))return"—";const o=Math.abs(s);return o>=1e6?`${(s/1e6).toFixed(o>=1e7?0:1)}M`:o>=1e4?`${Math.round(s/1e3)}K`:o>=1e3?s.toLocaleString("en-US"):Number.isInteger(s)?String(s):s.toFixed(1)}function ml(s){if(!Number.isFinite(s))return"—";const o=Math.abs(s),u=s<0?"-":"";return o>=1e6?`${u}$${(o/1e6).toFixed(1)}M`:o>=1e3?`${u}$${(o/1e3).toFixed(1)}K`:`${u}$${o.toFixed(2)}`}function Gc(s,o=0){return Number.isFinite(s)?`${(s*100).toFixed(o)}%`:"—"}function Z2(s){if(!Number.isFinite(s))return"—";const o=Ga(Math.abs(s));return s>0?`+${o}`:s<0?`-${o}`:o}function J2(s){const o=new Date(`${s}T00:00:00Z`);return Number.isNaN(o.getTime())?s:o.toLocaleDateString("en-US",{month:"short",day:"numeric",timeZone:"UTC"})}const F2="_tile_rp7c9_1",W2="_label_rp7c9_11",I2="_row_rp7c9_18",P2="_value_rp7c9_25",ew="_trendRow_rp7c9_31",tw="_delta_rp7c9_38",lw="_deltaGood_rp7c9_43",nw="_deltaBad_rp7c9_47",aw="_deltaNeutral_rp7c9_51",sw="_caption_rp7c9_55",hl={tile:F2,label:W2,row:I2,value:P2,trendRow:ew,delta:tw,deltaGood:lw,deltaBad:nw,deltaNeutral:aw,caption:sw};function At({label:s,value:o,caption:u,delta:r,trend:d,trendLabel:h}){const m=r==null||r.goodWhenPositive===void 0||r.value===0?hl.deltaNeutral:r.value>0===r.goodWhenPositive?hl.deltaGood:hl.deltaBad;return a.jsxs("div",{className:hl.tile,children:[a.jsx("span",{className:hl.label,children:s}),a.jsx("div",{className:hl.row,children:a.jsx("span",{className:hl.value,children:o})}),a.jsxs("div",{className:hl.trendRow,children:[u?a.jsx("span",{className:hl.caption,children:u}):a.jsx("span",{}),d?a.jsx(K2,{points:d,ariaLabel:h??`${s} trend`}):null]}),r?a.jsxs("span",{className:`${hl.delta} ${m}`,children:[Z2(r.value),r.versus?` ${r.versus}`:""]}):null]})}const iw="_table_1ggl4_1",cw="_numeric_1ggl4_22",Yu={table:iw,numeric:cw};function Jn({caption:s,columns:o,rows:u,rowKey:r}){return a.jsxs("table",{className:Yu.table,children:[a.jsx("caption",{className:"visually-hidden",children:s}),a.jsx("thead",{children:a.jsx("tr",{children:o.map(d=>a.jsx("th",{scope:"col",className:d.numeric?Yu.numeric:void 0,children:d.label},d.key))})}),a.jsx("tbody",{children:u.map((d,h)=>a.jsx("tr",{children:o.map(m=>a.jsx("td",{className:m.numeric?Yu.numeric:void 0,children:m.render(d)},m.key))},r(d,h)))})]})}const ow="_view_7836g_1",rw="_header_7836g_7",uw="_title_7836g_15",dw="_freshness_7836g_21",fw="_freshnessLabel_7836g_27",hw="_filterRow_7836g_32",mw="_windowGroup_7836g_38",pw="_windowButton_7836g_45",_w="_windowButtonActive_7836g_64",gw="_kpiGrid_7836g_70",vw="_chartsGrid_7836g_76",yw="_error_7836g_82",il={view:ow,header:rw,title:uw,freshness:dw,freshnessLabel:fw,filterRow:hw,windowGroup:mw,windowButton:pw,windowButtonActive:_w,kpiGrid:gw,chartsGrid:vw,error:yw},xw=["1d","7d","30d"],bw={ok:"success",warn:"warning",over:"danger"};function n_(s){const o=s.replace(/\/+$/,"").split("/");return o[o.length-1]||s}function jw(){const[s,o]=y.useState("7d"),u=Ce(ij(s));return a.jsxs("div",{className:il.view,children:[a.jsxs("header",{className:il.header,children:[a.jsx("h1",{className:il.title,children:"Pulse"}),a.jsxs("div",{className:il.freshness,"aria-live":"polite",children:[u.status==="refreshing"?a.jsx(Tt,{}):null,u.updatedAt?a.jsxs("span",{className:il.freshnessLabel,children:["Updated ",Nw(u.updatedAt)]}):null]})]}),a.jsxs("div",{className:il.filterRow,role:"group","aria-label":"Time window",children:[a.jsx("div",{className:il.windowGroup,children:xw.map(r=>a.jsx("button",{type:"button",className:`${il.windowButton} ${r===s?il.windowButtonActive:""}`,"aria-pressed":r===s,onClick:()=>o(r),children:r},r))}),u.data?a.jsx(We,{status:u.data.budget.level,tone:bw[u.data.budget.level],children:u.data.budget.message}):null]}),u.status==="loading"?a.jsx(ii,{count:4}):u.status==="error"?a.jsx("div",{className:il.error,role:"alert",children:u.error?.message??"Failed to load pulse data."}):u.data?a.jsx(Sw,{rollup:u.data}):null]})}function Sw({rollup:s}){const o=[{id:"cost",label:"Est. cost (USD)",points:s.byDay.map(g=>({x:Date.parse(`${g.day}T00:00:00Z`),y:g.estCostUsd}))}],u=[...s.byProject].sort((g,p)=>p.estCostUsd-g.estCostUsd).slice(0,8),r=u.map(g=>({label:n_(g.project),value:g.estCostUsd})),d=[...s.byModel].sort((g,p)=>p.estCostUsd-g.estCostUsd).slice(0,8),h=d.map(g=>({label:g.model,value:g.estCostUsd})),m=[{key:"project",label:"Project",render:g=>n_(g.project)},{key:"sessions",label:"Sessions",numeric:!0,render:g=>String(g.sessions)},{key:"commits",label:"Commits",numeric:!0,render:g=>String(g.commits)},{key:"cost",label:"Cost",numeric:!0,render:g=>ml(g.estCostUsd)}],v=[{key:"model",label:"Model",render:g=>g.model},{key:"calls",label:"Calls",numeric:!0,render:g=>String(g.calls)},{key:"tokens",label:"Tokens",numeric:!0,render:g=>Ga(g.tokensIn+g.tokensOut)},{key:"cost",label:"Cost",numeric:!0,render:g=>ml(g.estCostUsd)}];return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:il.kpiGrid,children:[a.jsx(At,{label:"Est. cost",value:ml(s.totals.estCostUsd),caption:s.window}),a.jsx(At,{label:"Tokens",value:Ga(s.totals.tokensIn+s.totals.tokensOut),caption:`${Ga(s.totals.tokensIn)} in / ${Ga(s.totals.tokensOut)} out`}),a.jsx(At,{label:"Sessions",value:String(s.totals.sessions)}),a.jsx(At,{label:"Commits",value:String(s.totals.commits)})]}),a.jsxs("div",{className:il.chartsGrid,children:[a.jsx(Nn,{title:"Cost over time",description:`since ${new Date(s.since).toLocaleDateString()}`,empty:s.byDay.length===0,emptyMessage:"No activity recorded in this window.",table:a.jsx(Jn,{caption:"Daily cost",rowKey:g=>g.day,rows:s.byDay,columns:[{key:"day",label:"Day",render:g=>g.day},{key:"cost",label:"Cost",numeric:!0,render:g=>ml(g.estCostUsd)},{key:"sessions",label:"Sessions",numeric:!0,render:g=>String(g.sessions)}]}),children:a.jsx(M2,{series:o,area:!0,ariaLabel:"Estimated cost over time",formatX:g=>new Date(g).toLocaleDateString(void 0,{month:"short",day:"numeric"}),formatY:g=>ml(g)})}),a.jsx(Nn,{title:"Top projects by cost",empty:r.length===0,emptyMessage:"No project activity in this window.",table:a.jsx(Jn,{caption:"Cost by project",rowKey:g=>g.project,rows:u,columns:m}),children:a.jsx(Wn,{data:r,orientation:"horizontal",ariaLabel:"Top projects by estimated cost",formatValue:g=>ml(g)})}),a.jsx(Nn,{title:"Cost by model",empty:h.length===0,emptyMessage:"No model activity in this window.",table:a.jsx(Jn,{caption:"Cost by model",rowKey:g=>g.model,rows:d,columns:v}),children:a.jsx(Wn,{data:h,ariaLabel:"Cost by model",formatValue:g=>ml(g)})})]})]})}function Nw(s){const o=Math.max(0,Math.round((Date.now()-s)/1e3));return o<5?"just now":o<60?`${o}s ago`:`${Math.round(o/60)}m ago`}const ww="_view_44i9i_1",Tw="_header_44i9i_7",Ew="_title_44i9i_15",kw="_searchRow_44i9i_21",Aw="_searchInput_44i9i_27",Rw="_resultCount_44i9i_43",Cw="_results_44i9i_48",Dw="_row_44i9i_57",Mw="_rowHeader_44i9i_64",$w="_rowTitle_44i9i_72",Lw="_rowMeta_44i9i_78",Ow="_badge_44i9i_87",zw="_snippet_44i9i_97",Uw="_tags_44i9i_107",Bw="_tag_44i9i_107",Hw="_skeletons_44i9i_123",qw="_empty_44i9i_129",Gw="_error_44i9i_136",st={view:ww,header:Tw,title:Ew,searchRow:kw,searchInput:Aw,resultCount:Rw,results:Cw,row:Dw,rowHeader:Mw,rowTitle:$w,rowMeta:Lw,badge:Ow,snippet:zw,tags:Uw,tag:Bw,skeletons:Hw,empty:qw,error:Gw},Qw=50,Yw=300;function Vw(s,o){const[u,r]=y.useState(s);return y.useEffect(()=>{const d=setTimeout(()=>r(s),o);return()=>clearTimeout(d)},[s,o]),u}function Xw(s,o=220){const u=s.trim();return u.length>o?`${u.slice(0,o-1)}…`:u}function Kw(s){const o=Date.parse(s);if(Number.isNaN(o))return s;const u=Math.floor((Date.now()-o)/864e5);return u<=0?"today":u===1?"yesterday":u<30?`${u}d ago`:`${Math.floor(u/30)}mo ago`}function Zw(){const[s,o]=y.useState(""),u=Vw(s,Yw),r=Ce(oj(u)),d=u.trim().length>0,h=r.data,{rows:m,totalCount:v}=y.useMemo(()=>{if(!h)return{rows:[],totalCount:0};if(d)return{rows:h,totalCount:h.length};const p=h;return{rows:[...p].sort((x,w)=>Date.parse(w.ts)-Date.parse(x.ts)).slice(0,Qw),totalCount:p.length}},[h,d]),g=y.useMemo(()=>{if(!h||d)return[];const p=h,b=new Map;for(const x of p){const w=x.project??"(unscoped)";b.set(w,(b.get(w)??0)+1)}return[...b.entries()].sort((x,w)=>w[1]-x[1]).slice(0,8).map(([x,w])=>({label:x,value:w}))},[h,d]);return a.jsxs("div",{className:st.view,children:[a.jsxs("header",{className:st.header,children:[a.jsx("h1",{className:st.title,children:"Genome"}),a.jsx("div",{"aria-live":"polite",children:r.status==="refreshing"?a.jsx(Tt,{}):null})]}),a.jsxs("div",{className:st.searchRow,children:[a.jsx("input",{type:"search",className:st.searchInput,placeholder:"Search the genome (title, tags, body text)…",value:s,onChange:p=>o(p.target.value),"aria-label":"Search cross-repo knowledge"}),h?a.jsx("span",{className:st.resultCount,children:d?`${v} match${v===1?"":"es"}`:`showing ${m.length} of ${v}`}):null]}),!d&&g.length>0?a.jsx(Nn,{title:"Top projects by genome entries",description:"browse mode — all loaded entries",children:a.jsx(Wn,{data:g,orientation:"horizontal",ariaLabel:"Top projects by genome entry count",formatValue:p=>Ga(p)})}):null,r.status==="loading"?a.jsxs("div",{className:st.skeletons,"aria-hidden":"true",children:[a.jsx(ct,{}),a.jsx(ct,{}),a.jsx(ct,{}),a.jsx(ct,{})]}):r.status==="error"?a.jsx("div",{className:st.error,role:"alert",children:r.error?.message??"Failed to load genome data."}):m.length===0?a.jsx("p",{className:st.empty,children:d?`No genome entries match "${u}".`:"No genome entries recorded yet."}):a.jsx("ul",{className:st.results,children:m.map(p=>{const b=cj(p)?p:null,x=b?b.entry:p;return a.jsxs("li",{className:st.row,children:[a.jsxs("div",{className:st.rowHeader,children:[a.jsx("span",{className:st.rowTitle,children:x.title}),a.jsxs("span",{className:st.rowMeta,children:[b?a.jsxs("span",{className:st.badge,children:[b.method," · ",b.score.toFixed(2)]}):null,a.jsx("span",{children:Kw(x.ts)})]})]}),a.jsxs("div",{className:st.rowMeta,children:[a.jsx("span",{className:st.badge,children:x.project??"unscoped"}),a.jsx("span",{className:st.badge,children:x.source})]}),a.jsx("p",{className:st.snippet,children:Xw(x.text)}),x.tags.length>0?a.jsx("div",{className:st.tags,children:x.tags.map(w=>a.jsx("span",{className:st.tag,children:w},w))}):null]},x.id)})})]})}const Jw="_view_1frm3_1",Fw="_header_1frm3_7",Ww="_title_1frm3_15",Iw="_filterRow_1frm3_21",Pw="_windowGroup_1frm3_27",e3="_windowButton_1frm3_34",t3="_windowButtonActive_1frm3_53",l3="_kpiGrid_1frm3_59",n3="_chartsGrid_1frm3_65",a3="_section_1frm3_71",s3="_sectionTitle_1frm3_77",i3="_goalsList_1frm3_83",c3="_goalRow_1frm3_92",o3="_goalObjective_1frm3_102",r3="_meterTrack_1frm3_107",u3="_meterFill_1frm3_115",d3="_goalMeta_1frm3_121",f3="_error_1frm3_126",h3="_notAvailable_1frm3_135",Ke={view:Jw,header:Fw,title:Ww,filterRow:Iw,windowGroup:Pw,windowButton:e3,windowButtonActive:t3,kpiGrid:l3,chartsGrid:n3,section:a3,sectionTitle:s3,goalsList:i3,goalRow:c3,goalObjective:o3,meterTrack:r3,meterFill:u3,goalMeta:d3,error:f3,notAvailable:h3},m3=["7d","30d","all"];function Vu(s){return`${s.engine}:${s.model}`}function p3(){const[s,o]=y.useState("30d"),u=Ce(Zn),r=Ce(rj(s)),d=u.data?.production;return a.jsxs("div",{className:Ke.view,children:[a.jsxs("header",{className:Ke.header,children:[a.jsx("h1",{className:Ke.title,children:"Production"}),a.jsx("div",{"aria-live":"polite",children:u.status==="refreshing"||r.status==="refreshing"?a.jsx(Tt,{}):null})]}),u.status==="loading"?a.jsx(ii,{count:4}):u.status==="error"?a.jsx("div",{className:Ke.error,role:"alert",children:u.error?.message??"Failed to load production summary."}):d?a.jsx(_3,{production:d}):a.jsx("p",{className:Ke.notAvailable,children:"Production summary not available on this server (older producer, or not yet populated)."}),a.jsx("div",{className:Ke.filterRow,role:"group","aria-label":"Model stats window",children:a.jsx("div",{className:Ke.windowGroup,children:m3.map(h=>a.jsx("button",{type:"button",className:`${Ke.windowButton} ${h===s?Ke.windowButtonActive:""}`,"aria-pressed":h===s,onClick:()=>o(h),children:h},h))})}),r.status==="loading"?a.jsx(ii,{count:3}):r.status==="error"?a.jsx("div",{className:Ke.error,role:"alert",children:r.error?.message??"Failed to load per-model stats."}):r.data?a.jsx(g3,{result:r.data}):null]})}function _3({production:s}){const o=s.judgeVerdicts24h,u=s.judgeFailures24h??{total:0,parse:0,network:0},r=[{label:"ship",value:o.ship},{label:"review",value:o.review},{label:"noise",value:o.noise},{label:"harmful",value:o.harmful}],d=s.shipsPerDayTrend.map(g=>({label:J2(g.date),value:g.count})),h=s.shipsPerDayTrend.reduce((g,p)=>g+p.count,0),m=Xa(s.proposalSourceQuality),v=Xa(s.judgeTraceSourceQuality);return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:Ke.kpiGrid,children:[a.jsx(At,{label:"Proposals (24h)",value:a.jsx(Re,{quality:s.proposalSourceQuality,label:"proposals",children:String(s.proposals24h.total)}),caption:a.jsx(Re,{quality:s.proposalSourceQuality,label:"pending proposals",children:`${s.proposals24h.pending} pending`})}),a.jsx(At,{label:"Auto-merges today",value:a.jsx(Re,{quality:s.proposalSourceQuality,label:"auto-merges",children:String(s.autoMergesToday.count)})}),a.jsx(At,{label:"Judged (24h)",value:a.jsx(Re,{quality:s.judgeTraceSourceQuality,label:"judge verdicts",children:String(o.total)})}),a.jsx(At,{label:"Judge failures (24h)",value:a.jsx(Re,{quality:s.judgeFailureSourceQuality,label:"judge failures",children:String(u.total)}),caption:a.jsx(Re,{quality:s.judgeFailureSourceQuality,children:`${u.parse} parse · ${u.network} network`})}),a.jsx(At,{label:"Active goals",value:a.jsx(Re,{quality:s.activeGoalsSourceQuality,label:"active goals",children:String(s.activeGoals.length)})})]}),a.jsxs("div",{className:Ke.chartsGrid,children:[a.jsxs(Nn,{title:"Ships per day",description:"last 7 days",empty:m&&d.length===0,emptyMessage:"No ship history recorded yet.",table:m?a.jsx(Jn,{caption:"Ships per day",rowKey:g=>g.label,rows:d,columns:[{key:"day",label:"Day",render:g=>g.label},{key:"count",label:"Ships",numeric:!0,render:g=>String(g.value??0)}]}):void 0,children:[m?h===0?a.jsx("p",{className:Ke.notAvailable,children:"0 ships in the last 7 days — this is the real number, not a loading state."}):null:a.jsx(Re,{quality:s.proposalSourceQuality,label:"ship history",children:"ship history"}),m?a.jsx(Wn,{data:d,ariaLabel:"Ships per day, last 7 days",formatValue:g=>String(g)}):null]}),a.jsx(Nn,{title:"Judge verdict breakdown",description:"last 24h",empty:v&&o.total===0,emptyMessage:"No judge verdicts recorded in the last 24h.",children:v?a.jsx(Wn,{data:r,ariaLabel:"Judge verdict breakdown, last 24h",formatValue:g=>String(g)}):a.jsx(Re,{quality:s.judgeTraceSourceQuality,label:"judge verdicts",children:"judge verdicts"})})]}),Xa(s.activeGoalsSourceQuality)?s.activeGoals.length>0?a.jsxs("div",{className:Ke.section,children:[a.jsx("h2",{className:Ke.sectionTitle,children:"Active goals"}),a.jsx("ul",{className:Ke.goalsList,children:s.activeGoals.map(g=>{const p=g.totalMilestones>0?g.doneMilestones/g.totalMilestones:0;return a.jsxs("li",{className:Ke.goalRow,children:[a.jsx("span",{className:Ke.goalObjective,children:g.objective}),a.jsx("div",{className:Ke.meterTrack,children:a.jsx("div",{className:Ke.meterFill,style:{width:`${Math.round(p*100)}%`}})}),a.jsxs("span",{className:Ke.goalMeta,children:[g.doneMilestones," / ",g.totalMilestones," milestones"]})]},g.goalId)})})]}):null:a.jsxs("div",{className:Ke.section,children:[a.jsx("h2",{className:Ke.sectionTitle,children:"Active goals"}),a.jsx(Re,{quality:s.activeGoalsSourceQuality,label:"active goals",children:"active goals"})]})]})}function g3({result:s}){const o=[...s.models].sort((d,h)=>h.dispatches-d.dispatches).slice(0,12),u=o.map(d=>({label:Vu(d),value:d.judged>0?d.shipRate:null})),r=[{key:"model",label:"Model",render:d=>Vu(d)},{key:"dispatches",label:"Dispatches",numeric:!0,render:d=>String(d.dispatches)},{key:"shipRate",label:"Ship rate",numeric:!0,render:d=>d.judged>0?Gc(d.shipRate):"—"},{key:"merged",label:"Merged",numeric:!0,render:d=>String(d.merged)},{key:"costPerMerged",label:"Cost / merge",numeric:!0,render:d=>d.costPerMergedUsd!==null?ml(d.costPerMergedUsd):"—"},{key:"bestOfN",label:"Best-of-N win rate",numeric:!0,render:d=>d.bestOfNAvailable?a.jsx(Re,{quality:s.bestOfNSource,label:"best-of-N win rate",children:Gc(d.bestOfN.winRate)}):"—"}];return a.jsx("div",{className:Ke.chartsGrid,children:a.jsx(Nn,{title:"Ship rate by model",description:"judged proposals in the selected window",empty:o.length===0,emptyMessage:"No dispatch history for this window.",table:a.jsx(Jn,{caption:"Per-model economics",rowKey:Vu,rows:o,columns:r}),children:a.jsx(Wn,{data:u,ariaLabel:"Ship rate by model",formatValue:d=>Gc(d)})})})}const v3="_view_1m3dh_1",y3="_header_1m3dh_7",x3="_title_1m3dh_15",b3="_kpiGrid_1m3dh_21",j3="_chartsGrid_1m3dh_27",S3="_section_1m3dh_33",N3="_sectionTitle_1m3dh_39",w3="_list_1m3dh_45",T3="_row_1m3dh_54",E3="_rowTitle_1m3dh_64",k3="_meterTrack_1m3dh_73",A3="_meterFill_1m3dh_81",R3="_rowMeta_1m3dh_87",C3="_effectiveness_1m3dh_92",D3="_effectivenessHeadline_1m3dh_99",M3="_error_1m3dh_105",$3="_notAvailable_1m3dh_114",Fe={view:v3,header:y3,title:x3,kpiGrid:b3,chartsGrid:j3,section:S3,sectionTitle:N3,list:w3,row:T3,rowTitle:E3,meterTrack:k3,meterFill:A3,rowMeta:R3,effectiveness:C3,effectivenessHeadline:D3,error:M3,notAvailable:$3};function L3(){const s=Ce(uj),o=Ce(Zn);return a.jsxs("div",{className:Fe.view,children:[a.jsxs("header",{className:Fe.header,children:[a.jsx("h1",{className:Fe.title,children:"Portfolio"}),a.jsx("div",{"aria-live":"polite",children:s.status==="refreshing"||o.status==="refreshing"?a.jsx(Tt,{}):null})]}),s.status==="loading"?a.jsx(ii,{count:6}):s.status==="error"?a.jsx("div",{className:Fe.error,role:"alert",children:s.error?.message??"Failed to load portfolio."}):s.data===null?a.jsx("p",{className:Fe.notAvailable,children:"No portfolio roll-up available — either this server has no enrolled repos, or it predates the portfolio feature."}):s.data?a.jsx(O3,{portfolio:s.data}):null]})}function O3({portfolio:s}){const{health:o,goalsInFlight:u,backlogTop:r,cost:d,effectiveness:h,today:m}=s,v=o.worstRepos.map(p=>({label:p.repo.split("/").filter(Boolean).pop()??p.repo,value:p.score})),g=[{key:"title",label:"Item",render:p=>p.title},{key:"repo",label:"Repo",render:p=>p.repo??"—"},{key:"score",label:"Score",numeric:!0,render:p=>p.score.toFixed(1)}];return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:Fe.kpiGrid,children:[a.jsx(At,{label:"Portfolio health",value:`${o.averageScore.toFixed(0)} (${o.averageGrade})`,caption:`${o.reposScored} repos scored`,delta:m.healthScoreDelta!==null?{value:m.healthScoreDelta,goodWhenPositive:!0}:null}),a.jsx(At,{label:"Goals in flight",value:String(u.length)}),a.jsx(At,{label:"Backlog top items",value:String(r.length),delta:m.pendingProposalsDelta!==null?{value:m.pendingProposalsDelta,versus:"pending proposals"}:null}),a.jsx(At,{label:"Spend",value:ml(d.spentUsd),caption:`${d.window} window`,delta:m.spendUsdDelta!==null?{value:m.spendUsdDelta,goodWhenPositive:!1}:null}),a.jsx(At,{label:"Local savings",value:ml(d.localSavingsUsd)}),a.jsx(At,{label:"Projected monthly",value:ml(d.projectedMonthlyUsd)})]}),h?a.jsxs("div",{className:Fe.effectiveness,children:[a.jsx("p",{className:Fe.effectivenessHeadline,children:h.headline}),a.jsxs("span",{className:Fe.rowMeta,children:["Success rate ",Gc(h.successRate),h.effectivenessDeltaPct!==null?` (${h.effectivenessDeltaPct>=0?"+":""}${h.effectivenessDeltaPct.toFixed(1)}pp)`:""]})]}):null,a.jsxs("div",{className:Fe.chartsGrid,children:[a.jsx(Nn,{title:"Worst-scoring repos",empty:v.length===0,emptyMessage:"No enrolled repos scored yet.",table:a.jsx(Jn,{caption:"Worst-scoring repos",rowKey:p=>p.repo,rows:o.worstRepos,columns:[{key:"repo",label:"Repo",render:p=>p.repo},{key:"score",label:"Score",numeric:!0,render:p=>p.score.toFixed(0)},{key:"grade",label:"Grade",render:p=>p.grade}]}),children:a.jsx(Wn,{data:v,orientation:"horizontal",ariaLabel:"Worst-scoring repos by health score",formatValue:p=>p.toFixed(0)})}),a.jsxs("div",{className:Fe.section,children:[a.jsx("h2",{className:Fe.sectionTitle,children:"In-flight goals"}),u.length===0?a.jsx("p",{className:Fe.notAvailable,children:"No goals currently in flight."}):a.jsx("ul",{className:Fe.list,children:u.map(p=>a.jsxs("li",{className:Fe.row,children:[a.jsxs("span",{className:Fe.rowTitle,children:[p.objective,a.jsxs("span",{className:Fe.rowMeta,children:[Math.round(p.fractionDone*100),"%"]})]}),a.jsx("div",{className:Fe.meterTrack,children:a.jsx("div",{className:Fe.meterFill,style:{width:`${Math.round(p.fractionDone*100)}%`}})}),a.jsx("span",{className:Fe.rowMeta,children:p.nextActionable?`Next: ${p.nextActionable}`:"Nothing actionable queued"})]},p.goalId))})]})]}),a.jsxs("div",{className:Fe.section,children:[a.jsx("h2",{className:Fe.sectionTitle,children:"Top backlog"}),r.length===0?a.jsx("p",{className:Fe.notAvailable,children:"Backlog is empty."}):a.jsx(Jn,{caption:"Top backlog items",rowKey:p=>p.title,rows:r,columns:g})]})]})}const z3="_view_3pmj7_1",U3="_header_3pmj7_8",B3="_title_3pmj7_16",H3="_freshness_3pmj7_22",q3="_count_3pmj7_28",G3="_filters_3pmj7_34",Q3="_field_3pmj7_45",Y3="_fieldLabel_3pmj7_51",V3="_input_3pmj7_56",X3="_select_3pmj7_57",K3="_clear_3pmj7_74",Z3="_tableWrap_3pmj7_87",J3="_table_3pmj7_87",F3="_statusCol_3pmj7_101",W3="_engineCol_3pmj7_104",I3="_providerCol_3pmj7_107",P3="_tokensCol_3pmj7_110",eT="_costCol_3pmj7_113",tT="_stepsCol_3pmj7_116",lT="_createdCol_3pmj7_119",nT="_sortHeader_3pmj7_143",aT="_goalLink_3pmj7_160",sT="_numeric_3pmj7_172",iT="_date_3pmj7_178",cT="_empty_3pmj7_184",oT="_error_3pmj7_191",ue={view:z3,header:U3,title:B3,freshness:H3,count:q3,filters:G3,field:Q3,fieldLabel:Y3,input:V3,select:X3,clear:K3,tableWrap:Z3,table:J3,statusCol:F3,engineCol:W3,providerCol:I3,tokensCol:P3,costCol:eT,stepsCol:tT,createdCol:lT,sortHeader:nT,goalLink:aT,numeric:sT,date:iT,empty:cT,error:oT};function a_(s){return s.usage.tokensIn+s.usage.tokensOut}function rT(s,o){if(!o)return!0;const u=o.toLowerCase();return s.id.toLowerCase().includes(u)||s.goal.toLowerCase().includes(u)}function uT(s){const o=new Date(s);return Number.isNaN(o.getTime())?s:o.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function dT(){const s=y.useRef(null);Zl("/work/runs",s);const o=Ce(wd),[u,r]=y.useState(""),[d,h]=y.useState("all"),[m,v]=y.useState("all"),[g,p]=y.useState("all"),[b,x]=y.useState(""),[w,z]=y.useState("createdAt"),[L,D]=y.useState("desc"),T=y.useMemo(()=>o.data??[],[o.data]),{statuses:C,engines:G,providers:Y}=y.useMemo(()=>{const V=new Set,ce=new Set,ge=new Set;for(const se of T)V.add(se.status),ce.add(se.engine),ge.add(se.provider);return{statuses:Array.from(V).sort(),engines:Array.from(ce).sort(),providers:Array.from(ge).sort()}},[T]),F=b?new Date(b).getTime():null,q=y.useMemo(()=>{let V=T.filter(ce=>{if(d!=="all"&&ce.status!==d||m!=="all"&&ce.engine!==m||g!=="all"&&ce.provider!==g)return!1;if(F!==null){const ge=new Date(ce.createdAt).getTime();if(Number.isNaN(ge)||ge<F)return!1}return!!rT(ce,u.trim())});return V=[...V].sort((ce,ge)=>{let se=0;switch(w){case"createdAt":se=ce.createdAt.localeCompare(ge.createdAt);break;case"updatedAt":se=ce.updatedAt.localeCompare(ge.updatedAt);break;case"tokens":se=a_(ce)-a_(ge);break;case"estCostUsd":se=ce.usage.estCostUsd-ge.usage.estCostUsd;break;case"steps":se=ce.steps.length-ge.steps.length;break;case"status":se=ce.status.localeCompare(ge.status);break}return L==="asc"?se:-se}),V},[T,d,m,g,F,u,w,L]);function I(V){V===w?D(ce=>ce==="asc"?"desc":"asc"):(z(V),D("desc"))}function K(V){return V!==w?"":L==="asc"?" ↑":" ↓"}return a.jsxs("div",{ref:s,className:ue.view,children:[a.jsxs("header",{className:ue.header,children:[a.jsx("h1",{className:ue.title,children:"Runs"}),a.jsxs("div",{className:ue.freshness,"aria-live":"polite",children:[o.status==="refreshing"?a.jsx(Tt,{}):null,a.jsxs("span",{className:ue.count,children:[q.length," of ",T.length," runs (server caps at 200 most recent)"]})]})]}),a.jsxs("form",{className:ue.filters,role:"search","aria-label":"Filter runs",onSubmit:V=>V.preventDefault(),children:[a.jsxs("label",{className:ue.field,children:[a.jsx("span",{className:ue.fieldLabel,children:"Search"}),a.jsx("input",{type:"text",className:ue.input,placeholder:"goal or run id (e.g. repo/project name)",value:u,onChange:V=>r(V.target.value)})]}),a.jsxs("label",{className:ue.field,children:[a.jsx("span",{className:ue.fieldLabel,children:"Status"}),a.jsxs("select",{className:ue.select,value:d,onChange:V=>h(V.target.value),children:[a.jsx("option",{value:"all",children:"All"}),C.map(V=>a.jsx("option",{value:V,children:V},V))]})]}),a.jsxs("label",{className:ue.field,children:[a.jsx("span",{className:ue.fieldLabel,children:"Engine"}),a.jsxs("select",{className:ue.select,value:m,onChange:V=>v(V.target.value),children:[a.jsx("option",{value:"all",children:"All"}),G.map(V=>a.jsx("option",{value:V,children:V},V))]})]}),a.jsxs("label",{className:ue.field,children:[a.jsx("span",{className:ue.fieldLabel,children:"Provider"}),a.jsxs("select",{className:ue.select,value:g,onChange:V=>p(V.target.value),children:[a.jsx("option",{value:"all",children:"All"}),Y.map(V=>a.jsx("option",{value:V,children:V},V))]})]}),a.jsxs("label",{className:ue.field,children:[a.jsx("span",{className:ue.fieldLabel,children:"Since"}),a.jsx("input",{type:"date",className:ue.input,value:b,onChange:V=>x(V.target.value)})]}),(d!=="all"||m!=="all"||g!=="all"||b||u)&&a.jsx("button",{type:"button",className:ue.clear,onClick:()=>{r(""),h("all"),v("all"),p("all"),x("")},children:"Clear filters"})]}),o.status==="loading"?a.jsxs("div",{className:ue.tableWrap,children:[a.jsx(ct,{}),a.jsx(ct,{}),a.jsx(ct,{})]}):o.status==="error"?a.jsx("div",{className:ue.error,role:"alert",children:o.error?.message??"Failed to load runs."}):q.length===0?a.jsx("p",{className:ue.empty,children:"No runs match the current filters."}):a.jsx("div",{className:ue.tableWrap,children:a.jsxs("table",{className:ue.table,children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{scope:"col",children:"Goal"}),a.jsx("th",{scope:"col",className:ue.statusCol,children:a.jsxs("button",{type:"button",className:ue.sortHeader,onClick:()=>I("status"),children:["Status",K("status")]})}),a.jsx("th",{scope:"col",className:ue.engineCol,children:"Engine"}),a.jsx("th",{scope:"col",className:ue.providerCol,children:"Provider"}),a.jsx("th",{scope:"col",className:ue.tokensCol,children:a.jsxs("button",{type:"button",className:ue.sortHeader,onClick:()=>I("tokens"),children:["Tokens in/out",K("tokens")]})}),a.jsx("th",{scope:"col",className:ue.costCol,children:a.jsxs("button",{type:"button",className:ue.sortHeader,onClick:()=>I("estCostUsd"),children:["Est cost",K("estCostUsd")]})}),a.jsx("th",{scope:"col",className:ue.stepsCol,children:a.jsxs("button",{type:"button",className:ue.sortHeader,onClick:()=>I("steps"),children:["Steps",K("steps")]})}),a.jsx("th",{scope:"col",className:ue.createdCol,children:a.jsxs("button",{type:"button",className:ue.sortHeader,onClick:()=>I("createdAt"),children:["Created",K("createdAt")]})})]})}),a.jsx("tbody",{children:q.map(V=>a.jsxs("tr",{children:[a.jsx("td",{children:a.jsx(ri,{to:`/work/runs/${V.id}`,"data-focus-key":`run-${V.id}`,className:ue.goalLink,title:V.goal,children:V.goal})}),a.jsx("td",{children:a.jsx(We,{status:V.status})}),a.jsx("td",{children:V.engine}),a.jsx("td",{children:V.provider}),a.jsxs("td",{className:ue.numeric,children:[V.usage.tokensIn.toLocaleString()," / ",V.usage.tokensOut.toLocaleString()]}),a.jsxs("td",{className:ue.numeric,children:["$",V.usage.estCostUsd.toFixed(4)]}),a.jsx("td",{className:ue.numeric,children:V.steps.length}),a.jsx("td",{className:ue.date,children:uT(V.createdAt)})]},V.id))})]})})]})}const fT="_view_16nop_1",hT="_header_16nop_8",mT="_eyebrow_16nop_16",pT="_title_16nop_22",_T="_freshness_16nop_29",gT="_metaGrid_16nop_35",vT="_numeric_16nop_55",yT="_section_16nop_59",xT="_sectionTitle_16nop_65",bT="_resultText_16nop_70",jT="_taskList_16nop_79",ST="_taskItem_16nop_85",NT="_taskHeader_16nop_98",wT="_taskId_16nop_105",TT="_taskGoal_16nop_111",ET="_taskDeps_16nop_116",kT="_depLink_16nop_122",AT="_depMissing_16nop_127",RT="_taskError_16nop_132",CT="_taskUsage_16nop_141",DT="_stepList_16nop_148",MT="_stepItem_16nop_155",$T="_stepTs_16nop_164",LT="_stepKind_16nop_170",OT="_stepTask_16nop_176",zT="_stepSummary_16nop_180",UT="_empty_16nop_185",BT="_error_16nop_190",me={view:fT,header:hT,eyebrow:mT,title:pT,freshness:_T,metaGrid:gT,numeric:vT,section:yT,sectionTitle:xT,resultText:bT,taskList:jT,taskItem:ST,taskHeader:NT,taskId:wT,taskGoal:TT,taskDeps:ET,depLink:kT,depMissing:AT,taskError:RT,taskUsage:CT,stepList:DT,stepItem:MT,stepTs:$T,stepKind:LT,stepTask:OT,stepSummary:zT,empty:UT,error:BT};function Xu(s){if(!s)return"—";const o=new Date(s);return Number.isNaN(o.getTime())?s:o.toLocaleString()}function Ku(s){return`task-${encodeURIComponent(s)}`}function HT(){const{id:s}=dd(),o=y.useRef(null);Zl(`/work/runs/${s??""}`,o);const u=Ce(eg(s??""));if(!s)return a.jsx("div",{className:me.view,children:a.jsx("p",{className:me.error,role:"alert",children:"No run id in URL."})});if(u.status==="loading")return a.jsxs("div",{ref:o,className:me.view,children:[a.jsx(tt,{width:"60%"}),a.jsx(tt,{width:"30%"}),a.jsx(tt,{width:"80%"})]});if(u.status==="error"||!u.data)return a.jsx("div",{ref:o,className:me.view,children:a.jsx("p",{className:me.error,role:"alert",children:u.error?.message??`Run ${s} not found.`})});const r=u.data,d=new Map(r.tasks.map(h=>[h.id,h]));return a.jsxs("div",{ref:o,className:me.view,children:[a.jsxs("header",{className:me.header,children:[a.jsxs("div",{children:[a.jsxs("p",{className:me.eyebrow,children:["Run ",r.id]}),a.jsx("h1",{className:me.title,children:r.goal})]}),a.jsxs("div",{className:me.freshness,"aria-live":"polite",children:[u.status==="refreshing"?a.jsx(Tt,{}):null,a.jsx(We,{status:r.status})]})]}),a.jsxs("dl",{className:me.metaGrid,children:[a.jsxs("div",{children:[a.jsx("dt",{children:"Engine"}),a.jsx("dd",{children:r.engine})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Provider"}),a.jsx("dd",{children:r.provider})]}),r.engineModel?a.jsxs("div",{children:[a.jsx("dt",{children:"Model"}),a.jsx("dd",{children:r.engineModel})]}):null,a.jsxs("div",{children:[a.jsx("dt",{children:"Tokens in / out"}),a.jsxs("dd",{className:me.numeric,children:[r.usage.tokensIn.toLocaleString()," / ",r.usage.tokensOut.toLocaleString()]})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Est cost"}),a.jsxs("dd",{className:me.numeric,children:["$",r.usage.estCostUsd.toFixed(4)]})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Steps"}),a.jsx("dd",{className:me.numeric,children:r.usage.steps})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Budget (tokens / steps)"}),a.jsxs("dd",{className:me.numeric,children:[r.budget.maxTokens.toLocaleString()," / ",r.budget.maxSteps]})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Created"}),a.jsx("dd",{children:Xu(r.createdAt)})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Updated"}),a.jsx("dd",{children:Xu(r.updatedAt)})]}),r.terminationReason?a.jsxs("div",{children:[a.jsx("dt",{children:"Termination reason"}),a.jsx("dd",{children:r.terminationReason})]}):null]}),r.result?a.jsxs("section",{className:me.section,children:[a.jsx("h2",{className:me.sectionTitle,children:"Result"}),a.jsx("p",{className:me.resultText,children:r.result})]}):null,a.jsxs("section",{className:me.section,children:[a.jsxs("h2",{className:me.sectionTitle,children:["Tasks (",r.tasks.length,")"]}),r.tasks.length===0?a.jsx("p",{className:me.empty,children:"No tasks recorded."}):a.jsx("ul",{className:me.taskList,children:r.tasks.map(h=>a.jsxs("li",{id:Ku(h.id),className:me.taskItem,tabIndex:-1,children:[a.jsxs("div",{className:me.taskHeader,children:[a.jsx("span",{className:me.taskId,children:h.id}),a.jsx(We,{status:h.status})]}),a.jsx("p",{className:me.taskGoal,children:h.goal}),h.deps.length>0?a.jsxs("p",{className:me.taskDeps,children:["depends on:"," ",h.deps.map((m,v)=>a.jsxs("span",{children:[v>0?", ":"",d.has(m)?a.jsx("a",{href:`#${Ku(m)}`,className:me.depLink,children:m}):a.jsxs("span",{className:me.depMissing,children:[m," (unresolved)"]})]},m))]}):null,h.error?a.jsx("p",{className:me.taskError,role:"alert",children:h.error}):null,h.usage?a.jsxs("p",{className:me.taskUsage,children:[h.usage.tokensIn.toLocaleString()," / ",h.usage.tokensOut.toLocaleString()," tokens · $",h.usage.estCostUsd.toFixed(4)]}):null]},h.id))})]}),a.jsxs("section",{className:me.section,children:[a.jsxs("h2",{className:me.sectionTitle,children:["Step log (",r.steps.length,")"]}),r.steps.length===0?a.jsx("p",{className:me.empty,children:"No steps recorded."}):a.jsx("ol",{className:me.stepList,children:r.steps.map((h,m)=>a.jsxs("li",{className:me.stepItem,children:[a.jsx("span",{className:me.stepTs,children:Xu(h.ts)}),a.jsx("span",{className:me.stepKind,children:h.kind}),a.jsx("span",{className:me.stepTask,children:h.taskId?a.jsx("a",{href:`#${Ku(h.taskId)}`,className:me.depLink,children:h.taskId}):null}),a.jsx("span",{className:me.stepSummary,children:h.summary})]},`${h.ts}-${m}`))})]})]})}const qT="_view_1kj6a_1",GT="_header_1kj6a_8",QT="_title_1kj6a_16",YT="_freshness_1kj6a_22",VT="_count_1kj6a_28",XT="_filters_1kj6a_34",KT="_field_1kj6a_45",ZT="_fieldLabel_1kj6a_51",JT="_input_1kj6a_56",FT="_select_1kj6a_57",WT="_listWrap_1kj6a_73",IT="_listHeader_1kj6a_80",PT="_sortHeader_1kj6a_90",eE="_list_1kj6a_73",tE="_item_1kj6a_112",lE="_goalLink_1kj6a_124",nE="_goalText_1kj6a_140",aE="_burndown_1kj6a_150",sE="_burndownTrack_1kj6a_156",iE="_burndownFill_1kj6a_164",cE="_burndownLabel_1kj6a_170",oE="_numeric_1kj6a_177",rE="_date_1kj6a_184",uE="_empty_1kj6a_191",dE="_error_1kj6a_198",Ae={view:qT,header:GT,title:QT,freshness:YT,count:VT,filters:XT,field:KT,fieldLabel:ZT,input:JT,select:FT,listWrap:WT,listHeader:IT,sortHeader:PT,list:eE,item:tE,goalLink:lE,goalText:nE,burndown:aE,burndownTrack:sE,burndownFill:iE,burndownLabel:cE,numeric:oE,date:rE,empty:uE,error:dE};function Zu(s){return s.tasks.filter(o=>o.status==="done").length}function Is(s){return Math.max(s.plan?.tasks.length??0,s.tasks.length)}function Qc(s){return s.usage??{tokensIn:0,tokensOut:0,estCostUsd:0}}function s_(s){const o=Qc(s);return o.tokensIn+o.tokensOut}function fE(s){const o=new Date(s);return Number.isNaN(o.getTime())?s:o.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function hE(){const s=y.useRef(null);Zl("/work/swarms",s);const o=Ce(ej),u=y.useMemo(()=>o.data??[],[o.data]),[r,d]=y.useState(""),[h,m]=y.useState("all"),[v,g]=y.useState("createdAt"),[p,b]=y.useState("desc"),x=y.useMemo(()=>Array.from(new Set(u.map(D=>D.status))).sort(),[u]),w=y.useMemo(()=>{let D=u.filter(T=>{if(h!=="all"&&T.status!==h)return!1;if(!r.trim())return!0;const C=r.trim().toLowerCase();return T.id.toLowerCase().includes(C)||T.goal.toLowerCase().includes(C)});return D=[...D].sort((T,C)=>{let G=0;switch(v){case"createdAt":G=T.createdAt.localeCompare(C.createdAt);break;case"updatedAt":G=T.updatedAt.localeCompare(C.updatedAt);break;case"progress":{const Y=Is(T)>0?Zu(T)/Is(T):0,F=Is(C)>0?Zu(C)/Is(C):0;G=Y-F;break}case"tokens":G=s_(T)-s_(C);break;case"estCostUsd":G=Qc(T).estCostUsd-Qc(C).estCostUsd;break}return p==="asc"?G:-G}),D},[u,h,r,v,p]);function z(D){D===v?b(T=>T==="asc"?"desc":"asc"):(g(D),b("desc"))}function L(D){return D!==v?"":p==="asc"?" ↑":" ↓"}return a.jsxs("div",{ref:s,className:Ae.view,children:[a.jsxs("header",{className:Ae.header,children:[a.jsx("h1",{className:Ae.title,children:"Swarms"}),a.jsxs("div",{className:Ae.freshness,"aria-live":"polite",children:[o.status==="refreshing"?a.jsx(Tt,{}):null,a.jsxs("span",{className:Ae.count,children:[w.length," of ",u.length," swarms"]})]})]}),a.jsxs("form",{className:Ae.filters,role:"search","aria-label":"Filter swarms",onSubmit:D=>D.preventDefault(),children:[a.jsxs("label",{className:Ae.field,children:[a.jsx("span",{className:Ae.fieldLabel,children:"Search"}),a.jsx("input",{type:"text",className:Ae.input,placeholder:"goal or swarm id",value:r,onChange:D=>d(D.target.value)})]}),a.jsxs("label",{className:Ae.field,children:[a.jsx("span",{className:Ae.fieldLabel,children:"Status"}),a.jsxs("select",{className:Ae.select,value:h,onChange:D=>m(D.target.value),children:[a.jsx("option",{value:"all",children:"All"}),x.map(D=>a.jsx("option",{value:D,children:D},D))]})]})]}),o.status==="loading"?a.jsxs("div",{className:Ae.listWrap,children:[a.jsx(ct,{}),a.jsx(ct,{}),a.jsx(ct,{})]}):o.status==="error"?a.jsx("div",{className:Ae.error,role:"alert",children:o.error?.message??"Failed to load swarms."}):w.length===0?a.jsx("p",{className:Ae.empty,children:"No swarms match the current filters."}):a.jsxs("div",{className:Ae.listWrap,children:[a.jsxs("div",{className:Ae.listHeader,children:[a.jsx("span",{children:"Goal"}),a.jsxs("button",{type:"button",className:Ae.sortHeader,onClick:()=>z("progress"),children:["Progress",L("progress")]}),a.jsxs("button",{type:"button",className:Ae.sortHeader,onClick:()=>z("tokens"),children:["Tokens",L("tokens")]}),a.jsxs("button",{type:"button",className:Ae.sortHeader,onClick:()=>z("estCostUsd"),children:["Cost",L("estCostUsd")]}),a.jsxs("button",{type:"button",className:Ae.sortHeader,onClick:()=>z("createdAt"),children:["Created",L("createdAt")]})]}),a.jsx("ul",{className:Ae.list,children:w.map(D=>{const T=Zu(D),C=Is(D),G=C>0?Math.round(T/C*100):0,Y=Qc(D);return a.jsxs("li",{className:Ae.item,children:[a.jsxs(ri,{to:`/work/swarms/${D.id}`,"data-focus-key":`swarm-${D.id}`,className:Ae.goalLink,title:D.goal,children:[a.jsx("span",{className:Ae.goalText,children:D.goal}),a.jsx(We,{status:D.status})]}),a.jsxs("div",{className:Ae.burndown,children:[a.jsx("div",{className:Ae.burndownTrack,children:a.jsx("div",{className:Ae.burndownFill,style:{width:`${G}%`}})}),a.jsxs("span",{className:Ae.burndownLabel,children:[T,"/",C]})]}),a.jsxs("span",{className:Ae.numeric,children:[Y.tokensIn.toLocaleString(),"/",Y.tokensOut.toLocaleString()]}),a.jsxs("span",{className:Ae.numeric,children:["$",Y.estCostUsd.toFixed(4)]}),a.jsx("span",{className:Ae.date,children:fE(D.createdAt)})]},D.id)})})]})]})}const mE="_svg_2w2xr_1",pE="_phaseLabel_2w2xr_7",_E="_edge_2w2xr_14",gE="_arrowHead_2w2xr_19",vE="_nodeLink_2w2xr_23",yE="_nodeRect_2w2xr_26",xE="_nodeId_2w2xr_31",bE="_nodeGoal_2w2xr_37",jE="_neutral_2w2xr_45",SE="_statusDot_2w2xr_49",NE="_info_2w2xr_53",wE="_running_2w2xr_61",TE="_success_2w2xr_69",EE="_warning_2w2xr_77",kE="_danger_2w2xr_85",AE="_unknown_2w2xr_93",RE="_empty_2w2xr_105",sl={svg:mE,phaseLabel:pE,edge:_E,arrowHead:gE,nodeLink:vE,nodeRect:yE,nodeId:xE,nodeGoal:bE,neutral:jE,statusDot:SE,info:NE,running:wE,success:TE,warning:EE,danger:kE,unknown:AE,empty:RE},i_={scaffold:0,build:1,integrate:2,verify:3,review:4};function CE(s,o){const u=new Map;for(const r of s?.tasks??[])u.set(r.id,{id:r.id,phase:r.phase,goal:r.goal,deps:r.deps,status:"pending"});for(const r of o){const d=u.get(r.id);u.set(r.id,{id:r.id,phase:r.phase||d?.phase||"build",goal:d?.goal??"",deps:d?.deps??[],status:r.status})}return Array.from(u.values())}function c_(s,o){return s.length>o?`${s.slice(0,o-1)}…`:s}const Ps=140,ei=48,DE=60,ME=20,ti=20;function $E({tasks:s,taskAnchorPrefix:o="dag-task"}){if(s.length===0)return a.jsx("p",{className:sl.empty,children:"No tasks in this swarm."});const u=new Map;for(const b of s){const x=b.phase||"build",w=u.get(x)??[];w.push(b),u.set(x,w)}const r=Array.from(u.keys()).sort((b,x)=>(i_[b]??99)-(i_[x]??99)),d=new Map;let h=ti;for(const b of r)d.set(b,h),h+=Ps+DE;const m=h+ti,v=new Map;for(const b of r){let x=ti;for(const w of u.get(b)){const z=d.get(b);v.set(w.id,{x:z,y:x,cx:z+Ps/2,cy:x+ei/2}),x+=ei+ME}}const g=Math.max(...Array.from(v.values()).map(b=>b.y+ei))+ti*2,p=[];for(const b of s){const x=v.get(b.id);if(x)for(const w of b.deps){const z=v.get(w);if(!z)continue;const L=z.x+Ps,D=z.cy,T=x.x,C=x.cy,G=(L+T)/2;p.push({key:`${w}->${b.id}`,d:`M ${L} ${D} C ${G} ${D}, ${G} ${C}, ${T} ${C}`})}}return a.jsxs("svg",{width:m,height:g,viewBox:`0 0 ${m} ${g}`,className:sl.svg,role:"img","aria-label":"Swarm task dependency graph",children:[a.jsx("defs",{children:a.jsx("marker",{id:"dag-arrow",markerWidth:"8",markerHeight:"8",refX:"6",refY:"3",orient:"auto",children:a.jsx("path",{d:"M0,0 L0,6 L8,3 z",className:sl.arrowHead})})}),r.map(b=>a.jsx("text",{x:d.get(b)+Ps/2,y:ti-6,textAnchor:"middle",className:sl.phaseLabel,children:b},b)),p.map(b=>a.jsx("path",{d:b.d,className:sl.edge,fill:"none",markerEnd:"url(#dag-arrow)"},b.key)),s.map(b=>{const x=v.get(b.id);if(!x)return null;const w=P_(b.status);return a.jsx("g",{transform:`translate(${x.x},${x.y})`,children:a.jsxs("a",{href:`#${o}-${encodeURIComponent(b.id)}`,className:sl.nodeLink,children:[a.jsx("title",{children:`${b.id} — ${b.goal} (${b.status})`}),a.jsx("rect",{width:Ps,height:ei,rx:6,ry:6,className:`${sl.nodeRect} ${sl[w]}`}),a.jsx("circle",{cx:10,cy:ei/2,r:4,className:`${sl.statusDot} ${sl[w]}`}),a.jsx("text",{x:20,y:17,className:sl.nodeId,children:c_(b.id,18)}),a.jsx("text",{x:20,y:33,className:sl.nodeGoal,children:c_(b.goal,20)})]})},b.id)})]})}const LE="_view_19up6_1",OE="_header_19up6_8",zE="_eyebrow_19up6_16",UE="_title_19up6_22",BE="_freshness_19up6_29",HE="_burndownRow_19up6_35",qE="_burndownTrack_19up6_41",GE="_burndownFill_19up6_49",QE="_burndownLabel_19up6_55",YE="_metaGrid_19up6_62",VE="_numeric_19up6_80",XE="_mono_19up6_84",KE="_section_19up6_90",ZE="_sectionTitle_19up6_96",JE="_resultText_19up6_101",FE="_escalationList_19up6_110",WE="_escalationItem_19up6_115",IE="_escalationJson_19up6_120",PE="_dagWrap_19up6_130",e4="_taskList_19up6_138",t4="_taskItem_19up6_144",l4="_taskHeader_19up6_157",n4="_taskId_19up6_163",a4="_taskPhase_19up6_169",s4="_taskGoal_19up6_176",i4="_taskDeps_19up6_181",c4="_error_19up6_188",_e={view:LE,header:OE,eyebrow:zE,title:UE,freshness:BE,burndownRow:HE,burndownTrack:qE,burndownFill:GE,burndownLabel:QE,metaGrid:YE,numeric:VE,mono:XE,section:KE,sectionTitle:ZE,resultText:JE,escalationList:FE,escalationItem:WE,escalationJson:IE,dagWrap:PE,taskList:e4,taskItem:t4,taskHeader:l4,taskId:n4,taskPhase:a4,taskGoal:s4,taskDeps:i4,error:c4},o_="dag-task";function r_(s){if(!s)return"—";const o=new Date(s);return Number.isNaN(o.getTime())?s:o.toLocaleString()}function o4(){const{id:s}=dd(),o=y.useRef(null);Zl(`/work/swarms/${s??""}`,o);const u=Ce(tj(s??""));if(!s)return a.jsx("div",{className:_e.view,children:a.jsx("p",{className:_e.error,role:"alert",children:"No swarm id in URL."})});if(u.status==="loading")return a.jsxs("div",{ref:o,className:_e.view,children:[a.jsx(tt,{width:"60%"}),a.jsx(tt,{width:"30%"}),a.jsx(tt,{width:"80%"})]});if(u.status==="error"||!u.data)return a.jsx("div",{ref:o,className:_e.view,children:a.jsx("p",{className:_e.error,role:"alert",children:u.error?.message??`Swarm ${s} not found.`})});const r=u.data,d=r.tasks.filter(p=>p.status==="done").length,h=Math.max(r.plan?.tasks.length??0,r.tasks.length),m=h>0?Math.round(d/h*100):0,v=CE(r.plan,r.tasks),g=r.usage??{tokensIn:0,tokensOut:0,estCostUsd:0};return a.jsxs("div",{ref:o,className:_e.view,children:[a.jsxs("header",{className:_e.header,children:[a.jsxs("div",{children:[a.jsxs("p",{className:_e.eyebrow,children:["Swarm ",r.id]}),a.jsx("h1",{className:_e.title,children:r.goal})]}),a.jsxs("div",{className:_e.freshness,"aria-live":"polite",children:[u.status==="refreshing"?a.jsx(Tt,{}):null,a.jsx(We,{status:r.status})]})]}),a.jsxs("div",{className:_e.burndownRow,children:[a.jsx("div",{className:_e.burndownTrack,children:a.jsx("div",{className:_e.burndownFill,style:{width:`${m}%`}})}),a.jsxs("span",{className:_e.burndownLabel,children:[d,"/",h," tasks done (",m,"%)"]})]}),a.jsxs("dl",{className:_e.metaGrid,children:[a.jsxs("div",{children:[a.jsx("dt",{children:"Tokens in / out"}),a.jsxs("dd",{className:_e.numeric,children:[g.tokensIn.toLocaleString()," / ",g.tokensOut.toLocaleString()]})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Est cost"}),a.jsxs("dd",{className:_e.numeric,children:["$",g.estCostUsd.toFixed(4)]})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Parallelism"}),a.jsx("dd",{className:_e.numeric,children:r.parallel})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Created"}),a.jsx("dd",{children:r_(r.createdAt)})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Updated"}),a.jsx("dd",{children:r_(r.updatedAt)})]}),r.project?a.jsxs("div",{children:[a.jsx("dt",{children:"Project"}),a.jsx("dd",{className:_e.mono,children:r.project})]}):null]}),r.escalations&&r.escalations.length>0?a.jsxs("section",{className:_e.section,children:[a.jsxs("h2",{className:_e.sectionTitle,children:["Escalations (",r.escalations.length,")"]}),a.jsx("ul",{className:_e.escalationList,children:r.escalations.map((p,b)=>a.jsx("li",{className:_e.escalationItem,children:a.jsx("pre",{className:_e.escalationJson,children:JSON.stringify(p,null,2)})},b))})]}):null,r.result?a.jsxs("section",{className:_e.section,children:[a.jsx("h2",{className:_e.sectionTitle,children:"Result"}),a.jsx("p",{className:_e.resultText,children:r.result})]}):null,a.jsxs("section",{className:_e.section,children:[a.jsx("h2",{className:_e.sectionTitle,children:"Task graph"}),a.jsx("div",{className:_e.dagWrap,children:a.jsx($E,{tasks:v,taskAnchorPrefix:o_})})]}),a.jsxs("section",{className:_e.section,children:[a.jsxs("h2",{className:_e.sectionTitle,children:["Tasks (",v.length,")"]}),a.jsx("ul",{className:_e.taskList,children:v.map(p=>a.jsxs("li",{id:`${o_}-${p.id}`,"data-focus-key":`swarm-task-${p.id}`,className:_e.taskItem,tabIndex:-1,children:[a.jsxs("div",{className:_e.taskHeader,children:[a.jsx("span",{className:_e.taskId,children:p.id}),a.jsx("span",{className:_e.taskPhase,children:p.phase}),a.jsx(We,{status:p.status})]}),a.jsx("p",{className:_e.taskGoal,children:p.goal}),p.deps.length>0?a.jsxs("p",{className:_e.taskDeps,children:["depends on: ",p.deps.join(", ")]}):null]},p.id))})]})]})}const r4="_view_1bwoy_1",u4="_header_1bwoy_8",d4="_title_1bwoy_16",f4="_freshness_1bwoy_22",h4="_callout_1bwoy_28",m4="_calloutTitle_1bwoy_39",p4="_calloutBody_1bwoy_44",_4="_calloutCommand_1bwoy_48",g4="_metaGrid_1bwoy_59",v4="_section_1bwoy_77",y4="_sectionTitle_1bwoy_83",x4="_serviceError_1bwoy_88",b4="_tickTableWrap_1bwoy_96",j4="_tickTable_1bwoy_96",S4="_date_1bwoy_124",N4="_numeric_1bwoy_130",w4="_dryRun_1bwoy_135",T4="_empty_1bwoy_140",E4="_error_1bwoy_145",Ge={view:r4,header:u4,title:d4,freshness:f4,callout:h4,calloutTitle:m4,calloutBody:p4,calloutCommand:_4,metaGrid:g4,section:v4,sectionTitle:y4,serviceError:x4,tickTableWrap:b4,tickTable:j4,date:S4,numeric:N4,dryRun:w4,empty:T4,error:E4},k4={missing:"No daemon state file has been written yet — the daemon may never have run on this machine.",malformed:"The daemon state file exists but failed to parse.",unreadable:'The daemon state file could not be read. This is also the exact signal produced when a state-recovery marker is present (a prior repair left a quarantine in progress) — the API does not distinguish the two cases, so treat this as "inspect before trusting displayed daemon state."',inconsistent:"The daemon state file and the live lock/activity check disagree — the daemon may be mid-restart.",unavailable:"The daemon state read path itself failed (I/O error or similar)."};function u_(s){if(!s)return"—";const o=new Date(s);return Number.isNaN(o.getTime())?s:o.toLocaleString()}function A4({quality:s}){const o=s.reason,u=k4[o]??"Daemon state could not be verified.";return a.jsxs("section",{className:Ge.callout,role:"alert",children:[a.jsxs("p",{className:Ge.calloutTitle,children:["Daemon state is unknown (",o,")"]}),a.jsx("p",{className:Ge.calloutBody,children:u}),a.jsx("p",{className:Ge.calloutBody,children:"Real remedy — preview or execute a state recovery from a terminal on this machine:"}),a.jsx("pre",{className:Ge.calloutCommand,children:`ashlr daemon recover-state --dry-run --expected-sha256 <sha256> [--json]
|
|
62
|
+
ashlr daemon recover-state --execute --plan-id <uuid> --plan-sha256 <sha256> --authorize <plan-sha256> [--json]`}),a.jsx("p",{className:Ge.calloutBody,children:"If a quarantine already exists and needs resolving instead:"}),a.jsx("pre",{className:Ge.calloutCommand,children:`ashlr daemon resolve-state --dry-run --quarantine-plan-id <uuid> --quarantine-receipt-sha256 <sha256> [--json]
|
|
63
|
+
ashlr daemon resolve-state --execute --plan-id <uuid> --plan-sha256 <sha256> --authorize <plan-sha256> --confirm <plan-sha256> [--json]`})]})}function R4(){const s=y.useRef(null);Zl("/control/daemon",s);const o=Ce(si),u=Ce(lj),r=o.data?.daemon,d=u.data;return a.jsxs("div",{ref:s,className:Ge.view,children:[a.jsxs("header",{className:Ge.header,children:[a.jsx("h1",{className:Ge.title,children:"Daemon"}),a.jsxs("div",{className:Ge.freshness,"aria-live":"polite",children:[o.status==="refreshing"||u.status==="refreshing"?a.jsx(Tt,{}):null,r?a.jsx(Re,{quality:r.sourceQuality,label:"daemon state",children:a.jsx(We,{status:r.running?"running":"pending",children:r.running?"running":"stopped"})}):null]})]}),o.status==="loading"?a.jsx(tt,{width:"60%"}):o.status==="error"||!r?a.jsx("p",{className:Ge.error,role:"alert",children:o.error?.message??"Failed to load control snapshot."}):a.jsxs(a.Fragment,{children:[Xa(r.sourceQuality)?null:a.jsx(A4,{quality:r.sourceQuality}),a.jsxs("dl",{className:Ge.metaGrid,children:[a.jsxs("div",{children:[a.jsx("dt",{children:"Runtime state"}),a.jsx("dd",{children:a.jsx(Re,{quality:r.sourceQuality,label:"runtime state",children:r.runtimeState})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"PID"}),a.jsx("dd",{children:a.jsx(Re,{quality:r.sourceQuality,label:"pid",children:r.pid??"—"})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Last tick"}),a.jsx("dd",{children:a.jsx(Re,{quality:r.sourceQuality,label:"last tick",children:u_(r.lastTickAt)})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Today's spend"}),a.jsx("dd",{children:a.jsxs(Re,{quality:r.sourceQuality,label:"spend",children:["$",r.todaySpentUsd.toFixed(2)]})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Direction mode"}),a.jsx("dd",{children:a.jsx(Re,{quality:r.sourceQuality,label:"direction mode",children:r.activeDirectionMode??"none"})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Direction reason"}),a.jsx("dd",{children:a.jsx(Re,{quality:r.sourceQuality,label:"direction reason",children:r.activeDirectionReason??"—"})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Autonomy control loop"}),a.jsx("dd",{children:a.jsx(Re,{quality:r.sourceQuality,label:"autonomy control loop",children:r.autonomyControlLoop?"enabled":"disabled"})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Autonomy control mode"}),a.jsx("dd",{children:a.jsx(Re,{quality:r.sourceQuality,label:"autonomy control mode",children:r.autonomyControlMode})})]})]}),a.jsxs("section",{className:Ge.section,children:[a.jsx("h2",{className:Ge.sectionTitle,children:"OS service"}),a.jsxs("dl",{className:Ge.metaGrid,children:[a.jsxs("div",{children:[a.jsx("dt",{children:"Registration state"}),a.jsx("dd",{children:r.service.registrationState})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Installed"}),a.jsx("dd",{children:r.service.installed?"yes":"no"})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Running"}),a.jsx("dd",{children:r.service.running?"yes":"no"})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Runtime state"}),a.jsx("dd",{children:r.service.runtimeState??"unknown"})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Platform"}),a.jsx("dd",{children:r.service.platformSpec})]})]}),r.service.errorLog?a.jsx("p",{className:Ge.serviceError,role:"alert",children:r.service.errorLog}):null]})]}),a.jsxs("section",{className:Ge.section,children:[a.jsx("h2",{className:Ge.sectionTitle,children:"Recent ticks"}),u.status==="loading"?a.jsx(tt,{width:"80%"}):!d||!d.ticks||d.ticks.length===0?a.jsx("p",{className:Ge.empty,children:"No tick history available."}):a.jsx("div",{className:Ge.tickTableWrap,children:a.jsxs("table",{className:Ge.tickTable,children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{scope:"col",children:"Time"}),a.jsx("th",{scope:"col",children:"Reason"}),a.jsx("th",{scope:"col",children:"Items"}),a.jsx("th",{scope:"col",children:"Proposals"}),a.jsx("th",{scope:"col",children:"Spend"})]})}),a.jsx("tbody",{children:[...d.ticks].reverse().slice(0,20).map((h,m)=>a.jsxs("tr",{children:[a.jsx("td",{className:Ge.date,children:u_(h.ts)}),a.jsxs("td",{children:[h.reason,h.dryRun?a.jsx("span",{className:Ge.dryRun,children:" (dry-run)"}):null]}),a.jsx("td",{className:Ge.numeric,children:h.itemsConsidered}),a.jsx("td",{className:Ge.numeric,children:h.proposalsCreated}),a.jsxs("td",{className:Ge.numeric,children:["$",h.spentUsd.toFixed(4)]})]},`${h.ts}-${m}`))})]})})]})]})}const C4="_view_ssrhq_1",D4="_header_ssrhq_8",M4="_title_ssrhq_14",$4="_freshness_ssrhq_20",L4="_section_ssrhq_26",O4="_sectionTitle_ssrhq_32",z4="_killSwitchRow_ssrhq_37",U4="_pauseButton_ssrhq_47",B4="_resumeButton_ssrhq_65",H4="_mutationError_ssrhq_83",q4="_metaGrid_ssrhq_91",G4="_numeric_ssrhq_109",Q4="_lockWarning_ssrhq_113",Y4="_tableWrap_ssrhq_117",V4="_table_ssrhq_117",X4="_mono_ssrhq_144",K4="_empty_ssrhq_149",Z4="_error_ssrhq_154",J4="_confirmBody_ssrhq_162",F4="_confirmActions_ssrhq_168",W4="_cancelButton_ssrhq_174",I4="_confirmButton_ssrhq_186",oe={view:C4,header:D4,title:M4,freshness:$4,section:L4,sectionTitle:O4,killSwitchRow:z4,pauseButton:U4,resumeButton:B4,mutationError:H4,metaGrid:q4,numeric:G4,lockWarning:Q4,tableWrap:Y4,table:V4,mono:X4,empty:K4,error:Z4,confirmBody:J4,confirmActions:F4,cancelButton:W4,confirmButton:I4};function d_(s){if(!s)return"—";const o=new Date(s);return Number.isNaN(o.getTime())?s:o.toLocaleString()}function P4(){const s=y.useRef(null);Zl("/control/fleet",s);const o=Ce(nd),u=Ce(tg),r=bd(),[d,h]=y.useState(null),[m,v]=y.useState(!1),[g,p]=y.useState(!1),[b,x]=y.useState(!1),[w,z]=y.useState(null);async function L(q){x(!0),z(null);try{q==="pause"?await sg():await ig()}catch(I){z(I instanceof Error?I.message:String(I))}finally{x(!1),h(null)}}function D(q){z(null),h(q),v(!0)}function T(){v(!1),r.hasHold?d&&L(d):p(!0)}y.useEffect(()=>{g||d&&(r.hasHold?L(d):h(null))},[g]);const C=o.data,G=C?.killSwitch,Y=G?{sourceState:G.sourceState,complete:G.sourceState==="healthy",reason:G.reason}:void 0,F=C?.killed===!0;return a.jsxs("div",{ref:s,className:oe.view,children:[a.jsxs("header",{className:oe.header,children:[a.jsx("h1",{className:oe.title,children:"Fleet"}),a.jsx("div",{className:oe.freshness,"aria-live":"polite",children:o.status==="refreshing"||u.status==="refreshing"?a.jsx(Tt,{}):null})]}),o.status==="loading"?a.jsx(tt,{width:"60%"}):o.status==="error"||!C?a.jsx("p",{className:oe.error,role:"alert",children:o.error?.message??"Failed to load fleet status."}):a.jsxs(a.Fragment,{children:[a.jsxs("section",{className:oe.section,children:[a.jsx("h2",{className:oe.sectionTitle,children:"Kill switch"}),a.jsx("div",{className:oe.killSwitchRow,children:a.jsx(Re,{quality:Y,label:"kill switch",renderControl:()=>a.jsx("button",{type:"button",className:F?oe.resumeButton:oe.pauseButton,onClick:()=>D(F?"resume":"pause"),disabled:b,children:b?"Working…":F?"Resume fleet":"Pause fleet"}),children:a.jsx(We,{status:F?"paused":"running",children:F?"engaged — fleet paused":"clear — fleet active"})})}),w?a.jsx("p",{className:oe.mutationError,role:"alert",children:w}):null]}),a.jsxs("section",{className:oe.section,children:[a.jsx("h2",{className:oe.sectionTitle,children:"Queue depth"}),a.jsxs("dl",{className:oe.metaGrid,children:[a.jsxs("div",{children:[a.jsx("dt",{children:"Backlog items"}),a.jsx("dd",{className:oe.numeric,children:C.queue.backlogItems})]}),C.queue.eligibleBacklogItems!==void 0?a.jsxs("div",{children:[a.jsx("dt",{children:"Eligible"}),a.jsx("dd",{className:oe.numeric,children:C.queue.eligibleBacklogItems})]}):null,C.queue.cooldownItems!==void 0?a.jsxs("div",{children:[a.jsx("dt",{children:"Cooldown"}),a.jsx("dd",{className:oe.numeric,children:C.queue.cooldownItems})]}):null,C.queue.pendingItems!==void 0?a.jsxs("div",{children:[a.jsx("dt",{children:"Pending"}),a.jsx("dd",{className:oe.numeric,children:C.queue.pendingItems})]}):null,C.queue.nextEligibleAt!==void 0?a.jsxs("div",{children:[a.jsx("dt",{children:"Next eligible"}),a.jsx("dd",{children:d_(C.queue.nextEligibleAt)})]}):null]})]}),a.jsxs("section",{className:oe.section,children:[a.jsx("h2",{className:oe.sectionTitle,children:"Lease health"}),C.queue.shared?a.jsxs(a.Fragment,{children:[a.jsxs("dl",{className:oe.metaGrid,children:[a.jsxs("div",{children:[a.jsx("dt",{children:"Active claims"}),a.jsx("dd",{className:oe.numeric,children:C.queue.shared.activeClaims})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Owned by this machine"}),a.jsx("dd",{className:oe.numeric,children:C.queue.shared.ownedClaims})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Reclaimable (expired)"}),a.jsx("dd",{className:oe.numeric,children:C.queue.shared.reclaimableClaims})]}),C.queue.shared.executingClaims!==void 0?a.jsxs("div",{children:[a.jsx("dt",{children:"Executing"}),a.jsx("dd",{className:oe.numeric,children:C.queue.shared.executingClaims})]}):null,C.queue.shared.ambiguousClaims!==void 0?a.jsxs("div",{children:[a.jsx("dt",{children:"Ambiguous (needs reconciliation)"}),a.jsx("dd",{className:oe.numeric,children:C.queue.shared.ambiguousClaims})]}):null,a.jsxs("div",{children:[a.jsx("dt",{children:"Next lease expiry"}),a.jsx("dd",{children:d_(C.queue.shared.nextLeaseExpiryAt)})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Advisory lock"}),a.jsxs("dd",{children:[C.queue.shared.lock.present?C.queue.shared.lock.stale?"present, stale":"present, healthy":"absent",C.queue.shared.lock.recoveryRequired?a.jsx("span",{className:oe.lockWarning,children:" — recovery required"}):null]})]})]}),C.queue.shared.claimsByMachine.length>0?a.jsx("div",{className:oe.tableWrap,children:a.jsxs("table",{className:oe.table,children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{scope:"col",children:"Machine"}),a.jsx("th",{scope:"col",children:"Active"}),a.jsx("th",{scope:"col",children:"Expired"}),a.jsx("th",{scope:"col",children:"Executing"})]})}),a.jsx("tbody",{children:C.queue.shared.claimsByMachine.map(q=>a.jsxs("tr",{children:[a.jsx("td",{className:oe.mono,children:q.machineId}),a.jsx("td",{className:oe.numeric,children:q.active}),a.jsx("td",{className:oe.numeric,children:q.expired}),a.jsx("td",{className:oe.numeric,children:q.executing??"—"})]},q.machineId))})]})}):null]}):a.jsx("p",{className:oe.empty,children:"Shared fleet queue is not in use on this deployment."})]})]}),a.jsxs("section",{className:oe.section,children:[a.jsx("h2",{className:oe.sectionTitle,children:"Recent activity"}),u.status==="loading"?a.jsx(tt,{width:"70%"}):u.status==="error"||!u.data?a.jsx("p",{className:oe.error,role:"alert",children:u.error?.message??"Failed to load fleet activity."}):a.jsxs("dl",{className:oe.metaGrid,children:[a.jsxs("div",{children:[a.jsx("dt",{children:"Cooldown items"}),a.jsx("dd",{className:oe.numeric,children:u.data.cooldownCount})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Engines ready"}),a.jsxs("dd",{className:oe.numeric,children:[u.data.engineReadiness.filter(q=>q.installed&&q.authed===!0).length," /"," ",u.data.engineReadiness.length]})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Recent auto-merges"}),a.jsx("dd",{className:oe.numeric,children:C?.merges.recent??"—"})]})]})]}),a.jsxs(di,{open:m,onClose:()=>{v(!1),h(null)},titleId:"fleet-kill-switch-confirm",title:d==="resume"?"Resume the fleet?":"Pause the fleet?",children:[a.jsx("p",{className:oe.confirmBody,children:d==="resume"?"This clears the global kill switch. Autonomous dispatch will resume across the fleet.":"This engages the global kill switch. Autonomous dispatch halts fleet-wide until explicitly resumed."}),a.jsxs("div",{className:oe.confirmActions,children:[a.jsx("button",{type:"button",className:oe.cancelButton,onClick:()=>{v(!1),h(null)},children:"Cancel"}),a.jsx("button",{type:"button",className:oe.confirmButton,onClick:T,children:d==="resume"?"Yes, resume":"Yes, pause"})]})]}),a.jsx(ao,{open:g,onClose:()=>p(!1),reason:d==="resume"?"Resuming the fleet requires the dispatch token.":"Pausing the fleet requires the dispatch token."})]})}const ek="_view_1fet3_1",tk="_header_1fet3_8",lk="_title_1fet3_14",nk="_freshness_1fet3_20",ak="_unavailable_1fet3_26",sk="_counts_1fet3_35",ik="_countTile_1fet3_41",ck="_countValue_1fet3_51",ok="_countLabel_1fet3_57",rk="_critical_1fet3_64",uk="_high_1fet3_65",dk="_medium_1fet3_68",fk="_low_1fet3_71",hk="_filters_1fet3_75",mk="_field_1fet3_86",pk="_fieldLabel_1fet3_92",_k="_input_1fet3_97",gk="_select_1fet3_98",vk="_tableWrap_1fet3_114",yk="_table_1fet3_114",xk="_mono_1fet3_141",bk="_empty_1fet3_146",jk="_error_1fet3_153",je={view:ek,header:tk,title:lk,freshness:nk,unavailable:ak,counts:sk,countTile:ik,countValue:ck,countLabel:ok,critical:rk,high:uk,medium:dk,low:fk,filters:hk,field:mk,fieldLabel:pk,input:_k,select:gk,tableWrap:vk,table:yk,mono:xk,empty:bk,error:jk},Sk={critical:"danger",high:"danger",medium:"warning",low:"neutral"},f_={critical:0,high:1,medium:2,low:3};function Nk(){const s=y.useRef(null);Zl("/control/security",s);const o=Ce(si),u=o.data?.security,[r,d]=y.useState(""),[h,m]=y.useState("all"),[v,g]=y.useState("all"),p=y.useMemo(()=>Array.from(new Set((u?.findings??[]).map(x=>x.repo))).sort(),[u]),b=y.useMemo(()=>(u?.findings??[]).filter(w=>h==="all"?!0:w.severity===h).filter(w=>v==="all"?!0:w.repo===v).filter(w=>{if(!r.trim())return!0;const z=r.trim().toLowerCase();return w.title.toLowerCase().includes(z)||w.repo.toLowerCase().includes(z)}).sort((w,z)=>(f_[w.severity]??9)-(f_[z.severity]??9)),[u,h,v,r]);return a.jsxs("div",{ref:s,className:je.view,children:[a.jsxs("header",{className:je.header,children:[a.jsx("h1",{className:je.title,children:"Security"}),a.jsx("div",{className:je.freshness,"aria-live":"polite",children:o.status==="refreshing"?a.jsx(Tt,{}):null})]}),o.status==="loading"?a.jsx(tt,{width:"60%"}):o.status==="error"||!u?a.jsx("p",{className:je.error,role:"alert",children:o.error?.message??"Failed to load control snapshot."}):u.available?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:je.counts,children:[a.jsxs("div",{className:`${je.countTile} ${je.critical}`,children:[a.jsx("span",{className:je.countValue,children:u.counts.critical}),a.jsx("span",{className:je.countLabel,children:"Critical"})]}),a.jsxs("div",{className:`${je.countTile} ${je.high}`,children:[a.jsx("span",{className:je.countValue,children:u.counts.high}),a.jsx("span",{className:je.countLabel,children:"High"})]}),a.jsxs("div",{className:`${je.countTile} ${je.medium}`,children:[a.jsx("span",{className:je.countValue,children:u.counts.medium}),a.jsx("span",{className:je.countLabel,children:"Medium"})]}),a.jsxs("div",{className:`${je.countTile} ${je.low}`,children:[a.jsx("span",{className:je.countValue,children:u.counts.low}),a.jsx("span",{className:je.countLabel,children:"Low"})]})]}),a.jsxs("form",{className:je.filters,role:"search","aria-label":"Filter findings",onSubmit:x=>x.preventDefault(),children:[a.jsxs("label",{className:je.field,children:[a.jsx("span",{className:je.fieldLabel,children:"Search"}),a.jsx("input",{type:"text",className:je.input,placeholder:"title or repo",value:r,onChange:x=>d(x.target.value)})]}),a.jsxs("label",{className:je.field,children:[a.jsx("span",{className:je.fieldLabel,children:"Severity"}),a.jsxs("select",{className:je.select,value:h,onChange:x=>m(x.target.value),children:[a.jsx("option",{value:"all",children:"All"}),a.jsx("option",{value:"critical",children:"Critical"}),a.jsx("option",{value:"high",children:"High"}),a.jsx("option",{value:"medium",children:"Medium"}),a.jsx("option",{value:"low",children:"Low"})]})]}),a.jsxs("label",{className:je.field,children:[a.jsx("span",{className:je.fieldLabel,children:"Repo"}),a.jsxs("select",{className:je.select,value:v,onChange:x=>g(x.target.value),children:[a.jsx("option",{value:"all",children:"All"}),p.map(x=>a.jsx("option",{value:x,children:x},x))]})]})]}),b.length===0?a.jsx("p",{className:je.empty,children:"No findings match the current filters."}):a.jsx("div",{className:je.tableWrap,children:a.jsxs("table",{className:je.table,children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{scope:"col",children:"Severity"}),a.jsx("th",{scope:"col",children:"Repo"}),a.jsx("th",{scope:"col",children:"Finding"})]})}),a.jsx("tbody",{children:b.map((x,w)=>a.jsxs("tr",{children:[a.jsx("td",{children:a.jsx(We,{status:x.severity,tone:Sk[x.severity]??"neutral"})}),a.jsx("td",{className:je.mono,children:x.repo}),a.jsx("td",{children:x.title})]},`${x.repo}-${x.title}-${w}`))})]})})]}):a.jsx("p",{className:je.unavailable,children:`No cached security data available — the backlog is absent, empty, or has no security-source findings. This is not the same as "clean": it means binshield hasn't produced cached findings for this fleet yet.`})]})}const wk="_view_1yeql_1",Tk="_header_1yeql_8",Ek="_title_1yeql_14",kk="_freshness_1yeql_20",Ak="_count_1yeql_26",Rk="_missionCard_1yeql_31",Ck="_sectionTitle_1yeql_41",Dk="_missionState_1yeql_49",Mk="_sourceGrid_1yeql_54",$k="_list_1yeql_68",Lk="_goalCard_1yeql_74",Ok="_goalHeader_1yeql_88",zk="_goalObjective_1yeql_95",Uk="_progressRow_1yeql_100",Bk="_progressTrack_1yeql_106",Hk="_progressFill_1yeql_114",qk="_progressLabel_1yeql_120",Gk="_nextActionable_1yeql_127",Qk="_mono_1yeql_132",Yk="_milestoneList_1yeql_136",Vk="_milestoneItem_1yeql_142",Xk="_milestoneTitle_1yeql_149",Kk="_noMilestones_1yeql_153",Zk="_empty_1yeql_158",Jk="_error_1yeql_165",Qe={view:wk,header:Tk,title:Ek,freshness:kk,count:Ak,missionCard:Rk,sectionTitle:Ck,missionState:Dk,sourceGrid:Mk,list:$k,goalCard:Lk,goalHeader:Ok,goalObjective:zk,progressRow:Uk,progressTrack:Bk,progressFill:Hk,progressLabel:qk,nextActionable:Gk,mono:Qk,milestoneList:Yk,milestoneItem:Vk,milestoneTitle:Xk,noMilestones:Kk,empty:Zk,error:Jk};function Fk(){const s=y.useRef(null);Zl("/goals",s);const o=Ce(nj),u=Ce(aj),r=o.data??[],d=u.data;return a.jsxs("div",{ref:s,className:Qe.view,children:[a.jsxs("header",{className:Qe.header,children:[a.jsx("h1",{className:Qe.title,children:"Goals"}),a.jsxs("div",{className:Qe.freshness,"aria-live":"polite",children:[o.status==="refreshing"||u.status==="refreshing"?a.jsx(Tt,{}):null,a.jsxs("span",{className:Qe.count,children:[r.length," goals"]})]})]}),u.status==="loading"?a.jsx(tt,{width:"50%"}):u.status==="success"&&d?a.jsxs("section",{className:Qe.missionCard,children:[a.jsx("h2",{className:Qe.sectionTitle,children:"Mission state"}),a.jsx("p",{className:Qe.missionState,children:d.state}),a.jsxs("dl",{className:Qe.sourceGrid,children:[a.jsxs("div",{children:[a.jsx("dt",{children:"Briefing"}),a.jsx("dd",{children:a.jsx(Re,{quality:d.sources.briefing??void 0,label:"briefing source",children:"available"})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Goals source"}),a.jsx("dd",{children:a.jsx(Re,{quality:d.sources.goals??void 0,label:"goals source",children:"available"})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Enrollment"}),a.jsx("dd",{children:a.jsx(Re,{quality:d.sources.enrollment??void 0,label:"enrollment source",children:"available"})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Proposals"}),a.jsx("dd",{children:a.jsx(Re,{quality:d.sources.proposals??void 0,label:"proposals source",children:"available"})})]})]})]}):null,o.status==="loading"?a.jsxs("div",{className:Qe.list,children:[a.jsx(tt,{width:"90%"}),a.jsx(tt,{width:"70%"})]}):o.status==="error"?a.jsx("p",{className:Qe.error,role:"alert",children:o.error?.message??"Failed to load goals."}):r.length===0?a.jsx("p",{className:Qe.empty,children:"No active goals."}):a.jsx("ul",{className:Qe.list,children:r.map(h=>{const m=Math.round((h.progress.fractionDone??0)*100);return a.jsxs("li",{className:Qe.goalCard,"data-focus-key":`goal-${h.id}`,tabIndex:0,children:[a.jsxs("div",{className:Qe.goalHeader,children:[a.jsx("h3",{className:Qe.goalObjective,children:h.objective}),a.jsx(We,{status:h.status})]}),a.jsxs("div",{className:Qe.progressRow,children:[a.jsx("div",{className:Qe.progressTrack,children:a.jsx("div",{className:Qe.progressFill,style:{width:`${m}%`}})}),a.jsxs("span",{className:Qe.progressLabel,children:[m,"%"]})]}),h.progress.nextActionableId?a.jsxs("p",{className:Qe.nextActionable,children:["Next actionable milestone id: ",a.jsx("span",{className:Qe.mono,children:h.progress.nextActionableId})]}):null,h.milestones.length>0?a.jsx("ol",{className:Qe.milestoneList,children:[...h.milestones].sort((v,g)=>v.order-g.order).map(v=>a.jsxs("li",{className:Qe.milestoneItem,children:[a.jsx(We,{status:v.status}),a.jsx("span",{className:Qe.milestoneTitle,children:v.title})]},v.title))}):a.jsx("p",{className:Qe.noMilestones,children:"No milestones yet."})]},h.id)})})]})}const Wk="_body_15hsz_1",Ik="_error_15hsz_8",Pk="_actions_15hsz_17",eA="_cancel_15hsz_23",tA="_confirm_15hsz_33",lA="_destructive_15hsz_48",qa={body:Wk,error:Ik,actions:Pk,cancel:eA,confirm:tA,destructive:lA};function fg({open:s,onClose:o,title:u,body:r,confirmLabel:d,destructive:h,onConfirm:m,busy:v,error:g}){const p=y.useId(),b=y.useRef(null);return a.jsxs(di,{open:s,onClose:o,titleId:p,title:u,initialFocusRef:b,children:[a.jsx("div",{className:qa.body,children:r}),g?a.jsx("p",{className:qa.error,role:"alert",children:g}):null,a.jsxs("div",{className:qa.actions,children:[a.jsx("button",{type:"button",className:qa.cancel,onClick:o,disabled:v,children:"Cancel"}),a.jsx("button",{ref:b,type:"button",className:h?qa.destructive:qa.confirm,onClick:m,disabled:v,children:v?"Working…":d})]})]})}const nA="_list_1nh33_1",aA="_filters_1nh33_8",sA="_filterField_1nh33_14",iA="_filterLabel_1nh33_21",cA="_summary_1nh33_36",oA="_batchBar_1nh33_44",rA="_batchApprove_1nh33_61",uA="_batchReject_1nh33_66",dA="_skeletons_1nh33_71",fA="_error_1nh33_77",hA="_empty_1nh33_85",mA="_table_1nh33_94",pA="_checkboxCol_1nh33_121",_A="_repoCol_1nh33_125",gA="_kindCol_1nh33_129",vA="_ageCol_1nh33_133",yA="_statusCol_1nh33_137",xA="_whyCol_1nh33_141",bA="_row_1nh33_145",jA="_rowActive_1nh33_155",SA="_titleLink_1nh33_159",NA="_repoCell_1nh33_172",wA="_age_1nh33_133",TA="_why_1nh33_141",Me={list:nA,filters:aA,filterField:sA,filterLabel:iA,summary:cA,batchBar:oA,batchApprove:rA,batchReject:uA,skeletons:dA,error:fA,empty:hA,table:mA,checkboxCol:pA,repoCol:_A,kindCol:gA,ageCol:vA,statusCol:yA,whyCol:xA,row:bA,rowActive:jA,titleLink:SA,repoCell:NA,age:wA,why:TA},EA=[{value:"pending",label:"Pending"},{value:"rejected",label:"Rejected"},{value:"approved",label:"Approved"},{value:"applied",label:"Applied"},{value:"failed",label:"Failed"},{value:"awaiting-host-merge",label:"Awaiting host merge"},{value:"all",label:"All statuses"}];function kA(s){const o=Date.parse(s);if(Number.isNaN(o))return"—";const u=Math.max(0,Math.round((Date.now()-o)/1e3));if(u<60)return`${u}s`;const r=Math.round(u/60);if(r<60)return`${r}m`;const d=Math.round(r/60);return d<24?`${d}h`:`${Math.round(d/24)}d`}function AA({selectedId:s,onDispatchDisabled:o}){const[u,r]=y.useState("pending"),[d,h]=y.useState(""),[m,v]=y.useState(""),[g,p]=y.useState(""),[b,x]=y.useState(new Set),[w,z]=y.useState(0),[L,D]=y.useState(null),[T,C]=y.useState(!1),[G,Y]=y.useState(!1),[F,q]=y.useState(!1),[I,K]=y.useState(null),V=y.useRef(null),ce=y.useRef(new Map),ge=Ic(),se=Ce(sj({status:u,since:d||void 0,limit:500})),ve=y.useMemo(()=>{const Q=se.data?.proposals??[],P=m.trim().toLowerCase(),S=g.trim().toLowerCase();return Q.filter(O=>!(P&&!O.title.toLowerCase().includes(P)&&!(O.summary??"").toLowerCase().includes(P)||S&&!(O.repo??"").toLowerCase().includes(S)))},[se.data,m,g]);y.useEffect(()=>{z(Q=>Math.min(Q,Math.max(ve.length-1,0)))},[ve.length]);function Je(Q,P){P==="pending"&&x(S=>{const O=new Set(S);return O.has(Q)?O.delete(Q):O.add(Q),O})}function ne(Q){if(ve.length!==0)if(Q.key==="ArrowDown"){Q.preventDefault();const P=Math.min(w+1,ve.length-1);z(P),ce.current.get(ve[P].id)?.focus()}else if(Q.key==="ArrowUp"){Q.preventDefault();const P=Math.max(w-1,0);z(P),ce.current.get(ve[P].id)?.focus()}else if(Q.key==="Enter"){const P=ve[w];P&&ge(`/inbox/${encodeURIComponent(P.id)}`)}else if(Q.key===" "){const P=ve[w];P&&(Q.preventDefault(),Je(P.id,P.status))}else Q.key==="/"&&(Q.preventDefault(),V.current?.focus())}function le(Q){b.size!==0&&(K(null),D(Q),Za()?Y(!0):C(!0))}function M(){C(!1),Za()?Y(!0):D(null)}async function X(){if(!L)return;q(!0),K(null);const Q=Array.from(b),P=[];for(const S of Q)try{L==="approve"?await cg(S):await og(S)}catch(O){if(O instanceof Nd){q(!1),Y(!1),D(null),o();return}P.push(S)}q(!1),P.length>0?(K(`${P.length} of ${Q.length} failed (already decided, or a transient error). Selection kept for retry.`),x(new Set(P))):(Y(!1),D(null),x(new Set))}const Z=b.size;return a.jsxs("div",{className:Me.list,children:[a.jsxs("div",{className:Me.filters,children:[a.jsxs("label",{className:Me.filterField,children:[a.jsx("span",{className:Me.filterLabel,children:"Status"}),a.jsx("select",{value:u,onChange:Q=>r(Q.target.value),children:EA.map(Q=>a.jsx("option",{value:Q.value,children:Q.label},Q.value))})]}),a.jsxs("label",{className:Me.filterField,children:[a.jsx("span",{className:Me.filterLabel,children:"Since"}),a.jsx("input",{type:"date",value:d,onChange:Q=>h(Q.target.value)})]}),a.jsxs("label",{className:Me.filterField,children:[a.jsx("span",{className:Me.filterLabel,children:"Repo"}),a.jsx("input",{type:"text",placeholder:"filter by repo",value:g,onChange:Q=>p(Q.target.value)})]}),a.jsxs("label",{className:Me.filterField,children:[a.jsx("span",{className:Me.filterLabel,children:"Search"}),a.jsx("input",{ref:V,type:"search",placeholder:"title or summary — press / to focus",value:m,onChange:Q=>v(Q.target.value)})]})]}),a.jsxs("div",{className:Me.summary,"aria-live":"polite",children:[se.status==="refreshing"?a.jsx(Tt,{}):null,se.data?a.jsxs("span",{children:[ve.length," shown of ",se.data.total," total",se.data.truncated?" · narrow filters to see more":""]}):null]}),Z>0?a.jsxs("div",{className:Me.batchBar,children:[a.jsxs("span",{children:[Z," selected"]}),a.jsx("button",{type:"button",onClick:()=>x(new Set),children:"Clear"}),a.jsxs("button",{type:"button",className:Me.batchReject,onClick:()=>le("reject"),children:["Reject ",Z]}),a.jsxs("button",{type:"button",className:Me.batchApprove,onClick:()=>le("approve"),children:["Approve ",Z]})]}):null,se.status==="loading"?a.jsxs("div",{className:Me.skeletons,children:[a.jsx(ct,{}),a.jsx(ct,{}),a.jsx(ct,{}),a.jsx(ct,{})]}):se.status==="error"?a.jsx("div",{className:Me.error,role:"alert",children:se.error?.message??"Failed to load proposals."}):ve.length===0?a.jsxs("p",{className:Me.empty,children:["No ",u==="all"?"":u+" ","proposals match",m||g?" this filter":"","."]}):a.jsxs("table",{className:Me.table,role:"grid","aria-label":"Proposals",onKeyDown:ne,children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{scope:"col",className:Me.checkboxCol}),a.jsx("th",{scope:"col",children:"Title"}),a.jsx("th",{scope:"col",className:Me.repoCol,children:"Repo"}),a.jsx("th",{scope:"col",className:Me.kindCol,children:"Kind"}),a.jsx("th",{scope:"col",className:Me.ageCol,children:"Age"}),a.jsx("th",{scope:"col",className:Me.statusCol,children:"Status"}),a.jsx("th",{scope:"col",className:Me.whyCol,children:"Why"})]})}),a.jsx("tbody",{children:ve.map((Q,P)=>a.jsxs("tr",{ref:S=>{S?ce.current.set(Q.id,S):ce.current.delete(Q.id)},"data-focus-key":`proposal-${Q.id}`,tabIndex:P===w?0:-1,className:`${Me.row} ${Q.id===s?Me.rowActive:""}`,onFocus:()=>z(P),"aria-selected":Q.id===s,children:[a.jsx("td",{className:Me.checkboxCol,children:a.jsx("input",{type:"checkbox",checked:b.has(Q.id),disabled:Q.status!=="pending",title:Q.status!=="pending"?"Only pending proposals can be approved/rejected":void 0,onChange:()=>Je(Q.id,Q.status),onClick:S=>S.stopPropagation()})}),a.jsx("td",{children:a.jsx(ri,{to:`/inbox/${encodeURIComponent(Q.id)}`,className:Me.titleLink,title:Q.title,children:Q.title})}),a.jsx("td",{className:Me.repoCell,title:Q.repo??void 0,children:Q.repo?Q.repo.split("/").pop():"—"}),a.jsx("td",{children:Q.kind}),a.jsx("td",{className:Me.age,children:kA(Q.createdAt)}),a.jsx("td",{children:a.jsx(We,{status:Q.status})}),a.jsx("td",{className:Me.why,title:Q.decisionReason??void 0,children:Q.decisionReason??"—"})]},Q.id))})]}),a.jsx(ao,{open:T,onClose:M,reason:`${L==="approve"?"Approving":"Rejecting"} ${Z} proposals requires the dispatch token.`}),a.jsx(fg,{open:G,onClose:()=>{Y(!1),D(null),K(null)},title:L==="approve"?`Approve ${Z} proposals?`:`Reject ${Z} proposals?`,body:L==="approve"?a.jsxs(a.Fragment,{children:["This applies all ",Z," selected proposals to their repos now, one at a time. This cannot be undone from this dialog."]}):a.jsxs(a.Fragment,{children:["This rejects all ",Z," selected proposals. They stay visible in history as rejected."]}),confirmLabel:L==="approve"?`Approve ${Z}`:`Reject ${Z}`,destructive:L==="reject",busy:F,error:I,onConfirm:()=>void X()})]})}const id=/^diff --git a\/(.+) b\/(.+)$/,hg=/^--- (?:a\/(.+)|(\/dev\/null))\s*$/,RA=/^\+\+\+ (?:b\/(.+)|(\/dev\/null))\s*$/,h_=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(.*)$/;function m_(s){return s.replace(/^[ab]\//,"")}function CA(s){const o=s.split(`
|
|
64
|
+
`),u=o.some(h=>id.test(h)),r=[];for(let h=0;h<o.length;h++){const m=o[h];(u?id.test(m):hg.test(m))&&r.push(h)}if(r.length===0)return[];const d=[];for(let h=0;h<r.length;h++){const m=r[h],v=h+1<r.length?r[h+1]:o.length;d.push(o.slice(m,v).join(`
|
|
65
|
+
`))}return d}function DA(s,o){const u=s.split(`
|
|
66
|
+
`);u.length>0&&u[u.length-1]===""&&u.pop();let r=null,d=null,h=-1;for(let z=0;z<u.length;z++){const L=u[z],D=hg.exec(L);if(D){r=D[2]?null:m_(D[1]);continue}const T=RA.exec(L);if(T){d=T[2]?null:m_(T[1]),h=z+1;break}const C=id.exec(L);C&&r===null&&d===null&&(r=C[1]??null,d=C[2]??null)}let m="modified";r===null&&d!==null?m="added":r!==null&&d===null?m="deleted":r!==null&&d!==null&&r!==d&&(m="renamed");const v=d??r??`(unknown file ${o+1})`,g=[];let p=0,b=0,x=null;if(h===-1){const z=u.join(`
|
|
67
|
+
`).trim();return{id:`${o}:${v}`,oldPath:r,newPath:d,displayPath:v,status:m,hunks:[],additions:0,deletions:0,unparsedNotice:z||null}}let w=h;for(;w<u.length;){const z=h_.exec(u[w]);if(!z){u[w].trim()&&(x=((x?x+`
|
|
68
|
+
`:"")+u[w]).trim()),w++;continue}const L=Number(z[1]),D=z[2]!==void 0?Number(z[2]):1,T=Number(z[3]),C=z[4]!==void 0?Number(z[4]):1,G={header:u[w],oldStart:L,oldLines:D,newStart:T,newLines:C,lines:[]};w++;let Y=L,F=T;for(;w<u.length&&!h_.test(u[w]);){const q=u[w];if(q.startsWith("\\")){w++;continue}const I=q[0],K=q.slice(1);I==="+"?(G.lines.push({kind:"add",text:K,oldLineNo:null,newLineNo:F}),F++,p++):I==="-"?(G.lines.push({kind:"del",text:K,oldLineNo:Y,newLineNo:null}),Y++,b++):(G.lines.push({kind:"context",text:I===" "?K:q,oldLineNo:Y,newLineNo:F}),Y++,F++),w++}g.push(G)}return{id:`${o}:${v}`,oldPath:r,newPath:d,displayPath:v,status:m,hunks:g,additions:p,deletions:b,unparsedNotice:x}}function MA(s){const o=s??"";if(!o.trim())return{files:[],malformed:!1};const u=CA(o);return u.length===0?{malformed:!0,files:[{id:"raw",oldPath:null,newPath:null,displayPath:"(unparsed diff)",status:"modified",hunks:[],additions:0,deletions:0,unparsedNotice:o}]}:{files:u.map((r,d)=>DA(r,d)),malformed:!1}}function $A(s){const o=[];let u=0;for(;u<s.length;){const r=s[u];if(r.kind==="context"){o.push({left:r,right:r}),u++;continue}const d=[];for(;u<s.length&&s[u].kind==="del";)d.push(s[u]),u++;const h=[];for(;u<s.length&&s[u].kind==="add";)h.push(s[u]),u++;const m=Math.max(d.length,h.length);for(let v=0;v<m;v++)o.push({left:d[v]??null,right:h[v]??null})}return o}const LA={ts:"c-like",tsx:"c-like",js:"c-like",jsx:"c-like",mjs:"c-like",cjs:"c-like",mts:"c-like",cts:"c-like",java:"c-like",go:"c-like",rs:"c-like",c:"c-like",h:"c-like",cpp:"c-like",hpp:"c-like",cc:"c-like",swift:"c-like",kt:"c-like",kts:"c-like",py:"python",pyi:"python",sh:"shell",bash:"shell",zsh:"shell",css:"css",scss:"css",less:"css",json:"json",jsonc:"json",yml:"yaml",yaml:"yaml"};function OA(s){if(!s)return"plain";const o=s.split(".").pop()?.toLowerCase()??"";return LA[o]??"plain"}const zA={"c-like":new Set(["const","let","var","function","return","if","else","for","while","do","switch","case","break","continue","class","extends","implements","interface","type","enum","export","import","from","default","new","this","super","try","catch","finally","throw","async","await","yield","static","public","private","protected","readonly","abstract","null","undefined","true","false","void","typeof","instanceof","in","of","as","is","never","unknown","any","package","struct","fn","impl","mod","pub","use","trait","match","func","defer","chan"]),python:new Set(["def","class","return","if","elif","else","for","while","break","continue","import","from","as","with","try","except","finally","raise","pass","lambda","yield","async","await","None","True","False","and","or","not","in","is","global","nonlocal","self"]),shell:new Set(["if","then","else","elif","fi","for","while","do","done","case","esac","function","return","export","local","echo","set","in","break","continue"]),css:new Set,json:new Set,yaml:new Set,plain:new Set},UA={"c-like":/(?<comment>\/\/.*$|\/\*.*?\*\/)|(?<string>"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|`(?:[^`\\]|\\.)*`)|(?<number>\b\d+(?:\.\d+)?\b)|(?<word>[A-Za-z_$][A-Za-z0-9_$]*)/g,python:/(?<comment>#.*$)|(?<string>"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')|(?<number>\b\d+(?:\.\d+)?\b)|(?<word>[A-Za-z_][A-Za-z0-9_]*)/g,shell:/(?<comment>#.*$)|(?<string>"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')|(?<word>[A-Za-z_][A-Za-z0-9_]*)/g,css:/(?<comment>\/\*.*?\*\/)|(?<string>"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')|(?<number>\b\d+(?:\.\d+)?\b)|(?<word>[A-Za-z_-][A-Za-z0-9_-]*)/g,json:/(?<string>"(?:[^"\\]|\\.)*")|(?<number>-?\b\d+(?:\.\d+)?\b)|(?<word>\btrue\b|\bfalse\b|\bnull\b)/g,yaml:/(?<comment>#.*$)|(?<string>"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g};function BA(s,o){const u=UA[o];if(!u)return[{kind:"plain",text:s}];const r=zA[o],d=[];let h=0;u.lastIndex=0;let m;for(;m=u.exec(s);){m.index>h&&d.push({kind:"plain",text:s.slice(h,m.index)});const v=m.groups??{};if(v.comment!==void 0)d.push({kind:"comment",text:m[0]});else if(v.string!==void 0)d.push({kind:"string",text:m[0]});else if(v.number!==void 0)d.push({kind:"number",text:m[0]});else if(v.word!==void 0){const g=o==="json"||r.has(v.word);d.push({kind:g?"keyword":"plain",text:m[0]})}else d.push({kind:"plain",text:m[0]});h=m.index+m[0].length,m[0].length===0&&u.lastIndex++}return h<s.length&&d.push({kind:"plain",text:s.slice(h)}),d}const HA="_viewer_gf84p_1",qA="_malformedNotice_gf84p_9",GA="_empty_gf84p_18",QA="_tree_gf84p_27",YA="_treeItem_gf84p_40",VA="_treeItemActive_gf84p_59",XA="_statusDot_gf84p_64",KA="_status_added_gf84p_70",ZA="_status_deleted_gf84p_71",JA="_status_modified_gf84p_72",FA="_status_renamed_gf84p_73",WA="_treePath_gf84p_75",IA="_treeStats_gf84p_83",PA="_add_gf84p_89",e6="_del_gf84p_90",t6="_body_gf84p_92",l6="_fileHeader_gf84p_99",n6="_filePath_gf84p_109",a6="_modeToggle_gf84p_118",s6="_modeActive_gf84p_132",i6="_notice_gf84p_138",c6="_emptyFile_gf84p_149",o6="_hunkTable_gf84p_155",r6="_hunkCaption_gf84p_163",u6="_lineNo_gf84p_173",d6="_lineMarker_gf84p_184",f6="_lineText_gf84p_192",h6="_hunkTableSplit_gf84p_199",m6="_rowBlank_gf84p_203",p6="_row_add_gf84p_207",_6="_row_del_gf84p_210",g6="_row_context_gf84p_213",v6="_code_gf84p_217",y6="_tok_plain_gf84p_221",x6="_tok_comment_gf84p_222",b6="_tok_string_gf84p_223",j6="_tok_number_gf84p_224",S6="_tok_keyword_gf84p_225",pe={viewer:HA,malformedNotice:qA,empty:GA,tree:QA,treeItem:YA,treeItemActive:VA,statusDot:XA,status_added:KA,status_deleted:ZA,status_modified:JA,status_renamed:FA,treePath:WA,treeStats:IA,add:PA,del:e6,body:t6,fileHeader:l6,filePath:n6,modeToggle:a6,modeActive:s6,notice:i6,emptyFile:c6,hunkTable:o6,hunkCaption:r6,lineNo:u6,lineMarker:d6,lineText:f6,hunkTableSplit:h6,rowBlank:m6,row_add:p6,row_del:_6,row_context:g6,code:v6,tok_plain:y6,tok_comment:x6,tok_string:b6,tok_number:j6,tok_keyword:S6};function N6({diff:s,proposalKind:o}){const u=y.useMemo(()=>MA(s),[s]),[r,d]=y.useState(u.files[0]?.id??null),[h,m]=y.useState("unified");if(y.useEffect(()=>{d(u.files[0]?.id??null)},[s]),u.files.length===0)return a.jsxs("div",{className:pe.empty,children:["No diff attached to this proposal (kind: ",o,")."]});const v=u.files.find(p=>p.id===r)??u.files[0];function g(p){const b=u.files.findIndex(x=>x.id===v.id);p.key==="ArrowDown"?(p.preventDefault(),d(u.files[Math.min(b+1,u.files.length-1)].id)):p.key==="ArrowUp"&&(p.preventDefault(),d(u.files[Math.max(b-1,0)].id))}return a.jsxs("div",{className:pe.viewer,children:[u.malformed?a.jsx("p",{className:pe.malformedNotice,children:"Could not parse this as a unified diff — showing raw content."}):null,a.jsx("div",{className:pe.tree,role:"tree","aria-label":"Changed files",onKeyDown:g,children:u.files.map(p=>a.jsxs("button",{type:"button",role:"treeitem","aria-selected":p.id===v.id,tabIndex:p.id===v.id?0:-1,className:`${pe.treeItem} ${p.id===v.id?pe.treeItemActive:""}`,onClick:()=>d(p.id),children:[a.jsx("span",{className:`${pe.statusDot} ${pe[`status_${p.status}`]}`,"aria-hidden":"true"}),a.jsx("span",{className:pe.treePath,title:p.displayPath,children:p.displayPath}),a.jsxs("span",{className:pe.treeStats,children:[p.additions>0?a.jsxs("span",{className:pe.add,children:["+",p.additions]}):null,p.deletions>0?a.jsxs("span",{className:pe.del,children:["-",p.deletions]}):null]})]},p.id))}),a.jsxs("div",{className:pe.body,children:[a.jsxs("div",{className:pe.fileHeader,children:[a.jsx("span",{className:pe.filePath,children:v.displayPath}),a.jsxs("div",{className:pe.modeToggle,role:"group","aria-label":"Diff view mode",children:[a.jsx("button",{type:"button","aria-pressed":h==="unified",className:h==="unified"?pe.modeActive:"",onClick:()=>m("unified"),children:"Unified"}),a.jsx("button",{type:"button","aria-pressed":h==="split",className:h==="split"?pe.modeActive:"",onClick:()=>m("split"),children:"Split"})]})]}),v.unparsedNotice?a.jsx("pre",{className:pe.notice,children:v.unparsedNotice}):null,v.hunks.length===0&&!v.unparsedNotice?a.jsx("p",{className:pe.emptyFile,children:"No line-level changes captured for this file."}):v.hunks.map((p,b)=>a.jsx(w6,{hunk:p,mode:h,path:v.displayPath},b))]})]})}function w6({hunk:s,mode:o,path:u}){const r=OA(u);if(o==="split"){const d=$A(s.lines);return a.jsxs("table",{className:`${pe.hunkTable} ${pe.hunkTableSplit}`,children:[a.jsx("caption",{className:pe.hunkCaption,children:s.header}),a.jsx("tbody",{children:d.map((h,m)=>a.jsxs("tr",{children:[a.jsx("td",{className:pe.lineNo,children:h.left?.oldLineNo??""}),a.jsx("td",{className:`${pe.lineText} ${h.left?pe[`row_${h.left.kind}`]:pe.rowBlank}`,children:h.left?a.jsx(Ju,{text:h.left.text,lang:r}):null}),a.jsx("td",{className:pe.lineNo,children:h.right?.newLineNo??""}),a.jsx("td",{className:`${pe.lineText} ${h.right?pe[`row_${h.right.kind}`]:pe.rowBlank}`,children:h.right?a.jsx(Ju,{text:h.right.text,lang:r}):null})]},m))})]})}return a.jsxs("table",{className:pe.hunkTable,children:[a.jsx("caption",{className:pe.hunkCaption,children:s.header}),a.jsx("tbody",{children:s.lines.map((d,h)=>a.jsxs("tr",{className:pe[`row_${d.kind}`],children:[a.jsx("td",{className:pe.lineNo,children:d.oldLineNo??""}),a.jsx("td",{className:pe.lineNo,children:d.newLineNo??""}),a.jsx("td",{className:pe.lineMarker,"aria-hidden":"true",children:d.kind==="add"?"+":d.kind==="del"?"-":""}),a.jsx("td",{className:pe.lineText,children:a.jsx(Ju,{text:d.text,lang:r})})]},h))})]})}function Ju({text:s,lang:o}){const u=BA(s,o);return a.jsx("code",{className:pe.code,children:u.map((r,d)=>a.jsx("span",{className:pe[`tok_${r.kind}`],children:r.text},d))})}const T6="_panel_822rr_1",E6="_error_822rr_8",k6="_header_822rr_16",A6="_titleRow_822rr_22",R6="_title_822rr_22",C6="_metaRow_822rr_35",D6="_metaItem_822rr_44",M6="_riskBadge_822rr_48",$6="_risk_low_822rr_54",L6="_risk_medium_822rr_55",O6="_risk_high_822rr_56",z6="_summary_822rr_58",U6="_evidence_822rr_64",B6="_evidenceRow_822rr_74",H6="_evidenceLabel_822rr_81",q6="_muted_822rr_89",G6="_rationaleNote_822rr_94",Q6="_failedChecks_822rr_101",Y6="_diffSection_822rr_107",V6="_actions_822rr_111",X6="_actionError_822rr_120",K6="_rejectButton_822rr_126",Z6="_approveButton_822rr_137",J6="_decided_822rr_148",we={panel:T6,error:E6,header:k6,titleRow:A6,title:R6,metaRow:C6,metaItem:D6,riskBadge:M6,risk_low:$6,risk_medium:L6,risk_high:O6,summary:z6,evidence:U6,evidenceRow:B6,evidenceLabel:H6,muted:q6,rationaleNote:G6,failedChecks:Q6,diffSection:Y6,actions:V6,actionError:X6,rejectButton:K6,approveButton:Z6,decided:J6},F6={"judge-ship-would-merge":{label:"Ship (would merge)",tone:"success"},"judge-ship-review-required":{label:"Ship (review required)",tone:"success"},"judge-review":{label:"Review",tone:"warning"},"judge-noise":{label:"Noise",tone:"neutral"},"judge-harmful":{label:"Harmful",tone:"danger"},"judge-verdict-unrecognized":{label:"Unrecognized verdict",tone:"unknown"},"judge-parse-failure":{label:"Judge parse failure — not a review",tone:"unknown"},"judge-network-failure":{label:"Judge network failure — not a review",tone:"unknown"}};function W6(s){const o=s.filter(u=>u.action==="judged"&&u.judgeReasonCode);return o.length===0?null:o.reduce((u,r)=>Date.parse(r.ts)>Date.parse(u.ts)?r:u)}function p_(s){if(!s)return"—";const o=Date.parse(s);if(Number.isNaN(o))return"—";const u=Math.max(0,Math.round((Date.now()-o)/1e3));if(u<60)return`${u}s ago`;const r=Math.round(u/60);if(r<60)return`${r}m ago`;const d=Math.round(r/60);return d<24?`${d}h ago`:`${Math.round(d/24)}d ago`}function I6({id:s,onDispatchDisabled:o}){const u=Ce(ng(s)),[r,d]=y.useState(null),[h,m]=y.useState(!1),[v,g]=y.useState(!1),[p,b]=y.useState(!1),[x,w]=y.useState(null);function z(q){w(null),d(q),Za()?g(!0):m(!0)}function L(){m(!1),Za()?g(!0):d(null)}async function D(){if(r){b(!0),w(null);try{r==="approve"?await cg(s):await og(s),g(!1),d(null)}catch(q){q instanceof Nd?(g(!1),d(null),o()):w(q instanceof Error?q.message:"Action failed. Try again.")}finally{b(!1)}}}if(u.status==="loading")return a.jsxs("div",{className:we.panel,children:[a.jsx(tt,{width:"60%"}),a.jsx(tt,{width:"30%"}),a.jsx(tt,{width:"90%"})]});if(u.status==="error"||!u.data)return a.jsx("div",{className:we.error,role:"alert",children:u.error?.message??"Failed to load this proposal."});const T=u.data,C=T.decisionEvidence,G=W6(C.decisions),Y=G?.judgeReasonCode?F6[G.judgeReasonCode]:null,F=T.status==="pending";return a.jsxs("div",{className:we.panel,children:[a.jsxs("header",{className:we.header,children:[a.jsxs("div",{className:we.titleRow,children:[a.jsx("h2",{className:we.title,children:T.title}),u.status==="refreshing"?a.jsx(Tt,{}):null]}),a.jsxs("div",{className:we.metaRow,children:[a.jsx(We,{status:T.status}),a.jsx("span",{className:we.metaItem,children:T.kind}),a.jsx("span",{className:we.metaItem,title:T.repo??void 0,children:T.repo??"no repo"}),a.jsxs("span",{className:we.metaItem,children:["created ",p_(T.createdAt)]}),T.decidedAt?a.jsxs("span",{className:we.metaItem,children:["decided ",p_(T.decidedAt)]}):null,T.riskClass?a.jsxs("span",{className:`${we.riskBadge} ${we[`risk_${T.riskClass}`]}`,children:[T.riskClass," risk"]}):null]}),T.summary?a.jsx("p",{className:we.summary,children:T.summary}):null]}),a.jsxs("section",{className:we.evidence,"aria-label":"Evidence",children:[a.jsxs("div",{className:we.evidenceRow,children:[a.jsx("span",{className:we.evidenceLabel,children:"Judge verdict"}),a.jsx(Re,{quality:C.sourceQuality,label:"judge verdict",children:Y?a.jsx(We,{status:G.judgeReasonCode,tone:Y.tone,children:Y.label}):a.jsx("span",{className:we.muted,children:"not yet judged"})})]}),G?.judgeRationaleState?a.jsxs("p",{className:we.rationaleNote,children:["Model rationale:"," ",G.judgeRationaleState==="not-persisted"?"not persisted":"legacy (redacted)"]}):null,T.decisionReason?a.jsxs("div",{className:we.evidenceRow,children:[a.jsx("span",{className:we.evidenceLabel,children:"Decision reason"}),a.jsx("span",{children:T.decisionReason})]}):null,T.verifyResult?a.jsxs("div",{className:we.evidenceRow,children:[a.jsx("span",{className:we.evidenceLabel,children:"Verification"}),a.jsxs("div",{children:[a.jsx(We,{status:T.verifyResult.passed?"success":"failed",children:T.verifyResult.passed?"passed":"failed"}),T.verifyResult.ran&&T.verifyResult.ran.length>0?a.jsxs("span",{className:we.muted,children:[" · ran ",T.verifyResult.ran.map(q=>q.kind).join(", ")]}):null,T.verifyResult.failed&&T.verifyResult.failed.length>0?a.jsxs("p",{className:we.failedChecks,children:["Failed: ",T.verifyResult.failed.join(", ")]}):null]})]}):null,T.evidenceOutcome?a.jsxs("div",{className:we.evidenceRow,children:[a.jsx("span",{className:we.evidenceLabel,children:"Gates"}),a.jsxs("span",{className:we.muted,children:[T.evidenceOutcome.gateCount??0," gate",T.evidenceOutcome.gateCount===1?"":"s",T.evidenceOutcome.policyAction?` · policy: ${T.evidenceOutcome.policyAction}`:"",T.evidenceOutcome.trustBasis?` · trust: ${T.evidenceOutcome.trustBasis}`:""]})]}):null,T.result?a.jsxs("div",{className:we.evidenceRow,children:[a.jsx("span",{className:we.evidenceLabel,children:"Result"}),a.jsx("span",{children:T.result})]}):null]}),a.jsx("section",{className:we.diffSection,"aria-label":"Diff",children:a.jsx(N6,{diff:T.diff,proposalKind:T.kind})}),F?a.jsxs("footer",{className:we.actions,children:[x&&!v?a.jsx("p",{className:we.actionError,role:"alert",children:x}):null,a.jsx("button",{type:"button",className:we.rejectButton,onClick:()=>z("reject"),children:"Reject"}),a.jsx("button",{type:"button",className:we.approveButton,onClick:()=>z("approve"),children:"Approve"})]}):a.jsxs("footer",{className:we.decided,children:["This proposal is already ",a.jsx("strong",{children:T.status})," — no further action available."]}),a.jsx(ao,{open:h,onClose:L,reason:r==="approve"?"Approving a proposal mutates the fleet and requires the dispatch token.":"Rejecting a proposal requires the dispatch token."}),a.jsx(fg,{open:v,onClose:()=>{g(!1),d(null),w(null)},title:r==="approve"?"Approve this proposal?":"Reject this proposal?",body:r==="approve"?a.jsxs(a.Fragment,{children:["This applies ",a.jsx("strong",{children:T.title})," to ",a.jsx("code",{children:T.repo})," now — it writes the diff to disk and cannot be undone from this dialog. Review the diff above before confirming."]}):a.jsxs(a.Fragment,{children:["This rejects ",a.jsx("strong",{children:T.title})," and discards it. It stays visible in history (status: rejected) but will never be applied."]}),confirmLabel:r==="approve"?"Approve and apply":"Reject",destructive:r==="reject",busy:p,error:x,onConfirm:()=>void D()})]})}const P6="_view_19z5m_1",eR="_header_19z5m_8",tR="_title_19z5m_14",lR="_subtitle_19z5m_20",nR="_dispatchBanner_19z5m_25",aR="_layout_19z5m_39",sR="_listPane_19z5m_57",iR="_detailPane_19z5m_61",cR="_emptyDetail_19z5m_69",oR="_hint_19z5m_81",wl={view:P6,header:eR,title:tR,subtitle:lR,dispatchBanner:nR,layout:aR,listPane:sR,detailPane:iR,emptyDetail:cR,hint:oR};function __(){const{id:s}=dd(),[o,u]=y.useState(!1);return a.jsxs("div",{className:wl.view,children:[a.jsxs("header",{className:wl.header,children:[a.jsx("h1",{className:wl.title,children:"Inbox"}),a.jsx("p",{className:wl.subtitle,children:"Review proposals, inspect diffs and judge evidence, approve or reject."})]}),o?a.jsxs("div",{className:wl.dispatchBanner,role:"alert",children:["This server was started without ",a.jsx("code",{children:"--allow-dispatch"}),", so approve/reject are read-only right now. Restart ",a.jsx("code",{children:"ashlr serve --allow-dispatch"})," to enable them. Browsing and diff review still work."]}):null,a.jsxs("div",{className:wl.layout,children:[a.jsx("div",{className:wl.listPane,children:a.jsx(AA,{selectedId:s??null,onDispatchDisabled:()=>u(!0)})}),a.jsx("div",{className:wl.detailPane,children:s?a.jsx(I6,{id:s,onDispatchDisabled:()=>u(!0)}):a.jsxs("div",{className:wl.emptyDetail,children:[a.jsx("p",{children:"Select a proposal to review its diff and evidence."}),a.jsx("p",{className:wl.hint,children:"↑/↓ to move · Enter to open · Space to select · / to search"})]})})]})]})}function rR(){return a.jsx(Zx,{children:a.jsxs(it,{element:a.jsx(j0,{}),children:[a.jsx(it,{index:!0,element:a.jsx(Yp,{to:"/overview",replace:!0})}),q_.map(s=>s.implemented?null:a.jsx(it,{path:s.path,element:a.jsx(E0,{title:s.label,description:s.description})},s.path)),a.jsx(it,{path:"/overview",element:a.jsx(NS,{})}),a.jsx(it,{path:"/journal",element:a.jsx(WN,{})}),a.jsx(it,{path:"/intelligence/pulse",element:a.jsx(jw,{})}),a.jsx(it,{path:"/intelligence/genome",element:a.jsx(Zw,{})}),a.jsx(it,{path:"/intelligence/production",element:a.jsx(p3,{})}),a.jsx(it,{path:"/portfolio",element:a.jsx(L3,{})}),a.jsx(it,{path:"/work/runs",element:a.jsx(dT,{})}),a.jsx(it,{path:"/work/runs/:id",element:a.jsx(HT,{})}),a.jsx(it,{path:"/work/swarms",element:a.jsx(hE,{})}),a.jsx(it,{path:"/work/swarms/:id",element:a.jsx(o4,{})}),a.jsx(it,{path:"/control/daemon",element:a.jsx(R4,{})}),a.jsx(it,{path:"/control/fleet",element:a.jsx(P4,{})}),a.jsx(it,{path:"/control/security",element:a.jsx(Nk,{})}),a.jsx(it,{path:"/goals",element:a.jsx(Fk,{})}),a.jsx(it,{path:"/inbox",element:a.jsx(__,{})}),a.jsx(it,{path:"/inbox/:id",element:a.jsx(__,{})}),a.jsx(it,{path:"*",element:a.jsx(Yp,{to:"/overview",replace:!0})})]})})}const uR="_skipLink_1uply_1",dR={skipLink:uR};function fR(){return a.jsx("button",{type:"button",className:dR.skipLink,onClick:()=>{const s=document.getElementById("main-content");s?.focus(),s?.scrollIntoView({block:"start"})},children:"Skip to content"})}const hR="_wrap_dga6p_1",mR="_card_dga6p_10",pR="_badge_dga6p_19",_R="_heading_dga6p_24",gR="_body_dga6p_31",vR="_code_dga6p_38",yR="_example_dga6p_49",xR="_form_dga6p_56",bR="_label_dga6p_63",jR="_input_dga6p_68",SR="_error_dga6p_82",NR="_submit_dga6p_87",Kt={wrap:hR,card:mR,badge:pR,heading:_R,body:gR,code:vR,example:yR,form:xR,label:bR,input:jR,error:SR,submit:NR};function wR({onAuthenticated:s}){const[o,u]=y.useState(""),[r,d]=y.useState(null),[h,m]=y.useState(!1),v=y.useRef(null),g=y.useId(),p=y.useId();async function b(x){x.preventDefault(),d(null),m(!0);try{await Y1(o),u(""),s?.()}catch(w){d(w instanceof Error?w.message:"Could not establish a session."),v.current?.select()}finally{m(!1)}}return a.jsx("div",{className:Kt.wrap,children:a.jsxs("div",{className:Kt.card,children:[a.jsx("div",{className:Kt.badge,"aria-hidden":"true",children:"⛺"}),a.jsx("h1",{className:Kt.heading,children:"Connect to ashlr serve"}),a.jsxs("p",{className:Kt.body,children:["This dashboard only ever talks to the ashlr server running on this machine (",a.jsx("code",{children:"127.0.0.1"}),", never a remote host). To read data, paste the"," ",a.jsx("strong",{children:"read token"})," printed in the terminal where you ran:"]}),a.jsx("pre",{className:Kt.code,children:"ashlr serve"}),a.jsxs("p",{className:Kt.body,children:["It looks like a 64-character hex string, printed once at startup — something like"," ",a.jsx("code",{className:Kt.example,children:"a1b2c3…"}),". This dialog never stores it: it is exchanged once for a short-lived session cookie, then discarded."]}),a.jsxs("form",{onSubmit:b,className:Kt.form,noValidate:!0,children:[a.jsx("label",{htmlFor:g,className:Kt.label,children:"Read token"}),a.jsx("input",{ref:v,id:g,name:"read-token",type:"password",autoComplete:"off",autoCorrect:"off",spellCheck:!1,inputMode:"text",className:Kt.input,value:o,onChange:x=>u(x.target.value),"aria-invalid":r?!0:void 0,"aria-describedby":r?p:void 0,placeholder:"64 hex characters",autoFocus:!0}),r?a.jsx("p",{id:p,className:Kt.error,role:"alert",children:r}):null,a.jsx("button",{type:"submit",className:Kt.submit,disabled:h||o.trim().length===0,children:h?"Connecting…":"Connect"})]})]})})}function TR(s){y.useEffect(()=>{if(s!=="checking")return;let o=!1;return to(Zn.key,Zn.fetch).then(()=>{if(o)return;const u=Iu(Zn.key);V1(u.status==="success")}),()=>{o=!0}},[s])}function ER(){const s=I1();return TR(s),a.jsx(e0,{children:s==="checking"?a.jsx("div",{"aria-live":"polite",className:"visually-hidden",children:"Checking for an existing session…"}):s==="unauthenticated"?a.jsx(wR,{}):a.jsxs(v1,{children:[a.jsx(fR,{}),a.jsx(rR,{})]})})}const mg=document.getElementById("root");if(!mg)throw new Error("#root element missing from index.html");Xy.createRoot(mg).render(a.jsx(y.StrictMode,{children:a.jsx(ER,{})}));
|
|
69
|
+
//# sourceMappingURL=index-zVKD9krw.js.map
|