@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.
Files changed (123) hide show
  1. package/CHANGELOG.md +46 -2
  2. package/README.md +51 -38
  3. package/dist/build-identity.json +2 -2
  4. package/dist/cli/completions.js +1 -2
  5. package/dist/cli/completions.js.map +1 -1
  6. package/dist/cli/dashboard.js +5 -4
  7. package/dist/cli/dashboard.js.map +1 -1
  8. package/dist/cli/help.js +7 -10
  9. package/dist/cli/help.js.map +1 -1
  10. package/dist/cli/index.d.ts +0 -1
  11. package/dist/cli/index.js +0 -10
  12. package/dist/cli/index.js.map +1 -1
  13. package/dist/cli/serve.js +7 -3
  14. package/dist/cli/serve.js.map +1 -1
  15. package/dist/cli/setup.d.ts +5 -3
  16. package/dist/cli/setup.js +14 -7
  17. package/dist/cli/setup.js.map +1 -1
  18. package/dist/cli/update.js +3 -1
  19. package/dist/cli/update.js.map +1 -1
  20. package/dist/core/daemon/activation-permit.d.ts +33 -268
  21. package/dist/core/daemon/activation-permit.js +106 -1111
  22. package/dist/core/daemon/activation-permit.js.map +1 -1
  23. package/dist/core/daemon/loop.d.ts +1 -13
  24. package/dist/core/daemon/loop.js +10 -113
  25. package/dist/core/daemon/loop.js.map +1 -1
  26. package/dist/core/daemon/service-install-authority.d.ts +5 -1
  27. package/dist/core/daemon/service-install-authority.js +7 -20
  28. package/dist/core/daemon/service-install-authority.js.map +1 -1
  29. package/dist/core/fleet/automerge-pass.js +28 -77
  30. package/dist/core/fleet/automerge-pass.js.map +1 -1
  31. package/dist/core/fleet/decisions-ledger.js +1 -1
  32. package/dist/core/fleet/decisions-ledger.js.map +1 -1
  33. package/dist/core/fleet/judge-trace.js +2 -1
  34. package/dist/core/fleet/judge-trace.js.map +1 -1
  35. package/dist/core/fleet/manager.d.ts +6 -0
  36. package/dist/core/fleet/manager.js +35 -17
  37. package/dist/core/fleet/manager.js.map +1 -1
  38. package/dist/core/fleet/post-merge-credit-label.d.ts +10 -0
  39. package/dist/core/fleet/post-merge-credit-label.js +13 -0
  40. package/dist/core/fleet/post-merge-credit-label.js.map +1 -0
  41. package/dist/core/fleet/post-merge-credit.d.ts +20 -38
  42. package/dist/core/fleet/post-merge-credit.js +38 -39
  43. package/dist/core/fleet/post-merge-credit.js.map +1 -1
  44. package/dist/core/fleet/self-improve.d.ts +7 -7
  45. package/dist/core/fleet/self-improve.js +104 -20
  46. package/dist/core/fleet/self-improve.js.map +1 -1
  47. package/dist/core/fleet/status.js +0 -1
  48. package/dist/core/fleet/status.js.map +1 -1
  49. package/dist/core/foundry/automerge-scope-policy.d.ts +2 -2
  50. package/dist/core/foundry/automerge-scope-policy.js +2 -9
  51. package/dist/core/foundry/automerge-scope-policy.js.map +1 -1
  52. package/dist/core/goals/store.js +60 -20
  53. package/dist/core/goals/store.js.map +1 -1
  54. package/dist/core/inbox/apply.js +3 -5
  55. package/dist/core/inbox/apply.js.map +1 -1
  56. package/dist/core/inbox/merge.d.ts +0 -84
  57. package/dist/core/inbox/merge.js +23 -277
  58. package/dist/core/inbox/merge.js.map +1 -1
  59. package/dist/core/learn/reflect.js +10 -0
  60. package/dist/core/learn/reflect.js.map +1 -1
  61. package/dist/core/onboard.d.ts +2 -0
  62. package/dist/core/onboard.js +9 -3
  63. package/dist/core/onboard.js.map +1 -1
  64. package/dist/core/run/orchestrator.js +2 -0
  65. package/dist/core/run/orchestrator.js.map +1 -1
  66. package/dist/core/types.d.ts +5 -4
  67. package/dist/core/types.js.map +1 -1
  68. package/dist/core/web/api.d.ts +6 -0
  69. package/dist/core/web/api.js +69 -11
  70. package/dist/core/web/api.js.map +1 -1
  71. package/dist/core/web/public/app.js +5 -1
  72. package/dist/core/web/public/next/assets/index-CDHQraxS.css +1 -0
  73. package/dist/core/web/public/next/assets/index-zVKD9krw.js +69 -0
  74. package/dist/core/web/public/next/assets/{index-Ct0mf8n4.js.map → index-zVKD9krw.js.map} +1 -1
  75. package/dist/core/web/public/next/index.html +2 -2
  76. package/dist/core/web/read-session-revocations.d.ts +26 -0
  77. package/dist/core/web/read-session-revocations.js +48 -0
  78. package/dist/core/web/read-session-revocations.js.map +1 -0
  79. package/dist/core/web/server.js +73 -27
  80. package/dist/core/web/server.js.map +1 -1
  81. package/dist/core/web/static.d.ts +1 -1
  82. package/dist/core/web/static.js +54 -20
  83. package/dist/core/web/static.js.map +1 -1
  84. package/dist/release-dependency-inventory.json +1 -1
  85. package/docs/RUNTIME_ACTIVATION_AUTHORITY.md +0 -11
  86. package/node_modules/fast-uri/index.js +201 -48
  87. package/node_modules/fast-uri/lib/schemes.js +9 -4
  88. package/node_modules/fast-uri/lib/utils.js +388 -91
  89. package/node_modules/fast-uri/package.json +1 -1
  90. package/node_modules/fast-uri/test/component-safe-serialization.test.js +105 -0
  91. package/node_modules/fast-uri/test/equal.test.js +31 -3
  92. package/node_modules/fast-uri/test/fixtures/uri-js-parse.json +2 -0
  93. package/node_modules/fast-uri/test/ipv6-canonical.test.js +34 -0
  94. package/node_modules/fast-uri/test/ipv6-validation.test.js +90 -0
  95. package/node_modules/fast-uri/test/malformed-percent.test.js +77 -0
  96. package/node_modules/fast-uri/test/malformed-urn.test.js +61 -0
  97. package/node_modules/fast-uri/test/parse.test.js +7 -3
  98. package/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
  99. package/node_modules/fast-uri/test/reserved-path-normalization.test.js +109 -0
  100. package/node_modules/fast-uri/test/scheme-validation.test.js +124 -0
  101. package/node_modules/fast-uri/test/security-normalization.test.js +101 -0
  102. package/node_modules/fast-uri/test/security.test.js +75 -3
  103. package/node_modules/fast-uri/test/urn-full-input.test.js +29 -0
  104. package/node_modules/fast-uri/test/websocket-query-preservation.test.js +24 -0
  105. package/node_modules/qs/.github/THREAT_MODEL.md +3 -3
  106. package/node_modules/qs/CHANGELOG.md +26 -0
  107. package/node_modules/qs/README.md +19 -1
  108. package/node_modules/qs/dist/qs.js +25 -25
  109. package/node_modules/qs/eslint.config.mjs +1 -1
  110. package/node_modules/qs/lib/parse.js +16 -6
  111. package/node_modules/qs/lib/stringify.js +23 -8
  112. package/node_modules/qs/lib/utils.js +57 -11
  113. package/node_modules/qs/package.json +8 -7
  114. package/node_modules/qs/test/parse.js +419 -0
  115. package/node_modules/qs/test/stringify.js +317 -0
  116. package/node_modules/qs/test/utils.js +206 -0
  117. package/package.json +5 -4
  118. package/schema/config.schema.json +7 -7
  119. package/dist/cli/activation.d.ts +0 -41
  120. package/dist/cli/activation.js +0 -485
  121. package/dist/cli/activation.js.map +0 -1
  122. package/dist/core/web/public/next/assets/index-CY0U241s.css +0 -1
  123. package/dist/core/web/public/next/assets/index-Ct0mf8n4.js +0 -69
@@ -1,69 +0,0 @@
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 Su={exports:{}},Vs={};/**
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 Ep;function zv(){if(Ep)return Vs;Ep=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 y in d)y!=="key"&&(h[y]=d[y])}else h=d;return d=h.ref,{$$typeof:s,type:r,key:m,ref:d!==void 0?d:null,props:h}}return Vs.Fragment=o,Vs.jsx=u,Vs.jsxs=u,Vs}var kp;function Uv(){return kp||(kp=1,Su.exports=zv()),Su.exports}var a=Uv(),Nu={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 Ap;function Bv(){if(Ap)return re;Ap=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"),y=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"),T=Symbol.iterator;function O(S){return S===null||typeof S!="object"?null:(S=T&&S[T]||S["@@iterator"],typeof S=="function"?S:null)}var $={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,w={};function U(S,L,J){this.props=S,this.context=L,this.refs=w,this.updater=J||$}U.prototype.isReactComponent={},U.prototype.setState=function(S,L){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,L,"setState")},U.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function V(){}V.prototype=U.prototype;function X(S,L,J){this.props=S,this.context=L,this.refs=w,this.updater=J||$}var I=X.prototype=new V;I.constructor=X,k(I,U.prototype),I.isPureReactComponent=!0;var q=Array.isArray;function W(){}var Z={H:null,A:null,T:null,S:null},Q=Object.prototype.hasOwnProperty;function ce(S,L,J){var ee=J.ref;return{$$typeof:s,type:S,key:L,ref:ee!==void 0?ee:null,props:J}}function ge(S,L){return ce(S.type,L,S.props)}function se(S){return typeof S=="object"&&S!==null&&S.$$typeof===s}function ye(S){var L={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(J){return L[J]})}var Ze=/\/+/g;function ne(S,L){return typeof S=="object"&&S!==null&&S.key!=null?ye(""+S.key):L.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(W,W):(S.status="pending",S.then(function(L){S.status==="pending"&&(S.status="fulfilled",S.value=L)},function(L){S.status==="pending"&&(S.status="rejected",S.reason=L)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function D(S,L,J,ee,de){var ve=typeof S;(ve==="undefined"||ve==="boolean")&&(S=null);var Me=!1;if(S===null)Me=!0;else switch(ve){case"bigint":case"string":case"number":Me=!0;break;case"object":switch(S.$$typeof){case s:case o:Me=!0;break;case b:return Me=S._init,D(Me(S._payload),L,J,ee,de)}}if(Me)return de=de(S),Me=ee===""?"."+ne(S,0):ee,q(de)?(J="",Me!=null&&(J=Me.replace(Ze,"$&/")+"/"),D(de,L,J,"",function(Ia){return Ia})):de!=null&&(se(de)&&(de=ge(de,J+(de.key==null||S&&S.key===de.key?"":(""+de.key).replace(Ze,"$&/")+"/")+Me)),L.push(de)),1;Me=0;var Et=ee===""?".":ee+":";if(q(S))for(var lt=0;lt<S.length;lt++)ee=S[lt],ve=Et+ne(ee,lt),Me+=D(ee,L,J,ve,de);else if(lt=O(S),typeof lt=="function")for(S=lt.call(S),lt=0;!(ee=S.next()).done;)ee=ee.value,ve=Et+ne(ee,lt++),Me+=D(ee,L,J,ve,de);else if(ve==="object"){if(typeof S.then=="function")return D(le(S),L,J,ee,de);throw L=String(S),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return Me}function Y(S,L,J){if(S==null)return S;var ee=[],de=0;return D(S,ee,"","",function(ve){return L.call(J,ve,de++)}),ee}function K(S){if(S._status===-1){var L=S._result;L=L(),L.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=L)}if(S._status===1)return S._result.default;throw S._result}var G=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=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(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},P={map:Y,forEach:function(S,L,J){Y(S,function(){L.apply(this,arguments)},J)},count:function(S){var L=0;return Y(S,function(){L++}),L},toArray:function(S){return Y(S,function(L){return L})||[]},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=U,re.Fragment=u,re.Profiler=d,re.PureComponent=X,re.StrictMode=r,re.Suspense=g,re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,re.__COMPILER_RUNTIME={__proto__:null,c:function(S){return Z.H.useMemoCache(S)}},re.cache=function(S){return function(){return S.apply(null,arguments)}},re.cacheSignal=function(){return null},re.cloneElement=function(S,L,J){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var ee=k({},S.props),de=S.key;if(L!=null)for(ve in L.key!==void 0&&(de=""+L.key),L)!Q.call(L,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&L.ref===void 0||(ee[ve]=L[ve]);var ve=arguments.length-2;if(ve===1)ee.children=J;else if(1<ve){for(var Me=Array(ve),Et=0;Et<ve;Et++)Me[Et]=arguments[Et+2];ee.children=Me}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,L,J){var ee,de={},ve=null;if(L!=null)for(ee in L.key!==void 0&&(ve=""+L.key),L)Q.call(L,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(de[ee]=L[ee]);var Me=arguments.length-2;if(Me===1)de.children=J;else if(1<Me){for(var Et=Array(Me),lt=0;lt<Me;lt++)Et[lt]=arguments[lt+2];de.children=Et}if(S&&S.defaultProps)for(ee in Me=S.defaultProps,Me)de[ee]===void 0&&(de[ee]=Me[ee]);return ce(S,ve,de)},re.createRef=function(){return{current:null}},re.forwardRef=function(S){return{$$typeof:y,render:S}},re.isValidElement=se,re.lazy=function(S){return{$$typeof:b,_payload:{_status:-1,_result:S},_init:K}},re.memo=function(S,L){return{$$typeof:p,type:S,compare:L===void 0?null:L}},re.startTransition=function(S){var L=Z.T,J={};Z.T=J;try{var ee=S(),de=Z.S;de!==null&&de(J,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(W,G)}catch(ve){G(ve)}finally{L!==null&&J.types!==null&&(L.types=J.types),Z.T=L}},re.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},re.use=function(S){return Z.H.use(S)},re.useActionState=function(S,L,J){return Z.H.useActionState(S,L,J)},re.useCallback=function(S,L){return Z.H.useCallback(S,L)},re.useContext=function(S){return Z.H.useContext(S)},re.useDebugValue=function(){},re.useDeferredValue=function(S,L){return Z.H.useDeferredValue(S,L)},re.useEffect=function(S,L){return Z.H.useEffect(S,L)},re.useEffectEvent=function(S){return Z.H.useEffectEvent(S)},re.useId=function(){return Z.H.useId()},re.useImperativeHandle=function(S,L,J){return Z.H.useImperativeHandle(S,L,J)},re.useInsertionEffect=function(S,L){return Z.H.useInsertionEffect(S,L)},re.useLayoutEffect=function(S,L){return Z.H.useLayoutEffect(S,L)},re.useMemo=function(S,L){return Z.H.useMemo(S,L)},re.useOptimistic=function(S,L){return Z.H.useOptimistic(S,L)},re.useReducer=function(S,L,J){return Z.H.useReducer(S,L,J)},re.useRef=function(S){return Z.H.useRef(S)},re.useState=function(S){return Z.H.useState(S)},re.useSyncExternalStore=function(S,L,J){return Z.H.useSyncExternalStore(S,L,J)},re.useTransition=function(){return Z.H.useTransition()},re.version="19.2.8",re}var Rp;function id(){return Rp||(Rp=1,Nu.exports=Bv()),Nu.exports}var v=id(),wu={exports:{}},Xs={},Tu={exports:{}},Eu={};/**
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 Cp;function Hv(){return Cp||(Cp=1,(function(s){function o(D,Y){var K=D.length;D.push(Y);e:for(;0<K;){var G=K-1>>>1,P=D[G];if(0<d(P,Y))D[G]=Y,D[K]=P,K=G;else break e}}function u(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var Y=D[0],K=D.pop();if(K!==Y){D[0]=K;e:for(var G=0,P=D.length,S=P>>>1;G<S;){var L=2*(G+1)-1,J=D[L],ee=L+1,de=D[ee];if(0>d(J,K))ee<P&&0>d(de,J)?(D[G]=de,D[ee]=K,G=ee):(D[G]=J,D[L]=K,G=L);else if(ee<P&&0>d(de,K))D[G]=de,D[ee]=K,G=ee;else break e}}return Y}function d(D,Y){var K=D.sortIndex-Y.sortIndex;return K!==0?K:D.id-Y.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,y=m.now();s.unstable_now=function(){return m.now()-y}}var g=[],p=[],b=1,x=null,T=3,O=!1,$=!1,k=!1,w=!1,U=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,X=typeof setImmediate<"u"?setImmediate:null;function I(D){for(var Y=u(p);Y!==null;){if(Y.callback===null)r(p);else if(Y.startTime<=D)r(p),Y.sortIndex=Y.expirationTime,o(g,Y);else break;Y=u(p)}}function q(D){if(k=!1,I(D),!$)if(u(g)!==null)$=!0,W||(W=!0,ye());else{var Y=u(p);Y!==null&&le(q,Y.startTime-D)}}var W=!1,Z=-1,Q=5,ce=-1;function ge(){return w?!0:!(s.unstable_now()-ce<Q)}function se(){if(w=!1,W){var D=s.unstable_now();ce=D;var Y=!0;try{e:{$=!1,k&&(k=!1,V(Z),Z=-1),O=!0;var K=T;try{t:{for(I(D),x=u(g);x!==null&&!(x.expirationTime>D&&ge());){var G=x.callback;if(typeof G=="function"){x.callback=null,T=x.priorityLevel;var P=G(x.expirationTime<=D);if(D=s.unstable_now(),typeof P=="function"){x.callback=P,I(D),Y=!0;break t}x===u(g)&&r(g),I(D)}else r(g);x=u(g)}if(x!==null)Y=!0;else{var S=u(p);S!==null&&le(q,S.startTime-D),Y=!1}}break e}finally{x=null,T=K,O=!1}Y=void 0}}finally{Y?ye():W=!1}}}var ye;if(typeof X=="function")ye=function(){X(se)};else if(typeof MessageChannel<"u"){var Ze=new MessageChannel,ne=Ze.port2;Ze.port1.onmessage=se,ye=function(){ne.postMessage(null)}}else ye=function(){U(se,0)};function le(D,Y){Z=U(function(){D(s.unstable_now())},Y)}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(D){D.callback=null},s.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<D?Math.floor(1e3/D):5},s.unstable_getCurrentPriorityLevel=function(){return T},s.unstable_next=function(D){switch(T){case 1:case 2:case 3:var Y=3;break;default:Y=T}var K=T;T=Y;try{return D()}finally{T=K}},s.unstable_requestPaint=function(){w=!0},s.unstable_runWithPriority=function(D,Y){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var K=T;T=D;try{return Y()}finally{T=K}},s.unstable_scheduleCallback=function(D,Y,K){var G=s.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?G+K:G):K=G,D){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=K+P,D={id:b++,callback:Y,priorityLevel:D,startTime:K,expirationTime:P,sortIndex:-1},K>G?(D.sortIndex=K,o(p,D),u(g)===null&&D===u(p)&&(k?(V(Z),Z=-1):k=!0,le(q,K-G))):(D.sortIndex=P,o(g,D),$||O||($=!0,W||(W=!0,ye()))),D},s.unstable_shouldYield=ge,s.unstable_wrapCallback=function(D){var Y=T;return function(){var K=T;T=Y;try{return D.apply(this,arguments)}finally{T=K}}}})(Eu)),Eu}var Dp;function qv(){return Dp||(Dp=1,Tu.exports=Hv()),Tu.exports}var ku={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 Mp;function Gv(){if(Mp)return Nt;Mp=1;var s=id();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 y(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=y(b,p.crossOrigin),T=typeof p.integrity=="string"?p.integrity:void 0,O=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:T,fetchPriority:O}):b==="script"&&r.d.X(g,{crossOrigin:x,integrity:T,fetchPriority:O,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=y(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=y(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=y(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 $p;function __(){if($p)return ku.exports;$p=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(),ku.exports=Gv(),ku.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 Lp;function Qv(){if(Lp)return Xs;Lp=1;var s=qv(),o=id(),u=__();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 y(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function 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,T=Symbol.for("react.element"),O=Symbol.for("react.transitional.element"),$=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),X=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),ge=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function ye(e){return e===null||typeof e!="object"?null:(e=se&&e[se]||e["@@iterator"],typeof e=="function"?e:null)}var Ze=Symbol.for("react.client.reference");function ne(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ze?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case U:return"Profiler";case w:return"StrictMode";case q:return"Suspense";case W:return"SuspenseList";case ce:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case $:return"Portal";case X:return e.displayName||"Context";case V:return(e._context.displayName||"Context")+".Consumer";case I:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return t=e.displayName||null,t!==null?t:ne(e.type)||"Memo";case Q:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var le=Array.isArray,D=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K={pending:!1,data:null,method:null,action:null},G=[],P=-1;function S(e){return{current:e}}function L(e){0>P||(e.current=G[P],G[P]=null,P--)}function J(e,t){P++,G[P]=e.current,e.current=t}var ee=S(null),de=S(null),ve=S(null),Me=S(null);function Et(e,t){switch(J(ve,t),J(de,e),J(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Fm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Fm(t),e=Wm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(ee),J(ee,e)}function lt(){L(ee),L(de),L(ve)}function Ia(e){e.memoizedState!==null&&J(Me,e);var t=ee.current,l=Wm(t,e.type);t!==l&&(J(de,e),J(ee,l))}function di(e){de.current===e&&(L(ee),L(de)),Me.current===e&&(L(Me),qs._currentValue=K)}var ao,wd;function wn(e){if(ao===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);ao=t&&t[1]||"",wd=-1<l.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+ao+e+wd}var so=!1;function io(e,t){if(!e||so)return"";so=!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(M){var C=M}Reflect.construct(e,[],H)}else{try{H.call()}catch(M){C=M}e.call(H.prototype)}}else{try{throw Error()}catch(M){C=M}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(M){if(M&&C&&typeof M.stack=="string")return[M.stack,C.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
- `),R=_.split(`
45
- `);for(i=n=0;n<j.length&&!j[n].includes("DetermineComponentFrameRoot");)n++;for(;i<R.length&&!R[i].includes("DetermineComponentFrameRoot");)i++;if(n===j.length||i===R.length)for(n=j.length-1,i=R.length-1;1<=n&&0<=i&&j[n]!==R[i];)i--;for(;1<=n&&0<=i;n--,i--)if(j[n]!==R[i]){if(n!==1||i!==1)do if(n--,i--,0>i||j[n]!==R[i]){var z=`
46
- `+j[n].replace(" at new "," at ");return e.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",e.displayName)),z}while(1<=n&&0<=i);break}}}finally{so=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?wn(l):""}function mg(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 io(e.type,!1);case 11:return io(e.type.render,!1);case 1:return io(e.type,!0);case 31:return wn("Activity");default:return""}}function Td(e){try{var t="",l=null;do t+=mg(e,l),l=e,e=e.return;while(e);return t}catch(n){return`
47
- Error generating stack: `+n.message+`
48
- `+n.stack}}var co=Object.prototype.hasOwnProperty,oo=s.unstable_scheduleCallback,ro=s.unstable_cancelCallback,pg=s.unstable_shouldYield,_g=s.unstable_requestPaint,zt=s.unstable_now,gg=s.unstable_getCurrentPriorityLevel,Ed=s.unstable_ImmediatePriority,kd=s.unstable_UserBlockingPriority,fi=s.unstable_NormalPriority,yg=s.unstable_LowPriority,Ad=s.unstable_IdlePriority,vg=s.log,xg=s.unstable_setDisableYieldValue,Pa=null,Ut=null;function Jl(e){if(typeof vg=="function"&&xg(e),Ut&&typeof Ut.setStrictMode=="function")try{Ut.setStrictMode(Pa,e)}catch{}}var Bt=Math.clz32?Math.clz32:Sg,bg=Math.log,jg=Math.LN2;function Sg(e){return e>>>=0,e===0?32:31-(bg(e)/jg|0)|0}var hi=256,mi=262144,pi=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 _i(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 es(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ng(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 Rd(){var e=pi;return pi<<=1,(pi&62914560)===0&&(pi=4194304),e}function uo(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function ts(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function wg(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,R=e.hiddenUpdates;for(l=f&~l;0<l;){var z=31-Bt(l),H=1<<z;_[z]=0,j[z]=-1;var C=R[z];if(C!==null)for(R[z]=null,z=0;z<C.length;z++){var M=C[z];M!==null&&(M.lane&=-536870913)}l&=~H}n!==0&&Cd(e,n,0),c!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=c&~(f&~t))}function Cd(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 Dd(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 Md(e,t){var l=t&-t;return l=(l&42)!==0?1:fo(l),(l&(e.suspendedLanes|t))!==0?0:l}function fo(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 ho(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function $d(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:xp(e.type))}function Ld(e,t){var l=Y.p;try{return Y.p=e,t()}finally{Y.p=l}}var Fl=Math.random().toString(36).slice(2),vt="__reactFiber$"+Fl,At="__reactProps$"+Fl,ea="__reactContainer$"+Fl,mo="__reactEvents$"+Fl,Tg="__reactListeners$"+Fl,Eg="__reactHandles$"+Fl,Od="__reactResources$"+Fl,ls="__reactMarker$"+Fl;function po(e){delete e[vt],delete e[At],delete e[mo],delete e[Tg],delete e[Eg]}function ta(e){var t=e[vt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[ea]||l[vt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=ap(e);e!==null;){if(l=e[vt])return l;e=ap(e)}return t}e=l,l=e.parentNode}return null}function la(e){if(e=e[vt]||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 ns(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[Od];return t||(t=e[Od]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function pt(e){e[ls]=!0}var zd=new Set,Ud={};function En(e,t){aa(e,t),aa(e+"Capture",t)}function aa(e,t){for(Ud[e]=t,e=0;e<t.length;e++)zd.add(t[e])}var kg=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]*$"),Bd={},Hd={};function Ag(e){return co.call(Hd,e)?!0:co.call(Bd,e)?!1:kg.test(e)?Hd[e]=!0:(Bd[e]=!0,!1)}function gi(e,t,l){if(Ag(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 qd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Rg(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 _o(e){if(!e._valueTracker){var t=qd(e)?"checked":"value";e._valueTracker=Rg(e,t,""+e[t])}}function Gd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),n="";return e&&(n=qd(e)?e.checked?"true":"false":e.value),e=n,e!==l?(t.setValue(e),!0):!1}function vi(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 Cg=/[\n"\\]/g;function Ft(e){return e.replace(Cg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function go(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 Qd(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)){_o(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),_o(e)}function yo(e,t,l){t==="number"&&vi(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 Yd(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 Vd(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),_o(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 Dg=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 Xd(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||Dg.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&&Xd(e,i,n)}else for(var c in t)t.hasOwnProperty(c)&&Xd(e,c,t[c])}function vo(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 Mg=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"]]),$g=/^[\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 xi(e){return $g.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function El(){}var xo=null;function bo(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 Kd(e){var t=la(e);if(t&&(e=t.stateNode)){var l=e[At]||null;e:switch(e=t.stateNode,t.type){case"input":if(go(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[At]||null;if(!i)throw Error(r(90));go(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&&Gd(n)}break e;case"textarea":Yd(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&sa(e,!!l.multiple,t,!1)}}}var jo=!1;function Jd(e,t,l){if(jo)return e(t,l);jo=!0;try{var n=e(t);return n}finally{if(jo=!1,(ca!==null||oa!==null)&&(cc(),ca&&(t=ca,e=oa,oa=ca=null,Kd(t),e)))for(t=0;t<e.length;t++)Kd(e[t])}}function as(e,t){var l=e.stateNode;if(l===null)return null;var n=l[At]||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"),So=!1;if(kl)try{var ss={};Object.defineProperty(ss,"passive",{get:function(){So=!0}}),window.addEventListener("test",ss,ss),window.removeEventListener("test",ss,ss)}catch{So=!1}var Wl=null,No=null,bi=null;function Fd(){if(bi)return bi;var e,t=No,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 bi=i.slice(e,1<n?1-n:void 0)}function ji(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 Si(){return!0}function Wd(){return!1}function Rt(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)?Si:Wd,this.isPropagationStopped=Wd,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=Si)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Si)},persist:function(){},isPersistent:Si}),t}var kn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ni=Rt(kn),is=x({},kn,{view:0,detail:0}),Lg=Rt(is),wo,To,cs,wi=x({},is,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ko,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!==cs&&(cs&&e.type==="mousemove"?(wo=e.screenX-cs.screenX,To=e.screenY-cs.screenY):To=wo=0,cs=e),wo)},movementY:function(e){return"movementY"in e?e.movementY:To}}),Id=Rt(wi),Og=x({},wi,{dataTransfer:0}),zg=Rt(Og),Ug=x({},is,{relatedTarget:0}),Eo=Rt(Ug),Bg=x({},kn,{animationName:0,elapsedTime:0,pseudoElement:0}),Hg=Rt(Bg),qg=x({},kn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gg=Rt(qg),Qg=x({},kn,{data:0}),Pd=Rt(Qg),Yg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Vg={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"},Xg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Xg[e])?!!t[e]:!1}function ko(){return Zg}var Kg=x({},is,{key:function(e){if(e.key){var t=Yg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ji(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Vg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ko,charCode:function(e){return e.type==="keypress"?ji(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ji(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Jg=Rt(Kg),Fg=x({},wi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ef=Rt(Fg),Wg=x({},is,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ko}),Ig=Rt(Wg),Pg=x({},kn,{propertyName:0,elapsedTime:0,pseudoElement:0}),ey=Rt(Pg),ty=x({},wi,{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}),ly=Rt(ty),ny=x({},kn,{newState:0,oldState:0}),ay=Rt(ny),sy=[9,13,27,32],Ao=kl&&"CompositionEvent"in window,os=null;kl&&"documentMode"in document&&(os=document.documentMode);var iy=kl&&"TextEvent"in window&&!os,tf=kl&&(!Ao||os&&8<os&&11>=os),lf=" ",nf=!1;function af(e,t){switch(e){case"keyup":return sy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ra=!1;function cy(e,t){switch(e){case"compositionend":return sf(t);case"keypress":return t.which!==32?null:(nf=!0,lf);case"textInput":return e=t.data,e===lf&&nf?null:e;default:return null}}function oy(e,t){if(ra)return e==="compositionend"||!Ao&&af(e,t)?(e=Fd(),bi=No=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 tf&&t.locale!=="ko"?null:t.data;default:return null}}var ry={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 cf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ry[e.type]:t==="textarea"}function of(e,t,l,n){ca?oa?oa.push(n):oa=[n]:ca=n,t=mc(t,"onChange"),0<t.length&&(l=new Ni("onChange","change",null,l,n),e.push({event:l,listeners:t}))}var rs=null,us=null;function uy(e){Ym(e,0)}function Ti(e){var t=ns(e);if(Gd(t))return e}function rf(e,t){if(e==="change")return t}var uf=!1;if(kl){var Ro;if(kl){var Co="oninput"in document;if(!Co){var df=document.createElement("div");df.setAttribute("oninput","return;"),Co=typeof df.oninput=="function"}Ro=Co}else Ro=!1;uf=Ro&&(!document.documentMode||9<document.documentMode)}function ff(){rs&&(rs.detachEvent("onpropertychange",hf),us=rs=null)}function hf(e){if(e.propertyName==="value"&&Ti(us)){var t=[];of(t,us,e,bo(e)),Jd(uy,t)}}function dy(e,t,l){e==="focusin"?(ff(),rs=t,us=l,rs.attachEvent("onpropertychange",hf)):e==="focusout"&&ff()}function fy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ti(us)}function hy(e,t){if(e==="click")return Ti(t)}function my(e,t){if(e==="input"||e==="change")return Ti(t)}function py(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ht=typeof Object.is=="function"?Object.is:py;function ds(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(!co.call(t,i)||!Ht(e[i],t[i]))return!1}return!0}function mf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pf(e,t){var l=mf(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=mf(l)}}function _f(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_f(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=vi(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=vi(e.document)}return t}function Do(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 _y=kl&&"documentMode"in document&&11>=document.documentMode,ua=null,Mo=null,fs=null,$o=!1;function yf(e,t,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;$o||ua==null||ua!==vi(n)||(n=ua,"selectionStart"in n&&Do(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}),fs&&ds(fs,n)||(fs=n,n=mc(Mo,"onSelect"),0<n.length&&(t=new Ni("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")},Lo={},vf={};kl&&(vf=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(Lo[e])return Lo[e];if(!da[e])return e;var t=da[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in vf)return Lo[e]=t[l];return e}var xf=Rn("animationend"),bf=Rn("animationiteration"),jf=Rn("animationstart"),gy=Rn("transitionrun"),yy=Rn("transitionstart"),vy=Rn("transitioncancel"),Sf=Rn("transitionend"),Nf=new Map,Oo="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(" ");Oo.push("scrollEnd");function rl(e,t){Nf.set(e,t),En(t,[e])}var Ei=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,zo=0;function ki(){for(var e=fa,t=zo=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&&wf(l,i,c)}}function Ai(e,t,l,n){Wt[fa++]=e,Wt[fa++]=t,Wt[fa++]=l,Wt[fa++]=n,zo|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Uo(e,t,l,n){return Ai(e,t,l,n),Ri(e)}function Cn(e,t){return Ai(e,null,null,t),Ri(e)}function wf(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 Ri(e){if(50<$s)throw $s=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 xy(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 xy(e,t,l,n)}function Bo(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 Tf(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 Ci(e,t,l,n,i,c){var f=0;if(n=e,typeof e=="function")Bo(e)&&(f=1);else if(typeof e=="string")f=wv(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 k:return Dn(l.children,i,c,t);case w:f=8,i|=24;break;case U:return e=qt(12,l,t,i|2),e.elementType=U,e.lanes=c,e;case q:return e=qt(13,l,t,i),e.elementType=q,e.lanes=c,e;case W:return e=qt(19,l,t,i),e.elementType=W,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case X:f=10;break e;case V:f=9;break e;case I:f=11;break e;case Z:f=14;break e;case Q: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 Ho(e,t,l){return e=qt(6,e,null,t),e.lanes=l,e}function Ef(e){var t=qt(18,null,null,0);return t.stateNode=e,t}function qo(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 kf=new WeakMap;function It(e,t){if(typeof e=="object"&&e!==null){var l=kf.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Td(t)},kf.set(e,t),t)}return{value:e,source:t,stack:Td(t)}}var ma=[],pa=0,Di=null,hs=0,Pt=[],el=0,Il=null,yl=1,vl="";function Rl(e,t){ma[pa++]=hs,ma[pa++]=Di,Di=e,hs=t}function Af(e,t,l){Pt[el++]=yl,Pt[el++]=vl,Pt[el++]=Il,Il=e;var n=yl;e=vl;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,yl=1<<32-Bt(t)+i|l<<i|n,vl=c+e}else yl=1<<c|l<<i|n,vl=e}function Go(e){e.return!==null&&(Rl(e,1),Af(e,1,0))}function Qo(e){for(;e===Di;)Di=ma[--pa],ma[pa]=null,hs=ma[--pa],ma[pa]=null;for(;e===Il;)Il=Pt[--el],Pt[el]=null,vl=Pt[--el],Pt[el]=null,yl=Pt[--el],Pt[el]=null}function Rf(e,t){Pt[el++]=yl,Pt[el++]=vl,Pt[el++]=Il,yl=t.id,vl=t.overflow,Il=e}var xt=null,Qe=null,Te=!1,Pl=null,tl=!1,Yo=Error(r(519));function en(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ms(It(t,e)),Yo}function Cf(e){var t=e.stateNode,l=e.type,n=e.memoizedProps;switch(t[vt]=e,t[At]=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<Os.length;l++)be(Os[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),Qd(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),Vd(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||Km(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 Df(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 Df(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")||ou(e.type,e.memoizedProps)),l=!l),l&&Qe&&en(e),Df(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=np(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=np(e)}else t===27?(t=Qe,pn(e.type)?(e=hu,hu=null,Qe=e):Qe=t):Qe=xt?nl(e.stateNode.nextSibling):null;return!0}function Mn(){Qe=xt=null,Te=!1}function Vo(){var e=Pl;return e!==null&&($t===null?$t=e:$t.push.apply($t,e),Pl=null),e}function ms(e){Pl===null?Pl=[e]:Pl.push(e)}var Xo=S(null),$n=null,Cl=null;function tn(e,t,l){J(Xo,t._currentValue),t._currentValue=l}function Dl(e){e._currentValue=Xo.current,L(Xo)}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 Ko(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===Me.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&&Ko(t,e,l,n),t.flags|=262144}function Mi(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 Mf($n,e)}function $i(e,t){return $n===null&&Ln(e),Mf(e,t)}function Mf(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 by=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()})}},jy=s.unstable_scheduleCallback,Sy=s.unstable_NormalPriority,ot={$$typeof:X,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jo(){return{controller:new by,data:new Map,refCount:0}}function ps(e){e.refCount--,e.refCount===0&&jy(Sy,function(){e.controller.abort()})}var _s=null,Fo=0,ya=0,va=null;function Ny(e,t){if(_s===null){var l=_s=[];Fo=0,ya=Pr(),va={status:"pending",value:void 0,then:function(n){l.push(n)}}}return Fo++,t.then($f,$f),t}function $f(){if(--Fo===0&&_s!==null){va!==null&&(va.status="fulfilled");var e=_s;_s=null,ya=0,va=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function wy(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 Lf=D.S;D.S=function(e,t){ym=zt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ny(e,t),Lf!==null&&Lf(e,t)};var On=S(null);function Wo(){var e=On.current;return e!==null?e:He.pooledCache}function Li(e,t){t===null?J(On,On.current):J(On,t.pool)}function Of(){var e=Wo();return e===null?null:{parent:ot._currentValue,pool:e}}var xa=Error(r(460)),Io=Error(r(474)),Oi=Error(r(542)),zi={then:function(){}};function zf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Uf(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,Hf(e),e;default:if(typeof t.status=="string")t.then(El,El);else{if(e=He,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,Hf(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 Bf(){if(Un===null)throw Error(r(459));var e=Un;return Un=null,e}function Hf(e){if(e===xa||e===Oi)throw Error(r(483))}var ba=null,gs=0;function Ui(e){var t=gs;return gs+=1,ba===null&&(ba=[]),Uf(ba,e,t)}function ys(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Bi(e,t){throw t.$$typeof===T?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function qf(e){function t(E,N){if(e){var A=E.deletions;A===null?(E.deletions=[N],E.flags|=16):A.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,A){return E.index=A,e?(A=E.alternate,A!==null?(A=A.index,A<N?(E.flags|=67108866,N):A):(E.flags|=67108866,N)):(E.flags|=1048576,N)}function f(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function _(E,N,A,B){return N===null||N.tag!==6?(N=Ho(A,E.mode,B),N.return=E,N):(N=i(N,A),N.return=E,N)}function j(E,N,A,B){var ae=A.type;return ae===k?z(E,N,A.props.children,B,A.key):N!==null&&(N.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===Q&&zn(ae)===N.type)?(N=i(N,A.props),ys(N,A),N.return=E,N):(N=Ci(A.type,A.key,A.props,null,E.mode,B),ys(N,A),N.return=E,N)}function R(E,N,A,B){return N===null||N.tag!==4||N.stateNode.containerInfo!==A.containerInfo||N.stateNode.implementation!==A.implementation?(N=qo(A,E.mode,B),N.return=E,N):(N=i(N,A.children||[]),N.return=E,N)}function z(E,N,A,B,ae){return N===null||N.tag!==7?(N=Dn(A,E.mode,B,ae),N.return=E,N):(N=i(N,A),N.return=E,N)}function H(E,N,A){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=Ho(""+N,E.mode,A),N.return=E,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case O:return A=Ci(N.type,N.key,N.props,null,E.mode,A),ys(A,N),A.return=E,A;case $:return N=qo(N,E.mode,A),N.return=E,N;case Q:return N=zn(N),H(E,N,A)}if(le(N)||ye(N))return N=Dn(N,E.mode,A,null),N.return=E,N;if(typeof N.then=="function")return H(E,Ui(N),A);if(N.$$typeof===X)return H(E,$i(E,N),A);Bi(E,N)}return null}function C(E,N,A,B){var ae=N!==null?N.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ae!==null?null:_(E,N,""+A,B);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case O:return A.key===ae?j(E,N,A,B):null;case $:return A.key===ae?R(E,N,A,B):null;case Q:return A=zn(A),C(E,N,A,B)}if(le(A)||ye(A))return ae!==null?null:z(E,N,A,B,null);if(typeof A.then=="function")return C(E,N,Ui(A),B);if(A.$$typeof===X)return C(E,N,$i(E,A),B);Bi(E,A)}return null}function M(E,N,A,B,ae){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return E=E.get(A)||null,_(N,E,""+B,ae);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case O:return E=E.get(B.key===null?A:B.key)||null,j(N,E,B,ae);case $:return E=E.get(B.key===null?A:B.key)||null,R(N,E,B,ae);case Q:return B=zn(B),M(E,N,A,B,ae)}if(le(B)||ye(B))return E=E.get(A)||null,z(N,E,B,ae,null);if(typeof B.then=="function")return M(E,N,A,Ui(B),ae);if(B.$$typeof===X)return M(E,N,A,$i(N,B),ae);Bi(N,B)}return null}function F(E,N,A,B){for(var ae=null,Ee=null,te=N,he=N=0,Ne=null;te!==null&&he<A.length;he++){te.index>he?(Ne=te,te=null):Ne=te.sibling;var ke=C(E,te,A[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===A.length)return l(E,te),Te&&Rl(E,he),ae;if(te===null){for(;he<A.length;he++)te=H(E,A[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<A.length;he++)Ne=M(te,E,he,A[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,A,B){if(A==null)throw Error(r(151));for(var ae=null,Ee=null,te=N,he=N=0,Ne=null,ke=A.next();te!==null&&!ke.done;he++,ke=A.next()){te.index>he?(Ne=te,te=null):Ne=te.sibling;var xn=C(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=A.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=A.next())ke=M(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(Ov){return t(E,Ov)}),Te&&Rl(E,he),ae}function Be(E,N,A,B){if(typeof A=="object"&&A!==null&&A.type===k&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case O:e:{for(var ae=A.key;N!==null;){if(N.key===ae){if(ae=A.type,ae===k){if(N.tag===7){l(E,N.sibling),B=i(N,A.props.children),B.return=E,E=B;break e}}else if(N.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===Q&&zn(ae)===N.type){l(E,N.sibling),B=i(N,A.props),ys(B,A),B.return=E,E=B;break e}l(E,N);break}else t(E,N);N=N.sibling}A.type===k?(B=Dn(A.props.children,E.mode,B,A.key),B.return=E,E=B):(B=Ci(A.type,A.key,A.props,null,E.mode,B),ys(B,A),B.return=E,E=B)}return f(E);case $:e:{for(ae=A.key;N!==null;){if(N.key===ae)if(N.tag===4&&N.stateNode.containerInfo===A.containerInfo&&N.stateNode.implementation===A.implementation){l(E,N.sibling),B=i(N,A.children||[]),B.return=E,E=B;break e}else{l(E,N);break}else t(E,N);N=N.sibling}B=qo(A,E.mode,B),B.return=E,E=B}return f(E);case Q:return A=zn(A),Be(E,N,A,B)}if(le(A))return F(E,N,A,B);if(ye(A)){if(ae=ye(A),typeof ae!="function")throw Error(r(150));return A=ae.call(A),ie(E,N,A,B)}if(typeof A.then=="function")return Be(E,N,Ui(A),B);if(A.$$typeof===X)return Be(E,N,$i(E,A),B);Bi(E,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,N!==null&&N.tag===6?(l(E,N.sibling),B=i(N,A),B.return=E,E=B):(l(E,N),B=Ho(A,E.mode,B),B.return=E,E=B),f(E)):l(E,N)}return function(E,N,A,B){try{gs=0;var ae=Be(E,N,A,B);return ba=null,ae}catch(te){if(te===xa||te===Oi)throw te;var Ee=qt(29,te,null,E.mode);return Ee.lanes=B,Ee.return=E,Ee}finally{}}}var Bn=qf(!0),Gf=qf(!1),ln=!1;function Po(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function er(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,(Ce&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=Ri(e),wf(e,null,l),t}return Ai(e,n,t,l),Ri(e)}function vs(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,Dd(e,l)}}function tr(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 lr=!1;function xs(){if(lr){var e=va;if(e!==null)throw e}}function bs(e,t,l,n){lr=!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=_,R=j.next;j.next=null,f===null?c=R:f.next=R,f=j;var z=e.alternate;z!==null&&(z=z.updateQueue,_=z.lastBaseUpdate,_!==f&&(_===null?z.firstBaseUpdate=R:_.next=R,z.lastBaseUpdate=j))}if(c!==null){var H=i.baseState;f=0,z=R=j=null,_=c;do{var C=_.lane&-536870913,M=C!==_.lane;if(M?(Se&C)===C:(n&C)===C){C!==0&&C===ya&&(lr=!0),z!==null&&(z=z.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var F=e,ie=_;C=t;var Be=l;switch(ie.tag){case 1:if(F=ie.payload,typeof F=="function"){H=F.call(Be,H,C);break e}H=F;break e;case 3:F.flags=F.flags&-65537|128;case 0:if(F=ie.payload,C=typeof F=="function"?F.call(Be,H,C):F,C==null)break e;H=x({},H,C);break e;case 2:ln=!0}}C=_.callback,C!==null&&(e.flags|=64,M&&(e.flags|=8192),M=i.callbacks,M===null?i.callbacks=[C]:M.push(C))}else M={lane:C,tag:_.tag,payload:_.payload,callback:_.callback,next:null},z===null?(R=z=M,j=H):z=z.next=M,f|=C;if(_=_.next,_===null){if(_=i.shared.pending,_===null)break;M=_,_=M.next,M.next=null,i.lastBaseUpdate=M,i.shared.pending=null}}while(!0);z===null&&(j=H),i.baseState=j,i.firstBaseUpdate=R,i.lastBaseUpdate=z,c===null&&(i.shared.lanes=0),un|=f,e.lanes=f,e.memoizedState=H}}function Qf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Yf(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Qf(l[e],t)}var ja=S(null),Hi=S(0);function Vf(e,t){e=ql,J(Hi,e),J(ja,t),ql=e|t.baseLanes}function nr(){J(Hi,ql),J(ja,ja.current)}function ar(){ql=Hi.current,L(ja),L(Hi)}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 sr(e){J(nt,nt.current),J(Gt,e),ll===null&&(ll=e)}function Xf(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){L(Gt),ll===e&&(ll=null),L(nt)}var nt=S(0);function qi(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||du(l)||fu(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,ze=null,rt=null,Gi=!1,Sa=!1,Hn=!1,Qi=0,js=0,Na=null,Ty=0;function Fe(){throw Error(r(321))}function ir(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 cr(e,t,l,n,i,c){return Ml=c,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Ah:jr,Hn=!1,c=l(n,i),Hn=!1,Sa&&(c=Kf(t,l,n,i)),Zf(e),c}function Zf(e){D.H=ws;var t=ze!==null&&ze.next!==null;if(Ml=0,rt=ze=fe=null,Gi=!1,js=0,Na=null,t)throw Error(r(300));e===null||ut||(e=e.dependencies,e!==null&&Mi(e)&&(ut=!0))}function Kf(e,t,l,n){fe=e;var i=0;do{if(Sa&&(Na=null),js=0,Sa=!1,25<=i)throw Error(r(301));if(i+=1,rt=ze=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}D.H=Rh,c=t(l,n)}while(Sa);return c}function Ey(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?Ss(t):t,e=e.useState()[0],(ze!==null?ze.memoizedState:null)!==e&&(fe.flags|=1024),t}function or(){var e=Qi!==0;return Qi=0,e}function rr(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function ur(e){if(Gi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Gi=!1}Ml=0,rt=ze=fe=null,Sa=!1,js=Qi=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(ze===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=rt===null?fe.memoizedState:rt.next;if(t!==null)rt=t,ze=e;else{if(e===null)throw fe.alternate===null?Error(r(467)):Error(r(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},rt===null?fe.memoizedState=rt=e:rt=rt.next=e}return rt}function Yi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ss(e){var t=js;return js+=1,Na===null&&(Na=[]),e=Uf(Na,e,t),t=fe,(rt===null?t.memoizedState:rt.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Ah:jr),e}function Vi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ss(e);if(e.$$typeof===X)return bt(e)}throw Error(r(438,String(e)))}function dr(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=Yi(),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 Xi(e){var t=at();return fr(t,ze,e)}function fr(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,R=t,z=!1;do{var H=R.lane&-536870913;if(H!==R.lane?(Se&H)===H:(Ml&H)===H){var C=R.revertLane;if(C===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),H===ya&&(z=!0);else if((Ml&C)===C){R=R.next,C===ya&&(z=!0);continue}else H={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},j===null?(_=j=H,f=c):j=j.next=H,fe.lanes|=C,un|=C;H=R.action,Hn&&l(c,H),c=R.hasEagerState?R.eagerState:l(c,H)}else C={lane:H,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},j===null?(_=j=C,f=c):j=j.next=C,fe.lanes|=H,un|=H;R=R.next}while(R!==null&&R!==t);if(j===null?f=c:j.next=_,!Ht(c,e.memoizedState)&&(ut=!0,z&&(l=va,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 hr(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 Jf(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((ze||i).memoizedState,l);if(f&&(i.memoizedState=l,ut=!0),i=i.queue,_r(If.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},Wf.bind(null,n,i,l,t),null),He===null)throw Error(r(349));c||(Ml&127)!==0||Ff(n,t,l)}return l}function Ff(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=fe.updateQueue,t===null?(t=Yi(),fe.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Wf(e,t,l,n){t.value=l,t.getSnapshot=n,Pf(t)&&eh(e)}function If(e,t,l){return l(function(){Pf(t)&&eh(e)})}function Pf(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Ht(e,l)}catch{return!0}}function eh(e){var t=Cn(e,2);t!==null&&Lt(t,e,2)}function mr(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 th(e,t,l,n){return e.baseState=l,fr(e,ze,typeof n=="function"?n:$l)}function ky(e,t,l,n,i){if(Ji(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)}};D.T!==null?l(!0):c.isTransition=!1,n(c),l=t.pending,l===null?(c.next=t.pending=c,lh(t,c)):(c.next=l.next,t.pending=l.next=c)}}function lh(e,t){var l=t.action,n=t.payload,i=e.state;if(t.isTransition){var c=D.T,f={};D.T=f;try{var _=l(i,n),j=D.S;j!==null&&j(f,_),nh(e,t,_)}catch(R){pr(e,t,R)}finally{c!==null&&f.types!==null&&(c.types=f.types),D.T=c}}else try{c=l(i,n),nh(e,t,c)}catch(R){pr(e,t,R)}}function nh(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){ah(e,t,n)},function(n){return pr(e,t,n)}):ah(e,t,l)}function ah(e,t,l){t.status="fulfilled",t.value=l,sh(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,lh(e,l)))}function pr(e,t,l){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=l,sh(t),t=t.next;while(t!==n)}e.action=null}function sh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ih(e,t){return t}function ch(e,t){if(Te){var l=He.formState;if(l!==null){e:{var n=fe;if(Te){if(Qe){t:{for(var i=Qe,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){Qe=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:ih,lastRenderedState:t},l.queue=n,l=Th.bind(null,fe,n),n.dispatch=l,n=mr(!1),c=br.bind(null,fe,!1,n.queue),n=kt(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,l=ky.bind(null,fe,i,c,l),i.dispatch=l,n.memoizedState=e,[t,l,!1]}function oh(e){var t=at();return rh(t,ze,e)}function rh(e,t,l){if(t=fr(e,t,ih)[0],e=Xi($l)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Ss(t)}catch(f){throw f===xa?Oi: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},Ay.bind(null,i,l),null)),[n,c,e]}function Ay(e,t){e.action=t}function uh(e){var t=at(),l=ze;if(l!==null)return rh(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=Yi(),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 dh(){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 Ki(e,t,l,n){var i=at();n=n===void 0?null:n;var c=i.memoizedState.inst;ze!==null&&n!==null&&ir(n,ze.memoizedState.deps)?i.memoizedState=wa(t,c,l,n):(fe.flags|=e,i.memoizedState=wa(1|t,c,l,n))}function fh(e,t){Zi(8390656,8,e,t)}function _r(e,t){Ki(2048,8,e,t)}function Ry(e){fe.flags|=4;var t=fe.updateQueue;if(t===null)t=Yi(),fe.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function hh(e){var t=at().memoizedState;return Ry({ref:t,nextImpl:e}),function(){if((Ce&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function mh(e,t){return Ki(4,2,e,t)}function ph(e,t){return Ki(4,4,e,t)}function _h(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 gh(e,t,l){l=l!=null?l.concat([e]):null,Ki(4,4,_h.bind(null,t,e),l)}function gr(){}function yh(e,t){var l=at();t=t===void 0?null:t;var n=l.memoizedState;return t!==null&&ir(t,n[1])?n[0]:(l.memoizedState=[e,t],e)}function vh(e,t){var l=at();t=t===void 0?null:t;var n=l.memoizedState;if(t!==null&&ir(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=xm(),fe.lanes|=e,un|=e,l)}function xh(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=xm(),fe.lanes|=e,un|=e,t)}function bh(e,t,l,n,i){var c=Y.p;Y.p=c!==0&&8>c?c:8;var f=D.T,_={};D.T=_,br(e,!1,t,l);try{var j=i(),R=D.S;if(R!==null&&R(_,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var z=wy(j,n);Ns(e,t,z,Xt(e))}else Ns(e,t,n,Xt(e))}catch(H){Ns(e,t,{then:function(){},status:"rejected",reason:H},Xt())}finally{Y.p=c,f!==null&&_.types!==null&&(f.types=_.types),D.T=f}}function Cy(){}function vr(e,t,l,n){if(e.tag!==5)throw Error(r(476));var i=jh(e).queue;bh(e,i,t,K,l===null?Cy:function(){return Sh(e),l(n)})}function jh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$l,lastRenderedState:K},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 Sh(e){var t=jh(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},Xt())}function xr(){return bt(qs)}function Nh(){return at().memoizedState}function wh(){return at().memoizedState}function Dy(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&&(Lt(n,t,l),vs(n,t,l)),t={cache:Jo()},e.payload=t;return}t=t.return}}function My(e,t,l){var n=Xt();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ji(e)?Eh(t,l):(l=Uo(e,t,l,n),l!==null&&(Lt(l,e,n),kh(l,t,n)))}function Th(e,t,l){var n=Xt();Ns(e,t,l,n)}function Ns(e,t,l,n){var i={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ji(e))Eh(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 Ai(e,t,i,0),He===null&&ki(),!1}catch{}finally{}if(l=Uo(e,t,i,n),l!==null)return Lt(l,e,n),kh(l,t,n),!0}return!1}function br(e,t,l,n){if(n={lane:2,revertLane:Pr(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ji(e)){if(t)throw Error(r(479))}else t=Uo(e,l,n,2),t!==null&&Lt(t,e,2)}function Ji(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function Eh(e,t){Sa=Gi=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function kh(e,t,l){if((l&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,Dd(e,l)}}var ws={readContext:bt,use:Vi,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useLayoutEffect:Fe,useInsertionEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useSyncExternalStore:Fe,useId:Fe,useHostTransitionStatus:Fe,useFormState:Fe,useActionState:Fe,useOptimistic:Fe,useMemoCache:Fe,useCacheRefresh:Fe};ws.useEffectEvent=Fe;var Ah={readContext:bt,use:Vi,useCallback:function(e,t){return kt().memoizedState=[e,t===void 0?null:t],e},useContext:bt,useEffect:fh,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Zi(4194308,4,_h.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=My.bind(null,fe,e),[n.memoizedState,e]},useRef:function(e){var t=kt();return e={current:e},t.memoizedState=e},useState:function(e){e=mr(e);var t=e.queue,l=Th.bind(null,fe,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:gr,useDeferredValue:function(e,t){var l=kt();return yr(l,e,t)},useTransition:function(){var e=mr(!1);return e=bh.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(),He===null)throw Error(r(349));(Se&127)!==0||Ff(n,t,l)}i.memoizedState=l;var c={value:l,getSnapshot:t};return i.queue=c,fh(If.bind(null,n,c,e),[e]),n.flags|=2048,wa(9,{destroy:void 0},Wf.bind(null,n,c,l,t),null),l},useId:function(){var e=kt(),t=He.identifierPrefix;if(Te){var l=vl,n=yl;l=(n&~(1<<32-Bt(n)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Qi++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Ty++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:xr,useFormState:ch,useActionState:ch,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=br.bind(null,fe,!0,l),l.dispatch=t,[e,t]},useMemoCache:dr,useCacheRefresh:function(){return kt().memoizedState=Dy.bind(null,fe)},useEffectEvent:function(e){var t=kt(),l={impl:e};return t.memoizedState=l,function(){if((Ce&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},jr={readContext:bt,use:Vi,useCallback:yh,useContext:bt,useEffect:_r,useImperativeHandle:gh,useInsertionEffect:mh,useLayoutEffect:ph,useMemo:vh,useReducer:Xi,useRef:dh,useState:function(){return Xi($l)},useDebugValue:gr,useDeferredValue:function(e,t){var l=at();return xh(l,ze.memoizedState,e,t)},useTransition:function(){var e=Xi($l)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Ss(e),t]},useSyncExternalStore:Jf,useId:Nh,useHostTransitionStatus:xr,useFormState:oh,useActionState:oh,useOptimistic:function(e,t){var l=at();return th(l,ze,e,t)},useMemoCache:dr,useCacheRefresh:wh};jr.useEffectEvent=hh;var Rh={readContext:bt,use:Vi,useCallback:yh,useContext:bt,useEffect:_r,useImperativeHandle:gh,useInsertionEffect:mh,useLayoutEffect:ph,useMemo:vh,useReducer:hr,useRef:dh,useState:function(){return hr($l)},useDebugValue:gr,useDeferredValue:function(e,t){var l=at();return ze===null?yr(l,e,t):xh(l,ze.memoizedState,e,t)},useTransition:function(){var e=hr($l)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Ss(e),t]},useSyncExternalStore:Jf,useId:Nh,useHostTransitionStatus:xr,useFormState:uh,useActionState:uh,useOptimistic:function(e,t){var l=at();return ze!==null?th(l,ze,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:dr,useCacheRefresh:wh};Rh.useEffectEvent=hh;function Sr(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 Nr={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&&(Lt(t,e,n),vs(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&&(Lt(t,e,n),vs(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&&(Lt(t,e,l),vs(t,e,l))}};function Ch(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?!ds(l,n)||!ds(i,c):!0}function Dh(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&&Nr.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 Mh(e){Ei(e)}function $h(e){console.error(e)}function Lh(e){Ei(e)}function Fi(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Oh(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 wr(e,t,l){return l=nn(l),l.tag=3,l.payload={element:null},l.callback=function(){Fi(e,t)},l}function zh(e){return e=nn(e),e.tag=3,e}function Uh(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(){Oh(t,l,n)}}var f=l.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){Oh(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 $y(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?oc():l.alternate===null&&We===0&&(We=3),l.flags&=-257,l.flags|=65536,l.lanes=i,n===zi?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([n]):t.add(n),Fr(e,n,i)),!1;case 22:return l.flags|=65536,n===zi?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)),Fr(e,n,i)),!1}throw Error(r(435,l.tag))}return Fr(e,n,i),oc(),!1}if(Te)return t=Gt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==Yo&&(e=Error(r(422),{cause:n}),ms(It(e,l)))):(n!==Yo&&(t=Error(r(423),{cause:n}),ms(It(t,l))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=It(n,l),i=wr(e.stateNode,n,i),tr(e,i),We!==4&&(We=2)),!1;var c=Error(r(520),{cause:n});if(c=It(c,l),Ms===null?Ms=[c]:Ms.push(c),We!==4&&(We=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=wr(l.stateNode,n,e),tr(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=zh(i),Uh(i,e,l,n),tr(l,i),!1}l=l.return}while(l!==null);return!1}var Tr=Error(r(461)),ut=!1;function jt(e,t,l,n){t.child=e===null?Gf(t,null,l,n):Bn(t,e.child,l,n)}function Bh(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=cr(e,t,l,f,c,i),_=or(),e!==null&&!ut?(rr(e,t,i),Ll(e,t,i)):(Te&&_&&Go(t),t.flags|=1,jt(e,t,n,i),t.child)}function Hh(e,t,l,n,i){if(e===null){var c=l.type;return typeof c=="function"&&!Bo(c)&&c.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=c,qh(e,t,c,n,i)):(e=Ci(l.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!$r(e,i)){var f=c.memoizedProps;if(l=l.compare,l=l!==null?l:ds,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 qh(e,t,l,n,i){if(e!==null){var c=e.memoizedProps;if(ds(c,n)&&e.ref===t.ref)if(ut=!1,t.pendingProps=n=c,$r(e,i))(e.flags&131072)!==0&&(ut=!0);else return t.lanes=e.lanes,Ll(e,t,i)}return Er(e,t,l,n,i)}function Gh(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 Qh(e,t,c,l,n)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Li(t,c!==null?c.cachePool:null),c!==null?Vf(t,c):nr(),Xf(t);else return n=t.lanes=536870912,Qh(e,t,c!==null?c.baseLanes|l:l,l,n)}else c!==null?(Li(t,c.cachePool),Vf(t,c),cn(),t.memoizedState=null):(e!==null&&Li(t,null),nr(),cn());return jt(e,t,i,l),t.child}function Ts(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Qh(e,t,l,n,i){var c=Wo();return c=c===null?null:{parent:ot._currentValue,pool:c},t.memoizedState={baseLanes:l,cachePool:c},e!==null&&Li(t,null),nr(),Xf(t),e!==null&&ga(e,t,n,!0),t.childLanes=i,null}function Wi(e,t){return t=Pi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Yh(e,t,l){return Bn(t,e.child,null,l),e=Wi(t,t.pendingProps),e.flags|=2,Qt(t),t.memoizedState=null,e}function Ly(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=Wi(t,n),t.lanes=536870912,Ts(null,e);if(sr(t),(e=Qe)?(e=lp(e,tl),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Il!==null?{id:yl,overflow:vl}:null,retryLane:536870912,hydrationErrors:null},l=Ef(e),l.return=t,t.child=l,xt=t,Qe=null)):e=null,e===null)throw en(t);return t.lanes=536870912,null}return Wi(t,n)}var c=e.memoizedState;if(c!==null){var f=c.dehydrated;if(sr(t),i)if(t.flags&256)t.flags&=-257,t=Yh(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=He,n!==null&&(f=Md(n,l),f!==0&&f!==c.retryLane))throw c.retryLane=f,Cn(e,f),Lt(n,e,f),Tr;oc(),t=Yh(e,t,l)}else e=c.treeContext,Qe=nl(f.nextSibling),xt=t,Te=!0,Pl=null,tl=!1,e!==null&&Rf(t,e),t=Wi(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 Ii(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 Er(e,t,l,n,i){return Ln(t),l=cr(e,t,l,n,void 0,i),n=or(),e!==null&&!ut?(rr(e,t,i),Ll(e,t,i)):(Te&&n&&Go(t),t.flags|=1,jt(e,t,l,i),t.child)}function Vh(e,t,l,n,i,c){return Ln(t),t.updateQueue=null,l=Kf(t,n,l,i),Zf(e),n=or(),e!==null&&!ut?(rr(e,t,c),Ll(e,t,c)):(Te&&n&&Go(t),t.flags|=1,jt(e,t,l,c),t.child)}function Xh(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=Nr,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=n,c.state=t.memoizedState,c.refs={},Po(t),f=l.contextType,c.context=typeof f=="object"&&f!==null?bt(f):ha,c.state=t.memoizedState,f=l.getDerivedStateFromProps,typeof f=="function"&&(Sr(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&&Nr.enqueueReplaceState(c,c.state,null),bs(t,n,c,i),xs(),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 R=c.context,z=l.contextType;f=ha,typeof z=="object"&&z!==null&&(f=bt(z));var H=l.getDerivedStateFromProps;z=typeof H=="function"||typeof c.getSnapshotBeforeUpdate=="function",_=t.pendingProps!==_,z||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(_||R!==f)&&Dh(t,c,n,f),ln=!1;var C=t.memoizedState;c.state=C,bs(t,n,c,i),xs(),R=t.memoizedState,_||C!==R||ln?(typeof H=="function"&&(Sr(t,l,H,n),R=t.memoizedState),(j=ln||Ch(t,l,j,n,C,R,f))?(z||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=R),c.props=n,c.state=R,c.context=f,n=j):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,er(e,t),f=t.memoizedProps,z=qn(l,f),c.props=z,H=t.pendingProps,C=c.context,R=l.contextType,j=ha,typeof R=="object"&&R!==null&&(j=bt(R)),_=l.getDerivedStateFromProps,(R=typeof _=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(f!==H||C!==j)&&Dh(t,c,n,j),ln=!1,C=t.memoizedState,c.state=C,bs(t,n,c,i),xs();var M=t.memoizedState;f!==H||C!==M||ln||e!==null&&e.dependencies!==null&&Mi(e.dependencies)?(typeof _=="function"&&(Sr(t,l,_,n),M=t.memoizedState),(z=ln||Ch(t,l,z,n,C,M,j)||e!==null&&e.dependencies!==null&&Mi(e.dependencies))?(R||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,M,j),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,M,j)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||f===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=M),c.props=n,c.state=M,c.context=j,n=z):(typeof c.componentDidUpdate!="function"||f===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),n=!1)}return c=n,Ii(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 kr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ar(e){return{baseLanes:e,cachePool:Of()}}function Rr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Vt),e}function Kh(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=Qe)?(e=lp(e,tl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Il!==null?{id:yl,overflow:vl}:null,retryLane:536870912,hydrationErrors:null},l=Ef(e),l.return=t,t.child=l,xt=t,Qe=null)):e=null,e===null)throw en(t);return fu(e)?t.lanes=32:t.lanes=536870912,null}var _=n.children;return n=n.fallback,i?(cn(),i=t.mode,_=Pi({mode:"hidden",children:_},i),n=Dn(n,i,l,null),_.return=t,n.return=t,_.sibling=n,t.child=_,n=t.child,n.memoizedState=Ar(l),n.childLanes=Rr(e,f,l),t.memoizedState=kr,Ts(null,n)):(sn(t),Cr(t,_))}var j=e.memoizedState;if(j!==null&&(_=j.dehydrated,_!==null)){if(c)t.flags&256?(sn(t),t.flags&=-257,t=Dr(e,t,l)):t.memoizedState!==null?(cn(),t.child=e.child,t.flags|=128,t=null):(cn(),_=n.fallback,i=t.mode,n=Pi({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=Ar(l),n.childLanes=Rr(e,f,l),t.memoizedState=kr,t=Ts(null,n));else if(sn(t),fu(_)){if(f=_.nextSibling&&_.nextSibling.dataset,f)var R=f.dgst;f=R,n=Error(r(419)),n.stack="",n.digest=f,ms({value:n,source:null,stack:null}),t=Dr(e,t,l)}else if(ut||ga(e,t,l,!1),f=(l&e.childLanes)!==0,ut||f){if(f=He,f!==null&&(n=Md(f,l),n!==0&&n!==j.retryLane))throw j.retryLane=n,Cn(e,n),Lt(f,e,n),Tr;du(_)||oc(),t=Dr(e,t,l)}else du(_)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,Qe=nl(_.nextSibling),xt=t,Te=!0,Pl=null,tl=!1,e!==null&&Rf(t,e),t=Cr(t,n.children),t.flags|=4096);return t}return i?(cn(),_=n.fallback,i=t.mode,j=e.child,R=j.sibling,n=Al(j,{mode:"hidden",children:n.children}),n.subtreeFlags=j.subtreeFlags&65011712,R!==null?_=Al(R,_):(_=Dn(_,i,l,null),_.flags|=2),_.return=t,n.return=t,n.sibling=_,t.child=n,Ts(null,n),n=t.child,_=e.child.memoizedState,_===null?_=Ar(l):(i=_.cachePool,i!==null?(j=ot._currentValue,i=i.parent!==j?{parent:j,pool:j}:i):i=Of(),_={baseLanes:_.baseLanes|l,cachePool:i}),n.memoizedState=_,n.childLanes=Rr(e,f,l),t.memoizedState=kr,Ts(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 Cr(e,t){return t=Pi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Pi(e,t){return e=qt(22,e,null,t),e.lanes=0,e}function Dr(e,t,l){return Bn(t,e.child,null,l),e=Cr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Jh(e,t,l){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Zo(e.return,t,l)}function Mr(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 Fh(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?hs:0,!_&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Jh(e,l,t);else if(e.tag===19)Jh(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&&qi(e)===null&&(i=l),l=l.sibling;l=i,l===null?(i=t.child,t.child=null):(i=l.sibling,l.sibling=null),Mr(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&&qi(e)===null){t.child=i;break}e=i.sibling,i.sibling=l,l=i,i=e}Mr(t,!0,l,null,c,n);break;case"together":Mr(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 $r(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Mi(e)))}function Oy(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:Ia(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,sr(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?Kh(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 Fh(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,Gh(e,t,l,t.pendingProps);case 24:tn(t,ot,e.memoizedState.cache)}return Ll(e,t,l)}function Wh(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)ut=!0;else{if(!$r(e,l)&&(t.flags&128)===0)return ut=!1,Oy(e,t,l);ut=(e.flags&131072)!==0}else ut=!1,Te&&(t.flags&1048576)!==0&&Af(t,hs,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")Bo(e)?(n=qn(e,n),t.tag=1,t=Xh(null,t,e,n,l)):(t.tag=0,t=Er(null,t,e,n,l));else{if(e!=null){var i=e.$$typeof;if(i===I){t.tag=11,t=Bh(null,t,e,n,l);break e}else if(i===Z){t.tag=14,t=Hh(null,t,e,n,l);break e}}throw t=ne(e)||e,Error(r(306,t,""))}}return t;case 0:return Er(e,t,t.type,t.pendingProps,l);case 1:return n=t.type,i=qn(n,t.pendingProps),Xh(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,er(e,t),bs(t,n,null,l);var f=t.memoizedState;if(n=f.cache,tn(t,ot,n),n!==c.cache&&Ko(t,[ot],l,!0),xs(),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),ms(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(Qe=nl(e.firstChild),xt=t,Te=!0,Pl=null,tl=!0,l=Gf(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 Ii(e,t),e===null?(l=op(t.type,null,t.pendingProps,null))?t.memoizedState=l:Te||(l=t.type,e=t.pendingProps,n=pc(ve.current).createElement(l),n[vt]=t,n[At]=e,St(n,l,e),pt(n),t.stateNode=n):t.memoizedState=op(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ia(t),e===null&&Te&&(n=t.stateNode=sp(t.type,t.pendingProps,ve.current),xt=t,tl=!0,i=Qe,pn(t.type)?(hu=i,Qe=nl(n.firstChild)):Qe=i),jt(e,t,t.pendingProps.children,l),Ii(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((i=n=Qe)&&(n=fv(n,t.type,t.pendingProps,tl),n!==null?(t.stateNode=n,xt=t,Qe=nl(n.firstChild),tl=!1,i=!0):i=!1),i||en(t)),Ia(t),i=t.type,c=t.pendingProps,f=e!==null?e.memoizedProps:null,n=c.children,ou(i,c)?n=null:f!==null&&ou(i,f)&&(t.flags|=32),t.memoizedState!==null&&(i=cr(e,t,Ey,null,null,l),qs._currentValue=i),Ii(e,t),jt(e,t,n,l),t.child;case 6:return e===null&&Te&&((e=l=Qe)&&(l=hv(l,t.pendingProps,tl),l!==null?(t.stateNode=l,xt=t,Qe=null,e=!0):e=!1),e||en(t)),null;case 13:return Kh(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 Bh(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 Hh(e,t,t.type,t.pendingProps,l);case 15:return qh(e,t,t.type,t.pendingProps,l);case 19:return Fh(e,t,l);case 31:return Ly(e,t,l);case 22:return Gh(e,t,l,t.pendingProps);case 24:return Ln(t),n=bt(ot),e===null?(i=Wo(),i===null&&(i=He,c=Jo(),i.pooledCache=c,c.refCount++,c!==null&&(i.pooledCacheLanes|=l),i=c),t.memoizedState={parent:n,cache:i},Po(t),tn(t,ot,i)):((e.lanes&l)!==0&&(er(e,t),bs(t,null,null,l),xs()),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&&Ko(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 Lr(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(Nm())e.flags|=8192;else throw Un=zi,Io}else e.flags&=-16777217}function Ih(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!hp(t))if(Nm())e.flags|=8192;else throw Un=zi,Io}function ec(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Rd():536870912,e.lanes|=t,Aa|=t)}function Es(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 Ye(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 zy(e,t,l){var n=t.pendingProps;switch(Qo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return Ye(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,Vo())),Ye(t),null;case 26:var i=t.type,c=t.memoizedState;return e===null?(Ol(t),c!==null?(Ye(t),Ih(t,c)):(Ye(t),Lr(t,i,null,n,l))):c?c!==e.memoizedState?(Ol(t),Ye(t),Ih(t,c)):(Ye(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Ol(t),Ye(t),Lr(t,i,e,n,l)),null;case 27:if(di(t),l=ve.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 Ye(t),null}e=ee.current,_a(t)?Cf(t):(e=sp(i,n,l),t.stateNode=e,Ol(t))}return Ye(t),null;case 5:if(di(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 Ye(t),null}if(c=ee.current,_a(t))Cf(t);else{var f=pc(ve.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[vt]=t,c[At]=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 Ye(t),Lr(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=ve.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[vt]=t,e=!!(e.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||Km(e.nodeValue,l)),e||en(t,!0)}else e=pc(e).createTextNode(n),e[vt]=t,t.stateNode=e}return Ye(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[vt]=t}else Mn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),e=!1}else l=Vo(),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 Ye(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[vt]=t}else Mn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),i=!1}else i=Vo(),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),ec(t,t.updateQueue),Ye(t),null);case 4:return lt(),e===null&&nu(t.stateNode.containerInfo),Ye(t),null;case 10:return Dl(t.type),Ye(t),null;case 19:if(L(nt),n=t.memoizedState,n===null)return Ye(t),null;if(i=(t.flags&128)!==0,c=n.rendering,c===null)if(i)Es(n,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=qi(e),c!==null){for(t.flags|=128,Es(n,!1),e=c.updateQueue,t.updateQueue=e,ec(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Tf(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()>sc&&(t.flags|=128,i=!0,Es(n,!1),t.lanes=4194304)}else{if(!i)if(e=qi(c),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,ec(t,e),Es(n,!0),n.tail===null&&n.tailMode==="hidden"&&!c.alternate&&!Te)return Ye(t),null}else 2*zt()-n.renderingStartTime>sc&&l!==536870912&&(t.flags|=128,i=!0,Es(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):(Ye(t),null);case 22:case 23:return Qt(t),ar(),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&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),l=t.updateQueue,l!==null&&ec(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&&L(On),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Dl(ot),Ye(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Uy(e,t){switch(Qo(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 di(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 L(nt),null;case 4:return lt(),null;case 10:return Dl(t.type),null;case 22:case 23:return Qt(t),ar(),e!==null&&L(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 Ph(e,t){switch(Qo(t),t.tag){case 3:Dl(ot),lt();break;case 26:case 27:case 5:di(t);break;case 4:lt();break;case 31:t.memoizedState!==null&&Qt(t);break;case 13:Qt(t);break;case 19:L(nt);break;case 10:Dl(t.type);break;case 22:case 23:Qt(t),ar(),e!==null&&L(On);break;case 24:Dl(ot)}}function ks(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(_){Le(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,R=_;try{R()}catch(z){Le(i,j,z)}}}n=n.next}while(n!==c)}}catch(z){Le(t,t.return,z)}}function em(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Yf(t,l)}catch(n){Le(e,e.return,n)}}}function tm(e,t,l){l.props=qn(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(n){Le(e,t,n)}}function As(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){Le(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){Le(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){Le(e,t,i)}else l.current=null}function lm(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){Le(e,e.return,i)}}function Or(e,t,l){try{var n=e.stateNode;iv(n,e.type,l,t),n[At]=t}catch(i){Le(e,e.return,i)}}function nm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&pn(e.type)||e.tag===4}function zr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nm(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 Ur(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(Ur(e,t,l),e=e.sibling;e!==null;)Ur(e,t,l),e=e.sibling}function tc(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(tc(e,t,l),e=e.sibling;e!==null;)tc(e,t,l),e=e.sibling}function am(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[vt]=e,t[At]=l}catch(c){Le(e,e.return,c)}}var zl=!1,dt=!1,Br=!1,sm=typeof WeakSet=="function"?WeakSet:Set,_t=null;function By(e,t){if(e=e.containerInfo,iu=jc,e=gf(e),Do(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,R=0,z=0,H=e,C=null;t:for(;;){for(var M;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),(M=H.firstChild)!==null;)C=H,H=M;for(;;){if(H===e)break t;if(C===l&&++R===i&&(_=f),C===c&&++z===n&&(j=f),(M=H.nextSibling)!==null)break;H=C,C=H.parentNode}H=M}l=_===-1||j===-1?null:{start:_,end:j}}else l=null}l=l||{start:0,end:0}}else l=null;for(cu={focusedElem:e,selectionRange:l},jc=!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 F=qn(l.type,i);e=n.getSnapshotBeforeUpdate(F,c),n.__reactInternalSnapshotBeforeUpdate=e}catch(ie){Le(l,l.return,ie)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)uu(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":uu(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 im(e,t,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:Bl(e,l),n&4&&ks(5,l);break;case 1:if(Bl(e,l),n&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(f){Le(l,l.return,f)}else{var i=qn(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){Le(l,l.return,f)}}n&64&&em(l),n&512&&As(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{Yf(e,t)}catch(f){Le(l,l.return,f)}}break;case 27:t===null&&n&4&&am(l);case 26:case 5:Bl(e,l),t===null&&n&4&&lm(l),n&512&&As(l,l.return);break;case 12:Bl(e,l);break;case 31:Bl(e,l),n&4&&rm(e,l);break;case 13:Bl(e,l),n&4&&um(e,l),n&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Ky.bind(null,l),mv(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 cm(e){var t=e.alternate;t!==null&&(e.alternate=null,cm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&po(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 Ve=null,Ct=!1;function Ul(e,t,l){for(l=l.child;l!==null;)om(e,t,l),l=l.sibling}function om(e,t,l){if(Ut&&typeof Ut.onCommitFiberUnmount=="function")try{Ut.onCommitFiberUnmount(Pa,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=Ve,i=Ct;pn(l.type)&&(Ve=l.stateNode,Ct=!1),Ul(e,t,l),Us(l.stateNode),Ve=n,Ct=i;break;case 5:dt||xl(l,t);case 6:if(n=Ve,i=Ct,Ve=null,Ul(e,t,l),Ve=n,Ct=i,Ve!==null)if(Ct)try{(Ve.nodeType===9?Ve.body:Ve.nodeName==="HTML"?Ve.ownerDocument.body:Ve).removeChild(l.stateNode)}catch(c){Le(l,t,c)}else try{Ve.removeChild(l.stateNode)}catch(c){Le(l,t,c)}break;case 18:Ve!==null&&(Ct?(e=Ve,ep(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),za(e)):ep(Ve,l.stateNode));break;case 4:n=Ve,i=Ct,Ve=l.stateNode.containerInfo,Ct=!0,Ul(e,t,l),Ve=n,Ct=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"&&tm(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 rm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{za(e)}catch(l){Le(t,t.return,l)}}}function um(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){Le(t,t.return,l)}}function Hy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new sm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new sm),t;default:throw Error(r(435,e.tag))}}function lc(e,t){var l=Hy(e);t.forEach(function(n){if(!l.has(n)){l.add(n);var i=Jy.bind(null,e,n);n.then(i,i)}})}function Dt(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)){Ve=_.stateNode,Ct=!1;break e}break;case 5:Ve=_.stateNode,Ct=!1;break e;case 3:case 4:Ve=_.stateNode.containerInfo,Ct=!0;break e}_=_.return}if(Ve===null)throw Error(r(160));om(c,f,i),Ve=null,Ct=!1,c=i.alternate,c!==null&&(c.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)dm(t,e),t=t.sibling}var ul=null;function dm(e,t){var l=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Dt(t,e),Mt(e),n&4&&(on(3,e,e.return),ks(3,e),on(5,e,e.return));break;case 1:Dt(t,e),Mt(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(Dt(t,e),Mt(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[ls]||c[vt]||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[vt]=e,pt(c),n=c;break e;case"link":var f=dp("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=dp("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[vt]=e,pt(c),n=c}e.stateNode=n}else fp(i,e.type,e.stateNode);else e.stateNode=up(i,n,e.memoizedProps);else c!==n?(c===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):c.count--,n===null?fp(i,e.type,e.stateNode):up(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Or(e,e.memoizedProps,l.memoizedProps)}break;case 27:Dt(t,e),Mt(e),n&512&&(dt||l===null||xl(l,l.return)),l!==null&&n&4&&Or(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Dt(t,e),Mt(e),n&512&&(dt||l===null||xl(l,l.return)),e.flags&32){i=e.stateNode;try{ia(i,"")}catch(F){Le(e,e.return,F)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,Or(e,i,l!==null?l.memoizedProps:i)),n&1024&&(Br=!0);break;case 6:if(Dt(t,e),Mt(e),n&4){if(e.stateNode===null)throw Error(r(162));n=e.memoizedProps,l=e.stateNode;try{l.nodeValue=n}catch(F){Le(e,e.return,F)}}break;case 3:if(yc=null,i=ul,ul=_c(t.containerInfo),Dt(t,e),ul=i,Mt(e),n&4&&l!==null&&l.memoizedState.isDehydrated)try{za(t.containerInfo)}catch(F){Le(e,e.return,F)}Br&&(Br=!1,fm(e));break;case 4:n=ul,ul=_c(e.stateNode.containerInfo),Dt(t,e),Mt(e),ul=n;break;case 12:Dt(t,e),Mt(e);break;case 31:Dt(t,e),Mt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,lc(e,n)));break;case 13:Dt(t,e),Mt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(ac=zt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,lc(e,n)));break;case 22:i=e.memoizedState!==null;var j=l!==null&&l.memoizedState!==null,R=zl,z=dt;if(zl=R||i,dt=z||j,Dt(t,e),dt=z,zl=R,Mt(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,C=H!=null&&H.hasOwnProperty("display")?H.display:null;_.style.display=C==null||typeof C=="boolean"?"":(""+C).trim()}}catch(F){Le(j,j.return,F)}}}else if(t.tag===6){if(l===null){j=t;try{j.stateNode.nodeValue=i?"":j.memoizedProps}catch(F){Le(j,j.return,F)}}}else if(t.tag===18){if(l===null){j=t;try{var M=j.stateNode;i?tp(M,!0):tp(j.stateNode,!1)}catch(F){Le(j,j.return,F)}}}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,lc(e,l))));break;case 19:Dt(t,e),Mt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,lc(e,n)));break;case 30:break;case 21:break;default:Dt(t,e),Mt(e)}}function Mt(e){var t=e.flags;if(t&2){try{for(var l,n=e.return;n!==null;){if(nm(n)){l=n;break}n=n.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var i=l.stateNode,c=zr(e);tc(e,c,i);break;case 5:var f=l.stateNode;l.flags&32&&(ia(f,""),l.flags&=-33);var _=zr(e);tc(e,_,f);break;case 3:case 4:var j=l.stateNode.containerInfo,R=zr(e);Ur(e,R,j);break;default:throw Error(r(161))}}catch(z){Le(e,e.return,z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;fm(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;)im(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"&&tm(t,t.return,l),Gn(t);break;case 27:Us(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),ks(4,c);break;case 1:if(Hl(i,c,l),n=c,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(R){Le(n,n.return,R)}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++)Qf(j[i],_)}catch(R){Le(n,n.return,R)}}l&&f&64&&em(c),As(c,c.return);break;case 27:am(c);case 26:case 5:Hl(i,c,l),l&&n===null&&f&4&&lm(c),As(c,c.return);break;case 12:Hl(i,c,l);break;case 31:Hl(i,c,l),l&&f&4&&rm(i,c);break;case 13:Hl(i,c,l),l&&f&4&&um(i,c);break;case 22:c.memoizedState===null&&Hl(i,c,l),As(c,c.return);break;case 30:break;default:Hl(i,c,l)}t=t.sibling}}function Hr(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&&ps(l))}function qr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ps(e))}function dl(e,t,l,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)hm(e,t,l,n),t=t.sibling}function hm(e,t,l,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:dl(e,t,l,n),i&2048&&ks(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&&ps(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){Le(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):Rs(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&&Hr(f,t);break;case 24:dl(e,t,l,n),i&2048&&qr(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,R=f.flags;switch(f.tag){case 0:case 11:case 15:Ta(c,f,_,j,i),ks(8,f);break;case 23:break;case 22:var z=f.stateNode;f.memoizedState!==null?z._visibility&2?Ta(c,f,_,j,i):Rs(c,f):(z._visibility|=2,Ta(c,f,_,j,i)),i&&R&2048&&Hr(f.alternate,f);break;case 24:Ta(c,f,_,j,i),i&&R&2048&&qr(f.alternate,f);break;default:Ta(c,f,_,j,i)}t=t.sibling}}function Rs(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:Rs(l,n),i&2048&&Hr(n.alternate,n);break;case 24:Rs(l,n),i&2048&&qr(n.alternate,n);break;default:Rs(l,n)}t=t.sibling}}var Cs=8192;function Ea(e,t,l){if(e.subtreeFlags&Cs)for(e=e.child;e!==null;)mm(e,t,l),e=e.sibling}function mm(e,t,l){switch(e.tag){case 26:Ea(e,t,l),e.flags&Cs&&e.memoizedState!==null&&Tv(l,ul,e.memoizedState,e.memoizedProps);break;case 5:Ea(e,t,l);break;case 3:case 4:var n=ul;ul=_c(e.stateNode.containerInfo),Ea(e,t,l),ul=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Cs,Cs=16777216,Ea(e,t,l),Cs=n):Ea(e,t,l));break;default:Ea(e,t,l)}}function pm(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 Ds(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,gm(n,e)}pm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_m(e),e=e.sibling}function _m(e){switch(e.tag){case 0:case 11:case 15:Ds(e),e.flags&2048&&on(9,e,e.return);break;case 3:Ds(e);break;case 12:Ds(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,nc(e)):Ds(e);break;default:Ds(e)}}function nc(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,gm(n,e)}pm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:on(8,t,t.return),nc(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,nc(t));break;default:nc(t)}e=e.sibling}}function gm(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:ps(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(cm(n),n===l){_t=null;break e}if(i!==null){i.return=c,_t=i;break e}_t=c}}}var qy={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}},Gy=typeof WeakMap=="function"?WeakMap:Map,Ce=0,He=null,xe=null,Se=0,$e=0,Yt=null,rn=!1,ka=!1,Gr=!1,ql=0,We=0,un=0,Qn=0,Qr=0,Vt=0,Aa=0,Ms=null,$t=null,Yr=!1,ac=0,ym=0,sc=1/0,ic=null,dn=null,ht=0,fn=null,Ra=null,Gl=0,Vr=0,Xr=null,vm=null,$s=0,Zr=null;function Xt(){return(Ce&2)!==0&&Se!==0?Se&-Se:D.T!==null?Pr():$d()}function xm(){if(Vt===0)if((Se&536870912)===0||Te){var e=mi;mi<<=1,(mi&3932160)===0&&(mi=262144),Vt=e}else Vt=536870912;return e=Gt.current,e!==null&&(e.flags|=32),Vt}function Lt(e,t,l){(e===He&&($e===2||$e===9)||e.cancelPendingCommit!==null)&&(Ca(e,0),hn(e,Se,Vt,!1)),ts(e,l),((Ce&2)===0||e!==He)&&(e===He&&((Ce&2)===0&&(Qn|=l),We===4&&hn(e,Se,Vt,!1)),bl(e))}function bm(e,t,l){if((Ce&6)!==0)throw Error(r(327));var n=!l&&(t&127)===0&&(t&e.expiredLanes)===0||es(e,t),i=n?Vy(e,t):Jr(e,t,!0),c=n;do{if(i===0){ka&&!n&&hn(e,t,0,!1);break}else{if(l=e.current.alternate,c&&!Qy(l)){i=Jr(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=Ms;var j=_.current.memoizedState.isDehydrated;if(j&&(Ca(_,f).flags|=256),f=Jr(_,f,!1),f!==2){if(Gr&&!j){_.errorRecoveryDisabledLanes|=c,Qn|=c,i=4;break e}c=$t,$t=i,c!==null&&($t===null?$t=c:$t.push.apply($t,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:$t=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(i=ac+300-zt(),10<i)){if(hn(n,t,Vt,!rn),_i(n,0,!0)!==0)break e;Gl=t,n.timeoutHandle=Im(jm.bind(null,n,l,$t,ic,Yr,t,Vt,Qn,Aa,rn,c,"Throttled",-0,0),i);break e}jm(n,l,$t,ic,Yr,t,Vt,Qn,Aa,rn,c,null,-0,0)}}break}while(!0);bl(e)}function jm(e,t,l,n,i,c,f,_,j,R,z,H,C,M){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},mm(t,c,H);var F=(c&62914560)===c?ac-zt():(c&4194048)===c?ym-zt():0;if(F=Ev(H,F),F!==null){Gl=c,e.cancelPendingCommit=F(Rm.bind(null,e,t,c,l,n,i,f,_,j,z,H,null,C,M)),hn(e,c,f,!R);return}}Rm(e,t,c,l,n,i,f,_,j)}function Qy(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&=~Qr,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&&Cd(e,l,t)}function cc(){return(Ce&6)===0?(Ls(0),!1):!0}function Kr(){if(xe!==null){if($e===0)var e=xe.return;else e=xe,Cl=$n=null,ur(e),ba=null,gs=0,e=xe;for(;e!==null;)Ph(e.alternate,e),e=e.return;xe=null}}function Ca(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,rv(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Gl=0,Kr(),He=e,xe=l=Al(e.current,null),Se=t,$e=0,Yt=null,rn=!1,ka=es(e,t),Gr=!1,Aa=Vt=Qr=Qn=un=We=0,$t=Ms=null,Yr=!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,ki(),l}function Sm(e,t){fe=null,D.H=ws,t===xa||t===Oi?(t=Bf(),$e=3):t===Io?(t=Bf(),$e=4):$e=t===Tr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Yt=t,xe===null&&(We=1,Fi(e,It(t,e.current)))}function Nm(){var e=Gt.current;return e===null?!0:(Se&4194048)===Se?ll===null:(Se&62914560)===Se||(Se&536870912)!==0?e===ll:!1}function wm(){var e=D.H;return D.H=ws,e===null?ws:e}function Tm(){var e=D.A;return D.A=qy,e}function oc(){We=4,rn||(Se&4194048)!==Se&&Gt.current!==null||(ka=!0),(un&134217727)===0&&(Qn&134217727)===0||He===null||hn(He,Se,Vt,!1)}function Jr(e,t,l){var n=Ce;Ce|=2;var i=wm(),c=Tm();(He!==e||Se!==t)&&(ic=null,Ca(e,t)),t=!1;var f=We;e:do try{if($e!==0&&xe!==null){var _=xe,j=Yt;switch($e){case 8:Kr(),f=6;break e;case 3:case 2:case 9:case 6:Gt.current===null&&(t=!0);var R=$e;if($e=0,Yt=null,Da(e,_,j,R),l&&ka){f=0;break e}break;default:R=$e,$e=0,Yt=null,Da(e,_,j,R)}}Yy(),f=We;break}catch(z){Sm(e,z)}while(!0);return t&&e.shellSuspendCounter++,Cl=$n=null,Ce=n,D.H=i,D.A=c,xe===null&&(He=null,Se=0,ki()),f}function Yy(){for(;xe!==null;)Em(xe)}function Vy(e,t){var l=Ce;Ce|=2;var n=wm(),i=Tm();He!==e||Se!==t?(ic=null,sc=zt()+500,Ca(e,t)):ka=es(e,t);e:do try{if($e!==0&&xe!==null){t=xe;var c=Yt;t:switch($e){case 1:$e=0,Yt=null,Da(e,t,c,1);break;case 2:case 9:if(zf(c)){$e=0,Yt=null,km(t);break}t=function(){$e!==2&&$e!==9||He!==e||($e=7),bl(e)},c.then(t,t);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:zf(c)?($e=0,Yt=null,km(t)):($e=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?hp(f):_.stateNode.complete){$e=0,Yt=null;var j=_.sibling;if(j!==null)xe=j;else{var R=_.return;R!==null?(xe=R,rc(R)):xe=null}break t}}$e=0,Yt=null,Da(e,t,c,5);break;case 6:$e=0,Yt=null,Da(e,t,c,6);break;case 8:Kr(),We=6;break e;default:throw Error(r(462))}}Xy();break}catch(z){Sm(e,z)}while(!0);return Cl=$n=null,D.H=n,D.A=i,Ce=l,xe!==null?0:(He=null,Se=0,ki(),We)}function Xy(){for(;xe!==null&&!pg();)Em(xe)}function Em(e){var t=Wh(e.alternate,e,ql);e.memoizedProps=e.pendingProps,t===null?rc(e):xe=t}function km(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Vh(l,t,t.pendingProps,t.type,void 0,Se);break;case 11:t=Vh(l,t,t.pendingProps,t.type.render,t.ref,Se);break;case 5:ur(t);default:Ph(l,t),t=xe=Tf(t,ql),t=Wh(l,t,ql)}e.memoizedProps=e.pendingProps,t===null?rc(e):xe=t}function Da(e,t,l,n){Cl=$n=null,ur(t),ba=null,gs=0;var i=t.return;try{if($y(e,i,t,l,Se)){We=1,Fi(e,It(l,e.current)),xe=null;return}}catch(c){if(i!==null)throw xe=i,c;We=1,Fi(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))),Am(t,e)):rc(t)}function rc(e){var t=e;do{if((t.flags&32768)!==0){Am(t,rn);return}e=t.return;var l=zy(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);We===0&&(We=5)}function Am(e,t){do{var l=Uy(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);We=6,xe=null}function Rm(e,t,l,n,i,c,f,_,j){e.cancelPendingCommit=null;do uc();while(ht!==0);if((Ce&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(c=t.lanes|t.childLanes,c|=zo,wg(e,l,c,f,_,j),e===He&&(xe=He=null,Se=0),Ra=t,fn=e,Gl=l,Vr=c,Xr=i,vm=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Fy(fi,function(){return Lm(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=D.T,D.T=null,i=Y.p,Y.p=2,f=Ce,Ce|=4;try{By(e,t,l)}finally{Ce=f,Y.p=i,D.T=n}}ht=1,Cm(),Dm(),Mm()}}function Cm(){if(ht===1){ht=0;var e=fn,t=Ra,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null;var n=Y.p;Y.p=2;var i=Ce;Ce|=4;try{dm(t,e);var c=cu,f=gf(e.containerInfo),_=c.focusedElem,j=c.selectionRange;if(f!==_&&_&&_.ownerDocument&&_f(_.ownerDocument.documentElement,_)){if(j!==null&&Do(_)){var R=j.start,z=j.end;if(z===void 0&&(z=R),"selectionStart"in _)_.selectionStart=R,_.selectionEnd=Math.min(z,_.value.length);else{var H=_.ownerDocument||document,C=H&&H.defaultView||window;if(C.getSelection){var M=C.getSelection(),F=_.textContent.length,ie=Math.min(j.start,F),Be=j.end===void 0?ie:Math.min(j.end,F);!M.extend&&ie>Be&&(f=Be,Be=ie,ie=f);var E=pf(_,ie),N=pf(_,Be);if(E&&N&&(M.rangeCount!==1||M.anchorNode!==E.node||M.anchorOffset!==E.offset||M.focusNode!==N.node||M.focusOffset!==N.offset)){var A=H.createRange();A.setStart(E.node,E.offset),M.removeAllRanges(),ie>Be?(M.addRange(A),M.extend(N.node,N.offset)):(A.setEnd(N.node,N.offset),M.addRange(A))}}}}for(H=[],M=_;M=M.parentNode;)M.nodeType===1&&H.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<H.length;_++){var B=H[_];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}jc=!!iu,cu=iu=null}finally{Ce=i,Y.p=n,D.T=l}}e.current=t,ht=2}}function Dm(){if(ht===2){ht=0;var e=fn,t=Ra,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=D.T,D.T=null;var n=Y.p;Y.p=2;var i=Ce;Ce|=4;try{im(e,t.alternate,t)}finally{Ce=i,Y.p=n,D.T=l}}ht=3}}function Mm(){if(ht===4||ht===3){ht=0,_g();var e=fn,t=Ra,l=Gl,n=vm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ht=5:(ht=0,Ra=fn=null,$m(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(dn=null),ho(l),t=t.stateNode,Ut&&typeof Ut.onCommitFiberRoot=="function")try{Ut.onCommitFiberRoot(Pa,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=D.T,i=Y.p,Y.p=2,D.T=null;try{for(var c=e.onRecoverableError,f=0;f<n.length;f++){var _=n[f];c(_.value,{componentStack:_.stack})}}finally{D.T=t,Y.p=i}}(Gl&3)!==0&&uc(),bl(e),i=e.pendingLanes,(l&261930)!==0&&(i&42)!==0?e===Zr?$s++:($s=0,Zr=e):$s=0,Ls(0)}}function $m(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ps(t)))}function uc(){return Cm(),Dm(),Mm(),Lm()}function Lm(){if(ht!==5)return!1;var e=fn,t=Vr;Vr=0;var l=ho(Gl),n=D.T,i=Y.p;try{Y.p=32>l?32:l,D.T=null,l=Xr,Xr=null;var c=fn,f=Gl;if(ht=0,Ra=fn=null,Gl=0,(Ce&6)!==0)throw Error(r(331));var _=Ce;if(Ce|=4,_m(c.current),hm(c,c.current,f,l),Ce=_,Ls(0,!1),Ut&&typeof Ut.onPostCommitFiberRoot=="function")try{Ut.onPostCommitFiberRoot(Pa,c)}catch{}return!0}finally{Y.p=i,D.T=n,$m(e,t)}}function Om(e,t,l){t=It(l,t),t=wr(e.stateNode,t,2),e=an(e,t,2),e!==null&&(ts(e,2),bl(e))}function Le(e,t,l){if(e.tag===3)Om(e,e,l);else for(;t!==null;){if(t.tag===3){Om(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=zh(2),n=an(t,l,2),n!==null&&(Uh(l,n,t,e),ts(n,2),bl(n));break}}t=t.return}}function Fr(e,t,l){var n=e.pingCache;if(n===null){n=e.pingCache=new Gy;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)||(Gr=!0,i.add(l),e=Zy.bind(null,e,t,l),t.then(e,e))}function Zy(e,t,l){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,He===e&&(Se&l)===l&&(We===4||We===3&&(Se&62914560)===Se&&300>zt()-ac?(Ce&2)===0&&Ca(e,0):Qr|=l,Aa===Se&&(Aa=0)),bl(e)}function zm(e,t){t===0&&(t=Rd()),e=Cn(e,t),e!==null&&(ts(e,t),bl(e))}function Ky(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),zm(e,l)}function Jy(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),zm(e,l)}function Fy(e,t){return oo(e,t)}var dc=null,Ma=null,Wr=!1,fc=!1,Ir=!1,mn=0;function bl(e){e!==Ma&&e.next===null&&(Ma===null?dc=Ma=e:Ma=Ma.next=e),fc=!0,Wr||(Wr=!0,Iy())}function Ls(e,t){if(!Ir&&fc){Ir=!0;do for(var l=!1,n=dc;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,qm(n,c))}else c=Se,c=_i(n,n===He?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(c&3)===0||es(n,c)||(l=!0,qm(n,c));n=n.next}while(l);Ir=!1}}function Wy(){Um()}function Um(){fc=Wr=!1;var e=0;mn!==0&&ov()&&(e=mn);for(var t=zt(),l=null,n=dc;n!==null;){var i=n.next,c=Bm(n,t);c===0?(n.next=null,l===null?dc=i:l.next=i,i===null&&(Ma=l)):(l=n,(e!==0||(c&3)!==0)&&(fc=!0)),n=i}ht!==0&&ht!==5||Ls(e),mn!==0&&(mn=0)}function Bm(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]=Ng(_,t)):j<=t&&(e.expiredLanes|=_),c&=~_}if(t=He,l=Se,l=_i(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,l===0||e===t&&($e===2||$e===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&ro(n),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||es(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(n!==null&&ro(n),ho(l)){case 2:case 8:l=kd;break;case 32:l=fi;break;case 268435456:l=Ad;break;default:l=fi}return n=Hm.bind(null,e),l=oo(l,n),e.callbackPriority=t,e.callbackNode=l,t}return n!==null&&n!==null&&ro(n),e.callbackPriority=2,e.callbackNode=null,2}function Hm(e,t){if(ht!==0&&ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(uc()&&e.callbackNode!==l)return null;var n=Se;return n=_i(e,e===He?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(bm(e,n,t),Bm(e,zt()),e.callbackNode!=null&&e.callbackNode===l?Hm.bind(null,e):null)}function qm(e,t){if(uc())return null;bm(e,t,!0)}function Iy(){uv(function(){(Ce&6)!==0?oo(Ed,Wy):Um()})}function Pr(){if(mn===0){var e=ya;e===0&&(e=hi,hi<<=1,(hi&261888)===0&&(hi=256)),mn=e}return mn}function Gm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:xi(""+e)}function Qm(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 Py(e,t,l,n,i){if(t==="submit"&&l&&l.stateNode===i){var c=Gm((i[At]||null).action),f=n.submitter;f&&(t=(t=f[At]||null)?Gm(t.formAction):f.getAttribute("formAction"),t!==null&&(c=t,f=null));var _=new Ni("action","action",null,n,i);e.push({event:_,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(mn!==0){var j=f?Qm(i,f):new FormData(i);vr(l,{pending:!0,data:j,method:i.method,action:c},null,j)}}else typeof c=="function"&&(_.preventDefault(),j=f?Qm(i,f):new FormData(i),vr(l,{pending:!0,data:j,method:i.method,action:c},c,j))},currentTarget:i}]})}}for(var eu=0;eu<Oo.length;eu++){var tu=Oo[eu],ev=tu.toLowerCase(),tv=tu[0].toUpperCase()+tu.slice(1);rl(ev,"on"+tv)}rl(xf,"onAnimationEnd"),rl(bf,"onAnimationIteration"),rl(jf,"onAnimationStart"),rl("dblclick","onDoubleClick"),rl("focusin","onFocus"),rl("focusout","onBlur"),rl(gy,"onTransitionRun"),rl(yy,"onTransitionStart"),rl(vy,"onTransitionCancel"),rl(Sf,"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 Os="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(" "),lv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Os));function Ym(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,R=_.currentTarget;if(_=_.listener,j!==c&&i.isPropagationStopped())break e;c=_,i.currentTarget=R;try{c(i)}catch(z){Ei(z)}i.currentTarget=null,c=j}else for(f=0;f<n.length;f++){if(_=n[f],j=_.instance,R=_.currentTarget,_=_.listener,j!==c&&i.isPropagationStopped())break e;c=_,i.currentTarget=R;try{c(i)}catch(z){Ei(z)}i.currentTarget=null,c=j}}}}function be(e,t){var l=t[mo];l===void 0&&(l=t[mo]=new Set);var n=e+"__bubble";l.has(n)||(Vm(t,e,2,!1),l.add(n))}function lu(e,t,l){var n=0;t&&(n|=4),Vm(l,e,n,t)}var hc="_reactListening"+Math.random().toString(36).slice(2);function nu(e){if(!e[hc]){e[hc]=!0,zd.forEach(function(l){l!=="selectionchange"&&(lv.has(l)||lu(l,!1,e),lu(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hc]||(t[hc]=!0,lu("selectionchange",!1,t))}}function Vm(e,t,l,n){switch(xp(t)){case 2:var i=Rv;break;case 8:i=Cv;break;default:i=yu}l=i.bind(null,t,l,e),i=void 0,!So||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 au(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}Jd(function(){var R=c,z=bo(l),H=[];e:{var C=Nf.get(e);if(C!==void 0){var M=Ni,F=e;switch(e){case"keypress":if(ji(l)===0)break e;case"keydown":case"keyup":M=Jg;break;case"focusin":F="focus",M=Eo;break;case"focusout":F="blur",M=Eo;break;case"beforeblur":case"afterblur":M=Eo;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":M=Id;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=zg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=Ig;break;case xf:case bf:case jf:M=Hg;break;case Sf:M=ey;break;case"scroll":case"scrollend":M=Lg;break;case"wheel":M=ly;break;case"copy":case"cut":case"paste":M=Gg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=ef;break;case"toggle":case"beforetoggle":M=ay}var ie=(t&4)!==0,Be=!ie&&(e==="scroll"||e==="scrollend"),E=ie?C!==null?C+"Capture":null:C;ie=[];for(var N=R,A;N!==null;){var B=N;if(A=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||A===null||E===null||(B=as(N,E),B!=null&&ie.push(zs(N,B,A))),Be)break;N=N.return}0<ie.length&&(C=new M(C,F,null,l,z),H.push({event:C,listeners:ie}))}}if((t&7)===0){e:{if(C=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",C&&l!==xo&&(F=l.relatedTarget||l.fromElement)&&(ta(F)||F[ea]))break e;if((M||C)&&(C=z.window===z?z:(C=z.ownerDocument)?C.defaultView||C.parentWindow:window,M?(F=l.relatedTarget||l.toElement,M=R,F=F?ta(F):null,F!==null&&(Be=h(F),ie=F.tag,F!==Be||ie!==5&&ie!==27&&ie!==6)&&(F=null)):(M=null,F=R),M!==F)){if(ie=Id,B="onMouseLeave",E="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(ie=ef,B="onPointerLeave",E="onPointerEnter",N="pointer"),Be=M==null?C:ns(M),A=F==null?C:ns(F),C=new ie(B,N+"leave",M,l,z),C.target=Be,C.relatedTarget=A,B=null,ta(z)===R&&(ie=new ie(E,N+"enter",F,l,z),ie.target=A,ie.relatedTarget=Be,B=ie),Be=B,M&&F)t:{for(ie=nv,E=M,N=F,A=0,B=E;B;B=ie(B))A++;B=0;for(var ae=N;ae;ae=ie(ae))B++;for(;0<A-B;)E=ie(E),A--;for(;0<B-A;)N=ie(N),B--;for(;A--;){if(E===N||N!==null&&E===N.alternate){ie=E;break t}E=ie(E),N=ie(N)}ie=null}else ie=null;M!==null&&Xm(H,C,M,ie,!1),F!==null&&Be!==null&&Xm(H,Be,F,ie,!0)}}e:{if(C=R?ns(R):window,M=C.nodeName&&C.nodeName.toLowerCase(),M==="select"||M==="input"&&C.type==="file")var Ee=rf;else if(cf(C))if(uf)Ee=my;else{Ee=fy;var te=dy}else M=C.nodeName,!M||M.toLowerCase()!=="input"||C.type!=="checkbox"&&C.type!=="radio"?R&&vo(R.elementType)&&(Ee=rf):Ee=hy;if(Ee&&(Ee=Ee(e,R))){of(H,Ee,l,z);break e}te&&te(e,C,R),e==="focusout"&&R&&C.type==="number"&&R.memoizedProps.value!=null&&yo(C,"number",C.value)}switch(te=R?ns(R):window,e){case"focusin":(cf(te)||te.contentEditable==="true")&&(ua=te,Mo=R,fs=null);break;case"focusout":fs=Mo=ua=null;break;case"mousedown":$o=!0;break;case"contextmenu":case"mouseup":case"dragend":$o=!1,yf(H,l,z);break;case"selectionchange":if(_y)break;case"keydown":case"keyup":yf(H,l,z)}var he;if(Ao)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?af(e,l)&&(Ne="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Ne="onCompositionStart");Ne&&(tf&&l.locale!=="ko"&&(ra||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&ra&&(he=Fd()):(Wl=z,No="value"in Wl?Wl.value:Wl.textContent,ra=!0)),te=mc(R,Ne),0<te.length&&(Ne=new Pd(Ne,e,null,l,z),H.push({event:Ne,listeners:te}),he?Ne.data=he:(he=sf(l),he!==null&&(Ne.data=he)))),(he=iy?cy(e,l):oy(e,l))&&(Ne=mc(R,"onBeforeInput"),0<Ne.length&&(te=new Pd("onBeforeInput","beforeinput",null,l,z),H.push({event:te,listeners:Ne}),te.data=he)),Py(H,e,R,l,z)}Ym(H,t)})}function zs(e,t,l){return{instance:e,listener:t,currentTarget:l}}function mc(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=as(e,l),i!=null&&n.unshift(zs(e,i,c)),i=as(e,t),i!=null&&n.push(zs(e,i,c))),e.tag===3)return n;e=e.return}return[]}function nv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xm(e,t,l,n,i){for(var c=t._reactName,f=[];l!==null&&l!==n;){var _=l,j=_.alternate,R=_.stateNode;if(_=_.tag,j!==null&&j===n)break;_!==5&&_!==26&&_!==27||R===null||(j=R,i?(R=as(l,c),R!=null&&f.unshift(zs(l,R,j))):i||(R=as(l,c),R!=null&&f.push(zs(l,R,j)))),l=l.return}f.length!==0&&e.push({event:t,listeners:f})}var av=/\r\n?/g,sv=/\u0000|\uFFFD/g;function Zm(e){return(typeof e=="string"?e:""+e).replace(av,`
49
- `).replace(sv,"")}function Km(e,t){return t=Zm(t),Zm(e)===t}function Ue(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=xi(""+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"&&Ue(e,t,"name",i.name,i,null),Ue(e,t,"formEncType",i.formEncType,i,null),Ue(e,t,"formMethod",i.formMethod,i,null),Ue(e,t,"formTarget",i.formTarget,i,null)):(Ue(e,t,"encType",i.encType,i,null),Ue(e,t,"method",i.method,i,null),Ue(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=xi(""+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=xi(""+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),gi(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":gi(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=Mg.get(l)||l,gi(e,l,n))}}function su(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(!Ud.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[At]||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,""):gi(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:Ue(e,t,c,f,l,null)}}i&&Ue(e,t,"srcSet",l.srcSet,l,null),n&&Ue(e,t,"src",l.src,l,null);return;case"input":be("invalid",e);var _=c=f=i=null,j=null,R=null;for(n in l)if(l.hasOwnProperty(n)){var z=l[n];if(z!=null)switch(n){case"name":i=z;break;case"type":f=z;break;case"checked":j=z;break;case"defaultChecked":R=z;break;case"value":c=z;break;case"defaultValue":_=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,t));break;default:Ue(e,t,n,z,l,null)}}Qd(e,c,_,j,R,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:Ue(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:Ue(e,t,f,_,l,null)}Vd(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:Ue(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<Os.length;n++)be(Os[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(R in l)if(l.hasOwnProperty(R)&&(n=l[R],n!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ue(e,t,R,n,l,null)}return;default:if(vo(t)){for(z in l)l.hasOwnProperty(z)&&(n=l[z],n!==void 0&&su(e,t,z,n,l,void 0));return}}for(_ in l)l.hasOwnProperty(_)&&(n=l[_],n!=null&&Ue(e,t,_,n,l,null))}function iv(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,R=null,z=null;for(M in l){var H=l[M];if(l.hasOwnProperty(M)&&H!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":j=H;default:n.hasOwnProperty(M)||Ue(e,t,M,null,n,H)}}for(var C in n){var M=n[C];if(H=l[C],n.hasOwnProperty(C)&&(M!=null||H!=null))switch(C){case"type":c=M;break;case"name":i=M;break;case"checked":R=M;break;case"defaultChecked":z=M;break;case"value":f=M;break;case"defaultValue":_=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,t));break;default:M!==H&&Ue(e,t,C,M,n,H)}}go(e,f,_,j,R,z,c,i);return;case"select":M=f=_=C=null;for(c in l)if(j=l[c],l.hasOwnProperty(c)&&j!=null)switch(c){case"value":break;case"multiple":M=j;default:n.hasOwnProperty(c)||Ue(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":C=c;break;case"defaultValue":_=c;break;case"multiple":f=c;default:c!==j&&Ue(e,t,i,c,n,j)}t=_,l=f,n=M,C!=null?sa(e,!!l,C,!1):!!n!=!!l&&(t!=null?sa(e,!!l,t,!0):sa(e,!!l,l?[]:"",!1));return;case"textarea":M=C=null;for(_ in l)if(i=l[_],l.hasOwnProperty(_)&&i!=null&&!n.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:Ue(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":C=i;break;case"defaultValue":M=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(r(91));break;default:i!==c&&Ue(e,t,f,i,n,c)}Yd(e,C,M);return;case"option":for(var F in l)if(C=l[F],l.hasOwnProperty(F)&&C!=null&&!n.hasOwnProperty(F))switch(F){case"selected":e.selected=!1;break;default:Ue(e,t,F,null,n,C)}for(j in n)if(C=n[j],M=l[j],n.hasOwnProperty(j)&&C!==M&&(C!=null||M!=null))switch(j){case"selected":e.selected=C&&typeof C!="function"&&typeof C!="symbol";break;default:Ue(e,t,j,C,n,M)}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)C=l[ie],l.hasOwnProperty(ie)&&C!=null&&!n.hasOwnProperty(ie)&&Ue(e,t,ie,null,n,C);for(R in n)if(C=n[R],M=l[R],n.hasOwnProperty(R)&&C!==M&&(C!=null||M!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(C!=null)throw Error(r(137,t));break;default:Ue(e,t,R,C,n,M)}return;default:if(vo(t)){for(var Be in l)C=l[Be],l.hasOwnProperty(Be)&&C!==void 0&&!n.hasOwnProperty(Be)&&su(e,t,Be,void 0,n,C);for(z in n)C=n[z],M=l[z],!n.hasOwnProperty(z)||C===M||C===void 0&&M===void 0||su(e,t,z,C,n,M);return}}for(var E in l)C=l[E],l.hasOwnProperty(E)&&C!=null&&!n.hasOwnProperty(E)&&Ue(e,t,E,null,n,C);for(H in n)C=n[H],M=l[H],!n.hasOwnProperty(H)||C===M||C==null&&M==null||Ue(e,t,H,C,n,M)}function Jm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function cv(){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&&_&&Jm(f)){for(f=0,_=i.responseEnd,n+=1;n<l.length;n++){var j=l[n],R=j.startTime;if(R>_)break;var z=j.transferSize,H=j.initiatorType;z&&Jm(H)&&(j=j.responseEnd,f+=z*(j<_?1:(_-R)/(j-R)))}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 iu=null,cu=null;function pc(e){return e.nodeType===9?e:e.ownerDocument}function Fm(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 Wm(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 ou(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 ru=null;function ov(){var e=window.event;return e&&e.type==="popstate"?e===ru?!1:(ru=e,!0):(ru=null,!1)}var Im=typeof setTimeout=="function"?setTimeout:void 0,rv=typeof clearTimeout=="function"?clearTimeout:void 0,Pm=typeof Promise=="function"?Promise:void 0,uv=typeof queueMicrotask=="function"?queueMicrotask:typeof Pm<"u"?function(e){return Pm.resolve(null).then(e).catch(dv)}:Im;function dv(e){setTimeout(function(){throw e})}function pn(e){return e==="head"}function ep(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")Us(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Us(l);for(var c=l.firstChild;c;){var f=c.nextSibling,_=c.nodeName;c[ls]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&c.rel.toLowerCase()==="stylesheet"||l.removeChild(c),c=f}}else l==="body"&&Us(e.ownerDocument.body);l=i}while(l);za(t)}function tp(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 uu(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":uu(l),po(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function fv(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[ls])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 hv(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 lp(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 du(e){return e.data==="$?"||e.data==="$~"}function fu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function mv(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 hu=null;function np(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 ap(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 sp(e,t,l){switch(t=pc(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 Us(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);po(e)}var al=new Map,ip=new Set;function _c(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ql=Y.d;Y.d={f:pv,r:_v,D:gv,C:yv,L:vv,m:xv,X:jv,S:bv,M:Sv};function pv(){var e=Ql.f(),t=cc();return e||t}function _v(e){var t=la(e);t!==null&&t.tag===5&&t.type==="form"?Sh(t):Ql.r(e)}var $a=typeof document>"u"?null:document;function cp(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+'"]'),ip.has(i)||(ip.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 gv(e){Ql.D(e),cp("dns-prefetch",e,null)}function yv(e,t){Ql.C(e,t),cp("preconnect",e,t)}function vv(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(Bs(c))||t==="script"&&n.querySelector(Hs(c))||(t=n.createElement("link"),St(t,"link",e),pt(t),n.head.appendChild(t)))}}function xv(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(Hs(c)))return}n=l.createElement("link"),St(n,"link",e),pt(n),l.head.appendChild(n)}}}function bv(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(Bs(c)))_.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},l),(l=al.get(c))&&mu(e,l);var j=f=n.createElement("link");pt(j),St(j,"link",e),j._p=new Promise(function(R,z){j.onload=R,j.onerror=z}),j.addEventListener("load",function(){_.loading|=1}),j.addEventListener("error",function(){_.loading|=2}),_.loading|=4,gc(f,t,n)}f={type:"stylesheet",instance:f,count:1,state:_},i.set(c,f)}}}function jv(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(Hs(i)),c||(e=x({src:e,async:!0},t),(t=al.get(i))&&pu(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 Sv(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(Hs(i)),c||(e=x({src:e,async:!0,type:"module"},t),(t=al.get(i))&&pu(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 op(e,t,l,n){var i=(i=ve.current)?_c(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(Bs(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||Nv(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 Bs(e){return'link[rel="stylesheet"]['+e+"]"}function rp(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function Nv(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 Hs(e){return"script[async]"+e}function up(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),gc(n,l.precedence,e),t.instance=n;case"stylesheet":i=La(l.href);var c=e.querySelector(Bs(i));if(c)return t.state.loading|=4,t.instance=c,pt(c),c;n=rp(l),(i=al.get(i))&&mu(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,gc(c,l.precedence,e),t.instance=c;case"script":return c=Oa(l.src),(i=e.querySelector(Hs(c)))?(t.instance=i,pt(i),i):(n=l,(i=al.get(c))&&(n=x({},l),pu(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,gc(n,l.precedence,e));return t.instance}function gc(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 mu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function pu(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 dp(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[ls]||c[vt]||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 fp(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function wv(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 hp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Tv(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(Bs(i));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=vc.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=c,pt(c);return}c=t.ownerDocument||t,n=rp(n),(i=al.get(i))&&mu(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=vc.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var _u=0;function Ev(e,t){return e.stylesheets&&e.count===0&&bc(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var n=setTimeout(function(){if(e.stylesheets&&bc(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&_u===0&&(_u=62500*cv());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&bc(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>_u?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(i)}}:null}function vc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)bc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var xc=null;function bc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,xc=new Map,t.forEach(kv,e),xc=null,vc.call(e))}function kv(e,t){if(!(t.state.loading&4)){var l=xc.get(e);if(l)var n=l.get(null);else{l=new Map,xc.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=vc.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:X,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function Av(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=uo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uo(0),this.hiddenUpdates=uo(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 mp(e,t,l,n,i,c,f,_,j,R,z,H){return e=new Av(e,t,l,f,j,R,z,H,_),t=1,c===!0&&(t|=24),c=qt(3,null,null,t),e.current=c,c.stateNode=e,t=Jo(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:n,isDehydrated:l,cache:t},Po(c),e}function pp(e){return e?(e=ha,e):ha}function _p(e,t,l,n,i,c){i=pp(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&&(Lt(l,e,t),vs(l,e,t))}function gp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function gu(e,t){gp(e,t),(e=e.alternate)&&gp(e,t)}function yp(e){if(e.tag===13||e.tag===31){var t=Cn(e,67108864);t!==null&&Lt(t,e,67108864),gu(e,67108864)}}function vp(e){if(e.tag===13||e.tag===31){var t=Xt();t=fo(t);var l=Cn(e,t);l!==null&&Lt(l,e,t),gu(e,t)}}var jc=!0;function Rv(e,t,l,n){var i=D.T;D.T=null;var c=Y.p;try{Y.p=2,yu(e,t,l,n)}finally{Y.p=c,D.T=i}}function Cv(e,t,l,n){var i=D.T;D.T=null;var c=Y.p;try{Y.p=8,yu(e,t,l,n)}finally{Y.p=c,D.T=i}}function yu(e,t,l,n){if(jc){var i=vu(n);if(i===null)au(e,t,n,Sc,l),bp(e,n);else if(Mv(i,e,t,l,n))n.stopPropagation();else if(bp(e,n),t&4&&-1<Dv.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),(Ce&6)===0&&(sc=zt()+500,Ls(0))}}break;case 31:case 13:_=Cn(c,2),_!==null&&Lt(_,c,2),cc(),gu(c,2)}if(c=vu(n),c===null&&au(e,t,n,Sc,l),c===i)break;i=c}i!==null&&n.stopPropagation()}else au(e,t,n,null,l)}}function vu(e){return e=bo(e),xu(e)}var Sc=null;function xu(e){if(Sc=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=y(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 Sc=e,null}function xp(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(gg()){case Ed:return 2;case kd:return 8;case fi:case yg:return 32;case Ad:return 268435456;default:return 32}default:return 32}}var bu=!1,_n=null,gn=null,yn=null,Gs=new Map,Qs=new Map,vn=[],Dv="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 bp(e,t){switch(e){case"focusin":case"focusout":_n=null;break;case"dragenter":case"dragleave":gn=null;break;case"mouseover":case"mouseout":yn=null;break;case"pointerover":case"pointerout":Gs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qs.delete(t.pointerId)}}function Ys(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 Mv(e,t,l,n,i){switch(t){case"focusin":return _n=Ys(_n,e,t,l,n,i),!0;case"dragenter":return gn=Ys(gn,e,t,l,n,i),!0;case"mouseover":return yn=Ys(yn,e,t,l,n,i),!0;case"pointerover":var c=i.pointerId;return Gs.set(c,Ys(Gs.get(c)||null,e,t,l,n,i)),!0;case"gotpointercapture":return c=i.pointerId,Qs.set(c,Ys(Qs.get(c)||null,e,t,l,n,i)),!0}return!1}function jp(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,Ld(e.priority,function(){vp(l)});return}}else if(t===31){if(t=y(l),t!==null){e.blockedOn=t,Ld(e.priority,function(){vp(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 Nc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=vu(e.nativeEvent);if(l===null){l=e.nativeEvent;var n=new l.constructor(l.type,l);xo=n,l.target.dispatchEvent(n),xo=null}else return t=la(l),t!==null&&yp(t),e.blockedOn=l,!1;t.shift()}return!0}function Sp(e,t,l){Nc(e)&&l.delete(t)}function $v(){bu=!1,_n!==null&&Nc(_n)&&(_n=null),gn!==null&&Nc(gn)&&(gn=null),yn!==null&&Nc(yn)&&(yn=null),Gs.forEach(Sp),Qs.forEach(Sp)}function wc(e,t){e.blockedOn===t&&(e.blockedOn=null,bu||(bu=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,$v)))}var Tc=null;function Np(e){Tc!==e&&(Tc=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){Tc===e&&(Tc=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(xu(n||l)===null)continue;break}var c=la(l);c!==null&&(e.splice(t,3),t-=3,vr(c,{pending:!0,data:i,method:l.method,action:n},n,i))}}))}function za(e){function t(j){return wc(j,e)}_n!==null&&wc(_n,e),gn!==null&&wc(gn,e),yn!==null&&wc(yn,e),Gs.forEach(t),Qs.forEach(t);for(var l=0;l<vn.length;l++){var n=vn[l];n.blockedOn===e&&(n.blockedOn=null)}for(;0<vn.length&&(l=vn[0],l.blockedOn===null);)jp(l),l.blockedOn===null&&vn.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[At]||null;if(typeof c=="function")f||Np(l);else if(f){var _=null;if(c&&c.hasAttribute("formAction")){if(i=c,f=c[At]||null)_=f.formAction;else if(xu(i)!==null)continue}else _=f.action;typeof _=="function"?l[n+1]=_:(l.splice(n,3),n-=3),Np(l)}}}function wp(){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 ju(e){this._internalRoot=e}Ec.prototype.render=ju.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,n=Xt();_p(l,n,e,t,null,null)},Ec.prototype.unmount=ju.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_p(e.current,2,null,e,null,null),cc(),t[ea]=null}};function Ec(e){this._internalRoot=e}Ec.prototype.unstable_scheduleHydration=function(e){if(e){var t=$d();e={blockedOn:null,target:e,priority:t};for(var l=0;l<vn.length&&t!==0&&t<vn[l].priority;l++);vn.splice(l,0,e),l===0&&jp(e)}};var Tp=o.version;if(Tp!=="19.2.8")throw Error(r(527,Tp,"19.2.8"));Y.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 Lv={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var kc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kc.isDisabled&&kc.supportsFiber)try{Pa=kc.inject(Lv),Ut=kc}catch{}}return Xs.createRoot=function(e,t){if(!d(e))throw Error(r(299));var l=!1,n="",i=Mh,c=$h,f=Lh;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=mp(e,1,!1,null,null,l,n,null,i,c,f,wp),e[ea]=t.current,nu(e),new ju(t)},Xs.hydrateRoot=function(e,t,l){if(!d(e))throw Error(r(299));var n=!1,i="",c=Mh,f=$h,_=Lh,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=mp(e,1,!0,t,l??null,n,i,j,c,f,_,wp),t.context=pp(null),l=t.current,n=Xt(),n=fo(n),i=nn(n),i.callback=null,an(l,i,n),l=n,t.current.lanes=l,ts(t,l),bl(t),e[ea]=t.current,nu(e),new Ec(t)},Xs.version="19.2.8",Xs}var Op;function Yv(){if(Op)return wu.exports;Op=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(),wu.exports=Qv(),wu.exports}var Vv=Yv();/**
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 cd=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,g_=/^[\\/]{2}/;function Xv(s,o){return o+s.replace(/\\/g,"/")}var zp="popstate";function Up(s){return typeof s=="object"&&s!=null&&"pathname"in s&&"search"in s&&"hash"in s&&"state"in s&&"key"in s}function Zv(s={}){function o(d,h){let{pathname:m="/",search:y="",hash:g=""}=In(d.location.hash.substring(1));return!m.startsWith("/")&&!m.startsWith(".")&&(m="/"+m),Ju("",{pathname:m,search:y,hash:g},h.state&&h.state.usr||null,h.state&&h.state.key||"default")}function u(d,h){let m=d.document.querySelector("base"),y="";if(m&&m.getAttribute("href")){let g=d.location.href,p=g.indexOf("#");y=p===-1?g:g.slice(0,p)}return y+"#"+(typeof h=="string"?h:ti(h))}function r(d,h){cl(d.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(h)})`)}return Jv(o,u,r,s)}function Xe(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 Kv(){return Math.random().toString(36).substring(2,10)}function Bp(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 Ju(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||Kv(),mask:d}}function ti({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 Jv(s,o,u,r={}){let{window:d=document.defaultView,v5Compat:h=!1}=r,m=d.history,y="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(){y="POP";let w=b(),U=w==null?null:w-p;p=w,g&&g({action:y,location:k.location,delta:U})}function T(w,U){y="PUSH";let V=Up(w)?w:Ju(k.location,w,U);u&&u(V,w),p=b()+1;let X=Bp(V,p),I=k.createHref(V.mask||V);try{m.pushState(X,"",I)}catch(q){if(q instanceof DOMException&&q.name==="DataCloneError")throw q;d.location.assign(I)}h&&g&&g({action:y,location:k.location,delta:1})}function O(w,U){y="REPLACE";let V=Up(w)?w:Ju(k.location,w,U);u&&u(V,w),p=b();let X=Bp(V,p),I=k.createHref(V.mask||V);m.replaceState(X,"",I),h&&g&&g({action:y,location:k.location,delta:0})}function $(w){return Fv(d,w)}let k={get action(){return y},get location(){return s(d,m)},listen(w){if(g)throw new Error("A history only accepts one active listener");return d.addEventListener(zp,x),g=w,()=>{d.removeEventListener(zp,x),g=null}},createHref(w){return o(d,w)},createURL:$,encodeLocation(w){let U=$(w);return{pathname:U.pathname,search:U.search,hash:U.hash}},push:T,replace:O,go(w){return m.go(w)}};return k}function Fv(s,o,u=!1){let r="http://localhost";s&&(r=s.location.origin!=="null"?s.location.origin:s.location.href),Xe(r,"No window.location.(origin|href) available to create URL");let d=typeof o=="string"?o:ti(o);return d=d.replace(/ $/,"%20"),!u&&g_.test(d)&&(d=r+d),new URL(d,r)}function y_(s,o,u="/"){return Wv(s,o,u,!1)}function Wv(s,o,u,r,d){let h=typeof o=="string"?In(o):o,m=Zl(h.pathname||"/",u);if(m==null)return null;let y=Iv(s),g=null,p=rx(m);for(let b=0;g==null&&b<y.length;++b)g=ox(y[b],p,r);return g}function Iv(s){let o=v_(s);return Pv(o),o}function v_(s,o=[],u=[],r="",d=!1){let h=(m,y,g=d,p)=>{let b={relativePath:p===void 0?m.path||"":p,caseSensitive:m.caseSensitive===!0,childrenIndex:y,route:m};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(r)&&g)return;Xe(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]),T=u.concat(b);m.children&&m.children.length>0&&(Xe(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),v_(m.children,o,T,x,g)),!(m.path==null&&!m.index)&&o.push({path:x,score:ix(x,m.index),routesMeta:T.map((O,$)=>{let[k,w]=j_(O.relativePath,O.caseSensitive,$===T.length-1);return{...O,matcher:k,compiledParams:w}})})};return s.forEach((m,y)=>{if(m.path===""||!m.path?.includes("?"))h(m,y);else for(let g of x_(m.path))h(m,y,!0,g)}),o}function x_(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=x_(r.join("/")),y=[];return y.push(...m.map(g=>g===""?h:[h,g].join("/"))),d&&y.push(...m),y.map(g=>s.startsWith("/")&&g===""?"/":g)}function Pv(s){s.sort((o,u)=>o.score!==u.score?u.score-o.score:cx(o.routesMeta.map(r=>r.childrenIndex),u.routesMeta.map(r=>r.childrenIndex)))}var ex=/^:[\w-]+$/,tx=3,lx=2,nx=1,ax=10,sx=-2,Hp=s=>s==="*";function ix(s,o){let u=s.split("/"),r=u.length;return u.some(Hp)&&(r+=sx),o&&(r+=lx),u.filter(d=>!Hp(d)).reduce((d,h)=>d+(ex.test(h)?tx:h===""?nx:ax),r)}function cx(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 ox(s,o,u=!1){let{routesMeta:r}=s,d={},h="/",m=[];for(let y=0;y<r.length;++y){let g=r[y],p=y===r.length-1,b=h==="/"?o:o.slice(h.length)||"/",x={path:g.relativePath,caseSensitive:g.caseSensitive,end:p},T=g.matcher&&g.compiledParams?b_(x,b,g.matcher,g.compiledParams):Qc(x,b),O=g.route;if(!T&&p&&u&&!r[r.length-1].route.index&&(T=Qc({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},b)),!T)return null;Object.assign(d,T.params),m.push({params:d,pathname:_l([h,T.pathname]),pathnameBase:fx(_l([h,T.pathnameBase])),route:O}),T.pathnameBase!=="/"&&(h=_l([h,T.pathnameBase]))}return m}function Qc(s,o){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[u,r]=j_(s.path,s.caseSensitive,s.end);return b_(s,o,u,r)}function b_(s,o,u,r){let d=o.match(u);if(!d)return null;let h=d[0],m=h.replace(/(.)\/+$/,"$1"),y=d.slice(1);return{params:r.reduce((p,{paramName:b,isOptional:x},T)=>{if(b==="*"){let $=y[T]||"";m=h.slice(0,h.length-$.length).replace(/(.)\/+$/,"$1")}const O=y[T];return x&&!O?p[b]=void 0:p[b]=(O||"").replace(/%2F/g,"/"),p},{}),pathname:h,pathnameBase:m,pattern:s}}function j_(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,y,g,p,b)=>{if(r.push({paramName:y,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 rx(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 Zl(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 ux(s,o="/"){let{pathname:u,search:r="",hash:d=""}=typeof s=="string"?In(s):s,h;return u?(u=S_(u),u.startsWith("/")?h=qp(u.substring(1),"/"):h=qp(u,o)):h=o,{pathname:h,search:hx(r),hash:mx(d)}}function qp(s,o){let u=Yc(o).split("/");return s.split("/").forEach(d=>{d===".."?u.length>1&&u.pop():d!=="."&&u.push(d)}),u.length>1?u.join("/"):"/"}function Au(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 dx(s){return s.filter((o,u)=>u===0||o.route.path&&o.route.path.length>0)}function od(s){let o=dx(s);return o.map((u,r)=>r===o.length-1?u.pathname:u.pathnameBase)}function Jc(s,o,u,r=!1){let d;typeof s=="string"?d=In(s):(d={...s},Xe(!d.pathname||!d.pathname.includes("?"),Au("?","pathname","search",d)),Xe(!d.pathname||!d.pathname.includes("#"),Au("#","pathname","hash",d)),Xe(!d.search||!d.search.includes("#"),Au("#","search","hash",d)));let h=s===""||d.pathname==="",m=h?"/":d.pathname,y;if(m==null)y=u;else{let x=o.length-1;if(!r&&m.startsWith("..")){let T=m.split("/");for(;T[0]==="..";)T.shift(),x-=1;d.pathname=T.join("/")}y=x>=0?o[x]:"/"}let g=ux(d,y),p=m&&m!=="/"&&m.endsWith("/"),b=(h||m===".")&&u.endsWith("/");return!g.pathname.endsWith("/")&&(p||b)&&(g.pathname+="/"),g}var S_=s=>s.replace(/[\\/]{2,}/g,"/"),_l=s=>S_(s.join("/")),Yc=s=>s.replace(/\/+$/,""),fx=s=>Yc(s).replace(/^\/*/,"/"),hx=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,mx=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,px=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 _x(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function gx(s){let o=s.map(u=>u.route.path).filter(Boolean);return _l(o)||"/"}var N_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function w_(s,o){let u=s;if(typeof u!="string"||!cd.test(u))return{absoluteURL:void 0,isExternal:!1,to:u};let r=u,d=!1;if(N_)try{let h=new URL(window.location.href),m=g_.test(u)?new URL(Xv(u,h.protocol)):new URL(u),y=Zl(m.pathname,o);m.origin===h.origin&&y!=null?u=y+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 T_=["POST","PUT","PATCH","DELETE"];new Set(T_);var yx=["GET",...T_];new Set(yx);var vx=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function xx(s){try{return vx.includes(new URL(s).protocol)}catch{return!1}}var Ja=v.createContext(null);Ja.displayName="DataRouter";var Fc=v.createContext(null);Fc.displayName="DataRouterState";var E_=v.createContext(!1);function bx(){return v.useContext(E_)}var k_=v.createContext({isTransitioning:!1});k_.displayName="ViewTransition";var jx=v.createContext(new Map);jx.displayName="Fetchers";var Sx=v.createContext(null);Sx.displayName="Await";var Kt=v.createContext(null);Kt.displayName="Navigation";var ii=v.createContext(null);ii.displayName="Location";var ol=v.createContext({outlet:null,matches:[],isDataRoute:!1});ol.displayName="Route";var rd=v.createContext(null);rd.displayName="RouteError";var A_="REACT_ROUTER_ERROR",Nx="REDIRECT",wx="ROUTE_ERROR_RESPONSE";function Tx(s){if(s.startsWith(`${A_}:${Nx}:{`))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 Ex(s){if(s.startsWith(`${A_}:${wx}:{`))try{let o=JSON.parse(s.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new px(o.status,o.statusText,o.data)}catch{}}function kx(s,{relative:o}={}){Xe(Fa(),"useHref() may be used only in the context of a <Router> component.");let{basename:u,navigator:r}=v.useContext(Kt),{hash:d,pathname:h,search:m}=ci(s,{relative:o}),y=h;return u!=="/"&&(y=h==="/"?u:_l([u,h])),r.createHref({pathname:y,search:m,hash:d})}function Fa(){return v.useContext(ii)!=null}function gl(){return Xe(Fa(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(ii).location}var R_="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function C_(s){v.useContext(Kt).static||v.useLayoutEffect(s)}function Wc(){let{isDataRoute:s}=v.useContext(ol);return s?Qx():Ax()}function Ax(){Xe(Fa(),"useNavigate() may be used only in the context of a <Router> component.");let s=v.useContext(Ja),{basename:o,navigator:u}=v.useContext(Kt),{matches:r}=v.useContext(ol),{pathname:d}=gl(),h=JSON.stringify(od(r)),m=v.useRef(!1);return C_(()=>{m.current=!0}),v.useCallback((g,p={})=>{if(cl(m.current,R_),!m.current)return;if(typeof g=="number"){u.go(g);return}let b=Jc(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 Rx=v.createContext(null);function Cx(s){let o=v.useContext(ol).outlet;return v.useMemo(()=>o&&v.createElement(Rx.Provider,{value:s},o),[o,s])}function ud(){let{matches:s}=v.useContext(ol);return s[s.length-1]?.params??{}}function ci(s,{relative:o}={}){let{matches:u}=v.useContext(ol),{pathname:r}=gl(),d=JSON.stringify(od(u));return v.useMemo(()=>Jc(s,JSON.parse(d),r,o==="path"),[s,d,r,o])}function Dx(s,o){return D_(s,o)}function D_(s,o,u){Xe(Fa(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=v.useContext(Kt),{matches:d}=v.useContext(ol),h=d[d.length-1],m=h?h.params:{},y=h?h.pathname:"/",g=h?h.pathnameBase:"/",p=h&&h.route;{let w=p&&p.path||"";$_(y,!p||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${w}">) 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="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let b=gl(),x;if(o){let w=typeof o=="string"?In(o):o;Xe(g==="/"||w.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 "${w.pathname}" was given in the \`location\` prop.`),x=w}else x=b;let T=x.pathname||"/",O=T;if(g!=="/"){let w=g.replace(/^\//,"").split("/");O="/"+T.replace(/^\//,"").split("/").slice(w.length).join("/")}let $=u&&u.state.matches.length?u.state.matches.map(w=>Object.assign(w,{route:u.manifest[w.route.id]||w.route})):y_(s,{pathname:O});cl(p||$!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),cl($==null||$[$.length-1].route.element!==void 0||$[$.length-1].route.Component!==void 0||$[$.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 k=zx($&&$.map(w=>Object.assign({},w,{params:Object.assign({},m,w.params),pathname:_l([g,r.encodeLocation?r.encodeLocation(w.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?g:_l([g,r.encodeLocation?r.encodeLocation(w.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),d,u);return o&&k?v.createElement(ii.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...x},navigationType:"POP"}},k):k}function Mx(){let s=Gx(),o=_x(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=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:h},"ErrorBoundary")," or"," ",v.createElement("code",{style:h},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},o),u?v.createElement("pre",{style:d},u):null,m)}var $x=v.createElement(Mx,null),M_=class extends v.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=Ex(s.digest);u&&(s=u)}let o=s!==void 0?v.createElement(ol.Provider,{value:this.props.routeContext},v.createElement(rd.Provider,{value:s,children:this.props.component})):this.props.children;return this.context?v.createElement(Lx,{error:s},o):o}};M_.contextType=E_;var Ru=new WeakMap;function Lx({children:s,error:o}){let{basename:u}=v.useContext(Kt);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let r=Tx(o.digest);if(r){let d=Ru.get(o);if(d)throw d;let h=w_(r.location,u),m=h.absoluteURL||h.to;if(xx(m))throw new Error("Invalid redirect location");if(N_&&!Ru.get(o))if(h.isExternal||r.reloadDocument)window.location.href=m;else{const y=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:r.replace}));throw Ru.set(o,y),y}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m}`})}}return s}function Ox({routeContext:s,match:o,children:u}){let r=v.useContext(Ja);return r&&r.static&&r.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=o.route.id),v.createElement(ol.Provider,{value:s},u)}function zx(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);Xe(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,y=-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)&&(y=b),x.route.id){let{loaderData:T,errors:O}=r,$=x.route.loader&&!T.hasOwnProperty(x.route.id)&&(!O||O[x.route.id]===void 0);if(x.route.lazy||$){u.isStatic&&(m=!0),y>=0?d=d.slice(0,y+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:gx(r.matches),errorInfo:x})}:void 0;return d.reduceRight((b,x,T)=>{let O,$=!1,k=null,w=null;r&&(O=h&&x.route.id?h[x.route.id]:void 0,k=x.route.errorElement||$x,m&&(y<0&&T===0?($_("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),$=!0,w=null):y===T&&($=!0,w=x.route.hydrateFallbackElement||null)));let U=o.concat(d.slice(0,T+1)),V=()=>{let X;return O?X=k:$?X=w:x.route.Component?X=v.createElement(x.route.Component,null):x.route.element?X=x.route.element:X=b,v.createElement(Ox,{match:x,routeContext:{outlet:b,matches:U,isDataRoute:r!=null},children:X})};return r&&(x.route.ErrorBoundary||x.route.errorElement||T===0)?v.createElement(M_,{location:r.location,revalidation:r.revalidation,component:k,error:O,children:V(),routeContext:{outlet:null,matches:U,isDataRoute:!0},onError:p}):V()},null)}function dd(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ux(s){let o=v.useContext(Ja);return Xe(o,dd(s)),o}function Bx(s){let o=v.useContext(Fc);return Xe(o,dd(s)),o}function Hx(s){let o=v.useContext(ol);return Xe(o,dd(s)),o}function fd(s){let o=Hx(s),u=o.matches[o.matches.length-1];return Xe(u.route.id,`${s} can only be used on routes that contain a unique "id"`),u.route.id}function qx(){return fd("useRouteId")}function Gx(){let s=v.useContext(rd),o=Bx("useRouteError"),u=fd("useRouteError");return s!==void 0?s:o.errors?.[u]}function Qx(){let{router:s}=Ux("useNavigate"),o=fd("useNavigate"),u=v.useRef(!1);return C_(()=>{u.current=!0}),v.useCallback(async(d,h={})=>{cl(u.current,R_),u.current&&(typeof d=="number"?await s.navigate(d):await s.navigate(d,{fromRouteId:o,...h}))},[s,o])}var Gp={};function $_(s,o,u){!o&&!Gp[s]&&(Gp[s]=!0,cl(!1,u))}v.memo(Yx);function Yx({routes:s,manifest:o,future:u,state:r,isStatic:d,onError:h}){return D_(s,void 0,{manifest:o,state:r,isStatic:d,onError:h})}function Qp({to:s,replace:o,state:u,relative:r}){Xe(Fa(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=v.useContext(Kt);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}=v.useContext(ol),{pathname:m}=gl(),y=Wc(),g=Jc(s,od(h),m,r==="path"),p=JSON.stringify(g);return v.useEffect(()=>{y(JSON.parse(p),{replace:o,state:u,relative:r})},[y,p,r,o,u]),null}function Vx(s){return Cx(s.context)}function it(s){Xe(!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 Xx({basename:s="/",children:o=null,location:u,navigationType:r="POP",navigator:d,static:h=!1,useTransitions:m}){Xe(!Fa(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let y=s.replace(/^\/*/,"/"),g=v.useMemo(()=>({basename:y,navigator:d,static:h,useTransitions:m,future:{}}),[y,d,h,m]);typeof u=="string"&&(u=In(u));let{pathname:p="/",search:b="",hash:x="",state:T=null,key:O="default",mask:$}=u,k=v.useMemo(()=>{let w=Zl(p,y);return w==null?null:{location:{pathname:w,search:b,hash:x,state:T,key:O,mask:$},navigationType:r}},[y,p,b,x,T,O,r,$]);return cl(k!=null,`<Router basename="${y}"> 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.`),k==null?null:v.createElement(Kt.Provider,{value:g},v.createElement(ii.Provider,{children:o,value:k}))}function Zx({children:s,location:o}){return Dx(Fu(s),o)}function Fu(s,o=[]){let u=[];return v.Children.forEach(s,(r,d)=>{if(!v.isValidElement(r))return;let h=[...o,d];if(r.type===v.Fragment){u.push.apply(u,Fu(r.props.children,h));return}Xe(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>`),Xe(!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=Fu(r.props.children,h)),u.push(m)}),u}var Uc="get",Bc="application/x-www-form-urlencoded";function Ic(s){return typeof HTMLElement<"u"&&s instanceof HTMLElement}function Kx(s){return Ic(s)&&s.tagName.toLowerCase()==="button"}function Jx(s){return Ic(s)&&s.tagName.toLowerCase()==="form"}function Fx(s){return Ic(s)&&s.tagName.toLowerCase()==="input"}function Wx(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function Ix(s,o){return s.button===0&&(!o||o==="_self")&&!Wx(s)}var Ac=null;function Px(){if(Ac===null)try{new FormData(document.createElement("form"),0),Ac=!1}catch{Ac=!0}return Ac}var e1=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Cu(s){return s!=null&&!e1.has(s)?(cl(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Bc}"`),null):s}function t1(s,o){let u,r,d,h,m;if(Jx(s)){let y=s.getAttribute("action");r=y?Zl(y,o):null,u=s.getAttribute("method")||Uc,d=Cu(s.getAttribute("enctype"))||Bc,h=new FormData(s)}else if(Kx(s)||Fx(s)&&(s.type==="submit"||s.type==="image")){let y=s.form;if(y==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=s.getAttribute("formaction")||y.getAttribute("action");if(r=g?Zl(g,o):null,u=s.getAttribute("formmethod")||y.getAttribute("method")||Uc,d=Cu(s.getAttribute("formenctype"))||Cu(y.getAttribute("enctype"))||Bc,h=new FormData(y,s),!Px()){let{name:p,type:b,value:x}=s;if(b==="image"){let T=p?`${p}.`:"";h.append(`${T}x`,"0"),h.append(`${T}y`,"0")}else p&&h.append(p,x)}}else{if(Ic(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');u=Uc,r=null,d=Bc,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 hd(s,o){if(s===!1||s===null||typeof s>"u")throw new Error(o)}function L_(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&&Zl(d.pathname,o)==="/"?d.pathname=`${Yc(o)}/_root.${r}`:d.pathname=`${Yc(d.pathname)}.${r}`,d}async function l1(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 n1(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 a1(s,o,u){let r=await Promise.all(s.map(async d=>{let h=o.routes[d.route.id];if(h){let m=await l1(h,u);return m.links?m.links():[]}return[]}));return o1(r.flat(1).filter(n1).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Yp(s,o,u,r,d,h){let m=(g,p)=>u[p]?g.route.id!==u[p].route.id:!0,y=(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)||y(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)||y(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 s1(s,o,{includeHydrateFallback:u}={}){return i1(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 i1(s){return[...new Set(s)]}function c1(s){let o={},u=Object.keys(s).sort();for(let r of u)o[r]=s[r];return o}function o1(s,o){let u=new Set;return new Set(o),s.reduce((r,d)=>{let h=JSON.stringify(c1(d));return u.has(h)||(u.add(h),r.push({key:h,link:d})),r},[])}function md(){let s=v.useContext(Ja);return hd(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function r1(){let s=v.useContext(Fc);return hd(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var pd=v.createContext(void 0);pd.displayName="FrameworkContext";function Pc(){let s=v.useContext(pd);return hd(s,"You must render this element inside a <HydratedRouter> element"),s}function u1(s,o){let u=v.useContext(pd),[r,d]=v.useState(!1),[h,m]=v.useState(!1),{onFocus:y,onBlur:g,onMouseEnter:p,onMouseLeave:b,onTouchStart:x}=o,T=v.useRef(null);v.useEffect(()=>{if(s==="render"&&m(!0),s==="viewport"){let k=U=>{U.forEach(V=>{m(V.isIntersecting)})},w=new IntersectionObserver(k,{threshold:.5});return T.current&&w.observe(T.current),()=>{w.disconnect()}}},[s]),v.useEffect(()=>{if(r){let k=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(k)}}},[r]);let O=()=>{d(!0)},$=()=>{d(!1),m(!1)};return u?s!=="intent"?[h,T,{}]:[h,T,{onFocus:Zs(y,O),onBlur:Zs(g,$),onMouseEnter:Zs(p,O),onMouseLeave:Zs(b,$),onTouchStart:Zs(x,O)}]:[!1,T,{}]}function Zs(s,o){return u=>{s&&s(u),u.defaultPrevented||o(u)}}function d1({page:s,...o}){let u=bx(),{nonce:r}=Pc(),{router:d}=md(),h=v.useMemo(()=>y_(d.routes,s,d.basename),[d.routes,s,d.basename]);return h?(o.nonce==null&&r&&(o={...o,nonce:r}),u?v.createElement(h1,{page:s,matches:h,...o}):v.createElement(m1,{page:s,matches:h,...o})):null}function f1(s){let{manifest:o,routeModules:u}=Pc(),[r,d]=v.useState([]);return v.useEffect(()=>{let h=!1;return a1(s,o,u).then(m=>{h||d(m)}),()=>{h=!0}},[s,o,u]),r}function h1({page:s,matches:o,...u}){let r=gl(),{future:d}=Pc(),{basename:h}=md(),m=v.useMemo(()=>{if(s===r.pathname+r.search+r.hash)return[];let y=L_(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&&y.searchParams.set("_routes",p.join(",")),[y.pathname+y.search]},[h,d.v8_trailingSlashAwareDataRequests,s,r,o]);return v.createElement(v.Fragment,null,m.map(y=>v.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...u})))}function m1({page:s,matches:o,...u}){let r=gl(),{future:d,manifest:h,routeModules:m}=Pc(),{basename:y}=md(),{loaderData:g,matches:p}=r1(),b=v.useMemo(()=>Yp(s,o,p,h,r,"data"),[s,o,p,h,r]),x=v.useMemo(()=>Yp(s,o,p,h,r,"assets"),[s,o,p,h,r]),T=v.useMemo(()=>{if(s===r.pathname+r.search+r.hash)return[];let k=new Set,w=!1;if(o.forEach(V=>{let X=h.routes[V.route.id];!X||!X.hasLoader||(!b.some(I=>I.route.id===V.route.id)&&V.route.id in g&&m[V.route.id]?.shouldRevalidate||X.hasClientLoader?w=!0:k.add(V.route.id))}),k.size===0)return[];let U=L_(s,y,d.v8_trailingSlashAwareDataRequests,"data");return w&&k.size>0&&U.searchParams.set("_routes",o.filter(V=>k.has(V.route.id)).map(V=>V.route.id).join(",")),[U.pathname+U.search]},[y,d.v8_trailingSlashAwareDataRequests,g,r,h,b,o,s,m]),O=v.useMemo(()=>s1(x,h),[x,h]),$=f1(x);return v.createElement(v.Fragment,null,T.map(k=>v.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...u})),O.map(k=>v.createElement("link",{key:k,rel:"modulepreload",href:k,...u})),$.map(({key:k,link:w})=>v.createElement("link",{key:k,nonce:u.nonce,...w,crossOrigin:w.crossOrigin??u.crossOrigin})))}function p1(...s){return o=>{s.forEach(u=>{typeof u=="function"?u(o):u!=null&&(u.current=o)})}}var _1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{_1&&(window.__reactRouterVersion="7.18.2")}catch{}function g1({basename:s,children:o,useTransitions:u,window:r}){let d=v.useRef();d.current==null&&(d.current=Zv({window:r,v5Compat:!0}));let h=d.current,[m,y]=v.useState({action:h.action,location:h.location}),g=v.useCallback(p=>{u===!1?y(p):v.startTransition(()=>y(p))},[u]);return v.useLayoutEffect(()=>h.listen(g),[h,g]),v.createElement(Xx,{basename:s,children:o,location:m.location,navigationType:m.action,navigator:h,useTransitions:u})}var oi=v.forwardRef(function({onClick:o,discover:u="render",prefetch:r="none",relative:d,reloadDocument:h,replace:m,mask:y,state:g,target:p,to:b,preventScrollReset:x,viewTransition:T,defaultShouldRevalidate:O,...$},k){let{basename:w,navigator:U,useTransitions:V}=v.useContext(Kt),X=typeof b=="string"&&cd.test(b),I=w_(b,w);b=I.to;let q=kx(b,{relative:d}),W=gl(),Z=null;if(y){let le=Jc(y,[],W.mask?W.mask.pathname:"/",!0);w!=="/"&&(le.pathname=le.pathname==="/"?w:_l([w,le.pathname])),Z=U.createHref(le)}let[Q,ce,ge]=u1(r,$),se=x1(b,{replace:m,mask:y,state:g,target:p,preventScrollReset:x,relative:d,viewTransition:T,defaultShouldRevalidate:O,useTransitions:V});function ye(le){o&&o(le),le.defaultPrevented||se(le)}let Ze=!(I.isExternal||h),ne=v.createElement("a",{...$,...ge,href:(Ze?Z:void 0)||I.absoluteURL||q,onClick:Ze?ye:o,ref:p1(k,ce),target:p,"data-discover":!X&&u==="render"?"true":void 0});return Q&&!X?v.createElement(v.Fragment,null,ne,v.createElement(d1,{page:q})):ne});oi.displayName="Link";var O_=v.forwardRef(function({"aria-current":o="page",caseSensitive:u=!1,className:r="",end:d=!1,style:h,to:m,viewTransition:y,children:g,...p},b){let x=ci(m,{relative:p.relative}),T=gl(),O=v.useContext(Fc),{navigator:$,basename:k}=v.useContext(Kt),w=O!=null&&w1(x)&&y===!0,U=$.encodeLocation?$.encodeLocation(x).pathname:x.pathname,V=T.pathname,X=O&&O.navigation&&O.navigation.location?O.navigation.location.pathname:null;u||(V=V.toLowerCase(),X=X?X.toLowerCase():null,U=U.toLowerCase()),X&&k&&(X=Zl(X,k)||X);const I=U!=="/"&&U.endsWith("/")?U.length-1:U.length;let q=V===U||!d&&V.startsWith(U)&&V.charAt(I)==="/",W=X!=null&&(X===U||!d&&X.startsWith(U)&&X.charAt(U.length)==="/"),Z={isActive:q,isPending:W,isTransitioning:w},Q=q?o:void 0,ce;typeof r=="function"?ce=r(Z):ce=[r,q?"active":null,W?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let ge=typeof h=="function"?h(Z):h;return v.createElement(oi,{...p,"aria-current":Q,className:ce,ref:b,style:ge,to:m,viewTransition:y},typeof g=="function"?g(Z):g)});O_.displayName="NavLink";var y1=v.forwardRef(({discover:s="render",fetcherKey:o,navigate:u,reloadDocument:r,replace:d,state:h,method:m=Uc,action:y,onSubmit:g,relative:p,preventScrollReset:b,viewTransition:x,defaultShouldRevalidate:T,...O},$)=>{let{useTransitions:k}=v.useContext(Kt),w=S1(),U=N1(y,{relative:p}),V=m.toLowerCase()==="get"?"get":"post",X=typeof y=="string"&&cd.test(y),I=q=>{if(g&&g(q),q.defaultPrevented)return;q.preventDefault();let W=q.nativeEvent.submitter,Z=W?.getAttribute("formmethod")||m,Q=()=>w(W||q.currentTarget,{fetcherKey:o,method:Z,navigate:u,replace:d,state:h,relative:p,preventScrollReset:b,viewTransition:x,defaultShouldRevalidate:T});k&&u!==!1?v.startTransition(()=>Q()):Q()};return v.createElement("form",{ref:$,method:V,action:U,onSubmit:r?g:I,...O,"data-discover":!X&&s==="render"?"true":void 0})});y1.displayName="Form";function v1(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function z_(s){let o=v.useContext(Ja);return Xe(o,v1(s)),o}function x1(s,{target:o,replace:u,mask:r,state:d,preventScrollReset:h,relative:m,viewTransition:y,defaultShouldRevalidate:g,useTransitions:p}={}){let b=Wc(),x=gl(),T=ci(s,{relative:m});return v.useCallback(O=>{if(Ix(O,o)){O.preventDefault();let $=u!==void 0?u:ti(x)===ti(T),k=()=>b(s,{replace:$,mask:r,state:d,preventScrollReset:h,relative:m,viewTransition:y,defaultShouldRevalidate:g});p?v.startTransition(()=>k()):k()}},[x,b,T,u,r,d,o,s,h,m,y,g,p])}var b1=0,j1=()=>`__${String(++b1)}__`;function S1(){let{router:s}=z_("useSubmit"),{basename:o}=v.useContext(Kt),u=qx(),r=s.fetch,d=s.navigate;return v.useCallback(async(h,m={})=>{let{action:y,method:g,encType:p,formData:b,body:x}=t1(h,o);if(m.navigate===!1){let T=m.fetcherKey||j1();await r(T,u,m.action||y,{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||y,{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 N1(s,{relative:o}={}){let{basename:u}=v.useContext(Kt),r=v.useContext(ol);Xe(r,"useFormAction must be used inside a RouteContext");let[d]=r.matches.slice(-1),h={...ci(s||".",{relative:o})},m=gl();if(s==null){h.search=m.search;let y=new URLSearchParams(h.search),g=y.getAll("index");if(g.some(b=>b==="")){y.delete("index"),g.filter(x=>x).forEach(x=>y.append("index",x));let b=y.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])),ti(h)}function w1(s,{relative:o}={}){let u=v.useContext(k_);Xe(u!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=z_("useViewTransitionState"),d=ci(s,{relative:o});if(!u.isTransitioning)return!1;let h=Zl(u.currentLocation.pathname,r)||u.currentLocation.pathname,m=Zl(u.nextLocation.pathname,r)||u.nextLocation.pathname;return Qc(d.pathname,m)!=null||Qc(d.pathname,h)!=null}var U_=__();const B_=[{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}]}],H_=B_.flatMap(s=>s.leaves),T1="_sidebar_1q75o_1",E1="_brand_1q75o_11",k1="_brandMark_1q75o_19",A1="_group_1q75o_23",R1="_groupLabel_1q75o_27",C1="_leaves_1q75o_37",D1="_link_1q75o_43",M1="_active_1q75o_60",$1="_soon_1q75o_66",jl={sidebar:T1,brand:E1,brandMark:k1,group:A1,groupLabel:R1,leaves:C1,link:D1,active:M1,soon:$1};function L1(){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"})]}),B_.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(O_,{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 O1={data:void 0,error:void 0,status:"idle",updatedAt:null},li=new Map;function _d(s){let o=li.get(s);return o||(o={snapshot:O1,inFlight:null,fetcher:null,subscribers:new Set},li.set(s,o)),o}function Du(s,o){s.snapshot={...s.snapshot,...o}}function Vp(s){const o=li.get(s);if(o)for(const u of o.subscribers)u()}function z1(s,o){const u=_d(s);return u.subscribers.add(o),()=>{u.subscribers.delete(o)}}function Wu(s){return _d(s).snapshot}function eo(s,o){const u=_d(s);return u.fetcher=o,u.inFlight||(Du(u,{status:u.snapshot.data!==void 0?"refreshing":"loading"}),Vp(s),u.inFlight=o().then(r=>{Du(u,{data:r,error:void 0,status:"success",updatedAt:Date.now()})}).catch(r=>{Du(u,{error:r instanceof Error?r:new Error(String(r)),status:"error"})}).finally(()=>{u.inFlight=null,Vp(s)})),u.inFlight}function wt(s){const o=li.get(s);!o||!o.fetcher||eo(s,o.fetcher)}function Vc(s){for(const o of li.keys())o.startsWith(s)&&wt(o)}const Xp="ashlr.readClientProof.v1",U1=/^[a-f0-9]{64}$/,gd=1200*1e3;function B1(){const s=new Uint8Array(32);return crypto.getRandomValues(s),Array.from(s,o=>o.toString(16).padStart(2,"0")).join("")}function H1(){try{const o=sessionStorage.getItem(Xp);if(o&&U1.test(o))return o}catch{}const s=B1();try{sessionStorage.setItem(Xp,s)}catch{}return s}let q_=H1(),ri=null,Qa=null,Xc={phase:"checking",checked:!1,mutationTokenHeldUntil:null};const Iu=new Set;function q1(){for(const s of Iu)s()}function Wa(s){Xc={...Xc,...s},q1()}function yd(s){return Iu.add(s),()=>Iu.delete(s)}function Fn(){return Xc}function G_(){return q_}async function G1(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":q_}});if(u.status===204){Wa({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 Q1(){Xc.phase==="authenticated"&&Wa({phase:"unauthenticated"})}function Y1(s){Wa({phase:s?"authenticated":"unauthenticated",checked:!0})}function Q_(){return ri}function Xa(){return ri!==null}function Y_(){Qa&&clearTimeout(Qa),Qa=setTimeout(()=>X_(),gd)}function V1(s){ri=s;const o=Date.now()+gd;Wa({mutationTokenHeldUntil:o}),Y_()}function V_(){if(ri===null)return;const s=Date.now()+gd;Wa({mutationTokenHeldUntil:s}),Y_()}function X_(){ri=null,Qa&&(clearTimeout(Qa),Qa=null),Wa({mutationTokenHeldUntil:null})}const X1=["runs","swarms","inbox","daemon","daemon-observation","fleet-activity-ping","fleet-activity-observation","snapshot"],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"]},K1=new Map;let Ya=null,Va=null,to=0;function J1(){return Math.min(1e3*2**to,15e3)}function Z_(){Ya&&(Ya.close(),Ya=null),Va&&(clearTimeout(Va),Va=null)}function F1(){Va||(Va=setTimeout(()=>{Va=null,to+=1,K_()},J1()))}function K_(){if(Fn().phase!=="authenticated")return;Z_();const s=`/api/events?client=${encodeURIComponent(G_())}`,o=new EventSource(s,{withCredentials:!0});Ya=o,o.onopen=()=>{to=0};for(const u of X1)o.addEventListener(u,r=>{const d=r;let h;try{h=JSON.parse(d.data)}catch{h=void 0}for(const y of Z1[u])wt(y);u==="inbox"&&(Vc("inbox-list:"),Vc("proposal-detail-"));const m=K1.get(u);if(m)for(const y of m)y(h)});o.onerror=()=>{o.close(),Ya===o&&(Ya=null),Fn().phase==="authenticated"&&F1()}}yd(()=>{Fn().phase==="authenticated"?(to=0,K_()):Z_()});function Re(s){const o=v.useSyncExternalStore(v.useCallback(u=>z1(s.key,u),[s.key]),()=>Wu(s.key),()=>Wu(s.key));return v.useEffect(()=>{const u=new AbortController;return eo(s.key,()=>s.fetch(u.signal)),()=>u.abort()},[s.key]),o}function Zc(s){return v.useCallback(()=>{eo(s.key,()=>s.fetch())},[s])}function W1(){return v.useSyncExternalStore(yd,()=>Fn().phase,()=>Fn().phase)}function vd(){const s=v.useSyncExternalStore(yd,()=>Fn().mutationTokenHeldUntil,()=>Fn().mutationTokenHeldUntil);return{hasHold:Xa(),token:Q_(),heldUntil:s,setToken:V1,touch:V_,clear:X_}}const I1=180*1e3,Zp=7200*1e3,P1=1440*60*1e3;function eb(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 tb(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:eb(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(y=>y.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(y=>y.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),y=m!==null?u-m:0,g=y>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:y>Zp?`Oldest has been waiting ${Math.round(y/(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()>P1)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 y=u-new Date(m.updatedAt).getTime();y>I1&&o.push({id:`run-stalled-${m.id}`,category:"run",severity:"medium",title:`No update from a running run in ${Math.round(y/6e4)}m`,detail:m.goal,ts:m.updatedAt,actionHref:`/work/runs/${m.id}`,actionLabel:"Watch live"})}}return o}function lb(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 J_="ashlr.notifications.mutedCategories.v1",xd="ashlr.notifications.desktopEnabled.v1";function nb(){try{const s=localStorage.getItem(J_);if(!s)return new Set;const o=JSON.parse(s);if(Array.isArray(o))return new Set(o)}catch{}return new Set}function ab(s){try{localStorage.setItem(J_,JSON.stringify([...s]))}catch{}}function sb(){try{return localStorage.getItem(xd)==="1"}catch{return!1}}function bd(){return typeof Notification>"u"?"unsupported":Notification.permission}const Sn=nb();let Pu=[],ni=!1,Za=sb();const Mu=new Set;let F_={items:[],panelOpen:!1,mutedCategories:[...Sn],desktopEnabled:Za,desktopPermission:bd()};const ed=new Set;function ib(){for(const s of ed)s()}function Pn(){F_={items:lb(Pu.filter(o=>!Sn.has(o.category))),panelOpen:ni,mutedCategories:[...Sn],desktopEnabled:Za,desktopPermission:bd()},ib()}function cb(s){return ed.add(s),()=>ed.delete(s)}function Kp(){return F_}function ob(s){const o=new Set(Pu.map(u=>u.id));if(Pu=s,Za&&bd()==="granted"){for(const u of s)if(!Sn.has(u.category)&&!(u.severity!=="critical"&&u.severity!=="high")&&!(o.has(u.id)||Mu.has(u.id))){Mu.add(u.id);try{new Notification(u.title,{body:u.detail,tag:u.id})}catch{}}}for(const u of s)Mu.add(u.id);Pn()}function rb(){ni=!0,Pn()}function $u(){ni=!1,Pn()}function ub(){ni=!ni,Pn()}function db(s){return Sn.has(s)}function fb(s,o){o?Sn.add(s):Sn.delete(s),ab(Sn),Pn()}async function hb(){if(typeof Notification>"u")return"unsupported";let s=Notification.permission;s==="default"&&(s=await Notification.requestPermission()),Za=s==="granted";try{localStorage.setItem(xd,Za?"1":"0")}catch{}return Pn(),s}function mb(){Za=!1;try{localStorage.setItem(xd,"0")}catch{}Pn()}function W_(){return v.useSyncExternalStore(cb,Kp,Kp)}const pb="_bell_c1uhc_1",_b="_badge_c1uhc_25",gb="_badgeUrgent_c1uhc_41",Lu={bell:pb,badge:_b,badgeUrgent:gb};function yb(){const{items:s}=W_(),o=s.filter(r=>r.severity==="critical"||r.severity==="high").length,u=s.length;return a.jsxs("button",{type:"button",className:Lu.bell,onClick:ub,"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:`${Lu.badge} ${o>0?Lu.badgeUrgent:""}`,"aria-hidden":"true",children:u>99?"99+":u}):null]})}const vb="_backdrop_lqpd9_1",xb="_dialog_lqpd9_13",bb="_title_lqpd9_25",Ou={backdrop:vb,dialog:xb,title:bb},jb=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function ui({open:s,onClose:o,titleId:u,title:r,children:d,initialFocusRef:h,widthClassName:m}){const y=v.useRef(null),g=v.useRef(null);return v.useEffect(()=>s?(g.current=document.activeElement,(h?.current??y.current)?.focus({preventScroll:!0}),()=>{g.current?.focus?.({preventScroll:!0})}):void 0,[s]),v.useEffect(()=>{if(!s)return;function p(b){if(b.key==="Escape"){b.stopPropagation(),o();return}if(b.key!=="Tab")return;const x=y.current;if(!x)return;const T=Array.from(x.querySelectorAll(jb)).filter(k=>k.offsetParent!==null);if(T.length===0)return;const O=T[0],$=T[T.length-1];b.shiftKey&&document.activeElement===O?(b.preventDefault(),$.focus()):!b.shiftKey&&document.activeElement===$&&(b.preventDefault(),O.focus())}return document.addEventListener("keydown",p,!0),()=>document.removeEventListener("keydown",p,!0)},[s,o]),s?U_.createPortal(a.jsx("div",{className:Ou.backdrop,onMouseDown:p=>p.target===p.currentTarget&&o(),children:a.jsxs("div",{ref:y,className:`${Ou.dialog} ${m??""}`,role:"dialog","aria-modal":"true","aria-labelledby":u,tabIndex:-1,children:[a.jsx("h2",{id:u,className:Ou.title,children:r}),d]})}),document.body):null}const Sb="_unknown_14ftv_1",Nb="_dot_14ftv_11",wb="_badge_14ftv_19",td={unknown:Sb,dot:Nb,badge:wb};function jd(s){return s?s.sourceState==="healthy"&&s.complete!==!1:!0}function Pe({quality:s,children:o,renderControl:u,label:r}){if(jd(s))return a.jsxs(a.Fragment,{children:[o,u?.()]});const d=s?.reason;return a.jsxs("span",{className:td.unknown,title:d?`Unavailable: ${d}`:"Source data unavailable",children:[a.jsx("span",{className:td.dot,"aria-hidden":"true"}),"unknown",r?a.jsxs("span",{className:"visually-hidden",children:[" (",r,")"]}):null]})}function Tb({quality:s,label:o}){return jd(s)?null:a.jsxs("span",{className:td.badge,title:s?.reason??"Source data unavailable",children:[o?`${o}: `:"","unknown"]})}const Eb="_badge_w420y_1",kb="_dot_w420y_13",Ab="_neutral_w420y_20",Rb="_info_w420y_28",Cb="_running_w420y_36",Db="_pulse_w420y_1",Mb="_success_w420y_45",$b="_warning_w420y_53",Lb="_danger_w420y_61",Ob="_unknown_w420y_69",zb="_phaseDot_w420y_78",Hc={badge:Eb,dot:kb,neutral:Ab,info:Rb,running:Cb,pulse:Db,success:Mb,warning:$b,danger:Lb,unknown:Ob,phaseDot:zb},Ub={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 I_(s){return s?Ub[s.toLowerCase()]??"neutral":"unknown"}function Je({status:s,tone:o,children:u}){const r=o??I_(s);return a.jsxs("span",{className:`${Hc.badge} ${Hc[r]}`,children:[a.jsx("span",{className:Hc.dot,"aria-hidden":"true"}),u??s]})}function Bb({index:s}){const o=(s%6+6)%6;return a.jsx("span",{className:Hc.phaseDot,style:{background:`var(--phase-${o+1})`},"aria-hidden":"true"})}function Hb(s){switch(s){case"critical":return"danger";case"high":return"warning";case"medium":return"running";case"low":return"neutral";case"info":return"info"}}const zu={"action-required":"Action required",readiness:"Autonomous readiness",security:"Security",budget:"Budget & limits","daemon-health":"Daemon health",proposal:"Proposals",run:"Runs","log-source":"Log source"},qb="_item_1gxz9_1",Gb="_top_1gxz9_15",Qb="_category_1gxz9_21",Yb="_time_1gxz9_26",Vb="_title_1gxz9_32",Xb="_detail_1gxz9_39",Zb="_actions_1gxz9_45",Kb="_actionLink_1gxz9_52",Jb="_muteBtn_1gxz9_58",Yl={item:qb,top:Gb,category:Qb,time:Yb,title:Vb,detail:Xb,actions:Zb,actionLink:Kb,muteBtn:Jb};function Fb(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 Wb({item:s}){const o=db(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(Je,{status:s.severity,tone:Hb(s.severity),children:s.severity.toUpperCase()}),a.jsx("span",{className:Yl.category,children:zu[s.category]}),a.jsx("span",{className:Yl.time,title:new Date(s.ts).toLocaleString(),children:Fb(s.ts)})]}),a.jsx("h3",{className:Yl.title,children:s.title}),a.jsx("p",{className:Yl.detail,children:s.sourceQuality?a.jsx(Pe,{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:()=>fb(s.category,!o),"aria-pressed":o,children:o?`Unmute ${zu[s.category]}`:`Mute ${zu[s.category]}`})]})]})}class Ka extends Error{constructor(o,u,r){super(o),this.status=u,this.path=r,this.name="ApiError"}}class Sd extends Ka{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":G_()},signal:o});if(u.status===401)throw Q1(),new Ka("Read session expired.",401,s);if(!u.ok)throw new Ka(`GET ${s} failed (HTTP ${u.status}).`,u.status,s);return await u.json()}async function Ib(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 Sd(s);if(r.status===401)throw new Ka("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 Ka(`POST ${s} failed (HTTP ${r.status})${d}.`,r.status,s)}if(r.status!==204)return await r.json()}const Kn={key:"dashboard-snapshot",fetch:s=>mt("/api/snapshot",s)},ai={key:"control-snapshot",fetch:s=>mt("/api/control",s)},Nd={key:"runs",fetch:s=>mt("/api/runs",s)};function P_(s){return{key:`run-detail-${s}`,fetch:o=>mt(`/api/run/${encodeURIComponent(s)}`,o)}}const Pb={key:"swarms",fetch:s=>mt("/api/swarms",s)};function ej(s){return{key:`swarm-detail-${s}`,fetch:o=>mt(`/api/swarm/${encodeURIComponent(s)}`,o)}}const tj={key:"daemon",fetch:s=>mt("/api/daemon-observation",s)},ld={key:"fleet",fetch:s=>mt("/api/fleet",s)},eg={key:"fleet-activity",fetch:s=>mt("/api/fleet-activity",s)},lj={key:"goals",fetch:s=>mt("/api/goals",s)},nj={key:"vision-mission",fetch:s=>mt("/api/vision/mission",s)},tg={key:"inbox",fetch:s=>mt("/api/inbox",s)};function aj(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 lg(s){return{key:`proposal-detail-${s}`,fetch:o=>mt(`/api/inbox/${encodeURIComponent(s)}`,o)}}const Jp={key:"control-logs-observation",fetch:s=>mt("/api/logs-observation?tail=200",s)};function sj(s){return{key:`pulse-${s}`,fetch:o=>mt(`/api/pulse?window=${s}`,o)}}function ij(s){return typeof s=="object"&&s!==null&&"entry"in s&&"score"in s}function cj(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 oj(s){return{key:`models-${s}`,fetch:o=>mt(`/api/models?window=${s}`,o)}}const rj={key:"portfolio",fetch:s=>mt("/api/portfolio",s)},uj=8e3;function dj(){const s=Re(ai),o=Re(ld),u=Re(Nd),r=Re(tg),d=Zc(ai),h=Zc(ld);v.useEffect(()=>{const b=setInterval(()=>{d(),h()},uj);return()=>clearInterval(b)},[d,h]);const m=s.data,y=o.data,g=u.data,p=r.data;v.useEffect(()=>{ob(tb({control:m,fleet:y,runs:g,inbox:p}))},[m,y,g,p])}const fj="_drawer_itt3q_1",hj="_titleRow_itt3q_16",mj="_closeBtn_itt3q_23",pj="_header_itt3q_37",_j="_desktopToggle_itt3q_42",gj="_clear_itt3q_57",yj="_list_itt3q_66",vj="_journalLink_itt3q_77",bn={drawer:fj,titleRow:hj,closeBtn:mj,header:pj,desktopToggle:_j,clear:gj,list:yj,journalLink:vj};function xj(){dj();const{items:s,panelOpen:o,desktopEnabled:u,desktopPermission:r}=W_(),d=v.useRef(null);async function h(){u?mb():await hb()}return a.jsxs(ui,{open:o,onClose:$u,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:$u,"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(Wb,{item:m})},m.id))}),a.jsx("a",{href:"#/journal",className:bn.journalLink,onClick:$u,children:"See full history in the Work Journal →"})]})}const bj="_topbar_1iko4_1",jj="_paletteTrigger_1iko4_12",Sj="_kbd_1iko4_32",Nj="_actions_1iko4_41",wj="_lockedIndicator_1iko4_47",Tj="_lockBtn_1iko4_52",Ej="_themeBtn_1iko4_60",Yn={topbar:bj,paletteTrigger:jj,kbd:Sj,actions:Nj,lockedIndicator:wj,lockBtn:Tj,themeBtn:Ej},ng="ashlr.theme.v1";function kj(s){const o=document.documentElement;s==="system"?o.removeAttribute("data-theme"):o.setAttribute("data-theme",s)}function Aj(){try{const s=localStorage.getItem(ng);if(s==="light"||s==="dark"||s==="system")return s}catch{}return"system"}function Rj({onOpenPalette:s}){const[o,u]=v.useState(Aj),r=vd();v.useEffect(()=>{kj(o);try{localStorage.setItem(ng,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(xj,{})]})}class Cj extends Error{constructor(){super("No mutation token held for this session yet."),this.name="MissingMutationTokenError"}}async function lo(s,o){const u=Q_();if(!u)throw new Cj;const r=await Ib(s,o,u);return V_(),r}async function ag(){await lo("/api/fleet/pause",{}),wt("dashboard-snapshot"),wt("control-snapshot"),wt("fleet"),wt("fleet-activity")}async function sg(){await lo("/api/fleet/resume",{}),wt("dashboard-snapshot"),wt("control-snapshot"),wt("fleet"),wt("fleet-activity")}async function ig(s){await lo(`/api/inbox/${encodeURIComponent(s)}/approve`,{}),wt("inbox"),wt("dashboard-snapshot"),wt(`proposal-detail-${s}`),Vc("inbox-list:")}async function cg(s){await lo(`/api/inbox/${encodeURIComponent(s)}/reject`,{}),wt("inbox"),wt("dashboard-snapshot"),wt(`proposal-detail-${s}`),Vc("inbox-list:")}const Dj=H_.map(s=>({id:`nav:${s.path}`,title:s.label,subtitle:s.description,group:"Navigate",run:o=>o(s.path)})),Mj=[{id:"action:pause-fleet",title:"Pause fleet",subtitle:"Engage the fleet kill switch",group:"Actions",keywords:["stop","kill","halt"],requiresMutationToken:!0,run:async()=>{await ag()}},{id:"action:resume-fleet",title:"Resume fleet",subtitle:"Clear the fleet kill switch",group:"Actions",keywords:["start","unpause"],requiresMutationToken:!0,run:async()=>{await sg()}},{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:()=>{rb()}}],Fp=[...Dj,...Mj];function $j(s){const o=s.trim().toLowerCase();return o?Fp.filter(u=>{const r=[u.title,u.subtitle??"",...u.keywords??[]].join(" ").toLowerCase();return o.split(/\s+/).every(d=>r.includes(d))}):Fp}const Lj="_body_1kukj_1",Oj="_form_1kukj_8",zj="_label_1kukj_14",Uj="_inputRow_1kukj_19",Bj="_input_1kukj_19",Hj="_reveal_1kukj_40",qj="_error_1kukj_51",Gj="_actions_1kukj_56",Qj="_cancel_1kukj_63",Yj="_submit_1kukj_72",Sl={body:Lj,form:Oj,label:zj,inputRow:Uj,input:Bj,reveal:Hj,error:qj,actions:Gj,cancel:Qj,submit:Yj},Vj=/^[a-f0-9]{64}$/;function no({open:s,onClose:o,reason:u}){const{setToken:r}=vd(),[d,h]=v.useState(""),[m,y]=v.useState(!1),[g,p]=v.useState(null),b=v.useRef(null),x=v.useId(),T=v.useId();function O($){$.preventDefault();const k=d.trim();if(!Vj.test(k)){p("Expected 64 hex characters — the mutation token ashlr serve printed.");return}r(k),h(""),p(null),o()}return a.jsxs(ui,{open:s,onClose:o,titleId:x,title:"Unlock actions",initialFocusRef:b,children:[a.jsxs("p",{className:Sl.body,children:[u??"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:O,className:Sl.form,noValidate:!0,children:[a.jsx("label",{htmlFor:T,className:Sl.label,children:"Mutation token"}),a.jsxs("div",{className:Sl.inputRow,children:[a.jsx("input",{ref:b,id:T,type:m?"text":"password",autoComplete:"off",autoCorrect:"off",spellCheck:!1,className:Sl.input,value:d,onChange:$=>h($.target.value),"aria-invalid":g?!0:void 0,placeholder:"64 hex characters"}),a.jsx("button",{type:"button",className:Sl.reveal,onClick:()=>y($=>!$),"aria-pressed":m,children:m?"Hide":"Show"})]}),g?a.jsx("p",{className:Sl.error,role:"alert",children:g}):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:d.trim().length===0,children:"Unlock"})]})]})]})}const Xj="_region_1s6sa_1",Zj="_toast_1s6sa_12",Kj="_success_1s6sa_27",Jj="_danger_1s6sa_30",Fj="_dismiss_1s6sa_34",Rc={region:Xj,toast:Zj,"slide-in":"_slide-in_1s6sa_1",success:Kj,danger:Jj,dismiss:Fj},og=v.createContext(null);function Wj(){const s=v.useContext(og);if(!s)throw new Error("useToast() called outside <ToastProvider>");return s}const Ij=5e3;function Pj({children:s}){const[o,u]=v.useState([]),r=v.useRef(0),d=v.useCallback(y=>{u(g=>g.filter(p=>p.id!==y))},[]),h=v.useCallback((y,g="neutral")=>{const p=r.current++;u(b=>[...b,{id:p,message:y,tone:g}]),setTimeout(()=>d(p),Ij)},[d]),m=v.useMemo(()=>({show:h}),[h]);return a.jsxs(og.Provider,{value:m,children:[s,a.jsx("div",{className:Rc.region,role:"status","aria-live":"polite",children:o.map(y=>a.jsxs("div",{className:`${Rc.toast} ${Rc[y.tone]}`,children:[a.jsx("span",{children:y.message}),a.jsx("button",{type:"button",className:Rc.dismiss,onClick:()=>d(y.id),"aria-label":"Dismiss",children:"×"})]},y.id))})]})}const e0="_backdrop_1odjm_1",t0="_panel_1odjm_12",l0="_input_1odjm_24",n0="_list_1odjm_37",a0="_item_1odjm_42",s0="_active_1odjm_51",i0="_itemTitle_1odjm_55",c0="_itemSubtitle_1odjm_61",o0="_itemGroup_1odjm_67",r0="_empty_1odjm_75",Nl={backdrop:e0,panel:t0,input:l0,list:n0,item:a0,active:s0,itemTitle:i0,itemSubtitle:c0,itemGroup:o0,empty:r0};function u0(s){v.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 d0({open:s,onClose:o}){const[u,r]=v.useState(""),[d,h]=v.useState(0),[m,y]=v.useState(null),g=v.useRef(null),p=v.useId(),b=Wc(),x=Wj(),T=v.useMemo(()=>$j(u),[u]);v.useEffect(()=>{s&&(r(""),h(0),requestAnimationFrame(()=>g.current?.focus()))},[s]),v.useEffect(()=>{h(0)},[u]);async function O(k){if(k.requiresMutationToken&&!Xa()){y(k),o();return}o();try{await k.run(w=>b(w))}catch(w){x.show(w instanceof Error?w.message:"Command failed.","danger")}}function $(k){if(k.key==="Escape"){o();return}if(k.key==="ArrowDown")k.preventDefault(),h(w=>Math.min(w+1,T.length-1));else if(k.key==="ArrowUp")k.preventDefault(),h(w=>Math.max(w-1,0));else if(k.key==="Enter"){k.preventDefault();const w=T[d];w&&O(w)}}return s?U_.createPortal(a.jsx("div",{className:Nl.backdrop,onMouseDown:k=>k.target===k.currentTarget&&o(),children:a.jsxs("div",{className:Nl.panel,role:"dialog","aria-modal":"true","aria-label":"Command palette",children:[a.jsx("input",{ref:g,className:Nl.input,value:u,onChange:k=>r(k.target.value),onKeyDown:$,placeholder:"Navigate or run a command…",role:"combobox","aria-expanded":"true","aria-controls":p,"aria-activedescendant":T[d]?`cmd-${T[d].id}`:void 0,autoComplete:"off"}),a.jsx("ul",{id:p,role:"listbox",className:Nl.list,children:T.length===0?a.jsx("li",{className:Nl.empty,children:"No matching commands."}):T.map((k,w)=>a.jsxs("li",{id:`cmd-${k.id}`,role:"option","aria-selected":w===d,className:`${Nl.item} ${w===d?Nl.active:""}`,onMouseEnter:()=>h(w),onMouseDown:U=>{U.preventDefault(),O(k)},children:[a.jsx("span",{className:Nl.itemTitle,children:k.title}),k.subtitle?a.jsx("span",{className:Nl.itemSubtitle,children:k.subtitle}):null,a.jsx("span",{className:Nl.itemGroup,children:k.group})]},k.id))})]})}),document.body):m?a.jsx(no,{open:!0,reason:`"${m.title}" requires the dispatch token.`,onClose:()=>y(null)}):null}const f0="_wrap_1759l_1",h0="_title_1759l_14",m0="_detail_1759l_21",p0="_retry_1759l_27",Cc={wrap:f0,title:h0,detail:m0,retry:p0};class _0 extends v.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:Cc.wrap,role:"alert",children:[a.jsx("p",{className:Cc.title,children:"This view hit an error and couldn't render."}),a.jsxs("p",{className:Cc.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:Cc.retry,onClick:()=>this.setState({error:null}),children:"Retry this view"})]}):this.props.children}}const Uu=new Map;function Wp(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 g0(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 Kl(s,o){const u=v.useRef(s);u.current=s,v.useLayoutEffect(()=>{const r=o.current;if(!r)return;const d=Uu.get(s);d&&g0(r,d)},[s]),v.useEffect(()=>{const r=o.current;if(!r)return;let d=0;function h(){cancelAnimationFrame(d),d=requestAnimationFrame(()=>{r&&Uu.set(u.current,Wp(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),Uu.set(u.current,Wp(r))}},[o])}const y0="_shell_1gukc_1",v0="_body_1gukc_9",x0="_main_1gukc_17",Bu={shell:y0,body:v0,main:x0};function b0(){const s=v.useRef(null),o=gl(),[u,r]=v.useState(!1);return Kl(o.pathname,s),u0(r),a.jsxs("div",{className:Bu.shell,children:[a.jsx(L1,{}),a.jsxs("div",{className:Bu.body,children:[a.jsx(Rj,{onOpenPalette:()=>r(!0)}),a.jsx("main",{ref:s,className:Bu.main,id:"main-content",tabIndex:-1,children:a.jsx(_0,{resetKey:o.pathname,children:a.jsx(Vx,{})})})]}),a.jsx(d0,{open:u,onClose:()=>r(!1)})]})}const j0="_wrap_152mr_1",S0="_title_152mr_6",N0="_description_152mr_13",w0="_note_152mr_19",Dc={wrap:j0,title:S0,description:N0,note:w0};function T0({title:s,description:o}){return a.jsxs("div",{className:Dc.wrap,children:[a.jsx("h1",{className:Dc.title,children:s}),a.jsx("p",{className:Dc.description,children:o}),a.jsx("p",{className:Dc.note,children:"Not built yet — this route, its nav entry, and its ⌘K command all already work."})]})}const E0="_root_15oa4_1",k0="_spinner_15oa4_9",Ip={root:E0,spinner:k0};function Tt({label:s="Refreshing"}){return a.jsxs("span",{className:Ip.root,role:"status","aria-live":"polite",children:[a.jsx("span",{className:Ip.spinner,"aria-hidden":"true"}),a.jsx("span",{className:"visually-hidden",children:s})]})}const A0="_grid_6kplz_1",R0="_card_6kplz_7",C0="_title_6kplz_17",D0="_stat_6kplz_23",M0="_caption_6kplz_29",$0="_line_6kplz_35",L0="_row_6kplz_40",O0="_cell_6kplz_48",pl={grid:A0,card:R0,title:C0,stat:D0,caption:M0,line:$0,row:L0,cell:O0};function tt({width:s="100%"}){return a.jsx("div",{className:`skeleton ${pl.line}`,style:{width:s}})}function z0(){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 si({count:s=4}){return a.jsx("div",{className:pl.grid,children:Array.from({length:s},(o,u)=>a.jsx(z0,{},u))})}const U0="_grid_1exd8_1",B0="_stat_1exd8_7",H0="_statLabel_1exd8_17",q0="_statValue_1exd8_24",G0="_statCaption_1exd8_30",ei={grid:U0,stat:B0,statLabel:H0,statValue:q0,statCaption:G0};function Q0(){return a.jsx(si,{count:6})}function Ua({label:s,value:o,caption:u}){return a.jsxs("div",{className:ei.stat,children:[a.jsx("span",{className:ei.statLabel,children:s}),a.jsx("span",{className:ei.statValue,children:o}),u?a.jsx("span",{className:ei.statCaption,children:u}):null]})}function Y0({snapshot:s}){const o=s.mcp.filter(u=>u.ok).length;return a.jsxs("div",{className:ei.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 V0="_panel_1gx0q_3",X0="_panelHeader_1gx0q_10",Z0="_panelTitle_1gx0q_25",K0="_panelBody_1gx0q_33",J0="_emptyState_1gx0q_37",et={panel:V0,panelHeader:X0,panelTitle:Z0,panelBody:K0,emptyState:J0},F0="_table_78j3m_1",W0="_statusCol_78j3m_27",I0="_tokensCol_78j3m_31",P0="_goalLink_78j3m_35",eS="_tokens_78j3m_31",Ks={table:F0,statusCol:W0,tokensCol:I0,goalLink:P0,tokens:eS};function tS(){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 lS({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:Ks.table,children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{scope:"col",children:"Goal"}),a.jsx("th",{scope:"col",className:Ks.statusCol,children:"Status"}),a.jsx("th",{scope:"col",className:Ks.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:Ks.goalLink,title:o.goal,children:o.goal})}),a.jsx("td",{children:a.jsx(Je,{status:o.status})}),a.jsx("td",{className:Ks.tokens,children:o.tokens.toLocaleString()})]},o.id))})]})})]})}const nS="_list_1fq6m_1",aS="_item_1fq6m_7",sS="_itemHeader_1fq6m_13",iS="_goal_1fq6m_21",cS="_burndown_1fq6m_42",oS="_burndownTrack_1fq6m_48",rS="_burndownFill_1fq6m_56",uS="_burndownLabel_1fq6m_63",jn={list:nS,item:aS,itemHeader:sS,goal:iS,burndown:cS,burndownTrack:oS,burndownFill:rS,burndownLabel:uS};function dS({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(Bb,{index:u}):null,a.jsx("span",{className:jn.goal,children:o.goal}),a.jsx(Je,{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 fS="_grid_qy4m7_1",hS={grid:fS};function mS(){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 pS({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(Pe,{quality:s.sourceQuality,label:"daemon state",children:a.jsx(Je,{status:s.running?"running":"pending",children:s.running?"running":"stopped"})})]}),a.jsx("div",{className:et.panelBody,children:a.jsxs("dl",{className:hS.grid,children:[a.jsxs("div",{children:[a.jsx("dt",{children:"Runtime state"}),a.jsx("dd",{children:a.jsx(Pe,{quality:s.sourceQuality,label:"runtime state",children:s.runtimeState})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"PID"}),a.jsx("dd",{children:a.jsx(Pe,{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(Pe,{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(Pe,{quality:s.sourceQuality,label:"direction mode",children:s.activeDirectionMode??"none"})})]})]})})]})}const _S="_view_1nttk_1",gS="_header_1nttk_8",yS="_title_1nttk_14",vS="_freshness_1nttk_20",xS="_freshnessLabel_1nttk_26",bS="_panels_1nttk_32",jS="_error_1nttk_39",Zn={view:_S,header:gS,title:yS,freshness:vS,freshnessLabel:xS,panels:bS,error:jS};function SS(){const s=Re(Kn),o=Re(ai);return a.jsxs("div",{className:Zn.view,children:[a.jsxs("header",{className:Zn.header,children:[a.jsx("h1",{className:Zn.title,children:"Fleet Dashboard"}),a.jsxs("div",{className:Zn.freshness,"aria-live":"polite",children:[s.status==="refreshing"?a.jsx(Tt,{}):null,s.updatedAt?a.jsxs("span",{className:Zn.freshnessLabel,children:["Updated ",NS(s.updatedAt)]}):null]})]}),s.status==="loading"?a.jsx(Q0,{}):s.status==="error"?a.jsx(Pp,{message:s.error?.message??"Failed to load snapshot."}):s.data?a.jsx(Y0,{snapshot:s.data}):null,a.jsxs("div",{className:Zn.panels,children:[s.status==="loading"?a.jsx(tS,{}):s.data?a.jsx(lS,{runs:s.data.runs}):null,s.data?a.jsx(dS,{swarms:s.data.swarms}):null,o.status==="loading"?a.jsx(mS,{}):o.status==="error"?a.jsx(Pp,{message:o.error?.message??"Failed to load control snapshot."}):o.data?a.jsx(pS,{daemon:o.data.daemon}):null]})]})}function Pp({message:s}){return a.jsx("div",{className:Zn.error,role:"alert",children:s})}function NS(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 Kc=2e3,wS=Kc*4;function TS(s){return s?`${s.status}:${s.steps.length}:${s.updatedAt}`:null}function ES(s){const o=v.useMemo(()=>P_(s),[s]),u=Re(o),r=Zc(o),[d,h]=v.useState(null),[m,y]=v.useState(null),[,g]=v.useState(0),p=TS(u.data);v.useEffect(()=>{p!==null&&h(Date.now())},[p]);const b=u.data?u.data.status!=="running":!1,x=u.error instanceof Ka&&u.error.status===404;v.useEffect(()=>{if(b||x)return;const O=setInterval(()=>{r(),y(Date.now()),g($=>$+1)},Kc);return()=>clearInterval(O)},[r,b,x]);let T;return x?T="not-found":u.status==="error"&&u.data===void 0?T="error":u.status==="loading"?T="connecting":u.data?u.data.status!=="running"?T="done":d!==null&&Date.now()-d>wS?T="stalled":T="live":T="connecting",{phase:T,run:u.data,error:u.error,lastChangedAt:d,lastPolledAt:m,pollNow:()=>{r(),y(Date.now())}}}const kS="_panel_15uot_1",AS="_header_15uot_12",RS="_headerTop_15uot_18",CS="_title_15uot_25",DS="_statRow_15uot_35",MS="_banner_15uot_53",$S="_bannerWarning_15uot_64",LS="_bannerDanger_15uot_69",OS="_bannerDot_15uot_74",zS="_transcript_15uot_102",US="_empty_15uot_120",BS="_step_15uot_127",HS="_stepKind_15uot_140",qS="_stepTime_15uot_160",GS="_stepTask_15uot_164",QS="_stepSummary_15uot_171",YS="_stepUsage_15uot_176",Oe={panel:kS,header:AS,headerTop:RS,title:CS,statRow:DS,banner:MS,bannerWarning:$S,bannerDanger:LS,bannerDot:OS,transcript:zS,empty:US,step:BS,stepKind:HS,stepTime:qS,stepTask:GS,stepSummary:QS,stepUsage:YS},VS={plan:"Plan",model:"Model",tool:"Tool",synthesize:"Synthesize"};function XS(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 KS({phase:s,lastChangedAt:o,error:u}){if(s==="connecting")return a.jsxs("div",{className:Oe.banner,role:"status",children:[a.jsx("span",{className:Oe.bannerDot,"data-tone":"connecting","aria-hidden":"true"}),"Connecting to run…"]});if(s==="not-found")return a.jsxs("div",{className:`${Oe.banner} ${Oe.bannerDanger}`,role:"alert",children:[a.jsx("span",{className:Oe.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:`${Oe.banner} ${Oe.bannerDanger}`,role:"alert",children:[a.jsx("span",{className:Oe.bannerDot,"data-tone":"danger","aria-hidden":"true"}),"Stream disconnected",u?`: ${u.message}`:"",". Retrying every ",Kc/1e3,"s…"]});if(s==="stalled"){const r=o?Math.round((Date.now()-o)/1e3):null;return a.jsxs("div",{className:`${Oe.banner} ${Oe.bannerWarning}`,role:"status","aria-live":"polite",children:[a.jsx("span",{className:Oe.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:Oe.banner,role:"status",children:[a.jsx("span",{className:Oe.bannerDot,"data-tone":"live","aria-hidden":"true"}),"Live · polling every ",Kc/1e3,"s (server refresh floor ~1.5s — this cannot be faster than that)"]}):a.jsxs("div",{className:Oe.banner,role:"status",children:[a.jsx("span",{className:Oe.bannerDot,"data-tone":"done","aria-hidden":"true"}),"Run finished — no longer polling."]})}function JS(){return a.jsxs("div",{className:Oe.panel,children:[a.jsx(tt,{width:"40%"}),a.jsx(tt,{width:"90%"}),a.jsx(tt,{width:"70%"})]})}function rg({runId:s}){const o=ES(s),{phase:u,run:r,error:d,lastChangedAt:h}=o,m=v.useRef(null),y=v.useRef(!0);v.useEffect(()=>{const p=m.current;!p||!y.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;y.current=b<48}return!r&&u==="connecting"?a.jsx(JS,{}):a.jsxs("div",{className:Oe.panel,children:[a.jsxs("header",{className:Oe.header,children:[a.jsxs("div",{className:Oe.headerTop,children:[a.jsx("h3",{className:Oe.title,children:r?.goal??`Run ${s}`}),r?a.jsx(Je,{status:r.status}):null]}),r?a.jsxs("dl",{className:Oe.statRow,children:[a.jsxs("div",{children:[a.jsx("dt",{children:"Elapsed"}),a.jsx("dd",{children:XS(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(KS,{phase:u,lastChangedAt:h,error:d}),a.jsx("div",{ref:m,className:Oe.transcript,onScroll:g,tabIndex:0,role:"log","aria-label":"Run step transcript",children:!r||r.steps.length===0?a.jsx("p",{className:Oe.empty,children:"No steps recorded yet."}):r.steps.map((p,b)=>a.jsxs("div",{className:Oe.step,"data-focus-key":`run-stream-step-${b}`,children:[a.jsx("span",{className:Oe.stepKind,"data-kind":p.kind,children:VS[p.kind]??p.kind}),a.jsx("span",{className:Oe.stepTime,title:p.ts,children:ZS(p.ts)}),a.jsx("span",{className:Oe.stepTask,children:p.taskId}),a.jsx("span",{className:Oe.stepSummary,children:p.summary}),p.usage?a.jsxs("span",{className:Oe.stepUsage,children:[(p.usage.tokensIn+p.usage.tokensOut).toLocaleString()," tok"]}):null]},`${p.ts}-${b}`))})]})}const FS="_strip_21e8x_1",WS="_label_21e8x_11",IS="_list_21e8x_20",PS="_watchBtn_21e8x_29",eN="_pulse_21e8x_46",tN="_dialogWidth_21e8x_70",Ba={strip:FS,label:WS,list:IS,watchBtn:PS,pulse:eN,dialogWidth:tN};function lN(){const s=Re(Kn),[o,u]=v.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(ui,{open:o!==null,onClose:()=>u(null),titleId:"live-now-title",title:"Watching live",widthClassName:Ba.dialogWidth,children:o?a.jsx(rg,{runId:o}):null})]})}const nN="_bar_1kce8_1",aN="_search_1kce8_12",sN="_sources_1kce8_28",iN="_sourceOption_1kce8_34",cN="_windowSelect_1kce8_43",Js={bar:nN,search:aN,sources:sN,sourceOption:iN,windowSelect:cN},ug=[{value:"run",label:"Runs"},{value:"merge",label:"Merges"},{value:"proposal",label:"Proposals"},{value:"agent-action",label:"Agent actions"},{value:"daemon-tick",label:"Daemon ticks"}],e_=[{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 oN({sources:s,onSourcesChange:o,query:u,onQueryChange:r,windowValue:d,onWindowChange:h}){function m(y){const g=new Set(s);g.has(y)?g.delete(y):g.add(y),o(g)}return a.jsxs("div",{className:Js.bar,children:[a.jsx("input",{type:"search",className:Js.search,placeholder:"Search title, detail, repo…",value:u,onChange:y=>r(y.target.value),"aria-label":"Search the work journal"}),a.jsx("div",{className:Js.sources,role:"group","aria-label":"Filter by source",children:ug.map(y=>a.jsxs("label",{className:Js.sourceOption,children:[a.jsx("input",{type:"checkbox",checked:s.has(y.value),onChange:()=>m(y.value)}),y.label]},y.value))}),a.jsx("select",{className:Js.windowSelect,value:d,onChange:y=>{const g=e_.find(p=>p.value===y.target.value);h(y.target.value,g?.ms??null)},"aria-label":"Time window",children:e_.map(y=>a.jsx("option",{value:y.value,children:y.label},y.value))})]})}const rN=new Set(ug.map(s=>s.value));function uN(s){switch(s){case"merge":return"merged";case"dispatch":return"running";case"tick":return"info";case"info":default:return"pending"}}function dN(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:uN(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 fN(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 hN(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(),y=u-m;if(y<0||y>o*r)continue;const g=o-1-Math.floor(y/r);g>=0&&g<d.length&&(d[g].count+=1)}return d}const mN="_strip_h22ae_1",pN="_bar_h22ae_12",_N="_fill_h22ae_33",Hu={strip:mN,bar:pN,fill:_N};function gN({entries:s,hours:o,onScrubTo:u}){const r=hN(s,o),d=Math.max(1,...r.map(h=>h.count));return a.jsx("div",{className:Hu.strip,role:"group","aria-label":`Activity density over the last ${o} hours`,children:r.map(h=>{const m=Math.round(h.count/d*100),y=new Date(h.bucketStartMs).toLocaleTimeString(void 0,{hour:"numeric"});return a.jsx("button",{type:"button",className:Hu.bar,onClick:()=>u(h.bucketStartMs),disabled:h.count===0,title:`${y}: ${h.count} entr${h.count===1?"y":"ies"}`,"aria-label":`${y}: ${h.count} entries`,children:a.jsx("span",{className:Hu.fill,style:{height:`${Math.max(m,h.count>0?8:0)}%`}})},h.bucketStartMs)})})}const yN="_detailBody_bgyq9_1",vN="_grid_bgyq9_10",xN="_rationale_bgyq9_27",bN="_diffDetails_bgyq9_34",jN="_diff_bgyq9_34",SN="_error_bgyq9_56",Vn={detailBody:yN,grid:vN,rationale:xN,diffDetails:bN,diff:jN,error:SN};function NN({proposalId:s}){const o=Re(lg(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(Je,{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 wN({drillIn:s}){return s.runId?a.jsx(rg,{runId:s.runId}):s.proposalId?a.jsx(NN,{proposalId:s.proposalId}):null}const TN="_row_194dy_1",EN="_summary_194dy_9",kN="_sourceTag_194dy_31",AN="_when_194dy_53",RN="_repo_194dy_61",CN="_title_194dy_70",DN="_expandHint_194dy_80",MN="_body_194dy_86",$N="_detailText_194dy_90",Vl={row:TN,summary:EN,sourceTag:kN,when:AN,repo:RN,title:CN,expandHint:DN,body:MN,detailText:$N},LN={"daemon-tick":"Daemon",merge:"Merge","agent-action":"Agent",run:"Run",proposal:"Proposal"};function ON(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 zN({entry:s}){const o=!!s.drillIn,[u,r]=v.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:LN[s.source]}),a.jsx("span",{className:Vl.when,title:s.ts,children:ON(s.ts)}),a.jsx(Je,{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(Tb,{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(wN,{drillIn:s.drillIn}):null]})]})}const UN="_view_1omi1_1",BN="_header_1omi1_9",HN="_title_1omi1_16",qN="_windowNote_1omi1_23",GN="_freshness_1omi1_30",QN="_freshnessLabel_1omi1_37",YN="_errorBanner_1omi1_42",VN="_panel_1omi1_50",XN="_list_1omi1_57",ZN="_empty_1omi1_63",fl={view:UN,header:BN,title:HN,windowNote:qN,freshness:GN,freshnessLabel:QN,errorBanner:YN,panel:VN,list:XN,empty:ZN},KN=8e3;function JN(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 FN(){const s=Re(Jp),o=Re(eg),u=Re(Nd),r=Re(tg),d=Zc(Jp);v.useEffect(()=>{const q=setInterval(d,KN);return()=>clearInterval(q)},[d]);const[h,m]=v.useState(new Set(rN)),[y,g]=v.useState(""),[p,b]=v.useState("24h"),[x,T]=v.useState(1440*60*1e3),O=v.useMemo(()=>dN({logs:s.data,fleetActivity:o.data,runs:u.data,inbox:r.data}),[s.data,o.data,u.data,r.data]),$=v.useMemo(()=>fN(O,{sources:h,query:y,windowMs:x}),[O,h,y,x]),k=v.useRef(new Map);function w(q){const Z=$.find(Q=>new Date(Q.ts).getTime()<=q+36e5);Z&&k.current.get(Z.id)?.scrollIntoView({behavior:"smooth",block:"center"})}const U=s.status==="loading"&&o.status==="loading"&&u.status==="loading"&&r.status==="loading",V=[s,o,u,r].some(q=>q.status==="refreshing"),X=Math.max(s.updatedAt??0,o.updatedAt??0,u.updatedAt??0,r.updatedAt??0),I=[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:[V?a.jsx(Tt,{}):null,X>0?a.jsxs("span",{className:fl.freshnessLabel,children:["Updated ",JN(X)]}):null]})]}),I.length>0?a.jsxs("div",{className:fl.errorBanner,role:"alert",children:["Some sources failed to load: ",I.join("; ")]}):null,a.jsx(lN,{}),U?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(gN,{entries:O,hours:24,onScrubTo:w}),a.jsx(oN,{sources:h,onSourcesChange:m,query:y,onQueryChange:g,windowValue:p,onWindowChange:(q,W)=>{b(q),T(W)}}),a.jsx("div",{className:fl.panel,children:$.length===0?a.jsx("p",{className:fl.empty,children:"Nothing matches the current filters in this window."}):a.jsx("ul",{className:fl.list,children:$.map(q=>a.jsx("li",{ref:W=>{W?k.current.set(q.id,W):k.current.delete(q.id)},children:a.jsx(zN,{entry:q})},q.id))})})]})]})}const WN="_figure_1si9v_1",IN="_caption_1si9v_12",PN="_title_1si9v_20",e2="_description_1si9v_26",t2="_plot_1si9v_31",l2="_tableDisclosure_1si9v_36",n2="_tableBody_1si9v_61",a2="_caveat_1si9v_65",s2="_empty_1si9v_75",Xl={figure:WN,caption:IN,title:PN,description:e2,plot:t2,tableDisclosure:l2,tableBody:n2,caveat:a2,empty:s2};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 i2="_legend_4pgvn_1",c2="_item_4pgvn_10",o2="_swatch_4pgvn_18",r2="_swatchLine_4pgvn_25",Mc={legend:i2,item:c2,swatch:o2,swatchLine:r2};function u2({items:s}){return s.length<2?null:a.jsx("ul",{className:Mc.legend,children:s.map(o=>a.jsxs("li",{className:Mc.item,children:[a.jsx("span",{className:o.kind==="line"?Mc.swatchLine:Mc.swatch,style:{background:o.color},"aria-hidden":"true"}),o.label]},o.label))})}const qu=7;function $c(s){return`var(--chart-series-${(s%qu+qu)%qu+1})`}const d2="var(--chart-sequential)",nd="var(--chart-grid)",ad="var(--chart-axis)",f2="_svg_djmd1_1",h2="_gridline_djmd1_7",m2="_axis_djmd1_12",p2="_axisLabel_djmd1_17",_2="_line_djmd1_23",g2="_area_djmd1_30",y2="_marker_djmd1_35",v2="_endLabel_djmd1_40",x2="_crosshairLine_djmd1_46",b2="_overlay_djmd1_52",j2="_wrap_djmd1_57",S2="_tooltip_djmd1_61",N2="_tooltipDate_djmd1_77",w2="_tooltipRow_djmd1_82",T2="_tooltipKey_djmd1_88",E2="_tooltipValue_djmd1_94",k2="_tooltipGap_djmd1_99",gt={svg:f2,gridline:h2,axis:m2,axisLabel:p2,line:_2,area:g2,marker:y2,endLabel:v2,crosshairLine:x2,overlay:b2,wrap:j2,tooltip:S2,tooltipDate:N2,tooltipRow:w2,tooltipKey:T2,tooltipValue:E2,tooltipGap:k2},Ha=640,Xn=44,Gu=12,Lc=12,Oc=24,A2=4;function R2(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 C2(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 D2({series:s,height:o=200,area:u=!1,formatX:r=m=>String(m),formatY:d=m=>String(m),ariaLabel:h}){const m=v.useRef(null),[y,g]=v.useState(null),[p,b]=v.useState(null),x=s.flatMap(ne=>ne.points.map(le=>le.x)),T=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 O=Math.min(...x),$=Math.max(...x),k=Math.min(0,...T),w=Math.max(1e-4,...T),U=$-O||1,V=w-k||1,X=Ha-Xn-Gu,I=o-Lc-Oc,q=ne=>Xn+(ne-O)/U*X,W=ne=>Lc+I-(ne-k)/V*I,Z=C2(k,w,A2),Q=Array.from(new Set(x)).sort((ne,le)=>ne-le);function ce(ne){const le=m.current;if(!le)return null;const D=le.getBoundingClientRect(),Y=(ne-D.left)/D.width*Ha,K=O+(Y-Xn)/X*U;let G=Q[0],P=1/0;for(const S of Q){const L=Math.abs(S-K);L<P&&(P=L,G=S)}return G}function ge(ne){const le=ce(ne.clientX);if(le===null)return;g(le);const D=m.current;if(D){const Y=D.getBoundingClientRect(),K=q(le)/Ha*Y.width;b({left:K,top:0})}}const se=s.length>=2,ye=s.length>=1&&s.length<=4,Ze=y!==null?s.map(ne=>({series:ne,point:ne.points.find(le=>le.x===y)??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:[Z.map((ne,le)=>a.jsxs("g",{children:[a.jsx("line",{x1:Xn,x2:Ha-Gu,y1:W(ne),y2:W(ne),className:gt.gridline,stroke:nd}),a.jsx("text",{x:Xn-6,y:W(ne),dy:"0.32em",textAnchor:"end",className:gt.axisLabel,children:d(ne)})]},le)),a.jsx("line",{x1:Xn,x2:Ha-Gu,y1:o-Oc,y2:o-Oc,className:gt.axis,stroke:ad}),Q.length>1?[Q[0],Q[Q.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 D=$c(le),Y=R2(ne.points);return a.jsxs("g",{children:[u&&s.length===1?Y.map((K,G)=>{const P=K.map((S,L)=>`${L===0?"M":"L"}${q(S.x)},${W(S.y)}`).join(" ")+` L${q(K[K.length-1].x)},${W(k)} L${q(K[0].x)},${W(k)} Z`;return a.jsx("path",{d:P,fill:D,className:gt.area},G)}):null,Y.map((K,G)=>a.jsx("path",{d:K.map((P,S)=>`${S===0?"M":"L"}${q(P.x)},${W(P.y)}`).join(" "),stroke:D,className:gt.line},G)),ye&&Y.length?(()=>{const K=Y[Y.length-1],G=K[K.length-1];return a.jsx("text",{x:q(G.x)+4,y:W(G.y),dy:"0.32em",className:gt.endLabel,fill:D,children:ne.label})})():null]},ne.id)}),y!==null?a.jsx("line",{x1:q(y),x2:q(y),y1:Lc,y2:o-Oc,className:gt.crosshairLine}):null,y!==null?s.map((ne,le)=>{const D=ne.points.find(Y=>Y.x===y);return!D||D.y===null?null:a.jsx("circle",{cx:q(D.x),cy:W(D.y),r:4,fill:$c(le),className:gt.marker},ne.id)}):null,a.jsx("rect",{x:Xn,y:Lc,width:X,height:I,className:gt.overlay,onFocus:()=>g(Q[Q.length-1]??null)})]}),Ze&&p?a.jsxs("div",{className:gt.tooltip,style:{left:p.left,top:p.top},children:[a.jsx("div",{className:gt.tooltipDate,children:r(y)}),Ze.map(({series:ne,point:le},D)=>a.jsxs("div",{className:gt.tooltipRow,children:[a.jsx("span",{className:gt.tooltipKey,style:{background:$c(D)},"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(u2,{items:s.map((ne,le)=>({label:ne.label,color:$c(le),kind:"line"}))}):null]})}const M2="_svg_o4jfa_1",$2="_bar_o4jfa_6",L2="_baseline_o4jfa_15",O2="_axisLabel_o4jfa_25",z2="_valueLabel_o4jfa_31",U2="_categoryLabel_o4jfa_38",B2="_hitArea_o4jfa_44",H2="_tooltip_o4jfa_49",q2="_tooltipValue_o4jfa_63",G2="_tooltipLabel_o4jfa_68",Q2="_wrap_o4jfa_73",ft={svg:M2,bar:$2,baseline:L2,axisLabel:O2,valueLabel:z2,categoryLabel:U2,hitArea:B2,tooltip:H2,tooltipValue:q2,tooltipLabel:G2,wrap:Q2},zc=24,yt=10;function Wn({data:s,height:o=160,orientation:u="vertical",color:r=d2,formatValue:d=m=>String(m),ariaLabel:h}){const m=v.useId(),[y,g]=v.useState(null),p=s.map(q=>q.value).filter(q=>q!==null),b=Math.max(0,...p,1e-4),x=Math.min(0,...p),T=b-x||1;if(u==="horizontal"){const Z=Math.min(zc,Math.max(14,Math.floor((o-yt)/s.length)-yt)),Q=420,ce=s.length*(Z+yt)+yt,ge=120+Q+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:ad}),s.map((se,ye)=>{const Ze=yt+ye*(Z+yt),ne=se.value!==null?(se.value-x)/T*Q:0;return a.jsxs("g",{children:[a.jsx("text",{x:112,y:Ze+Z/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:Ze+Z/2,x2:134,y2:Ze+Z/2,stroke:nd,strokeWidth:2,strokeDasharray:"2 2"}):a.jsxs(a.Fragment,{children:[a.jsx("rect",{x:120,y:Ze,width:Math.max(2,ne),height:Z,rx:4,fill:r,className:ft.bar}),a.jsx("text",{x:120+Math.max(2,ne)+6,y:Ze+Z/2,dy:"0.32em",className:ft.valueLabel,children:d(se.value)})]}),a.jsx("rect",{className:ft.hitArea,x:0,y:Ze-yt/2,width:ge,height:Z+yt,tabIndex:0,role:"img","aria-label":`${se.label}: ${se.value===null?"no data":d(se.value)}`,onPointerEnter:()=>g(ye),onPointerLeave:()=>g(le=>le===ye?null:le),onFocus:()=>g(ye),onBlur:()=>g(le=>le===ye?null:le)})]},se.label+ye)})]}),y!==null?a.jsxs("div",{className:ft.tooltip,style:{left:128,top:yt+y*(Z+yt)-4},children:[a.jsx("span",{className:ft.tooltipValue,children:s[y].value===null?"no data":d(s[y].value)}),a.jsx("span",{className:ft.tooltipLabel,children:s[y].label})]}):null]})}const O=s.length?Math.max(zc,0):zc,$=Math.min(zc,O),k=20,w=30,U=o,V=U+k+w,X=s.length*($+yt)+yt,I=k+U-(0-x)/T*U;return a.jsxs("div",{className:ft.wrap,children:[a.jsxs("svg",{className:ft.svg,width:X,height:V,viewBox:`0 0 ${X} ${V}`,role:"img","aria-label":h,children:[a.jsx("line",{x1:0,y1:I,x2:X,y2:I,className:ft.baseline,stroke:ad}),s.map((q,W)=>{const Z=yt+W*($+yt),Q=q.value!==null?Math.abs(q.value-x)/T*U:0,ce=q.value!==null&&q.value>=0?I-Q:I;return a.jsxs("g",{children:[q.value===null?a.jsx("line",{x1:Z+$/2-5,y1:I,x2:Z+$/2+5,y2:I,stroke:nd,strokeWidth:2,strokeDasharray:"2 2"}):a.jsxs(a.Fragment,{children:[a.jsx("rect",{x:Z,y:ce,width:$,height:Math.max(2,Q),rx:4,fill:r,className:ft.bar}),a.jsx("text",{x:Z+$/2,y:ce-4,textAnchor:"middle",className:ft.valueLabel,children:d(q.value)})]}),a.jsx("text",{x:Z+$/2,y:V-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:Z-yt/2,y:0,width:$+yt,height:V,tabIndex:0,role:"img","aria-label":`${q.label}: ${q.value===null?"no data":d(q.value)}`,onPointerEnter:()=>g(W),onPointerLeave:()=>g(ge=>ge===W?null:ge),onFocus:()=>g(W),onBlur:()=>g(ge=>ge===W?null:ge)})]},q.label+W)})]}),y!==null?a.jsxs("div",{className:ft.tooltip,style:{left:yt+y*($+yt),top:0},id:`${m}-tooltip`,children:[a.jsx("span",{className:ft.tooltipValue,children:s[y].value===null?"no data":d(s[y].value)}),a.jsx("span",{className:ft.tooltipLabel,children:s[y].label})]}):null]})}const Y2="_line_gomyo_6",V2="_dot_gomyo_14",t_={line:Y2,dot:V2};function X2({points:s,width:o=72,height:u=24,ariaLabel:r}){const d=s.filter($=>$!==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),y=Math.max(...d,0)-h||1,g=o/Math.max(1,s.length-1),p=$=>u-($-h)/y*(u-2)-1,b=[];let x=[];s.forEach(($,k)=>{if($===null){x.length&&b.push(x),x=[];return}x.push({x:k*g,y:p($)})}),x.length&&b.push(x);const T=s.map($=>$!==null).lastIndexOf(!0),O=T>=0?{x:T*g,y:p(s[T])}:null;return a.jsxs("svg",{width:o,height:u,viewBox:`0 0 ${o} ${u}`,role:"img","aria-label":r,children:[b.map(($,k)=>a.jsx("path",{className:t_.line,d:$.map((w,U)=>`${U===0?"M":"L"}${w.x.toFixed(1)},${w.y.toFixed(1)}`).join(" ")},k)),O?a.jsx("circle",{className:t_.dot,cx:O.x,cy:O.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 qc(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 K2(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 J2="_tile_rp7c9_1",F2="_label_rp7c9_11",W2="_row_rp7c9_18",I2="_value_rp7c9_25",P2="_trendRow_rp7c9_31",ew="_delta_rp7c9_38",tw="_deltaGood_rp7c9_43",lw="_deltaBad_rp7c9_47",nw="_deltaNeutral_rp7c9_51",aw="_caption_rp7c9_55",hl={tile:J2,label:F2,row:W2,value:I2,trendRow:P2,delta:ew,deltaGood:tw,deltaBad:lw,deltaNeutral:nw,caption:aw};function Ot({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(X2,{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 sw="_table_1ggl4_1",iw="_numeric_1ggl4_22",Qu={table:sw,numeric:iw};function Jn({caption:s,columns:o,rows:u,rowKey:r}){return a.jsxs("table",{className:Qu.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?Qu.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?Qu.numeric:void 0,children:m.render(d)},m.key))},r(d,h)))})]})}const cw="_view_7836g_1",ow="_header_7836g_7",rw="_title_7836g_15",uw="_freshness_7836g_21",dw="_freshnessLabel_7836g_27",fw="_filterRow_7836g_32",hw="_windowGroup_7836g_38",mw="_windowButton_7836g_45",pw="_windowButtonActive_7836g_64",_w="_kpiGrid_7836g_70",gw="_chartsGrid_7836g_76",yw="_error_7836g_82",il={view:cw,header:ow,title:rw,freshness:uw,freshnessLabel:dw,filterRow:fw,windowGroup:hw,windowButton:mw,windowButtonActive:pw,kpiGrid:_w,chartsGrid:gw,error:yw},vw=["1d","7d","30d"],xw={ok:"success",warn:"warning",over:"danger"};function l_(s){const o=s.replace(/\/+$/,"").split("/");return o[o.length-1]||s}function bw(){const[s,o]=v.useState("7d"),u=Re(sj(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 ",Sw(u.updatedAt)]}):null]})]}),a.jsxs("div",{className:il.filterRow,role:"group","aria-label":"Time window",children:[a.jsx("div",{className:il.windowGroup,children:vw.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(Je,{status:u.data.budget.level,tone:xw[u.data.budget.level],children:u.data.budget.message}):null]}),u.status==="loading"?a.jsx(si,{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(jw,{rollup:u.data}):null]})}function jw({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:l_(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=>l_(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)}],y=[{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(Ot,{label:"Est. cost",value:ml(s.totals.estCostUsd),caption:s.window}),a.jsx(Ot,{label:"Tokens",value:Ga(s.totals.tokensIn+s.totals.tokensOut),caption:`${Ga(s.totals.tokensIn)} in / ${Ga(s.totals.tokensOut)} out`}),a.jsx(Ot,{label:"Sessions",value:String(s.totals.sessions)}),a.jsx(Ot,{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(D2,{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:y}),children:a.jsx(Wn,{data:h,ariaLabel:"Cost by model",formatValue:g=>ml(g)})})]})]})}function Sw(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 Nw="_view_44i9i_1",ww="_header_44i9i_7",Tw="_title_44i9i_15",Ew="_searchRow_44i9i_21",kw="_searchInput_44i9i_27",Aw="_resultCount_44i9i_43",Rw="_results_44i9i_48",Cw="_row_44i9i_57",Dw="_rowHeader_44i9i_64",Mw="_rowTitle_44i9i_72",$w="_rowMeta_44i9i_78",Lw="_badge_44i9i_87",Ow="_snippet_44i9i_97",zw="_tags_44i9i_107",Uw="_tag_44i9i_107",Bw="_skeletons_44i9i_123",Hw="_empty_44i9i_129",qw="_error_44i9i_136",st={view:Nw,header:ww,title:Tw,searchRow:Ew,searchInput:kw,resultCount:Aw,results:Rw,row:Cw,rowHeader:Dw,rowTitle:Mw,rowMeta:$w,badge:Lw,snippet:Ow,tags:zw,tag:Uw,skeletons:Bw,empty:Hw,error:qw},Gw=50,Qw=300;function Yw(s,o){const[u,r]=v.useState(s);return v.useEffect(()=>{const d=setTimeout(()=>r(s),o);return()=>clearTimeout(d)},[s,o]),u}function Vw(s,o=220){const u=s.trim();return u.length>o?`${u.slice(0,o-1)}…`:u}function Xw(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]=v.useState(""),u=Yw(s,Qw),r=Re(cj(u)),d=u.trim().length>0,h=r.data,{rows:m,totalCount:y}=v.useMemo(()=>{if(!h)return{rows:[],totalCount:0};if(d)return{rows:h,totalCount:h.length};const p=h;return{rows:[...p].sort((x,T)=>Date.parse(T.ts)-Date.parse(x.ts)).slice(0,Gw),totalCount:p.length}},[h,d]),g=v.useMemo(()=>{if(!h||d)return[];const p=h,b=new Map;for(const x of p){const T=x.project??"(unscoped)";b.set(T,(b.get(T)??0)+1)}return[...b.entries()].sort((x,T)=>T[1]-x[1]).slice(0,8).map(([x,T])=>({label:x,value:T}))},[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?`${y} match${y===1?"":"es"}`:`showing ${m.length} of ${y}`}):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=ij(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:Xw(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:Vw(x.text)}),x.tags.length>0?a.jsx("div",{className:st.tags,children:x.tags.map(T=>a.jsx("span",{className:st.tag,children:T},T))}):null]},x.id)})})]})}const Kw="_view_1frm3_1",Jw="_header_1frm3_7",Fw="_title_1frm3_15",Ww="_filterRow_1frm3_21",Iw="_windowGroup_1frm3_27",Pw="_windowButton_1frm3_34",e3="_windowButtonActive_1frm3_53",t3="_kpiGrid_1frm3_59",l3="_chartsGrid_1frm3_65",n3="_section_1frm3_71",a3="_sectionTitle_1frm3_77",s3="_goalsList_1frm3_83",i3="_goalRow_1frm3_92",c3="_goalObjective_1frm3_102",o3="_meterTrack_1frm3_107",r3="_meterFill_1frm3_115",u3="_goalMeta_1frm3_121",d3="_error_1frm3_126",f3="_notAvailable_1frm3_135",Ie={view:Kw,header:Jw,title:Fw,filterRow:Ww,windowGroup:Iw,windowButton:Pw,windowButtonActive:e3,kpiGrid:t3,chartsGrid:l3,section:n3,sectionTitle:a3,goalsList:s3,goalRow:i3,goalObjective:c3,meterTrack:o3,meterFill:r3,goalMeta:u3,error:d3,notAvailable:f3},h3=["7d","30d","all"];function Yu(s){return`${s.engine}:${s.model}`}function m3(){const[s,o]=v.useState("30d"),u=Re(Kn),r=Re(oj(s)),d=u.data?.production;return a.jsxs("div",{className:Ie.view,children:[a.jsxs("header",{className:Ie.header,children:[a.jsx("h1",{className:Ie.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(si,{count:4}):u.status==="error"?a.jsx("div",{className:Ie.error,role:"alert",children:u.error?.message??"Failed to load production summary."}):d?a.jsx(p3,{production:d}):a.jsx("p",{className:Ie.notAvailable,children:"Production summary not available on this server (older producer, or not yet populated)."}),a.jsx("div",{className:Ie.filterRow,role:"group","aria-label":"Model stats window",children:a.jsx("div",{className:Ie.windowGroup,children:h3.map(h=>a.jsx("button",{type:"button",className:`${Ie.windowButton} ${h===s?Ie.windowButtonActive:""}`,"aria-pressed":h===s,onClick:()=>o(h),children:h},h))})}),r.status==="loading"?a.jsx(si,{count:3}):r.status==="error"?a.jsx("div",{className:Ie.error,role:"alert",children:r.error?.message??"Failed to load per-model stats."}):r.data?a.jsx(_3,{result:r.data}):null]})}function p3({production:s}){const o=s.judgeVerdicts24h,u=[{label:"ship",value:o.ship},{label:"review",value:o.review},{label:"noise",value:o.noise},{label:"harmful",value:o.harmful}],r=s.shipsPerDayTrend.map(h=>({label:K2(h.date),value:h.count})),d=s.shipsPerDayTrend.reduce((h,m)=>h+m.count,0);return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:Ie.kpiGrid,children:[a.jsx(Ot,{label:"Proposals (24h)",value:String(s.proposals24h.total),caption:`${s.proposals24h.pending} pending`}),a.jsx(Ot,{label:"Auto-merges today",value:String(s.autoMergesToday.count)}),a.jsx(Ot,{label:"Judged (24h)",value:String(o.total)}),a.jsx(Ot,{label:"Active goals",value:String(s.activeGoals.length)})]}),a.jsxs("div",{className:Ie.chartsGrid,children:[a.jsxs(Nn,{title:"Ships per day",description:"last 7 days",empty:r.length===0,emptyMessage:"No ship history recorded yet.",table:a.jsx(Jn,{caption:"Ships per day",rowKey:h=>h.label,rows:r,columns:[{key:"day",label:"Day",render:h=>h.label},{key:"count",label:"Ships",numeric:!0,render:h=>String(h.value??0)}]}),children:[d===0?a.jsx("p",{className:Ie.notAvailable,children:"0 ships in the last 7 days — this is the real number, not a loading state."}):null,a.jsx(Wn,{data:r,ariaLabel:"Ships per day, last 7 days",formatValue:h=>String(h)})]}),a.jsx(Nn,{title:"Judge verdict breakdown",description:"last 24h",caveat:"Backend gap (flagged separately): judge-parse-failure and judge-network-failure fallbacks currently record verdict='review' upstream (manager.ts's fail-closed default) and are not yet split out here — the 'review' count above may include infrastructure failures, not only genuine human-review holds. See this view's header comment.",empty:o.total===0,emptyMessage:"No judge verdicts recorded in the last 24h.",children:a.jsx(Wn,{data:u,ariaLabel:"Judge verdict breakdown, last 24h",formatValue:h=>String(h)})})]}),s.activeGoals.length>0?a.jsxs("div",{className:Ie.section,children:[a.jsx("h2",{className:Ie.sectionTitle,children:"Active goals"}),a.jsx("ul",{className:Ie.goalsList,children:s.activeGoals.map(h=>{const m=h.totalMilestones>0?h.doneMilestones/h.totalMilestones:0;return a.jsxs("li",{className:Ie.goalRow,children:[a.jsx("span",{className:Ie.goalObjective,children:h.objective}),a.jsx("div",{className:Ie.meterTrack,children:a.jsx("div",{className:Ie.meterFill,style:{width:`${Math.round(m*100)}%`}})}),a.jsxs("span",{className:Ie.goalMeta,children:[h.doneMilestones," / ",h.totalMilestones," milestones"]})]},h.goalId)})})]}):null]})}function _3({result:s}){const o=[...s.models].sort((d,h)=>h.dispatches-d.dispatches).slice(0,12),u=o.map(d=>({label:Yu(d),value:d.judged>0?d.shipRate:null})),r=[{key:"model",label:"Model",render:d=>Yu(d)},{key:"dispatches",label:"Dispatches",numeric:!0,render:d=>String(d.dispatches)},{key:"shipRate",label:"Ship rate",numeric:!0,render:d=>d.judged>0?qc(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(Pe,{quality:s.bestOfNSource,label:"best-of-N win rate",children:qc(d.bestOfN.winRate)}):"—"}];return a.jsx("div",{className:Ie.chartsGrid,children:a.jsx(Nn,{title:"Ship rate by model",description:"judged proposals only; 672 proposals / 0 merged historically means this can legitimately read 0%",empty:o.length===0,emptyMessage:"No dispatch history for this window.",table:a.jsx(Jn,{caption:"Per-model economics",rowKey:Yu,rows:o,columns:r}),children:a.jsx(Wn,{data:u,ariaLabel:"Ship rate by model",formatValue:d=>qc(d)})})})}const g3="_view_1m3dh_1",y3="_header_1m3dh_7",v3="_title_1m3dh_15",x3="_kpiGrid_1m3dh_21",b3="_chartsGrid_1m3dh_27",j3="_section_1m3dh_33",S3="_sectionTitle_1m3dh_39",N3="_list_1m3dh_45",w3="_row_1m3dh_54",T3="_rowTitle_1m3dh_64",E3="_meterTrack_1m3dh_73",k3="_meterFill_1m3dh_81",A3="_rowMeta_1m3dh_87",R3="_effectiveness_1m3dh_92",C3="_effectivenessHeadline_1m3dh_99",D3="_error_1m3dh_105",M3="_notAvailable_1m3dh_114",Ke={view:g3,header:y3,title:v3,kpiGrid:x3,chartsGrid:b3,section:j3,sectionTitle:S3,list:N3,row:w3,rowTitle:T3,meterTrack:E3,meterFill:k3,rowMeta:A3,effectiveness:R3,effectivenessHeadline:C3,error:D3,notAvailable:M3};function $3(){const s=Re(rj),o=Re(Kn);return a.jsxs("div",{className:Ke.view,children:[a.jsxs("header",{className:Ke.header,children:[a.jsx("h1",{className:Ke.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(si,{count:6}):s.status==="error"?a.jsx("div",{className:Ke.error,role:"alert",children:s.error?.message??"Failed to load portfolio."}):s.data===null?a.jsx("p",{className:Ke.notAvailable,children:"No portfolio roll-up available — either this server has no enrolled repos, or it predates the portfolio feature."}):s.data?a.jsx(L3,{portfolio:s.data}):null]})}function L3({portfolio:s}){const{health:o,goalsInFlight:u,backlogTop:r,cost:d,effectiveness:h,today:m}=s,y=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:Ke.kpiGrid,children:[a.jsx(Ot,{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(Ot,{label:"Goals in flight",value:String(u.length)}),a.jsx(Ot,{label:"Backlog top items",value:String(r.length),delta:m.pendingProposalsDelta!==null?{value:m.pendingProposalsDelta,versus:"pending proposals"}:null}),a.jsx(Ot,{label:"Spend",value:ml(d.spentUsd),caption:`${d.window} window`,delta:m.spendUsdDelta!==null?{value:m.spendUsdDelta,goodWhenPositive:!1}:null}),a.jsx(Ot,{label:"Local savings",value:ml(d.localSavingsUsd)}),a.jsx(Ot,{label:"Projected monthly",value:ml(d.projectedMonthlyUsd)})]}),h?a.jsxs("div",{className:Ke.effectiveness,children:[a.jsx("p",{className:Ke.effectivenessHeadline,children:h.headline}),a.jsxs("span",{className:Ke.rowMeta,children:["Success rate ",qc(h.successRate),h.effectivenessDeltaPct!==null?` (${h.effectivenessDeltaPct>=0?"+":""}${h.effectivenessDeltaPct.toFixed(1)}pp)`:""]})]}):null,a.jsxs("div",{className:Ke.chartsGrid,children:[a.jsx(Nn,{title:"Worst-scoring repos",empty:y.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:y,orientation:"horizontal",ariaLabel:"Worst-scoring repos by health score",formatValue:p=>p.toFixed(0)})}),a.jsxs("div",{className:Ke.section,children:[a.jsx("h2",{className:Ke.sectionTitle,children:"In-flight goals"}),u.length===0?a.jsx("p",{className:Ke.notAvailable,children:"No goals currently in flight."}):a.jsx("ul",{className:Ke.list,children:u.map(p=>a.jsxs("li",{className:Ke.row,children:[a.jsxs("span",{className:Ke.rowTitle,children:[p.objective,a.jsxs("span",{className:Ke.rowMeta,children:[Math.round(p.fractionDone*100),"%"]})]}),a.jsx("div",{className:Ke.meterTrack,children:a.jsx("div",{className:Ke.meterFill,style:{width:`${Math.round(p.fractionDone*100)}%`}})}),a.jsx("span",{className:Ke.rowMeta,children:p.nextActionable?`Next: ${p.nextActionable}`:"Nothing actionable queued"})]},p.goalId))})]})]}),a.jsxs("div",{className:Ke.section,children:[a.jsx("h2",{className:Ke.sectionTitle,children:"Top backlog"}),r.length===0?a.jsx("p",{className:Ke.notAvailable,children:"Backlog is empty."}):a.jsx(Jn,{caption:"Top backlog items",rowKey:p=>p.title,rows:r,columns:g})]})]})}const O3="_view_3pmj7_1",z3="_header_3pmj7_8",U3="_title_3pmj7_16",B3="_freshness_3pmj7_22",H3="_count_3pmj7_28",q3="_filters_3pmj7_34",G3="_field_3pmj7_45",Q3="_fieldLabel_3pmj7_51",Y3="_input_3pmj7_56",V3="_select_3pmj7_57",X3="_clear_3pmj7_74",Z3="_tableWrap_3pmj7_87",K3="_table_3pmj7_87",J3="_statusCol_3pmj7_101",F3="_engineCol_3pmj7_104",W3="_providerCol_3pmj7_107",I3="_tokensCol_3pmj7_110",P3="_costCol_3pmj7_113",eT="_stepsCol_3pmj7_116",tT="_createdCol_3pmj7_119",lT="_sortHeader_3pmj7_143",nT="_goalLink_3pmj7_160",aT="_numeric_3pmj7_172",sT="_date_3pmj7_178",iT="_empty_3pmj7_184",cT="_error_3pmj7_191",ue={view:O3,header:z3,title:U3,freshness:B3,count:H3,filters:q3,field:G3,fieldLabel:Q3,input:Y3,select:V3,clear:X3,tableWrap:Z3,table:K3,statusCol:J3,engineCol:F3,providerCol:W3,tokensCol:I3,costCol:P3,stepsCol:eT,createdCol:tT,sortHeader:lT,goalLink:nT,numeric:aT,date:sT,empty:iT,error:cT};function n_(s){return s.usage.tokensIn+s.usage.tokensOut}function oT(s,o){if(!o)return!0;const u=o.toLowerCase();return s.id.toLowerCase().includes(u)||s.goal.toLowerCase().includes(u)}function rT(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 uT(){const s=v.useRef(null);Kl("/work/runs",s);const o=Re(Nd),[u,r]=v.useState(""),[d,h]=v.useState("all"),[m,y]=v.useState("all"),[g,p]=v.useState("all"),[b,x]=v.useState(""),[T,O]=v.useState("createdAt"),[$,k]=v.useState("desc"),w=v.useMemo(()=>o.data??[],[o.data]),{statuses:U,engines:V,providers:X}=v.useMemo(()=>{const Q=new Set,ce=new Set,ge=new Set;for(const se of w)Q.add(se.status),ce.add(se.engine),ge.add(se.provider);return{statuses:Array.from(Q).sort(),engines:Array.from(ce).sort(),providers:Array.from(ge).sort()}},[w]),I=b?new Date(b).getTime():null,q=v.useMemo(()=>{let Q=w.filter(ce=>{if(d!=="all"&&ce.status!==d||m!=="all"&&ce.engine!==m||g!=="all"&&ce.provider!==g)return!1;if(I!==null){const ge=new Date(ce.createdAt).getTime();if(Number.isNaN(ge)||ge<I)return!1}return!!oT(ce,u.trim())});return Q=[...Q].sort((ce,ge)=>{let se=0;switch(T){case"createdAt":se=ce.createdAt.localeCompare(ge.createdAt);break;case"updatedAt":se=ce.updatedAt.localeCompare(ge.updatedAt);break;case"tokens":se=n_(ce)-n_(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 $==="asc"?se:-se}),Q},[w,d,m,g,I,u,T,$]);function W(Q){Q===T?k(ce=>ce==="asc"?"desc":"asc"):(O(Q),k("desc"))}function Z(Q){return Q!==T?"":$==="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 ",w.length," runs (server caps at 200 most recent)"]})]})]}),a.jsxs("form",{className:ue.filters,role:"search","aria-label":"Filter runs",onSubmit:Q=>Q.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:Q=>r(Q.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:Q=>h(Q.target.value),children:[a.jsx("option",{value:"all",children:"All"}),U.map(Q=>a.jsx("option",{value:Q,children:Q},Q))]})]}),a.jsxs("label",{className:ue.field,children:[a.jsx("span",{className:ue.fieldLabel,children:"Engine"}),a.jsxs("select",{className:ue.select,value:m,onChange:Q=>y(Q.target.value),children:[a.jsx("option",{value:"all",children:"All"}),V.map(Q=>a.jsx("option",{value:Q,children:Q},Q))]})]}),a.jsxs("label",{className:ue.field,children:[a.jsx("span",{className:ue.fieldLabel,children:"Provider"}),a.jsxs("select",{className:ue.select,value:g,onChange:Q=>p(Q.target.value),children:[a.jsx("option",{value:"all",children:"All"}),X.map(Q=>a.jsx("option",{value:Q,children:Q},Q))]})]}),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:Q=>x(Q.target.value)})]}),(d!=="all"||m!=="all"||g!=="all"||b||u)&&a.jsx("button",{type:"button",className:ue.clear,onClick:()=>{r(""),h("all"),y("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:()=>W("status"),children:["Status",Z("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:()=>W("tokens"),children:["Tokens in/out",Z("tokens")]})}),a.jsx("th",{scope:"col",className:ue.costCol,children:a.jsxs("button",{type:"button",className:ue.sortHeader,onClick:()=>W("estCostUsd"),children:["Est cost",Z("estCostUsd")]})}),a.jsx("th",{scope:"col",className:ue.stepsCol,children:a.jsxs("button",{type:"button",className:ue.sortHeader,onClick:()=>W("steps"),children:["Steps",Z("steps")]})}),a.jsx("th",{scope:"col",className:ue.createdCol,children:a.jsxs("button",{type:"button",className:ue.sortHeader,onClick:()=>W("createdAt"),children:["Created",Z("createdAt")]})})]})}),a.jsx("tbody",{children:q.map(Q=>a.jsxs("tr",{children:[a.jsx("td",{children:a.jsx(oi,{to:`/work/runs/${Q.id}`,"data-focus-key":`run-${Q.id}`,className:ue.goalLink,title:Q.goal,children:Q.goal})}),a.jsx("td",{children:a.jsx(Je,{status:Q.status})}),a.jsx("td",{children:Q.engine}),a.jsx("td",{children:Q.provider}),a.jsxs("td",{className:ue.numeric,children:[Q.usage.tokensIn.toLocaleString()," / ",Q.usage.tokensOut.toLocaleString()]}),a.jsxs("td",{className:ue.numeric,children:["$",Q.usage.estCostUsd.toFixed(4)]}),a.jsx("td",{className:ue.numeric,children:Q.steps.length}),a.jsx("td",{className:ue.date,children:rT(Q.createdAt)})]},Q.id))})]})})]})}const dT="_view_16nop_1",fT="_header_16nop_8",hT="_eyebrow_16nop_16",mT="_title_16nop_22",pT="_freshness_16nop_29",_T="_metaGrid_16nop_35",gT="_numeric_16nop_55",yT="_section_16nop_59",vT="_sectionTitle_16nop_65",xT="_resultText_16nop_70",bT="_taskList_16nop_79",jT="_taskItem_16nop_85",ST="_taskHeader_16nop_98",NT="_taskId_16nop_105",wT="_taskGoal_16nop_111",TT="_taskDeps_16nop_116",ET="_depLink_16nop_122",kT="_depMissing_16nop_127",AT="_taskError_16nop_132",RT="_taskUsage_16nop_141",CT="_stepList_16nop_148",DT="_stepItem_16nop_155",MT="_stepTs_16nop_164",$T="_stepKind_16nop_170",LT="_stepTask_16nop_176",OT="_stepSummary_16nop_180",zT="_empty_16nop_185",UT="_error_16nop_190",me={view:dT,header:fT,eyebrow:hT,title:mT,freshness:pT,metaGrid:_T,numeric:gT,section:yT,sectionTitle:vT,resultText:xT,taskList:bT,taskItem:jT,taskHeader:ST,taskId:NT,taskGoal:wT,taskDeps:TT,depLink:ET,depMissing:kT,taskError:AT,taskUsage:RT,stepList:CT,stepItem:DT,stepTs:MT,stepKind:$T,stepTask:LT,stepSummary:OT,empty:zT,error:UT};function Vu(s){if(!s)return"—";const o=new Date(s);return Number.isNaN(o.getTime())?s:o.toLocaleString()}function Xu(s){return`task-${encodeURIComponent(s)}`}function BT(){const{id:s}=ud(),o=v.useRef(null);Kl(`/work/runs/${s??""}`,o);const u=Re(P_(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(Je,{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:Vu(r.createdAt)})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Updated"}),a.jsx("dd",{children:Vu(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:Xu(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(Je,{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,y)=>a.jsxs("span",{children:[y>0?", ":"",d.has(m)?a.jsx("a",{href:`#${Xu(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:Vu(h.ts)}),a.jsx("span",{className:me.stepKind,children:h.kind}),a.jsx("span",{className:me.stepTask,children:h.taskId?a.jsx("a",{href:`#${Xu(h.taskId)}`,className:me.depLink,children:h.taskId}):null}),a.jsx("span",{className:me.stepSummary,children:h.summary})]},`${h.ts}-${m}`))})]})]})}const HT="_view_1kj6a_1",qT="_header_1kj6a_8",GT="_title_1kj6a_16",QT="_freshness_1kj6a_22",YT="_count_1kj6a_28",VT="_filters_1kj6a_34",XT="_field_1kj6a_45",ZT="_fieldLabel_1kj6a_51",KT="_input_1kj6a_56",JT="_select_1kj6a_57",FT="_listWrap_1kj6a_73",WT="_listHeader_1kj6a_80",IT="_sortHeader_1kj6a_90",PT="_list_1kj6a_73",eE="_item_1kj6a_112",tE="_goalLink_1kj6a_124",lE="_goalText_1kj6a_140",nE="_burndown_1kj6a_150",aE="_burndownTrack_1kj6a_156",sE="_burndownFill_1kj6a_164",iE="_burndownLabel_1kj6a_170",cE="_numeric_1kj6a_177",oE="_date_1kj6a_184",rE="_empty_1kj6a_191",uE="_error_1kj6a_198",Ae={view:HT,header:qT,title:GT,freshness:QT,count:YT,filters:VT,field:XT,fieldLabel:ZT,input:KT,select:JT,listWrap:FT,listHeader:WT,sortHeader:IT,list:PT,item:eE,goalLink:tE,goalText:lE,burndown:nE,burndownTrack:aE,burndownFill:sE,burndownLabel:iE,numeric:cE,date:oE,empty:rE,error:uE};function Zu(s){return s.tasks.filter(o=>o.status==="done").length}function Fs(s){return Math.max(s.plan?.tasks.length??0,s.tasks.length)}function Gc(s){return s.usage??{tokensIn:0,tokensOut:0,estCostUsd:0}}function a_(s){const o=Gc(s);return o.tokensIn+o.tokensOut}function dE(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 fE(){const s=v.useRef(null);Kl("/work/swarms",s);const o=Re(Pb),u=v.useMemo(()=>o.data??[],[o.data]),[r,d]=v.useState(""),[h,m]=v.useState("all"),[y,g]=v.useState("createdAt"),[p,b]=v.useState("desc"),x=v.useMemo(()=>Array.from(new Set(u.map(k=>k.status))).sort(),[u]),T=v.useMemo(()=>{let k=u.filter(w=>{if(h!=="all"&&w.status!==h)return!1;if(!r.trim())return!0;const U=r.trim().toLowerCase();return w.id.toLowerCase().includes(U)||w.goal.toLowerCase().includes(U)});return k=[...k].sort((w,U)=>{let V=0;switch(y){case"createdAt":V=w.createdAt.localeCompare(U.createdAt);break;case"updatedAt":V=w.updatedAt.localeCompare(U.updatedAt);break;case"progress":{const X=Fs(w)>0?Zu(w)/Fs(w):0,I=Fs(U)>0?Zu(U)/Fs(U):0;V=X-I;break}case"tokens":V=a_(w)-a_(U);break;case"estCostUsd":V=Gc(w).estCostUsd-Gc(U).estCostUsd;break}return p==="asc"?V:-V}),k},[u,h,r,y,p]);function O(k){k===y?b(w=>w==="asc"?"desc":"asc"):(g(k),b("desc"))}function $(k){return k!==y?"":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:[T.length," of ",u.length," swarms"]})]})]}),a.jsxs("form",{className:Ae.filters,role:"search","aria-label":"Filter swarms",onSubmit:k=>k.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:k=>d(k.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:k=>m(k.target.value),children:[a.jsx("option",{value:"all",children:"All"}),x.map(k=>a.jsx("option",{value:k,children:k},k))]})]})]}),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."}):T.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:()=>O("progress"),children:["Progress",$("progress")]}),a.jsxs("button",{type:"button",className:Ae.sortHeader,onClick:()=>O("tokens"),children:["Tokens",$("tokens")]}),a.jsxs("button",{type:"button",className:Ae.sortHeader,onClick:()=>O("estCostUsd"),children:["Cost",$("estCostUsd")]}),a.jsxs("button",{type:"button",className:Ae.sortHeader,onClick:()=>O("createdAt"),children:["Created",$("createdAt")]})]}),a.jsx("ul",{className:Ae.list,children:T.map(k=>{const w=Zu(k),U=Fs(k),V=U>0?Math.round(w/U*100):0,X=Gc(k);return a.jsxs("li",{className:Ae.item,children:[a.jsxs(oi,{to:`/work/swarms/${k.id}`,"data-focus-key":`swarm-${k.id}`,className:Ae.goalLink,title:k.goal,children:[a.jsx("span",{className:Ae.goalText,children:k.goal}),a.jsx(Je,{status:k.status})]}),a.jsxs("div",{className:Ae.burndown,children:[a.jsx("div",{className:Ae.burndownTrack,children:a.jsx("div",{className:Ae.burndownFill,style:{width:`${V}%`}})}),a.jsxs("span",{className:Ae.burndownLabel,children:[w,"/",U]})]}),a.jsxs("span",{className:Ae.numeric,children:[X.tokensIn.toLocaleString(),"/",X.tokensOut.toLocaleString()]}),a.jsxs("span",{className:Ae.numeric,children:["$",X.estCostUsd.toFixed(4)]}),a.jsx("span",{className:Ae.date,children:dE(k.createdAt)})]},k.id)})})]})]})}const hE="_svg_2w2xr_1",mE="_phaseLabel_2w2xr_7",pE="_edge_2w2xr_14",_E="_arrowHead_2w2xr_19",gE="_nodeLink_2w2xr_23",yE="_nodeRect_2w2xr_26",vE="_nodeId_2w2xr_31",xE="_nodeGoal_2w2xr_37",bE="_neutral_2w2xr_45",jE="_statusDot_2w2xr_49",SE="_info_2w2xr_53",NE="_running_2w2xr_61",wE="_success_2w2xr_69",TE="_warning_2w2xr_77",EE="_danger_2w2xr_85",kE="_unknown_2w2xr_93",AE="_empty_2w2xr_105",sl={svg:hE,phaseLabel:mE,edge:pE,arrowHead:_E,nodeLink:gE,nodeRect:yE,nodeId:vE,nodeGoal:xE,neutral:bE,statusDot:jE,info:SE,running:NE,success:wE,warning:TE,danger:EE,unknown:kE,empty:AE},s_={scaffold:0,build:1,integrate:2,verify:3,review:4};function RE(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 i_(s,o){return s.length>o?`${s.slice(0,o-1)}…`:s}const Ws=140,Is=48,CE=60,DE=20,Ps=20;function ME({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",T=u.get(x)??[];T.push(b),u.set(x,T)}const r=Array.from(u.keys()).sort((b,x)=>(s_[b]??99)-(s_[x]??99)),d=new Map;let h=Ps;for(const b of r)d.set(b,h),h+=Ws+CE;const m=h+Ps,y=new Map;for(const b of r){let x=Ps;for(const T of u.get(b)){const O=d.get(b);y.set(T.id,{x:O,y:x,cx:O+Ws/2,cy:x+Is/2}),x+=Is+DE}}const g=Math.max(...Array.from(y.values()).map(b=>b.y+Is))+Ps*2,p=[];for(const b of s){const x=y.get(b.id);if(x)for(const T of b.deps){const O=y.get(T);if(!O)continue;const $=O.x+Ws,k=O.cy,w=x.x,U=x.cy,V=($+w)/2;p.push({key:`${T}->${b.id}`,d:`M ${$} ${k} C ${V} ${k}, ${V} ${U}, ${w} ${U}`})}}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)+Ws/2,y:Ps-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=y.get(b.id);if(!x)return null;const T=I_(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:Ws,height:Is,rx:6,ry:6,className:`${sl.nodeRect} ${sl[T]}`}),a.jsx("circle",{cx:10,cy:Is/2,r:4,className:`${sl.statusDot} ${sl[T]}`}),a.jsx("text",{x:20,y:17,className:sl.nodeId,children:i_(b.id,18)}),a.jsx("text",{x:20,y:33,className:sl.nodeGoal,children:i_(b.goal,20)})]})},b.id)})]})}const $E="_view_19up6_1",LE="_header_19up6_8",OE="_eyebrow_19up6_16",zE="_title_19up6_22",UE="_freshness_19up6_29",BE="_burndownRow_19up6_35",HE="_burndownTrack_19up6_41",qE="_burndownFill_19up6_49",GE="_burndownLabel_19up6_55",QE="_metaGrid_19up6_62",YE="_numeric_19up6_80",VE="_mono_19up6_84",XE="_section_19up6_90",ZE="_sectionTitle_19up6_96",KE="_resultText_19up6_101",JE="_escalationList_19up6_110",FE="_escalationItem_19up6_115",WE="_escalationJson_19up6_120",IE="_dagWrap_19up6_130",PE="_taskList_19up6_138",e4="_taskItem_19up6_144",t4="_taskHeader_19up6_157",l4="_taskId_19up6_163",n4="_taskPhase_19up6_169",a4="_taskGoal_19up6_176",s4="_taskDeps_19up6_181",i4="_error_19up6_188",_e={view:$E,header:LE,eyebrow:OE,title:zE,freshness:UE,burndownRow:BE,burndownTrack:HE,burndownFill:qE,burndownLabel:GE,metaGrid:QE,numeric:YE,mono:VE,section:XE,sectionTitle:ZE,resultText:KE,escalationList:JE,escalationItem:FE,escalationJson:WE,dagWrap:IE,taskList:PE,taskItem:e4,taskHeader:t4,taskId:l4,taskPhase:n4,taskGoal:a4,taskDeps:s4,error:i4},c_="dag-task";function o_(s){if(!s)return"—";const o=new Date(s);return Number.isNaN(o.getTime())?s:o.toLocaleString()}function c4(){const{id:s}=ud(),o=v.useRef(null);Kl(`/work/swarms/${s??""}`,o);const u=Re(ej(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,y=RE(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(Je,{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:o_(r.createdAt)})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Updated"}),a.jsx("dd",{children:o_(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(ME,{tasks:y,taskAnchorPrefix:c_})})]}),a.jsxs("section",{className:_e.section,children:[a.jsxs("h2",{className:_e.sectionTitle,children:["Tasks (",y.length,")"]}),a.jsx("ul",{className:_e.taskList,children:y.map(p=>a.jsxs("li",{id:`${c_}-${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(Je,{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 o4="_view_1bwoy_1",r4="_header_1bwoy_8",u4="_title_1bwoy_16",d4="_freshness_1bwoy_22",f4="_callout_1bwoy_28",h4="_calloutTitle_1bwoy_39",m4="_calloutBody_1bwoy_44",p4="_calloutCommand_1bwoy_48",_4="_metaGrid_1bwoy_59",g4="_section_1bwoy_77",y4="_sectionTitle_1bwoy_83",v4="_serviceError_1bwoy_88",x4="_tickTableWrap_1bwoy_96",b4="_tickTable_1bwoy_96",j4="_date_1bwoy_124",S4="_numeric_1bwoy_130",N4="_dryRun_1bwoy_135",w4="_empty_1bwoy_140",T4="_error_1bwoy_145",qe={view:o4,header:r4,title:u4,freshness:d4,callout:f4,calloutTitle:h4,calloutBody:m4,calloutCommand:p4,metaGrid:_4,section:g4,sectionTitle:y4,serviceError:v4,tickTableWrap:x4,tickTable:b4,date:j4,numeric:S4,dryRun:N4,empty:w4,error:T4},E4={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 r_(s){if(!s)return"—";const o=new Date(s);return Number.isNaN(o.getTime())?s:o.toLocaleString()}function k4({quality:s}){const o=s.reason,u=E4[o]??"Daemon state could not be verified.";return a.jsxs("section",{className:qe.callout,role:"alert",children:[a.jsxs("p",{className:qe.calloutTitle,children:["Daemon state is unknown (",o,")"]}),a.jsx("p",{className:qe.calloutBody,children:u}),a.jsx("p",{className:qe.calloutBody,children:"Real remedy — preview or execute a state recovery from a terminal on this machine:"}),a.jsx("pre",{className:qe.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:qe.calloutBody,children:"If a quarantine already exists and needs resolving instead:"}),a.jsx("pre",{className:qe.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 A4(){const s=v.useRef(null);Kl("/control/daemon",s);const o=Re(ai),u=Re(tj),r=o.data?.daemon,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:"Daemon"}),a.jsxs("div",{className:qe.freshness,"aria-live":"polite",children:[o.status==="refreshing"||u.status==="refreshing"?a.jsx(Tt,{}):null,r?a.jsx(Pe,{quality:r.sourceQuality,label:"daemon state",children:a.jsx(Je,{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:qe.error,role:"alert",children:o.error?.message??"Failed to load control snapshot."}):a.jsxs(a.Fragment,{children:[jd(r.sourceQuality)?null:a.jsx(k4,{quality:r.sourceQuality}),a.jsxs("dl",{className:qe.metaGrid,children:[a.jsxs("div",{children:[a.jsx("dt",{children:"Runtime state"}),a.jsx("dd",{children:a.jsx(Pe,{quality:r.sourceQuality,label:"runtime state",children:r.runtimeState})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"PID"}),a.jsx("dd",{children:a.jsx(Pe,{quality:r.sourceQuality,label:"pid",children:r.pid??"—"})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Last tick"}),a.jsx("dd",{children:a.jsx(Pe,{quality:r.sourceQuality,label:"last tick",children:r_(r.lastTickAt)})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Today's spend"}),a.jsx("dd",{children:a.jsxs(Pe,{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(Pe,{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(Pe,{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(Pe,{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(Pe,{quality:r.sourceQuality,label:"autonomy control mode",children:r.autonomyControlMode})})]})]}),a.jsxs("section",{className:qe.section,children:[a.jsx("h2",{className:qe.sectionTitle,children:"OS service"}),a.jsxs("dl",{className:qe.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:qe.serviceError,role:"alert",children:r.service.errorLog}):null]})]}),a.jsxs("section",{className:qe.section,children:[a.jsx("h2",{className:qe.sectionTitle,children:"Recent ticks"}),u.status==="loading"?a.jsx(tt,{width:"80%"}):!d||!d.ticks||d.ticks.length===0?a.jsx("p",{className:qe.empty,children:"No tick history available."}):a.jsx("div",{className:qe.tickTableWrap,children:a.jsxs("table",{className:qe.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:qe.date,children:r_(h.ts)}),a.jsxs("td",{children:[h.reason,h.dryRun?a.jsx("span",{className:qe.dryRun,children:" (dry-run)"}):null]}),a.jsx("td",{className:qe.numeric,children:h.itemsConsidered}),a.jsx("td",{className:qe.numeric,children:h.proposalsCreated}),a.jsxs("td",{className:qe.numeric,children:["$",h.spentUsd.toFixed(4)]})]},`${h.ts}-${m}`))})]})})]})]})}const R4="_view_ssrhq_1",C4="_header_ssrhq_8",D4="_title_ssrhq_14",M4="_freshness_ssrhq_20",$4="_section_ssrhq_26",L4="_sectionTitle_ssrhq_32",O4="_killSwitchRow_ssrhq_37",z4="_pauseButton_ssrhq_47",U4="_resumeButton_ssrhq_65",B4="_mutationError_ssrhq_83",H4="_metaGrid_ssrhq_91",q4="_numeric_ssrhq_109",G4="_lockWarning_ssrhq_113",Q4="_tableWrap_ssrhq_117",Y4="_table_ssrhq_117",V4="_mono_ssrhq_144",X4="_empty_ssrhq_149",Z4="_error_ssrhq_154",K4="_confirmBody_ssrhq_162",J4="_confirmActions_ssrhq_168",F4="_cancelButton_ssrhq_174",W4="_confirmButton_ssrhq_186",oe={view:R4,header:C4,title:D4,freshness:M4,section:$4,sectionTitle:L4,killSwitchRow:O4,pauseButton:z4,resumeButton:U4,mutationError:B4,metaGrid:H4,numeric:q4,lockWarning:G4,tableWrap:Q4,table:Y4,mono:V4,empty:X4,error:Z4,confirmBody:K4,confirmActions:J4,cancelButton:F4,confirmButton:W4};function u_(s){if(!s)return"—";const o=new Date(s);return Number.isNaN(o.getTime())?s:o.toLocaleString()}function I4(){const s=v.useRef(null);Kl("/control/fleet",s);const o=Re(ld),u=Re(eg),r=vd(),[d,h]=v.useState(null),[m,y]=v.useState(!1),[g,p]=v.useState(!1),[b,x]=v.useState(!1),[T,O]=v.useState(null);async function $(q){x(!0),O(null);try{q==="pause"?await ag():await sg()}catch(W){O(W instanceof Error?W.message:String(W))}finally{x(!1),h(null)}}function k(q){O(null),h(q),y(!0)}function w(){y(!1),r.hasHold?d&&$(d):p(!0)}v.useEffect(()=>{g||d&&(r.hasHold?$(d):h(null))},[g]);const U=o.data,V=U?.killSwitch,X=V?{sourceState:V.sourceState,complete:V.sourceState==="healthy",reason:V.reason}:void 0,I=U?.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"||!U?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(Pe,{quality:X,label:"kill switch",renderControl:()=>a.jsx("button",{type:"button",className:I?oe.resumeButton:oe.pauseButton,onClick:()=>k(I?"resume":"pause"),disabled:b,children:b?"Working…":I?"Resume fleet":"Pause fleet"}),children:a.jsx(Je,{status:I?"paused":"running",children:I?"engaged — fleet paused":"clear — fleet active"})})}),T?a.jsx("p",{className:oe.mutationError,role:"alert",children:T}):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:U.queue.backlogItems})]}),U.queue.eligibleBacklogItems!==void 0?a.jsxs("div",{children:[a.jsx("dt",{children:"Eligible"}),a.jsx("dd",{className:oe.numeric,children:U.queue.eligibleBacklogItems})]}):null,U.queue.cooldownItems!==void 0?a.jsxs("div",{children:[a.jsx("dt",{children:"Cooldown"}),a.jsx("dd",{className:oe.numeric,children:U.queue.cooldownItems})]}):null,U.queue.pendingItems!==void 0?a.jsxs("div",{children:[a.jsx("dt",{children:"Pending"}),a.jsx("dd",{className:oe.numeric,children:U.queue.pendingItems})]}):null,U.queue.nextEligibleAt!==void 0?a.jsxs("div",{children:[a.jsx("dt",{children:"Next eligible"}),a.jsx("dd",{children:u_(U.queue.nextEligibleAt)})]}):null]})]}),a.jsxs("section",{className:oe.section,children:[a.jsx("h2",{className:oe.sectionTitle,children:"Lease health"}),U.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:U.queue.shared.activeClaims})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Owned by this machine"}),a.jsx("dd",{className:oe.numeric,children:U.queue.shared.ownedClaims})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Reclaimable (expired)"}),a.jsx("dd",{className:oe.numeric,children:U.queue.shared.reclaimableClaims})]}),U.queue.shared.executingClaims!==void 0?a.jsxs("div",{children:[a.jsx("dt",{children:"Executing"}),a.jsx("dd",{className:oe.numeric,children:U.queue.shared.executingClaims})]}):null,U.queue.shared.ambiguousClaims!==void 0?a.jsxs("div",{children:[a.jsx("dt",{children:"Ambiguous (needs reconciliation)"}),a.jsx("dd",{className:oe.numeric,children:U.queue.shared.ambiguousClaims})]}):null,a.jsxs("div",{children:[a.jsx("dt",{children:"Next lease expiry"}),a.jsx("dd",{children:u_(U.queue.shared.nextLeaseExpiryAt)})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Advisory lock"}),a.jsxs("dd",{children:[U.queue.shared.lock.present?U.queue.shared.lock.stale?"present, stale":"present, healthy":"absent",U.queue.shared.lock.recoveryRequired?a.jsx("span",{className:oe.lockWarning,children:" — recovery required"}):null]})]})]}),U.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:U.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:U?.merges.recent??"—"})]})]})]}),a.jsxs(ui,{open:m,onClose:()=>{y(!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:()=>{y(!1),h(null)},children:"Cancel"}),a.jsx("button",{type:"button",className:oe.confirmButton,onClick:w,children:d==="resume"?"Yes, resume":"Yes, pause"})]})]}),a.jsx(no,{open:g,onClose:()=>p(!1),reason:d==="resume"?"Resuming the fleet requires the dispatch token.":"Pausing the fleet requires the dispatch token."})]})}const P4="_view_1fet3_1",ek="_header_1fet3_8",tk="_title_1fet3_14",lk="_freshness_1fet3_20",nk="_unavailable_1fet3_26",ak="_counts_1fet3_35",sk="_countTile_1fet3_41",ik="_countValue_1fet3_51",ck="_countLabel_1fet3_57",ok="_critical_1fet3_64",rk="_high_1fet3_65",uk="_medium_1fet3_68",dk="_low_1fet3_71",fk="_filters_1fet3_75",hk="_field_1fet3_86",mk="_fieldLabel_1fet3_92",pk="_input_1fet3_97",_k="_select_1fet3_98",gk="_tableWrap_1fet3_114",yk="_table_1fet3_114",vk="_mono_1fet3_141",xk="_empty_1fet3_146",bk="_error_1fet3_153",je={view:P4,header:ek,title:tk,freshness:lk,unavailable:nk,counts:ak,countTile:sk,countValue:ik,countLabel:ck,critical:ok,high:rk,medium:uk,low:dk,filters:fk,field:hk,fieldLabel:mk,input:pk,select:_k,tableWrap:gk,table:yk,mono:vk,empty:xk,error:bk},jk={critical:"danger",high:"danger",medium:"warning",low:"neutral"},d_={critical:0,high:1,medium:2,low:3};function Sk(){const s=v.useRef(null);Kl("/control/security",s);const o=Re(ai),u=o.data?.security,[r,d]=v.useState(""),[h,m]=v.useState("all"),[y,g]=v.useState("all"),p=v.useMemo(()=>Array.from(new Set((u?.findings??[]).map(x=>x.repo))).sort(),[u]),b=v.useMemo(()=>(u?.findings??[]).filter(T=>h==="all"?!0:T.severity===h).filter(T=>y==="all"?!0:T.repo===y).filter(T=>{if(!r.trim())return!0;const O=r.trim().toLowerCase();return T.title.toLowerCase().includes(O)||T.repo.toLowerCase().includes(O)}).sort((T,O)=>(d_[T.severity]??9)-(d_[O.severity]??9)),[u,h,y,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:y,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,T)=>a.jsxs("tr",{children:[a.jsx("td",{children:a.jsx(Je,{status:x.severity,tone:jk[x.severity]??"neutral"})}),a.jsx("td",{className:je.mono,children:x.repo}),a.jsx("td",{children:x.title})]},`${x.repo}-${x.title}-${T}`))})]})})]}):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 Nk="_view_1yeql_1",wk="_header_1yeql_8",Tk="_title_1yeql_14",Ek="_freshness_1yeql_20",kk="_count_1yeql_26",Ak="_missionCard_1yeql_31",Rk="_sectionTitle_1yeql_41",Ck="_missionState_1yeql_49",Dk="_sourceGrid_1yeql_54",Mk="_list_1yeql_68",$k="_goalCard_1yeql_74",Lk="_goalHeader_1yeql_88",Ok="_goalObjective_1yeql_95",zk="_progressRow_1yeql_100",Uk="_progressTrack_1yeql_106",Bk="_progressFill_1yeql_114",Hk="_progressLabel_1yeql_120",qk="_nextActionable_1yeql_127",Gk="_mono_1yeql_132",Qk="_milestoneList_1yeql_136",Yk="_milestoneItem_1yeql_142",Vk="_milestoneTitle_1yeql_149",Xk="_noMilestones_1yeql_153",Zk="_empty_1yeql_158",Kk="_error_1yeql_165",Ge={view:Nk,header:wk,title:Tk,freshness:Ek,count:kk,missionCard:Ak,sectionTitle:Rk,missionState:Ck,sourceGrid:Dk,list:Mk,goalCard:$k,goalHeader:Lk,goalObjective:Ok,progressRow:zk,progressTrack:Uk,progressFill:Bk,progressLabel:Hk,nextActionable:qk,mono:Gk,milestoneList:Qk,milestoneItem:Yk,milestoneTitle:Vk,noMilestones:Xk,empty:Zk,error:Kk};function Jk(){const s=v.useRef(null);Kl("/goals",s);const o=Re(lj),u=Re(nj),r=o.data??[],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:"Goals"}),a.jsxs("div",{className:Ge.freshness,"aria-live":"polite",children:[o.status==="refreshing"||u.status==="refreshing"?a.jsx(Tt,{}):null,a.jsxs("span",{className:Ge.count,children:[r.length," goals"]})]})]}),u.status==="loading"?a.jsx(tt,{width:"50%"}):u.status==="success"&&d?a.jsxs("section",{className:Ge.missionCard,children:[a.jsx("h2",{className:Ge.sectionTitle,children:"Mission state"}),a.jsx("p",{className:Ge.missionState,children:d.state}),a.jsxs("dl",{className:Ge.sourceGrid,children:[a.jsxs("div",{children:[a.jsx("dt",{children:"Briefing"}),a.jsx("dd",{children:a.jsx(Pe,{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(Pe,{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(Pe,{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(Pe,{quality:d.sources.proposals??void 0,label:"proposals source",children:"available"})})]})]})]}):null,o.status==="loading"?a.jsxs("div",{className:Ge.list,children:[a.jsx(tt,{width:"90%"}),a.jsx(tt,{width:"70%"})]}):o.status==="error"?a.jsx("p",{className:Ge.error,role:"alert",children:o.error?.message??"Failed to load goals."}):r.length===0?a.jsx("p",{className:Ge.empty,children:"No active goals."}):a.jsx("ul",{className:Ge.list,children:r.map(h=>{const m=Math.round((h.progress.fractionDone??0)*100);return a.jsxs("li",{className:Ge.goalCard,"data-focus-key":`goal-${h.id}`,tabIndex:0,children:[a.jsxs("div",{className:Ge.goalHeader,children:[a.jsx("h3",{className:Ge.goalObjective,children:h.objective}),a.jsx(Je,{status:h.status})]}),a.jsxs("div",{className:Ge.progressRow,children:[a.jsx("div",{className:Ge.progressTrack,children:a.jsx("div",{className:Ge.progressFill,style:{width:`${m}%`}})}),a.jsxs("span",{className:Ge.progressLabel,children:[m,"%"]})]}),h.progress.nextActionableId?a.jsxs("p",{className:Ge.nextActionable,children:["Next actionable milestone id: ",a.jsx("span",{className:Ge.mono,children:h.progress.nextActionableId})]}):null,h.milestones.length>0?a.jsx("ol",{className:Ge.milestoneList,children:[...h.milestones].sort((y,g)=>y.order-g.order).map(y=>a.jsxs("li",{className:Ge.milestoneItem,children:[a.jsx(Je,{status:y.status}),a.jsx("span",{className:Ge.milestoneTitle,children:y.title})]},y.title))}):a.jsx("p",{className:Ge.noMilestones,children:"No milestones yet."})]},h.id)})})]})}const Fk="_body_15hsz_1",Wk="_error_15hsz_8",Ik="_actions_15hsz_17",Pk="_cancel_15hsz_23",e6="_confirm_15hsz_33",t6="_destructive_15hsz_48",qa={body:Fk,error:Wk,actions:Ik,cancel:Pk,confirm:e6,destructive:t6};function dg({open:s,onClose:o,title:u,body:r,confirmLabel:d,destructive:h,onConfirm:m,busy:y,error:g}){const p=v.useId(),b=v.useRef(null);return a.jsxs(ui,{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:y,children:"Cancel"}),a.jsx("button",{ref:b,type:"button",className:h?qa.destructive:qa.confirm,onClick:m,disabled:y,children:y?"Working…":d})]})]})}const l6="_list_1nh33_1",n6="_filters_1nh33_8",a6="_filterField_1nh33_14",s6="_filterLabel_1nh33_21",i6="_summary_1nh33_36",c6="_batchBar_1nh33_44",o6="_batchApprove_1nh33_61",r6="_batchReject_1nh33_66",u6="_skeletons_1nh33_71",d6="_error_1nh33_77",f6="_empty_1nh33_85",h6="_table_1nh33_94",m6="_checkboxCol_1nh33_121",p6="_repoCol_1nh33_125",_6="_kindCol_1nh33_129",g6="_ageCol_1nh33_133",y6="_statusCol_1nh33_137",v6="_whyCol_1nh33_141",x6="_row_1nh33_145",b6="_rowActive_1nh33_155",j6="_titleLink_1nh33_159",S6="_repoCell_1nh33_172",N6="_age_1nh33_133",w6="_why_1nh33_141",De={list:l6,filters:n6,filterField:a6,filterLabel:s6,summary:i6,batchBar:c6,batchApprove:o6,batchReject:r6,skeletons:u6,error:d6,empty:f6,table:h6,checkboxCol:m6,repoCol:p6,kindCol:_6,ageCol:g6,statusCol:y6,whyCol:v6,row:x6,rowActive:b6,titleLink:j6,repoCell:S6,age:N6,why:w6},T6=[{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 E6(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 k6({selectedId:s,onDispatchDisabled:o}){const[u,r]=v.useState("pending"),[d,h]=v.useState(""),[m,y]=v.useState(""),[g,p]=v.useState(""),[b,x]=v.useState(new Set),[T,O]=v.useState(0),[$,k]=v.useState(null),[w,U]=v.useState(!1),[V,X]=v.useState(!1),[I,q]=v.useState(!1),[W,Z]=v.useState(null),Q=v.useRef(null),ce=v.useRef(new Map),ge=Wc(),se=Re(aj({status:u,since:d||void 0,limit:500})),ye=v.useMemo(()=>{const G=se.data?.proposals??[],P=m.trim().toLowerCase(),S=g.trim().toLowerCase();return G.filter(L=>!(P&&!L.title.toLowerCase().includes(P)&&!(L.summary??"").toLowerCase().includes(P)||S&&!(L.repo??"").toLowerCase().includes(S)))},[se.data,m,g]);v.useEffect(()=>{O(G=>Math.min(G,Math.max(ye.length-1,0)))},[ye.length]);function Ze(G,P){P==="pending"&&x(S=>{const L=new Set(S);return L.has(G)?L.delete(G):L.add(G),L})}function ne(G){if(ye.length!==0)if(G.key==="ArrowDown"){G.preventDefault();const P=Math.min(T+1,ye.length-1);O(P),ce.current.get(ye[P].id)?.focus()}else if(G.key==="ArrowUp"){G.preventDefault();const P=Math.max(T-1,0);O(P),ce.current.get(ye[P].id)?.focus()}else if(G.key==="Enter"){const P=ye[T];P&&ge(`/inbox/${encodeURIComponent(P.id)}`)}else if(G.key===" "){const P=ye[T];P&&(G.preventDefault(),Ze(P.id,P.status))}else G.key==="/"&&(G.preventDefault(),Q.current?.focus())}function le(G){b.size!==0&&(Z(null),k(G),Xa()?X(!0):U(!0))}function D(){U(!1),Xa()?X(!0):k(null)}async function Y(){if(!$)return;q(!0),Z(null);const G=Array.from(b),P=[];for(const S of G)try{$==="approve"?await ig(S):await cg(S)}catch(L){if(L instanceof Sd){q(!1),X(!1),k(null),o();return}P.push(S)}q(!1),P.length>0?(Z(`${P.length} of ${G.length} failed (already decided, or a transient error). Selection kept for retry.`),x(new Set(P))):(X(!1),k(null),x(new Set))}const K=b.size;return a.jsxs("div",{className:De.list,children:[a.jsxs("div",{className:De.filters,children:[a.jsxs("label",{className:De.filterField,children:[a.jsx("span",{className:De.filterLabel,children:"Status"}),a.jsx("select",{value:u,onChange:G=>r(G.target.value),children:T6.map(G=>a.jsx("option",{value:G.value,children:G.label},G.value))})]}),a.jsxs("label",{className:De.filterField,children:[a.jsx("span",{className:De.filterLabel,children:"Since"}),a.jsx("input",{type:"date",value:d,onChange:G=>h(G.target.value)})]}),a.jsxs("label",{className:De.filterField,children:[a.jsx("span",{className:De.filterLabel,children:"Repo"}),a.jsx("input",{type:"text",placeholder:"filter by repo",value:g,onChange:G=>p(G.target.value)})]}),a.jsxs("label",{className:De.filterField,children:[a.jsx("span",{className:De.filterLabel,children:"Search"}),a.jsx("input",{ref:Q,type:"search",placeholder:"title or summary — press / to focus",value:m,onChange:G=>y(G.target.value)})]})]}),a.jsxs("div",{className:De.summary,"aria-live":"polite",children:[se.status==="refreshing"?a.jsx(Tt,{}):null,se.data?a.jsxs("span",{children:[ye.length," shown of ",se.data.total," total",se.data.truncated?" · narrow filters to see more":""]}):null]}),K>0?a.jsxs("div",{className:De.batchBar,children:[a.jsxs("span",{children:[K," selected"]}),a.jsx("button",{type:"button",onClick:()=>x(new Set),children:"Clear"}),a.jsxs("button",{type:"button",className:De.batchReject,onClick:()=>le("reject"),children:["Reject ",K]}),a.jsxs("button",{type:"button",className:De.batchApprove,onClick:()=>le("approve"),children:["Approve ",K]})]}):null,se.status==="loading"?a.jsxs("div",{className:De.skeletons,children:[a.jsx(ct,{}),a.jsx(ct,{}),a.jsx(ct,{}),a.jsx(ct,{})]}):se.status==="error"?a.jsx("div",{className:De.error,role:"alert",children:se.error?.message??"Failed to load proposals."}):ye.length===0?a.jsxs("p",{className:De.empty,children:["No ",u==="all"?"":u+" ","proposals match",m||g?" this filter":"","."]}):a.jsxs("table",{className:De.table,role:"grid","aria-label":"Proposals",onKeyDown:ne,children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{scope:"col",className:De.checkboxCol}),a.jsx("th",{scope:"col",children:"Title"}),a.jsx("th",{scope:"col",className:De.repoCol,children:"Repo"}),a.jsx("th",{scope:"col",className:De.kindCol,children:"Kind"}),a.jsx("th",{scope:"col",className:De.ageCol,children:"Age"}),a.jsx("th",{scope:"col",className:De.statusCol,children:"Status"}),a.jsx("th",{scope:"col",className:De.whyCol,children:"Why"})]})}),a.jsx("tbody",{children:ye.map((G,P)=>a.jsxs("tr",{ref:S=>{S?ce.current.set(G.id,S):ce.current.delete(G.id)},"data-focus-key":`proposal-${G.id}`,tabIndex:P===T?0:-1,className:`${De.row} ${G.id===s?De.rowActive:""}`,onFocus:()=>O(P),"aria-selected":G.id===s,children:[a.jsx("td",{className:De.checkboxCol,children:a.jsx("input",{type:"checkbox",checked:b.has(G.id),disabled:G.status!=="pending",title:G.status!=="pending"?"Only pending proposals can be approved/rejected":void 0,onChange:()=>Ze(G.id,G.status),onClick:S=>S.stopPropagation()})}),a.jsx("td",{children:a.jsx(oi,{to:`/inbox/${encodeURIComponent(G.id)}`,className:De.titleLink,title:G.title,children:G.title})}),a.jsx("td",{className:De.repoCell,title:G.repo??void 0,children:G.repo?G.repo.split("/").pop():"—"}),a.jsx("td",{children:G.kind}),a.jsx("td",{className:De.age,children:E6(G.createdAt)}),a.jsx("td",{children:a.jsx(Je,{status:G.status})}),a.jsx("td",{className:De.why,title:G.decisionReason??void 0,children:G.decisionReason??"—"})]},G.id))})]}),a.jsx(no,{open:w,onClose:D,reason:`${$==="approve"?"Approving":"Rejecting"} ${K} proposals requires the dispatch token.`}),a.jsx(dg,{open:V,onClose:()=>{X(!1),k(null),Z(null)},title:$==="approve"?`Approve ${K} proposals?`:`Reject ${K} proposals?`,body:$==="approve"?a.jsxs(a.Fragment,{children:["This applies all ",K," 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 ",K," selected proposals. They stay visible in history as rejected."]}),confirmLabel:$==="approve"?`Approve ${K}`:`Reject ${K}`,destructive:$==="reject",busy:I,error:W,onConfirm:()=>void Y()})]})}const sd=/^diff --git a\/(.+) b\/(.+)$/,fg=/^--- (?:a\/(.+)|(\/dev\/null))\s*$/,A6=/^\+\+\+ (?:b\/(.+)|(\/dev\/null))\s*$/,f_=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(.*)$/;function h_(s){return s.replace(/^[ab]\//,"")}function R6(s){const o=s.split(`
64
- `),u=o.some(h=>sd.test(h)),r=[];for(let h=0;h<o.length;h++){const m=o[h];(u?sd.test(m):fg.test(m))&&r.push(h)}if(r.length===0)return[];const d=[];for(let h=0;h<r.length;h++){const m=r[h],y=h+1<r.length?r[h+1]:o.length;d.push(o.slice(m,y).join(`
65
- `))}return d}function C6(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 O=0;O<u.length;O++){const $=u[O],k=fg.exec($);if(k){r=k[2]?null:h_(k[1]);continue}const w=A6.exec($);if(w){d=w[2]?null:h_(w[1]),h=O+1;break}const U=sd.exec($);U&&r===null&&d===null&&(r=U[1]??null,d=U[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 y=d??r??`(unknown file ${o+1})`,g=[];let p=0,b=0,x=null;if(h===-1){const O=u.join(`
67
- `).trim();return{id:`${o}:${y}`,oldPath:r,newPath:d,displayPath:y,status:m,hunks:[],additions:0,deletions:0,unparsedNotice:O||null}}let T=h;for(;T<u.length;){const O=f_.exec(u[T]);if(!O){u[T].trim()&&(x=((x?x+`
68
- `:"")+u[T]).trim()),T++;continue}const $=Number(O[1]),k=O[2]!==void 0?Number(O[2]):1,w=Number(O[3]),U=O[4]!==void 0?Number(O[4]):1,V={header:u[T],oldStart:$,oldLines:k,newStart:w,newLines:U,lines:[]};T++;let X=$,I=w;for(;T<u.length&&!f_.test(u[T]);){const q=u[T];if(q.startsWith("\\")){T++;continue}const W=q[0],Z=q.slice(1);W==="+"?(V.lines.push({kind:"add",text:Z,oldLineNo:null,newLineNo:I}),I++,p++):W==="-"?(V.lines.push({kind:"del",text:Z,oldLineNo:X,newLineNo:null}),X++,b++):(V.lines.push({kind:"context",text:W===" "?Z:q,oldLineNo:X,newLineNo:I}),X++,I++),T++}g.push(V)}return{id:`${o}:${y}`,oldPath:r,newPath:d,displayPath:y,status:m,hunks:g,additions:p,deletions:b,unparsedNotice:x}}function D6(s){const o=s??"";if(!o.trim())return{files:[],malformed:!1};const u=R6(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)=>C6(r,d)),malformed:!1}}function M6(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 y=0;y<m;y++)o.push({left:d[y]??null,right:h[y]??null})}return o}const $6={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 L6(s){if(!s)return"plain";const o=s.split(".").pop()?.toLowerCase()??"";return $6[o]??"plain"}const O6={"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},z6={"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 U6(s,o){const u=z6[o];if(!u)return[{kind:"plain",text:s}];const r=O6[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 y=m.groups??{};if(y.comment!==void 0)d.push({kind:"comment",text:m[0]});else if(y.string!==void 0)d.push({kind:"string",text:m[0]});else if(y.number!==void 0)d.push({kind:"number",text:m[0]});else if(y.word!==void 0){const g=o==="json"||r.has(y.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 B6="_viewer_gf84p_1",H6="_malformedNotice_gf84p_9",q6="_empty_gf84p_18",G6="_tree_gf84p_27",Q6="_treeItem_gf84p_40",Y6="_treeItemActive_gf84p_59",V6="_statusDot_gf84p_64",X6="_status_added_gf84p_70",Z6="_status_deleted_gf84p_71",K6="_status_modified_gf84p_72",J6="_status_renamed_gf84p_73",F6="_treePath_gf84p_75",W6="_treeStats_gf84p_83",I6="_add_gf84p_89",P6="_del_gf84p_90",eA="_body_gf84p_92",tA="_fileHeader_gf84p_99",lA="_filePath_gf84p_109",nA="_modeToggle_gf84p_118",aA="_modeActive_gf84p_132",sA="_notice_gf84p_138",iA="_emptyFile_gf84p_149",cA="_hunkTable_gf84p_155",oA="_hunkCaption_gf84p_163",rA="_lineNo_gf84p_173",uA="_lineMarker_gf84p_184",dA="_lineText_gf84p_192",fA="_hunkTableSplit_gf84p_199",hA="_rowBlank_gf84p_203",mA="_row_add_gf84p_207",pA="_row_del_gf84p_210",_A="_row_context_gf84p_213",gA="_code_gf84p_217",yA="_tok_plain_gf84p_221",vA="_tok_comment_gf84p_222",xA="_tok_string_gf84p_223",bA="_tok_number_gf84p_224",jA="_tok_keyword_gf84p_225",pe={viewer:B6,malformedNotice:H6,empty:q6,tree:G6,treeItem:Q6,treeItemActive:Y6,statusDot:V6,status_added:X6,status_deleted:Z6,status_modified:K6,status_renamed:J6,treePath:F6,treeStats:W6,add:I6,del:P6,body:eA,fileHeader:tA,filePath:lA,modeToggle:nA,modeActive:aA,notice:sA,emptyFile:iA,hunkTable:cA,hunkCaption:oA,lineNo:rA,lineMarker:uA,lineText:dA,hunkTableSplit:fA,rowBlank:hA,row_add:mA,row_del:pA,row_context:_A,code:gA,tok_plain:yA,tok_comment:vA,tok_string:xA,tok_number:bA,tok_keyword:jA};function SA({diff:s,proposalKind:o}){const u=v.useMemo(()=>D6(s),[s]),[r,d]=v.useState(u.files[0]?.id??null),[h,m]=v.useState("unified");if(v.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 y=u.files.find(p=>p.id===r)??u.files[0];function g(p){const b=u.files.findIndex(x=>x.id===y.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===y.id,tabIndex:p.id===y.id?0:-1,className:`${pe.treeItem} ${p.id===y.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:y.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"})]})]}),y.unparsedNotice?a.jsx("pre",{className:pe.notice,children:y.unparsedNotice}):null,y.hunks.length===0&&!y.unparsedNotice?a.jsx("p",{className:pe.emptyFile,children:"No line-level changes captured for this file."}):y.hunks.map((p,b)=>a.jsx(NA,{hunk:p,mode:h,path:y.displayPath},b))]})]})}function NA({hunk:s,mode:o,path:u}){const r=L6(u);if(o==="split"){const d=M6(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(Ku,{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(Ku,{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(Ku,{text:d.text,lang:r})})]},h))})]})}function Ku({text:s,lang:o}){const u=U6(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 wA="_panel_822rr_1",TA="_error_822rr_8",EA="_header_822rr_16",kA="_titleRow_822rr_22",AA="_title_822rr_22",RA="_metaRow_822rr_35",CA="_metaItem_822rr_44",DA="_riskBadge_822rr_48",MA="_risk_low_822rr_54",$A="_risk_medium_822rr_55",LA="_risk_high_822rr_56",OA="_summary_822rr_58",zA="_evidence_822rr_64",UA="_evidenceRow_822rr_74",BA="_evidenceLabel_822rr_81",HA="_muted_822rr_89",qA="_rationaleNote_822rr_94",GA="_failedChecks_822rr_101",QA="_diffSection_822rr_107",YA="_actions_822rr_111",VA="_actionError_822rr_120",XA="_rejectButton_822rr_126",ZA="_approveButton_822rr_137",KA="_decided_822rr_148",we={panel:wA,error:TA,header:EA,titleRow:kA,title:AA,metaRow:RA,metaItem:CA,riskBadge:DA,risk_low:MA,risk_medium:$A,risk_high:LA,summary:OA,evidence:zA,evidenceRow:UA,evidenceLabel:BA,muted:HA,rationaleNote:qA,failedChecks:GA,diffSection:QA,actions:YA,actionError:VA,rejectButton:XA,approveButton:ZA,decided:KA},JA={"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 FA(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 m_(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 WA({id:s,onDispatchDisabled:o}){const u=Re(lg(s)),[r,d]=v.useState(null),[h,m]=v.useState(!1),[y,g]=v.useState(!1),[p,b]=v.useState(!1),[x,T]=v.useState(null);function O(q){T(null),d(q),Xa()?g(!0):m(!0)}function $(){m(!1),Xa()?g(!0):d(null)}async function k(){if(r){b(!0),T(null);try{r==="approve"?await ig(s):await cg(s),g(!1),d(null)}catch(q){q instanceof Sd?(g(!1),d(null),o()):T(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 w=u.data,U=w.decisionEvidence,V=FA(U.decisions),X=V?.judgeReasonCode?JA[V.judgeReasonCode]:null,I=w.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:w.title}),u.status==="refreshing"?a.jsx(Tt,{}):null]}),a.jsxs("div",{className:we.metaRow,children:[a.jsx(Je,{status:w.status}),a.jsx("span",{className:we.metaItem,children:w.kind}),a.jsx("span",{className:we.metaItem,title:w.repo??void 0,children:w.repo??"no repo"}),a.jsxs("span",{className:we.metaItem,children:["created ",m_(w.createdAt)]}),w.decidedAt?a.jsxs("span",{className:we.metaItem,children:["decided ",m_(w.decidedAt)]}):null,w.riskClass?a.jsxs("span",{className:`${we.riskBadge} ${we[`risk_${w.riskClass}`]}`,children:[w.riskClass," risk"]}):null]}),w.summary?a.jsx("p",{className:we.summary,children:w.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(Pe,{quality:U.sourceQuality,label:"judge verdict",children:X?a.jsx(Je,{status:V.judgeReasonCode,tone:X.tone,children:X.label}):a.jsx("span",{className:we.muted,children:"not yet judged"})})]}),V?.judgeRationaleState?a.jsxs("p",{className:we.rationaleNote,children:["Model rationale:"," ",V.judgeRationaleState==="not-persisted"?"not persisted":"legacy (redacted)"]}):null,w.decisionReason?a.jsxs("div",{className:we.evidenceRow,children:[a.jsx("span",{className:we.evidenceLabel,children:"Decision reason"}),a.jsx("span",{children:w.decisionReason})]}):null,w.verifyResult?a.jsxs("div",{className:we.evidenceRow,children:[a.jsx("span",{className:we.evidenceLabel,children:"Verification"}),a.jsxs("div",{children:[a.jsx(Je,{status:w.verifyResult.passed?"success":"failed",children:w.verifyResult.passed?"passed":"failed"}),w.verifyResult.ran&&w.verifyResult.ran.length>0?a.jsxs("span",{className:we.muted,children:[" · ran ",w.verifyResult.ran.map(q=>q.kind).join(", ")]}):null,w.verifyResult.failed&&w.verifyResult.failed.length>0?a.jsxs("p",{className:we.failedChecks,children:["Failed: ",w.verifyResult.failed.join(", ")]}):null]})]}):null,w.evidenceOutcome?a.jsxs("div",{className:we.evidenceRow,children:[a.jsx("span",{className:we.evidenceLabel,children:"Gates"}),a.jsxs("span",{className:we.muted,children:[w.evidenceOutcome.gateCount??0," gate",w.evidenceOutcome.gateCount===1?"":"s",w.evidenceOutcome.policyAction?` · policy: ${w.evidenceOutcome.policyAction}`:"",w.evidenceOutcome.trustBasis?` · trust: ${w.evidenceOutcome.trustBasis}`:""]})]}):null,w.result?a.jsxs("div",{className:we.evidenceRow,children:[a.jsx("span",{className:we.evidenceLabel,children:"Result"}),a.jsx("span",{children:w.result})]}):null]}),a.jsx("section",{className:we.diffSection,"aria-label":"Diff",children:a.jsx(SA,{diff:w.diff,proposalKind:w.kind})}),I?a.jsxs("footer",{className:we.actions,children:[x&&!y?a.jsx("p",{className:we.actionError,role:"alert",children:x}):null,a.jsx("button",{type:"button",className:we.rejectButton,onClick:()=>O("reject"),children:"Reject"}),a.jsx("button",{type:"button",className:we.approveButton,onClick:()=>O("approve"),children:"Approve"})]}):a.jsxs("footer",{className:we.decided,children:["This proposal is already ",a.jsx("strong",{children:w.status})," — no further action available."]}),a.jsx(no,{open:h,onClose:$,reason:r==="approve"?"Approving a proposal mutates the fleet and requires the dispatch token.":"Rejecting a proposal requires the dispatch token."}),a.jsx(dg,{open:y,onClose:()=>{g(!1),d(null),T(null)},title:r==="approve"?"Approve this proposal?":"Reject this proposal?",body:r==="approve"?a.jsxs(a.Fragment,{children:["This applies ",a.jsx("strong",{children:w.title})," to ",a.jsx("code",{children:w.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:w.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 k()})]})}const IA="_view_19z5m_1",PA="_header_19z5m_8",eR="_title_19z5m_14",tR="_subtitle_19z5m_20",lR="_dispatchBanner_19z5m_25",nR="_layout_19z5m_39",aR="_listPane_19z5m_57",sR="_detailPane_19z5m_61",iR="_emptyDetail_19z5m_69",cR="_hint_19z5m_81",wl={view:IA,header:PA,title:eR,subtitle:tR,dispatchBanner:lR,layout:nR,listPane:aR,detailPane:sR,emptyDetail:iR,hint:cR};function p_(){const{id:s}=ud(),[o,u]=v.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(k6,{selectedId:s??null,onDispatchDisabled:()=>u(!0)})}),a.jsx("div",{className:wl.detailPane,children:s?a.jsx(WA,{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 oR(){return a.jsx(Zx,{children:a.jsxs(it,{element:a.jsx(b0,{}),children:[a.jsx(it,{index:!0,element:a.jsx(Qp,{to:"/overview",replace:!0})}),H_.map(s=>s.implemented?null:a.jsx(it,{path:s.path,element:a.jsx(T0,{title:s.label,description:s.description})},s.path)),a.jsx(it,{path:"/overview",element:a.jsx(SS,{})}),a.jsx(it,{path:"/journal",element:a.jsx(FN,{})}),a.jsx(it,{path:"/intelligence/pulse",element:a.jsx(bw,{})}),a.jsx(it,{path:"/intelligence/genome",element:a.jsx(Zw,{})}),a.jsx(it,{path:"/intelligence/production",element:a.jsx(m3,{})}),a.jsx(it,{path:"/portfolio",element:a.jsx($3,{})}),a.jsx(it,{path:"/work/runs",element:a.jsx(uT,{})}),a.jsx(it,{path:"/work/runs/:id",element:a.jsx(BT,{})}),a.jsx(it,{path:"/work/swarms",element:a.jsx(fE,{})}),a.jsx(it,{path:"/work/swarms/:id",element:a.jsx(c4,{})}),a.jsx(it,{path:"/control/daemon",element:a.jsx(A4,{})}),a.jsx(it,{path:"/control/fleet",element:a.jsx(I4,{})}),a.jsx(it,{path:"/control/security",element:a.jsx(Sk,{})}),a.jsx(it,{path:"/goals",element:a.jsx(Jk,{})}),a.jsx(it,{path:"/inbox",element:a.jsx(p_,{})}),a.jsx(it,{path:"/inbox/:id",element:a.jsx(p_,{})}),a.jsx(it,{path:"*",element:a.jsx(Qp,{to:"/overview",replace:!0})})]})})}const rR="_skipLink_1uply_1",uR={skipLink:rR};function dR(){return a.jsx("button",{type:"button",className:uR.skipLink,onClick:()=>{const s=document.getElementById("main-content");s?.focus(),s?.scrollIntoView({block:"start"})},children:"Skip to content"})}const fR="_wrap_dga6p_1",hR="_card_dga6p_10",mR="_badge_dga6p_19",pR="_heading_dga6p_24",_R="_body_dga6p_31",gR="_code_dga6p_38",yR="_example_dga6p_49",vR="_form_dga6p_56",xR="_label_dga6p_63",bR="_input_dga6p_68",jR="_error_dga6p_82",SR="_submit_dga6p_87",Zt={wrap:fR,card:hR,badge:mR,heading:pR,body:_R,code:gR,example:yR,form:vR,label:xR,input:bR,error:jR,submit:SR};function NR({onAuthenticated:s}){const[o,u]=v.useState(""),[r,d]=v.useState(null),[h,m]=v.useState(!1),y=v.useRef(null),g=v.useId(),p=v.useId();async function b(x){x.preventDefault(),d(null),m(!0);try{await G1(o),u(""),s?.()}catch(T){d(T instanceof Error?T.message:"Could not establish a session."),y.current?.select()}finally{m(!1)}}return a.jsx("div",{className:Zt.wrap,children:a.jsxs("div",{className:Zt.card,children:[a.jsx("div",{className:Zt.badge,"aria-hidden":"true",children:"⛺"}),a.jsx("h1",{className:Zt.heading,children:"Connect to ashlr serve"}),a.jsxs("p",{className:Zt.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:Zt.code,children:"ashlr serve"}),a.jsxs("p",{className:Zt.body,children:["It looks like a 64-character hex string, printed once at startup — something like"," ",a.jsx("code",{className:Zt.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:Zt.form,noValidate:!0,children:[a.jsx("label",{htmlFor:g,className:Zt.label,children:"Read token"}),a.jsx("input",{ref:y,id:g,name:"read-token",type:"password",autoComplete:"off",autoCorrect:"off",spellCheck:!1,inputMode:"text",className:Zt.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:Zt.error,role:"alert",children:r}):null,a.jsx("button",{type:"submit",className:Zt.submit,disabled:h||o.trim().length===0,children:h?"Connecting…":"Connect"})]})]})})}function wR(s){v.useEffect(()=>{if(s!=="checking")return;let o=!1;return eo(Kn.key,Kn.fetch).then(()=>{if(o)return;const u=Wu(Kn.key);Y1(u.status==="success")}),()=>{o=!0}},[s])}function TR(){const s=W1();return wR(s),a.jsx(Pj,{children:s==="checking"?a.jsx("div",{"aria-live":"polite",className:"visually-hidden",children:"Checking for an existing session…"}):s==="unauthenticated"?a.jsx(NR,{}):a.jsxs(g1,{children:[a.jsx(dR,{}),a.jsx(oR,{})]})})}const hg=document.getElementById("root");if(!hg)throw new Error("#root element missing from index.html");Vv.createRoot(hg).render(a.jsx(v.StrictMode,{children:a.jsx(TR,{})}));
69
- //# sourceMappingURL=index-Ct0mf8n4.js.map