agent-dealer 1.2.6 → 1.2.7

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.
@@ -0,0 +1,64 @@
1
+ (function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))u(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const m of f.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&u(m)}).observe(document,{childList:!0,subtree:!0});function s(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function u(d){if(d.ep)return;d.ep=!0;const f=s(d);fetch(d.href,f)}})();var Vo={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 Qp;function w0(){if(Qp)return vs;Qp=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function s(u,d,f){var m=null;if(f!==void 0&&(m=""+f),d.key!==void 0&&(m=""+d.key),"key"in d){f={};for(var y in d)y!=="key"&&(f[y]=d[y])}else f=d;return d=f.ref,{$$typeof:n,type:u,key:m,ref:d!==void 0?d:null,props:f}}return vs.Fragment=l,vs.jsx=s,vs.jsxs=s,vs}var Xp;function S0(){return Xp||(Xp=1,Vo.exports=w0()),Vo.exports}var c=S0(),Zo={exports:{}},ve={};/**
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 Kp;function j0(){if(Kp)return ve;Kp=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),m=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),U=Symbol.iterator;function K(j){return j===null||typeof j!="object"?null:(j=U&&j[U]||j["@@iterator"],typeof j=="function"?j:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y=Object.assign,L={};function B(j,H,F){this.props=j,this.context=H,this.refs=L,this.updater=F||C}B.prototype.isReactComponent={},B.prototype.setState=function(j,H){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,H,"setState")},B.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function Q(){}Q.prototype=B.prototype;function W(j,H,F){this.props=j,this.context=H,this.refs=L,this.updater=F||C}var oe=W.prototype=new Q;oe.constructor=W,Y(oe,B.prototype),oe.isPureReactComponent=!0;var J=Array.isArray;function ke(){}var I={H:null,A:null,T:null,S:null},be=Object.prototype.hasOwnProperty;function $e(j,H,F){var ee=F.ref;return{$$typeof:n,type:j,key:H,ref:ee!==void 0?ee:null,props:F}}function xt(j,H){return $e(j.type,H,j.props)}function ot(j){return typeof j=="object"&&j!==null&&j.$$typeof===n}function tt(j){var H={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(F){return H[F]})}var Ct=/\/+/g;function vt(j,H){return typeof j=="object"&&j!==null&&j.key!=null?tt(""+j.key):H.toString(36)}function Fe(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(ke,ke):(j.status="pending",j.then(function(H){j.status==="pending"&&(j.status="fulfilled",j.value=H)},function(H){j.status==="pending"&&(j.status="rejected",j.reason=H)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function D(j,H,F,ee,le){var xe=typeof j;(xe==="undefined"||xe==="boolean")&&(j=null);var he=!1;if(j===null)he=!0;else switch(xe){case"bigint":case"string":case"number":he=!0;break;case"object":switch(j.$$typeof){case n:case l:he=!0;break;case b:return he=j._init,D(he(j._payload),H,F,ee,le)}}if(he)return le=le(j),he=ee===""?"."+vt(j,0):ee,J(le)?(F="",he!=null&&(F=he.replace(Ct,"$&/")+"/"),D(le,H,F,"",function(Na){return Na})):le!=null&&(ot(le)&&(le=xt(le,F+(le.key==null||j&&j.key===le.key?"":(""+le.key).replace(Ct,"$&/")+"/")+he)),H.push(le)),1;he=0;var De=ee===""?".":ee+":";if(J(j))for(var Ye=0;Ye<j.length;Ye++)ee=j[Ye],xe=De+vt(ee,Ye),he+=D(ee,H,F,xe,le);else if(Ye=K(j),typeof Ye=="function")for(j=Ye.call(j),Ye=0;!(ee=j.next()).done;)ee=ee.value,xe=De+vt(ee,Ye++),he+=D(ee,H,F,xe,le);else if(xe==="object"){if(typeof j.then=="function")return D(Fe(j),H,F,ee,le);throw H=String(j),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return he}function Z(j,H,F){if(j==null)return j;var ee=[],le=0;return D(j,ee,"","",function(xe){return H.call(F,xe,le++)}),ee}function ce(j){if(j._status===-1){var H=j._result;H=H(),H.then(function(F){(j._status===0||j._status===-1)&&(j._status=1,j._result=F)},function(F){(j._status===0||j._status===-1)&&(j._status=2,j._result=F)}),j._status===-1&&(j._status=0,j._result=H)}if(j._status===1)return j._result.default;throw j._result}var Re=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},Ce={map:Z,forEach:function(j,H,F){Z(j,function(){H.apply(this,arguments)},F)},count:function(j){var H=0;return Z(j,function(){H++}),H},toArray:function(j){return Z(j,function(H){return H})||[]},only:function(j){if(!ot(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return ve.Activity=_,ve.Children=Ce,ve.Component=B,ve.Fragment=s,ve.Profiler=d,ve.PureComponent=W,ve.StrictMode=u,ve.Suspense=v,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,ve.__COMPILER_RUNTIME={__proto__:null,c:function(j){return I.H.useMemoCache(j)}},ve.cache=function(j){return function(){return j.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(j,H,F){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var ee=Y({},j.props),le=j.key;if(H!=null)for(xe in H.key!==void 0&&(le=""+H.key),H)!be.call(H,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&H.ref===void 0||(ee[xe]=H[xe]);var xe=arguments.length-2;if(xe===1)ee.children=F;else if(1<xe){for(var he=Array(xe),De=0;De<xe;De++)he[De]=arguments[De+2];ee.children=he}return $e(j.type,le,ee)},ve.createContext=function(j){return j={$$typeof:m,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:f,_context:j},j},ve.createElement=function(j,H,F){var ee,le={},xe=null;if(H!=null)for(ee in H.key!==void 0&&(xe=""+H.key),H)be.call(H,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(le[ee]=H[ee]);var he=arguments.length-2;if(he===1)le.children=F;else if(1<he){for(var De=Array(he),Ye=0;Ye<he;Ye++)De[Ye]=arguments[Ye+2];le.children=De}if(j&&j.defaultProps)for(ee in he=j.defaultProps,he)le[ee]===void 0&&(le[ee]=he[ee]);return $e(j,xe,le)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(j){return{$$typeof:y,render:j}},ve.isValidElement=ot,ve.lazy=function(j){return{$$typeof:b,_payload:{_status:-1,_result:j},_init:ce}},ve.memo=function(j,H){return{$$typeof:g,type:j,compare:H===void 0?null:H}},ve.startTransition=function(j){var H=I.T,F={};I.T=F;try{var ee=j(),le=I.S;le!==null&&le(F,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(ke,Re)}catch(xe){Re(xe)}finally{H!==null&&F.types!==null&&(H.types=F.types),I.T=H}},ve.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},ve.use=function(j){return I.H.use(j)},ve.useActionState=function(j,H,F){return I.H.useActionState(j,H,F)},ve.useCallback=function(j,H){return I.H.useCallback(j,H)},ve.useContext=function(j){return I.H.useContext(j)},ve.useDebugValue=function(){},ve.useDeferredValue=function(j,H){return I.H.useDeferredValue(j,H)},ve.useEffect=function(j,H){return I.H.useEffect(j,H)},ve.useEffectEvent=function(j){return I.H.useEffectEvent(j)},ve.useId=function(){return I.H.useId()},ve.useImperativeHandle=function(j,H,F){return I.H.useImperativeHandle(j,H,F)},ve.useInsertionEffect=function(j,H){return I.H.useInsertionEffect(j,H)},ve.useLayoutEffect=function(j,H){return I.H.useLayoutEffect(j,H)},ve.useMemo=function(j,H){return I.H.useMemo(j,H)},ve.useOptimistic=function(j,H){return I.H.useOptimistic(j,H)},ve.useReducer=function(j,H,F){return I.H.useReducer(j,H,F)},ve.useRef=function(j){return I.H.useRef(j)},ve.useState=function(j){return I.H.useState(j)},ve.useSyncExternalStore=function(j,H,F){return I.H.useSyncExternalStore(j,H,F)},ve.useTransition=function(){return I.H.useTransition()},ve.version="19.2.7",ve}var Jp;function Td(){return Jp||(Jp=1,Zo.exports=j0()),Zo.exports}var w=Td(),Go={exports:{}},gs={},Qo={exports:{}},Xo={};/**
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 Ip;function N0(){return Ip||(Ip=1,(function(n){function l(D,Z){var ce=D.length;D.push(Z);e:for(;0<ce;){var Re=ce-1>>>1,Ce=D[Re];if(0<d(Ce,Z))D[Re]=Z,D[ce]=Ce,ce=Re;else break e}}function s(D){return D.length===0?null:D[0]}function u(D){if(D.length===0)return null;var Z=D[0],ce=D.pop();if(ce!==Z){D[0]=ce;e:for(var Re=0,Ce=D.length,j=Ce>>>1;Re<j;){var H=2*(Re+1)-1,F=D[H],ee=H+1,le=D[ee];if(0>d(F,ce))ee<Ce&&0>d(le,F)?(D[Re]=le,D[ee]=ce,Re=ee):(D[Re]=F,D[H]=ce,Re=H);else if(ee<Ce&&0>d(le,ce))D[Re]=le,D[ee]=ce,Re=ee;else break e}}return Z}function d(D,Z){var ce=D.sortIndex-Z.sortIndex;return ce!==0?ce:D.id-Z.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var m=Date,y=m.now();n.unstable_now=function(){return m.now()-y}}var v=[],g=[],b=1,_=null,U=3,K=!1,C=!1,Y=!1,L=!1,B=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function oe(D){for(var Z=s(g);Z!==null;){if(Z.callback===null)u(g);else if(Z.startTime<=D)u(g),Z.sortIndex=Z.expirationTime,l(v,Z);else break;Z=s(g)}}function J(D){if(Y=!1,oe(D),!C)if(s(v)!==null)C=!0,ke||(ke=!0,tt());else{var Z=s(g);Z!==null&&Fe(J,Z.startTime-D)}}var ke=!1,I=-1,be=5,$e=-1;function xt(){return L?!0:!(n.unstable_now()-$e<be)}function ot(){if(L=!1,ke){var D=n.unstable_now();$e=D;var Z=!0;try{e:{C=!1,Y&&(Y=!1,Q(I),I=-1),K=!0;var ce=U;try{t:{for(oe(D),_=s(v);_!==null&&!(_.expirationTime>D&&xt());){var Re=_.callback;if(typeof Re=="function"){_.callback=null,U=_.priorityLevel;var Ce=Re(_.expirationTime<=D);if(D=n.unstable_now(),typeof Ce=="function"){_.callback=Ce,oe(D),Z=!0;break t}_===s(v)&&u(v),oe(D)}else u(v);_=s(v)}if(_!==null)Z=!0;else{var j=s(g);j!==null&&Fe(J,j.startTime-D),Z=!1}}break e}finally{_=null,U=ce,K=!1}Z=void 0}}finally{Z?tt():ke=!1}}}var tt;if(typeof W=="function")tt=function(){W(ot)};else if(typeof MessageChannel<"u"){var Ct=new MessageChannel,vt=Ct.port2;Ct.port1.onmessage=ot,tt=function(){vt.postMessage(null)}}else tt=function(){B(ot,0)};function Fe(D,Z){I=B(function(){D(n.unstable_now())},Z)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(D){D.callback=null},n.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"):be=0<D?Math.floor(1e3/D):5},n.unstable_getCurrentPriorityLevel=function(){return U},n.unstable_next=function(D){switch(U){case 1:case 2:case 3:var Z=3;break;default:Z=U}var ce=U;U=Z;try{return D()}finally{U=ce}},n.unstable_requestPaint=function(){L=!0},n.unstable_runWithPriority=function(D,Z){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var ce=U;U=D;try{return Z()}finally{U=ce}},n.unstable_scheduleCallback=function(D,Z,ce){var Re=n.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?Re+ce:Re):ce=Re,D){case 1:var Ce=-1;break;case 2:Ce=250;break;case 5:Ce=1073741823;break;case 4:Ce=1e4;break;default:Ce=5e3}return Ce=ce+Ce,D={id:b++,callback:Z,priorityLevel:D,startTime:ce,expirationTime:Ce,sortIndex:-1},ce>Re?(D.sortIndex=ce,l(g,D),s(v)===null&&D===s(g)&&(Y?(Q(I),I=-1):Y=!0,Fe(J,ce-Re))):(D.sortIndex=Ce,l(v,D),C||K||(C=!0,ke||(ke=!0,tt()))),D},n.unstable_shouldYield=xt,n.unstable_wrapCallback=function(D){var Z=U;return function(){var ce=U;U=Z;try{return D.apply(this,arguments)}finally{U=ce}}}})(Xo)),Xo}var Fp;function _0(){return Fp||(Fp=1,Qo.exports=N0()),Qo.exports}var Ko={exports:{}},Rt={};/**
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 Wp;function A0(){if(Wp)return Rt;Wp=1;var n=Td();function l(v){var g="https://react.dev/errors/"+v;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+v+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var u={d:{f:s,r:function(){throw Error(l(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(v,g,b){var _=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:_==null?null:""+_,children:v,containerInfo:g,implementation:b}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(v,g){if(v==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Rt.createPortal=function(v,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(l(299));return f(v,g,null,b)},Rt.flushSync=function(v){var g=m.T,b=u.p;try{if(m.T=null,u.p=2,v)return v()}finally{m.T=g,u.p=b,u.d.f()}},Rt.preconnect=function(v,g){typeof v=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,u.d.C(v,g))},Rt.prefetchDNS=function(v){typeof v=="string"&&u.d.D(v)},Rt.preinit=function(v,g){if(typeof v=="string"&&g&&typeof g.as=="string"){var b=g.as,_=y(b,g.crossOrigin),U=typeof g.integrity=="string"?g.integrity:void 0,K=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?u.d.S(v,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:_,integrity:U,fetchPriority:K}):b==="script"&&u.d.X(v,{crossOrigin:_,integrity:U,fetchPriority:K,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Rt.preinitModule=function(v,g){if(typeof v=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=y(g.as,g.crossOrigin);u.d.M(v,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&u.d.M(v)},Rt.preload=function(v,g){if(typeof v=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,_=y(b,g.crossOrigin);u.d.L(v,b,{crossOrigin:_,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Rt.preloadModule=function(v,g){if(typeof v=="string")if(g){var b=y(g.as,g.crossOrigin);u.d.m(v,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else u.d.m(v)},Rt.requestFormReset=function(v){u.d.r(v)},Rt.unstable_batchedUpdates=function(v,g){return v(g)},Rt.useFormState=function(v,g,b){return m.H.useFormState(v,g,b)},Rt.useFormStatus=function(){return m.H.useHostTransitionStatus()},Rt.version="19.2.7",Rt}var Pp;function E0(){if(Pp)return Ko.exports;Pp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Ko.exports=A0(),Ko.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 ex;function k0(){if(ex)return gs;ex=1;var n=_0(),l=Td(),s=E0();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function 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 v(e){if(f(e)!==e)throw Error(u(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,i=t;;){var r=a.return;if(r===null)break;var o=r.alternate;if(o===null){if(i=r.return,i!==null){a=i;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===a)return v(r),e;if(o===i)return v(r),t;o=o.sibling}throw Error(u(188))}if(a.return!==i.return)a=r,i=o;else{for(var h=!1,x=r.child;x;){if(x===a){h=!0,a=r,i=o;break}if(x===i){h=!0,i=r,a=o;break}x=x.sibling}if(!h){for(x=o.child;x;){if(x===a){h=!0,a=o,i=r;break}if(x===i){h=!0,i=o,a=r;break}x=x.sibling}if(!h)throw Error(u(189))}}if(a.alternate!==i)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?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 _=Object.assign,U=Symbol.for("react.element"),K=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),W=Symbol.for("react.context"),oe=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),ke=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),be=Symbol.for("react.lazy"),$e=Symbol.for("react.activity"),xt=Symbol.for("react.memo_cache_sentinel"),ot=Symbol.iterator;function tt(e){return e===null||typeof e!="object"?null:(e=ot&&e[ot]||e["@@iterator"],typeof e=="function"?e:null)}var Ct=Symbol.for("react.client.reference");function vt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ct?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Y:return"Fragment";case B:return"Profiler";case L:return"StrictMode";case J:return"Suspense";case ke:return"SuspenseList";case $e:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case W:return e.displayName||"Context";case Q:return(e._context.displayName||"Context")+".Consumer";case oe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return t=e.displayName||null,t!==null?t:vt(e.type)||"Memo";case be:t=e._payload,e=e._init;try{return vt(e(t))}catch{}}return null}var Fe=Array.isArray,D=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},Re=[],Ce=-1;function j(e){return{current:e}}function H(e){0>Ce||(e.current=Re[Ce],Re[Ce]=null,Ce--)}function F(e,t){Ce++,Re[Ce]=e.current,e.current=t}var ee=j(null),le=j(null),xe=j(null),he=j(null);function De(e,t){switch(F(xe,t),F(le,e),F(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?pp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=pp(t),e=xp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(ee),F(ee,e)}function Ye(){H(ee),H(le),H(xe)}function Na(e){e.memoizedState!==null&&F(he,e);var t=ee.current,a=xp(t,e.type);t!==a&&(F(le,e),F(ee,a))}function Lt(e){le.current===e&&(H(ee),H(le)),he.current===e&&(H(he),ms._currentValue=ce)}var la,Qa;function Le(e){if(la===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);la=t&&t[1]||"",Qa=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+la+e+Qa}var gt=!1;function Xa(e,t){if(!e||gt)return"";gt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(M){var T=M}Reflect.construct(e,[],V)}else{try{V.call()}catch(M){T=M}e.call(V.prototype)}}else{try{throw Error()}catch(M){T=M}(V=e())&&typeof V.catch=="function"&&V.catch(function(){})}}catch(M){if(M&&T&&typeof M.stack=="string")return[M.stack,T.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=i.DetermineComponentFrameRoot(),h=o[0],x=o[1];if(h&&x){var S=h.split(`
44
+ `),R=x.split(`
45
+ `);for(r=i=0;i<S.length&&!S[i].includes("DetermineComponentFrameRoot");)i++;for(;r<R.length&&!R[r].includes("DetermineComponentFrameRoot");)r++;if(i===S.length||r===R.length)for(i=S.length-1,r=R.length-1;1<=i&&0<=r&&S[i]!==R[r];)r--;for(;1<=i&&0<=r;i--,r--)if(S[i]!==R[r]){if(i!==1||r!==1)do if(i--,r--,0>r||S[i]!==R[r]){var z=`
46
+ `+S[i].replace(" at new "," at ");return e.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",e.displayName)),z}while(1<=i&&0<=r);break}}}finally{gt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Le(a):""}function Te(e,t){switch(e.tag){case 26:case 27:case 5:return Le(e.type);case 16:return Le("Lazy");case 13:return e.child!==t&&t!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return Xa(e.type,!1);case 11:return Xa(e.type.render,!1);case 1:return Xa(e.type,!0);case 31:return Le("Activity");default:return""}}function tl(e){try{var t="",a=null;do t+=Te(e,a),a=e,e=e.return;while(e);return t}catch(i){return`
47
+ Error generating stack: `+i.message+`
48
+ `+i.stack}}var Ka=Object.prototype.hasOwnProperty,za=n.unstable_scheduleCallback,Sn=n.unstable_cancelCallback,al=n.unstable_shouldYield,ki=n.unstable_requestPaint,St=n.unstable_now,ia=n.unstable_getCurrentPriorityLevel,Ja=n.unstable_ImmediatePriority,Ia=n.unstable_UserBlockingPriority,Tt=n.unstable_NormalPriority,lt=n.unstable_LowPriority,nl=n.unstable_IdlePriority,Ol=n.log,ll=n.unstable_setDisableYieldValue,_a=null,jt=null;function Qt(e){if(typeof Ol=="function"&&ll(e),jt&&typeof jt.setStrictMode=="function")try{jt.setStrictMode(_a,e)}catch{}}var G=Math.clz32?Math.clz32:Aa,ye=Math.log,it=Math.LN2;function Aa(e){return e>>>=0,e===0?32:31-(ye(e)/it|0)|0}var jn=256,Ut=262144,sa=4194304;function Fa(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function il(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var r=0,o=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var x=i&134217727;return x!==0?(i=x&~o,i!==0?r=Fa(i):(h&=x,h!==0?r=Fa(h):a||(a=x&~e,a!==0&&(r=Fa(a))))):(x=i&~o,x!==0?r=Fa(x):h!==0?r=Fa(h):a||(a=i&~e,a!==0&&(r=Fa(a)))),r===0?0:t!==0&&t!==r&&(t&o)===0&&(o=r&-r,a=t&-t,o>=a||o===32&&(a&4194048)!==0)?t:r}function Nn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ml(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 Ds(){var e=sa;return sa<<=1,(sa&62914560)===0&&(sa=4194304),e}function Dl(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function sl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ls(e,t,a,i,r,o){var h=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var x=e.entanglements,S=e.expirationTimes,R=e.hiddenUpdates;for(a=h&~a;0<a;){var z=31-G(a),V=1<<z;x[z]=0,S[z]=-1;var T=R[z];if(T!==null)for(R[z]=null,z=0;z<T.length;z++){var M=T[z];M!==null&&(M.lane&=-536870913)}a&=~V}i!==0&&Us(e,i,0),o!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=o&~(h&~t))}function Us(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-G(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&261930}function O(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-G(a),r=1<<i;r&t|e[i]&t&&(e[i]|=t),a&=~r}}function re(e,t){var a=t&-t;return a=(a&42)!==0?1:Qe(a),(a&(e.suspendedLanes|t))!==0?0:a}function Qe(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 Xt(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Pd(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:qp(e.type))}function ef(e,t){var a=Z.p;try{return Z.p=e,t()}finally{Z.p=a}}var _n=Math.random().toString(36).slice(2),Nt="__reactFiber$"+_n,zt="__reactProps$"+_n,Ll="__reactContainer$"+_n,Mu="__reactEvents$"+_n,ov="__reactListeners$"+_n,dv="__reactHandles$"+_n,tf="__reactResources$"+_n,Ri="__reactMarker$"+_n;function Du(e){delete e[Nt],delete e[zt],delete e[Mu],delete e[ov],delete e[dv]}function Ul(e){var t=e[Nt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Ll]||a[Nt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=jp(e);e!==null;){if(a=e[Nt])return a;e=jp(e)}return t}e=a,a=e.parentNode}return null}function zl(e){if(e=e[Nt]||e[Ll]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ci(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Bl(e){var t=e[tf];return t||(t=e[tf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function bt(e){e[Ri]=!0}var af=new Set,nf={};function rl(e,t){ql(e,t),ql(e+"Capture",t)}function ql(e,t){for(nf[e]=t,e=0;e<t.length;e++)af.add(t[e])}var fv=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]*$"),lf={},sf={};function hv(e){return Ka.call(sf,e)?!0:Ka.call(lf,e)?!1:fv.test(e)?sf[e]=!0:(lf[e]=!0,!1)}function zs(e,t,a){if(hv(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Bs(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Wa(e,t,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+i)}}function ra(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function rf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function mv(e,t,a){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var r=i.get,o=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(h){a=""+h,o.call(this,h)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(h){a=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Lu(e){if(!e._valueTracker){var t=rf(e)?"checked":"value";e._valueTracker=mv(e,t,""+e[t])}}function uf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=rf(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function qs(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 pv=/[\n"\\]/g;function ua(e){return e.replace(pv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Uu(e,t,a,i,r,o,h,x){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+ra(t)):e.value!==""+ra(t)&&(e.value=""+ra(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?zu(e,h,ra(t)):a!=null?zu(e,h,ra(a)):i!=null&&e.removeAttribute("value"),r==null&&o!=null&&(e.defaultChecked=!!o),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+ra(x):e.removeAttribute("name")}function cf(e,t,a,i,r,o,h,x){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||a!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Lu(e);return}a=a!=null?""+ra(a):"",t=t!=null?""+ra(t):a,x||t===e.value||(e.value=t),e.defaultValue=t}i=i??r,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=x?e.checked:!!i,e.defaultChecked=!!i,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Lu(e)}function zu(e,t,a){t==="number"&&qs(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Hl(e,t,a,i){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&i&&(e[a].defaultSelected=!0)}else{for(a=""+ra(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,i&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function of(e,t,a){if(t!=null&&(t=""+ra(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+ra(a):""}function df(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(u(92));if(Fe(i)){if(1<i.length)throw Error(u(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=ra(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i),Lu(e)}function $l(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var xv=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 ff(e,t,a){var i=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,a):typeof a!="number"||a===0||xv.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function hf(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var r in t)i=t[r],t.hasOwnProperty(r)&&a[r]!==i&&ff(e,r,i)}else for(var o in t)t.hasOwnProperty(o)&&ff(e,o,t[o])}function Bu(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 yv=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"]]),vv=/^[\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 Hs(e){return vv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Pa(){}var qu=null;function Hu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yl=null,Vl=null;function mf(e){var t=zl(e);if(t&&(e=t.stateNode)){var a=e[zt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Uu(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+ua(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var r=i[zt]||null;if(!r)throw Error(u(90));Uu(i,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&uf(i)}break e;case"textarea":of(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Hl(e,!!a.multiple,t,!1)}}}var $u=!1;function pf(e,t,a){if($u)return e(t,a);$u=!0;try{var i=e(t);return i}finally{if($u=!1,(Yl!==null||Vl!==null)&&(Er(),Yl&&(t=Yl,e=Vl,Vl=Yl=null,mf(t),e)))for(t=0;t<e.length;t++)mf(e[t])}}function Ti(e,t){var a=e.stateNode;if(a===null)return null;var i=a[zt]||null;if(i===null)return null;a=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var en=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yu=!1;if(en)try{var Oi={};Object.defineProperty(Oi,"passive",{get:function(){Yu=!0}}),window.addEventListener("test",Oi,Oi),window.removeEventListener("test",Oi,Oi)}catch{Yu=!1}var An=null,Vu=null,$s=null;function xf(){if($s)return $s;var e,t=Vu,a=t.length,i,r="value"in An?An.value:An.textContent,o=r.length;for(e=0;e<a&&t[e]===r[e];e++);var h=a-e;for(i=1;i<=h&&t[a-i]===r[o-i];i++);return $s=r.slice(e,1<i?1-i:void 0)}function Ys(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 Vs(){return!0}function yf(){return!1}function Bt(e){function t(a,i,r,o,h){this._reactName=a,this._targetInst=r,this.type=i,this.nativeEvent=o,this.target=h,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(a=e[x],this[x]=a?a(o):o[x]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Vs:yf,this.isPropagationStopped=yf,this}return _(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Vs)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Vs)},persist:function(){},isPersistent:Vs}),t}var ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zs=Bt(ul),Mi=_({},ul,{view:0,detail:0}),gv=Bt(Mi),Zu,Gu,Di,Gs=_({},Mi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xu,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!==Di&&(Di&&e.type==="mousemove"?(Zu=e.screenX-Di.screenX,Gu=e.screenY-Di.screenY):Gu=Zu=0,Di=e),Zu)},movementY:function(e){return"movementY"in e?e.movementY:Gu}}),vf=Bt(Gs),bv=_({},Gs,{dataTransfer:0}),wv=Bt(bv),Sv=_({},Mi,{relatedTarget:0}),Qu=Bt(Sv),jv=_({},ul,{animationName:0,elapsedTime:0,pseudoElement:0}),Nv=Bt(jv),_v=_({},ul,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Av=Bt(_v),Ev=_({},ul,{data:0}),gf=Bt(Ev),kv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Rv={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"},Cv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Cv[e])?!!t[e]:!1}function Xu(){return Tv}var Ov=_({},Mi,{key:function(e){if(e.key){var t=kv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ys(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Rv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xu,charCode:function(e){return e.type==="keypress"?Ys(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ys(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Mv=Bt(Ov),Dv=_({},Gs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bf=Bt(Dv),Lv=_({},Mi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xu}),Uv=Bt(Lv),zv=_({},ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),Bv=Bt(zv),qv=_({},Gs,{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}),Hv=Bt(qv),$v=_({},ul,{newState:0,oldState:0}),Yv=Bt($v),Vv=[9,13,27,32],Ku=en&&"CompositionEvent"in window,Li=null;en&&"documentMode"in document&&(Li=document.documentMode);var Zv=en&&"TextEvent"in window&&!Li,wf=en&&(!Ku||Li&&8<Li&&11>=Li),Sf=" ",jf=!1;function Nf(e,t){switch(e){case"keyup":return Vv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _f(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zl=!1;function Gv(e,t){switch(e){case"compositionend":return _f(t);case"keypress":return t.which!==32?null:(jf=!0,Sf);case"textInput":return e=t.data,e===Sf&&jf?null:e;default:return null}}function Qv(e,t){if(Zl)return e==="compositionend"||!Ku&&Nf(e,t)?(e=xf(),$s=Vu=An=null,Zl=!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 wf&&t.locale!=="ko"?null:t.data;default:return null}}var Xv={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 Af(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Xv[e.type]:t==="textarea"}function Ef(e,t,a,i){Yl?Vl?Vl.push(i):Vl=[i]:Yl=i,t=Dr(t,"onChange"),0<t.length&&(a=new Zs("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var Ui=null,zi=null;function Kv(e){cp(e,0)}function Qs(e){var t=Ci(e);if(uf(t))return e}function kf(e,t){if(e==="change")return t}var Rf=!1;if(en){var Ju;if(en){var Iu="oninput"in document;if(!Iu){var Cf=document.createElement("div");Cf.setAttribute("oninput","return;"),Iu=typeof Cf.oninput=="function"}Ju=Iu}else Ju=!1;Rf=Ju&&(!document.documentMode||9<document.documentMode)}function Tf(){Ui&&(Ui.detachEvent("onpropertychange",Of),zi=Ui=null)}function Of(e){if(e.propertyName==="value"&&Qs(zi)){var t=[];Ef(t,zi,e,Hu(e)),pf(Kv,t)}}function Jv(e,t,a){e==="focusin"?(Tf(),Ui=t,zi=a,Ui.attachEvent("onpropertychange",Of)):e==="focusout"&&Tf()}function Iv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Qs(zi)}function Fv(e,t){if(e==="click")return Qs(t)}function Wv(e,t){if(e==="input"||e==="change")return Qs(t)}function Pv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Kt=typeof Object.is=="function"?Object.is:Pv;function Bi(e,t){if(Kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var r=a[i];if(!Ka.call(t,r)||!Kt(e[r],t[r]))return!1}return!0}function Mf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Df(e,t){var a=Mf(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Mf(a)}}function Lf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Uf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=qs(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=qs(e.document)}return t}function Fu(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 eg=en&&"documentMode"in document&&11>=document.documentMode,Gl=null,Wu=null,qi=null,Pu=!1;function zf(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Pu||Gl==null||Gl!==qs(i)||(i=Gl,"selectionStart"in i&&Fu(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),qi&&Bi(qi,i)||(qi=i,i=Dr(Wu,"onSelect"),0<i.length&&(t=new Zs("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=Gl)))}function cl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Ql={animationend:cl("Animation","AnimationEnd"),animationiteration:cl("Animation","AnimationIteration"),animationstart:cl("Animation","AnimationStart"),transitionrun:cl("Transition","TransitionRun"),transitionstart:cl("Transition","TransitionStart"),transitioncancel:cl("Transition","TransitionCancel"),transitionend:cl("Transition","TransitionEnd")},ec={},Bf={};en&&(Bf=document.createElement("div").style,"AnimationEvent"in window||(delete Ql.animationend.animation,delete Ql.animationiteration.animation,delete Ql.animationstart.animation),"TransitionEvent"in window||delete Ql.transitionend.transition);function ol(e){if(ec[e])return ec[e];if(!Ql[e])return e;var t=Ql[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Bf)return ec[e]=t[a];return e}var qf=ol("animationend"),Hf=ol("animationiteration"),$f=ol("animationstart"),tg=ol("transitionrun"),ag=ol("transitionstart"),ng=ol("transitioncancel"),Yf=ol("transitionend"),Vf=new Map,tc="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(" ");tc.push("scrollEnd");function Ea(e,t){Vf.set(e,t),rl(t,[e])}var Xs=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)},ca=[],Xl=0,ac=0;function Ks(){for(var e=Xl,t=ac=Xl=0;t<e;){var a=ca[t];ca[t++]=null;var i=ca[t];ca[t++]=null;var r=ca[t];ca[t++]=null;var o=ca[t];if(ca[t++]=null,i!==null&&r!==null){var h=i.pending;h===null?r.next=r:(r.next=h.next,h.next=r),i.pending=r}o!==0&&Zf(a,r,o)}}function Js(e,t,a,i){ca[Xl++]=e,ca[Xl++]=t,ca[Xl++]=a,ca[Xl++]=i,ac|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function nc(e,t,a,i){return Js(e,t,a,i),Is(e)}function dl(e,t){return Js(e,null,null,t),Is(e)}function Zf(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var r=!1,o=e.return;o!==null;)o.childLanes|=a,i=o.alternate,i!==null&&(i.childLanes|=a),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(r=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,r&&t!==null&&(r=31-G(a),e=o.hiddenUpdates,i=e[r],i===null?e[r]=[t]:i.push(t),t.lane=a|536870912),o):null}function Is(e){if(50<rs)throw rs=0,ho=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Kl={};function lg(e,t,a,i){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jt(e,t,a,i){return new lg(e,t,a,i)}function lc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tn(e,t){var a=e.alternate;return a===null?(a=Jt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Gf(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Fs(e,t,a,i,r,o){var h=0;if(i=e,typeof e=="function")lc(e)&&(h=1);else if(typeof e=="string")h=c0(e,a,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case $e:return e=Jt(31,a,t,r),e.elementType=$e,e.lanes=o,e;case Y:return fl(a.children,r,o,t);case L:h=8,r|=24;break;case B:return e=Jt(12,a,t,r|2),e.elementType=B,e.lanes=o,e;case J:return e=Jt(13,a,t,r),e.elementType=J,e.lanes=o,e;case ke:return e=Jt(19,a,t,r),e.elementType=ke,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W:h=10;break e;case Q:h=9;break e;case oe:h=11;break e;case I:h=14;break e;case be:h=16,i=null;break e}h=29,a=Error(u(130,e===null?"null":typeof e,"")),i=null}return t=Jt(h,a,t,r),t.elementType=e,t.type=i,t.lanes=o,t}function fl(e,t,a,i){return e=Jt(7,e,i,t),e.lanes=a,e}function ic(e,t,a){return e=Jt(6,e,null,t),e.lanes=a,e}function Qf(e){var t=Jt(18,null,null,0);return t.stateNode=e,t}function sc(e,t,a){return t=Jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Xf=new WeakMap;function oa(e,t){if(typeof e=="object"&&e!==null){var a=Xf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:tl(t)},Xf.set(e,t),t)}return{value:e,source:t,stack:tl(t)}}var Jl=[],Il=0,Ws=null,Hi=0,da=[],fa=0,En=null,Ba=1,qa="";function an(e,t){Jl[Il++]=Hi,Jl[Il++]=Ws,Ws=e,Hi=t}function Kf(e,t,a){da[fa++]=Ba,da[fa++]=qa,da[fa++]=En,En=e;var i=Ba;e=qa;var r=32-G(i)-1;i&=~(1<<r),a+=1;var o=32-G(t)+r;if(30<o){var h=r-r%5;o=(i&(1<<h)-1).toString(32),i>>=h,r-=h,Ba=1<<32-G(t)+r|a<<r|i,qa=o+e}else Ba=1<<o|a<<r|i,qa=e}function rc(e){e.return!==null&&(an(e,1),Kf(e,1,0))}function uc(e){for(;e===Ws;)Ws=Jl[--Il],Jl[Il]=null,Hi=Jl[--Il],Jl[Il]=null;for(;e===En;)En=da[--fa],da[fa]=null,qa=da[--fa],da[fa]=null,Ba=da[--fa],da[fa]=null}function Jf(e,t){da[fa++]=Ba,da[fa++]=qa,da[fa++]=En,Ba=t.id,qa=t.overflow,En=e}var _t=null,We=null,Oe=!1,kn=null,ha=!1,cc=Error(u(519));function Rn(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $i(oa(t,e)),cc}function If(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[Nt]=e,t[zt]=i,a){case"dialog":Ne("cancel",t),Ne("close",t);break;case"iframe":case"object":case"embed":Ne("load",t);break;case"video":case"audio":for(a=0;a<cs.length;a++)Ne(cs[a],t);break;case"source":Ne("error",t);break;case"img":case"image":case"link":Ne("error",t),Ne("load",t);break;case"details":Ne("toggle",t);break;case"input":Ne("invalid",t),cf(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Ne("invalid",t);break;case"textarea":Ne("invalid",t),df(t,i.value,i.defaultValue,i.children)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||i.suppressHydrationWarning===!0||hp(t.textContent,a)?(i.popover!=null&&(Ne("beforetoggle",t),Ne("toggle",t)),i.onScroll!=null&&Ne("scroll",t),i.onScrollEnd!=null&&Ne("scrollend",t),i.onClick!=null&&(t.onclick=Pa),t=!0):t=!1,t||Rn(e,!0)}function Ff(e){for(_t=e.return;_t;)switch(_t.tag){case 5:case 31:case 13:ha=!1;return;case 27:case 3:ha=!0;return;default:_t=_t.return}}function Fl(e){if(e!==_t)return!1;if(!Oe)return Ff(e),Oe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||ko(e.type,e.memoizedProps)),a=!a),a&&We&&Rn(e),Ff(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));We=Sp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));We=Sp(e)}else t===27?(t=We,Vn(e.type)?(e=Mo,Mo=null,We=e):We=t):We=_t?pa(e.stateNode.nextSibling):null;return!0}function hl(){We=_t=null,Oe=!1}function oc(){var e=kn;return e!==null&&(Yt===null?Yt=e:Yt.push.apply(Yt,e),kn=null),e}function $i(e){kn===null?kn=[e]:kn.push(e)}var dc=j(null),ml=null,nn=null;function Cn(e,t,a){F(dc,t._currentValue),t._currentValue=a}function ln(e){e._currentValue=dc.current,H(dc)}function fc(e,t,a){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===a)break;e=e.return}}function hc(e,t,a,i){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var o=r.dependencies;if(o!==null){var h=r.child;o=o.firstContext;e:for(;o!==null;){var x=o;o=r;for(var S=0;S<t.length;S++)if(x.context===t[S]){o.lanes|=a,x=o.alternate,x!==null&&(x.lanes|=a),fc(o.return,a,e),i||(h=null);break e}o=x.next}}else if(r.tag===18){if(h=r.return,h===null)throw Error(u(341));h.lanes|=a,o=h.alternate,o!==null&&(o.lanes|=a),fc(h,a,e),h=null}else h=r.child;if(h!==null)h.return=r;else for(h=r;h!==null;){if(h===e){h=null;break}if(r=h.sibling,r!==null){r.return=h.return,h=r;break}h=h.return}r=h}}function Wl(e,t,a,i){e=null;for(var r=t,o=!1;r!==null;){if(!o){if((r.flags&524288)!==0)o=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var h=r.alternate;if(h===null)throw Error(u(387));if(h=h.memoizedProps,h!==null){var x=r.type;Kt(r.pendingProps.value,h.value)||(e!==null?e.push(x):e=[x])}}else if(r===he.current){if(h=r.alternate,h===null)throw Error(u(387));h.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(ms):e=[ms])}r=r.return}e!==null&&hc(t,e,a,i),t.flags|=262144}function Ps(e){for(e=e.firstContext;e!==null;){if(!Kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function pl(e){ml=e,nn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function At(e){return Wf(ml,e)}function er(e,t){return ml===null&&pl(e),Wf(e,t)}function Wf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},nn===null){if(e===null)throw Error(u(308));nn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else nn=nn.next=t;return a}var ig=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},sg=n.unstable_scheduleCallback,rg=n.unstable_NormalPriority,dt={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function mc(){return{controller:new ig,data:new Map,refCount:0}}function Yi(e){e.refCount--,e.refCount===0&&sg(rg,function(){e.controller.abort()})}var Vi=null,pc=0,Pl=0,ei=null;function ug(e,t){if(Vi===null){var a=Vi=[];pc=0,Pl=go(),ei={status:"pending",value:void 0,then:function(i){a.push(i)}}}return pc++,t.then(Pf,Pf),t}function Pf(){if(--pc===0&&Vi!==null){ei!==null&&(ei.status="fulfilled");var e=Vi;Vi=null,Pl=0,ei=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function cg(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(i.status="rejected",i.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),i}var eh=D.S;D.S=function(e,t){zm=St(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ug(e,t),eh!==null&&eh(e,t)};var xl=j(null);function xc(){var e=xl.current;return e!==null?e:Ie.pooledCache}function tr(e,t){t===null?F(xl,xl.current):F(xl,t.pool)}function th(){var e=xc();return e===null?null:{parent:dt._currentValue,pool:e}}var ti=Error(u(460)),yc=Error(u(474)),ar=Error(u(542)),nr={then:function(){}};function ah(e){return e=e.status,e==="fulfilled"||e==="rejected"}function nh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Pa,Pa),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ih(e),e;default:if(typeof t.status=="string")t.then(Pa,Pa);else{if(e=Ie,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=i}},function(i){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ih(e),e}throw vl=t,ti}}function yl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(vl=a,ti):a}}var vl=null;function lh(){if(vl===null)throw Error(u(459));var e=vl;return vl=null,e}function ih(e){if(e===ti||e===ar)throw Error(u(483))}var ai=null,Zi=0;function lr(e){var t=Zi;return Zi+=1,ai===null&&(ai=[]),nh(ai,e,t)}function Gi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ir(e,t){throw t.$$typeof===U?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function sh(e){function t(A,N){if(e){var k=A.deletions;k===null?(A.deletions=[N],A.flags|=16):k.push(N)}}function a(A,N){if(!e)return null;for(;N!==null;)t(A,N),N=N.sibling;return null}function i(A){for(var N=new Map;A!==null;)A.key!==null?N.set(A.key,A):N.set(A.index,A),A=A.sibling;return N}function r(A,N){return A=tn(A,N),A.index=0,A.sibling=null,A}function o(A,N,k){return A.index=k,e?(k=A.alternate,k!==null?(k=k.index,k<N?(A.flags|=67108866,N):k):(A.flags|=67108866,N)):(A.flags|=1048576,N)}function h(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function x(A,N,k,q){return N===null||N.tag!==6?(N=ic(k,A.mode,q),N.return=A,N):(N=r(N,k),N.return=A,N)}function S(A,N,k,q){var ue=k.type;return ue===Y?z(A,N,k.props.children,q,k.key):N!==null&&(N.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===be&&yl(ue)===N.type)?(N=r(N,k.props),Gi(N,k),N.return=A,N):(N=Fs(k.type,k.key,k.props,null,A.mode,q),Gi(N,k),N.return=A,N)}function R(A,N,k,q){return N===null||N.tag!==4||N.stateNode.containerInfo!==k.containerInfo||N.stateNode.implementation!==k.implementation?(N=sc(k,A.mode,q),N.return=A,N):(N=r(N,k.children||[]),N.return=A,N)}function z(A,N,k,q,ue){return N===null||N.tag!==7?(N=fl(k,A.mode,q,ue),N.return=A,N):(N=r(N,k),N.return=A,N)}function V(A,N,k){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=ic(""+N,A.mode,k),N.return=A,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case K:return k=Fs(N.type,N.key,N.props,null,A.mode,k),Gi(k,N),k.return=A,k;case C:return N=sc(N,A.mode,k),N.return=A,N;case be:return N=yl(N),V(A,N,k)}if(Fe(N)||tt(N))return N=fl(N,A.mode,k,null),N.return=A,N;if(typeof N.then=="function")return V(A,lr(N),k);if(N.$$typeof===W)return V(A,er(A,N),k);ir(A,N)}return null}function T(A,N,k,q){var ue=N!==null?N.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return ue!==null?null:x(A,N,""+k,q);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case K:return k.key===ue?S(A,N,k,q):null;case C:return k.key===ue?R(A,N,k,q):null;case be:return k=yl(k),T(A,N,k,q)}if(Fe(k)||tt(k))return ue!==null?null:z(A,N,k,q,null);if(typeof k.then=="function")return T(A,N,lr(k),q);if(k.$$typeof===W)return T(A,N,er(A,k),q);ir(A,k)}return null}function M(A,N,k,q,ue){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return A=A.get(k)||null,x(N,A,""+q,ue);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case K:return A=A.get(q.key===null?k:q.key)||null,S(N,A,q,ue);case C:return A=A.get(q.key===null?k:q.key)||null,R(N,A,q,ue);case be:return q=yl(q),M(A,N,k,q,ue)}if(Fe(q)||tt(q))return A=A.get(k)||null,z(N,A,q,ue,null);if(typeof q.then=="function")return M(A,N,k,lr(q),ue);if(q.$$typeof===W)return M(A,N,k,er(N,q),ue);ir(N,q)}return null}function ae(A,N,k,q){for(var ue=null,ze=null,ie=N,we=N=0,Ae=null;ie!==null&&we<k.length;we++){ie.index>we?(Ae=ie,ie=null):Ae=ie.sibling;var Be=T(A,ie,k[we],q);if(Be===null){ie===null&&(ie=Ae);break}e&&ie&&Be.alternate===null&&t(A,ie),N=o(Be,N,we),ze===null?ue=Be:ze.sibling=Be,ze=Be,ie=Ae}if(we===k.length)return a(A,ie),Oe&&an(A,we),ue;if(ie===null){for(;we<k.length;we++)ie=V(A,k[we],q),ie!==null&&(N=o(ie,N,we),ze===null?ue=ie:ze.sibling=ie,ze=ie);return Oe&&an(A,we),ue}for(ie=i(ie);we<k.length;we++)Ae=M(ie,A,we,k[we],q),Ae!==null&&(e&&Ae.alternate!==null&&ie.delete(Ae.key===null?we:Ae.key),N=o(Ae,N,we),ze===null?ue=Ae:ze.sibling=Ae,ze=Ae);return e&&ie.forEach(function(Kn){return t(A,Kn)}),Oe&&an(A,we),ue}function fe(A,N,k,q){if(k==null)throw Error(u(151));for(var ue=null,ze=null,ie=N,we=N=0,Ae=null,Be=k.next();ie!==null&&!Be.done;we++,Be=k.next()){ie.index>we?(Ae=ie,ie=null):Ae=ie.sibling;var Kn=T(A,ie,Be.value,q);if(Kn===null){ie===null&&(ie=Ae);break}e&&ie&&Kn.alternate===null&&t(A,ie),N=o(Kn,N,we),ze===null?ue=Kn:ze.sibling=Kn,ze=Kn,ie=Ae}if(Be.done)return a(A,ie),Oe&&an(A,we),ue;if(ie===null){for(;!Be.done;we++,Be=k.next())Be=V(A,Be.value,q),Be!==null&&(N=o(Be,N,we),ze===null?ue=Be:ze.sibling=Be,ze=Be);return Oe&&an(A,we),ue}for(ie=i(ie);!Be.done;we++,Be=k.next())Be=M(ie,A,we,Be.value,q),Be!==null&&(e&&Be.alternate!==null&&ie.delete(Be.key===null?we:Be.key),N=o(Be,N,we),ze===null?ue=Be:ze.sibling=Be,ze=Be);return e&&ie.forEach(function(b0){return t(A,b0)}),Oe&&an(A,we),ue}function Je(A,N,k,q){if(typeof k=="object"&&k!==null&&k.type===Y&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case K:e:{for(var ue=k.key;N!==null;){if(N.key===ue){if(ue=k.type,ue===Y){if(N.tag===7){a(A,N.sibling),q=r(N,k.props.children),q.return=A,A=q;break e}}else if(N.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===be&&yl(ue)===N.type){a(A,N.sibling),q=r(N,k.props),Gi(q,k),q.return=A,A=q;break e}a(A,N);break}else t(A,N);N=N.sibling}k.type===Y?(q=fl(k.props.children,A.mode,q,k.key),q.return=A,A=q):(q=Fs(k.type,k.key,k.props,null,A.mode,q),Gi(q,k),q.return=A,A=q)}return h(A);case C:e:{for(ue=k.key;N!==null;){if(N.key===ue)if(N.tag===4&&N.stateNode.containerInfo===k.containerInfo&&N.stateNode.implementation===k.implementation){a(A,N.sibling),q=r(N,k.children||[]),q.return=A,A=q;break e}else{a(A,N);break}else t(A,N);N=N.sibling}q=sc(k,A.mode,q),q.return=A,A=q}return h(A);case be:return k=yl(k),Je(A,N,k,q)}if(Fe(k))return ae(A,N,k,q);if(tt(k)){if(ue=tt(k),typeof ue!="function")throw Error(u(150));return k=ue.call(k),fe(A,N,k,q)}if(typeof k.then=="function")return Je(A,N,lr(k),q);if(k.$$typeof===W)return Je(A,N,er(A,k),q);ir(A,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,N!==null&&N.tag===6?(a(A,N.sibling),q=r(N,k),q.return=A,A=q):(a(A,N),q=ic(k,A.mode,q),q.return=A,A=q),h(A)):a(A,N)}return function(A,N,k,q){try{Zi=0;var ue=Je(A,N,k,q);return ai=null,ue}catch(ie){if(ie===ti||ie===ar)throw ie;var ze=Jt(29,ie,null,A.mode);return ze.lanes=q,ze.return=A,ze}finally{}}}var gl=sh(!0),rh=sh(!1),Tn=!1;function vc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function gc(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 On(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Mn(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(qe&2)!==0){var r=i.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),i.pending=t,t=Is(e),Zf(e,null,a),t}return Js(e,i,t,a),Is(e)}function Qi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,O(e,a)}}function bc(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){var r=null,o=null;if(a=a.firstBaseUpdate,a!==null){do{var h={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};o===null?r=o=h:o=o.next=h,a=a.next}while(a!==null);o===null?r=o=t:o=o.next=t}else r=o=t;a={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var wc=!1;function Xi(){if(wc){var e=ei;if(e!==null)throw e}}function Ki(e,t,a,i){wc=!1;var r=e.updateQueue;Tn=!1;var o=r.firstBaseUpdate,h=r.lastBaseUpdate,x=r.shared.pending;if(x!==null){r.shared.pending=null;var S=x,R=S.next;S.next=null,h===null?o=R:h.next=R,h=S;var z=e.alternate;z!==null&&(z=z.updateQueue,x=z.lastBaseUpdate,x!==h&&(x===null?z.firstBaseUpdate=R:x.next=R,z.lastBaseUpdate=S))}if(o!==null){var V=r.baseState;h=0,z=R=S=null,x=o;do{var T=x.lane&-536870913,M=T!==x.lane;if(M?(_e&T)===T:(i&T)===T){T!==0&&T===Pl&&(wc=!0),z!==null&&(z=z.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ae=e,fe=x;T=t;var Je=a;switch(fe.tag){case 1:if(ae=fe.payload,typeof ae=="function"){V=ae.call(Je,V,T);break e}V=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=fe.payload,T=typeof ae=="function"?ae.call(Je,V,T):ae,T==null)break e;V=_({},V,T);break e;case 2:Tn=!0}}T=x.callback,T!==null&&(e.flags|=64,M&&(e.flags|=8192),M=r.callbacks,M===null?r.callbacks=[T]:M.push(T))}else M={lane:T,tag:x.tag,payload:x.payload,callback:x.callback,next:null},z===null?(R=z=M,S=V):z=z.next=M,h|=T;if(x=x.next,x===null){if(x=r.shared.pending,x===null)break;M=x,x=M.next,M.next=null,r.lastBaseUpdate=M,r.shared.pending=null}}while(!0);z===null&&(S=V),r.baseState=S,r.firstBaseUpdate=R,r.lastBaseUpdate=z,o===null&&(r.shared.lanes=0),Bn|=h,e.lanes=h,e.memoizedState=V}}function uh(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function ch(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)uh(a[e],t)}var ni=j(null),sr=j(0);function oh(e,t){e=mn,F(sr,e),F(ni,t),mn=e|t.baseLanes}function Sc(){F(sr,mn),F(ni,ni.current)}function jc(){mn=sr.current,H(ni),H(sr)}var It=j(null),ma=null;function Dn(e){var t=e.alternate;F(ut,ut.current&1),F(It,e),ma===null&&(t===null||ni.current!==null||t.memoizedState!==null)&&(ma=e)}function Nc(e){F(ut,ut.current),F(It,e),ma===null&&(ma=e)}function dh(e){e.tag===22?(F(ut,ut.current),F(It,e),ma===null&&(ma=e)):Ln()}function Ln(){F(ut,ut.current),F(It,It.current)}function Ft(e){H(It),ma===e&&(ma=null),H(ut)}var ut=j(0);function rr(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||To(a)||Oo(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var sn=0,ge=null,Xe=null,ft=null,ur=!1,li=!1,bl=!1,cr=0,Ji=0,ii=null,og=0;function st(){throw Error(u(321))}function _c(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Kt(e[a],t[a]))return!1;return!0}function Ac(e,t,a,i,r,o){return sn=o,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Kh:$c,bl=!1,o=a(i,r),bl=!1,li&&(o=hh(t,a,i,r)),fh(e),o}function fh(e){D.H=Wi;var t=Xe!==null&&Xe.next!==null;if(sn=0,ft=Xe=ge=null,ur=!1,Ji=0,ii=null,t)throw Error(u(300));e===null||ht||(e=e.dependencies,e!==null&&Ps(e)&&(ht=!0))}function hh(e,t,a,i){ge=e;var r=0;do{if(li&&(ii=null),Ji=0,li=!1,25<=r)throw Error(u(301));if(r+=1,ft=Xe=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}D.H=Jh,o=t(a,i)}while(li);return o}function dg(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?Ii(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(ge.flags|=1024),t}function Ec(){var e=cr!==0;return cr=0,e}function kc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Rc(e){if(ur){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ur=!1}sn=0,ft=Xe=ge=null,li=!1,Ji=cr=0,ii=null}function Ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?ge.memoizedState=ft=e:ft=ft.next=e,ft}function ct(){if(Xe===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ft===null?ge.memoizedState:ft.next;if(t!==null)ft=t,Xe=e;else{if(e===null)throw ge.alternate===null?Error(u(467)):Error(u(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ft===null?ge.memoizedState=ft=e:ft=ft.next=e}return ft}function or(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ii(e){var t=Ji;return Ji+=1,ii===null&&(ii=[]),e=nh(ii,e,t),t=ge,(ft===null?t.memoizedState:ft.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Kh:$c),e}function dr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ii(e);if(e.$$typeof===W)return At(e)}throw Error(u(438,String(e)))}function Cc(e){var t=null,a=ge.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=ge.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=or(),ge.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),i=0;i<e;i++)a[i]=xt;return t.index++,a}function rn(e,t){return typeof t=="function"?t(e):t}function fr(e){var t=ct();return Tc(t,Xe,e)}function Tc(e,t,a){var i=e.queue;if(i===null)throw Error(u(311));i.lastRenderedReducer=a;var r=e.baseQueue,o=i.pending;if(o!==null){if(r!==null){var h=r.next;r.next=o.next,o.next=h}t.baseQueue=r=o,i.pending=null}if(o=e.baseState,r===null)e.memoizedState=o;else{t=r.next;var x=h=null,S=null,R=t,z=!1;do{var V=R.lane&-536870913;if(V!==R.lane?(_e&V)===V:(sn&V)===V){var T=R.revertLane;if(T===0)S!==null&&(S=S.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),V===Pl&&(z=!0);else if((sn&T)===T){R=R.next,T===Pl&&(z=!0);continue}else V={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},S===null?(x=S=V,h=o):S=S.next=V,ge.lanes|=T,Bn|=T;V=R.action,bl&&a(o,V),o=R.hasEagerState?R.eagerState:a(o,V)}else T={lane:V,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},S===null?(x=S=T,h=o):S=S.next=T,ge.lanes|=V,Bn|=V;R=R.next}while(R!==null&&R!==t);if(S===null?h=o:S.next=x,!Kt(o,e.memoizedState)&&(ht=!0,z&&(a=ei,a!==null)))throw a;e.memoizedState=o,e.baseState=h,e.baseQueue=S,i.lastRenderedState=o}return r===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function Oc(e){var t=ct(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var i=a.dispatch,r=a.pending,o=t.memoizedState;if(r!==null){a.pending=null;var h=r=r.next;do o=e(o,h.action),h=h.next;while(h!==r);Kt(o,t.memoizedState)||(ht=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),a.lastRenderedState=o}return[o,i]}function mh(e,t,a){var i=ge,r=ct(),o=Oe;if(o){if(a===void 0)throw Error(u(407));a=a()}else a=t();var h=!Kt((Xe||r).memoizedState,a);if(h&&(r.memoizedState=a,ht=!0),r=r.queue,Lc(yh.bind(null,i,r,e),[e]),r.getSnapshot!==t||h||ft!==null&&ft.memoizedState.tag&1){if(i.flags|=2048,si(9,{destroy:void 0},xh.bind(null,i,r,a,t),null),Ie===null)throw Error(u(349));o||(sn&127)!==0||ph(i,t,a)}return a}function ph(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ge.updateQueue,t===null?(t=or(),ge.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function xh(e,t,a,i){t.value=a,t.getSnapshot=i,vh(t)&&gh(e)}function yh(e,t,a){return a(function(){vh(t)&&gh(e)})}function vh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Kt(e,a)}catch{return!0}}function gh(e){var t=dl(e,2);t!==null&&Vt(t,e,2)}function Mc(e){var t=Ot();if(typeof e=="function"){var a=e;if(e=a(),bl){Qt(!0);try{a()}finally{Qt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rn,lastRenderedState:e},t}function bh(e,t,a,i){return e.baseState=a,Tc(e,Xe,typeof i=="function"?i:rn)}function fg(e,t,a,i,r){if(pr(e))throw Error(u(485));if(e=t.action,e!==null){var o={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){o.listeners.push(h)}};D.T!==null?a(!0):o.isTransition=!1,i(o),a=t.pending,a===null?(o.next=t.pending=o,wh(t,o)):(o.next=a.next,t.pending=a.next=o)}}function wh(e,t){var a=t.action,i=t.payload,r=e.state;if(t.isTransition){var o=D.T,h={};D.T=h;try{var x=a(r,i),S=D.S;S!==null&&S(h,x),Sh(e,t,x)}catch(R){Dc(e,t,R)}finally{o!==null&&h.types!==null&&(o.types=h.types),D.T=o}}else try{o=a(r,i),Sh(e,t,o)}catch(R){Dc(e,t,R)}}function Sh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){jh(e,t,i)},function(i){return Dc(e,t,i)}):jh(e,t,a)}function jh(e,t,a){t.status="fulfilled",t.value=a,Nh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,wh(e,a)))}function Dc(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,Nh(t),t=t.next;while(t!==i)}e.action=null}function Nh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function _h(e,t){return t}function Ah(e,t){if(Oe){var a=Ie.formState;if(a!==null){e:{var i=ge;if(Oe){if(We){t:{for(var r=We,o=ha;r.nodeType!==8;){if(!o){r=null;break t}if(r=pa(r.nextSibling),r===null){r=null;break t}}o=r.data,r=o==="F!"||o==="F"?r:null}if(r){We=pa(r.nextSibling),i=r.data==="F!";break e}}Rn(i)}i=!1}i&&(t=a[0])}}return a=Ot(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_h,lastRenderedState:t},a.queue=i,a=Gh.bind(null,ge,i),i.dispatch=a,i=Mc(!1),o=Hc.bind(null,ge,!1,i.queue),i=Ot(),r={state:t,dispatch:null,action:e,pending:null},i.queue=r,a=fg.bind(null,ge,r,o,a),r.dispatch=a,i.memoizedState=e,[t,a,!1]}function Eh(e){var t=ct();return kh(t,Xe,e)}function kh(e,t,a){if(t=Tc(e,t,_h)[0],e=fr(rn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=Ii(t)}catch(h){throw h===ti?ar:h}else i=t;t=ct();var r=t.queue,o=r.dispatch;return a!==t.memoizedState&&(ge.flags|=2048,si(9,{destroy:void 0},hg.bind(null,r,a),null)),[i,o,e]}function hg(e,t){e.action=t}function Rh(e){var t=ct(),a=Xe;if(a!==null)return kh(t,a,e);ct(),t=t.memoizedState,a=ct();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function si(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=ge.updateQueue,t===null&&(t=or(),ge.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e),e}function Ch(){return ct().memoizedState}function hr(e,t,a,i){var r=Ot();ge.flags|=e,r.memoizedState=si(1|t,{destroy:void 0},a,i===void 0?null:i)}function mr(e,t,a,i){var r=ct();i=i===void 0?null:i;var o=r.memoizedState.inst;Xe!==null&&i!==null&&_c(i,Xe.memoizedState.deps)?r.memoizedState=si(t,o,a,i):(ge.flags|=e,r.memoizedState=si(1|t,o,a,i))}function Th(e,t){hr(8390656,8,e,t)}function Lc(e,t){mr(2048,8,e,t)}function mg(e){ge.flags|=4;var t=ge.updateQueue;if(t===null)t=or(),ge.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Oh(e){var t=ct().memoizedState;return mg({ref:t,nextImpl:e}),function(){if((qe&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Mh(e,t){return mr(4,2,e,t)}function Dh(e,t){return mr(4,4,e,t)}function Lh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Uh(e,t,a){a=a!=null?a.concat([e]):null,mr(4,4,Lh.bind(null,t,e),a)}function Uc(){}function zh(e,t){var a=ct();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&_c(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function Bh(e,t){var a=ct();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&_c(t,i[1]))return i[0];if(i=e(),bl){Qt(!0);try{e()}finally{Qt(!1)}}return a.memoizedState=[i,t],i}function zc(e,t,a){return a===void 0||(sn&1073741824)!==0&&(_e&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=qm(),ge.lanes|=e,Bn|=e,a)}function qh(e,t,a,i){return Kt(a,t)?a:ni.current!==null?(e=zc(e,a,i),Kt(e,t)||(ht=!0),e):(sn&42)===0||(sn&1073741824)!==0&&(_e&261930)===0?(ht=!0,e.memoizedState=a):(e=qm(),ge.lanes|=e,Bn|=e,t)}function Hh(e,t,a,i,r){var o=Z.p;Z.p=o!==0&&8>o?o:8;var h=D.T,x={};D.T=x,Hc(e,!1,t,a);try{var S=r(),R=D.S;if(R!==null&&R(x,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var z=cg(S,i);Fi(e,t,z,ea(e))}else Fi(e,t,i,ea(e))}catch(V){Fi(e,t,{then:function(){},status:"rejected",reason:V},ea())}finally{Z.p=o,h!==null&&x.types!==null&&(h.types=x.types),D.T=h}}function pg(){}function Bc(e,t,a,i){if(e.tag!==5)throw Error(u(476));var r=$h(e).queue;Hh(e,r,t,ce,a===null?pg:function(){return Yh(e),a(i)})}function $h(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rn,lastRenderedState:ce},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Yh(e){var t=$h(e);t.next===null&&(t=e.alternate.memoizedState),Fi(e,t.next.queue,{},ea())}function qc(){return At(ms)}function Vh(){return ct().memoizedState}function Zh(){return ct().memoizedState}function xg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=ea();e=On(a);var i=Mn(t,e,a);i!==null&&(Vt(i,t,a),Qi(i,t,a)),t={cache:mc()},e.payload=t;return}t=t.return}}function yg(e,t,a){var i=ea();a={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},pr(e)?Qh(t,a):(a=nc(e,t,a,i),a!==null&&(Vt(a,e,i),Xh(a,t,i)))}function Gh(e,t,a){var i=ea();Fi(e,t,a,i)}function Fi(e,t,a,i){var r={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(pr(e))Qh(t,r);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var h=t.lastRenderedState,x=o(h,a);if(r.hasEagerState=!0,r.eagerState=x,Kt(x,h))return Js(e,t,r,0),Ie===null&&Ks(),!1}catch{}finally{}if(a=nc(e,t,r,i),a!==null)return Vt(a,e,i),Xh(a,t,i),!0}return!1}function Hc(e,t,a,i){if(i={lane:2,revertLane:go(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},pr(e)){if(t)throw Error(u(479))}else t=nc(e,a,i,2),t!==null&&Vt(t,e,2)}function pr(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function Qh(e,t){li=ur=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Xh(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,O(e,a)}}var Wi={readContext:At,use:dr,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};Wi.useEffectEvent=st;var Kh={readContext:At,use:dr,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:At,useEffect:Th,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,hr(4194308,4,Lh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return hr(4194308,4,e,t)},useInsertionEffect:function(e,t){hr(4,2,e,t)},useMemo:function(e,t){var a=Ot();t=t===void 0?null:t;var i=e();if(bl){Qt(!0);try{e()}finally{Qt(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=Ot();if(a!==void 0){var r=a(t);if(bl){Qt(!0);try{a(t)}finally{Qt(!1)}}}else r=t;return i.memoizedState=i.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},i.queue=e,e=e.dispatch=yg.bind(null,ge,e),[i.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:function(e){e=Mc(e);var t=e.queue,a=Gh.bind(null,ge,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Uc,useDeferredValue:function(e,t){var a=Ot();return zc(a,e,t)},useTransition:function(){var e=Mc(!1);return e=Hh.bind(null,ge,e.queue,!0,!1),Ot().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=ge,r=Ot();if(Oe){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Ie===null)throw Error(u(349));(_e&127)!==0||ph(i,t,a)}r.memoizedState=a;var o={value:a,getSnapshot:t};return r.queue=o,Th(yh.bind(null,i,o,e),[e]),i.flags|=2048,si(9,{destroy:void 0},xh.bind(null,i,o,a,t),null),a},useId:function(){var e=Ot(),t=Ie.identifierPrefix;if(Oe){var a=qa,i=Ba;a=(i&~(1<<32-G(i)-1)).toString(32)+a,t="_"+t+"R_"+a,a=cr++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=og++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:qc,useFormState:Ah,useActionState:Ah,useOptimistic:function(e){var t=Ot();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Hc.bind(null,ge,!0,a),a.dispatch=t,[e,t]},useMemoCache:Cc,useCacheRefresh:function(){return Ot().memoizedState=xg.bind(null,ge)},useEffectEvent:function(e){var t=Ot(),a={impl:e};return t.memoizedState=a,function(){if((qe&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},$c={readContext:At,use:dr,useCallback:zh,useContext:At,useEffect:Lc,useImperativeHandle:Uh,useInsertionEffect:Mh,useLayoutEffect:Dh,useMemo:Bh,useReducer:fr,useRef:Ch,useState:function(){return fr(rn)},useDebugValue:Uc,useDeferredValue:function(e,t){var a=ct();return qh(a,Xe.memoizedState,e,t)},useTransition:function(){var e=fr(rn)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:Ii(e),t]},useSyncExternalStore:mh,useId:Vh,useHostTransitionStatus:qc,useFormState:Eh,useActionState:Eh,useOptimistic:function(e,t){var a=ct();return bh(a,Xe,e,t)},useMemoCache:Cc,useCacheRefresh:Zh};$c.useEffectEvent=Oh;var Jh={readContext:At,use:dr,useCallback:zh,useContext:At,useEffect:Lc,useImperativeHandle:Uh,useInsertionEffect:Mh,useLayoutEffect:Dh,useMemo:Bh,useReducer:Oc,useRef:Ch,useState:function(){return Oc(rn)},useDebugValue:Uc,useDeferredValue:function(e,t){var a=ct();return Xe===null?zc(a,e,t):qh(a,Xe.memoizedState,e,t)},useTransition:function(){var e=Oc(rn)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:Ii(e),t]},useSyncExternalStore:mh,useId:Vh,useHostTransitionStatus:qc,useFormState:Rh,useActionState:Rh,useOptimistic:function(e,t){var a=ct();return Xe!==null?bh(a,Xe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Cc,useCacheRefresh:Zh};Jh.useEffectEvent=Oh;function Yc(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:_({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Vc={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=ea(),r=On(i);r.payload=t,a!=null&&(r.callback=a),t=Mn(e,r,i),t!==null&&(Vt(t,e,i),Qi(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=ea(),r=On(i);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=Mn(e,r,i),t!==null&&(Vt(t,e,i),Qi(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=ea(),i=On(a);i.tag=2,t!=null&&(i.callback=t),t=Mn(e,i,a),t!==null&&(Vt(t,e,a),Qi(t,e,a))}};function Ih(e,t,a,i,r,o,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,o,h):t.prototype&&t.prototype.isPureReactComponent?!Bi(a,i)||!Bi(r,o):!0}function Fh(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&Vc.enqueueReplaceState(t,t.state,null)}function wl(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}if(e=e.defaultProps){a===t&&(a=_({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}function Wh(e){Xs(e)}function Ph(e){console.error(e)}function em(e){Xs(e)}function xr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function tm(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Zc(e,t,a){return a=On(a),a.tag=3,a.payload={element:null},a.callback=function(){xr(e,t)},a}function am(e){return e=On(e),e.tag=3,e}function nm(e,t,a,i){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var o=i.value;e.payload=function(){return r(o)},e.callback=function(){tm(t,a,i)}}var h=a.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){tm(t,a,i),typeof r!="function"&&(qn===null?qn=new Set([this]):qn.add(this));var x=i.stack;this.componentDidCatch(i.value,{componentStack:x!==null?x:""})})}function vg(e,t,a,i,r){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&Wl(t,a,r,!0),a=It.current,a!==null){switch(a.tag){case 31:case 13:return ma===null?kr():a.alternate===null&&rt===0&&(rt=3),a.flags&=-257,a.flags|=65536,a.lanes=r,i===nr?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),xo(e,i,r)),!1;case 22:return a.flags|=65536,i===nr?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),xo(e,i,r)),!1}throw Error(u(435,a.tag))}return xo(e,i,r),kr(),!1}if(Oe)return t=It.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,i!==cc&&(e=Error(u(422),{cause:i}),$i(oa(e,a)))):(i!==cc&&(t=Error(u(423),{cause:i}),$i(oa(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,i=oa(i,a),r=Zc(e.stateNode,i,r),bc(e,r),rt!==4&&(rt=2)),!1;var o=Error(u(520),{cause:i});if(o=oa(o,a),ss===null?ss=[o]:ss.push(o),rt!==4&&(rt=2),t===null)return!0;i=oa(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=Zc(a.stateNode,i,e),bc(a,e),!1;case 1:if(t=a.type,o=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(qn===null||!qn.has(o))))return a.flags|=65536,r&=-r,a.lanes|=r,r=am(r),nm(r,e,a,i),bc(a,r),!1}a=a.return}while(a!==null);return!1}var Gc=Error(u(461)),ht=!1;function Et(e,t,a,i){t.child=e===null?rh(t,null,a,i):gl(t,e.child,a,i)}function lm(e,t,a,i,r){a=a.render;var o=t.ref;if("ref"in i){var h={};for(var x in i)x!=="ref"&&(h[x]=i[x])}else h=i;return pl(t),i=Ac(e,t,a,h,o,r),x=Ec(),e!==null&&!ht?(kc(e,t,r),un(e,t,r)):(Oe&&x&&rc(t),t.flags|=1,Et(e,t,i,r),t.child)}function im(e,t,a,i,r){if(e===null){var o=a.type;return typeof o=="function"&&!lc(o)&&o.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=o,sm(e,t,o,i,r)):(e=Fs(a.type,null,i,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!Pc(e,r)){var h=o.memoizedProps;if(a=a.compare,a=a!==null?a:Bi,a(h,i)&&e.ref===t.ref)return un(e,t,r)}return t.flags|=1,e=tn(o,i),e.ref=t.ref,e.return=t,t.child=e}function sm(e,t,a,i,r){if(e!==null){var o=e.memoizedProps;if(Bi(o,i)&&e.ref===t.ref)if(ht=!1,t.pendingProps=i=o,Pc(e,r))(e.flags&131072)!==0&&(ht=!0);else return t.lanes=e.lanes,un(e,t,r)}return Qc(e,t,a,i,r)}function rm(e,t,a,i){var r=i.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|a:a,e!==null){for(i=t.child=e.child,r=0;i!==null;)r=r|i.lanes|i.childLanes,i=i.sibling;i=r&~o}else i=0,t.child=null;return um(e,t,o,a,i)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&tr(t,o!==null?o.cachePool:null),o!==null?oh(t,o):Sc(),dh(t);else return i=t.lanes=536870912,um(e,t,o!==null?o.baseLanes|a:a,a,i)}else o!==null?(tr(t,o.cachePool),oh(t,o),Ln(),t.memoizedState=null):(e!==null&&tr(t,null),Sc(),Ln());return Et(e,t,r,a),t.child}function Pi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function um(e,t,a,i,r){var o=xc();return o=o===null?null:{parent:dt._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&tr(t,null),Sc(),dh(t),e!==null&&Wl(e,t,i,!0),t.childLanes=r,null}function yr(e,t){return t=gr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cm(e,t,a){return gl(t,e.child,null,a),e=yr(t,t.pendingProps),e.flags|=2,Ft(t),t.memoizedState=null,e}function gg(e,t,a){var i=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Oe){if(i.mode==="hidden")return e=yr(t,i),t.lanes=536870912,Pi(null,e);if(Nc(t),(e=We)?(e=wp(e,ha),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:En!==null?{id:Ba,overflow:qa}:null,retryLane:536870912,hydrationErrors:null},a=Qf(e),a.return=t,t.child=a,_t=t,We=null)):e=null,e===null)throw Rn(t);return t.lanes=536870912,null}return yr(t,i)}var o=e.memoizedState;if(o!==null){var h=o.dehydrated;if(Nc(t),r)if(t.flags&256)t.flags&=-257,t=cm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(ht||Wl(e,t,a,!1),r=(a&e.childLanes)!==0,ht||r){if(i=Ie,i!==null&&(h=re(i,a),h!==0&&h!==o.retryLane))throw o.retryLane=h,dl(e,h),Vt(i,e,h),Gc;kr(),t=cm(e,t,a)}else e=o.treeContext,We=pa(h.nextSibling),_t=t,Oe=!0,kn=null,ha=!1,e!==null&&Jf(t,e),t=yr(t,i),t.flags|=4096;return t}return e=tn(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vr(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(u(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Qc(e,t,a,i,r){return pl(t),a=Ac(e,t,a,i,void 0,r),i=Ec(),e!==null&&!ht?(kc(e,t,r),un(e,t,r)):(Oe&&i&&rc(t),t.flags|=1,Et(e,t,a,r),t.child)}function om(e,t,a,i,r,o){return pl(t),t.updateQueue=null,a=hh(t,i,a,r),fh(e),i=Ec(),e!==null&&!ht?(kc(e,t,o),un(e,t,o)):(Oe&&i&&rc(t),t.flags|=1,Et(e,t,a,o),t.child)}function dm(e,t,a,i,r){if(pl(t),t.stateNode===null){var o=Kl,h=a.contextType;typeof h=="object"&&h!==null&&(o=At(h)),o=new a(i,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Vc,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=i,o.state=t.memoizedState,o.refs={},vc(t),h=a.contextType,o.context=typeof h=="object"&&h!==null?At(h):Kl,o.state=t.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(Yc(t,a,h,i),o.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(h=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),h!==o.state&&Vc.enqueueReplaceState(o,o.state,null),Ki(t,i,o,r),Xi(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){o=t.stateNode;var x=t.memoizedProps,S=wl(a,x);o.props=S;var R=o.context,z=a.contextType;h=Kl,typeof z=="object"&&z!==null&&(h=At(z));var V=a.getDerivedStateFromProps;z=typeof V=="function"||typeof o.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,z||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(x||R!==h)&&Fh(t,o,i,h),Tn=!1;var T=t.memoizedState;o.state=T,Ki(t,i,o,r),Xi(),R=t.memoizedState,x||T!==R||Tn?(typeof V=="function"&&(Yc(t,a,V,i),R=t.memoizedState),(S=Tn||Ih(t,a,S,i,T,R,h))?(z||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=R),o.props=i,o.state=R,o.context=h,i=S):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{o=t.stateNode,gc(e,t),h=t.memoizedProps,z=wl(a,h),o.props=z,V=t.pendingProps,T=o.context,R=a.contextType,S=Kl,typeof R=="object"&&R!==null&&(S=At(R)),x=a.getDerivedStateFromProps,(R=typeof x=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(h!==V||T!==S)&&Fh(t,o,i,S),Tn=!1,T=t.memoizedState,o.state=T,Ki(t,i,o,r),Xi();var M=t.memoizedState;h!==V||T!==M||Tn||e!==null&&e.dependencies!==null&&Ps(e.dependencies)?(typeof x=="function"&&(Yc(t,a,x,i),M=t.memoizedState),(z=Tn||Ih(t,a,z,i,T,M,S)||e!==null&&e.dependencies!==null&&Ps(e.dependencies))?(R||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,M,S),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,M,S)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=M),o.props=i,o.state=M,o.context=S,i=z):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),i=!1)}return o=i,vr(e,t),i=(t.flags&128)!==0,o||i?(o=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&i?(t.child=gl(t,e.child,null,r),t.child=gl(t,null,a,r)):Et(e,t,a,r),t.memoizedState=o.state,e=t.child):e=un(e,t,r),e}function fm(e,t,a,i){return hl(),t.flags|=256,Et(e,t,a,i),t.child}var Xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Kc(e){return{baseLanes:e,cachePool:th()}}function Jc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Pt),e}function hm(e,t,a){var i=t.pendingProps,r=!1,o=(t.flags&128)!==0,h;if((h=o)||(h=e!==null&&e.memoizedState===null?!1:(ut.current&2)!==0),h&&(r=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Oe){if(r?Dn(t):Ln(),(e=We)?(e=wp(e,ha),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:En!==null?{id:Ba,overflow:qa}:null,retryLane:536870912,hydrationErrors:null},a=Qf(e),a.return=t,t.child=a,_t=t,We=null)):e=null,e===null)throw Rn(t);return Oo(e)?t.lanes=32:t.lanes=536870912,null}var x=i.children;return i=i.fallback,r?(Ln(),r=t.mode,x=gr({mode:"hidden",children:x},r),i=fl(i,r,a,null),x.return=t,i.return=t,x.sibling=i,t.child=x,i=t.child,i.memoizedState=Kc(a),i.childLanes=Jc(e,h,a),t.memoizedState=Xc,Pi(null,i)):(Dn(t),Ic(t,x))}var S=e.memoizedState;if(S!==null&&(x=S.dehydrated,x!==null)){if(o)t.flags&256?(Dn(t),t.flags&=-257,t=Fc(e,t,a)):t.memoizedState!==null?(Ln(),t.child=e.child,t.flags|=128,t=null):(Ln(),x=i.fallback,r=t.mode,i=gr({mode:"visible",children:i.children},r),x=fl(x,r,a,null),x.flags|=2,i.return=t,x.return=t,i.sibling=x,t.child=i,gl(t,e.child,null,a),i=t.child,i.memoizedState=Kc(a),i.childLanes=Jc(e,h,a),t.memoizedState=Xc,t=Pi(null,i));else if(Dn(t),Oo(x)){if(h=x.nextSibling&&x.nextSibling.dataset,h)var R=h.dgst;h=R,i=Error(u(419)),i.stack="",i.digest=h,$i({value:i,source:null,stack:null}),t=Fc(e,t,a)}else if(ht||Wl(e,t,a,!1),h=(a&e.childLanes)!==0,ht||h){if(h=Ie,h!==null&&(i=re(h,a),i!==0&&i!==S.retryLane))throw S.retryLane=i,dl(e,i),Vt(h,e,i),Gc;To(x)||kr(),t=Fc(e,t,a)}else To(x)?(t.flags|=192,t.child=e.child,t=null):(e=S.treeContext,We=pa(x.nextSibling),_t=t,Oe=!0,kn=null,ha=!1,e!==null&&Jf(t,e),t=Ic(t,i.children),t.flags|=4096);return t}return r?(Ln(),x=i.fallback,r=t.mode,S=e.child,R=S.sibling,i=tn(S,{mode:"hidden",children:i.children}),i.subtreeFlags=S.subtreeFlags&65011712,R!==null?x=tn(R,x):(x=fl(x,r,a,null),x.flags|=2),x.return=t,i.return=t,i.sibling=x,t.child=i,Pi(null,i),i=t.child,x=e.child.memoizedState,x===null?x=Kc(a):(r=x.cachePool,r!==null?(S=dt._currentValue,r=r.parent!==S?{parent:S,pool:S}:r):r=th(),x={baseLanes:x.baseLanes|a,cachePool:r}),i.memoizedState=x,i.childLanes=Jc(e,h,a),t.memoizedState=Xc,Pi(e.child,i)):(Dn(t),a=e.child,e=a.sibling,a=tn(a,{mode:"visible",children:i.children}),a.return=t,a.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=a,t.memoizedState=null,a)}function Ic(e,t){return t=gr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function gr(e,t){return e=Jt(22,e,null,t),e.lanes=0,e}function Fc(e,t,a){return gl(t,e.child,null,a),e=Ic(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mm(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),fc(e.return,t,a)}function Wc(e,t,a,i,r,o){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:r,treeForkCount:o}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=i,h.tail=a,h.tailMode=r,h.treeForkCount=o)}function pm(e,t,a){var i=t.pendingProps,r=i.revealOrder,o=i.tail;i=i.children;var h=ut.current,x=(h&2)!==0;if(x?(h=h&1|2,t.flags|=128):h&=1,F(ut,h),Et(e,t,i,a),i=Oe?Hi:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mm(e,a,t);else if(e.tag===19)mm(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&rr(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),Wc(t,!1,r,a,o,i);break;case"backwards":case"unstable_legacy-backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&rr(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}Wc(t,!0,a,null,o,i);break;case"together":Wc(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function un(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Bn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Wl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,a=tn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=tn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Pc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ps(e)))}function bg(e,t,a){switch(t.tag){case 3:De(t,t.stateNode.containerInfo),Cn(t,dt,e.memoizedState.cache),hl();break;case 27:case 5:Na(t);break;case 4:De(t,t.stateNode.containerInfo);break;case 10:Cn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Nc(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Dn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?hm(e,t,a):(Dn(t),e=un(e,t,a),e!==null?e.sibling:null);Dn(t);break;case 19:var r=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(Wl(e,t,a,!1),i=(a&t.childLanes)!==0),r){if(i)return pm(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),F(ut,ut.current),i)break;return null;case 22:return t.lanes=0,rm(e,t,a,t.pendingProps);case 24:Cn(t,dt,e.memoizedState.cache)}return un(e,t,a)}function xm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)ht=!0;else{if(!Pc(e,a)&&(t.flags&128)===0)return ht=!1,bg(e,t,a);ht=(e.flags&131072)!==0}else ht=!1,Oe&&(t.flags&1048576)!==0&&Kf(t,Hi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=yl(t.elementType),t.type=e,typeof e=="function")lc(e)?(i=wl(e,i),t.tag=1,t=dm(null,t,e,i,a)):(t.tag=0,t=Qc(null,t,e,i,a));else{if(e!=null){var r=e.$$typeof;if(r===oe){t.tag=11,t=lm(null,t,e,i,a);break e}else if(r===I){t.tag=14,t=im(null,t,e,i,a);break e}}throw t=vt(e)||e,Error(u(306,t,""))}}return t;case 0:return Qc(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,r=wl(i,t.pendingProps),dm(e,t,i,r,a);case 3:e:{if(De(t,t.stateNode.containerInfo),e===null)throw Error(u(387));i=t.pendingProps;var o=t.memoizedState;r=o.element,gc(e,t),Ki(t,i,null,a);var h=t.memoizedState;if(i=h.cache,Cn(t,dt,i),i!==o.cache&&hc(t,[dt],a,!0),Xi(),i=h.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=fm(e,t,i,a);break e}else if(i!==r){r=oa(Error(u(424)),t),$i(r),t=fm(e,t,i,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(We=pa(e.firstChild),_t=t,Oe=!0,kn=null,ha=!0,a=rh(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(hl(),i===r){t=un(e,t,a);break e}Et(e,t,i,a)}t=t.child}return t;case 26:return vr(e,t),e===null?(a=Ep(t.type,null,t.pendingProps,null))?t.memoizedState=a:Oe||(a=t.type,e=t.pendingProps,i=Lr(xe.current).createElement(a),i[Nt]=t,i[zt]=e,kt(i,a,e),bt(i),t.stateNode=i):t.memoizedState=Ep(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Na(t),e===null&&Oe&&(i=t.stateNode=Np(t.type,t.pendingProps,xe.current),_t=t,ha=!0,r=We,Vn(t.type)?(Mo=r,We=pa(i.firstChild)):We=r),Et(e,t,t.pendingProps.children,a),vr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Oe&&((r=i=We)&&(i=Ig(i,t.type,t.pendingProps,ha),i!==null?(t.stateNode=i,_t=t,We=pa(i.firstChild),ha=!1,r=!0):r=!1),r||Rn(t)),Na(t),r=t.type,o=t.pendingProps,h=e!==null?e.memoizedProps:null,i=o.children,ko(r,o)?i=null:h!==null&&ko(r,h)&&(t.flags|=32),t.memoizedState!==null&&(r=Ac(e,t,dg,null,null,a),ms._currentValue=r),vr(e,t),Et(e,t,i,a),t.child;case 6:return e===null&&Oe&&((e=a=We)&&(a=Fg(a,t.pendingProps,ha),a!==null?(t.stateNode=a,_t=t,We=null,e=!0):e=!1),e||Rn(t)),null;case 13:return hm(e,t,a);case 4:return De(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=gl(t,null,i,a):Et(e,t,i,a),t.child;case 11:return lm(e,t,t.type,t.pendingProps,a);case 7:return Et(e,t,t.pendingProps,a),t.child;case 8:return Et(e,t,t.pendingProps.children,a),t.child;case 12:return Et(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,Cn(t,t.type,i.value),Et(e,t,i.children,a),t.child;case 9:return r=t.type._context,i=t.pendingProps.children,pl(t),r=At(r),i=i(r),t.flags|=1,Et(e,t,i,a),t.child;case 14:return im(e,t,t.type,t.pendingProps,a);case 15:return sm(e,t,t.type,t.pendingProps,a);case 19:return pm(e,t,a);case 31:return gg(e,t,a);case 22:return rm(e,t,a,t.pendingProps);case 24:return pl(t),i=At(dt),e===null?(r=xc(),r===null&&(r=Ie,o=mc(),r.pooledCache=o,o.refCount++,o!==null&&(r.pooledCacheLanes|=a),r=o),t.memoizedState={parent:i,cache:r},vc(t),Cn(t,dt,r)):((e.lanes&a)!==0&&(gc(e,t),Ki(t,null,null,a),Xi()),r=e.memoizedState,o=t.memoizedState,r.parent!==i?(r={parent:i,cache:i},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Cn(t,dt,i)):(i=o.cache,Cn(t,dt,i),i!==r.cache&&hc(t,[dt],a,!0))),Et(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function cn(e){e.flags|=4}function eo(e,t,a,i,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(Vm())e.flags|=8192;else throw vl=nr,yc}else e.flags&=-16777217}function ym(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Op(t))if(Vm())e.flags|=8192;else throw vl=nr,yc}function br(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ds():536870912,e.lanes|=t,oi|=t)}function es(e,t){if(!Oe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,i|=r.subtreeFlags&65011712,i|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function wg(e,t,a){var i=t.pendingProps;switch(uc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(t),null;case 1:return Pe(t),null;case 3:return a=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ln(dt),Ye(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Fl(t)?cn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,oc())),Pe(t),null;case 26:var r=t.type,o=t.memoizedState;return e===null?(cn(t),o!==null?(Pe(t),ym(t,o)):(Pe(t),eo(t,r,null,i,a))):o?o!==e.memoizedState?(cn(t),Pe(t),ym(t,o)):(Pe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&cn(t),Pe(t),eo(t,r,e,i,a)),null;case 27:if(Lt(t),a=xe.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&cn(t);else{if(!i){if(t.stateNode===null)throw Error(u(166));return Pe(t),null}e=ee.current,Fl(t)?If(t):(e=Np(r,i,a),t.stateNode=e,cn(t))}return Pe(t),null;case 5:if(Lt(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&cn(t);else{if(!i){if(t.stateNode===null)throw Error(u(166));return Pe(t),null}if(o=ee.current,Fl(t))If(t);else{var h=Lr(xe.current);switch(o){case 1:o=h.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:o=h.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":o=h.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":o=h.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":o=h.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof i.is=="string"?h.createElement("select",{is:i.is}):h.createElement("select"),i.multiple?o.multiple=!0:i.size&&(o.size=i.size);break;default:o=typeof i.is=="string"?h.createElement(r,{is:i.is}):h.createElement(r)}}o[Nt]=t,o[zt]=i;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)o.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=o;e:switch(kt(o,r,i),r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&cn(t)}}return Pe(t),eo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&cn(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(u(166));if(e=xe.current,Fl(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,r=_t,r!==null)switch(r.tag){case 27:case 5:i=r.memoizedProps}e[Nt]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||hp(e.nodeValue,a)),e||Rn(t,!0)}else e=Lr(e).createTextNode(i),e[Nt]=t,t.stateNode=e}return Pe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(i=Fl(t),a!==null){if(e===null){if(!i)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[Nt]=t}else hl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),e=!1}else a=oc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Ft(t),t):(Ft(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Pe(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Fl(t),i!==null&&i.dehydrated!==null){if(e===null){if(!r)throw Error(u(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(u(317));r[Nt]=t}else hl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),r=!1}else r=oc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Ft(t),t):(Ft(t),null)}return Ft(t),(t.flags&128)!==0?(t.lanes=a,t):(a=i!==null,e=e!==null&&e.memoizedState!==null,a&&(i=t.child,r=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(r=i.alternate.memoizedState.cachePool.pool),o=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),o!==r&&(i.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),br(t,t.updateQueue),Pe(t),null);case 4:return Ye(),e===null&&jo(t.stateNode.containerInfo),Pe(t),null;case 10:return ln(t.type),Pe(t),null;case 19:if(H(ut),i=t.memoizedState,i===null)return Pe(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)es(i,!1);else{if(rt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=rr(e),o!==null){for(t.flags|=128,es(i,!1),e=o.updateQueue,t.updateQueue=e,br(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Gf(a,e),a=a.sibling;return F(ut,ut.current&1|2),Oe&&an(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&St()>_r&&(t.flags|=128,r=!0,es(i,!1),t.lanes=4194304)}else{if(!r)if(e=rr(o),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,br(t,e),es(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Oe)return Pe(t),null}else 2*St()-i.renderingStartTime>_r&&a!==536870912&&(t.flags|=128,r=!0,es(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(e=i.last,e!==null?e.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=St(),e.sibling=null,a=ut.current,F(ut,r?a&1|2:a&1),Oe&&an(t,i.treeForkCount),e):(Pe(t),null);case 22:case 23:return Ft(t),jc(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(a&536870912)!==0&&(t.flags&128)===0&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),a=t.updateQueue,a!==null&&br(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==a&&(t.flags|=2048),e!==null&&H(xl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ln(dt),Pe(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Sg(e,t){switch(uc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ln(dt),Ye(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Lt(t),null;case 31:if(t.memoizedState!==null){if(Ft(t),t.alternate===null)throw Error(u(340));hl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ft(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));hl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(ut),null;case 4:return Ye(),null;case 10:return ln(t.type),null;case 22:case 23:return Ft(t),jc(),e!==null&&H(xl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ln(dt),null;case 25:return null;default:return null}}function vm(e,t){switch(uc(t),t.tag){case 3:ln(dt),Ye();break;case 26:case 27:case 5:Lt(t);break;case 4:Ye();break;case 31:t.memoizedState!==null&&Ft(t);break;case 13:Ft(t);break;case 19:H(ut);break;case 10:ln(t.type);break;case 22:case 23:Ft(t),jc(),e!==null&&H(xl);break;case 24:ln(dt)}}function ts(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var r=i.next;a=r;do{if((a.tag&e)===e){i=void 0;var o=a.create,h=a.inst;i=o(),h.destroy=i}a=a.next}while(a!==r)}}catch(x){Ze(t,t.return,x)}}function Un(e,t,a){try{var i=t.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var o=r.next;i=o;do{if((i.tag&e)===e){var h=i.inst,x=h.destroy;if(x!==void 0){h.destroy=void 0,r=t;var S=a,R=x;try{R()}catch(z){Ze(r,S,z)}}}i=i.next}while(i!==o)}}catch(z){Ze(t,t.return,z)}}function gm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{ch(t,a)}catch(i){Ze(e,e.return,i)}}}function bm(e,t,a){a.props=wl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){Ze(e,t,i)}}function as(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof a=="function"?e.refCleanup=a(i):a.current=i}}catch(r){Ze(e,t,r)}}function Ha(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}catch(r){Ze(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){Ze(e,t,r)}else a.current=null}function wm(e){var t=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(r){Ze(e,e.return,r)}}function to(e,t,a){try{var i=e.stateNode;Zg(i,e.type,a,t),i[zt]=t}catch(r){Ze(e,e.return,r)}}function Sm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Vn(e.type)||e.tag===4}function ao(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sm(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&&Vn(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 no(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Pa));else if(i!==4&&(i===27&&Vn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(no(e,t,a),e=e.sibling;e!==null;)no(e,t,a),e=e.sibling}function wr(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(i===27&&Vn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(wr(e,t,a),e=e.sibling;e!==null;)wr(e,t,a),e=e.sibling}function jm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);kt(t,i,a),t[Nt]=e,t[zt]=a}catch(o){Ze(e,e.return,o)}}var on=!1,mt=!1,lo=!1,Nm=typeof WeakSet=="function"?WeakSet:Set,wt=null;function jg(e,t){if(e=e.containerInfo,Ao=Yr,e=Uf(e),Fu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var r=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var h=0,x=-1,S=-1,R=0,z=0,V=e,T=null;t:for(;;){for(var M;V!==a||r!==0&&V.nodeType!==3||(x=h+r),V!==o||i!==0&&V.nodeType!==3||(S=h+i),V.nodeType===3&&(h+=V.nodeValue.length),(M=V.firstChild)!==null;)T=V,V=M;for(;;){if(V===e)break t;if(T===a&&++R===r&&(x=h),T===o&&++z===i&&(S=h),(M=V.nextSibling)!==null)break;V=T,T=V.parentNode}V=M}a=x===-1||S===-1?null:{start:x,end:S}}else a=null}a=a||{start:0,end:0}}else a=null;for(Eo={focusedElem:e,selectionRange:a},Yr=!1,wt=t;wt!==null;)if(t=wt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,wt=e;else for(;wt!==null;){switch(t=wt,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)r=e[a],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,a=t,r=o.memoizedProps,o=o.memoizedState,i=a.stateNode;try{var ae=wl(a.type,r);e=i.getSnapshotBeforeUpdate(ae,o),i.__reactInternalSnapshotBeforeUpdate=e}catch(fe){Ze(a,a.return,fe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Co(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Co(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(u(163))}if(e=t.sibling,e!==null){e.return=t.return,wt=e;break}wt=t.return}}function _m(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:fn(e,a),i&4&&ts(5,a);break;case 1:if(fn(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(h){Ze(a,a.return,h)}else{var r=wl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Ze(a,a.return,h)}}i&64&&gm(a),i&512&&as(a,a.return);break;case 3:if(fn(e,a),i&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{ch(e,t)}catch(h){Ze(a,a.return,h)}}break;case 27:t===null&&i&4&&jm(a);case 26:case 5:fn(e,a),t===null&&i&4&&wm(a),i&512&&as(a,a.return);break;case 12:fn(e,a);break;case 31:fn(e,a),i&4&&km(e,a);break;case 13:fn(e,a),i&4&&Rm(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Og.bind(null,a),Wg(e,a))));break;case 22:if(i=a.memoizedState!==null||on,!i){t=t!==null&&t.memoizedState!==null||mt,r=on;var o=mt;on=i,(mt=t)&&!o?hn(e,a,(a.subtreeFlags&8772)!==0):fn(e,a),on=r,mt=o}break;case 30:break;default:fn(e,a)}}function Am(e){var t=e.alternate;t!==null&&(e.alternate=null,Am(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Du(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 at=null,qt=!1;function dn(e,t,a){for(a=a.child;a!==null;)Em(e,t,a),a=a.sibling}function Em(e,t,a){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(_a,a)}catch{}switch(a.tag){case 26:mt||Ha(a,t),dn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:mt||Ha(a,t);var i=at,r=qt;Vn(a.type)&&(at=a.stateNode,qt=!1),dn(e,t,a),ds(a.stateNode),at=i,qt=r;break;case 5:mt||Ha(a,t);case 6:if(i=at,r=qt,at=null,dn(e,t,a),at=i,qt=r,at!==null)if(qt)try{(at.nodeType===9?at.body:at.nodeName==="HTML"?at.ownerDocument.body:at).removeChild(a.stateNode)}catch(o){Ze(a,t,o)}else try{at.removeChild(a.stateNode)}catch(o){Ze(a,t,o)}break;case 18:at!==null&&(qt?(e=at,gp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),vi(e)):gp(at,a.stateNode));break;case 4:i=at,r=qt,at=a.stateNode.containerInfo,qt=!0,dn(e,t,a),at=i,qt=r;break;case 0:case 11:case 14:case 15:Un(2,a,t),mt||Un(4,a,t),dn(e,t,a);break;case 1:mt||(Ha(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&bm(a,t,i)),dn(e,t,a);break;case 21:dn(e,t,a);break;case 22:mt=(i=mt)||a.memoizedState!==null,dn(e,t,a),mt=i;break;default:dn(e,t,a)}}function km(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{vi(e)}catch(a){Ze(t,t.return,a)}}}function Rm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{vi(e)}catch(a){Ze(t,t.return,a)}}function Ng(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Nm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Nm),t;default:throw Error(u(435,e.tag))}}function Sr(e,t){var a=Ng(e);t.forEach(function(i){if(!a.has(i)){a.add(i);var r=Mg.bind(null,e,i);i.then(r,r)}})}function Ht(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var r=a[i],o=e,h=t,x=h;e:for(;x!==null;){switch(x.tag){case 27:if(Vn(x.type)){at=x.stateNode,qt=!1;break e}break;case 5:at=x.stateNode,qt=!1;break e;case 3:case 4:at=x.stateNode.containerInfo,qt=!0;break e}x=x.return}if(at===null)throw Error(u(160));Em(o,h,r),at=null,qt=!1,o=r.alternate,o!==null&&(o.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Cm(t,e),t=t.sibling}var ka=null;function Cm(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ht(t,e),$t(e),i&4&&(Un(3,e,e.return),ts(3,e),Un(5,e,e.return));break;case 1:Ht(t,e),$t(e),i&512&&(mt||a===null||Ha(a,a.return)),i&64&&on&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var r=ka;if(Ht(t,e),$t(e),i&512&&(mt||a===null||Ha(a,a.return)),i&4){var o=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(i){case"title":o=r.getElementsByTagName("title")[0],(!o||o[Ri]||o[Nt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=r.createElement(i),r.head.insertBefore(o,r.querySelector("head > title"))),kt(o,i,a),o[Nt]=e,bt(o),i=o;break e;case"link":var h=Cp("link","href",r).get(i+(a.href||""));if(h){for(var x=0;x<h.length;x++)if(o=h[x],o.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&o.getAttribute("rel")===(a.rel==null?null:a.rel)&&o.getAttribute("title")===(a.title==null?null:a.title)&&o.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){h.splice(x,1);break t}}o=r.createElement(i),kt(o,i,a),r.head.appendChild(o);break;case"meta":if(h=Cp("meta","content",r).get(i+(a.content||""))){for(x=0;x<h.length;x++)if(o=h[x],o.getAttribute("content")===(a.content==null?null:""+a.content)&&o.getAttribute("name")===(a.name==null?null:a.name)&&o.getAttribute("property")===(a.property==null?null:a.property)&&o.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&o.getAttribute("charset")===(a.charSet==null?null:a.charSet)){h.splice(x,1);break t}}o=r.createElement(i),kt(o,i,a),r.head.appendChild(o);break;default:throw Error(u(468,i))}o[Nt]=e,bt(o),i=o}e.stateNode=i}else Tp(r,e.type,e.stateNode);else e.stateNode=Rp(r,i,e.memoizedProps);else o!==i?(o===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):o.count--,i===null?Tp(r,e.type,e.stateNode):Rp(r,i,e.memoizedProps)):i===null&&e.stateNode!==null&&to(e,e.memoizedProps,a.memoizedProps)}break;case 27:Ht(t,e),$t(e),i&512&&(mt||a===null||Ha(a,a.return)),a!==null&&i&4&&to(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Ht(t,e),$t(e),i&512&&(mt||a===null||Ha(a,a.return)),e.flags&32){r=e.stateNode;try{$l(r,"")}catch(ae){Ze(e,e.return,ae)}}i&4&&e.stateNode!=null&&(r=e.memoizedProps,to(e,r,a!==null?a.memoizedProps:r)),i&1024&&(lo=!0);break;case 6:if(Ht(t,e),$t(e),i&4){if(e.stateNode===null)throw Error(u(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(ae){Ze(e,e.return,ae)}}break;case 3:if(Br=null,r=ka,ka=Ur(t.containerInfo),Ht(t,e),ka=r,$t(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{vi(t.containerInfo)}catch(ae){Ze(e,e.return,ae)}lo&&(lo=!1,Tm(e));break;case 4:i=ka,ka=Ur(e.stateNode.containerInfo),Ht(t,e),$t(e),ka=i;break;case 12:Ht(t,e),$t(e);break;case 31:Ht(t,e),$t(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Sr(e,i)));break;case 13:Ht(t,e),$t(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Nr=St()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Sr(e,i)));break;case 22:r=e.memoizedState!==null;var S=a!==null&&a.memoizedState!==null,R=on,z=mt;if(on=R||r,mt=z||S,Ht(t,e),mt=z,on=R,$t(e),i&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||S||on||mt||Sl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){S=a=t;try{if(o=S.stateNode,r)h=o.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{x=S.stateNode;var V=S.memoizedProps.style,T=V!=null&&V.hasOwnProperty("display")?V.display:null;x.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(ae){Ze(S,S.return,ae)}}}else if(t.tag===6){if(a===null){S=t;try{S.stateNode.nodeValue=r?"":S.memoizedProps}catch(ae){Ze(S,S.return,ae)}}}else if(t.tag===18){if(a===null){S=t;try{var M=S.stateNode;r?bp(M,!0):bp(S.stateNode,!1)}catch(ae){Ze(S,S.return,ae)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,Sr(e,a))));break;case 19:Ht(t,e),$t(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Sr(e,i)));break;case 30:break;case 21:break;default:Ht(t,e),$t(e)}}function $t(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if(Sm(i)){a=i;break}i=i.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var r=a.stateNode,o=ao(e);wr(e,o,r);break;case 5:var h=a.stateNode;a.flags&32&&($l(h,""),a.flags&=-33);var x=ao(e);wr(e,x,h);break;case 3:case 4:var S=a.stateNode.containerInfo,R=ao(e);no(e,R,S);break;default:throw Error(u(161))}}catch(z){Ze(e,e.return,z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Tm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Tm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function fn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)_m(e,t.alternate,t),t=t.sibling}function Sl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Un(4,t,t.return),Sl(t);break;case 1:Ha(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&bm(t,t.return,a),Sl(t);break;case 27:ds(t.stateNode);case 26:case 5:Ha(t,t.return),Sl(t);break;case 22:t.memoizedState===null&&Sl(t);break;case 30:Sl(t);break;default:Sl(t)}e=e.sibling}}function hn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,r=e,o=t,h=o.flags;switch(o.tag){case 0:case 11:case 15:hn(r,o,a),ts(4,o);break;case 1:if(hn(r,o,a),i=o,r=i.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(R){Ze(i,i.return,R)}if(i=o,r=i.updateQueue,r!==null){var x=i.stateNode;try{var S=r.shared.hiddenCallbacks;if(S!==null)for(r.shared.hiddenCallbacks=null,r=0;r<S.length;r++)uh(S[r],x)}catch(R){Ze(i,i.return,R)}}a&&h&64&&gm(o),as(o,o.return);break;case 27:jm(o);case 26:case 5:hn(r,o,a),a&&i===null&&h&4&&wm(o),as(o,o.return);break;case 12:hn(r,o,a);break;case 31:hn(r,o,a),a&&h&4&&km(r,o);break;case 13:hn(r,o,a),a&&h&4&&Rm(r,o);break;case 22:o.memoizedState===null&&hn(r,o,a),as(o,o.return);break;case 30:break;default:hn(r,o,a)}t=t.sibling}}function io(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Yi(a))}function so(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Yi(e))}function Ra(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Om(e,t,a,i),t=t.sibling}function Om(e,t,a,i){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Ra(e,t,a,i),r&2048&&ts(9,t);break;case 1:Ra(e,t,a,i);break;case 3:Ra(e,t,a,i),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Yi(e)));break;case 12:if(r&2048){Ra(e,t,a,i),e=t.stateNode;try{var o=t.memoizedProps,h=o.id,x=o.onPostCommit;typeof x=="function"&&x(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(S){Ze(t,t.return,S)}}else Ra(e,t,a,i);break;case 31:Ra(e,t,a,i);break;case 13:Ra(e,t,a,i);break;case 23:break;case 22:o=t.stateNode,h=t.alternate,t.memoizedState!==null?o._visibility&2?Ra(e,t,a,i):ns(e,t):o._visibility&2?Ra(e,t,a,i):(o._visibility|=2,ri(e,t,a,i,(t.subtreeFlags&10256)!==0||!1)),r&2048&&io(h,t);break;case 24:Ra(e,t,a,i),r&2048&&so(t.alternate,t);break;default:Ra(e,t,a,i)}}function ri(e,t,a,i,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,h=t,x=a,S=i,R=h.flags;switch(h.tag){case 0:case 11:case 15:ri(o,h,x,S,r),ts(8,h);break;case 23:break;case 22:var z=h.stateNode;h.memoizedState!==null?z._visibility&2?ri(o,h,x,S,r):ns(o,h):(z._visibility|=2,ri(o,h,x,S,r)),r&&R&2048&&io(h.alternate,h);break;case 24:ri(o,h,x,S,r),r&&R&2048&&so(h.alternate,h);break;default:ri(o,h,x,S,r)}t=t.sibling}}function ns(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,r=i.flags;switch(i.tag){case 22:ns(a,i),r&2048&&io(i.alternate,i);break;case 24:ns(a,i),r&2048&&so(i.alternate,i);break;default:ns(a,i)}t=t.sibling}}var ls=8192;function ui(e,t,a){if(e.subtreeFlags&ls)for(e=e.child;e!==null;)Mm(e,t,a),e=e.sibling}function Mm(e,t,a){switch(e.tag){case 26:ui(e,t,a),e.flags&ls&&e.memoizedState!==null&&o0(a,ka,e.memoizedState,e.memoizedProps);break;case 5:ui(e,t,a);break;case 3:case 4:var i=ka;ka=Ur(e.stateNode.containerInfo),ui(e,t,a),ka=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=ls,ls=16777216,ui(e,t,a),ls=i):ui(e,t,a));break;default:ui(e,t,a)}}function Dm(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 is(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];wt=i,Um(i,e)}Dm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Lm(e),e=e.sibling}function Lm(e){switch(e.tag){case 0:case 11:case 15:is(e),e.flags&2048&&Un(9,e,e.return);break;case 3:is(e);break;case 12:is(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,jr(e)):is(e);break;default:is(e)}}function jr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];wt=i,Um(i,e)}Dm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Un(8,t,t.return),jr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,jr(t));break;default:jr(t)}e=e.sibling}}function Um(e,t){for(;wt!==null;){var a=wt;switch(a.tag){case 0:case 11:case 15:Un(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:Yi(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,wt=i;else e:for(a=e;wt!==null;){i=wt;var r=i.sibling,o=i.return;if(Am(i),i===a){wt=null;break e}if(r!==null){r.return=o,wt=r;break e}wt=o}}}var _g={getCacheForType:function(e){var t=At(dt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return At(dt).controller.signal}},Ag=typeof WeakMap=="function"?WeakMap:Map,qe=0,Ie=null,je=null,_e=0,Ve=0,Wt=null,zn=!1,ci=!1,ro=!1,mn=0,rt=0,Bn=0,jl=0,uo=0,Pt=0,oi=0,ss=null,Yt=null,co=!1,Nr=0,zm=0,_r=1/0,Ar=null,qn=null,yt=0,Hn=null,di=null,pn=0,oo=0,fo=null,Bm=null,rs=0,ho=null;function ea(){return(qe&2)!==0&&_e!==0?_e&-_e:D.T!==null?go():Pd()}function qm(){if(Pt===0)if((_e&536870912)===0||Oe){var e=Ut;Ut<<=1,(Ut&3932160)===0&&(Ut=262144),Pt=e}else Pt=536870912;return e=It.current,e!==null&&(e.flags|=32),Pt}function Vt(e,t,a){(e===Ie&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)&&(fi(e,0),$n(e,_e,Pt,!1)),sl(e,a),((qe&2)===0||e!==Ie)&&(e===Ie&&((qe&2)===0&&(jl|=a),rt===4&&$n(e,_e,Pt,!1)),$a(e))}function Hm(e,t,a){if((qe&6)!==0)throw Error(u(327));var i=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Nn(e,t),r=i?Rg(e,t):po(e,t,!0),o=i;do{if(r===0){ci&&!i&&$n(e,t,0,!1);break}else{if(a=e.current.alternate,o&&!Eg(a)){r=po(e,t,!1),o=!1;continue}if(r===2){if(o=t,e.errorRecoveryDisabledLanes&o)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var x=e;r=ss;var S=x.current.memoizedState.isDehydrated;if(S&&(fi(x,h).flags|=256),h=po(x,h,!1),h!==2){if(ro&&!S){x.errorRecoveryDisabledLanes|=o,jl|=o,r=4;break e}o=Yt,Yt=r,o!==null&&(Yt===null?Yt=o:Yt.push.apply(Yt,o))}r=h}if(o=!1,r!==2)continue}}if(r===1){fi(e,0),$n(e,t,0,!0);break}e:{switch(i=e,o=r,o){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:$n(i,t,Pt,!zn);break e;case 2:Yt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(r=Nr+300-St(),10<r)){if($n(i,t,Pt,!zn),il(i,0,!0)!==0)break e;pn=t,i.timeoutHandle=yp($m.bind(null,i,a,Yt,Ar,co,t,Pt,jl,oi,zn,o,"Throttled",-0,0),r);break e}$m(i,a,Yt,Ar,co,t,Pt,jl,oi,zn,o,null,-0,0)}}break}while(!0);$a(e)}function $m(e,t,a,i,r,o,h,x,S,R,z,V,T,M){if(e.timeoutHandle=-1,V=t.subtreeFlags,V&8192||(V&16785408)===16785408){V={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pa},Mm(t,o,V);var ae=(o&62914560)===o?Nr-St():(o&4194048)===o?zm-St():0;if(ae=d0(V,ae),ae!==null){pn=o,e.cancelPendingCommit=ae(Jm.bind(null,e,t,o,a,i,r,h,x,S,z,V,null,T,M)),$n(e,o,h,!R);return}}Jm(e,t,o,a,i,r,h,x,S)}function Eg(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var i=0;i<a.length;i++){var r=a[i],o=r.getSnapshot;r=r.value;try{if(!Kt(o(),r))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function $n(e,t,a,i){t&=~uo,t&=~jl,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var r=t;0<r;){var o=31-G(r),h=1<<o;i[o]=-1,r&=~h}a!==0&&Us(e,a,t)}function Er(){return(qe&6)===0?(us(0),!1):!0}function mo(){if(je!==null){if(Ve===0)var e=je.return;else e=je,nn=ml=null,Rc(e),ai=null,Zi=0,e=je;for(;e!==null;)vm(e.alternate,e),e=e.return;je=null}}function fi(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Xg(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),pn=0,mo(),Ie=e,je=a=tn(e.current,null),_e=t,Ve=0,Wt=null,zn=!1,ci=Nn(e,t),ro=!1,oi=Pt=uo=jl=Bn=rt=0,Yt=ss=null,co=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var r=31-G(i),o=1<<r;t|=e[r],i&=~o}return mn=t,Ks(),a}function Ym(e,t){ge=null,D.H=Wi,t===ti||t===ar?(t=lh(),Ve=3):t===yc?(t=lh(),Ve=4):Ve=t===Gc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Wt=t,je===null&&(rt=1,xr(e,oa(t,e.current)))}function Vm(){var e=It.current;return e===null?!0:(_e&4194048)===_e?ma===null:(_e&62914560)===_e||(_e&536870912)!==0?e===ma:!1}function Zm(){var e=D.H;return D.H=Wi,e===null?Wi:e}function Gm(){var e=D.A;return D.A=_g,e}function kr(){rt=4,zn||(_e&4194048)!==_e&&It.current!==null||(ci=!0),(Bn&134217727)===0&&(jl&134217727)===0||Ie===null||$n(Ie,_e,Pt,!1)}function po(e,t,a){var i=qe;qe|=2;var r=Zm(),o=Gm();(Ie!==e||_e!==t)&&(Ar=null,fi(e,t)),t=!1;var h=rt;e:do try{if(Ve!==0&&je!==null){var x=je,S=Wt;switch(Ve){case 8:mo(),h=6;break e;case 3:case 2:case 9:case 6:It.current===null&&(t=!0);var R=Ve;if(Ve=0,Wt=null,hi(e,x,S,R),a&&ci){h=0;break e}break;default:R=Ve,Ve=0,Wt=null,hi(e,x,S,R)}}kg(),h=rt;break}catch(z){Ym(e,z)}while(!0);return t&&e.shellSuspendCounter++,nn=ml=null,qe=i,D.H=r,D.A=o,je===null&&(Ie=null,_e=0,Ks()),h}function kg(){for(;je!==null;)Qm(je)}function Rg(e,t){var a=qe;qe|=2;var i=Zm(),r=Gm();Ie!==e||_e!==t?(Ar=null,_r=St()+500,fi(e,t)):ci=Nn(e,t);e:do try{if(Ve!==0&&je!==null){t=je;var o=Wt;t:switch(Ve){case 1:Ve=0,Wt=null,hi(e,t,o,1);break;case 2:case 9:if(ah(o)){Ve=0,Wt=null,Xm(t);break}t=function(){Ve!==2&&Ve!==9||Ie!==e||(Ve=7),$a(e)},o.then(t,t);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:ah(o)?(Ve=0,Wt=null,Xm(t)):(Ve=0,Wt=null,hi(e,t,o,7));break;case 5:var h=null;switch(je.tag){case 26:h=je.memoizedState;case 5:case 27:var x=je;if(h?Op(h):x.stateNode.complete){Ve=0,Wt=null;var S=x.sibling;if(S!==null)je=S;else{var R=x.return;R!==null?(je=R,Rr(R)):je=null}break t}}Ve=0,Wt=null,hi(e,t,o,5);break;case 6:Ve=0,Wt=null,hi(e,t,o,6);break;case 8:mo(),rt=6;break e;default:throw Error(u(462))}}Cg();break}catch(z){Ym(e,z)}while(!0);return nn=ml=null,D.H=i,D.A=r,qe=a,je!==null?0:(Ie=null,_e=0,Ks(),rt)}function Cg(){for(;je!==null&&!al();)Qm(je)}function Qm(e){var t=xm(e.alternate,e,mn);e.memoizedProps=e.pendingProps,t===null?Rr(e):je=t}function Xm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=om(a,t,t.pendingProps,t.type,void 0,_e);break;case 11:t=om(a,t,t.pendingProps,t.type.render,t.ref,_e);break;case 5:Rc(t);default:vm(a,t),t=je=Gf(t,mn),t=xm(a,t,mn)}e.memoizedProps=e.pendingProps,t===null?Rr(e):je=t}function hi(e,t,a,i){nn=ml=null,Rc(t),ai=null,Zi=0;var r=t.return;try{if(vg(e,r,t,a,_e)){rt=1,xr(e,oa(a,e.current)),je=null;return}}catch(o){if(r!==null)throw je=r,o;rt=1,xr(e,oa(a,e.current)),je=null;return}t.flags&32768?(Oe||i===1?e=!0:ci||(_e&536870912)!==0?e=!1:(zn=e=!0,(i===2||i===9||i===3||i===6)&&(i=It.current,i!==null&&i.tag===13&&(i.flags|=16384))),Km(t,e)):Rr(t)}function Rr(e){var t=e;do{if((t.flags&32768)!==0){Km(t,zn);return}e=t.return;var a=wg(t.alternate,t,mn);if(a!==null){je=a;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);rt===0&&(rt=5)}function Km(e,t){do{var a=Sg(e.alternate,e);if(a!==null){a.flags&=32767,je=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=a}while(e!==null);rt=6,je=null}function Jm(e,t,a,i,r,o,h,x,S){e.cancelPendingCommit=null;do Cr();while(yt!==0);if((qe&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(o=t.lanes|t.childLanes,o|=ac,Ls(e,a,o,h,x,S),e===Ie&&(je=Ie=null,_e=0),di=t,Hn=e,pn=a,oo=o,fo=r,Bm=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Dg(Tt,function(){return ep(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=D.T,D.T=null,r=Z.p,Z.p=2,h=qe,qe|=4;try{jg(e,t,a)}finally{qe=h,Z.p=r,D.T=i}}yt=1,Im(),Fm(),Wm()}}function Im(){if(yt===1){yt=0;var e=Hn,t=di,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=D.T,D.T=null;var i=Z.p;Z.p=2;var r=qe;qe|=4;try{Cm(t,e);var o=Eo,h=Uf(e.containerInfo),x=o.focusedElem,S=o.selectionRange;if(h!==x&&x&&x.ownerDocument&&Lf(x.ownerDocument.documentElement,x)){if(S!==null&&Fu(x)){var R=S.start,z=S.end;if(z===void 0&&(z=R),"selectionStart"in x)x.selectionStart=R,x.selectionEnd=Math.min(z,x.value.length);else{var V=x.ownerDocument||document,T=V&&V.defaultView||window;if(T.getSelection){var M=T.getSelection(),ae=x.textContent.length,fe=Math.min(S.start,ae),Je=S.end===void 0?fe:Math.min(S.end,ae);!M.extend&&fe>Je&&(h=Je,Je=fe,fe=h);var A=Df(x,fe),N=Df(x,Je);if(A&&N&&(M.rangeCount!==1||M.anchorNode!==A.node||M.anchorOffset!==A.offset||M.focusNode!==N.node||M.focusOffset!==N.offset)){var k=V.createRange();k.setStart(A.node,A.offset),M.removeAllRanges(),fe>Je?(M.addRange(k),M.extend(N.node,N.offset)):(k.setEnd(N.node,N.offset),M.addRange(k))}}}}for(V=[],M=x;M=M.parentNode;)M.nodeType===1&&V.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<V.length;x++){var q=V[x];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}Yr=!!Ao,Eo=Ao=null}finally{qe=r,Z.p=i,D.T=a}}e.current=t,yt=2}}function Fm(){if(yt===2){yt=0;var e=Hn,t=di,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=D.T,D.T=null;var i=Z.p;Z.p=2;var r=qe;qe|=4;try{_m(e,t.alternate,t)}finally{qe=r,Z.p=i,D.T=a}}yt=3}}function Wm(){if(yt===4||yt===3){yt=0,ki();var e=Hn,t=di,a=pn,i=Bm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?yt=5:(yt=0,di=Hn=null,Pm(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(qn=null),Xt(a),t=t.stateNode,jt&&typeof jt.onCommitFiberRoot=="function")try{jt.onCommitFiberRoot(_a,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=D.T,r=Z.p,Z.p=2,D.T=null;try{for(var o=e.onRecoverableError,h=0;h<i.length;h++){var x=i[h];o(x.value,{componentStack:x.stack})}}finally{D.T=t,Z.p=r}}(pn&3)!==0&&Cr(),$a(e),r=e.pendingLanes,(a&261930)!==0&&(r&42)!==0?e===ho?rs++:(rs=0,ho=e):rs=0,us(0)}}function Pm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Yi(t)))}function Cr(){return Im(),Fm(),Wm(),ep()}function ep(){if(yt!==5)return!1;var e=Hn,t=oo;oo=0;var a=Xt(pn),i=D.T,r=Z.p;try{Z.p=32>a?32:a,D.T=null,a=fo,fo=null;var o=Hn,h=pn;if(yt=0,di=Hn=null,pn=0,(qe&6)!==0)throw Error(u(331));var x=qe;if(qe|=4,Lm(o.current),Om(o,o.current,h,a),qe=x,us(0,!1),jt&&typeof jt.onPostCommitFiberRoot=="function")try{jt.onPostCommitFiberRoot(_a,o)}catch{}return!0}finally{Z.p=r,D.T=i,Pm(e,t)}}function tp(e,t,a){t=oa(a,t),t=Zc(e.stateNode,t,2),e=Mn(e,t,2),e!==null&&(sl(e,2),$a(e))}function Ze(e,t,a){if(e.tag===3)tp(e,e,a);else for(;t!==null;){if(t.tag===3){tp(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(qn===null||!qn.has(i))){e=oa(a,e),a=am(2),i=Mn(t,a,2),i!==null&&(nm(a,i,t,e),sl(i,2),$a(i));break}}t=t.return}}function xo(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new Ag;var r=new Set;i.set(t,r)}else r=i.get(t),r===void 0&&(r=new Set,i.set(t,r));r.has(a)||(ro=!0,r.add(a),e=Tg.bind(null,e,t,a),t.then(e,e))}function Tg(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ie===e&&(_e&a)===a&&(rt===4||rt===3&&(_e&62914560)===_e&&300>St()-Nr?(qe&2)===0&&fi(e,0):uo|=a,oi===_e&&(oi=0)),$a(e)}function ap(e,t){t===0&&(t=Ds()),e=dl(e,t),e!==null&&(sl(e,t),$a(e))}function Og(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),ap(e,a)}function Mg(e,t){var a=0;switch(e.tag){case 31:case 13:var i=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(u(314))}i!==null&&i.delete(t),ap(e,a)}function Dg(e,t){return za(e,t)}var Tr=null,mi=null,yo=!1,Or=!1,vo=!1,Yn=0;function $a(e){e!==mi&&e.next===null&&(mi===null?Tr=mi=e:mi=mi.next=e),Or=!0,yo||(yo=!0,Ug())}function us(e,t){if(!vo&&Or){vo=!0;do for(var a=!1,i=Tr;i!==null;){if(e!==0){var r=i.pendingLanes;if(r===0)var o=0;else{var h=i.suspendedLanes,x=i.pingedLanes;o=(1<<31-G(42|e)+1)-1,o&=r&~(h&~x),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,sp(i,o))}else o=_e,o=il(i,i===Ie?o:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(o&3)===0||Nn(i,o)||(a=!0,sp(i,o));i=i.next}while(a);vo=!1}}function Lg(){np()}function np(){Or=yo=!1;var e=0;Yn!==0&&Qg()&&(e=Yn);for(var t=St(),a=null,i=Tr;i!==null;){var r=i.next,o=lp(i,t);o===0?(i.next=null,a===null?Tr=r:a.next=r,r===null&&(mi=a)):(a=i,(e!==0||(o&3)!==0)&&(Or=!0)),i=r}yt!==0&&yt!==5||us(e),Yn!==0&&(Yn=0)}function lp(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var h=31-G(o),x=1<<h,S=r[h];S===-1?((x&a)===0||(x&i)!==0)&&(r[h]=Ml(x,t)):S<=t&&(e.expiredLanes|=x),o&=~x}if(t=Ie,a=_e,a=il(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&Sn(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Nn(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&Sn(i),Xt(a)){case 2:case 8:a=Ia;break;case 32:a=Tt;break;case 268435456:a=nl;break;default:a=Tt}return i=ip.bind(null,e),a=za(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&Sn(i),e.callbackPriority=2,e.callbackNode=null,2}function ip(e,t){if(yt!==0&&yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Cr()&&e.callbackNode!==a)return null;var i=_e;return i=il(e,e===Ie?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Hm(e,i,t),lp(e,St()),e.callbackNode!=null&&e.callbackNode===a?ip.bind(null,e):null)}function sp(e,t){if(Cr())return null;Hm(e,t,!0)}function Ug(){Kg(function(){(qe&6)!==0?za(Ja,Lg):np()})}function go(){if(Yn===0){var e=Pl;e===0&&(e=jn,jn<<=1,(jn&261888)===0&&(jn=256)),Yn=e}return Yn}function rp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Hs(""+e)}function up(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function zg(e,t,a,i,r){if(t==="submit"&&a&&a.stateNode===r){var o=rp((r[zt]||null).action),h=i.submitter;h&&(t=(t=h[zt]||null)?rp(t.formAction):h.getAttribute("formAction"),t!==null&&(o=t,h=null));var x=new Zs("action","action",null,i,r);e.push({event:x,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Yn!==0){var S=h?up(r,h):new FormData(r);Bc(a,{pending:!0,data:S,method:r.method,action:o},null,S)}}else typeof o=="function"&&(x.preventDefault(),S=h?up(r,h):new FormData(r),Bc(a,{pending:!0,data:S,method:r.method,action:o},o,S))},currentTarget:r}]})}}for(var bo=0;bo<tc.length;bo++){var wo=tc[bo],Bg=wo.toLowerCase(),qg=wo[0].toUpperCase()+wo.slice(1);Ea(Bg,"on"+qg)}Ea(qf,"onAnimationEnd"),Ea(Hf,"onAnimationIteration"),Ea($f,"onAnimationStart"),Ea("dblclick","onDoubleClick"),Ea("focusin","onFocus"),Ea("focusout","onBlur"),Ea(tg,"onTransitionRun"),Ea(ag,"onTransitionStart"),Ea(ng,"onTransitionCancel"),Ea(Yf,"onTransitionEnd"),ql("onMouseEnter",["mouseout","mouseover"]),ql("onMouseLeave",["mouseout","mouseover"]),ql("onPointerEnter",["pointerout","pointerover"]),ql("onPointerLeave",["pointerout","pointerover"]),rl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rl("onBeforeInput",["compositionend","keypress","textInput","paste"]),rl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cs="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(" "),Hg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(cs));function cp(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],r=i.event;i=i.listeners;e:{var o=void 0;if(t)for(var h=i.length-1;0<=h;h--){var x=i[h],S=x.instance,R=x.currentTarget;if(x=x.listener,S!==o&&r.isPropagationStopped())break e;o=x,r.currentTarget=R;try{o(r)}catch(z){Xs(z)}r.currentTarget=null,o=S}else for(h=0;h<i.length;h++){if(x=i[h],S=x.instance,R=x.currentTarget,x=x.listener,S!==o&&r.isPropagationStopped())break e;o=x,r.currentTarget=R;try{o(r)}catch(z){Xs(z)}r.currentTarget=null,o=S}}}}function Ne(e,t){var a=t[Mu];a===void 0&&(a=t[Mu]=new Set);var i=e+"__bubble";a.has(i)||(op(t,e,2,!1),a.add(i))}function So(e,t,a){var i=0;t&&(i|=4),op(a,e,i,t)}var Mr="_reactListening"+Math.random().toString(36).slice(2);function jo(e){if(!e[Mr]){e[Mr]=!0,af.forEach(function(a){a!=="selectionchange"&&(Hg.has(a)||So(a,!1,e),So(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Mr]||(t[Mr]=!0,So("selectionchange",!1,t))}}function op(e,t,a,i){switch(qp(t)){case 2:var r=m0;break;case 8:r=p0;break;default:r=Bo}a=r.bind(null,t,a,e),r=void 0,!Yu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),i?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function No(e,t,a,i,r){var o=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var h=i.tag;if(h===3||h===4){var x=i.stateNode.containerInfo;if(x===r)break;if(h===4)for(h=i.return;h!==null;){var S=h.tag;if((S===3||S===4)&&h.stateNode.containerInfo===r)return;h=h.return}for(;x!==null;){if(h=Ul(x),h===null)return;if(S=h.tag,S===5||S===6||S===26||S===27){i=o=h;continue e}x=x.parentNode}}i=i.return}pf(function(){var R=o,z=Hu(a),V=[];e:{var T=Vf.get(e);if(T!==void 0){var M=Zs,ae=e;switch(e){case"keypress":if(Ys(a)===0)break e;case"keydown":case"keyup":M=Mv;break;case"focusin":ae="focus",M=Qu;break;case"focusout":ae="blur",M=Qu;break;case"beforeblur":case"afterblur":M=Qu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":M=vf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=wv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=Uv;break;case qf:case Hf:case $f:M=Nv;break;case Yf:M=Bv;break;case"scroll":case"scrollend":M=gv;break;case"wheel":M=Hv;break;case"copy":case"cut":case"paste":M=Av;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=bf;break;case"toggle":case"beforetoggle":M=Yv}var fe=(t&4)!==0,Je=!fe&&(e==="scroll"||e==="scrollend"),A=fe?T!==null?T+"Capture":null:T;fe=[];for(var N=R,k;N!==null;){var q=N;if(k=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||k===null||A===null||(q=Ti(N,A),q!=null&&fe.push(os(N,q,k))),Je)break;N=N.return}0<fe.length&&(T=new M(T,ae,null,a,z),V.push({event:T,listeners:fe}))}}if((t&7)===0){e:{if(T=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",T&&a!==qu&&(ae=a.relatedTarget||a.fromElement)&&(Ul(ae)||ae[Ll]))break e;if((M||T)&&(T=z.window===z?z:(T=z.ownerDocument)?T.defaultView||T.parentWindow:window,M?(ae=a.relatedTarget||a.toElement,M=R,ae=ae?Ul(ae):null,ae!==null&&(Je=f(ae),fe=ae.tag,ae!==Je||fe!==5&&fe!==27&&fe!==6)&&(ae=null)):(M=null,ae=R),M!==ae)){if(fe=vf,q="onMouseLeave",A="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(fe=bf,q="onPointerLeave",A="onPointerEnter",N="pointer"),Je=M==null?T:Ci(M),k=ae==null?T:Ci(ae),T=new fe(q,N+"leave",M,a,z),T.target=Je,T.relatedTarget=k,q=null,Ul(z)===R&&(fe=new fe(A,N+"enter",ae,a,z),fe.target=k,fe.relatedTarget=Je,q=fe),Je=q,M&&ae)t:{for(fe=$g,A=M,N=ae,k=0,q=A;q;q=fe(q))k++;q=0;for(var ue=N;ue;ue=fe(ue))q++;for(;0<k-q;)A=fe(A),k--;for(;0<q-k;)N=fe(N),q--;for(;k--;){if(A===N||N!==null&&A===N.alternate){fe=A;break t}A=fe(A),N=fe(N)}fe=null}else fe=null;M!==null&&dp(V,T,M,fe,!1),ae!==null&&Je!==null&&dp(V,Je,ae,fe,!0)}}e:{if(T=R?Ci(R):window,M=T.nodeName&&T.nodeName.toLowerCase(),M==="select"||M==="input"&&T.type==="file")var ze=kf;else if(Af(T))if(Rf)ze=Wv;else{ze=Iv;var ie=Jv}else M=T.nodeName,!M||M.toLowerCase()!=="input"||T.type!=="checkbox"&&T.type!=="radio"?R&&Bu(R.elementType)&&(ze=kf):ze=Fv;if(ze&&(ze=ze(e,R))){Ef(V,ze,a,z);break e}ie&&ie(e,T,R),e==="focusout"&&R&&T.type==="number"&&R.memoizedProps.value!=null&&zu(T,"number",T.value)}switch(ie=R?Ci(R):window,e){case"focusin":(Af(ie)||ie.contentEditable==="true")&&(Gl=ie,Wu=R,qi=null);break;case"focusout":qi=Wu=Gl=null;break;case"mousedown":Pu=!0;break;case"contextmenu":case"mouseup":case"dragend":Pu=!1,zf(V,a,z);break;case"selectionchange":if(eg)break;case"keydown":case"keyup":zf(V,a,z)}var we;if(Ku)e:{switch(e){case"compositionstart":var Ae="onCompositionStart";break e;case"compositionend":Ae="onCompositionEnd";break e;case"compositionupdate":Ae="onCompositionUpdate";break e}Ae=void 0}else Zl?Nf(e,a)&&(Ae="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ae="onCompositionStart");Ae&&(wf&&a.locale!=="ko"&&(Zl||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&Zl&&(we=xf()):(An=z,Vu="value"in An?An.value:An.textContent,Zl=!0)),ie=Dr(R,Ae),0<ie.length&&(Ae=new gf(Ae,e,null,a,z),V.push({event:Ae,listeners:ie}),we?Ae.data=we:(we=_f(a),we!==null&&(Ae.data=we)))),(we=Zv?Gv(e,a):Qv(e,a))&&(Ae=Dr(R,"onBeforeInput"),0<Ae.length&&(ie=new gf("onBeforeInput","beforeinput",null,a,z),V.push({event:ie,listeners:Ae}),ie.data=we)),zg(V,e,R,a,z)}cp(V,t)})}function os(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Dr(e,t){for(var a=t+"Capture",i=[];e!==null;){var r=e,o=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||o===null||(r=Ti(e,a),r!=null&&i.unshift(os(e,r,o)),r=Ti(e,t),r!=null&&i.push(os(e,r,o))),e.tag===3)return i;e=e.return}return[]}function $g(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function dp(e,t,a,i,r){for(var o=t._reactName,h=[];a!==null&&a!==i;){var x=a,S=x.alternate,R=x.stateNode;if(x=x.tag,S!==null&&S===i)break;x!==5&&x!==26&&x!==27||R===null||(S=R,r?(R=Ti(a,o),R!=null&&h.unshift(os(a,R,S))):r||(R=Ti(a,o),R!=null&&h.push(os(a,R,S)))),a=a.return}h.length!==0&&e.push({event:t,listeners:h})}var Yg=/\r\n?/g,Vg=/\u0000|\uFFFD/g;function fp(e){return(typeof e=="string"?e:""+e).replace(Yg,`
49
+ `).replace(Vg,"")}function hp(e,t){return t=fp(t),fp(e)===t}function Ke(e,t,a,i,r,o){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||$l(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&$l(e,""+i);break;case"className":Bs(e,"class",i);break;case"tabIndex":Bs(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Bs(e,a,i);break;case"style":hf(e,i,o);break;case"data":if(t!=="object"){Bs(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=Hs(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(a==="formAction"?(t!=="input"&&Ke(e,t,"name",r.name,r,null),Ke(e,t,"formEncType",r.formEncType,r,null),Ke(e,t,"formMethod",r.formMethod,r,null),Ke(e,t,"formTarget",r.formTarget,r,null)):(Ke(e,t,"encType",r.encType,r,null),Ke(e,t,"method",r.method,r,null),Ke(e,t,"target",r.target,r,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=Hs(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=Pa);break;case"onScroll":i!=null&&Ne("scroll",e);break;case"onScrollEnd":i!=null&&Ne("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(u(61));if(a=i.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}a=Hs(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""+i):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":Ne("beforetoggle",e),Ne("toggle",e),zs(e,"popover",i);break;case"xlinkActuate":Wa(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Wa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Wa(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Wa(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Wa(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Wa(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Wa(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Wa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Wa(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":zs(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=yv.get(a)||a,zs(e,a,i))}}function _o(e,t,a,i,r,o){switch(a){case"style":hf(e,i,o);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(u(61));if(a=i.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof i=="string"?$l(e,i):(typeof i=="number"||typeof i=="bigint")&&$l(e,""+i);break;case"onScroll":i!=null&&Ne("scroll",e);break;case"onScrollEnd":i!=null&&Ne("scrollend",e);break;case"onClick":i!=null&&(e.onclick=Pa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!nf.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),o=e[zt]||null,o=o!=null?o[a]:null,typeof o=="function"&&e.removeEventListener(t,o,r),typeof i=="function")){typeof o!="function"&&o!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,r);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):zs(e,a,i)}}}function kt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",e),Ne("load",e);var i=!1,r=!1,o;for(o in a)if(a.hasOwnProperty(o)){var h=a[o];if(h!=null)switch(o){case"src":i=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ke(e,t,o,h,a,null)}}r&&Ke(e,t,"srcSet",a.srcSet,a,null),i&&Ke(e,t,"src",a.src,a,null);return;case"input":Ne("invalid",e);var x=o=h=r=null,S=null,R=null;for(i in a)if(a.hasOwnProperty(i)){var z=a[i];if(z!=null)switch(i){case"name":r=z;break;case"type":h=z;break;case"checked":S=z;break;case"defaultChecked":R=z;break;case"value":o=z;break;case"defaultValue":x=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(u(137,t));break;default:Ke(e,t,i,z,a,null)}}cf(e,o,x,S,R,h,r,!1);return;case"select":Ne("invalid",e),i=h=o=null;for(r in a)if(a.hasOwnProperty(r)&&(x=a[r],x!=null))switch(r){case"value":o=x;break;case"defaultValue":h=x;break;case"multiple":i=x;default:Ke(e,t,r,x,a,null)}t=o,a=h,e.multiple=!!i,t!=null?Hl(e,!!i,t,!1):a!=null&&Hl(e,!!i,a,!0);return;case"textarea":Ne("invalid",e),o=r=i=null;for(h in a)if(a.hasOwnProperty(h)&&(x=a[h],x!=null))switch(h){case"value":i=x;break;case"defaultValue":r=x;break;case"children":o=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(u(91));break;default:Ke(e,t,h,x,a,null)}df(e,i,r,o);return;case"option":for(S in a)if(a.hasOwnProperty(S)&&(i=a[S],i!=null))switch(S){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:Ke(e,t,S,i,a,null)}return;case"dialog":Ne("beforetoggle",e),Ne("toggle",e),Ne("cancel",e),Ne("close",e);break;case"iframe":case"object":Ne("load",e);break;case"video":case"audio":for(i=0;i<cs.length;i++)Ne(cs[i],e);break;case"image":Ne("error",e),Ne("load",e);break;case"details":Ne("toggle",e);break;case"embed":case"source":case"link":Ne("error",e),Ne("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(R in a)if(a.hasOwnProperty(R)&&(i=a[R],i!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ke(e,t,R,i,a,null)}return;default:if(Bu(t)){for(z in a)a.hasOwnProperty(z)&&(i=a[z],i!==void 0&&_o(e,t,z,i,a,void 0));return}}for(x in a)a.hasOwnProperty(x)&&(i=a[x],i!=null&&Ke(e,t,x,i,a,null))}function Zg(e,t,a,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,o=null,h=null,x=null,S=null,R=null,z=null;for(M in a){var V=a[M];if(a.hasOwnProperty(M)&&V!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":S=V;default:i.hasOwnProperty(M)||Ke(e,t,M,null,i,V)}}for(var T in i){var M=i[T];if(V=a[T],i.hasOwnProperty(T)&&(M!=null||V!=null))switch(T){case"type":o=M;break;case"name":r=M;break;case"checked":R=M;break;case"defaultChecked":z=M;break;case"value":h=M;break;case"defaultValue":x=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(u(137,t));break;default:M!==V&&Ke(e,t,T,M,i,V)}}Uu(e,h,x,S,R,z,o,r);return;case"select":M=h=x=T=null;for(o in a)if(S=a[o],a.hasOwnProperty(o)&&S!=null)switch(o){case"value":break;case"multiple":M=S;default:i.hasOwnProperty(o)||Ke(e,t,o,null,i,S)}for(r in i)if(o=i[r],S=a[r],i.hasOwnProperty(r)&&(o!=null||S!=null))switch(r){case"value":T=o;break;case"defaultValue":x=o;break;case"multiple":h=o;default:o!==S&&Ke(e,t,r,o,i,S)}t=x,a=h,i=M,T!=null?Hl(e,!!a,T,!1):!!i!=!!a&&(t!=null?Hl(e,!!a,t,!0):Hl(e,!!a,a?[]:"",!1));return;case"textarea":M=T=null;for(x in a)if(r=a[x],a.hasOwnProperty(x)&&r!=null&&!i.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Ke(e,t,x,null,i,r)}for(h in i)if(r=i[h],o=a[h],i.hasOwnProperty(h)&&(r!=null||o!=null))switch(h){case"value":T=r;break;case"defaultValue":M=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(u(91));break;default:r!==o&&Ke(e,t,h,r,i,o)}of(e,T,M);return;case"option":for(var ae in a)if(T=a[ae],a.hasOwnProperty(ae)&&T!=null&&!i.hasOwnProperty(ae))switch(ae){case"selected":e.selected=!1;break;default:Ke(e,t,ae,null,i,T)}for(S in i)if(T=i[S],M=a[S],i.hasOwnProperty(S)&&T!==M&&(T!=null||M!=null))switch(S){case"selected":e.selected=T&&typeof T!="function"&&typeof T!="symbol";break;default:Ke(e,t,S,T,i,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 fe in a)T=a[fe],a.hasOwnProperty(fe)&&T!=null&&!i.hasOwnProperty(fe)&&Ke(e,t,fe,null,i,T);for(R in i)if(T=i[R],M=a[R],i.hasOwnProperty(R)&&T!==M&&(T!=null||M!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(u(137,t));break;default:Ke(e,t,R,T,i,M)}return;default:if(Bu(t)){for(var Je in a)T=a[Je],a.hasOwnProperty(Je)&&T!==void 0&&!i.hasOwnProperty(Je)&&_o(e,t,Je,void 0,i,T);for(z in i)T=i[z],M=a[z],!i.hasOwnProperty(z)||T===M||T===void 0&&M===void 0||_o(e,t,z,T,i,M);return}}for(var A in a)T=a[A],a.hasOwnProperty(A)&&T!=null&&!i.hasOwnProperty(A)&&Ke(e,t,A,null,i,T);for(V in i)T=i[V],M=a[V],!i.hasOwnProperty(V)||T===M||T==null&&M==null||Ke(e,t,V,T,i,M)}function mp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Gg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),i=0;i<a.length;i++){var r=a[i],o=r.transferSize,h=r.initiatorType,x=r.duration;if(o&&x&&mp(h)){for(h=0,x=r.responseEnd,i+=1;i<a.length;i++){var S=a[i],R=S.startTime;if(R>x)break;var z=S.transferSize,V=S.initiatorType;z&&mp(V)&&(S=S.responseEnd,h+=z*(S<x?1:(x-R)/(S-R)))}if(--i,t+=8*(o+h)/(r.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 Ao=null,Eo=null;function Lr(e){return e.nodeType===9?e:e.ownerDocument}function pp(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 xp(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 ko(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 Ro=null;function Qg(){var e=window.event;return e&&e.type==="popstate"?e===Ro?!1:(Ro=e,!0):(Ro=null,!1)}var yp=typeof setTimeout=="function"?setTimeout:void 0,Xg=typeof clearTimeout=="function"?clearTimeout:void 0,vp=typeof Promise=="function"?Promise:void 0,Kg=typeof queueMicrotask=="function"?queueMicrotask:typeof vp<"u"?function(e){return vp.resolve(null).then(e).catch(Jg)}:yp;function Jg(e){setTimeout(function(){throw e})}function Vn(e){return e==="head"}function gp(e,t){var a=t,i=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a==="/$"||a==="/&"){if(i===0){e.removeChild(r),vi(t);return}i--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")i++;else if(a==="html")ds(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,ds(a);for(var o=a.firstChild;o;){var h=o.nextSibling,x=o.nodeName;o[Ri]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&o.rel.toLowerCase()==="stylesheet"||a.removeChild(o),o=h}}else a==="body"&&ds(e.ownerDocument.body);a=r}while(a);vi(t)}function bp(e,t){var a=e;e=0;do{var i=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),i&&i.nodeType===8)if(a=i.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=i}while(a)}function Co(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Co(a),Du(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Ig(e,t,a,i){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Ri])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=pa(e.nextSibling),e===null)break}return null}function Fg(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=pa(e.nextSibling),e===null))return null;return e}function wp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=pa(e.nextSibling),e===null))return null;return e}function To(e){return e.data==="$?"||e.data==="$~"}function Oo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Wg(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var i=function(){t(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function pa(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 Mo=null;function Sp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return pa(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function jp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Np(e,t,a){switch(t=Lr(a),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function ds(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Du(e)}var xa=new Map,_p=new Set;function Ur(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var xn=Z.d;Z.d={f:Pg,r:e0,D:t0,C:a0,L:n0,m:l0,X:s0,S:i0,M:r0};function Pg(){var e=xn.f(),t=Er();return e||t}function e0(e){var t=zl(e);t!==null&&t.tag===5&&t.type==="form"?Yh(t):xn.r(e)}var pi=typeof document>"u"?null:document;function Ap(e,t,a){var i=pi;if(i&&typeof t=="string"&&t){var r=ua(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),_p.has(r)||(_p.add(r),e={rel:e,crossOrigin:a,href:t},i.querySelector(r)===null&&(t=i.createElement("link"),kt(t,"link",e),bt(t),i.head.appendChild(t)))}}function t0(e){xn.D(e),Ap("dns-prefetch",e,null)}function a0(e,t){xn.C(e,t),Ap("preconnect",e,t)}function n0(e,t,a){xn.L(e,t,a);var i=pi;if(i&&e&&t){var r='link[rel="preload"][as="'+ua(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+ua(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+ua(a.imageSizes)+'"]')):r+='[href="'+ua(e)+'"]';var o=r;switch(t){case"style":o=xi(e);break;case"script":o=yi(e)}xa.has(o)||(e=_({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),xa.set(o,e),i.querySelector(r)!==null||t==="style"&&i.querySelector(fs(o))||t==="script"&&i.querySelector(hs(o))||(t=i.createElement("link"),kt(t,"link",e),bt(t),i.head.appendChild(t)))}}function l0(e,t){xn.m(e,t);var a=pi;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+ua(i)+'"][href="'+ua(e)+'"]',o=r;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=yi(e)}if(!xa.has(o)&&(e=_({rel:"modulepreload",href:e},t),xa.set(o,e),a.querySelector(r)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(hs(o)))return}i=a.createElement("link"),kt(i,"link",e),bt(i),a.head.appendChild(i)}}}function i0(e,t,a){xn.S(e,t,a);var i=pi;if(i&&e){var r=Bl(i).hoistableStyles,o=xi(e);t=t||"default";var h=r.get(o);if(!h){var x={loading:0,preload:null};if(h=i.querySelector(fs(o)))x.loading=5;else{e=_({rel:"stylesheet",href:e,"data-precedence":t},a),(a=xa.get(o))&&Do(e,a);var S=h=i.createElement("link");bt(S),kt(S,"link",e),S._p=new Promise(function(R,z){S.onload=R,S.onerror=z}),S.addEventListener("load",function(){x.loading|=1}),S.addEventListener("error",function(){x.loading|=2}),x.loading|=4,zr(h,t,i)}h={type:"stylesheet",instance:h,count:1,state:x},r.set(o,h)}}}function s0(e,t){xn.X(e,t);var a=pi;if(a&&e){var i=Bl(a).hoistableScripts,r=yi(e),o=i.get(r);o||(o=a.querySelector(hs(r)),o||(e=_({src:e,async:!0},t),(t=xa.get(r))&&Lo(e,t),o=a.createElement("script"),bt(o),kt(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(r,o))}}function r0(e,t){xn.M(e,t);var a=pi;if(a&&e){var i=Bl(a).hoistableScripts,r=yi(e),o=i.get(r);o||(o=a.querySelector(hs(r)),o||(e=_({src:e,async:!0,type:"module"},t),(t=xa.get(r))&&Lo(e,t),o=a.createElement("script"),bt(o),kt(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(r,o))}}function Ep(e,t,a,i){var r=(r=xe.current)?Ur(r):null;if(!r)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=xi(a.href),a=Bl(r).hoistableStyles,i=a.get(t),i||(i={type:"style",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=xi(a.href);var o=Bl(r).hoistableStyles,h=o.get(e);if(h||(r=r.ownerDocument||r,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,h),(o=r.querySelector(fs(e)))&&!o._p&&(h.instance=o,h.state.loading=5),xa.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},xa.set(e,a),o||u0(r,e,a,h.state))),t&&i===null)throw Error(u(528,""));return h}if(t&&i!==null)throw Error(u(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=yi(a),a=Bl(r).hoistableScripts,i=a.get(t),i||(i={type:"script",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function xi(e){return'href="'+ua(e)+'"'}function fs(e){return'link[rel="stylesheet"]['+e+"]"}function kp(e){return _({},e,{"data-precedence":e.precedence,precedence:null})}function u0(e,t,a,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),kt(t,"link",a),bt(t),e.head.appendChild(t))}function yi(e){return'[src="'+ua(e)+'"]'}function hs(e){return"script[async]"+e}function Rp(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+ua(a.href)+'"]');if(i)return t.instance=i,bt(i),i;var r=_({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),bt(i),kt(i,"style",r),zr(i,a.precedence,e),t.instance=i;case"stylesheet":r=xi(a.href);var o=e.querySelector(fs(r));if(o)return t.state.loading|=4,t.instance=o,bt(o),o;i=kp(a),(r=xa.get(r))&&Do(i,r),o=(e.ownerDocument||e).createElement("link"),bt(o);var h=o;return h._p=new Promise(function(x,S){h.onload=x,h.onerror=S}),kt(o,"link",i),t.state.loading|=4,zr(o,a.precedence,e),t.instance=o;case"script":return o=yi(a.src),(r=e.querySelector(hs(o)))?(t.instance=r,bt(r),r):(i=a,(r=xa.get(o))&&(i=_({},a),Lo(i,r)),e=e.ownerDocument||e,r=e.createElement("script"),bt(r),kt(r,"link",i),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,zr(i,a.precedence,e));return t.instance}function zr(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=i.length?i[i.length-1]:null,o=r,h=0;h<i.length;h++){var x=i[h];if(x.dataset.precedence===t)o=x;else if(o!==r)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Do(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Lo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Br=null;function Cp(e,t,a){if(Br===null){var i=new Map,r=Br=new Map;r.set(a,i)}else r=Br,i=r.get(a),i||(i=new Map,r.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var o=a[r];if(!(o[Ri]||o[Nt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var h=o.getAttribute(t)||"";h=e+h;var x=i.get(h);x?x.push(o):i.set(h,[o])}}return i}function Tp(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function c0(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Op(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function o0(e,t,a,i){if(a.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=xi(i.href),o=t.querySelector(fs(r));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=qr.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=o,bt(o);return}o=t.ownerDocument||t,i=kp(i),(r=xa.get(r))&&Do(i,r),o=o.createElement("link"),bt(o);var h=o;h._p=new Promise(function(x,S){h.onload=x,h.onerror=S}),kt(o,"link",i),a.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=qr.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Uo=0;function d0(e,t){return e.stylesheets&&e.count===0&&$r(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var i=setTimeout(function(){if(e.stylesheets&&$r(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Uo===0&&(Uo=62500*Gg());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$r(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Uo?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(r)}}:null}function qr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$r(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Hr=null;function $r(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Hr=new Map,t.forEach(f0,e),Hr=null,qr.call(e))}function f0(e,t){if(!(t.state.loading&4)){var a=Hr.get(e);if(a)var i=a.get(null);else{a=new Map,Hr.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<r.length;o++){var h=r[o];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(a.set(h.dataset.precedence,h),i=h)}i&&a.set(null,i)}r=t.instance,h=r.getAttribute("data-precedence"),o=a.get(h)||i,o===i&&a.set(null,r),a.set(h,r),this.count++,i=qr.bind(this),r.addEventListener("load",i),r.addEventListener("error",i),o?o.parentNode.insertBefore(r,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var ms={$$typeof:W,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function h0(e,t,a,i,r,o,h,x,S){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Dl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dl(0),this.hiddenUpdates=Dl(null),this.identifierPrefix=i,this.onUncaughtError=r,this.onCaughtError=o,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function Mp(e,t,a,i,r,o,h,x,S,R,z,V){return e=new h0(e,t,a,h,S,R,z,V,x),t=1,o===!0&&(t|=24),o=Jt(3,null,null,t),e.current=o,o.stateNode=e,t=mc(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:i,isDehydrated:a,cache:t},vc(o),e}function Dp(e){return e?(e=Kl,e):Kl}function Lp(e,t,a,i,r,o){r=Dp(r),i.context===null?i.context=r:i.pendingContext=r,i=On(t),i.payload={element:a},o=o===void 0?null:o,o!==null&&(i.callback=o),a=Mn(e,i,t),a!==null&&(Vt(a,e,t),Qi(a,e,t))}function Up(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function zo(e,t){Up(e,t),(e=e.alternate)&&Up(e,t)}function zp(e){if(e.tag===13||e.tag===31){var t=dl(e,67108864);t!==null&&Vt(t,e,67108864),zo(e,67108864)}}function Bp(e){if(e.tag===13||e.tag===31){var t=ea();t=Qe(t);var a=dl(e,t);a!==null&&Vt(a,e,t),zo(e,t)}}var Yr=!0;function m0(e,t,a,i){var r=D.T;D.T=null;var o=Z.p;try{Z.p=2,Bo(e,t,a,i)}finally{Z.p=o,D.T=r}}function p0(e,t,a,i){var r=D.T;D.T=null;var o=Z.p;try{Z.p=8,Bo(e,t,a,i)}finally{Z.p=o,D.T=r}}function Bo(e,t,a,i){if(Yr){var r=qo(i);if(r===null)No(e,t,i,Vr,a),Hp(e,i);else if(y0(r,e,t,a,i))i.stopPropagation();else if(Hp(e,i),t&4&&-1<x0.indexOf(e)){for(;r!==null;){var o=zl(r);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var h=Fa(o.pendingLanes);if(h!==0){var x=o;for(x.pendingLanes|=2,x.entangledLanes|=2;h;){var S=1<<31-G(h);x.entanglements[1]|=S,h&=~S}$a(o),(qe&6)===0&&(_r=St()+500,us(0))}}break;case 31:case 13:x=dl(o,2),x!==null&&Vt(x,o,2),Er(),zo(o,2)}if(o=qo(i),o===null&&No(e,t,i,Vr,a),o===r)break;r=o}r!==null&&i.stopPropagation()}else No(e,t,i,null,a)}}function qo(e){return e=Hu(e),Ho(e)}var Vr=null;function Ho(e){if(Vr=null,e=Ul(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=m(t),e!==null)return e;e=null}else if(a===31){if(e=y(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Vr=e,null}function qp(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(ia()){case Ja:return 2;case Ia:return 8;case Tt:case lt:return 32;case nl:return 268435456;default:return 32}default:return 32}}var $o=!1,Zn=null,Gn=null,Qn=null,ps=new Map,xs=new Map,Xn=[],x0="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 Hp(e,t){switch(e){case"focusin":case"focusout":Zn=null;break;case"dragenter":case"dragleave":Gn=null;break;case"mouseover":case"mouseout":Qn=null;break;case"pointerover":case"pointerout":ps.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xs.delete(t.pointerId)}}function ys(e,t,a,i,r,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:o,targetContainers:[r]},t!==null&&(t=zl(t),t!==null&&zp(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function y0(e,t,a,i,r){switch(t){case"focusin":return Zn=ys(Zn,e,t,a,i,r),!0;case"dragenter":return Gn=ys(Gn,e,t,a,i,r),!0;case"mouseover":return Qn=ys(Qn,e,t,a,i,r),!0;case"pointerover":var o=r.pointerId;return ps.set(o,ys(ps.get(o)||null,e,t,a,i,r)),!0;case"gotpointercapture":return o=r.pointerId,xs.set(o,ys(xs.get(o)||null,e,t,a,i,r)),!0}return!1}function $p(e){var t=Ul(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=m(a),t!==null){e.blockedOn=t,ef(e.priority,function(){Bp(a)});return}}else if(t===31){if(t=y(a),t!==null){e.blockedOn=t,ef(e.priority,function(){Bp(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Zr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=qo(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);qu=i,a.target.dispatchEvent(i),qu=null}else return t=zl(a),t!==null&&zp(t),e.blockedOn=a,!1;t.shift()}return!0}function Yp(e,t,a){Zr(e)&&a.delete(t)}function v0(){$o=!1,Zn!==null&&Zr(Zn)&&(Zn=null),Gn!==null&&Zr(Gn)&&(Gn=null),Qn!==null&&Zr(Qn)&&(Qn=null),ps.forEach(Yp),xs.forEach(Yp)}function Gr(e,t){e.blockedOn===t&&(e.blockedOn=null,$o||($o=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,v0)))}var Qr=null;function Vp(e){Qr!==e&&(Qr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Qr===e&&(Qr=null);for(var t=0;t<e.length;t+=3){var a=e[t],i=e[t+1],r=e[t+2];if(typeof i!="function"){if(Ho(i||a)===null)continue;break}var o=zl(a);o!==null&&(e.splice(t,3),t-=3,Bc(o,{pending:!0,data:r,method:a.method,action:i},i,r))}}))}function vi(e){function t(S){return Gr(S,e)}Zn!==null&&Gr(Zn,e),Gn!==null&&Gr(Gn,e),Qn!==null&&Gr(Qn,e),ps.forEach(t),xs.forEach(t);for(var a=0;a<Xn.length;a++){var i=Xn[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Xn.length&&(a=Xn[0],a.blockedOn===null);)$p(a),a.blockedOn===null&&Xn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var r=a[i],o=a[i+1],h=r[zt]||null;if(typeof o=="function")h||Vp(a);else if(h){var x=null;if(o&&o.hasAttribute("formAction")){if(r=o,h=o[zt]||null)x=h.formAction;else if(Ho(r)!==null)continue}else x=h.action;typeof x=="function"?a[i+1]=x:(a.splice(i,3),i-=3),Vp(a)}}}function Zp(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(h){return r=h})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),i||setTimeout(a,20)}function a(){if(!i&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function Yo(e){this._internalRoot=e}Xr.prototype.render=Yo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,i=ea();Lp(a,i,e,t,null,null)},Xr.prototype.unmount=Yo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Lp(e.current,2,null,e,null,null),Er(),t[Ll]=null}};function Xr(e){this._internalRoot=e}Xr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Pd();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Xn.length&&t!==0&&t<Xn[a].priority;a++);Xn.splice(a,0,e),a===0&&$p(e)}};var Gp=l.version;if(Gp!=="19.2.7")throw Error(u(527,Gp,"19.2.7"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=g(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var g0={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Kr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kr.isDisabled&&Kr.supportsFiber)try{_a=Kr.inject(g0),jt=Kr}catch{}}return gs.createRoot=function(e,t){if(!d(e))throw Error(u(299));var a=!1,i="",r=Wh,o=Ph,h=em;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Mp(e,1,!1,null,null,a,i,null,r,o,h,Zp),e[Ll]=t.current,jo(e),new Yo(t)},gs.hydrateRoot=function(e,t,a){if(!d(e))throw Error(u(299));var i=!1,r="",o=Wh,h=Ph,x=em,S=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(o=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError),a.formState!==void 0&&(S=a.formState)),t=Mp(e,1,!0,t,a??null,i,r,S,o,h,x,Zp),t.context=Dp(null),a=t.current,i=ea(),i=Qe(i),r=On(i),r.callback=null,Mn(a,r,i),a=i,t.current.lanes=a,sl(t,a),$a(t),e[Ll]=t.current,jo(e),new Xr(t)},gs.version="19.2.7",gs}var tx;function R0(){if(tx)return Go.exports;tx=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Go.exports=k0(),Go.exports}var C0=R0();/**
50
+ * react-router v7.18.4
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var Od=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Fx=/^[\\/]{2}/;function T0(n,l){return l+n.replace(/\\/g,"/")}var ax="popstate";function nx(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function O0(n={}){function l(u,d){var g;let f=(g=d.state)==null?void 0:g.masked,{pathname:m,search:y,hash:v}=f||u.location;return pd("",{pathname:m,search:y,hash:v},d.state&&d.state.usr||null,d.state&&d.state.key||"default",f?{pathname:u.location.pathname,search:u.location.search,hash:u.location.hash}:void 0)}function s(u,d){return typeof d=="string"?d:_l(d)}return D0(l,s,null,n)}function nt(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function Sa(n,l){if(!n){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function M0(){return Math.random().toString(36).substring(2,10)}function lx(n,l){return{usr:n.state,key:n.key,idx:l,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function pd(n,l,s=null,u,d){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof l=="string"?_i(l):l,state:s,key:l&&l.key||u||M0(),mask:d}}function _l({pathname:n="/",search:l="",hash:s=""}){return l&&l!=="?"&&(n+=l.charAt(0)==="?"?l:"?"+l),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function _i(n){let l={};if(n){let s=n.indexOf("#");s>=0&&(l.hash=n.substring(s),n=n.substring(0,s));let u=n.indexOf("?");u>=0&&(l.search=n.substring(u),n=n.substring(0,u)),n&&(l.pathname=n)}return l}function D0(n,l,s,u={}){let{window:d=document.defaultView,v5Compat:f=!1}=u,m=d.history,y="POP",v=null,g=b();g==null&&(g=0,m.replaceState({...m.state,idx:g},""));function b(){return(m.state||{idx:null}).idx}function _(){y="POP";let L=b(),B=L==null?null:L-g;g=L,v&&v({action:y,location:Y.location,delta:B})}function U(L,B){y="PUSH";let Q=nx(L)?L:pd(Y.location,L,B);g=b()+1;let W=lx(Q,g),oe=Y.createHref(Q.mask||Q);try{m.pushState(W,"",oe)}catch(J){if(J instanceof DOMException&&J.name==="DataCloneError")throw J;d.location.assign(oe)}f&&v&&v({action:y,location:Y.location,delta:1})}function K(L,B){y="REPLACE";let Q=nx(L)?L:pd(Y.location,L,B);g=b();let W=lx(Q,g),oe=Y.createHref(Q.mask||Q);m.replaceState(W,"",oe),f&&v&&v({action:y,location:Y.location,delta:0})}function C(L){return L0(d,L)}let Y={get action(){return y},get location(){return n(d,m)},listen(L){if(v)throw new Error("A history only accepts one active listener");return d.addEventListener(ax,_),v=L,()=>{d.removeEventListener(ax,_),v=null}},createHref(L){return l(d,L)},createURL:C,encodeLocation(L){let B=C(L);return{pathname:B.pathname,search:B.search,hash:B.hash}},push:U,replace:K,go(L){return m.go(L)}};return Y}function L0(n,l,s=!1){let u="http://localhost";n&&(u=n.location.origin!=="null"?n.location.origin:n.location.href),nt(u,"No window.location.(origin|href) available to create URL");let d=typeof l=="string"?l:_l(l);return d=d.replace(/ $/,"%20"),!s&&Fx.test(d)&&(d=u+d),new URL(d,u)}function Wx(n,l,s="/"){return U0(n,l,s,!1)}function U0(n,l,s,u,d){let f=typeof l=="string"?_i(l):l,m=bn(f.pathname||"/",s);if(m==null)return null;let y=z0(n),v=null,g=K0(m);for(let b=0;v==null&&b<y.length;++b)v=X0(y[b],g,u);return v}function z0(n){let l=Px(n);return B0(l),l}function Px(n,l=[],s=[],u="",d=!1){let f=(m,y,v=d,g)=>{let b={relativePath:g===void 0?m.path||"":g,caseSensitive:m.caseSensitive===!0,childrenIndex:y,route:m};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(u)&&v)return;nt(b.relativePath.startsWith(u),`Absolute route path "${b.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(u.length)}let _=Ma([u,b.relativePath]),U=s.concat(b);m.children&&m.children.length>0&&(nt(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${_}".`),Px(m.children,l,U,_,v)),!(m.path==null&&!m.index)&&l.push({path:_,score:G0(_,m.index),routesMeta:U.map((K,C)=>{let[Y,L]=ay(K.relativePath,K.caseSensitive,C===U.length-1);return{...K,matcher:Y,compiledParams:L}})})};return n.forEach((m,y)=>{var v;if(m.path===""||!((v=m.path)!=null&&v.includes("?")))f(m,y);else for(let g of ey(m.path))f(m,y,!0,g)}),l}function ey(n){let l=n.split("/");if(l.length===0)return[];let[s,...u]=l,d=s.endsWith("?"),f=s.replace(/\?$/,"");if(u.length===0)return d?[f,""]:[f];let m=ey(u.join("/")),y=[];return y.push(...m.map(v=>v===""?f:[f,v].join("/"))),d&&y.push(...m),y.map(v=>n.startsWith("/")&&v===""?"/":v)}function B0(n){n.sort((l,s)=>l.score!==s.score?s.score-l.score:Q0(l.routesMeta.map(u=>u.childrenIndex),s.routesMeta.map(u=>u.childrenIndex)))}var q0=/^:[\w-]+$/,H0=3,$0=2,Y0=1,V0=10,Z0=-2,ix=n=>n==="*";function G0(n,l){let s=n.split("/"),u=s.length;return s.some(ix)&&(u+=Z0),l&&(u+=$0),s.filter(d=>!ix(d)).reduce((d,f)=>d+(q0.test(f)?H0:f===""?Y0:V0),u)}function Q0(n,l){return n.length===l.length&&n.slice(0,-1).every((u,d)=>u===l[d])?n[n.length-1]-l[l.length-1]:0}function X0(n,l,s=!1){let{routesMeta:u}=n,d={},f="/",m=[];for(let y=0;y<u.length;++y){let v=u[y],g=y===u.length-1,b=f==="/"?l:l.slice(f.length)||"/",_={path:v.relativePath,caseSensitive:v.caseSensitive,end:g},U=v.matcher&&v.compiledParams?ty(_,b,v.matcher,v.compiledParams):iu(_,b),K=v.route;if(!U&&g&&s&&!u[u.length-1].route.index&&(U=iu({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},b)),!U)return null;Object.assign(d,U.params),m.push({params:d,pathname:Ma([f,U.pathname]),pathnameBase:F0(Ma([f,U.pathnameBase])),route:K}),U.pathnameBase!=="/"&&(f=Ma([f,U.pathnameBase]))}return m}function iu(n,l){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,u]=ay(n.path,n.caseSensitive,n.end);return ty(n,l,s,u)}function ty(n,l,s,u){let d=l.match(s);if(!d)return null;let f=d[0],m=Si(f,1),y=d.slice(1);return{params:u.reduce((g,{paramName:b,isOptional:_},U)=>{if(b==="*"){let C=y[U]||"";m=Si(f.slice(0,f.length-C.length),1)}const K=y[U];return _&&!K?g[b]=void 0:g[b]=(K||"").replace(/%2F/g,"/"),g},{}),pathname:f,pathnameBase:m,pattern:n}}function ay(n,l=!1,s=!0){Sa(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let u=[],d="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,y,v,g,b)=>{if(u.push({paramName:y,isOptional:v!=null}),v){let _=b.charAt(g+m.length);return _&&_!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(u.push({paramName:"*"}),d+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?d+="\\/*$":n!==""&&n!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,l?void 0:"i"),u]}function K0(n){try{return n.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Sa(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),n}}function bn(n,l){if(l==="/")return n;if(!n.toLowerCase().startsWith(l.toLowerCase()))return null;let s=l.endsWith("/")?l.length-1:l.length,u=n.charAt(s);return u&&u!=="/"?null:n.slice(s)||"/"}function J0(n,l="/"){let{pathname:s,search:u="",hash:d=""}=typeof n=="string"?_i(n):n,f;return s?(s=ny(s),s.startsWith("/")||s.startsWith("\\")?f=sx(s.substring(1),"/"):f=sx(s,l)):f=l,{pathname:f,search:W0(u),hash:P0(d)}}function sx(n,l){let s=Si(l).split("/");return n.split("/").forEach(d=>{d===".."?s.length>1&&s.pop():d!=="."&&s.push(d)}),s.length>1?s.join("/"):"/"}function Jo(n,l,s,u){return`Cannot include a '${n}' character in a manually specified \`to.${l}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function I0(n){return n.filter((l,s)=>s===0||l.route.path&&l.route.path.length>0)}function Md(n){let l=I0(n);return l.map((s,u)=>u===l.length-1?s.pathname:s.pathnameBase)}function wu(n,l,s,u=!1){let d;typeof n=="string"?d=_i(n):(d={...n},nt(!d.pathname||!d.pathname.includes("?"),Jo("?","pathname","search",d)),nt(!d.pathname||!d.pathname.includes("#"),Jo("#","pathname","hash",d)),nt(!d.search||!d.search.includes("#"),Jo("#","search","hash",d)));let f=n===""||d.pathname==="",m=f?"/":d.pathname,y;if(m==null)y=s;else{let _=l.length-1;if(!u&&m.startsWith("..")){let U=m.split("/");for(;U[0]==="..";)U.shift(),_-=1;d.pathname=U.join("/")}y=_>=0?l[_]:"/"}let v=J0(d,y),g=m&&m!=="/"&&m.endsWith("/"),b=(f||m===".")&&s.endsWith("/");return!v.pathname.endsWith("/")&&(g||b)&&(v.pathname+="/"),v}var ny=n=>n.replace(/[\\/]{2,}/g,"/"),Ma=n=>ny(n.join("/"));function Si(n,l=0){let s=n.length;for(;s>l&&n.charCodeAt(s-1)===47;)s--;return s===n.length?n:n.slice(0,s)}var F0=n=>Si(n).replace(/^\/*/,"/"),W0=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,P0=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,eb=class{constructor(n,l,s,u=!1){this.status=n,this.statusText=l||"",this.internal=u,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function tb(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function ab(n){let l=n.map(s=>s.route.path).filter(Boolean);return Ma(l)||"/"}var ly=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function iy(n,l){let s=n;if(typeof s!="string"||!Od.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let u=s,d=!1;if(ly)try{let f=new URL(window.location.href),m=Fx.test(s)?new URL(T0(s,f.protocol)):new URL(s),y=bn(m.pathname,l);m.origin===f.origin&&y!=null?s=y+m.search+m.hash:d=!0}catch{Sa(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:d,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var rx=new URL("http://localhost");function Dd(n){if(n.createURL)return n.createURL("/");try{return new URL(n.createHref("/"),rx)}catch{return rx}}function Io(n,l){return n.origin===l.origin&&(n.origin!=="null"||n.protocol===l.protocol&&n.host===l.host)}function nb(n,l){if(n.startsWith("//"))return!0;let s=l.protocol.toLowerCase();return n.toLowerCase().startsWith(s)?l.host===""||n.slice(s.length).startsWith("//"):!1}function Ld(n,l,s,u){let d=null;try{d=n==null?null:new URL(n,s)}catch{}let f=new URL(l,s),m=d!=null&&!Io(d,s),y=!Io(f,s);if(u==="reject"){if(m||y)throw new Error("External navigation is not allowed")}else if(y&&(d==null||!nb(n,d)||!Io(d,f)))throw new Error("External navigation is not allowed")}var sy=["POST","PUT","PATCH","DELETE"];new Set(sy);var lb=["GET",...sy];new Set(lb);var ib=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function sb(n){try{return ib.includes(new URL(n).protocol)}catch{return!1}}var Ai=w.createContext(null);Ai.displayName="DataRouter";var Su=w.createContext(null);Su.displayName="DataRouterState";var ry=w.createContext(!1);function rb(){return w.useContext(ry)}var uy=w.createContext({isTransitioning:!1});uy.displayName="ViewTransition";var ub=w.createContext(new Map);ub.displayName="Fetchers";var cb=w.createContext(null);cb.displayName="Await";var na=w.createContext(null);na.displayName="Navigation";var Os=w.createContext(null);Os.displayName="Location";var La=w.createContext({outlet:null,matches:[],isDataRoute:!1});La.displayName="Route";var Ud=w.createContext(null);Ud.displayName="RouteError";var cy="REACT_ROUTER_ERROR",ob="REDIRECT",db="ROUTE_ERROR_RESPONSE";function fb(n){if(n.startsWith(`${cy}:${ob}:{`))try{let l=JSON.parse(n.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function hb(n){if(n.startsWith(`${cy}:${db}:{`))try{let l=JSON.parse(n.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new eb(l.status,l.statusText,l.data)}catch{}}function mb(n,{relative:l}={}){nt(Ei(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:u}=w.useContext(na),{hash:d,pathname:f,search:m}=Ms(n,{relative:l}),y=f;return s!=="/"&&(y=f==="/"?s:Ma([s,f])),u.createHref({pathname:y,search:m,hash:d})}function Ei(){return w.useContext(Os)!=null}function Ua(){return nt(Ei(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(Os).location}var oy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function dy(n){w.useContext(na).static||w.useLayoutEffect(n)}function zd(){let{isDataRoute:n}=w.useContext(La);return n?kb():pb()}function pb(){nt(Ei(),"useNavigate() may be used only in the context of a <Router> component.");let n=w.useContext(Ai),{basename:l,navigator:s}=w.useContext(na),{matches:u}=w.useContext(La),{pathname:d}=Ua(),f=JSON.stringify(Md(u)),m=w.useRef(!1);return dy(()=>{m.current=!0}),w.useCallback((v,g={})=>{if(Sa(m.current,oy),!m.current)return;if(typeof v=="number"){s.go(v);return}let b=wu(v,JSON.parse(f),d,g.relative==="path");n==null&&l!=="/"&&(b.pathname=b.pathname==="/"?l:Ma([l,b.pathname])),Ld(typeof v=="string"?v:_l(v),s.createHref(b),Dd(s),"reject"),(g.replace?s.replace:s.push)(b,g.state,g)},[l,s,f,d,n])}w.createContext(null);function xb(){let{matches:n}=w.useContext(La),l=n[n.length-1];return(l==null?void 0:l.params)??{}}function Ms(n,{relative:l}={}){let{matches:s}=w.useContext(La),{pathname:u}=Ua(),d=JSON.stringify(Md(s));return w.useMemo(()=>wu(n,JSON.parse(d),u,l==="path"),[n,d,u,l])}function yb(n,l){return fy(n,l)}function fy(n,l,s){var L;nt(Ei(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=w.useContext(na),{matches:d}=w.useContext(La),f=d[d.length-1],m=f?f.params:{},y=f?f.pathname:"/",v=f?f.pathnameBase:"/",g=f&&f.route;{let B=g&&g.path||"";my(y,!g||B.endsWith("*")||B.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${B}">) 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="${B}"> to <Route path="${B==="/"?"*":`${B}/*`}">.`)}let b=Ua(),_;if(l){let B=typeof l=="string"?_i(l):l;nt(v==="/"||((L=B.pathname)==null?void 0:L.startsWith(v)),`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 "${v}" but pathname "${B.pathname}" was given in the \`location\` prop.`),_=B}else _=b;let U=_.pathname||"/",K=U;if(v!=="/"){let B=v.replace(/^\//,"").split("/");K="/"+U.replace(/^\//,"").split("/").slice(B.length).join("/")}let C=s&&s.state.matches.length?s.state.matches.map(B=>Object.assign(B,{route:s.manifest[B.route.id]||B.route})):Wx(n,{pathname:K});Sa(g||C!=null,`No routes matched location "${_.pathname}${_.search}${_.hash}" `),Sa(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${_.pathname}${_.search}${_.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 Y=Sb(C&&C.map(B=>Object.assign({},B,{params:Object.assign({},m,B.params),pathname:Ma([v,u.encodeLocation?u.encodeLocation(B.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:B.pathname]),pathnameBase:B.pathnameBase==="/"?v:Ma([v,u.encodeLocation?u.encodeLocation(B.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:B.pathnameBase])})),d,s);return l&&Y?w.createElement(Os.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,..._},navigationType:"POP"}},Y):Y}function vb(){let n=Eb(),l=tb(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,u="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:u},f={padding:"2px 4px",backgroundColor:u},m=null;return console.error("Error handled by React Router default ErrorBoundary:",n),m=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:f},"ErrorBoundary")," or"," ",w.createElement("code",{style:f},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},l),s?w.createElement("pre",{style:d},s):null,m)}var gb=w.createElement(vb,null),hy=class extends w.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,l){return l.location!==n.location||l.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:l.error,location:l.location,revalidation:n.revalidation||l.revalidation}}componentDidCatch(n,l){this.props.onError?this.props.onError(n,l):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const s=hb(n.digest);s&&(n=s)}let l=n!==void 0?w.createElement(La.Provider,{value:this.props.routeContext},w.createElement(Ud.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?w.createElement(bb,{error:n},l):l}};hy.contextType=ry;var Fo=new WeakMap;function bb({children:n,error:l}){let{basename:s,navigator:u}=w.useContext(na);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let d=fb(l.digest);if(d){let f=Fo.get(l);if(f)throw f;let m=iy(d.location,s),y=m.absoluteURL||m.to;if(Ld(d.location,y,Dd(u),"allow-explicit"),sb(y))throw new Error("Invalid redirect location");if(ly&&!Fo.get(l))if(m.isExternal||d.reloadDocument)window.location.href=y;else{const v=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:d.replace}));throw Fo.set(l,v),v}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${y}`})}}return n}function wb({routeContext:n,match:l,children:s}){let u=w.useContext(Ai);return u&&u.static&&u.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=l.route.id),w.createElement(La.Provider,{value:n},s)}function Sb(n,l=[],s){let u=s==null?void 0:s.state;if(n==null){if(!u)return null;if(u.errors)n=u.matches;else if(l.length===0&&!u.initialized&&u.matches.length>0)n=u.matches;else return null}let d=n,f=u==null?void 0:u.errors;if(f!=null){let b=d.findIndex(_=>_.route.id&&(f==null?void 0:f[_.route.id])!==void 0);nt(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),d=d.slice(0,Math.min(d.length,b+1))}let m=!1,y=-1;if(s&&u){m=u.renderFallback;for(let b=0;b<d.length;b++){let _=d[b];if((_.route.HydrateFallback||_.route.hydrateFallbackElement)&&(y=b),_.route.id){let{loaderData:U,errors:K}=u,C=_.route.loader&&!U.hasOwnProperty(_.route.id)&&(!K||K[_.route.id]===void 0);if(_.route.lazy||C){s.isStatic&&(m=!0),y>=0?d=d.slice(0,y+1):d=[d[0]];break}}}}let v=s==null?void 0:s.onError,g=u&&v?(b,_)=>{var U,K;v(b,{location:u.location,params:((K=(U=u.matches)==null?void 0:U[0])==null?void 0:K.params)??{},pattern:ab(u.matches),errorInfo:_})}:void 0;return d.reduceRight((b,_,U)=>{let K,C=!1,Y=null,L=null;u&&(K=f&&_.route.id?f[_.route.id]:void 0,Y=_.route.errorElement||gb,m&&(y<0&&U===0?(my("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,L=null):y===U&&(C=!0,L=_.route.hydrateFallbackElement||null)));let B=l.concat(d.slice(0,U+1)),Q=()=>{let W;return K?W=Y:C?W=L:_.route.Component?W=w.createElement(_.route.Component,null):_.route.element?W=_.route.element:W=b,w.createElement(wb,{match:_,routeContext:{outlet:b,matches:B,isDataRoute:u!=null},children:W})};return u&&(_.route.ErrorBoundary||_.route.errorElement||U===0)?w.createElement(hy,{location:u.location,revalidation:u.revalidation,component:Y,error:K,children:Q(),routeContext:{outlet:null,matches:B,isDataRoute:!0},onError:g}):Q()},null)}function Bd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jb(n){let l=w.useContext(Ai);return nt(l,Bd(n)),l}function Nb(n){let l=w.useContext(Su);return nt(l,Bd(n)),l}function _b(n){let l=w.useContext(La);return nt(l,Bd(n)),l}function qd(n){let l=_b(n),s=l.matches[l.matches.length-1];return nt(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function Ab(){return qd("useRouteId")}function Eb(){var u;let n=w.useContext(Ud),l=Nb("useRouteError"),s=qd("useRouteError");return n!==void 0?n:(u=l.errors)==null?void 0:u[s]}function kb(){let{router:n}=jb("useNavigate"),l=qd("useNavigate"),s=w.useRef(!1);return dy(()=>{s.current=!0}),w.useCallback(async(d,f={})=>{Sa(s.current,oy),s.current&&(typeof d=="number"?await n.navigate(d):await n.navigate(d,{fromRouteId:l,...f}))},[n,l])}var ux={};function my(n,l,s){!l&&!ux[n]&&(ux[n]=!0,Sa(!1,s))}w.memo(Rb);function Rb({routes:n,manifest:l,future:s,state:u,isStatic:d,onError:f}){return fy(n,void 0,{manifest:l,state:u,isStatic:d,onError:f})}function py({to:n,replace:l,state:s,relative:u}){nt(Ei(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d,navigator:f}=w.useContext(na);Sa(!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:m}=w.useContext(La),{pathname:y}=Ua(),v=zd(),g=wu(n,Md(m),y,u==="path");Ld(typeof n=="string"?n:_l(n),f.createHref(g),Dd(f),"reject");let b=JSON.stringify(g);return w.useEffect(()=>{v(JSON.parse(b),{replace:l,state:s,relative:u})},[v,b,u,l,s]),null}function Nl(n){nt(!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 Cb({basename:n="/",children:l=null,location:s,navigationType:u="POP",navigator:d,static:f=!1,useTransitions:m}){nt(!Ei(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let y=n.replace(/^\/*/,"/"),v=w.useMemo(()=>({basename:y,navigator:d,static:f,useTransitions:m,future:{}}),[y,d,f,m]);typeof s=="string"&&(s=_i(s));let{pathname:g="/",search:b="",hash:_="",state:U=null,key:K="default",mask:C}=s,Y=w.useMemo(()=>{let L=bn(g,y);return L==null?null:{location:{pathname:L,search:b,hash:_,state:U,key:K,mask:C},navigationType:u}},[y,g,b,_,U,K,u,C]);return Sa(Y!=null,`<Router basename="${y}"> is not able to match the URL "${g}${b}${_}" because it does not start with the basename, so the <Router> won't render anything.`),Y==null?null:w.createElement(na.Provider,{value:v},w.createElement(Os.Provider,{children:l,value:Y}))}function Tb({children:n,location:l}){return yb(xd(n),l)}function xd(n,l=[]){let s=[];return w.Children.forEach(n,(u,d)=>{if(!w.isValidElement(u))return;let f=[...l,d];if(u.type===w.Fragment){s.push.apply(s,xd(u.props.children,f));return}nt(u.type===Nl,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),nt(!u.props.index||!u.props.children,"An index route cannot have child routes.");let m={id:u.props.id||f.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(m.children=xd(u.props.children,f)),s.push(m)}),s}var tu="get",au="application/x-www-form-urlencoded";function ju(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Ob(n){return ju(n)&&n.tagName.toLowerCase()==="button"}function Mb(n){return ju(n)&&n.tagName.toLowerCase()==="form"}function Db(n){return ju(n)&&n.tagName.toLowerCase()==="input"}function Lb(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Ub(n,l){return n.button===0&&(!l||l==="_self")&&!Lb(n)}function yd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((l,s)=>{let u=n[s];return l.concat(Array.isArray(u)?u.map(d=>[s,d]):[[s,u]])},[]))}function zb(n,l){let s=yd(n);return l&&l.forEach((u,d)=>{s.has(d)||l.getAll(d).forEach(f=>{s.append(d,f)})}),s}var Jr=null;function Bb(){if(Jr===null)try{new FormData(document.createElement("form"),0),Jr=!1}catch{Jr=!0}return Jr}var qb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Wo(n){return n!=null&&!qb.has(n)?(Sa(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${au}"`),null):n}function Hb(n,l){let s,u,d,f,m;if(Mb(n)){let y=n.getAttribute("action");u=y?bn(y,l):null,s=n.getAttribute("method")||tu,d=Wo(n.getAttribute("enctype"))||au,f=new FormData(n)}else if(Ob(n)||Db(n)&&(n.type==="submit"||n.type==="image")){let y=n.form;if(y==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let v=n.getAttribute("formaction")||y.getAttribute("action");if(u=v?bn(v,l):null,s=n.getAttribute("formmethod")||y.getAttribute("method")||tu,d=Wo(n.getAttribute("formenctype"))||Wo(y.getAttribute("enctype"))||au,f=new FormData(y,n),!Bb()){let{name:g,type:b,value:_}=n;if(b==="image"){let U=g?`${g}.`:"";f.append(`${U}x`,"0"),f.append(`${U}y`,"0")}else g&&f.append(g,_)}}else{if(ju(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=tu,u=null,d=au,m=n}return f&&d==="text/plain"&&(m=f,f=void 0),{action:u,method:s.toLowerCase(),encType:d,formData:f,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Hd(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function xy(n,l,s,u){let d=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return s?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${u}`:d.pathname=`${d.pathname}.${u}`:d.pathname==="/"?d.pathname=`_root.${u}`:l&&bn(d.pathname,l)==="/"?d.pathname=`${Si(l)}/_root.${u}`:d.pathname=`${Si(d.pathname)}.${u}`,d}async function $b(n,l){if(n.id in l)return l[n.id];try{let s=await import(n.module);return l[n.id]=s,s}catch(s){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Yb(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Vb(n,l,s){let u=await Promise.all(n.map(async d=>{let f=l.routes[d.route.id];if(f){let m=await $b(f,s);return m.links?m.links():[]}return[]}));return Xb(u.flat(1).filter(Yb).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function cx(n,l,s,u,d,f){let m=(v,g)=>s[g]?v.route.id!==s[g].route.id:!0,y=(v,g)=>{var b;return s[g].pathname!==v.pathname||((b=s[g].route.path)==null?void 0:b.endsWith("*"))&&s[g].params["*"]!==v.params["*"]};return f==="assets"?l.filter((v,g)=>m(v,g)||y(v,g)):f==="data"?l.filter((v,g)=>{var _;let b=u.routes[v.route.id];if(!b||!b.hasLoader)return!1;if(m(v,g)||y(v,g))return!0;if(v.route.shouldRevalidate){let U=v.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((_=s[0])==null?void 0:_.params)||{},nextUrl:new URL(n,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof U=="boolean")return U}return!0}):[]}function Zb(n,l,{includeHydrateFallback:s}={}){return Gb(n.map(u=>{let d=l.routes[u.route.id];if(!d)return[];let f=[d.module];return d.clientActionModule&&(f=f.concat(d.clientActionModule)),d.clientLoaderModule&&(f=f.concat(d.clientLoaderModule)),s&&d.hydrateFallbackModule&&(f=f.concat(d.hydrateFallbackModule)),d.imports&&(f=f.concat(d.imports)),f}).flat(1))}function Gb(n){return[...new Set(n)]}function Qb(n){let l={},s=Object.keys(n).sort();for(let u of s)l[u]=n[u];return l}function Xb(n,l){let s=new Set;return new Set(l),n.reduce((u,d)=>{let f=JSON.stringify(Qb(d));return s.has(f)||(s.add(f),u.push({key:f,link:d})),u},[])}function $d(){let n=w.useContext(Ai);return Hd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Kb(){let n=w.useContext(Su);return Hd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Yd=w.createContext(void 0);Yd.displayName="FrameworkContext";function Nu(){let n=w.useContext(Yd);return Hd(n,"You must render this element inside a <HydratedRouter> element"),n}function Jb(n,l){let s=w.useContext(Yd),[u,d]=w.useState(!1),[f,m]=w.useState(!1),{onFocus:y,onBlur:v,onMouseEnter:g,onMouseLeave:b,onTouchStart:_}=l,U=w.useRef(null);w.useEffect(()=>{if(n==="render"&&m(!0),n==="viewport"){let Y=B=>{B.forEach(Q=>{m(Q.isIntersecting)})},L=new IntersectionObserver(Y,{threshold:.5});return U.current&&L.observe(U.current),()=>{L.disconnect()}}},[n]),w.useEffect(()=>{if(u){let Y=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(Y)}}},[u]);let K=()=>{d(!0)},C=()=>{d(!1),m(!1)};return s?n!=="intent"?[f,U,{}]:[f,U,{onFocus:bs(y,K),onBlur:bs(v,C),onMouseEnter:bs(g,K),onMouseLeave:bs(b,C),onTouchStart:bs(_,K)}]:[!1,U,{}]}function bs(n,l){return s=>{n&&n(s),s.defaultPrevented||l(s)}}function Ib({page:n,...l}){let s=rb(),{nonce:u}=Nu(),{router:d}=$d(),f=w.useMemo(()=>Wx(d.routes,n,d.basename),[d.routes,n,d.basename]);return f?(l.nonce==null&&u&&(l={...l,nonce:u}),s?w.createElement(Wb,{page:n,matches:f,...l}):w.createElement(Pb,{page:n,matches:f,...l})):null}function Fb(n){let{manifest:l,routeModules:s}=Nu(),[u,d]=w.useState([]);return w.useEffect(()=>{let f=!1;return Vb(n,l,s).then(m=>{f||d(m)}),()=>{f=!0}},[n,l,s]),u}function Wb({page:n,matches:l,...s}){let u=Ua(),{future:d}=Nu(),{basename:f}=$d(),m=w.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let y=xy(n,f,d.v8_trailingSlashAwareDataRequests,"rsc"),v=!1,g=[];for(let b of l)typeof b.route.shouldRevalidate=="function"?v=!0:g.push(b.route.id);return v&&g.length>0&&y.searchParams.set("_routes",g.join(",")),[y.pathname+y.search]},[f,d.v8_trailingSlashAwareDataRequests,n,u,l]);return w.createElement(w.Fragment,null,m.map(y=>w.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...s})))}function Pb({page:n,matches:l,...s}){let u=Ua(),{future:d,manifest:f,routeModules:m}=Nu(),{basename:y}=$d(),{loaderData:v,matches:g}=Kb(),b=w.useMemo(()=>cx(n,l,g,f,u,"data"),[n,l,g,f,u]),_=w.useMemo(()=>cx(n,l,g,f,u,"assets"),[n,l,g,f,u]),U=w.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let Y=new Set,L=!1;if(l.forEach(Q=>{var oe;let W=f.routes[Q.route.id];!W||!W.hasLoader||(!b.some(J=>J.route.id===Q.route.id)&&Q.route.id in v&&((oe=m[Q.route.id])!=null&&oe.shouldRevalidate)||W.hasClientLoader?L=!0:Y.add(Q.route.id))}),Y.size===0)return[];let B=xy(n,y,d.v8_trailingSlashAwareDataRequests,"data");return L&&Y.size>0&&B.searchParams.set("_routes",l.filter(Q=>Y.has(Q.route.id)).map(Q=>Q.route.id).join(",")),[B.pathname+B.search]},[y,d.v8_trailingSlashAwareDataRequests,v,u,f,b,l,n,m]),K=w.useMemo(()=>Zb(_,f),[_,f]),C=Fb(_);return w.createElement(w.Fragment,null,U.map(Y=>w.createElement("link",{key:Y,rel:"prefetch",as:"fetch",href:Y,...s})),K.map(Y=>w.createElement("link",{key:Y,rel:"modulepreload",href:Y,...s})),C.map(({key:Y,link:L})=>w.createElement("link",{key:Y,nonce:s.nonce,...L,crossOrigin:L.crossOrigin??s.crossOrigin})))}function e1(...n){return l=>{n.forEach(s=>{typeof s=="function"?s(l):s!=null&&(s.current=l)})}}var t1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{t1&&(window.__reactRouterVersion="7.18.4")}catch{}function a1({basename:n,children:l,useTransitions:s,window:u}){let d=w.useRef();d.current==null&&(d.current=O0({window:u,v5Compat:!0}));let f=d.current,[m,y]=w.useState({action:f.action,location:f.location}),v=w.useCallback(g=>{s===!1?y(g):w.startTransition(()=>y(g))},[s]);return w.useLayoutEffect(()=>f.listen(v),[f,v]),w.createElement(Cb,{basename:n,children:l,location:m.location,navigationType:m.action,navigator:f,useTransitions:s})}var aa=w.forwardRef(function({onClick:l,discover:s="render",prefetch:u="none",relative:d,reloadDocument:f,replace:m,mask:y,state:v,target:g,to:b,preventScrollReset:_,viewTransition:U,defaultShouldRevalidate:K,...C},Y){let{basename:L,navigator:B,useTransitions:Q}=w.useContext(na),W=typeof b=="string"&&Od.test(b),oe=iy(b,L);b=oe.to;let J=mb(b,{relative:d}),ke=Ua(),I=null;if(y){let Fe=wu(y,[],ke.mask?ke.mask.pathname:"/",!0);L!=="/"&&(Fe.pathname=Fe.pathname==="/"?L:Ma([L,Fe.pathname])),I=B.createHref(Fe)}let[be,$e,xt]=Jb(u,C),ot=i1(b,{replace:m,mask:y,state:v,target:g,preventScrollReset:_,relative:d,viewTransition:U,defaultShouldRevalidate:K,useTransitions:Q});function tt(Fe){l&&l(Fe),Fe.defaultPrevented||ot(Fe)}let Ct=!(oe.isExternal||f),vt=w.createElement("a",{...C,...xt,href:(Ct?I:void 0)||oe.absoluteURL||J,onClick:Ct?tt:l,ref:e1(Y,$e),target:g,"data-discover":!W&&s==="render"?"true":void 0});return be&&!W?w.createElement(w.Fragment,null,vt,w.createElement(Ib,{page:J})):vt});aa.displayName="Link";var nu=w.forwardRef(function({"aria-current":l="page",caseSensitive:s=!1,className:u="",end:d=!1,style:f,to:m,viewTransition:y,children:v,...g},b){let _=Ms(m,{relative:g.relative}),U=Ua(),K=w.useContext(Su),{navigator:C,basename:Y}=w.useContext(na),L=K!=null&&o1(_)&&y===!0,B=C.encodeLocation?C.encodeLocation(_).pathname:_.pathname,Q=U.pathname,W=K&&K.navigation&&K.navigation.location?K.navigation.location.pathname:null;s||(Q=Q.toLowerCase(),W=W?W.toLowerCase():null,B=B.toLowerCase()),W&&Y&&(W=bn(W,Y)||W);const oe=B!=="/"&&B.endsWith("/")?B.length-1:B.length;let J=Q===B||!d&&Q.startsWith(B)&&Q.charAt(oe)==="/",ke=W!=null&&(W===B||!d&&W.startsWith(B)&&W.charAt(B.length)==="/"),I={isActive:J,isPending:ke,isTransitioning:L},be=J?l:void 0,$e;typeof u=="function"?$e=u(I):$e=[u,J?"active":null,ke?"pending":null,L?"transitioning":null].filter(Boolean).join(" ");let xt=typeof f=="function"?f(I):f;return w.createElement(aa,{...g,"aria-current":be,className:$e,ref:b,style:xt,to:m,viewTransition:y},typeof v=="function"?v(I):v)});nu.displayName="NavLink";var n1=w.forwardRef(({discover:n="render",fetcherKey:l,navigate:s,reloadDocument:u,replace:d,state:f,method:m=tu,action:y,onSubmit:v,relative:g,preventScrollReset:b,viewTransition:_,defaultShouldRevalidate:U,...K},C)=>{let{useTransitions:Y}=w.useContext(na),L=u1(),B=c1(y,{relative:g}),Q=m.toLowerCase()==="get"?"get":"post",W=typeof y=="string"&&Od.test(y),oe=J=>{if(v&&v(J),J.defaultPrevented)return;J.preventDefault();let ke=J.nativeEvent.submitter,I=(ke==null?void 0:ke.getAttribute("formmethod"))||m,be=()=>L(ke||J.currentTarget,{fetcherKey:l,method:I,navigate:s,replace:d,state:f,relative:g,preventScrollReset:b,viewTransition:_,defaultShouldRevalidate:U});Y&&s!==!1?w.startTransition(()=>be()):be()};return w.createElement("form",{ref:C,method:Q,action:B,onSubmit:u?v:oe,...K,"data-discover":!W&&n==="render"?"true":void 0})});n1.displayName="Form";function l1(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yy(n){let l=w.useContext(Ai);return nt(l,l1(n)),l}function i1(n,{target:l,replace:s,mask:u,state:d,preventScrollReset:f,relative:m,viewTransition:y,defaultShouldRevalidate:v,useTransitions:g}={}){let b=zd(),_=Ua(),U=Ms(n,{relative:m});return w.useCallback(K=>{if(Ub(K,l)){K.preventDefault();let C=s!==void 0?s:_l(_)===_l(U),Y=()=>b(n,{replace:C,mask:u,state:d,preventScrollReset:f,relative:m,viewTransition:y,defaultShouldRevalidate:v});g?w.startTransition(()=>Y()):Y()}},[_,b,U,s,u,d,l,n,f,m,y,v,g])}function vy(n){Sa(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let l=w.useRef(yd(n)),s=w.useRef(!1),u=Ua(),d=w.useMemo(()=>zb(u.search,s.current?null:l.current),[u.search]),f=zd(),m=w.useCallback((y,v)=>{const g=yd(typeof y=="function"?y(new URLSearchParams(d)):y);s.current=!0,f("?"+g,v)},[f,d]);return[d,m]}var s1=0,r1=()=>`__${String(++s1)}__`;function u1(){let{router:n}=yy("useSubmit"),{basename:l}=w.useContext(na),s=Ab(),u=n.fetch,d=n.navigate;return w.useCallback(async(f,m={})=>{let{action:y,method:v,encType:g,formData:b,body:_}=Hb(f,l);if(m.navigate===!1){let U=m.fetcherKey||r1();await u(U,s,m.action||y,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:_,formMethod:m.method||v,formEncType:m.encType||g,flushSync:m.flushSync})}else await d(m.action||y,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:_,formMethod:m.method||v,formEncType:m.encType||g,replace:m.replace,state:m.state,fromRouteId:s,flushSync:m.flushSync,viewTransition:m.viewTransition})},[u,d,l,s])}function c1(n,{relative:l}={}){let{basename:s}=w.useContext(na),u=w.useContext(La);nt(u,"useFormAction must be used inside a RouteContext");let[d]=u.matches.slice(-1),f={...Ms(n||".",{relative:l})},m=Ua();if(n==null){f.search=m.search;let y=new URLSearchParams(f.search),v=y.getAll("index");if(v.some(b=>b==="")){y.delete("index"),v.filter(_=>_).forEach(_=>y.append("index",_));let b=y.toString();f.search=b?`?${b}`:""}}return(!n||n===".")&&d.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(f.pathname=f.pathname==="/"?s:Ma([s,f.pathname])),_l(f)}function o1(n,{relative:l}={}){let s=w.useContext(uy);nt(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=yy("useViewTransitionState"),d=Ms(n,{relative:l});if(!s.isTransitioning)return!1;let f=bn(s.currentLocation.pathname,u)||s.currentLocation.pathname,m=bn(s.nextLocation.pathname,u)||s.nextLocation.pathname;return iu(d.pathname,m)!=null||iu(d.pathname,f)!=null}var Ue;(function(n){n.assertEqual=d=>{};function l(d){}n.assertIs=l;function s(d){throw new Error}n.assertNever=s,n.arrayToEnum=d=>{const f={};for(const m of d)f[m]=m;return f},n.getValidEnumValues=d=>{const f=n.objectKeys(d).filter(y=>typeof d[d[y]]!="number"),m={};for(const y of f)m[y]=d[y];return n.objectValues(m)},n.objectValues=d=>n.objectKeys(d).map(function(f){return d[f]}),n.objectKeys=typeof Object.keys=="function"?d=>Object.keys(d):d=>{const f=[];for(const m in d)Object.prototype.hasOwnProperty.call(d,m)&&f.push(m);return f},n.find=(d,f)=>{for(const m of d)if(f(m))return m},n.isInteger=typeof Number.isInteger=="function"?d=>Number.isInteger(d):d=>typeof d=="number"&&Number.isFinite(d)&&Math.floor(d)===d;function u(d,f=" | "){return d.map(m=>typeof m=="string"?`'${m}'`:m).join(f)}n.joinValues=u,n.jsonStringifyReplacer=(d,f)=>typeof f=="bigint"?f.toString():f})(Ue||(Ue={}));var ox;(function(n){n.mergeShapes=(l,s)=>({...l,...s})})(ox||(ox={}));const te=Ue.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Fn=n=>{switch(typeof n){case"undefined":return te.undefined;case"string":return te.string;case"number":return Number.isNaN(n)?te.nan:te.number;case"boolean":return te.boolean;case"function":return te.function;case"bigint":return te.bigint;case"symbol":return te.symbol;case"object":return Array.isArray(n)?te.array:n===null?te.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?te.promise:typeof Map<"u"&&n instanceof Map?te.map:typeof Set<"u"&&n instanceof Set?te.set:typeof Date<"u"&&n instanceof Date?te.date:te.object;default:return te.unknown}},X=Ue.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class wn extends Error{get errors(){return this.issues}constructor(l){super(),this.issues=[],this.addIssue=u=>{this.issues=[...this.issues,u]},this.addIssues=(u=[])=>{this.issues=[...this.issues,...u]};const s=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,s):this.__proto__=s,this.name="ZodError",this.issues=l}format(l){const s=l||function(f){return f.message},u={_errors:[]},d=f=>{for(const m of f.issues)if(m.code==="invalid_union")m.unionErrors.map(d);else if(m.code==="invalid_return_type")d(m.returnTypeError);else if(m.code==="invalid_arguments")d(m.argumentsError);else if(m.path.length===0)u._errors.push(s(m));else{let y=u,v=0;for(;v<m.path.length;){const g=m.path[v];v===m.path.length-1?(y[g]=y[g]||{_errors:[]},y[g]._errors.push(s(m))):y[g]=y[g]||{_errors:[]},y=y[g],v++}}};return d(this),u}static assert(l){if(!(l instanceof wn))throw new Error(`Not a ZodError: ${l}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ue.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(l=s=>s.message){const s={},u=[];for(const d of this.issues)if(d.path.length>0){const f=d.path[0];s[f]=s[f]||[],s[f].push(l(d))}else u.push(l(d));return{formErrors:u,fieldErrors:s}}get formErrors(){return this.flatten()}}wn.create=n=>new wn(n);const vd=(n,l)=>{let s;switch(n.code){case X.invalid_type:n.received===te.undefined?s="Required":s=`Expected ${n.expected}, received ${n.received}`;break;case X.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(n.expected,Ue.jsonStringifyReplacer)}`;break;case X.unrecognized_keys:s=`Unrecognized key(s) in object: ${Ue.joinValues(n.keys,", ")}`;break;case X.invalid_union:s="Invalid input";break;case X.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${Ue.joinValues(n.options)}`;break;case X.invalid_enum_value:s=`Invalid enum value. Expected ${Ue.joinValues(n.options)}, received '${n.received}'`;break;case X.invalid_arguments:s="Invalid function arguments";break;case X.invalid_return_type:s="Invalid function return type";break;case X.invalid_date:s="Invalid date";break;case X.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(s=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(s=`${s} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?s=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?s=`Invalid input: must end with "${n.validation.endsWith}"`:Ue.assertNever(n.validation):n.validation!=="regex"?s=`Invalid ${n.validation}`:s="Invalid";break;case X.too_small:n.type==="array"?s=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?s=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?s=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="bigint"?s=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?s=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:s="Invalid input";break;case X.too_big:n.type==="array"?s=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?s=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?s=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?s=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?s=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:s="Invalid input";break;case X.custom:s="Invalid input";break;case X.invalid_intersection_types:s="Intersection results could not be merged";break;case X.not_multiple_of:s=`Number must be a multiple of ${n.multipleOf}`;break;case X.not_finite:s="Number must be finite";break;default:s=l.defaultError,Ue.assertNever(n)}return{message:s}};let d1=vd;function f1(){return d1}const h1=n=>{const{data:l,path:s,errorMaps:u,issueData:d}=n,f=[...s,...d.path||[]],m={...d,path:f};if(d.message!==void 0)return{...d,path:f,message:d.message};let y="";const v=u.filter(g=>!!g).slice().reverse();for(const g of v)y=g(m,{data:l,defaultError:y}).message;return{...d,path:f,message:y}};function P(n,l){const s=f1(),u=h1({issueData:l,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,s,s===vd?void 0:vd].filter(d=>!!d)});n.common.issues.push(u)}class Mt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(l,s){const u=[];for(const d of s){if(d.status==="aborted")return me;d.status==="dirty"&&l.dirty(),u.push(d.value)}return{status:l.value,value:u}}static async mergeObjectAsync(l,s){const u=[];for(const d of s){const f=await d.key,m=await d.value;u.push({key:f,value:m})}return Mt.mergeObjectSync(l,u)}static mergeObjectSync(l,s){const u={};for(const d of s){const{key:f,value:m}=d;if(f.status==="aborted"||m.status==="aborted")return me;f.status==="dirty"&&l.dirty(),m.status==="dirty"&&l.dirty(),f.value!=="__proto__"&&(typeof m.value<"u"||d.alwaysSet)&&(u[f.value]=m.value)}return{status:l.value,value:u}}}const me=Object.freeze({status:"aborted"}),Ss=n=>({status:"dirty",value:n}),ja=n=>({status:"valid",value:n}),dx=n=>n.status==="aborted",fx=n=>n.status==="dirty",ji=n=>n.status==="valid",su=n=>typeof Promise<"u"&&n instanceof Promise;var se;(function(n){n.errToObj=l=>typeof l=="string"?{message:l}:l||{},n.toString=l=>typeof l=="string"?l:l==null?void 0:l.message})(se||(se={}));class Ga{constructor(l,s,u,d){this._cachedPath=[],this.parent=l,this.data=s,this._path=u,this._key=d}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const hx=(n,l)=>{if(ji(l))return{success:!0,data:l.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const s=new wn(n.common.issues);return this._error=s,this._error}}};function Se(n){if(!n)return{};const{errorMap:l,invalid_type_error:s,required_error:u,description:d}=n;if(l&&(s||u))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return l?{errorMap:l,description:d}:{errorMap:(m,y)=>{const{message:v}=n;return m.code==="invalid_enum_value"?{message:v??y.defaultError}:typeof y.data>"u"?{message:v??u??y.defaultError}:m.code!=="invalid_type"?{message:y.defaultError}:{message:v??s??y.defaultError}},description:d}}class Ee{get description(){return this._def.description}_getType(l){return Fn(l.data)}_getOrReturnCtx(l,s){return s||{common:l.parent.common,data:l.data,parsedType:Fn(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}_processInputParams(l){return{status:new Mt,ctx:{common:l.parent.common,data:l.data,parsedType:Fn(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}}_parseSync(l){const s=this._parse(l);if(su(s))throw new Error("Synchronous parse encountered promise.");return s}_parseAsync(l){const s=this._parse(l);return Promise.resolve(s)}parse(l,s){const u=this.safeParse(l,s);if(u.success)return u.data;throw u.error}safeParse(l,s){const u={common:{issues:[],async:(s==null?void 0:s.async)??!1,contextualErrorMap:s==null?void 0:s.errorMap},path:(s==null?void 0:s.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:Fn(l)},d=this._parseSync({data:l,path:u.path,parent:u});return hx(u,d)}"~validate"(l){var u,d;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:Fn(l)};if(!this["~standard"].async)try{const f=this._parseSync({data:l,path:[],parent:s});return ji(f)?{value:f.value}:{issues:s.common.issues}}catch(f){(d=(u=f==null?void 0:f.message)==null?void 0:u.toLowerCase())!=null&&d.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:l,path:[],parent:s}).then(f=>ji(f)?{value:f.value}:{issues:s.common.issues})}async parseAsync(l,s){const u=await this.safeParseAsync(l,s);if(u.success)return u.data;throw u.error}async safeParseAsync(l,s){const u={common:{issues:[],contextualErrorMap:s==null?void 0:s.errorMap,async:!0},path:(s==null?void 0:s.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:Fn(l)},d=this._parse({data:l,path:u.path,parent:u}),f=await(su(d)?d:Promise.resolve(d));return hx(u,f)}refine(l,s){const u=d=>typeof s=="string"||typeof s>"u"?{message:s}:typeof s=="function"?s(d):s;return this._refinement((d,f)=>{const m=l(d),y=()=>f.addIssue({code:X.custom,...u(d)});return typeof Promise<"u"&&m instanceof Promise?m.then(v=>v?!0:(y(),!1)):m?!0:(y(),!1)})}refinement(l,s){return this._refinement((u,d)=>l(u)?!0:(d.addIssue(typeof s=="function"?s(u,d):s),!1))}_refinement(l){return new Cl({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:l}})}superRefine(l){return this._refinement(l)}constructor(l){this.spa=this.safeParseAsync,this._def=l,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:s=>this["~validate"](s)}}optional(){return gn.create(this,this._def)}nullable(){return Tl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Za.create(this)}promise(){return fu.create(this,this._def)}or(l){return uu.create([this,l],this._def)}and(l){return cu.create(this,l,this._def)}transform(l){return new Cl({...Se(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:l}})}default(l){const s=typeof l=="function"?l:()=>l;return new hu({...Se(this._def),innerType:this,defaultValue:s,typeName:pe.ZodDefault})}brand(){return new Sy({typeName:pe.ZodBranded,type:this,...Se(this._def)})}catch(l){const s=typeof l=="function"?l:()=>l;return new mu({...Se(this._def),innerType:this,catchValue:s,typeName:pe.ZodCatch})}describe(l){const s=this.constructor;return new s({...this._def,description:l})}pipe(l){return Zd.create(this,l)}readonly(){return pu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const m1=/^c[^\s-]{8,}$/i,p1=/^[0-9a-z]+$/,x1=/^[0-9A-HJKMNP-TV-Z]{26}$/i,y1=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,v1=/^[a-z0-9_-]{21}$/i,g1=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,b1=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,w1=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,S1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Po;const j1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,N1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,_1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,A1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,E1=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,k1=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,gy="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",R1=new RegExp(`^${gy}$`);function by(n){let l="[0-5]\\d";n.precision?l=`${l}\\.\\d{${n.precision}}`:n.precision==null&&(l=`${l}(\\.\\d+)?`);const s=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${l})${s}`}function C1(n){return new RegExp(`^${by(n)}$`)}function T1(n){let l=`${gy}T${by(n)}`;const s=[];return s.push(n.local?"Z?":"Z"),n.offset&&s.push("([+-]\\d{2}:?\\d{2})"),l=`${l}(${s.join("|")})`,new RegExp(`^${l}$`)}function O1(n,l){return!!((l==="v4"||!l)&&j1.test(n)||(l==="v6"||!l)&&_1.test(n))}function M1(n,l){if(!g1.test(n))return!1;try{const[s]=n.split(".");if(!s)return!1;const u=s.replace(/-/g,"+").replace(/_/g,"/").padEnd(s.length+(4-s.length%4)%4,"="),d=JSON.parse(atob(u));return!(typeof d!="object"||d===null||"typ"in d&&(d==null?void 0:d.typ)!=="JWT"||!d.alg||l&&d.alg!==l)}catch{return!1}}function D1(n,l){return!!((l==="v4"||!l)&&N1.test(n)||(l==="v6"||!l)&&A1.test(n))}class Ya extends Ee{_parse(l){if(this._def.coerce&&(l.data=String(l.data)),this._getType(l)!==te.string){const f=this._getOrReturnCtx(l);return P(f,{code:X.invalid_type,expected:te.string,received:f.parsedType}),me}const u=new Mt;let d;for(const f of this._def.checks)if(f.kind==="min")l.data.length<f.value&&(d=this._getOrReturnCtx(l,d),P(d,{code:X.too_small,minimum:f.value,type:"string",inclusive:!0,exact:!1,message:f.message}),u.dirty());else if(f.kind==="max")l.data.length>f.value&&(d=this._getOrReturnCtx(l,d),P(d,{code:X.too_big,maximum:f.value,type:"string",inclusive:!0,exact:!1,message:f.message}),u.dirty());else if(f.kind==="length"){const m=l.data.length>f.value,y=l.data.length<f.value;(m||y)&&(d=this._getOrReturnCtx(l,d),m?P(d,{code:X.too_big,maximum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}):y&&P(d,{code:X.too_small,minimum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}),u.dirty())}else if(f.kind==="email")w1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"email",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="emoji")Po||(Po=new RegExp(S1,"u")),Po.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"emoji",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="uuid")y1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"uuid",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="nanoid")v1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"nanoid",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid")m1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"cuid",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid2")p1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"cuid2",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="ulid")x1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"ulid",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="url")try{new URL(l.data)}catch{d=this._getOrReturnCtx(l,d),P(d,{validation:"url",code:X.invalid_string,message:f.message}),u.dirty()}else f.kind==="regex"?(f.regex.lastIndex=0,f.regex.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"regex",code:X.invalid_string,message:f.message}),u.dirty())):f.kind==="trim"?l.data=l.data.trim():f.kind==="includes"?l.data.includes(f.value,f.position)||(d=this._getOrReturnCtx(l,d),P(d,{code:X.invalid_string,validation:{includes:f.value,position:f.position},message:f.message}),u.dirty()):f.kind==="toLowerCase"?l.data=l.data.toLowerCase():f.kind==="toUpperCase"?l.data=l.data.toUpperCase():f.kind==="startsWith"?l.data.startsWith(f.value)||(d=this._getOrReturnCtx(l,d),P(d,{code:X.invalid_string,validation:{startsWith:f.value},message:f.message}),u.dirty()):f.kind==="endsWith"?l.data.endsWith(f.value)||(d=this._getOrReturnCtx(l,d),P(d,{code:X.invalid_string,validation:{endsWith:f.value},message:f.message}),u.dirty()):f.kind==="datetime"?T1(f).test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{code:X.invalid_string,validation:"datetime",message:f.message}),u.dirty()):f.kind==="date"?R1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{code:X.invalid_string,validation:"date",message:f.message}),u.dirty()):f.kind==="time"?C1(f).test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{code:X.invalid_string,validation:"time",message:f.message}),u.dirty()):f.kind==="duration"?b1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"duration",code:X.invalid_string,message:f.message}),u.dirty()):f.kind==="ip"?O1(l.data,f.version)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"ip",code:X.invalid_string,message:f.message}),u.dirty()):f.kind==="jwt"?M1(l.data,f.alg)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"jwt",code:X.invalid_string,message:f.message}),u.dirty()):f.kind==="cidr"?D1(l.data,f.version)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"cidr",code:X.invalid_string,message:f.message}),u.dirty()):f.kind==="base64"?E1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"base64",code:X.invalid_string,message:f.message}),u.dirty()):f.kind==="base64url"?k1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"base64url",code:X.invalid_string,message:f.message}),u.dirty()):Ue.assertNever(f);return{status:u.value,value:l.data}}_regex(l,s,u){return this.refinement(d=>l.test(d),{validation:s,code:X.invalid_string,...se.errToObj(u)})}_addCheck(l){return new Ya({...this._def,checks:[...this._def.checks,l]})}email(l){return this._addCheck({kind:"email",...se.errToObj(l)})}url(l){return this._addCheck({kind:"url",...se.errToObj(l)})}emoji(l){return this._addCheck({kind:"emoji",...se.errToObj(l)})}uuid(l){return this._addCheck({kind:"uuid",...se.errToObj(l)})}nanoid(l){return this._addCheck({kind:"nanoid",...se.errToObj(l)})}cuid(l){return this._addCheck({kind:"cuid",...se.errToObj(l)})}cuid2(l){return this._addCheck({kind:"cuid2",...se.errToObj(l)})}ulid(l){return this._addCheck({kind:"ulid",...se.errToObj(l)})}base64(l){return this._addCheck({kind:"base64",...se.errToObj(l)})}base64url(l){return this._addCheck({kind:"base64url",...se.errToObj(l)})}jwt(l){return this._addCheck({kind:"jwt",...se.errToObj(l)})}ip(l){return this._addCheck({kind:"ip",...se.errToObj(l)})}cidr(l){return this._addCheck({kind:"cidr",...se.errToObj(l)})}datetime(l){return typeof l=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:l}):this._addCheck({kind:"datetime",precision:typeof(l==null?void 0:l.precision)>"u"?null:l==null?void 0:l.precision,offset:(l==null?void 0:l.offset)??!1,local:(l==null?void 0:l.local)??!1,...se.errToObj(l==null?void 0:l.message)})}date(l){return this._addCheck({kind:"date",message:l})}time(l){return typeof l=="string"?this._addCheck({kind:"time",precision:null,message:l}):this._addCheck({kind:"time",precision:typeof(l==null?void 0:l.precision)>"u"?null:l==null?void 0:l.precision,...se.errToObj(l==null?void 0:l.message)})}duration(l){return this._addCheck({kind:"duration",...se.errToObj(l)})}regex(l,s){return this._addCheck({kind:"regex",regex:l,...se.errToObj(s)})}includes(l,s){return this._addCheck({kind:"includes",value:l,position:s==null?void 0:s.position,...se.errToObj(s==null?void 0:s.message)})}startsWith(l,s){return this._addCheck({kind:"startsWith",value:l,...se.errToObj(s)})}endsWith(l,s){return this._addCheck({kind:"endsWith",value:l,...se.errToObj(s)})}min(l,s){return this._addCheck({kind:"min",value:l,...se.errToObj(s)})}max(l,s){return this._addCheck({kind:"max",value:l,...se.errToObj(s)})}length(l,s){return this._addCheck({kind:"length",value:l,...se.errToObj(s)})}nonempty(l){return this.min(1,se.errToObj(l))}trim(){return new Ya({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ya({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ya({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(l=>l.kind==="datetime")}get isDate(){return!!this._def.checks.find(l=>l.kind==="date")}get isTime(){return!!this._def.checks.find(l=>l.kind==="time")}get isDuration(){return!!this._def.checks.find(l=>l.kind==="duration")}get isEmail(){return!!this._def.checks.find(l=>l.kind==="email")}get isURL(){return!!this._def.checks.find(l=>l.kind==="url")}get isEmoji(){return!!this._def.checks.find(l=>l.kind==="emoji")}get isUUID(){return!!this._def.checks.find(l=>l.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(l=>l.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(l=>l.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(l=>l.kind==="cuid2")}get isULID(){return!!this._def.checks.find(l=>l.kind==="ulid")}get isIP(){return!!this._def.checks.find(l=>l.kind==="ip")}get isCIDR(){return!!this._def.checks.find(l=>l.kind==="cidr")}get isBase64(){return!!this._def.checks.find(l=>l.kind==="base64")}get isBase64url(){return!!this._def.checks.find(l=>l.kind==="base64url")}get minLength(){let l=null;for(const s of this._def.checks)s.kind==="min"&&(l===null||s.value>l)&&(l=s.value);return l}get maxLength(){let l=null;for(const s of this._def.checks)s.kind==="max"&&(l===null||s.value<l)&&(l=s.value);return l}}Ya.create=n=>new Ya({checks:[],typeName:pe.ZodString,coerce:(n==null?void 0:n.coerce)??!1,...Se(n)});function L1(n,l){const s=(n.toString().split(".")[1]||"").length,u=(l.toString().split(".")[1]||"").length,d=s>u?s:u,f=Number.parseInt(n.toFixed(d).replace(".","")),m=Number.parseInt(l.toFixed(d).replace(".",""));return f%m/10**d}class Al extends Ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(l){if(this._def.coerce&&(l.data=Number(l.data)),this._getType(l)!==te.number){const f=this._getOrReturnCtx(l);return P(f,{code:X.invalid_type,expected:te.number,received:f.parsedType}),me}let u;const d=new Mt;for(const f of this._def.checks)f.kind==="int"?Ue.isInteger(l.data)||(u=this._getOrReturnCtx(l,u),P(u,{code:X.invalid_type,expected:"integer",received:"float",message:f.message}),d.dirty()):f.kind==="min"?(f.inclusive?l.data<f.value:l.data<=f.value)&&(u=this._getOrReturnCtx(l,u),P(u,{code:X.too_small,minimum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),d.dirty()):f.kind==="max"?(f.inclusive?l.data>f.value:l.data>=f.value)&&(u=this._getOrReturnCtx(l,u),P(u,{code:X.too_big,maximum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),d.dirty()):f.kind==="multipleOf"?L1(l.data,f.value)!==0&&(u=this._getOrReturnCtx(l,u),P(u,{code:X.not_multiple_of,multipleOf:f.value,message:f.message}),d.dirty()):f.kind==="finite"?Number.isFinite(l.data)||(u=this._getOrReturnCtx(l,u),P(u,{code:X.not_finite,message:f.message}),d.dirty()):Ue.assertNever(f);return{status:d.value,value:l.data}}gte(l,s){return this.setLimit("min",l,!0,se.toString(s))}gt(l,s){return this.setLimit("min",l,!1,se.toString(s))}lte(l,s){return this.setLimit("max",l,!0,se.toString(s))}lt(l,s){return this.setLimit("max",l,!1,se.toString(s))}setLimit(l,s,u,d){return new Al({...this._def,checks:[...this._def.checks,{kind:l,value:s,inclusive:u,message:se.toString(d)}]})}_addCheck(l){return new Al({...this._def,checks:[...this._def.checks,l]})}int(l){return this._addCheck({kind:"int",message:se.toString(l)})}positive(l){return this._addCheck({kind:"min",value:0,inclusive:!1,message:se.toString(l)})}negative(l){return this._addCheck({kind:"max",value:0,inclusive:!1,message:se.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:0,inclusive:!0,message:se.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:0,inclusive:!0,message:se.toString(l)})}multipleOf(l,s){return this._addCheck({kind:"multipleOf",value:l,message:se.toString(s)})}finite(l){return this._addCheck({kind:"finite",message:se.toString(l)})}safe(l){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:se.toString(l)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:se.toString(l)})}get minValue(){let l=null;for(const s of this._def.checks)s.kind==="min"&&(l===null||s.value>l)&&(l=s.value);return l}get maxValue(){let l=null;for(const s of this._def.checks)s.kind==="max"&&(l===null||s.value<l)&&(l=s.value);return l}get isInt(){return!!this._def.checks.find(l=>l.kind==="int"||l.kind==="multipleOf"&&Ue.isInteger(l.value))}get isFinite(){let l=null,s=null;for(const u of this._def.checks){if(u.kind==="finite"||u.kind==="int"||u.kind==="multipleOf")return!0;u.kind==="min"?(s===null||u.value>s)&&(s=u.value):u.kind==="max"&&(l===null||u.value<l)&&(l=u.value)}return Number.isFinite(s)&&Number.isFinite(l)}}Al.create=n=>new Al({checks:[],typeName:pe.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...Se(n)});class El extends Ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(l){if(this._def.coerce)try{l.data=BigInt(l.data)}catch{return this._getInvalidInput(l)}if(this._getType(l)!==te.bigint)return this._getInvalidInput(l);let u;const d=new Mt;for(const f of this._def.checks)f.kind==="min"?(f.inclusive?l.data<f.value:l.data<=f.value)&&(u=this._getOrReturnCtx(l,u),P(u,{code:X.too_small,type:"bigint",minimum:f.value,inclusive:f.inclusive,message:f.message}),d.dirty()):f.kind==="max"?(f.inclusive?l.data>f.value:l.data>=f.value)&&(u=this._getOrReturnCtx(l,u),P(u,{code:X.too_big,type:"bigint",maximum:f.value,inclusive:f.inclusive,message:f.message}),d.dirty()):f.kind==="multipleOf"?l.data%f.value!==BigInt(0)&&(u=this._getOrReturnCtx(l,u),P(u,{code:X.not_multiple_of,multipleOf:f.value,message:f.message}),d.dirty()):Ue.assertNever(f);return{status:d.value,value:l.data}}_getInvalidInput(l){const s=this._getOrReturnCtx(l);return P(s,{code:X.invalid_type,expected:te.bigint,received:s.parsedType}),me}gte(l,s){return this.setLimit("min",l,!0,se.toString(s))}gt(l,s){return this.setLimit("min",l,!1,se.toString(s))}lte(l,s){return this.setLimit("max",l,!0,se.toString(s))}lt(l,s){return this.setLimit("max",l,!1,se.toString(s))}setLimit(l,s,u,d){return new El({...this._def,checks:[...this._def.checks,{kind:l,value:s,inclusive:u,message:se.toString(d)}]})}_addCheck(l){return new El({...this._def,checks:[...this._def.checks,l]})}positive(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:se.toString(l)})}negative(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:se.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:se.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:se.toString(l)})}multipleOf(l,s){return this._addCheck({kind:"multipleOf",value:l,message:se.toString(s)})}get minValue(){let l=null;for(const s of this._def.checks)s.kind==="min"&&(l===null||s.value>l)&&(l=s.value);return l}get maxValue(){let l=null;for(const s of this._def.checks)s.kind==="max"&&(l===null||s.value<l)&&(l=s.value);return l}}El.create=n=>new El({checks:[],typeName:pe.ZodBigInt,coerce:(n==null?void 0:n.coerce)??!1,...Se(n)});class ru extends Ee{_parse(l){if(this._def.coerce&&(l.data=!!l.data),this._getType(l)!==te.boolean){const u=this._getOrReturnCtx(l);return P(u,{code:X.invalid_type,expected:te.boolean,received:u.parsedType}),me}return ja(l.data)}}ru.create=n=>new ru({typeName:pe.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...Se(n)});class Ni extends Ee{_parse(l){if(this._def.coerce&&(l.data=new Date(l.data)),this._getType(l)!==te.date){const f=this._getOrReturnCtx(l);return P(f,{code:X.invalid_type,expected:te.date,received:f.parsedType}),me}if(Number.isNaN(l.data.getTime())){const f=this._getOrReturnCtx(l);return P(f,{code:X.invalid_date}),me}const u=new Mt;let d;for(const f of this._def.checks)f.kind==="min"?l.data.getTime()<f.value&&(d=this._getOrReturnCtx(l,d),P(d,{code:X.too_small,message:f.message,inclusive:!0,exact:!1,minimum:f.value,type:"date"}),u.dirty()):f.kind==="max"?l.data.getTime()>f.value&&(d=this._getOrReturnCtx(l,d),P(d,{code:X.too_big,message:f.message,inclusive:!0,exact:!1,maximum:f.value,type:"date"}),u.dirty()):Ue.assertNever(f);return{status:u.value,value:new Date(l.data.getTime())}}_addCheck(l){return new Ni({...this._def,checks:[...this._def.checks,l]})}min(l,s){return this._addCheck({kind:"min",value:l.getTime(),message:se.toString(s)})}max(l,s){return this._addCheck({kind:"max",value:l.getTime(),message:se.toString(s)})}get minDate(){let l=null;for(const s of this._def.checks)s.kind==="min"&&(l===null||s.value>l)&&(l=s.value);return l!=null?new Date(l):null}get maxDate(){let l=null;for(const s of this._def.checks)s.kind==="max"&&(l===null||s.value<l)&&(l=s.value);return l!=null?new Date(l):null}}Ni.create=n=>new Ni({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:pe.ZodDate,...Se(n)});class mx extends Ee{_parse(l){if(this._getType(l)!==te.symbol){const u=this._getOrReturnCtx(l);return P(u,{code:X.invalid_type,expected:te.symbol,received:u.parsedType}),me}return ja(l.data)}}mx.create=n=>new mx({typeName:pe.ZodSymbol,...Se(n)});class gd extends Ee{_parse(l){if(this._getType(l)!==te.undefined){const u=this._getOrReturnCtx(l);return P(u,{code:X.invalid_type,expected:te.undefined,received:u.parsedType}),me}return ja(l.data)}}gd.create=n=>new gd({typeName:pe.ZodUndefined,...Se(n)});class bd extends Ee{_parse(l){if(this._getType(l)!==te.null){const u=this._getOrReturnCtx(l);return P(u,{code:X.invalid_type,expected:te.null,received:u.parsedType}),me}return ja(l.data)}}bd.create=n=>new bd({typeName:pe.ZodNull,...Se(n)});class px extends Ee{constructor(){super(...arguments),this._any=!0}_parse(l){return ja(l.data)}}px.create=n=>new px({typeName:pe.ZodAny,...Se(n)});class wd extends Ee{constructor(){super(...arguments),this._unknown=!0}_parse(l){return ja(l.data)}}wd.create=n=>new wd({typeName:pe.ZodUnknown,...Se(n)});class el extends Ee{_parse(l){const s=this._getOrReturnCtx(l);return P(s,{code:X.invalid_type,expected:te.never,received:s.parsedType}),me}}el.create=n=>new el({typeName:pe.ZodNever,...Se(n)});class xx extends Ee{_parse(l){if(this._getType(l)!==te.undefined){const u=this._getOrReturnCtx(l);return P(u,{code:X.invalid_type,expected:te.void,received:u.parsedType}),me}return ja(l.data)}}xx.create=n=>new xx({typeName:pe.ZodVoid,...Se(n)});class Za extends Ee{_parse(l){const{ctx:s,status:u}=this._processInputParams(l),d=this._def;if(s.parsedType!==te.array)return P(s,{code:X.invalid_type,expected:te.array,received:s.parsedType}),me;if(d.exactLength!==null){const m=s.data.length>d.exactLength.value,y=s.data.length<d.exactLength.value;(m||y)&&(P(s,{code:m?X.too_big:X.too_small,minimum:y?d.exactLength.value:void 0,maximum:m?d.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:d.exactLength.message}),u.dirty())}if(d.minLength!==null&&s.data.length<d.minLength.value&&(P(s,{code:X.too_small,minimum:d.minLength.value,type:"array",inclusive:!0,exact:!1,message:d.minLength.message}),u.dirty()),d.maxLength!==null&&s.data.length>d.maxLength.value&&(P(s,{code:X.too_big,maximum:d.maxLength.value,type:"array",inclusive:!0,exact:!1,message:d.maxLength.message}),u.dirty()),s.common.async)return Promise.all([...s.data].map((m,y)=>d.type._parseAsync(new Ga(s,m,s.path,y)))).then(m=>Mt.mergeArray(u,m));const f=[...s.data].map((m,y)=>d.type._parseSync(new Ga(s,m,s.path,y)));return Mt.mergeArray(u,f)}get element(){return this._def.type}min(l,s){return new Za({...this._def,minLength:{value:l,message:se.toString(s)}})}max(l,s){return new Za({...this._def,maxLength:{value:l,message:se.toString(s)}})}length(l,s){return new Za({...this._def,exactLength:{value:l,message:se.toString(s)}})}nonempty(l){return this.min(1,l)}}Za.create=(n,l)=>new Za({type:n,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,...Se(l)});function bi(n){if(n instanceof pt){const l={};for(const s in n.shape){const u=n.shape[s];l[s]=gn.create(bi(u))}return new pt({...n._def,shape:()=>l})}else return n instanceof Za?new Za({...n._def,type:bi(n.element)}):n instanceof gn?gn.create(bi(n.unwrap())):n instanceof Tl?Tl.create(bi(n.unwrap())):n instanceof kl?kl.create(n.items.map(l=>bi(l))):n}class pt extends Ee{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const l=this._def.shape(),s=Ue.objectKeys(l);return this._cached={shape:l,keys:s},this._cached}_parse(l){if(this._getType(l)!==te.object){const g=this._getOrReturnCtx(l);return P(g,{code:X.invalid_type,expected:te.object,received:g.parsedType}),me}const{status:u,ctx:d}=this._processInputParams(l),{shape:f,keys:m}=this._getCached(),y=[];if(!(this._def.catchall instanceof el&&this._def.unknownKeys==="strip"))for(const g in d.data)m.includes(g)||y.push(g);const v=[];for(const g of m){const b=f[g],_=d.data[g];v.push({key:{status:"valid",value:g},value:b._parse(new Ga(d,_,d.path,g)),alwaysSet:g in d.data})}if(this._def.catchall instanceof el){const g=this._def.unknownKeys;if(g==="passthrough")for(const b of y)v.push({key:{status:"valid",value:b},value:{status:"valid",value:d.data[b]}});else if(g==="strict")y.length>0&&(P(d,{code:X.unrecognized_keys,keys:y}),u.dirty());else if(g!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const g=this._def.catchall;for(const b of y){const _=d.data[b];v.push({key:{status:"valid",value:b},value:g._parse(new Ga(d,_,d.path,b)),alwaysSet:b in d.data})}}return d.common.async?Promise.resolve().then(async()=>{const g=[];for(const b of v){const _=await b.key,U=await b.value;g.push({key:_,value:U,alwaysSet:b.alwaysSet})}return g}).then(g=>Mt.mergeObjectSync(u,g)):Mt.mergeObjectSync(u,v)}get shape(){return this._def.shape()}strict(l){return se.errToObj,new pt({...this._def,unknownKeys:"strict",...l!==void 0?{errorMap:(s,u)=>{var f,m;const d=((m=(f=this._def).errorMap)==null?void 0:m.call(f,s,u).message)??u.defaultError;return s.code==="unrecognized_keys"?{message:se.errToObj(l).message??d}:{message:d}}}:{}})}strip(){return new pt({...this._def,unknownKeys:"strip"})}passthrough(){return new pt({...this._def,unknownKeys:"passthrough"})}extend(l){return new pt({...this._def,shape:()=>({...this._def.shape(),...l})})}merge(l){return new pt({unknownKeys:l._def.unknownKeys,catchall:l._def.catchall,shape:()=>({...this._def.shape(),...l._def.shape()}),typeName:pe.ZodObject})}setKey(l,s){return this.augment({[l]:s})}catchall(l){return new pt({...this._def,catchall:l})}pick(l){const s={};for(const u of Ue.objectKeys(l))l[u]&&this.shape[u]&&(s[u]=this.shape[u]);return new pt({...this._def,shape:()=>s})}omit(l){const s={};for(const u of Ue.objectKeys(this.shape))l[u]||(s[u]=this.shape[u]);return new pt({...this._def,shape:()=>s})}deepPartial(){return bi(this)}partial(l){const s={};for(const u of Ue.objectKeys(this.shape)){const d=this.shape[u];l&&!l[u]?s[u]=d:s[u]=d.optional()}return new pt({...this._def,shape:()=>s})}required(l){const s={};for(const u of Ue.objectKeys(this.shape))if(l&&!l[u])s[u]=this.shape[u];else{let f=this.shape[u];for(;f instanceof gn;)f=f._def.innerType;s[u]=f}return new pt({...this._def,shape:()=>s})}keyof(){return wy(Ue.objectKeys(this.shape))}}pt.create=(n,l)=>new pt({shape:()=>n,unknownKeys:"strip",catchall:el.create(),typeName:pe.ZodObject,...Se(l)});pt.strictCreate=(n,l)=>new pt({shape:()=>n,unknownKeys:"strict",catchall:el.create(),typeName:pe.ZodObject,...Se(l)});pt.lazycreate=(n,l)=>new pt({shape:n,unknownKeys:"strip",catchall:el.create(),typeName:pe.ZodObject,...Se(l)});class uu extends Ee{_parse(l){const{ctx:s}=this._processInputParams(l),u=this._def.options;function d(f){for(const y of f)if(y.result.status==="valid")return y.result;for(const y of f)if(y.result.status==="dirty")return s.common.issues.push(...y.ctx.common.issues),y.result;const m=f.map(y=>new wn(y.ctx.common.issues));return P(s,{code:X.invalid_union,unionErrors:m}),me}if(s.common.async)return Promise.all(u.map(async f=>{const m={...s,common:{...s.common,issues:[]},parent:null};return{result:await f._parseAsync({data:s.data,path:s.path,parent:m}),ctx:m}})).then(d);{let f;const m=[];for(const v of u){const g={...s,common:{...s.common,issues:[]},parent:null},b=v._parseSync({data:s.data,path:s.path,parent:g});if(b.status==="valid")return b;b.status==="dirty"&&!f&&(f={result:b,ctx:g}),g.common.issues.length&&m.push(g.common.issues)}if(f)return s.common.issues.push(...f.ctx.common.issues),f.result;const y=m.map(v=>new wn(v));return P(s,{code:X.invalid_union,unionErrors:y}),me}}get options(){return this._def.options}}uu.create=(n,l)=>new uu({options:n,typeName:pe.ZodUnion,...Se(l)});const vn=n=>n instanceof jd?vn(n.schema):n instanceof Cl?vn(n.innerType()):n instanceof du?[n.value]:n instanceof Rl?n.options:n instanceof Nd?Ue.objectValues(n.enum):n instanceof hu?vn(n._def.innerType):n instanceof gd?[void 0]:n instanceof bd?[null]:n instanceof gn?[void 0,...vn(n.unwrap())]:n instanceof Tl?[null,...vn(n.unwrap())]:n instanceof Sy||n instanceof pu?vn(n.unwrap()):n instanceof mu?vn(n._def.innerType):[];class Vd extends Ee{_parse(l){const{ctx:s}=this._processInputParams(l);if(s.parsedType!==te.object)return P(s,{code:X.invalid_type,expected:te.object,received:s.parsedType}),me;const u=this.discriminator,d=s.data[u],f=this.optionsMap.get(d);return f?s.common.async?f._parseAsync({data:s.data,path:s.path,parent:s}):f._parseSync({data:s.data,path:s.path,parent:s}):(P(s,{code:X.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[u]}),me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(l,s,u){const d=new Map;for(const f of s){const m=vn(f.shape[l]);if(!m.length)throw new Error(`A discriminator value for key \`${l}\` could not be extracted from all schema options`);for(const y of m){if(d.has(y))throw new Error(`Discriminator property ${String(l)} has duplicate value ${String(y)}`);d.set(y,f)}}return new Vd({typeName:pe.ZodDiscriminatedUnion,discriminator:l,options:s,optionsMap:d,...Se(u)})}}function Sd(n,l){const s=Fn(n),u=Fn(l);if(n===l)return{valid:!0,data:n};if(s===te.object&&u===te.object){const d=Ue.objectKeys(l),f=Ue.objectKeys(n).filter(y=>d.indexOf(y)!==-1),m={...n,...l};for(const y of f){const v=Sd(n[y],l[y]);if(!v.valid)return{valid:!1};m[y]=v.data}return{valid:!0,data:m}}else if(s===te.array&&u===te.array){if(n.length!==l.length)return{valid:!1};const d=[];for(let f=0;f<n.length;f++){const m=n[f],y=l[f],v=Sd(m,y);if(!v.valid)return{valid:!1};d.push(v.data)}return{valid:!0,data:d}}else return s===te.date&&u===te.date&&+n==+l?{valid:!0,data:n}:{valid:!1}}class cu extends Ee{_parse(l){const{status:s,ctx:u}=this._processInputParams(l),d=(f,m)=>{if(dx(f)||dx(m))return me;const y=Sd(f.value,m.value);return y.valid?((fx(f)||fx(m))&&s.dirty(),{status:s.value,value:y.data}):(P(u,{code:X.invalid_intersection_types}),me)};return u.common.async?Promise.all([this._def.left._parseAsync({data:u.data,path:u.path,parent:u}),this._def.right._parseAsync({data:u.data,path:u.path,parent:u})]).then(([f,m])=>d(f,m)):d(this._def.left._parseSync({data:u.data,path:u.path,parent:u}),this._def.right._parseSync({data:u.data,path:u.path,parent:u}))}}cu.create=(n,l,s)=>new cu({left:n,right:l,typeName:pe.ZodIntersection,...Se(s)});class kl extends Ee{_parse(l){const{status:s,ctx:u}=this._processInputParams(l);if(u.parsedType!==te.array)return P(u,{code:X.invalid_type,expected:te.array,received:u.parsedType}),me;if(u.data.length<this._def.items.length)return P(u,{code:X.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&u.data.length>this._def.items.length&&(P(u,{code:X.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.dirty());const f=[...u.data].map((m,y)=>{const v=this._def.items[y]||this._def.rest;return v?v._parse(new Ga(u,m,u.path,y)):null}).filter(m=>!!m);return u.common.async?Promise.all(f).then(m=>Mt.mergeArray(s,m)):Mt.mergeArray(s,f)}get items(){return this._def.items}rest(l){return new kl({...this._def,rest:l})}}kl.create=(n,l)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new kl({items:n,typeName:pe.ZodTuple,rest:null,...Se(l)})};class ou extends Ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(l){const{status:s,ctx:u}=this._processInputParams(l);if(u.parsedType!==te.object)return P(u,{code:X.invalid_type,expected:te.object,received:u.parsedType}),me;const d=[],f=this._def.keyType,m=this._def.valueType;for(const y in u.data)d.push({key:f._parse(new Ga(u,y,u.path,y)),value:m._parse(new Ga(u,u.data[y],u.path,y)),alwaysSet:y in u.data});return u.common.async?Mt.mergeObjectAsync(s,d):Mt.mergeObjectSync(s,d)}get element(){return this._def.valueType}static create(l,s,u){return s instanceof Ee?new ou({keyType:l,valueType:s,typeName:pe.ZodRecord,...Se(u)}):new ou({keyType:Ya.create(),valueType:l,typeName:pe.ZodRecord,...Se(s)})}}class yx extends Ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(l){const{status:s,ctx:u}=this._processInputParams(l);if(u.parsedType!==te.map)return P(u,{code:X.invalid_type,expected:te.map,received:u.parsedType}),me;const d=this._def.keyType,f=this._def.valueType,m=[...u.data.entries()].map(([y,v],g)=>({key:d._parse(new Ga(u,y,u.path,[g,"key"])),value:f._parse(new Ga(u,v,u.path,[g,"value"]))}));if(u.common.async){const y=new Map;return Promise.resolve().then(async()=>{for(const v of m){const g=await v.key,b=await v.value;if(g.status==="aborted"||b.status==="aborted")return me;(g.status==="dirty"||b.status==="dirty")&&s.dirty(),y.set(g.value,b.value)}return{status:s.value,value:y}})}else{const y=new Map;for(const v of m){const g=v.key,b=v.value;if(g.status==="aborted"||b.status==="aborted")return me;(g.status==="dirty"||b.status==="dirty")&&s.dirty(),y.set(g.value,b.value)}return{status:s.value,value:y}}}}yx.create=(n,l,s)=>new yx({valueType:l,keyType:n,typeName:pe.ZodMap,...Se(s)});class ks extends Ee{_parse(l){const{status:s,ctx:u}=this._processInputParams(l);if(u.parsedType!==te.set)return P(u,{code:X.invalid_type,expected:te.set,received:u.parsedType}),me;const d=this._def;d.minSize!==null&&u.data.size<d.minSize.value&&(P(u,{code:X.too_small,minimum:d.minSize.value,type:"set",inclusive:!0,exact:!1,message:d.minSize.message}),s.dirty()),d.maxSize!==null&&u.data.size>d.maxSize.value&&(P(u,{code:X.too_big,maximum:d.maxSize.value,type:"set",inclusive:!0,exact:!1,message:d.maxSize.message}),s.dirty());const f=this._def.valueType;function m(v){const g=new Set;for(const b of v){if(b.status==="aborted")return me;b.status==="dirty"&&s.dirty(),g.add(b.value)}return{status:s.value,value:g}}const y=[...u.data.values()].map((v,g)=>f._parse(new Ga(u,v,u.path,g)));return u.common.async?Promise.all(y).then(v=>m(v)):m(y)}min(l,s){return new ks({...this._def,minSize:{value:l,message:se.toString(s)}})}max(l,s){return new ks({...this._def,maxSize:{value:l,message:se.toString(s)}})}size(l,s){return this.min(l,s).max(l,s)}nonempty(l){return this.min(1,l)}}ks.create=(n,l)=>new ks({valueType:n,minSize:null,maxSize:null,typeName:pe.ZodSet,...Se(l)});class jd extends Ee{get schema(){return this._def.getter()}_parse(l){const{ctx:s}=this._processInputParams(l);return this._def.getter()._parse({data:s.data,path:s.path,parent:s})}}jd.create=(n,l)=>new jd({getter:n,typeName:pe.ZodLazy,...Se(l)});class du extends Ee{_parse(l){if(l.data!==this._def.value){const s=this._getOrReturnCtx(l);return P(s,{received:s.data,code:X.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:l.data}}get value(){return this._def.value}}du.create=(n,l)=>new du({value:n,typeName:pe.ZodLiteral,...Se(l)});function wy(n,l){return new Rl({values:n,typeName:pe.ZodEnum,...Se(l)})}class Rl extends Ee{_parse(l){if(typeof l.data!="string"){const s=this._getOrReturnCtx(l),u=this._def.values;return P(s,{expected:Ue.joinValues(u),received:s.parsedType,code:X.invalid_type}),me}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(l.data)){const s=this._getOrReturnCtx(l),u=this._def.values;return P(s,{received:s.data,code:X.invalid_enum_value,options:u}),me}return ja(l.data)}get options(){return this._def.values}get enum(){const l={};for(const s of this._def.values)l[s]=s;return l}get Values(){const l={};for(const s of this._def.values)l[s]=s;return l}get Enum(){const l={};for(const s of this._def.values)l[s]=s;return l}extract(l,s=this._def){return Rl.create(l,{...this._def,...s})}exclude(l,s=this._def){return Rl.create(this.options.filter(u=>!l.includes(u)),{...this._def,...s})}}Rl.create=wy;class Nd extends Ee{_parse(l){const s=Ue.getValidEnumValues(this._def.values),u=this._getOrReturnCtx(l);if(u.parsedType!==te.string&&u.parsedType!==te.number){const d=Ue.objectValues(s);return P(u,{expected:Ue.joinValues(d),received:u.parsedType,code:X.invalid_type}),me}if(this._cache||(this._cache=new Set(Ue.getValidEnumValues(this._def.values))),!this._cache.has(l.data)){const d=Ue.objectValues(s);return P(u,{received:u.data,code:X.invalid_enum_value,options:d}),me}return ja(l.data)}get enum(){return this._def.values}}Nd.create=(n,l)=>new Nd({values:n,typeName:pe.ZodNativeEnum,...Se(l)});class fu extends Ee{unwrap(){return this._def.type}_parse(l){const{ctx:s}=this._processInputParams(l);if(s.parsedType!==te.promise&&s.common.async===!1)return P(s,{code:X.invalid_type,expected:te.promise,received:s.parsedType}),me;const u=s.parsedType===te.promise?s.data:Promise.resolve(s.data);return ja(u.then(d=>this._def.type.parseAsync(d,{path:s.path,errorMap:s.common.contextualErrorMap})))}}fu.create=(n,l)=>new fu({type:n,typeName:pe.ZodPromise,...Se(l)});class Cl extends Ee{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(l){const{status:s,ctx:u}=this._processInputParams(l),d=this._def.effect||null,f={addIssue:m=>{P(u,m),m.fatal?s.abort():s.dirty()},get path(){return u.path}};if(f.addIssue=f.addIssue.bind(f),d.type==="preprocess"){const m=d.transform(u.data,f);if(u.common.async)return Promise.resolve(m).then(async y=>{if(s.value==="aborted")return me;const v=await this._def.schema._parseAsync({data:y,path:u.path,parent:u});return v.status==="aborted"?me:v.status==="dirty"||s.value==="dirty"?Ss(v.value):v});{if(s.value==="aborted")return me;const y=this._def.schema._parseSync({data:m,path:u.path,parent:u});return y.status==="aborted"?me:y.status==="dirty"||s.value==="dirty"?Ss(y.value):y}}if(d.type==="refinement"){const m=y=>{const v=d.refinement(y,f);if(u.common.async)return Promise.resolve(v);if(v instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return y};if(u.common.async===!1){const y=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});return y.status==="aborted"?me:(y.status==="dirty"&&s.dirty(),m(y.value),{status:s.value,value:y.value})}else return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(y=>y.status==="aborted"?me:(y.status==="dirty"&&s.dirty(),m(y.value).then(()=>({status:s.value,value:y.value}))))}if(d.type==="transform")if(u.common.async===!1){const m=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});if(!ji(m))return me;const y=d.transform(m.value,f);if(y instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:s.value,value:y}}else return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(m=>ji(m)?Promise.resolve(d.transform(m.value,f)).then(y=>({status:s.value,value:y})):me);Ue.assertNever(d)}}Cl.create=(n,l,s)=>new Cl({schema:n,typeName:pe.ZodEffects,effect:l,...Se(s)});Cl.createWithPreprocess=(n,l,s)=>new Cl({schema:l,effect:{type:"preprocess",transform:n},typeName:pe.ZodEffects,...Se(s)});class gn extends Ee{_parse(l){return this._getType(l)===te.undefined?ja(void 0):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}gn.create=(n,l)=>new gn({innerType:n,typeName:pe.ZodOptional,...Se(l)});class Tl extends Ee{_parse(l){return this._getType(l)===te.null?ja(null):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}Tl.create=(n,l)=>new Tl({innerType:n,typeName:pe.ZodNullable,...Se(l)});class hu extends Ee{_parse(l){const{ctx:s}=this._processInputParams(l);let u=s.data;return s.parsedType===te.undefined&&(u=this._def.defaultValue()),this._def.innerType._parse({data:u,path:s.path,parent:s})}removeDefault(){return this._def.innerType}}hu.create=(n,l)=>new hu({innerType:n,typeName:pe.ZodDefault,defaultValue:typeof l.default=="function"?l.default:()=>l.default,...Se(l)});class mu extends Ee{_parse(l){const{ctx:s}=this._processInputParams(l),u={...s,common:{...s.common,issues:[]}},d=this._def.innerType._parse({data:u.data,path:u.path,parent:{...u}});return su(d)?d.then(f=>({status:"valid",value:f.status==="valid"?f.value:this._def.catchValue({get error(){return new wn(u.common.issues)},input:u.data})})):{status:"valid",value:d.status==="valid"?d.value:this._def.catchValue({get error(){return new wn(u.common.issues)},input:u.data})}}removeCatch(){return this._def.innerType}}mu.create=(n,l)=>new mu({innerType:n,typeName:pe.ZodCatch,catchValue:typeof l.catch=="function"?l.catch:()=>l.catch,...Se(l)});class vx extends Ee{_parse(l){if(this._getType(l)!==te.nan){const u=this._getOrReturnCtx(l);return P(u,{code:X.invalid_type,expected:te.nan,received:u.parsedType}),me}return{status:"valid",value:l.data}}}vx.create=n=>new vx({typeName:pe.ZodNaN,...Se(n)});class Sy extends Ee{_parse(l){const{ctx:s}=this._processInputParams(l),u=s.data;return this._def.type._parse({data:u,path:s.path,parent:s})}unwrap(){return this._def.type}}class Zd extends Ee{_parse(l){const{status:s,ctx:u}=this._processInputParams(l);if(u.common.async)return(async()=>{const f=await this._def.in._parseAsync({data:u.data,path:u.path,parent:u});return f.status==="aborted"?me:f.status==="dirty"?(s.dirty(),Ss(f.value)):this._def.out._parseAsync({data:f.value,path:u.path,parent:u})})();{const d=this._def.in._parseSync({data:u.data,path:u.path,parent:u});return d.status==="aborted"?me:d.status==="dirty"?(s.dirty(),{status:"dirty",value:d.value}):this._def.out._parseSync({data:d.value,path:u.path,parent:u})}}static create(l,s){return new Zd({in:l,out:s,typeName:pe.ZodPipeline})}}class pu extends Ee{_parse(l){const s=this._def.innerType._parse(l),u=d=>(ji(d)&&(d.value=Object.freeze(d.value)),d);return su(s)?s.then(d=>u(d)):u(s)}unwrap(){return this._def.innerType}}pu.create=(n,l)=>new pu({innerType:n,typeName:pe.ZodReadonly,...Se(l)});var pe;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(pe||(pe={}));const p=Ya.create,E=Al.create;El.create;const He=ru.create;Ni.create;const jy=wd.create;el.create;const ne=Za.create,$=pt.create,U1=uu.create,Ny=Vd.create;cu.create;kl.create;const Rs=ou.create,Oa=du.create,de=Rl.create;fu.create;gn.create;Tl.create;const gx={string:(n=>Ya.create({...n,coerce:!0})),number:(n=>Al.create({...n,coerce:!0})),boolean:(n=>ru.create({...n,coerce:!0})),bigint:(n=>El.create({...n,coerce:!0})),date:(n=>Ni.create({...n,coerce:!0}))},z1=me,B1=p().regex(/^github\.com\/[^/]+\/[^/]+$/,"Expected github.com/<owner>/<repo>"),q1=/^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?$/;function H1(n){const l=n.trim();return l?!!(l.startsWith("/")||l.startsWith("~")||l.startsWith(".")||/^[A-Za-z]:[\\/]/.test(l)||l.startsWith("\\\\")):!1}function Gd(n){const l=n.trim();if(!l)throw new Error("Repository is required");if(H1(l))throw new Error("Local filesystem paths are no longer accepted. Pass a GitHub URL or owner/repo (e.g. https://github.com/acme/app or acme/app).");let s,u;const d=q1.exec(l);if(d&&!l.includes("://")&&!l.toLowerCase().includes("github.com"))s=d[1],u=d[2];else{let m=l;/^[a-z][a-z0-9+.-]*:\/\//i.test(m)||(m.startsWith("git@")?m=m.replace(/^git@([^:]+):/,"https://$1/"):m=`https://${m}`);let y;try{y=new URL(m)}catch{throw new Error(`Unrecognized GitHub repository reference: ${n}`)}if(!/^([^.]+\.)?github\.com$/i.test(y.hostname))throw new Error(`Only github.com repositories are supported (got host ${y.hostname})`);const v=y.pathname.replace(/^\/+|\/+$/g,"").split("/");if(v.length<2||!v[0]||!v[1])throw new Error(`Unrecognized GitHub repository reference: ${n}`);s=v[0],u=v[1].replace(/\.git$/i,"")}if(!s||!u||s.includes("..")||u.includes(".."))throw new Error(`Unrecognized GitHub repository reference: ${n}`);const f=B1.parse(`github.com/${s}/${u}`);return{owner:s,repo:u,identity:f,cloneUrl:`https://github.com/${s}/${u}.git`}}const _y=p().min(1).transform((n,l)=>{try{return Gd(n).identity}catch(s){return l.addIssue({code:X.custom,message:s.message}),z1}}),Ay="repo:",$1=de(["resolved","unresolved","conflict","invalid"]),Y1=$({status:$1,repository:p().optional(),sourceLabel:p().optional(),labels:ne(p()).optional(),error:p().optional()});function V1(n){return n?n.filter(l=>l.toLowerCase().startsWith(Ay)):[]}const Z1=100,G1=$({label:p(),repository:p()});$({mappings:ne(G1).max(Z1+1)});function Ey(n){const l=V1(n);if(l.length===0)return{status:"unresolved",labels:[]};if(l.length>1)return{status:"conflict",labels:[...l]};const s=l[0],u=s.slice(Ay.length).trim();if(!u)return{status:"invalid",labels:[s],error:"Repository label has no value"};try{return{status:"resolved",repository:Gd(u).identity,sourceLabel:s,labels:[s]}}catch(d){return{status:"invalid",labels:[s],error:d.message}}}const Dt=de(["claude_code","cursor_local","codex_local","muse_code"]),Da=$({maxTurns:E().positive().nullable().optional(),maxBudgetUsd:E().positive().nullable().optional()}),ky=$({plan:Da.optional(),execute:Da.optional(),reflect:Da.optional()});function lu(n){if(!(n!=null&&n.trim()))return null;try{const l=Da.parse(JSON.parse(n));return l.maxTurns==null&&l.maxBudgetUsd==null?null:l}catch{return null}}function Q1(n){return!n||n.maxTurns==null&&n.maxBudgetUsd==null?null:JSON.stringify(n)}const Qd=de(["developer","reviewer","legacy"]),X1=de(["queued","running","done","failed","timed_out","cancelled"]);$({id:p().uuid(),issueId:p().uuid(),role:Qd,round:E().int().min(1),agentId:p().uuid().nullable(),runtime:Dt.nullable(),model:p().nullable(),budgetJson:p().nullable(),worktreePath:p().nullable(),inputSha:p().nullable(),status:X1,sessionRef:p().nullable(),logPath:p().nullable(),exitCode:E().int().nullable(),errorJson:p().nullable(),metadataJson:p().nullable(),profileSnapshotJson:p().nullable(),processPid:E().int().nullable(),processOwner:p().nullable(),processStartedAt:p().nullable(),createdAt:p(),startedAt:p().nullable(),heartbeatAt:p().nullable(),completedAt:p().nullable(),updatedAt:p()});$({issueId:p().uuid(),role:Qd,round:E().int().min(1),agentId:p().uuid().nullable(),runtime:Dt.nullable(),model:p().nullable().optional(),budgetJson:p().nullable().optional(),inputSha:p().nullable().optional(),metadataJson:p().nullable().optional(),profileSnapshotJson:p().nullable().optional()});const K1=$({worktreeWrite:He(),publishReview:He(),outboundMutation:He(),resolveHumanAction:He()}),Ry=$({worktreeWrite:He().optional(),outboundMutation:He().optional()}).strict(),_u=de(["low","medium","high"]);$({version:Oa(1),agentId:p().nullable(),role:Qd,runtime:Dt.nullable(),model:p().nullable(),effort:_u.nullable().default(null),budgetJson:p().nullable(),permissionPolicy:K1,deckId:p().nullable(),purpose:p().nullable(),capturedAt:p()});const Cy="auto",J1="muse-spark-1.3-contributor",I1=$({code:de(["cli_missing","runtime_auth","runtime_unknown","runtime_capability","cursor_keychain","usage_capped","deck_offline","deck_unauthorized","workspace_missing","deck_missing","mcp_not_registered","github_cli_missing","github_auth","github_unreachable"]),message:p()}),F1=$({id:p().uuid(),name:p(),runtime:Dt,workspaceRoot:p().nullable(),deckId:p().uuid().nullable(),deckName:p().nullable(),playbookId:p().nullable(),defaultPlanModel:p().nullable(),defaultExecuteModel:p().nullable(),defaultPlanBudgetJson:p().nullable(),defaultExecuteBudgetJson:p().nullable(),defaultModel:p().nullable(),defaultEffort:_u.nullable(),defaultBudgetJson:p().nullable(),purpose:p().nullable(),playbookIdsJson:p().nullable(),externalMemoryRefsJson:p().nullable(),permissionPolicyJson:p().nullable(),isBuiltin:He(),createdAt:p(),updatedAt:p()}),Ty=F1.extend({healthy:He(),issues:ne(I1)});$({name:p().min(1),runtime:Dt,deckId:p().uuid(),defaultModel:p().nullable().optional(),defaultEffort:_u.nullable().optional(),defaultBudget:Da.nullable().optional(),purpose:p().nullable().optional(),permissionPolicy:Ry.nullable().optional()});$({name:p().min(1).optional(),runtime:Dt.optional(),deckId:p().uuid().nullable().optional(),defaultModel:p().nullable().optional(),defaultEffort:_u.nullable().optional(),defaultBudget:Da.nullable().optional(),purpose:p().nullable().optional(),permissionPolicy:Ry.nullable().optional()});$({agents:ne(Ty),issueCount:E()});function bx(n){return n.defaultModel??n.defaultExecuteModel??n.defaultPlanModel??null}function W1(n){const l=lu(n.defaultBudgetJson)??lu(n.defaultExecuteBudgetJson)??lu(n.defaultPlanBudgetJson);return Q1(l)}const P1=de(["slack_message","email","service_tool_call"]),ew=$({target:p().min(1).max(120),body:p().min(1).max(4e3)}),tw=$({serviceName:p().min(1).max(120),toolName:p().min(1).max(120),arguments:Rs(jy())}),aw=$({actionType:P1,summary:ew,toolCall:tw}),nw=de(["pending","sent","rejected"]);$({draft:aw,status:nw,sentAt:p().optional(),rejectedAt:p().optional(),bodyMismatch:He().optional(),deliveryAttempts:E().int().min(0).default(0)});$({draftArtifactId:p().uuid(),sentAt:p(),toolResult:Rs(jy()),permalink:p().url().optional()});const lw=$({failure_summary:p().min(1),user_feedback_excerpt:p().min(1),corrected_output_hint:p().optional()}),iw=Ny("op",[$({op:Oa("add_item"),section:p().min(1),text:p().min(1)}),$({op:Oa("amend_item"),section:p().min(1),anchor:p().min(1),text:p().min(1)}),$({op:Oa("remove_item"),section:p().min(1),anchor:p().min(1)}),$({op:Oa("set_triggers"),triggers:ne(p())}),$({op:Oa("rewrite_body"),text:p()})]);$({rationale:p().min(1),ops:ne(iw).min(1),evidence:lw.optional()});const sw=de(["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"]),rw=de(["human","developer","reviewer","system"]),Oy=de(["manual","linear","agent"]),uw=$({id:p().uuid(),source:Oy,externalId:p().nullable(),externalLabel:p().nullable(),externalUrl:p().nullable(),title:p(),description:p().nullable(),acceptanceCriteria:p().nullable(),repo:p(),baseBranch:p(),status:sw,currentOwner:rw,currentIntent:p().nullable(),developerAgentId:p().uuid().nullable(),reviewerAgentId:p().uuid().nullable(),maxReviewRounds:E().int().min(1),currentRound:E().int().min(1),maxInfraAttempts:E().int().min(0),infraAttempts:E().int().min(0),branch:p().nullable(),baseSha:p().nullable(),headSha:p().nullable(),prNumber:E().int().nullable(),prUrl:p().nullable(),autoMerge:He(),createdAt:p(),updatedAt:p()});$({title:p().min(1),description:p().optional(),acceptanceCriteria:p().optional(),repo:_y,baseBranch:p().min(1).default("main"),developerAgentId:p().uuid(),reviewerAgentId:p().uuid(),maxReviewRounds:E().int().min(1).default(3),maxInfraAttempts:E().int().min(0).default(3),autoMerge:He().default(!1),source:Oy.default("manual"),externalId:p().optional(),externalLabel:p().optional(),externalUrl:p().optional(),enqueue:He().default(!0)});$({title:p().min(1).optional(),description:p().nullable().optional(),acceptanceCriteria:p().nullable().optional(),repo:_y.optional(),baseBranch:p().min(1).optional(),developerAgentId:p().uuid().optional(),reviewerAgentId:p().uuid().optional(),maxReviewRounds:E().int().min(1).optional(),maxInfraAttempts:E().int().min(0).optional(),autoMerge:He().optional()});const wx={ready:["developing","closed"],developing:["developing","reviewing","needs_human","closed"],reviewing:["reviewing","repairing","final_review","needs_human","closed"],repairing:["repairing","reviewing","needs_human","closed"],needs_human:["developing","reviewing","repairing","final_review","done","closed"],final_review:["final_review","done","repairing","needs_human","closed"],done:[],closed:[]};Object.keys(wx).filter(n=>wx[n].length===0);const cw=de(["enqueued","already_queued","not_queued"]);uw.extend({created:He(),queue:cw,priorPasses:E().int().min(0)});$({id:p(),issueId:p().nullable(),workerSessionId:p().nullable(),kind:p(),contentJson:p().nullable(),blobPath:p().nullable(),author:de(["human","agent","system"]),createdAt:p()});const ow=de(["authentication_configuration","provider_capacity_rate_limit","agent_cli_crash","tool_test_timeout","coordinator_crash","validation_failure","publish_git_failure","agent_deck_unavailable","host_sleep_liveness","unknown"]),dw=de(["task","infrastructure","unknown"]),fw=de(["high","medium","low"]),hw=de(["outcome_kind","session_error","spawn_log","workflow_event","recovery"]),mw=de(["exact","inferred"]),_d=$({code:ow,domain:dw,primary:He(),confidence:fw,evidenceSource:hw,occurredAt:p().nullable(),eventCursor:E().int().nullable(),rawReason:p(),sessionId:p().nullable(),logPath:p().nullable(),eventId:p().nullable(),eventType:p().nullable(),quality:mw}),pw=de(["commit","verification_receipt","branch_pushed"]),xw=de(["sampler","salvage","session_end"]),Xd=de(["worktree","commit","verification_receipt","publish_only"]);$({kind:pw,observedSha:p().nullable(),observedAt:p(),origin:xw.nullable(),inputSha:p().nullable(),samplingPrecisionMs:E().int().nullable(),branch:p().nullable()});$({kinds:ne(Xd),retryReason:p().nullable()});const yw=de(["done","closed","migrated"]);$({id:p().uuid(),issueId:p().uuid(),workflowVersion:p(),startedAt:p(),completedAt:p().nullable(),outcome:yw.nullable()});const vw=de(["issue.created","issue.reassigned","workflow.started","worker.started","worker.completed","worker.failed","worker.deferred","worktree.ready","deck.connected","brief.resolved","branch.pushed","checks.started","pull_request.opened","pull_request.updated","checks.completed","review.submitted","repair.started","guidance.added","task_snapshot.refreshed","human_action.requested","human_action.resolved","final_review.requested","issue.completed","issue.closed","queue.enqueued","queue.wait_reason_changed","queue.admitted","queue.removed","agent.started","agent.completed","host.suspended","checkpoint.observed","retry.reused","legacy.imported"]);$({id:p().uuid(),issueId:p().uuid(),workflowInstanceId:p().uuid().nullable(),workerSessionId:p().uuid().nullable(),type:vw,actorType:de(["human","developer","reviewer","system"]),actorRef:p().nullable(),stage:p(),round:E().int().nullable(),payloadJson:p().nullable(),artifactRef:p().nullable(),idempotencyKey:p().nullable(),causationEventId:p().uuid().nullable(),ts:p()});const gw=de(["product_scope_decision","policy_escalation","attempts_exhausted","final_review","deck_interaction_required","reflection_interaction_required","outbound_delivery_interaction_required"]),bw=de(["open","resolved"]);$({id:p().uuid(),issueId:p().uuid().nullable(),runId:p().uuid().nullable(),workflowInstanceId:p().uuid().nullable(),actionType:gw,reason:p(),question:p(),evidenceJson:p().nullable(),responseOptionsJson:p().nullable(),continuationPreviewJson:p().nullable(),requestId:p().nullable(),status:bw,resolutionJson:p().nullable(),resolvedBy:p().nullable(),requestedAt:p(),resolvedAt:p().nullable()});function Au(n){if(!n)return null;try{return JSON.parse(n)}catch{return null}}function ww(n){const l=Au(n.responseOptionsJson);return Array.isArray(l)?l.filter(s=>typeof(s==null?void 0:s.choice)=="string"&&typeof(s==null?void 0:s.label)=="string"):[]}function Kd(n){return Au(n.evidenceJson)??{}}function Eu(n){const s=Kd(n).pushDivergence;return!s||typeof s!="object"?null:s}function Sw(n){const s=Kd(n).worktreeBlocker;return!!s&&typeof s=="object"&&typeof s.fingerprint=="string"}function jw(n){return Kd(n).mergeFailure===!0}function My(n){const l=Au(n.continuationPreviewJson);return typeof(l==null?void 0:l.resumeRole)=="string"?l.resumeRole:null}const Nw=/worktree|unpushed|uncommitted|dirty|preserved|non-fast-forward|diverged|already used by|recovery:|force-with-lease/i,_w=/could not be pushed|non-fast-forward|rejected.*push|push.*rejected/i,Aw=/uncommitted|dirty worktree|has uncommitted changes/i;function Dy(n){const l=/\n?Recovery:\s*\n?/,s=n.match(l);if(!s||s.index===void 0)return{head:n.trim(),commands:[]};const u=n.slice(0,s.index).trim(),f=n.slice(s.index+s[0].length).split(`
61
+ `).map(m=>m.trim()).filter(m=>m.length>0);return{head:u,commands:f}}function Ew(n){const s=Dy(n).head.replace(/\s+/g," ").trim(),u=s.match(/^(.+?[.!?])(\s|$)/);return(u?u[1]:s).trim()}const kw=/(?:~|\/(?:[^/\s\\:"'*?<>|][^/\s\\:"'*?<>|]*))+(?:\/[^/\s\\:"'*?<>|]+)*/g;function Rw(n){const l=[],s=new Set,u=f=>{const m=f.trim().replace(/[.,;:!?)"'\]]+$/,"");m.length<2||s.has(m)||(s.add(m),l.push(m))};for(const f of[n.reason,n.question])for(const m of f.matchAll(kw)){const y=m[0];/^\/\d+(\.\d+)*$/.test(y)||!y.includes("/")&&!y.startsWith("~")||u(y)}const d=Eu(n);return typeof(d==null?void 0:d.worktreePath)=="string"&&d.worktreePath&&u(d.worktreePath),l}function Sx(n){return n.length>12?n.slice(0,12):n}function Cw(n){const l=[],s=Eu(n);if(s&&typeof s.localSha=="string"&&typeof s.remoteSha=="string"){const d=typeof s.branch=="string"?s.branch:"the branch",f=typeof s.ahead=="number"?` (+${s.ahead})`:"",m=typeof s.behind=="number"?` (+${s.behind})`:"";l.push(`Push: local ${s.localSha}${f} · origin/${d} ${s.remoteSha}${m}`),typeof s.observedRemoteSha=="string"&&s.observedRemoteSha!==s.remoteSha&&l.push(`Remote moved: origin/${d} is now at ${s.observedRemoteSha}`),typeof s.lastLeaseError=="string"&&s.lastLeaseError&&l.push(`Last lease attempt: ${s.lastLeaseError}`)}const u=My(n);return u&&l.push(`Continuation: resumes as ${u}`),l}function Tw(n){return n==="close"||n==="reject"||n==="abort"}function Jn(n){return n.length===0?null:n.some(l=>l.choice==="push_with_lease")?"push_with_lease":(n.find(l=>!Tw(l.choice))??n[0]).choice}function Ow(n){if(n.actionType!=="policy_escalation")return"other";if(jw(n))return"merge-failure";const l=Eu(n);if((l==null?void 0:l.relationship)==="diverged")return"diverged-push";if(l&&(l.relationship==="behind"||typeof l.localSha=="string"))return"unpushed";const s=`${n.reason}
62
+ ${n.question}`;return _w.test(s)?"unpushed":My(n)==="reviewer"?"reviewer-retry":Aw.test(s)?"dirty-worktree":Sw(n)||/already used by worktree/i.test(s)||/worktree/i.test(s)&&/Recovery:/.test(s)?"worktree-conflict":"ordinary-escalation"}const Mw="Resume safely";function Ly(n){const l=Ow(n),s=ww(n),{commands:u}=Dy(n.reason),d=Rw(n),f=Cw(n),m=(()=>{const v=Au(n.evidenceJson);return v==null?null:JSON.stringify(v,null,2)})(),y={question:n.question,reason:n.reason,commands:u,paths:d,factLines:f,evidencePretty:m};switch(l){case"diverged-push":{const v=Eu(n),g=v&&typeof v.branch=="string"&&typeof v.localSha=="string"&&typeof v.remoteSha=="string"?` (origin/${v.branch}: local ${Sx(v.localSha)} against remote ${Sx(v.remoteSha)})`:"";return{kind:l,title:"Publish these finished commits with a pinned lease?",context:`Your branch diverged from the remote — confirm the pinned commits${g} under Details, then choose Push with lease.`,safeResume:!1,displayOptions:s,primaryChoice:Jn(s),details:y}}case"unpushed":return{kind:l,title:"The push was rejected — how should we proceed?",context:"Your commits are saved; resuming continues development without discarding them.",safeResume:!1,displayOptions:s,primaryChoice:Jn(s),details:y};case"worktree-conflict":return{kind:l,title:"A saved worktree still holds this branch — how should we proceed?",context:"Your work is preserved; check the worktree path and recovery steps under Details before choosing.",safeResume:!1,displayOptions:s,primaryChoice:Jn(s),details:y};case"dirty-worktree":return{kind:l,title:"Uncommitted changes were preserved — how should we proceed?",context:"Nothing was discarded; review the saved changes under Details before choosing.",safeResume:!1,displayOptions:s,primaryChoice:Jn(s),details:y};case"merge-failure":return{kind:l,title:"The merge failed after approval — retry it?",context:"The work is already approved; retrying the merge publishes the same commits without a new developer round.",safeResume:!1,displayOptions:s,primaryChoice:Jn(s),details:y};case"reviewer-retry":return{kind:l,title:"The review attempt failed — retry it?",context:"Nothing is wrong with the code itself; retrying re-queues the reviewer at the same pinned commit.",safeResume:!0,displayOptions:s,primaryChoice:Jn(s),details:y};case"ordinary-escalation":{const v=Ew(n.reason),g=!Nw.test(`${n.reason}
63
+ ${n.question}`),b=g?s.map(_=>_.choice==="resume"&&_.label==="Resume development"?{..._,label:Mw}:_):s;return{kind:l,title:"Development is parked — resume or close?",context:v?`${v} Choose ${g?"Resume safely":"Resume"} to continue, or Close to stop.`:null,safeResume:g,displayOptions:b,primaryChoice:Jn(b),details:y}}case"other":default:return{kind:"other",title:n.question,context:null,safeResume:!1,displayOptions:s,primaryChoice:Jn(s),details:y}}}const Dw=de(["blocking","non_blocking"]),Lw=de(["open","resolved","recurring","superseded"]);$({id:p().uuid(),issueId:p().uuid(),fingerprint:p(),severity:Dw,title:p(),rationale:p(),evidenceRef:p().nullable(),file:p().nullable(),line:E().int().nullable(),status:Lw,firstRound:E().int().min(1),lastRound:E().int().min(1)});$({id:p().uuid(),issueId:p().uuid(),workerSessionId:p().uuid(),role:de(["developer","reviewer","legacy"]),runtime:p().nullable(),tokensIn:E().int().nullable(),tokensOut:E().int().nullable(),costUsd:E().nullable(),durationMs:E().int().nullable(),ts:p(),model:p().nullable().optional()});const Uw=$({available:Oa(!0)}),zw=$({available:Oa(!1),until:p(),reason:p()});Ny("available",[Uw,zw]);const Jd=de(["supported_protocol","observed_event","experimental_api","unavailable"]),ku=de(["unsupported","missing","expired","unparsable","stale"]),Bw=de(["five_hour","weekly"]),qw=$({windowKey:p().min(1),providerBucket:p().min(1),durationMinutes:E().int().positive().nullable(),displayLabel:p().min(1),usedValue:E().nullable(),usedUnit:p().nullable(),remainingPercent:E().min(0).max(100).nullable(),resetAt:p().nullable(),observedAt:p(),freshUntil:p().nullable(),expiresAt:p().nullable(),source:Jd,unavailableReason:ku.nullable(),criticalRole:Bw.nullable()}),Hw=$({runtime:Dt,windows:ne(qw),unavailableReason:ku.nullable()});$({runtimes:ne(Hw),generatedAt:p()});$({configured:He(),cycleStart:p().nullable(),cycleEnd:p().nullable(),spendValue:E().nullable(),spendUnit:p().nullable(),hardLimitValue:E().nullable(),hardLimitUnit:p().nullable(),memberCount:E().nullable(),memberLimitOverrideCount:E().nullable(),usagePeriodStart:p().nullable(),usagePeriodEnd:p().nullable(),usageSpendValue:E().nullable(),usageSpendUnit:p().nullable(),source:Jd,unavailableReason:ku.nullable(),observedAt:p().nullable(),generatedAt:p()});$({enabled:He(),configured:He(),cycleLabel:p().nullable(),cycleStart:p().nullable(),cycleEnd:p().nullable(),usageValue:E().nullable(),usageUnit:p().nullable(),remainingPercent:E().min(0).max(100).nullable(),source:Jd,unavailableReason:ku.nullable(),observedAt:p().nullable(),generatedAt:p()});function Uy(n,l=Date.now()){if(n.remainingPercent===null||n.source==="unavailable"||n.unavailableReason!==null)return!1;if(n.resetAt!==null){const s=Date.parse(n.resetAt);if(!Number.isFinite(s)||s<=l)return!1}if(n.freshUntil!==null){const s=Date.parse(n.freshUntil);if(!Number.isFinite(s)||s<=l)return!1}if(n.expiresAt!==null){const s=Date.parse(n.expiresAt);if(!Number.isFinite(s)||s<=l)return!1}if(n.observedAt){const s=Date.parse(n.observedAt);if(!Number.isFinite(s)||s>l+6e4)return!1}return!0}const $w=de(["queued","admitted","removed"]),Yw=$({id:p().uuid(),issueId:p().uuid(),position:E().int(),enqueuedAt:p(),state:$w,waitReason:p().nullable(),waitReasonAt:p().nullable()});Yw.extend({title:p().optional(),issueStatus:p().optional()});$({issueId:p().uuid()});const Vw=U1([Oa("top"),Oa("bottom"),$({before:p().uuid()}).strict(),$({after:p().uuid()}).strict()]);$({to:Vw});const Zw=2;$({maxActiveIssues:E().int().min(1).max(Zw)});$({active:E().int().min(0),waiting:E().int().min(0),limit:E().int().min(0),maxActiveIssues:E().int().min(1),ceiling:E().int().min(0),options:ne(E().int().min(1)),overCap:He()});const ta=de(["exact","inferred","unavailable"]),Ru=$({quality:ta,reasons:ne(p())}),zy=de(["queue_wait","coordinator_setup","agent_process","coordinator_validation_publish","coordinator_work"]),Es=$({phase:zy,startMs:E().int().nullable(),endMs:E().int().nullable(),durationMs:E().int().nullable(),quality:ta,reasons:ne(p()),sessionId:p().nullable(),startCursor:E().int().nullable(),endCursor:E().int().nullable()}),Gw=Ru.extend({phase:zy,durationMs:E().int().nullable(),rawCount:E().int(),known:E().int(),total:E().int()}),By=$({kind:de(["admission_dependency_wait","runtime_health_preflight","unexplained_silence","human_wait"]),startMs:E().int().nullable(),endMs:E().int().nullable(),durationMs:E().int().nullable(),quality:ta,reasons:ne(p()),category:p().nullable(),sessionId:p().nullable()}),Gt=Ru.extend({value:E().nullable(),known:E().int(),total:E().int()}),Va=Ru.extend({p50:E().nullable(),p95:E().nullable(),n:E().int()}),Qw=$({sessionId:p(),role:p(),runtime:p().nullable(),model:p().nullable(),status:p(),round:E().int(),publishOnly:He(),setup:Es,agentProcess:Es,validationPublish:Es,spawnEnvelopeMs:E().int().nullable(),spawnEnvelopeQuality:ta,spawnEnvelopeReasons:ne(p()),failureCauses:ne(_d),reuseKinds:ne(Xd).optional(),silence:ne(By),silenceQuality:ta,silenceReasons:ne(p()),tokensIn:E().int().nullable(),tokensOut:E().int().nullable(),costUsd:E().nullable(),usageDurationMs:E().int().nullable(),usageQuality:ta,usageReasons:ne(p())}),Xw=$({kind:p().nullable(),observedSha:p().nullable(),msSinceWorkflowStart:E().int().nullable(),quality:ta,reasons:ne(p())}),Kw=$({attempts:E().int(),retries:E().int(),cold:E().int(),reused:E().int(),unknown:E().int(),publishOnly:E().int(),reuseRate:E().nullable(),preservedKinds:ne(Xd).optional(),quality:ta,reasons:ne(p())}),Jw=$({rounds:E().int(),verdicts:E().int(),changeRequests:E().int(),changeRequestRate:E().nullable(),quality:ta,reasons:ne(p())});$({issueId:p(),elapsed:Es,rawIntervals:ne(Es),unionedDurations:ne(Gw),exclusiveTotalMs:E().int().nullable(),exclusiveTotalQuality:ta,exclusiveTotalReasons:ne(p()),nested:ne(By),attempts:ne(Qw),primaryFailure:_d.nullable(),primaryFailureQuality:ta,primaryFailureReasons:ne(p()),consequenceCauses:ne(_d),waste:$({failedAttempts:E().int(),publishOnlyAttempts:E().int(),runtimeMs:Gt,tokensIn:Gt,tokensOut:Gt,costUsd:Gt}),firstCheckpoint:Xw,retry:Kw,reviewer:Jw,humanWaitMs:E().int().nullable(),humanWaitQuality:ta,humanWaitReasons:ne(p()),interventionCount:E().int(),coverage:$({duration:Gt,tokens:Gt,cost:Gt})});$({from:p().nullable().default(null),to:p().nullable().default(null),role:p().nullable().default(null),runtime:p().nullable().default(null),model:p().nullable().default(null),status:p().nullable().default(null),repo:p().nullable().default(null),limit:E().int().min(1).max(200).default(50),offset:E().int().min(0).default(0)});const ed=Ru.extend({numerator:E().int(),denominator:E().int(),rate:E().nullable()}),td=$({key:p(),attempts:E().int(),successes:E().int(),successRate:E().nullable(),retries:E().int(),retryRate:E().nullable(),wallTimeMs:Va});$({window:$({from:p(),to:p(),defaultApplied:He()}),pagination:$({limit:E().int(),offset:E().int(),totalIssues:E().int()}),issueIds:ne(p()),phaseWallTime:Rs(p(),Va),attemptSuccess:ed,issueSuccess:ed,primaryFailures:ne($({code:p(),count:E().int(),rate:E().nullable()})),primaryFailureDenominator:E().int(),waste:$({failedAttempts:E().int(),runtimeMs:Gt,tokensIn:Gt,tokensOut:Gt,costUsd:Gt}),checkpointLatencyMs:Va,retryReuse:ed,reviewer:$({rounds:E().int(),verdicts:E().int(),changeRequests:E().int(),changeRequestRate:E().nullable(),quality:ta,reasons:ne(p())}),humanInterventions:$({totalActions:E().int(),issuesWithIntervention:E().int(),humanWaitMs:Va}),byRole:ne(td),byRuntime:ne(td),byModel:ne(td),coverage:$({duration:Gt,tokens:Gt,cost:Gt})});const Iw=100,qy=25,Hy=5,Fw=de(["developer","reviewer","legacy"]),Ww=de(["authentication_configuration","provider_capacity_rate_limit","agent_cli_crash","tool_test_timeout","coordinator_crash","validation_failure","publish_git_failure","agent_deck_unavailable","host_sleep_liveness","unknown"]),Pw=de(["task","infrastructure","unknown"]);$({from:p().optional(),to:p().optional(),repo:p().optional(),role:Fw.optional(),runtime:p().optional(),model:p().optional(),status:p().optional(),page:gx.number().int().min(1).default(1),limit:gx.number().int().min(1).max(Iw).default(qy)});const $y=de(["exact","inferred","unavailable"]),ya=$({sum:E().nullable(),known:E().int().min(0),total:E().int().min(0),quality:$y,reasons:ne(p())}),ad=$({key:p(),issues:E().int().min(0),attempts:E().int().min(0),issueSuccess:E().nullable(),issueSuccessDenominator:E().int().min(0),attemptSuccess:E().nullable(),attemptSuccessDenominator:E().int().min(0),sessionWallMs:Va,spawnEnvelopeMs:Va,retryRate:E().nullable(),tokensIn:ya,tokensOut:ya,costUsd:ya,durationMs:ya,failedDurationMs:ya,failedTokensIn:ya,failedTokensOut:ya,failedCostUsd:ya}),e2=$({code:Ww,domain:Pw,count:E().int().min(0),share:E().nullable(),issueIds:ne(p()),issueTotal:E().int().min(0)}),t2=$({id:p(),title:p(),status:p(),repo:p(),attempts:E().int().min(0),updatedAt:p()}),a2=$({window:$({from:p(),to:p()}),filters:$({repo:p().nullable(),role:p().nullable(),runtime:p().nullable(),model:p().nullable(),status:ne(p())}),summary:$({issues:E().int().min(0),closedIssues:E().int().min(0),issueSuccess:E().nullable(),attempts:E().int().min(0),terminalAttempts:E().int().min(0),attemptSuccess:E().nullable(),retryRate:E().nullable(),retryExtraAttempts:E().int().min(0),reuseRate:E().nullable(),reuseDenominator:E().int().min(0),humanWaitMs:E().int().min(0),humanWaitQuality:$y,interventions:E().int().min(0),avgReviewerRounds:E().nullable(),reviewedIssues:E().int().min(0),changeRequestRate:E().nullable(),sessionWallMs:Va,spawnEnvelopeMs:Va,checkpointMs:Va,phaseWallMs:ne($({phase:p(),stat:Va})),failedDurationMs:ya,failedTokensIn:ya,failedTokensOut:ya,failedCostUsd:ya}),byRole:ne(ad),byRuntime:ne(ad),byModel:ne(ad),failures:ne(e2),issues:ne(t2),pagination:$({page:E().int().min(1),limit:E().int().min(1),total:E().int().min(0),totalPages:E().int().min(0)}),meta:$({generatedAt:p(),partial:He(),partialReasons:ne(p())})});function Yy(n){const l=new URLSearchParams;for(const[s,u]of Object.entries(n)){if(u==null)continue;const d=String(u).trim();d&&(s==="page"&&d==="1"||s==="limit"&&d===String(qy)||l.set(s,d))}return l.sort(),l.toString()}function In(n,l){return n.sum===null||n.known===0?"Unavailable":n.known<n.total?`${l(n.sum)} (${n.known}/${n.total} known)`:l(n.sum)}function Vy(n){return n<Hy?`n=${n} (sparse)`:`n=${n}`}function Ad(n){return n<Hy}function jx(n,l){if(n.n===0||n.p50===null&&n.p95===null)return"Unavailable";const s=u=>u===null?"–":l(u);return`P50 ${s(n.p50)} · P95 ${s(n.p95)} (${Vy(n.n)})`}function js(n){return`$${n.toFixed(2)}`}function Ge(n){return n.toLocaleString("en-US")}function n2(n){if(!Number.isFinite(n))return Ge(n);const l=Math.abs(n);if(l<1e3)return Ge(n);const s=u=>u>=100?String(Math.round(u)):u.toFixed(1).replace(/\.0$/,"");return l<1e6?`${s(n/1e3)}K`:`${s(n/1e6)}M`}function Zt(n){if(n<1e3)return`${Math.round(n)} ms`;const l=n/1e3;if(l<60)return`${l.toFixed(1)} s`;const s=Math.floor(l/60),u=Math.round(l%60);return s<60?`${s}m ${u}s`:`${Math.floor(s/60)}h ${s%60}m`}function Cu(n){return n===null||!Number.isFinite(n)?"Unavailable":`${(n*100).toFixed(1)}%`}const l2=de(["queued","plan_pending","plan_approved","running","review","done","failed","cancelled"]),Zy=de(["code","communication","email","research","content","other"]),i2=de(["task_snapshot","draft_plan","approved_plan","plan_triage","plan_answers","acceptance_criteria","transcript","stream_trace","usage","agent_session","execution_result","diff","pr","email_draft","slack_draft","service_draft","document","research_brief","deliverable","feedback","playbook_patch","reflect_status","linear_sync","send_receipt","result_qa"]),Tu=de(["plan","execute","reflect","qa"]),Gy=de(["retry","approve"]);$({patchId:p(),playbookId:p().optional(),playbookTitle:p().optional(),rationale:p().optional(),status:Oa("proposed"),trigger:Gy,dashboardUrl:p().optional()});$({status:de(["pending","completed","failed","skipped"]),trigger:Gy,error:p().optional()});const s2=$({type:de(["system","human","context","thinking","assistant","tool","rate_limit","result"]),text:p(),toolName:p().optional()});$({phase:Tu,runtime:Dt,entries:ne(s2)});const r2=$({phase:Tu,runtime:Dt,totalCostUsd:E().optional(),inputTokens:E().optional(),outputTokens:E().optional(),cacheReadTokens:E().optional(),cacheWriteTokens:E().optional(),durationMs:E().optional(),model:p().optional(),numTurns:E().optional(),maxTurns:E().optional(),maxBudgetUsd:E().optional()}),u2=$({label:p(),usage:r2,maxTurns:E().optional(),maxBudgetUsd:E().optional()});$({lines:ne(u2),total:$({totalCostUsd:E(),inputTokens:E(),outputTokens:E(),durationMs:E(),numTurns:E()})});$({phase:Tu,runtime:Dt,sessionId:p()});$({phase:Tu,exitCode:E(),resultText:p().optional(),isError:He().optional(),blocker:$({summary:p().optional()}).optional()});$({path:p(),title:p(),markdown:p()});$({markdown:p(),sessionId:p().optional()});const c2=de(["manual","linear"]);$({id:p(),title:p(),description:p().optional(),url:p().optional()});const yn=$({id:p().uuid(),source:c2,externalId:p().nullable(),externalLabel:p().nullable(),taskCategory:Zy,title:p(),description:p().nullable(),repo:p().nullable(),artifactWorkspace:p().nullable(),agentId:p().uuid().nullable(),agentName:p().nullable(),deckId:p().nullable(),deckName:p().nullable(),playbookId:p().nullable(),runtime:Dt.nullable(),planModel:p().nullable(),executeModel:p().nullable(),status:l2,lineageId:p().uuid().nullable(),acceptanceCriteria:p().nullable(),approvalGatesJson:p().nullable(),budgetJson:p().nullable(),createdAt:p(),updatedAt:p()});$({id:p().uuid(),runId:p().uuid(),kind:i2,contentJson:p().nullable(),blobPath:p().nullable(),author:de(["human","agent","system"]),createdAt:p()});$({id:p().uuid(),runId:p().uuid(),type:p(),payloadJson:p().nullable(),ts:p()});$({title:p().min(1),description:p().optional(),taskCategory:Zy.default("other"),repo:p().optional(),artifactWorkspace:p().optional(),acceptanceCriteria:p().optional(),status:de(["queued","plan_pending","plan_approved"]).default("plan_pending"),agentId:p().uuid(),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),budget:ky.optional()});$({runtime:Dt,deckId:p().uuid().optional(),playbookId:p().optional(),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),budget:ky.optional()});$({planMarkdown:p(),approve:He().default(!1),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),planBudget:Da.nullable().optional(),executeBudget:Da.nullable().optional()});$({runtime:Dt.optional(),deckId:p().uuid().optional(),playbookId:p().optional(),executeModel:p().nullable().optional(),executeBudget:Da.nullable().optional()});$({feedback:p().min(1),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),executeBudget:Da.nullable().optional()});$({outboundBody:p().min(1).max(4e3).optional()});$({id:p(),identifier:p(),title:p(),description:p().optional(),url:p(),state:p().optional(),labels:ne(p()).optional(),teamId:p().optional(),repoResolution:Y1.optional()});$({stateFilter:ne(p()),teamId:p().nullable(),assigneeMe:He(),syncEnabled:He()});$({host:p(),port:E().int().min(1).max(65535),envOverride:He()});const o2=de(["UNAUTHORIZED","DECK_UNAVAILABLE"]);$({connected:He(),apiUrl:p(),mcpUrl:p(),deckCount:E().optional(),envOverride:He(),error:p().optional(),deckAccessError:o2.optional(),deckAccessErrorMessage:p().optional()});$({agentId:p().uuid().optional(),autoAgent:He().optional(),planModel:p().nullable().optional()}).refine(n=>n.agentId!==void 0||n.autoAgent===!0,{message:"Provide agentId or autoAgent: true"});$({planModel:p().nullable().optional(),planBudget:Da.nullable().optional(),feedback:p().optional(),editedMarkdown:p().optional()});const d2=$({id:p(),label:p()});$({runtime:Dt,models:ne(d2),source:de(["live","fallback"])});$({planReviewCount:E(),resultReviewCount:E(),maxConcurrent:E(),planningActiveRuns:ne(yn),planningQueuedRuns:ne(yn),runningRuns:ne(yn),waitingExecution:ne(yn),resultReviewRuns:ne(yn),recentDone:ne(yn),awaitingPlanReview:ne(yn),awaitingAnswerRuns:ne(yn),openQuestionCounts:Rs(p(),E()),pendingSendCounts:Rs(p(),E()),sentRunIds:ne(p()).optional(),autoApprovedRunIds:ne(p()),runs:ne(yn),agentDeckOnline:He(),agents:ne(Ty),agentIssueCount:E()});const Qy=new Map,nd=new Map;function Ed(n){return Qy.get(n)??null}function f2(n,l){l.models.length!==0&&Qy.set(n,l)}function h2(n,l){const s=Ed(n);if(s)return Promise.resolve(s);const u=nd.get(n);if(u)return u;const d=l().then(f=>(f2(n,f),f)).finally(()=>nd.delete(n));return nd.set(n,d),d}const Me="";async function et(n){const l=await n.text();try{const s=JSON.parse(l),u=s.error??s.message;if(typeof u=="string"&&u.trim())return u.replace(/^Error:\s*/i,"")}catch{}return l}async function m2(){const n=await fetch(`${Me}/api/intake/linear`);if(!n.ok)throw new Error(await n.text());return(await n.json()).candidates??[]}async function p2(n){const l=await fetch(`${Me}/api/intake/linear/lookup?q=${encodeURIComponent(n)}`),s=await l.json().catch(()=>({}));if(!l.ok)throw new Error(s.error??`Lookup failed (${l.status})`);if(!s.candidate)throw new Error("Linear issue not found");return s.candidate}async function x2(){const n=await fetch(`${Me}/api/settings/repository-mappings`);if(!n.ok)throw new Error(await et(n));return(await n.json()).mappings??[]}async function y2(n){const l=await fetch(`${Me}/api/settings/repository-mappings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({mappings:n})});if(!l.ok)throw new Error(await et(l));return(await l.json()).mappings??[]}async function v2(){const n=await fetch(`${Me}/api/agents`);if(!n.ok)throw new Error("Failed to fetch agents");return n.json()}async function g2(n){const l=await fetch(`${Me}/api/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw new Error(await l.text());return l.json()}async function b2(n,l){const s=await fetch(`${Me}/api/agents/${n}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!s.ok)throw new Error(await s.text());return s.json()}async function w2(n){const l=await fetch(`${Me}/api/agents/${n}`,{method:"DELETE"});if(!l.ok)throw new Error(await l.text())}async function S2(n,l){return h2(n,async()=>{const u=await fetch(`${Me}/api/runtimes/${n}/models`);if(!u.ok)throw new Error(await u.text());return u.json()})}async function Xy(){const n=await fetch(`${Me}/api/runtime-capacity`);if(!n.ok)throw new Error(await n.text());return n.json()}async function Ky(){const n=await fetch(`${Me}/api/agent-deck/status`);if(!n.ok)throw new Error(await n.text());return n.json()}async function j2(){try{const n=await fetch(`${Me}/api/agent-deck/decks`),l=await n.json().catch(()=>null);return n.ok?{ok:!0,decks:(l==null?void 0:l.data)??[]}:{ok:!1,code:l==null?void 0:l.code,message:(l==null?void 0:l.error)??`Agent Deck error (${n.status})`}}catch(n){return{ok:!1,message:n instanceof Error?n.message:String(n)}}}async function Nx(n){const l=new URLSearchParams,s=n.map(f=>f.trim()).filter(Boolean);s.length>0&&l.set("status",s.join(",")),l.set("page","1"),l.set("limit","1"),l.sort();const u=await fetch(`${Me}/api/issues?${l.toString()}`);if(!u.ok)throw new Error(await et(u));const d=await u.json();return typeof d.total=="number"?d.total:0}async function N2(n){var u,d,f;const l=new URLSearchParams;(u=n.q)!=null&&u.trim()&&l.set("q",n.q.trim()),(d=n.status)!=null&&d.trim()&&l.set("status",n.status.trim()),(f=n.repo)!=null&&f.trim()&&l.set("repo",n.repo.trim()),n.needsAttention&&l.set("needsAttention","1"),l.set("page",String(n.page&&n.page>1?Math.floor(n.page):1)),l.sort();const s=await fetch(`${Me}/api/issues?${l.toString()}`);if(!s.ok)throw new Error(await et(s));return s.json()}async function _2(){const n=await fetch(`${Me}/api/issues/recent-repos`);if(!n.ok)throw new Error(await et(n));return(await n.json()).repos??[]}async function Jy(n){const l=await fetch(`${Me}/api/issues/${n}`);if(!l.ok)throw new Error(await et(l));return l.json()}async function A2(n){const l=await fetch(`${Me}/api/issues/${n}/execution-analysis`);if(!l.ok)throw new Error(await et(l));return l.json()}async function E2(n){const l=await fetch(`${Me}/api/issues/${n}/evidence`);if(!l.ok)throw new Error(await et(l));return l.json()}async function k2(n,l){const s=await fetch(`${Me}/api/issues/${n}/artifacts/${l}/trace`);if(!s.ok)throw new Error(await et(s));return s.json()}async function R2(n){const l=await fetch(`${Me}/api/issues`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw new Error(await et(l));return l.json()}async function kd(n,l){const s=await fetch(`${Me}/api/issues/${n}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(l)});if(!s.ok)throw new Error(await et(s));return s.json()}async function Iy(n){const l=await fetch(`${Me}/api/issues/${n}/start`,{method:"POST"});if(!l.ok)throw new Error(await et(l));return l.json()}async function Fy(n){const l=await fetch(`${Me}/api/issues/${n}/execute`,{method:"POST"});if(!l.ok)throw new Error(await et(l));return l.json()}async function C2(n,l="web"){const s=await fetch(`${Me}/api/issues/${n}/abort`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({resolvedBy:l})});if(!s.ok)throw new Error(await et(s));return s.json()}async function T2(n,l="web"){const s=await fetch(`${Me}/api/issues/${n}/close`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({closedBy:l})});if(!s.ok)throw new Error(await et(s));return s.json()}async function O2(n){const l=await fetch(`${Me}/api/queue`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({issueId:n})});if(!l.ok)throw new Error(await et(l));return l.json()}async function Wy(n){const l=await fetch(`${Me}/api/queue/${n}`,{method:"DELETE"});if(!l.ok)throw new Error(await et(l));return l.json()}async function Ir(n,l){const s=await fetch(`${Me}/api/queue/${n}/move`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({to:l})});if(!s.ok)throw new Error(await et(s));return s.json()}async function ld(){const n=await fetch(`${Me}/api/queue`);if(!n.ok)throw new Error(await et(n));return n.json()}async function M2(){const n=await fetch(`${Me}/api/queue/status`);if(!n.ok)throw new Error(await et(n));return n.json()}async function D2(n){const l=await fetch(`${Me}/api/queue/settings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({maxActiveIssues:n})});if(!l.ok)throw new Error(await et(l));return l.json()}async function L2(n,l){const s=await fetch(`${Me}/api/issues/${n}/guidance`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({markdown:l})});if(!s.ok)throw new Error(await et(s));return s.json()}async function U2(n){const l=Yy(n),s=await fetch(`${Me}/api/execution-report${l?`?${l}`:""}`);if(!s.ok)throw new Error(await et(s));const u=await s.json(),d=a2.safeParse(u);if(!d.success)throw new Error(`Unexpected report shape: ${d.error.message}`);return d.data}async function z2(){const n=await fetch(`${Me}/api/human-actions`);if(!n.ok)throw new Error(await et(n));return n.json()}async function Py(n,l,s,u){const d=await fetch(`${Me}/api/human-actions/${n}/resolve`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(u!=null&&u.trim()?{resolvedBy:l,choice:s,note:u.trim()}:{resolvedBy:l,choice:s})});if(!d.ok)throw new Error(await et(d));return d.json()}function B2(n){return n||Cy}function q2({runtime:n,label:l,value:s,onChange:u,defaultModelId:d,disabled:f,compact:m}){const y=Ed(n),[v,g]=w.useState((y==null?void 0:y.models)??[]),[b,_]=w.useState((y==null?void 0:y.source)??"fallback"),[U,K]=w.useState(!y);w.useEffect(()=>{const L=Ed(n);if(L){g(L.models),_(L.source),K(!1);return}K(!0),S2(n).then(B=>{g(B.models),_(B.source)}).catch(()=>g([])).finally(()=>K(!1))},[n]);const C=w.useMemo(()=>{var L,B;if(n==="cursor_local"){const Q=B2(d);return((L=v.find(W=>W.id===Q))==null?void 0:L.label)??"Auto (subscription pool)"}return d?((B=v.find(Q=>Q.id===d))==null?void 0:B.label)??d:"runtime default"},[n,d,v]),Y=n==="cursor_local"?U?"Loading models…":`Agent default (${C})`:U?"Loading models…":`Default (${C})`;return c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:l}),c.jsxs("select",{className:"field text-sm",disabled:f||U,value:s,onChange:L=>u(L.target.value),children:[c.jsx("option",{value:"",children:Y}),v.map(L=>c.jsx("option",{value:L.id,children:L.label},L.id))]}),n==="cursor_local"&&!U&&!m&&c.jsx("p",{className:"text-xs text-white/40",children:"Auto and Composer use your Cursor subscription pool. Other models draw API credits."}),b==="fallback"&&v.length>0&&!U&&n==="cursor_local"&&!m&&c.jsx("p",{className:"text-xs text-white/40",children:"Run cursor-agent login to load the full model list."})]})}function _x(n){const l={};return n.allowWorktreeWrite||(l.worktreeWrite=!1),Object.keys(l).length?l:null}function H2(n){let l={};try{n!=null&&n.trim()&&(l=JSON.parse(n))}catch{l={}}return{allowWorktreeWrite:l.worktreeWrite!==!1}}function Ax({value:n,onChange:l,agentDeckOnline:s,disabled:u}){const[d,f]=w.useState([]),[m,y]=w.useState(null);w.useEffect(()=>{j2().then(b=>{b.ok?(f(b.decks),y(null)):(f([]),y(b.message))})},[]);const v=b=>l({...n,...b}),g=n.runtime==="codex_local"||n.runtime==="claude_code";return c.jsxs("div",{className:"space-y-2",children:[c.jsx("div",{className:"font-ui-display text-base uppercase tracking-wide text-[#92E4DD]",children:"Agent"}),c.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Runtime (required)"}),c.jsxs("select",{className:"field",disabled:u,value:n.runtime,onChange:b=>{const _=b.target.value;v({runtime:_,defaultModel:_==="cursor_local"?Cy:_==="muse_code"?J1:"",defaultEffort:_==="cursor_local"||_==="muse_code"?"":n.defaultEffort})},children:[c.jsx("option",{value:"claude_code",children:"Claude Code (claude -p)"}),c.jsx("option",{value:"cursor_local",children:"Cursor local (cursor-agent -p)"}),c.jsx("option",{value:"codex_local",children:"Codex local (codex exec)"}),c.jsx("option",{value:"muse_code",children:"Muse Code (muse exec) — developer only, trial"})]}),c.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Agent Deck (required)"}),c.jsxs("select",{className:"field",disabled:u||!s||!!m,value:n.deckId,onChange:b=>v({deckId:b.target.value}),required:!0,children:[c.jsx("option",{value:"",disabled:!!n.deckId,children:s?m?"Agent Deck error — see below":"Select a deck…":"Agent Deck offline"}),d.map(b=>c.jsxs("option",{value:b.id,children:["◆ ",b.name]},b.id))]}),s&&m&&c.jsx("p",{className:"text-xs text-amber-300/90",children:m}),c.jsxs("div",{className:"pt-2 mt-2 border-t border-white/10 space-y-2",children:[c.jsx("div",{className:"font-ui-display text-xs uppercase tracking-wide text-white/40",children:"Issue-centric session defaults"}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Purpose (optional)"}),c.jsx("input",{className:"field text-sm",placeholder:"e.g. backend refactors on the payments service",disabled:u,value:n.purpose,onChange:b=>v({purpose:b.target.value})})]}),c.jsxs("div",{className:`grid gap-2 ${g?"grid-cols-2":"grid-cols-1"}`,children:[c.jsx(q2,{runtime:n.runtime,label:"Default model",value:n.defaultModel,onChange:b=>v({defaultModel:b}),disabled:u,compact:!0}),g&&c.jsxs("label",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Reasoning effort"}),c.jsxs("select",{className:"field text-sm",disabled:u,value:n.defaultEffort,onChange:b=>v({defaultEffort:b.target.value}),children:[c.jsx("option",{value:"",children:"Runtime default"}),c.jsx("option",{value:"low",children:"Low"}),c.jsx("option",{value:"medium",children:"Medium"}),c.jsx("option",{value:"high",children:"High"})]})]})]}),n.runtime==="muse_code"&&c.jsx("p",{className:"text-xs text-white/40",children:"Developer role only — keep a Claude or Codex agent as the reviewer. The developer session receives the selected deck above. Contributor-tier content may be used for product improvement; use it on non-sensitive tickets."}),n.runtime==="cursor_local"&&c.jsx("p",{className:"text-xs text-white/40",children:"Cursor has no separate effort flag — put effort in the model id if needed (e.g. parameterized `[effort=high]`)."}),c.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[c.jsxs("label",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Max turns"}),c.jsx("input",{className:"field text-sm",type:"number",min:1,placeholder:"none",disabled:u,value:n.defaultBudget.maxTurns,onChange:b=>v({defaultBudget:{...n.defaultBudget,maxTurns:b.target.value}})})]}),c.jsxs("label",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Max $ / session"}),c.jsx("input",{className:"field text-sm",type:"number",min:0,step:"0.1",placeholder:"none",disabled:u,value:n.defaultBudget.maxBudgetUsd,onChange:b=>v({defaultBudget:{...n.defaultBudget,maxBudgetUsd:b.target.value}})})]})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Developer capabilities"}),c.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-sm text-white/70",children:c.jsxs("label",{className:"flex items-center gap-1.5",children:[c.jsx("input",{type:"checkbox",disabled:u,checked:n.allowWorktreeWrite,onChange:b=>v({allowWorktreeWrite:b.target.checked})}),"Write files"]})}),c.jsx("p",{className:"text-xs text-white/40",children:"Unchecking runs the developer read-only (no Write/Edit/Bash grant), same as a reviewer. There is no separate push / open-PR toggle — a session with file-write access can already push and open PRs, and no mechanism here can restrict just that without also removing write access."})]})]})]})}function wa(n){return n==="claude_code"?"Claude":n==="cursor_local"?"Cursor":n==="codex_local"?"Codex":n==="muse_code"?"Muse Code":"No agent"}function $2(){return{maxTurns:"",maxBudgetUsd:""}}function Ex(n){const l=n.maxTurns.trim()?Number(n.maxTurns):null,s=n.maxBudgetUsd.trim()?Number(n.maxBudgetUsd):null;return l==null&&s==null||l!=null&&(!Number.isFinite(l)||l<=0)||s!=null&&(!Number.isFinite(s)||s<=0)?null:{maxTurns:l,maxBudgetUsd:s}}function Y2(n){const l=lu(n);return{maxTurns:(l==null?void 0:l.maxTurns)!=null?String(l.maxTurns):"",maxBudgetUsd:(l==null?void 0:l.maxBudgetUsd)!=null?String(l.maxBudgetUsd):""}}function ws({children:n,className:l="",title:s}){return c.jsx("span",{title:s,className:`inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium uppercase tracking-wide border ${l}`,children:n})}function Fr(n,l){const s=n.find(d=>d.runtime===l);if(!s)return{ok:!1,detail:"no agent"};const u=s.issues.find(d=>d.code==="cli_missing"||d.code==="runtime_auth"||d.code==="runtime_unknown"||d.code==="runtime_capability"||d.code==="cursor_keychain");return u?{ok:!1,detail:u.message}:{ok:!0,detail:"CLI ready"}}function V2(n){const l=n.flatMap(s=>s.issues).find(s=>s.code==="github_cli_missing"||s.code==="github_auth"||s.code==="github_unreachable");return l?{ok:!1,detail:l.message}:n.length===0?{ok:!1,detail:"no agent"}:{ok:!0,detail:"gh ready"}}function gi({ok:n}){return c.jsx("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${n?"bg-emerald-400":"bg-amber-400"}`,"aria-hidden":!0})}function Z2({agents:n,agentDeckOnline:l}){const[s,u]=w.useState(null);w.useEffect(()=>{Ky().then(b=>u(b.mcpUrl)).catch(()=>u(null))},[l]);const d=Fr(n,"claude_code"),f=Fr(n,"cursor_local"),m=Fr(n,"codex_local"),y=n.some(b=>b.runtime==="muse_code")?Fr(n,"muse_code"):null,v=V2(n),g=n.flatMap(b=>b.issues).find(b=>b.code==="mcp_not_registered");return c.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-x-4 gap-y-1.5 text-xs text-white/45",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Connections"}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:d.detail,children:[c.jsx(gi,{ok:d.ok}),c.jsx("span",{className:d.ok?"text-white/55":"text-amber-200/90",children:"Claude"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:f.detail,children:[c.jsx(gi,{ok:f.ok}),c.jsx("span",{className:f.ok?"text-white/55":"text-amber-200/90",children:"Cursor"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:m.detail,children:[c.jsx(gi,{ok:m.ok}),c.jsx("span",{className:m.ok?"text-white/55":"text-amber-200/90",children:"Codex"})]}),y&&c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:y.detail,children:[c.jsx(gi,{ok:y.ok}),c.jsx("span",{className:y.ok?"text-white/55":"text-amber-200/90",children:"Muse Code"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:v.detail,children:[c.jsx(gi,{ok:v.ok}),c.jsx("span",{className:v.ok?"text-white/55":"text-amber-200/90",children:"GitHub"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:(g==null?void 0:g.message)??(s?`MCP ${s}`:"Agent Deck optional"),children:[c.jsx(gi,{ok:l&&!g}),c.jsxs("span",{className:l&&!g?"text-[#92E4DD]/80":g?"text-amber-200/90":"text-white/35",children:["Agent Deck MCP",l?g?" (setup needed)":"":" (optional)"]})]})]})}function ev(n){return n<10?"critical":n<30?"warning":"normal"}const Id={unsupported:"not reported by provider",missing:"no data yet",expired:"expired",unparsable:"provider data unparsable",stale:"stale"},G2={critical:"font-bold text-red-400",warning:"text-yellow-400",normal:"font-medium"},Q2=new Set(["claude_code","codex_local","muse_code"]),X2="billing_cycle",K2="1M",J2="5H",I2="1W";function kx(n,l,s,u){if(n!==null)return tv(n,l,null);const d=s??"missing";return{key:u,label:l,kind:"unknown",reason:d,title:`${l}: N/A (${Id[d]})`}}function tv(n,l,s){if(n.unavailableReason===null&&n.remainingPercent!==null){const d=n.remainingPercent,f=n.resetAt?`, resets ${new Date(n.resetAt).toLocaleString()}`:"",m=s?`, ${s}`:"";return{key:n.windowKey,label:l,kind:"known",remaining:Math.round(d),rawRemaining:d,title:`${l}: ${Math.round(d)}% remaining${m}${f}`}}const u=n.unavailableReason??"missing";return{key:n.windowKey,label:l,kind:"unknown",reason:u,title:`${l}: N/A (${Id[u]})`}}function F2(n){if(n.runtime==="cursor_local"){const l=n.windows.find(s=>s.windowKey===X2)??null;return l===null?[]:[tv(l,K2,"current billing cycle")]}if(Q2.has(n.runtime)){const l=n.windows.find(u=>u.criticalRole==="five_hour")??null,s=n.windows.find(u=>u.criticalRole==="weekly")??null;return[kx(l,J2,n.unavailableReason,"missing-5H"),kx(s,I2,n.unavailableReason,"missing-1W")]}return[]}function W2({row:n}){const l=n.kind==="known";return c.jsxs("span",{"data-testid":`capacity-window-${n.key}`,"data-reason":n.kind==="unknown"?n.reason:void 0,title:n.title,className:`inline-flex items-center gap-1 rounded border px-1.5 py-0.5 whitespace-nowrap ${l?"border-white/15 bg-white/5 text-white/70":"border-white/10 bg-transparent text-white/35"}`,children:[c.jsx("span",{className:"text-white/40",children:n.label}),n.kind==="known"?(()=>{const s=ev(n.rawRemaining);return c.jsxs("span",{"data-severity":s,className:G2[s],children:[n.remaining,"%"]})})():c.jsx("span",{children:"N/A"})]})}function P2({data:n}){return n.runtimes.length===0?null:c.jsxs("div",{"data-testid":"runtime-capacity-strip",className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Runtime capacity"}),n.runtimes.map(l=>{const s=F2(l);return c.jsxs("span",{"data-testid":`capacity-entry-${l.runtime}`,className:"inline-flex min-w-0 flex-wrap items-center gap-1.5",children:[c.jsx("span",{className:"shrink-0 whitespace-nowrap font-medium text-white/55",children:wa(l.runtime)}),s.length===0?c.jsx("span",{"data-testid":`capacity-entry-${l.runtime}-na`,"data-reason":l.unavailableReason??"missing",title:`N/A (${Id[l.unavailableReason??"missing"]})`,className:"whitespace-nowrap text-white/35",children:"N/A"}):s.map(u=>c.jsx(W2,{row:u},u.key))]},l.runtime)})]})}function eS({refreshTick:n}){const[l,s]=w.useState(null);return w.useEffect(()=>{let u=!1;return Xy().then(d=>{u||s(d)}).catch(()=>{u||s(null)}),()=>{u=!0}},[n]),l?c.jsx(P2,{data:l}):null}const tS="data:image/svg+xml,%3csvg%20viewBox='0%200%20248%20248'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20aria-hidden='true'%3e%3cpath%20d='M52.4285%20162.873L98.7844%20136.879L99.5485%20134.602L98.7844%20133.334H96.4921L88.7237%20132.862L62.2346%20132.153L39.3113%20131.207L17.0249%20130.026L11.4214%20128.844L6.2%20121.873L6.7094%20118.447L11.4214%20115.257L18.171%20115.847L33.0711%20116.911L55.485%20118.447L71.6586%20119.392L95.728%20121.873H99.5485L100.058%20120.337L98.7844%20119.392L97.7656%20118.447L74.5877%20102.732L49.4995%2086.1905L36.3823%2076.62L29.3779%2071.7757L25.8121%2067.2858L24.2839%2057.3608L30.6515%2050.2716L39.3113%2050.8623L41.4763%2051.4531L50.2636%2058.1879L68.9842%2072.7209L93.4357%2090.6804L97.0015%2093.6343L98.4374%2092.6652L98.6571%2091.9801L97.0015%2089.2625L83.757%2065.2772L69.621%2040.8192L63.2534%2030.6579L61.5978%2024.632C60.9565%2022.1032%2060.579%2020.0111%2060.579%2017.4246L67.8381%207.49965L71.9133%206.19995L81.7193%207.49965L85.7946%2011.0443L91.9074%2024.9865L101.714%2046.8451L116.996%2076.62L121.453%2085.4816L123.873%2093.6343L124.764%2096.1155H126.292V94.6976L127.566%2077.9197L129.858%2057.3608L132.15%2030.8942L132.915%2023.4505L136.608%2014.4708L143.994%209.62643L149.725%2012.344L154.437%2019.0788L153.8%2023.4505L150.998%2041.6463L145.522%2070.1215L141.957%2089.2625H143.994L146.414%2086.7813L156.093%2074.0206L172.266%2053.698L179.398%2045.6635L187.803%2036.802L193.152%2032.5484H203.34L210.726%2043.6549L207.415%2055.1159L196.972%2068.3492L188.312%2079.5739L175.896%2096.2095L168.191%20109.585L168.882%20110.689L170.738%20110.53L198.755%20104.504L213.91%20101.787L231.994%2098.7149L240.144%20102.496L241.036%20106.395L237.852%20114.311L218.495%20119.037L195.826%20123.645L162.07%20131.592L161.696%20131.893L162.137%20132.547L177.36%20133.925L183.855%20134.279H199.774L229.447%20136.524L237.215%20141.605L241.8%20147.867L241.036%20152.711L229.065%20158.737L213.019%20154.956L175.45%20145.977L162.587%20142.787H160.805V143.85L171.502%20154.366L191.242%20172.089L215.82%20195.011L217.094%20200.682L213.91%20205.172L210.599%20204.699L188.949%20188.394L180.544%20181.069L161.696%20165.118H160.422V166.772L164.752%20173.152L187.803%20207.771L188.949%20218.405L187.294%20221.832L181.308%20223.959L174.813%20222.777L161.187%20203.754L147.305%20182.486L136.098%20163.345L134.745%20164.2L128.075%20235.42L125.019%20239.082L117.887%20241.8L111.902%20237.31L108.718%20229.984L111.902%20215.452L115.722%20196.547L118.779%20181.541L121.58%20162.873L123.291%20156.636L123.14%20156.219L121.773%20156.449L107.699%20175.752L86.304%20204.699L69.3663%20222.777L65.291%20224.431L58.2867%20220.768L58.9235%20214.27L62.8713%20208.48L86.304%20178.705L100.44%20160.155L109.551%20149.507L109.462%20147.967L108.959%20147.924L46.6977%20188.512L35.6182%20189.93L30.7788%20185.44L31.4156%20178.115L33.7079%20175.752L52.4285%20162.873Z'%20fill='%23D97757'/%3e%3c/svg%3e",aS="/assets/codex-YZSpL-SB.png",nS="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20aria-hidden='true'%3e%3cpath%20fill='%23EDEDED'%20d='M11.503.131%201.891%205.678a.84.84%200%200%200-.42.726v11.188c0%20.3.162.575.42.724l9.609%205.55a1%201%200%200%200%20.998%200l9.61-5.55a.84.84%200%200%200%20.42-.724V6.404a.84.84%200%200%200-.42-.726L12.497.131a1.01%201.01%200%200%200-.996%200M2.657%206.338h18.55c.263%200%20.43.287.297.515L12.23%2022.918c-.062.107-.229.064-.229-.06V12.335a.59.59%200%200%200-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23'/%3e%3c/svg%3e",lS="/assets/muse-CtdcC6ve.svg";function Ou({src:n,className:l}){return c.jsx("span",{className:`inline-flex items-center justify-center rounded-lg bg-white/[0.04] ${l??"h-8 w-8"}`,children:c.jsx("img",{src:n,alt:"",className:"h-[70%] w-[70%] object-contain",draggable:!1})})}function iS({className:n="h-8 w-8"}){return c.jsx(Ou,{src:tS,className:n})}function sS({className:n="h-8 w-8"}){return c.jsx(Ou,{src:nS,className:n})}function rS({className:n="h-8 w-8"}){return c.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,"aria-hidden":!0,children:[c.jsx("rect",{width:"32",height:"32",rx:"8",fill:"white",fillOpacity:"0.06"}),c.jsx("circle",{cx:"16",cy:"13",r:"4.5",stroke:"#92E4DD",strokeWidth:"1.75"}),c.jsx("path",{d:"M8.5 24.5c1.2-3.5 3.8-5.5 7.5-5.5s6.3 2 7.5 5.5",stroke:"#92E4DD",strokeWidth:"1.75",strokeLinecap:"round"})]})}function uS({className:n="h-8 w-8"}){return c.jsx(Ou,{src:aS,className:n})}function cS({className:n="h-8 w-8"}){return c.jsx(Ou,{src:lS,className:n})}function av({runtime:n,className:l="h-8 w-8 shrink-0"}){return n==="claude_code"?c.jsx(iS,{className:l}):n==="cursor_local"?c.jsx(sS,{className:l}):n==="codex_local"?c.jsx(uS,{className:l}):n==="muse_code"?c.jsx(cS,{className:l}):c.jsx(rS,{className:l})}const Wr=()=>({runtime:"claude_code",deckId:"",purpose:"",defaultModel:"",defaultEffort:"",defaultBudget:$2(),allowWorktreeWrite:!0});function oS({agents:n,agentDeckOnline:l,onRefresh:s}){const[u,d]=w.useState(!1),[f,m]=w.useState(""),[y,v]=w.useState(Wr()),[g,b]=w.useState(!1),[_,U]=w.useState(null),[K,C]=w.useState(""),[Y,L]=w.useState(Wr()),B=async I=>{if(I.preventDefault(),!(!f.trim()||!y.deckId)){b(!0);try{const be={name:f.trim(),runtime:y.runtime,deckId:y.deckId,defaultModel:y.defaultModel.trim()||null,defaultEffort:y.defaultEffort||null,defaultBudget:Ex(y.defaultBudget),purpose:y.purpose.trim()||null,permissionPolicy:_x(y)};await g2(be),m(""),v(Wr()),d(!1),s()}catch(be){alert(String(be))}finally{b(!1)}}},Q=I=>{U(I.id),C(I.name),L({runtime:I.runtime,deckId:I.deckId??"",purpose:I.purpose??"",defaultModel:bx(I)??"",defaultEffort:I.defaultEffort??"",defaultBudget:Y2(W1(I)),...H2(I.permissionPolicyJson)})},W=()=>{U(null),L(Wr())},oe=async I=>{if(!(!K.trim()||!Y.deckId)){b(!0);try{const be={name:K.trim(),runtime:Y.runtime,deckId:Y.deckId,defaultModel:Y.defaultModel.trim()||null,defaultEffort:Y.defaultEffort||null,defaultBudget:Ex(Y.defaultBudget),purpose:Y.purpose.trim()||null,permissionPolicy:_x(Y)};await b2(I.id,be),W(),s()}catch(be){alert(String(be))}finally{b(!1)}}},J=async I=>{if(confirm(`Delete agent "${I.name}"?`)){b(!0);try{await w2(I.id),s()}catch(be){alert(String(be))}finally{b(!1)}}},ke=n.filter(I=>!I.healthy).length;return c.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4 max-w-6xl mx-auto w-full",children:[c.jsxs("div",{className:"mb-6 flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h1",{className:"heading-page",children:"Agents"}),c.jsx("p",{className:"text-sm text-white/50 mt-1",children:"Saved execution profiles — pick one when creating an issue instead of configuring each task"}),c.jsxs("p",{className:"text-sm text-white/45 mt-2",children:[n.length," agent",n.length===1?"":"s",ke>0&&c.jsxs("span",{className:"text-red-400 ml-2",children:["· ",ke," need",ke===1?"s":""," attention"]})]})]}),c.jsx(Z2,{agents:n,agentDeckOnline:l})]}),c.jsx("div",{className:"mb-4 overflow-x-auto space-y-2",children:c.jsx(eS,{})}),c.jsx("div",{className:"space-y-3 mb-6",children:n.map(I=>{const be=bx(I);return c.jsxs("div",{className:"panel flex flex-col sm:flex-row sm:items-start gap-3 justify-between",children:[c.jsxs("div",{className:"flex gap-3 min-w-0 flex-1",children:[c.jsx(av,{runtime:I.runtime}),c.jsxs("div",{className:"space-y-2 min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsx("span",{className:"text-lg font-semibold text-[#E8F6F4]",children:I.name}),!I.healthy&&c.jsx(ws,{className:"bg-red-500/15 text-red-300 border-red-400/30 normal-case",children:"Needs fix"})]}),c.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[c.jsx(ws,{className:"bg-white/5 text-white/55 border-white/15 normal-case",children:wa(I.runtime)}),I.deckName?c.jsxs(ws,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",I.deckName]}):c.jsx(ws,{className:"bg-white/5 text-white/40 border-white/10 normal-case",children:"No deck"}),be&&c.jsx(ws,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:be,children:be})]}),_===I.id&&c.jsxs("div",{className:"space-y-3 pt-2 border-t border-white/10",children:[c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),c.jsx("input",{className:"field text-sm",value:K,onChange:$e=>C($e.target.value)})]}),c.jsx(Ax,{value:Y,onChange:L,agentDeckOnline:l}),c.jsxs("div",{className:"flex gap-2 pt-1",children:[c.jsx("button",{type:"button",disabled:g||!K.trim()||!Y.deckId,onClick:()=>oe(I),className:"btn-gold text-sm px-3 py-1.5",children:"Save"}),c.jsx("button",{type:"button",onClick:W,className:"btn-ghost text-sm px-3 py-1.5",children:"Cancel"})]})]}),I.issues.length>0&&c.jsx("ul",{className:"text-sm text-red-300/90 space-y-1",children:I.issues.map(($e,xt)=>c.jsxs("li",{children:["· ",$e.message]},xt))})]})]}),c.jsxs("div",{className:"flex gap-2 shrink-0",children:[_!==I.id&&c.jsx("button",{type:"button",disabled:g,onClick:()=>Q(I),className:"btn-ghost text-sm px-3 py-1.5",children:"Edit"}),c.jsx("button",{type:"button",disabled:g,onClick:()=>J(I),className:"btn-ghost text-sm px-3 py-1.5",children:"Delete"})]})]},I.id)})}),u?c.jsxs("form",{onSubmit:B,className:"panel space-y-3",children:[c.jsx("h2",{className:"heading-panel",children:"New Agent"}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),c.jsx("input",{className:"field",placeholder:"e.g. Claude · Work",value:f,onChange:I=>m(I.target.value)})]}),c.jsx(Ax,{value:y,onChange:v,agentDeckOnline:l}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"submit",disabled:g||!f.trim()||!y.deckId,className:"btn-gold px-4 py-2",children:g?"Saving…":"Create agent"}),c.jsx("button",{type:"button",onClick:()=>d(!1),className:"btn-ghost px-4 py-2",children:"Cancel"})]})]}):c.jsx("button",{type:"button",onClick:()=>d(!0),className:"btn-gold px-4 py-2",children:"Add agent"})]})}function dS(n){try{return Gd(n).identity}catch{return null}}function fS(n,l){return n!=="linear"||!l?null:l.repoResolution??Ey(l.labels)}function hS(n,l){if(!l)return n;const s=l.repoResolution??Ey(l.labels);return s.status==="resolved"&&s.repository?s.repository:n}function mS(n,l){var u;const s=fS(n,l);if(!s)return null;if(s.status==="conflict")return`Conflicting repo: labels (${(s.labels??[]).join(", ")}) — kept the current repository. Fix the labels in Linear or type a repository below.`;if(s.status==="invalid"){const d=((u=s.labels)==null?void 0:u[0])??"repo:",f=s.error?` — ${s.error}`:"";return`Invalid repository label ${d}${f}. Kept the current repository — fix the label in Linear or type a repository below.`}return null}function Rx(n){return n.title.trim().length>0&&dS(n.repo)!=null&&n.developerAgentId.length>0&&n.reviewerAgentId.length>0}const id=["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"],pS={q:"",status:"",repo:"",needsAttention:!1};function Fd(n){return n.startsWith("?")?n.slice(1):n}function Cx(n){var s,u,d;const l=new URLSearchParams(Fd(n));return{q:((s=l.get("q"))==null?void 0:s.trim())??"",status:((u=l.get("status"))==null?void 0:u.trim())??"",repo:((d=l.get("repo"))==null?void 0:d.trim())??"",needsAttention:l.get("needsAttention")==="1"||l.get("needsAttention")==="true"}}function xS(n){const l=new URLSearchParams(Fd(n)),s=v=>{var b;const g=(b=l.get(v))==null?void 0:b.trim();return g||void 0},u={},d=s("q");d!==void 0&&(u.q=d);const f=s("status");f!==void 0&&(u.status=f);const m=s("repo");m!==void 0&&(u.repo=m),(l.get("needsAttention")==="1"||l.get("needsAttention")==="true")&&(u.needsAttention=!0);const y=Number(l.get("page"));return Number.isInteger(y)&&y>=1&&(u.page=y),u}function yS(n){var s,u,d;const l=new URLSearchParams;return(s=n.q)!=null&&s.trim()&&l.set("q",n.q.trim()),(u=n.status)!=null&&u.trim()&&l.set("status",n.status.trim()),(d=n.repo)!=null&&d.trim()&&l.set("repo",n.repo.trim()),n.needsAttention&&l.set("needsAttention","1"),n.page!==void 0&&Number.isInteger(n.page)&&n.page>1&&l.set("page",String(n.page)),l.sort(),l.toString()}function vS(n){const l={};return n.q.trim()&&(l.q=n.q.trim()),n.status.trim()&&(l.status=n.status.trim()),n.repo.trim()&&(l.repo=n.repo.trim()),n.needsAttention&&(l.needsAttention=!0),l}function gS(n,l){const s=new URLSearchParams(Fd(n));return l<=1?s.delete("page"):s.set("page",String(Math.floor(l))),s.sort(),s.toString()}function Tx(n){if(n.total===0)return"No issues match these filters";const l=(n.page-1)*n.limit+1,s=Math.min(n.total,n.page*n.limit);return`Showing ${l}–${s} of ${n.total} issues`}function Ox(n){return n.totalPages<=1?"":`Page ${n.page} of ${n.totalPages}`}function Mx(n){return!!(n.q||n.status||n.repo||n.needsAttention)}const bS={ready:"bg-white/10 text-white/70 border-white/20",developing:"bg-cyber-violet/20 text-cyber-violet-light border-cyber-violet/40",reviewing:"bg-cyber-gold/20 text-[#E8DC7A] border-cyber-gold/40",repairing:"bg-cyber-violet/25 text-cyber-violet-light border-cyber-violet/50",final_review:"bg-amber-500/20 text-amber-300 border-amber-400/40",needs_human:"bg-red-500/20 text-red-300 border-red-400/40",done:"bg-cyber-teal/20 text-cyber-teal border-cyber-teal/40",closed:"bg-white/5 text-white/40 border-white/10"},wS={ready:"Ready",developing:"Developing",reviewing:"Reviewing",repairing:"Repairing",final_review:"Final review",needs_human:"Needs human",done:"Done",closed:"Closed"};function nv({status:n}){return c.jsx("span",{className:`text-xs leading-none px-2 py-1 rounded border tabular-nums ${bS[n]}`,children:wS[n]})}const lv="agent-dealer:first-issue-dismissed:v1";function SS(n){return n.healthy}function jS(n){return n.healthy&&n.runtime!=="muse_code"}function NS(n){const l=n.some(SS),s=n.some(jS);return l&&s?"new-issue":"agents"}function _S(n){return n.historyTotal===0&&!n.filtersActive&&!n.dismissed}function iv(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}function AS(n=iv()){try{return(n==null?void 0:n.getItem(lv))==="1"}catch{return!1}}function ES(n=iv()){try{n==null||n.setItem(lv,"1")}catch{}}function kS({agents:n,onStartIssue:l,onDismiss:s}){const u=NS(n);return c.jsx("section",{"aria-label":"Create your first issue","data-testid":"first-issue-strip",className:"mb-4 rounded border border-[#C4B643]/40 bg-[#C4B643]/5 px-4 py-3",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"font-ui-display text-sm font-medium text-white/90",children:"Create your first issue"}),c.jsx("p",{className:"mt-1 text-sm text-white/60",children:"Connect a developer and a reviewer agent, pick a GitHub repository, then create the issue. Capacity status in the header is informational — it never blocks creating an issue."}),c.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[u==="agents"?c.jsx(aa,{to:"/agents","data-testid":"first-issue-primary",className:"btn-gold px-4 py-2 text-sm",children:"Configure agents"}):c.jsx("button",{type:"button","data-testid":"first-issue-primary",className:"btn-gold px-4 py-2 text-sm",onClick:l,children:"New issue"}),u==="agents"&&c.jsx("span",{className:"text-xs text-white/40",children:"then pick a repository and create the issue"})]})]}),c.jsx("button",{type:"button","aria-label":"Dismiss first-issue guide",title:"Dismiss",onClick:s,className:"shrink-0 rounded px-2 py-1 text-sm text-white/40 hover:text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-cyber-teal/45",children:"✕"})]})})}function sv({value:n,onChange:l,recentRepos:s=[],id:u}){return c.jsxs("div",{className:"space-y-1",children:[s.length>0&&c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:s.includes(n)?n:"",onChange:d=>{d.target.value&&l(d.target.value)},"aria-label":"Recent repositories",children:[c.jsx("option",{value:"",children:"Recent repositories…"}),s.map(d=>c.jsx("option",{value:d,children:d},d))]}),c.jsx("input",{id:u,className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"GitHub URL or owner/repo",value:n,onChange:d=>l(d.target.value)})]})}function RS(){return{label:"",repository:""}}function CS(n){const l=new Set;for(const s of n){const u=s.label.trim();if(!u)return"Labels must not be empty";if(u.length>100)return`Label "${u}" must be 1–100 characters`;const d=u.toLowerCase();if(l.has(d))return`Duplicate label "${u}"`;if(l.add(d),!s.repository.trim())return`Repository for "${u}" must not be empty`}return n.length>100?"At most 100 mappings are allowed":null}function TS({recentRepos:n=[],initialMappings:l,loadMappings:s=x2,saveMappings:u=y2,onClose:d}){const[f,m]=w.useState(l??[]),[y,v]=w.useState(l!==void 0),[g,b]=w.useState(null),[_,U]=w.useState(null),[K,C]=w.useState(!1);w.useEffect(()=>{if(l!==void 0)return;let B=!0;return s().then(Q=>{B&&(m(Q),v(!0))}).catch(Q=>{B&&(b(String(Q)),v(!0))}),()=>{B=!1}},[l,s]);const Y=(B,Q)=>{m(W=>W.map((oe,J)=>J===B?{...oe,...Q}:oe))},L=async()=>{b(null),U(null);const B=CS(f);if(B){b(B);return}C(!0);try{const Q=await u(f.map(W=>({label:W.label.trim(),repository:W.repository})));m(Q),U(Q.length===0?"Mappings cleared":`Saved ${Q.length} mapping${Q.length===1?"":"s"}`)}catch(Q){b(String(Q))}finally{C(!1)}};return c.jsxs("div",{className:"rounded border border-white/10 bg-black/20 px-3 py-2 space-y-2","aria-label":"Repository mappings",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("p",{className:"text-xs text-white/60",children:"Repository mappings"}),d&&c.jsx("button",{type:"button",className:"text-xs text-white/50 hover:text-white",onClick:d,children:"Close"})]}),y?f.length===0?c.jsx("p",{className:"text-xs text-white/40",children:"No mappings yet — add one to prefill the Repository field from a Linear label."}):f.map((B,Q)=>c.jsxs("div",{className:"flex gap-2 items-start","data-testid":"mapping-row",children:[c.jsx("input",{className:"w-40 shrink-0 bg-black/30 border border-white/10 rounded px-2 py-1.5 text-sm",placeholder:"Linear label","aria-label":`Linear label for mapping ${Q+1}`,value:B.label,onChange:W=>Y(Q,{label:W.target.value})}),c.jsx("div",{className:"flex-1 min-w-0",children:c.jsx(sv,{value:B.repository,onChange:W=>Y(Q,{repository:W}),recentRepos:n})}),c.jsx("button",{type:"button",className:"shrink-0 text-xs text-white/50 hover:text-white px-1 py-1.5",onClick:()=>m(W=>W.filter((oe,J)=>J!==Q)),children:"Remove"})]},Q)):c.jsx("p",{className:"text-xs text-white/40",children:"Loading…"}),g&&c.jsx("p",{className:"text-xs text-red-300","data-testid":"mappings-error",children:g}),_&&c.jsx("p",{className:"text-xs text-teal-200/80",children:_}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded border border-white/15 text-white/70 hover:text-white",onClick:()=>m(B=>[...B,RS()]),children:"Add mapping"}),c.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded border border-teal/40 text-teal disabled:opacity-50",disabled:K||!y,onClick:()=>void L(),children:K?"Saving…":"Save changes"})]})]})}function rv(n){return n.issues.some(l=>l.code==="usage_capped")}function uv(n){return[...n].sort((l,s)=>Number(s.healthy)-Number(l.healthy))}function Pn(n){var u;const l=`${n.name} · ${wa(n.runtime)}`,s=[];if(!n.healthy){const d=((u=n.issues[0])==null?void 0:u.message)??"unhealthy";s.push(`NEEDS FIX: ${d}`)}return rv(n)&&s.push("USAGE CAPPED"),s.length>0?`${l} — ${s.join(" · ")}`:l}function xu(n){var l;return n?n.healthy?rv(n)?"Usage capped — admission will refuse until the cap lifts":null:((l=n.issues[0])==null?void 0:l.message)??"Agent is unhealthy":null}function OS({agents:n,initialDeveloperId:l,initialReviewerId:s,busy:u,onSave:d,onCancel:f}){var L,B;const[m,y]=w.useState(l??""),[v,g]=w.useState(s??""),b=uv(n),_=n.find(Q=>Q.id===m),U=n.find(Q=>Q.id===v),K=xu(_),C=xu(U),Y=m===(l??"")&&v===(s??"");return c.jsxs("div",{className:"p-3 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[c.jsx("p",{className:"text-xs text-white/50",children:"Reassign agents — queue position is kept, the wait reason is rechecked, and the change is recorded on the timeline."}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Developer"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:m,disabled:u,title:_?`${_.name} · ${wa(_.runtime)}${_.healthy?" · healthy":` · ${((L=_.issues[0])==null?void 0:L.message)??"unhealthy"}`}`:"Pick a developer agent",onChange:Q=>y(Q.target.value),children:[c.jsx("option",{value:"",children:"Developer agent…"}),b.map(Q=>c.jsx("option",{value:Q.id,title:Pn(Q),children:(Q.healthy?"● ":"○ ")+Pn(Q)},Q.id))]}),K&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:K})]}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Reviewer"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:v,disabled:u,title:U?`${U.name} · ${wa(U.runtime)}${U.healthy?" · healthy":` · ${((B=U.issues[0])==null?void 0:B.message)??"unhealthy"}`}`:"Pick a reviewer agent",onChange:Q=>g(Q.target.value),children:[c.jsx("option",{value:"",children:"Reviewer agent…"}),b.map(Q=>Q.runtime==="muse_code"?c.jsx("option",{value:Q.id,disabled:!0,title:"Muse Code cannot be a reviewer (developer role only)",children:`○ ${Q.name} · ${wa(Q.runtime)} — reviewer not supported`},Q.id):c.jsx("option",{value:Q.id,title:Pn(Q),children:(Q.healthy?"● ":"○ ")+Pn(Q)},Q.id))]}),C&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:C})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-1.5 text-sm disabled:opacity-50",disabled:u||!m||!v||Y,title:"Save via the issue PATCH contract — keeps queue position and rechecks the wait reason",onClick:()=>d(m,v),children:"Save agents"}),c.jsx("button",{type:"button",className:"px-4 py-1.5 text-sm text-white/60 hover:text-white disabled:opacity-50",disabled:u,onClick:f,children:"Cancel"})]})]})}function yu({className:n="w-3.5 h-3.5"}){return c.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor",className:n,"aria-hidden":!0,children:c.jsx("path",{fillRule:"evenodd",d:"M8.982 1.566a1.13 1.13 0 0 0-1.964 0L.165 13.233c-.457.778.091 1.767.982 1.767h13.706c.891 0 1.439-.99.982-1.767L8.982 1.566zM8 5.697a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 5.697zm0 7.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})})}const MS={final_review:"Final review",attempts_exhausted:"Attempts exhausted",policy_escalation:"Policy escalation",product_scope_decision:"Product scope decision",deck_interaction_required:"Agent Deck interaction required",reflection_interaction_required:"Reflection interaction required",outbound_delivery_interaction_required:"Outbound delivery interaction required"};function DS(n){return MS[n]??n}function LS(n){return n==="close"||n==="reject"||n==="abort"}function US({options:n,disabled:l,onChoose:s}){return n.length===0?null:c.jsx("div",{className:"flex flex-wrap gap-2",children:n.map(u=>c.jsx("button",{type:"button",className:`${LS(u.choice)?"btn-ghost-danger":"btn-gold"} px-3 py-1 text-xs disabled:opacity-50`,disabled:l,onClick:()=>s(u.choice),children:u.label},u.choice))})}function vu({action:n,linkTo:l,onChoose:s,disabled:u,children:d,hideChoicesHint:f}){const m=Ly(n),y=l?c.jsx(aa,{to:l,className:"text-sm text-white/85 hover:text-white hover:underline",children:m.title}):c.jsx("span",{className:"text-sm text-white/85",children:m.title});return c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[c.jsx("span",{className:"text-xs uppercase tracking-wide text-red-300/80",children:DS(n.actionType)}),c.jsx("span",{className:"text-xs text-white/35 shrink-0",children:new Date(n.requestedAt).toLocaleString()})]}),c.jsx("div",{children:y}),m.context&&c.jsx("p",{className:"text-xs text-white/55",children:m.context}),s?m.displayOptions.length>0?c.jsx(US,{options:m.displayOptions,disabled:u,onChoose:s}):c.jsxs("p",{className:"text-xs text-amber-200/80",children:["This item declares no response options — resolve it from the CLI (",c.jsx("code",{children:"agent-dealer action"}),")."]}):!f&&m.displayOptions.length>0&&c.jsxs("p",{className:"text-xs text-white/50",children:["To decide: ",m.displayOptions.map(v=>v.label).join(" · ")]}),d,c.jsxs("details",{children:[c.jsx("summary",{className:"text-xs text-white/45 cursor-pointer hover:text-white/70",children:"Details"}),c.jsxs("div",{className:"mt-1.5 space-y-1.5 rounded border border-white/10 bg-black/20 px-3 py-2",children:[c.jsx("p",{className:"text-xs text-white/60 whitespace-pre-wrap",children:m.details.question}),m.details.question!==m.details.reason&&c.jsx("p",{className:"text-xs text-white/60 whitespace-pre-wrap",children:m.details.reason}),m.details.factLines.map(v=>c.jsx("p",{className:"text-xs text-white/60",children:v},v)),m.details.paths.length>0&&c.jsxs("div",{className:"text-xs text-white/60",children:[c.jsx("p",{className:"text-white/40",children:"Saved paths:"}),m.details.paths.map(v=>c.jsx("p",{className:"font-mono break-all",children:v},v))]}),m.details.commands.length>0&&c.jsxs("div",{className:"text-xs text-white/60",children:[c.jsx("p",{className:"text-white/40",children:"Recovery commands:"}),c.jsx("pre",{className:"font-mono whitespace-pre-wrap break-all",children:m.details.commands.join(`
64
+ `)})]}),m.details.evidencePretty&&c.jsxs("div",{className:"text-xs text-white/60",children:[c.jsx("p",{className:"text-white/40",children:"Evidence:"}),c.jsx("pre",{className:"font-mono whitespace-pre-wrap break-all",children:m.details.evidencePretty})]})]})]})]})}function zS({actions:n,busyActionId:l,onResolve:s}){return n.length===0?null:c.jsxs("div",{className:"mb-4 rounded border border-red-400/30 bg-red-500/10",children:[c.jsxs("div",{className:"px-4 py-2 flex items-center gap-2 border-b border-red-400/20",children:[c.jsx(yu,{className:"w-4 h-4 shrink-0 text-red-300"}),c.jsxs("span",{className:"font-ui-display text-sm font-medium text-red-200",children:[n.length," ",n.length===1?"item needs":"items need"," your attention"]})]}),c.jsx("div",{className:"divide-y divide-white/5",children:n.map(u=>u.issueId?c.jsx("div",{className:"px-4 py-3 hover:bg-white/5 transition-colors",children:c.jsx(vu,{action:u,linkTo:`/issues/${u.issueId}`})},u.id):c.jsx("div",{className:"px-4 py-3",children:c.jsx(vu,{action:u,disabled:l===u.id,onChoose:d=>s(u.id,d)})},u.id))})]})}const BS="web";function qS(n){const l=Date.now()-new Date(n).getTime(),s=Math.floor(l/6e4);if(s<1)return"just now";if(s<60)return`${s}m ago`;const u=Math.floor(s/60);return u<24?`${u}h ago`:`${Math.floor(u/24)}d ago`}function HS(n){var u;if(!(n!=null&&n.trim()))return;const l=n.match(/##\s*Acceptance criteria\s*\n([\s\S]*?)(?=\n##\s|$)/i);return((u=l==null?void 0:l[1])==null?void 0:u.trim())||void 0}function $S({agents:n,humanActions:l,onHumanActionsChanged:s}){const[u,d]=w.useState(null),[f,m]=w.useState(null),[y,v]=vy(),g=y.toString(),b=xS(g),_=w.useRef(b);_.current=b;const[U,K]=w.useState(()=>Cx(g)),[C,Y]=w.useState(!1),L=Mx(b),[B,Q]=w.useState(!1),[W,oe]=w.useState(!1),[J,ke]=w.useState("manual"),[I,be]=w.useState([]),[$e,xt]=w.useState(""),[ot,tt]=w.useState(""),[Ct,vt]=w.useState(!1),[Fe,D]=w.useState([]),[Z,ce]=w.useState(""),[Re,Ce]=w.useState(""),[j,H]=w.useState("main"),[F,ee]=w.useState(""),[le,xe]=w.useState(""),[he,De]=w.useState(""),[Ye,Na]=w.useState(""),[Lt,la]=w.useState(!0),[Qa,Le]=w.useState(null),[gt,Xa]=w.useState([]),[Te,tl]=w.useState(null),[Ka,za]=w.useState(!1),[Sn,al]=w.useState(null),[ki,St]=w.useState(()=>AS()),[ia,Ja]=w.useState(null),[Ia,Tt]=w.useState(null),lt=I.find(O=>O.id===$e)??null,nl=J==="linear"&&lt!=null,Ol=mS(J,lt),ll=Rx({title:Z,repo:Re,developerAgentId:he,reviewerAgentId:Ye}),_a=O=>{N2(O).then(d).catch(re=>Le(String(re)))},jt=()=>{Nx([...id]).then(al).catch(()=>{})},Qt=()=>{ES(),St(!0)},G=_S({historyTotal:Sn,filtersActive:L,dismissed:ki}),ye=()=>{_a(_.current),ld().then(Xa).catch(()=>{}),M2().then(tl).catch(()=>{}),jt()},it=async O=>{za(!0),Le(null);try{const re=await D2(O);tl(re),ye()}catch(re){Le(String(re))}finally{za(!1)}},Aa=async O=>{Tt(O),Le(null);try{const re=await Jy(O);Ja({issueId:O,developerAgentId:re.issue.developerAgentId,reviewerAgentId:re.issue.reviewerAgentId})}catch(re){Le(String(re))}finally{Tt(null)}},jn=async(O,re)=>{if(ia){Tt(ia.issueId);try{await kd(ia.issueId,{developerAgentId:O,reviewerAgentId:re}),Ja(null),ye()}catch(Qe){Ja(null),Le(String(Qe)),ye()}finally{Tt(null)}}},Ut=async O=>{Tt(O),Le(null);try{await Iy(O),ye()}catch(re){Le(String(re))}finally{Tt(null)}},sa=async O=>{Tt(O),Le(null);try{await Fy(O),ye()}catch(re){Le(String(re)),ye()}finally{Tt(null)}},Fa=O=>{const re=yS(vS(O));v(re?Object.fromEntries(new URLSearchParams(re)):{})},il=()=>{K(pS),v({})},Nn=O=>{const re=gS(g,O);v(re?Object.fromEntries(new URLSearchParams(re)):{})},Ml=O=>K(re=>({...re,...O})),Ds=async(O,re,Qe)=>{m(O),Le(null);try{await Py(O,BS,re,Qe),s(),ye()}catch(Xt){Le(String(Xt))}finally{m(null)}};w.useEffect(()=>{K(Cx(g))},[g]),w.useEffect(()=>{_a(_.current),ld().then(Xa).catch(()=>{}),Nx([...id]).then(al).catch(()=>{});const O=setInterval(()=>{_a(_.current),ld().then(Xa).catch(()=>{})},5e3);return()=>clearInterval(O)},[g]),w.useEffect(()=>{B&&(_2().then(D).catch(()=>D([])),J==="linear"&&m2().then(be).catch(O=>Le(`Linear inbox: ${String(O)}`)))},[B,J]),w.useEffect(()=>{lt&&(ce(`${lt.identifier}: ${lt.title}`),ee(lt.description??""),xe(HS(lt.description)??""),Ce(O=>hS(O,lt)))},[lt]);const Dl=()=>{ce(""),Ce(""),ee(""),xe(""),xt(""),tt(""),la(!0),H("main")},sl=O=>{be(re=>[O,...re.filter(Qe=>Qe.id!==O.id)]),xt(O.id),tt(O.identifier)},Ls=async()=>{const O=ot.trim();if(!O){Le("Paste a Linear id (e.g. NOT-103) or issue URL");return}vt(!0),Le(null);try{const re=await p2(O);sl(re)}catch(re){Le(`Linear lookup: ${String(re)}`)}finally{vt(!1)}},Us=async()=>{if(!Rx({title:Z,repo:Re,developerAgentId:he,reviewerAgentId:Ye})){Le("Title, GitHub repository, developer, and reviewer are required");return}try{await R2({title:Z.trim(),repo:Re.trim(),baseBranch:j.trim()||"main",description:F.trim()||void 0,acceptanceCriteria:le.trim()||void 0,developerAgentId:he,reviewerAgentId:Ye,maxReviewRounds:3,maxInfraAttempts:3,autoMerge:Lt,source:J==="linear"&&lt?"linear":"manual",externalId:lt==null?void 0:lt.id,externalLabel:lt==null?void 0:lt.identifier,externalUrl:lt==null?void 0:lt.url}),Q(!1),Dl(),ye()}catch(O){Le(String(O))}};return c.jsxs("div",{className:"flex-1 min-h-0 px-6 py-4 w-full overflow-y-auto",children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsx("h2",{className:"font-ui-display text-lg font-semibold text-white/90",children:"Issues"}),c.jsx("button",{type:"button",className:"btn-gold px-4",onClick:()=>Q(O=>!O),children:"New issue"})]}),Qa&&c.jsx("p",{className:"text-sm text-red-300 mb-3",children:Qa}),G&&c.jsx(kS,{agents:n,onStartIssue:()=>Q(!0),onDismiss:Qt}),B&&c.jsxs("div",{className:"mb-4 p-4 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[c.jsxs("p",{className:"text-xs text-white/50",children:["Workflow:"," ",c.jsxs("span",{className:"text-white/75",children:["developer → reviewer → ",Lt?"auto-merge on approve":"final human review"]}),"."]}),c.jsxs("div",{className:"flex gap-2 text-sm",children:[c.jsx("button",{type:"button",className:`font-ui-display px-3 py-1 rounded border ${J==="manual"?"border-teal/50 text-teal":"border-white/10 text-white/50"}`,onClick:()=>{ke("manual"),xt("")},children:"Manual"}),c.jsx("button",{type:"button",className:`font-ui-display px-3 py-1 rounded border ${J==="linear"?"border-teal/50 text-teal":"border-white/10 text-white/50"}`,onClick:()=>ke("linear"),children:"From Linear"})]}),J==="linear"&&c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{className:"flex-1 bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"NOT-103 or Linear URL",value:ot,onChange:O=>tt(O.target.value),onKeyDown:O=>{O.key==="Enter"&&(O.preventDefault(),Ls())}}),c.jsx("button",{type:"button",className:"font-ui-display px-3 py-2 rounded border border-teal/40 text-teal text-sm disabled:opacity-50",disabled:Ct||!ot.trim(),onClick:()=>void Ls(),children:Ct?"…":"Lookup"})]}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:$e,onChange:O=>{const re=O.target.value;xt(re);const Qe=I.find(Xt=>Xt.id===re);Qe&&tt(Qe.identifier)},children:[c.jsx("option",{value:"",children:"Or pick from open inbox…"}),I.map(O=>c.jsxs("option",{value:O.id,children:[O.identifier,": ",O.title]},O.id))]})]}),c.jsx("input",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm disabled:opacity-60",placeholder:"Title",value:Z,disabled:nl,onChange:O=>ce(O.target.value)}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm disabled:opacity-60",rows:3,placeholder:"Problem statement / description",value:F,disabled:nl,onChange:O=>ee(O.target.value)}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",rows:3,placeholder:"Acceptance criteria",value:le,onChange:O=>xe(O.target.value)}),c.jsxs("div",{className:"flex gap-2 items-stretch",children:[c.jsxs("div",{className:"flex-1 space-y-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"text-xs text-white/50",children:"Repository"}),c.jsx("button",{type:"button","aria-label":"Configure repository mappings",title:"Configure repository mappings","aria-expanded":W,onClick:()=>oe(O=>!O),className:"text-white/40 hover:text-white shrink-0 rounded focus-visible:outline focus-visible:outline-2 focus-visible:outline-cyber-teal/45",children:c.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[c.jsx("path",{d:"M8 5.2a2.8 2.8 0 1 0 0 5.6 2.8 2.8 0 0 0 0-5.6Z",stroke:"currentColor",strokeWidth:"1.3"}),c.jsx("path",{d:"M8 1.5v1.7M8 12.8v1.7M1.5 8h1.7M12.8 8h1.7M3.4 3.4l1.2 1.2M11.4 11.4l1.2 1.2M12.6 3.4l-1.2 1.2M4.6 11.4l-1.2 1.2",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]})})]}),c.jsx(sv,{value:Re,onChange:Ce,recentRepos:Fe}),W&&c.jsx(TS,{recentRepos:Fe,onClose:()=>oe(!1)}),Ol&&c.jsx("p",{className:"text-xs text-amber-200/80","data-testid":"repo-label-warning",children:Ol})]}),c.jsx("input",{className:"w-32 bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"Base (seed)",title:"Seed only — managed GitHub clones use the remote default at first checkout",value:j,onChange:O=>H(O.target.value)})]}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:he,onChange:O=>De(O.target.value),children:[c.jsx("option",{value:"",children:"Developer agent…"}),n.map(O=>c.jsx("option",{value:O.id,children:O.name},O.id))]}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:Ye,onChange:O=>Na(O.target.value),children:[c.jsx("option",{value:"",children:"Reviewer agent…"}),n.map(O=>c.jsx("option",{value:O.id,children:O.name},O.id))]}),c.jsxs("label",{className:"flex items-center gap-2 text-sm text-white/70 cursor-pointer",children:[c.jsx("input",{type:"checkbox",checked:Lt,onChange:O=>la(O.target.checked),className:"accent-[#C4B643]"}),"Auto-merge when reviewer approves (skip final human review)"]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 disabled:opacity-40",disabled:!ll,title:ll?void 0:"Title, GitHub repository, developer, and reviewer are required",onClick:Us,children:J==="linear"?"Kick from Linear":"Create"}),c.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm text-white/60 hover:text-white",onClick:()=>{Q(!1),Dl()},children:"Cancel"})]})]}),gt.length>0?c.jsxs("div",{className:"mb-4 rounded border border-cyber-teal/25 bg-cyber-teal/5",children:[c.jsxs("div",{className:"px-4 py-2 border-b border-cyber-teal/20 flex items-center justify-between gap-3",children:[c.jsx("span",{className:"font-ui-display text-sm font-medium text-cyber-teal",children:"Admission queue"}),c.jsx("span",{className:"flex items-center gap-2 text-xs text-white/40",children:Te?c.jsxs(c.Fragment,{children:[c.jsxs("span",{children:[Te.active," active · ",Te.waiting," waiting · limit"," ",Te.limit,Te.overCap?" · over capacity":""]}),Te.options.length>0?c.jsxs("label",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"text-white/35",children:"limit"}),c.jsx("select",{className:"bg-black/30 border border-white/10 rounded px-1.5 py-0.5 text-xs text-white/80 disabled:opacity-50",value:Te.options.includes(Te.maxActiveIssues)?Te.maxActiveIssues:Te.limit,disabled:Ka,title:Te.ceiling<2?`Capped by the worker/spawn ceiling (${Te.ceiling})`:"How many issues may execute in parallel (max one per repository)",onChange:O=>void it(Number(O.target.value)),children:Te.options.map(O=>c.jsx("option",{value:O,children:O},O))})]}):c.jsxs("span",{title:`Capped by the worker/spawn ceiling (${Te.ceiling})`,children:["max ",Te.ceiling]})]}):c.jsxs("span",{children:[gt.length," waiting · sequential"]})})]}),c.jsx("div",{className:"divide-y divide-white/5",children:gt.map((O,re)=>c.jsxs("div",{children:[c.jsxs("div",{className:"px-4 py-2 flex items-start gap-3",children:[c.jsx("span",{className:"text-xs text-white/35 w-5 shrink-0 pt-0.5",children:O.position}),c.jsxs(aa,{to:`/issues/${O.issueId}`,className:"flex-1 min-w-0 text-left hover:text-cyber-teal",children:[c.jsx("span",{className:"text-sm text-white/85 truncate block",children:O.title??O.issueId.slice(0,8)}),O.waitReason?c.jsx("span",{className:"text-xs text-amber-200/80 block mt-0.5",children:O.waitReason}):c.jsxs("span",{className:"text-xs text-white/35 block mt-0.5",children:[O.issueStatus??"queued"," · next up"]})]}),c.jsxs("div",{className:"flex items-center gap-2 shrink-0 flex-wrap justify-end",children:[c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:Ia===O.issueId,title:"Change the developer/reviewer agents — keeps queue position and rechecks the wait reason",onClick:()=>void Aa(O.issueId),children:"Edit"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:Ia===O.issueId,title:"Run next — move to the front of the admission queue; runs now if a slot is free, otherwise waits first with a reason",onClick:()=>void Ut(O.issueId),children:"Run next"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:Ia===O.issueId,title:"Execute now — start immediately, skipping queue order; refuses (changing nothing) when capacity, readiness, blockers, or agent health prevents it",onClick:()=>void sa(O.issueId),children:"Execute now"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:re===0,title:"Move to top",onClick:()=>{Ir(O.issueId,"top").then(ye).catch(Qe=>Le(String(Qe)))},children:"Top"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:re===0,title:"Move up",onClick:()=>{const Qe=gt[re-1];Qe&&Ir(O.issueId,{before:Qe.issueId}).then(ye).catch(Xt=>Le(String(Xt)))},children:"↑"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:re===gt.length-1,title:"Move down",onClick:()=>{const Qe=gt[re+1];Qe&&Ir(O.issueId,{after:Qe.issueId}).then(ye).catch(Xt=>Le(String(Xt)))},children:"↓"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:re===gt.length-1,title:"Move to bottom",onClick:()=>{Ir(O.issueId,"bottom").then(ye).catch(Qe=>Le(String(Qe)))},children:"Bottom"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-white",onClick:()=>{Wy(O.issueId).then(ye).catch(Qe=>Le(String(Qe)))},children:"Remove"})]})]}),(ia==null?void 0:ia.issueId)===O.issueId&&c.jsx("div",{className:"px-4 pb-3 pl-12",children:c.jsx(OS,{agents:n,initialDeveloperId:ia.developerAgentId,initialReviewerId:ia.reviewerAgentId,busy:Ia===O.issueId,onSave:(Qe,Xt)=>void jn(Qe,Xt),onCancel:()=>Ja(null)})})]},O.id))})]}):Te?c.jsxs("p",{"data-testid":"admission-idle-status",className:"mb-4 text-xs text-white/35 tabular-nums",children:["Admission: ",Te.active," active · ",Te.waiting," waiting · limit"," ",Te.limit,Te.overCap?" · over capacity":"",Te.options.length>0&&c.jsxs("label",{className:"ml-2 inline-flex items-center gap-1",children:[c.jsx("span",{children:"limit"}),c.jsx("select",{className:"bg-black/30 border border-white/10 rounded px-1.5 py-0.5 text-xs text-white/60 disabled:opacity-50",value:Te.options.includes(Te.maxActiveIssues)?Te.maxActiveIssues:Te.limit,disabled:Ka,title:Te.ceiling<2?`Capped by the worker/spawn ceiling (${Te.ceiling})`:"How many issues may execute in parallel (max one per repository)",onChange:O=>void it(Number(O.target.value)),children:Te.options.map(O=>c.jsx("option",{value:O,children:O},O))})]})]}):null,c.jsx(zS,{actions:l,busyActionId:f,onResolve:(O,re)=>void Ds(O,re)}),c.jsxs("div",{className:"mb-4 rounded border border-white/10 bg-panel-elevated/60",children:[c.jsxs("button",{type:"button","aria-expanded":C,"aria-controls":"issues-filter-form",onClick:()=>Y(O=>!O),className:"w-full flex items-center gap-2 px-4 py-2.5 text-sm text-white/70 hover:text-white",children:[c.jsx("span",{"aria-hidden":"true",className:"text-xs text-white/40 w-3 shrink-0",children:C?"▾":"▸"}),c.jsx("span",{className:"font-ui-display",children:C?"Hide filters":"Show filters"}),L&&c.jsx("span",{"data-testid":"filters-active-indicator",title:"The issue list is filtered",className:"text-xs px-2 py-0.5 rounded-full border border-[#C4B643]/50 text-[#C4B643]",children:"Filtered"})]}),C&&c.jsx("form",{id:"issues-filter-form","aria-label":"Issues filters",className:"px-4 pb-4",onSubmit:O=>{O.preventDefault(),Fa(U)},children:c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"block text-xs text-white/50 mb-1",children:"Search"}),c.jsx("input",{type:"text",placeholder:"Title or label (e.g. NOT-175)",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:U.q,onChange:O=>Ml({q:O.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"block text-xs text-white/50 mb-1",children:"Status"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:U.status,onChange:O=>Ml({status:O.target.value}),children:[c.jsx("option",{value:"",children:"All statuses"}),id.map(O=>c.jsx("option",{value:O,children:O},O))]})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"block text-xs text-white/50 mb-1",children:"Repository"}),c.jsx("input",{type:"text",placeholder:"github.com/owner/repo",title:"Exact repository identity",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:U.repo,onChange:O=>Ml({repo:O.target.value})})]}),c.jsx("div",{className:"flex items-end gap-2",children:c.jsxs("label",{className:"flex items-center gap-2 text-sm text-white/70 cursor-pointer pb-2",children:[c.jsx("input",{type:"checkbox",checked:U.needsAttention,onChange:O=>Ml({needsAttention:O.target.checked}),className:"accent-[#C4B643]"}),"Needs attention"]})}),c.jsxs("div",{className:"flex items-end gap-2 sm:col-span-2 lg:col-span-4",children:[c.jsx("button",{type:"submit",className:"btn-gold px-4",children:"Apply"}),c.jsx("button",{type:"button",className:"px-4 py-2 text-sm text-white/60 hover:text-white",onClick:il,children:"Reset"})]})]})})]}),u===null?c.jsx("p",{className:"text-white/50 text-sm",children:"Loading…"}):u.total===0&&!Mx(b)?c.jsx("p",{className:"text-white/45 text-sm",children:"No issues yet — create one to get started."}):u.total===0?c.jsxs("div",{className:"rounded border border-white/10 bg-panel-elevated/40 px-4 py-3",children:[c.jsx("p",{className:"text-white/45 text-sm",children:Tx(u)}),c.jsx("button",{type:"button",className:"mt-2 px-3 py-1.5 text-sm rounded border border-white/15 text-white/70 hover:text-white",onClick:il,children:"Reset filters"})]}):c.jsxs("div",{children:[c.jsx("div",{className:"flex justify-end mb-2",children:c.jsxs("p",{className:"text-xs text-white/40 tabular-nums",children:[Tx(u),Ox(u)?` · ${Ox(u)}`:""]})}),c.jsx("div",{className:"space-y-2",children:u.issues.map(O=>{const re=gt.find(Qe=>Qe.issueId===O.id);return c.jsxs(aa,{to:`/issues/${O.id}`,className:"w-full text-left flex items-center gap-3 px-4 py-3 rounded border border-white/10 bg-panel-elevated/40 hover:bg-panel-elevated/70 transition-colors",children:[O.hasOpenHumanAction&&c.jsx(yu,{className:"w-4 h-4 shrink-0 text-red-400"}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"text-sm font-medium text-white/90 truncate",children:O.title}),re!=null&&re.waitReason?c.jsx("p",{className:"text-xs text-amber-200/80 truncate",title:re.waitReason,children:re.waitReason}):O.currentIntent&&c.jsx("p",{className:"text-xs text-white/50 truncate",children:O.currentIntent})]}),c.jsx("span",{className:"text-xs text-white/40 capitalize shrink-0",children:O.currentOwner}),re&&c.jsxs("span",{className:"text-xs px-2 py-0.5 rounded border border-cyber-teal/40 text-cyber-teal shrink-0",title:re.waitReason??"Next up for admission",children:["Queued #",re.position]}),c.jsx(nv,{status:O.status}),c.jsx("span",{className:"text-xs text-white/35 shrink-0 w-16 text-right",children:qS(O.updatedAt)})]},O.id)})}),u.totalPages>1&&c.jsxs("nav",{"aria-label":"Issues pages",className:"mt-3 flex items-center gap-2",children:[c.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded border border-white/15 text-white/70 hover:text-white disabled:opacity-40",disabled:u.page<=1,onClick:()=>Nn(u.page-1),children:"Previous"}),c.jsxs("span",{className:"text-xs text-white/45 tabular-nums",children:["Page ",u.page," of ",u.totalPages]}),c.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded border border-white/15 text-white/70 hover:text-white disabled:opacity-40",disabled:u.page>=u.totalPages,onClick:()=>Nn(u.page+1),children:"Next"})]})]})]})}const YS=["developer","reviewer","legacy"],Dx=["claude_code","cursor_local","codex_local"],VS=["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"];function wi(n,l){return n.n===0||n.p50===null&&n.p95===null?{available:!1,p50Text:null,p95Text:null,sampleText:"n=0",sampleTitle:"No observations in this cohort",sparse:!0}:{available:!0,p50Text:n.p50===null?null:l(n.p50),p95Text:n.p95===null?null:l(n.p95),sampleText:Vy(n.n),sampleTitle:`Sample size ${n.n}${Ad(n.n)?" — fewer than 5 observations, compare with care":""}`,sparse:Ad(n.n)}}function va(n,l,s){if(n.sum===null||n.known===0)return{available:!1,valueText:"N/A",exactText:null,noteText:null,noteTitle:null,incomplete:n.known<n.total};const u=l(n.sum),d=s!=null&&s.compact?n2(n.sum):u,f=n.known<n.total;return{available:!0,valueText:d,exactText:s!=null&&s.compact?u:null,noteText:f?`${Ge(n.known)}/${Ge(n.total)} known`:null,noteTitle:f?"Partial sample — missing provider metadata is excluded, never zero":null,incomplete:f}}function Cs(n,l,s){return n===null||l===0?{available:!1,valueText:"N/A",evidenceCounts:null,evidenceNoun:null,title:`No ${s} in this cohort`}:{available:!0,valueText:Cu(n),evidenceCounts:`${Ge(Math.round(n*l))}/${Ge(l)}`,evidenceNoun:s,title:`Exact share over ${l} ${s}`}}function Lx(n,l,s){const u=Cs(n,l,s);return u.available?{text:`${u.valueText} (${u.evidenceCounts} ${u.evidenceNoun})`,title:u.title}:{text:u.valueText,title:u.title}}function sd(n){const l=Lx(n.issueSuccess,n.issueSuccessDenominator,"closed"),s=Lx(n.attemptSuccess,n.attemptSuccessDenominator,"terminal attempts");return{key:n.key,issuesText:Ge(n.issues),attemptsText:Ge(n.attempts),issueSuccessText:l.text,issueSuccessTitle:l.title,attemptSuccessText:s.text,attemptSuccessTitle:s.title,issueSuccessDisplay:Cs(n.issueSuccess,n.issueSuccessDenominator,"closed"),attemptSuccessDisplay:Cs(n.attemptSuccess,n.attemptSuccessDenominator,"terminal attempts"),wallText:jx(n.sessionWallMs,Zt),envelopeText:jx(n.spawnEnvelopeMs,Zt),retryText:n.retryRate===null?"N/A":Cu(n.retryRate),retryTitle:"Extra attempts after a terminal attempt in the same issue/role/round ÷ attempts",tokensInText:In(n.tokensIn,Ge),tokensOutText:In(n.tokensOut,Ge),costText:In(n.costUsd,js),costIncomplete:n.costUsd.known<n.costUsd.total,durationText:In(n.durationMs,Zt),failedCostText:In(n.failedCostUsd,js),failedTokensText:`${In(n.failedTokensIn,Ge)} in · ${In(n.failedTokensOut,Ge)} out`,failedDurationText:In(n.failedDurationMs,Zt),wall:wi(n.sessionWallMs,Zt),envelope:wi(n.spawnEnvelopeMs,Zt),tokensIn:va(n.tokensIn,Ge,{compact:!0}),tokensOut:va(n.tokensOut,Ge,{compact:!0}),cost:va(n.costUsd,js),duration:va(n.durationMs,Zt),failedCost:va(n.failedCostUsd,js),failedTokensIn:va(n.failedTokensIn,Ge,{compact:!0}),failedTokensOut:va(n.failedTokensOut,Ge,{compact:!0}),failedDuration:va(n.failedDurationMs,Zt),failedIncomplete:n.failedCostUsd.known<n.failedCostUsd.total||n.failedTokensIn.known<n.failedTokensIn.total||n.failedTokensOut.known<n.failedTokensOut.total||n.failedDurationMs.known<n.failedDurationMs.total,sparse:n.attempts>0&&Ad(n.attempts)}}function ZS(n,l){const s=n.code==="unknown";return{code:n.code,domain:n.domain,countText:Ge(n.count),shareText:n.share===null?"N/A":Cu(n.share),shareTitle:l>0?`${Ge(n.count)} of ${Ge(l)} issues with a failed attempt`:"No issues with a failed attempt in scope",isUnknown:s,blurb:s?"Ambiguous evidence — not promoted to a specific cause.":`Primary cause · ${n.domain} domain`,displayCode:s?"Cause not recorded":n.code,displayNote:s?"Needs more evidence":`Primary cause · ${n.domain} domain`,issueIds:n.issueIds,hiddenIssueCount:Math.max(0,n.issueTotal-n.issueIds.length)}}function GS(n){const l=n.reduce((s,u)=>s+u.count,0);return n.map(s=>ZS(s,l))}function QS(n){return`/issues/${n}`}function Ux(n,l){if(n!=null&&n.trim()&&/^\d{4}-\d{2}-\d{2}$/.test(n.trim()))return l?`${n.trim()}T23:59:59.999Z`:`${n.trim()}T00:00:00.000Z`}function zx(n){if(!n)return"";const l=n.match(/^(\d{4}-\d{2}-\d{2})/);return l?l[1]:""}function Bx(n){const l=new URLSearchParams(n.startsWith("?")?n.slice(1):n),s=u=>{var d;return((d=l.get(u))==null?void 0:d.trim())??""};return{fromDate:zx(s("from")),toDate:zx(s("to")),repo:s("repo"),role:s("role"),runtime:s("runtime"),model:s("model"),status:s("status")}}function XS(n){const l=new URLSearchParams(n.startsWith("?")?n.slice(1):n),s=d=>{var m;const f=(m=l.get(d))==null?void 0:m.trim();return f||void 0},u={};for(const d of["from","to","repo","role","runtime","model","status"]){const f=s(d);f!==void 0&&(u[d]=f)}return u}function KS(n,l,s){const u=new URLSearchParams(n.startsWith("?")?n.slice(1):n);u.set(l,s),u.delete("page"),u.delete("limit"),u.sort();const d=u.toString();return`/reports/execution${d?`?${d}`:""}`}function JS(n){return{from:Ux(n.fromDate,!1),to:Ux(n.toDate,!0),repo:n.repo.trim()||void 0,role:n.role||void 0,runtime:n.runtime.trim()||void 0,model:n.model.trim()||void 0,status:n.status.trim()||void 0}}function rd(n){return n===null?"N/A":Cu(n)}function Ca({label:n,value:l,valueTitle:s,note:u}){return c.jsxs("div",{className:"rounded border border-white/10 bg-panel-elevated/60 px-4 py-3",children:[c.jsx("p",{className:"font-ui-display text-xs uppercase tracking-wide text-white/40",children:n}),c.jsx("div",{className:"mt-1 font-mono text-lg font-semibold text-white/90 tabular-nums",title:s,children:l}),u&&c.jsx("div",{className:"mt-0.5 font-ui-display text-xs text-white/40",children:u})]})}function gu({display:n,compact:l}){if(!n.available)return c.jsx("span",{className:"font-mono text-white/45",title:n.title,children:"N/A"});const s=l?"font-mono text-sm font-medium text-white/85 tabular-nums leading-tight whitespace-nowrap":"font-mono text-base sm:text-lg font-semibold text-white/90 tabular-nums leading-tight whitespace-nowrap";return c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",title:n.title,children:[c.jsx("span",{className:s,"aria-label":n.title,children:n.valueText}),c.jsxs("span",{className:"font-ui-display min-w-0 break-words text-xs text-white/40",children:["(",c.jsx("span",{className:"font-mono tabular-nums",children:n.evidenceCounts})," ",n.evidenceNoun,")"]})]})}function Ns({display:n,compact:l}){if(!n.available)return c.jsx("span",{className:"font-mono text-white/45",children:"N/A"});const s=l?"font-ui-display text-[11px] uppercase tracking-wide text-white/40":"font-ui-display text-xs uppercase tracking-wide text-white/40",u=l?"font-mono text-sm font-medium text-white/85 tabular-nums":"font-mono text-base font-semibold text-white/90 tabular-nums";return c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-3 gap-y-0.5",children:[c.jsxs("span",{className:"inline-flex items-baseline gap-x-1.5",children:[c.jsx("span",{className:s,children:"P50"}),c.jsx("span",{className:u,children:n.p50Text??"N/A"})]}),c.jsxs("span",{className:"inline-flex items-baseline gap-x-1.5",children:[c.jsx("span",{className:s,children:"P95"}),c.jsx("span",{className:u,children:n.p95Text??"N/A"})]}),c.jsx("span",{className:"font-ui-display text-xs text-white/40",title:n.sampleTitle,children:n.sampleText})]})}function ga({display:n,compact:l}){if(!n.available)return c.jsx("span",{className:"font-mono text-white/45",children:"N/A"});const s=n.exactText??n.valueText,u=l?"font-mono text-sm font-medium text-white/85 tabular-nums":"font-mono text-base font-semibold text-white/90 tabular-nums";return c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",children:[c.jsx("span",{className:u,title:s,"aria-label":s,children:n.valueText}),n.noteText&&c.jsx("span",{className:"font-ui-display text-xs text-white/40",title:n.noteTitle??void 0,children:n.noteText})]})}function ud({caption:n,dimension:l,rows:s,cohortLink:u}){return s.length===0?c.jsxs("div",{className:"rounded border border-white/10 bg-panel-elevated/60 px-4 py-3",children:[c.jsx("h4",{className:"font-ui-display text-sm font-medium text-white/80",children:n}),c.jsx("p",{className:"font-ui-display mt-1 text-sm text-white/45",children:"No attempts in this dimension for these filters."})]}):c.jsx("div",{className:"rounded border border-white/10 bg-panel-elevated/60 overflow-x-auto",children:c.jsxs("table",{className:"w-full min-w-[1440px] text-sm",children:[c.jsxs("caption",{className:"sr-only",children:[n," — sorted by name, never by cost"]}),c.jsx("thead",{children:c.jsxs("tr",{className:"font-ui-display text-left text-xs uppercase tracking-wide text-white/40 border-b border-white/10",children:[c.jsx("th",{scope:"col",className:"px-4 py-2 font-medium",children:n}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Issues"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Attempts"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Issue success"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Attempt success"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Session wall P50/P95"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Retry rate"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Tokens in"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Tokens out"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Cost"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Duration"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Failed cost"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Failed tokens"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Failed runtime"})]})}),c.jsx("tbody",{className:"divide-y divide-white/5",children:s.map(d=>c.jsxs("tr",{className:"tabular-nums",children:[c.jsxs("th",{scope:"row",className:"px-4 py-2 text-left font-mono font-medium text-white/85",children:[u?c.jsx(aa,{to:u(l,d.key),className:"text-cyber-teal hover:underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-cyber-teal/45",title:`Filter the report to ${l} ${d.key}`,children:d.key}):d.key,d.sparse&&c.jsx("span",{className:"font-ui-display ml-2 text-xs font-normal text-amber-200/80",title:"Fewer than 5 attempts — compare with care",children:"sparse"})]}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:d.issuesText}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:d.attemptsText}),c.jsx("td",{className:"px-3 py-2 text-white/75",title:d.issueSuccessTitle,children:c.jsx(gu,{display:d.issueSuccessDisplay,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",title:d.attemptSuccessTitle,children:c.jsx(gu,{display:d.attemptSuccessDisplay,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(Ns,{display:d.wall,compact:!0})}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",title:d.retryTitle,children:d.retryText}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ga,{display:d.tokensIn,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ga,{display:d.tokensOut,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ga,{display:d.cost,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ga,{display:d.duration,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ga,{display:d.failedCost,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-1.5",children:[c.jsx(ga,{display:d.failedTokensIn,compact:!0}),c.jsx("span",{className:"font-ui-display text-xs text-white/40",children:"in"}),c.jsx("span",{className:"font-ui-display text-xs text-white/40",children:"·"}),c.jsx(ga,{display:d.failedTokensOut,compact:!0}),c.jsx("span",{className:"font-ui-display text-xs text-white/40",children:"out"})]})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ga,{display:d.failedDuration,compact:!0})})]},d.key))})]})})}const IS={fromDate:"",toDate:"",repo:"",role:"",runtime:"",model:"",status:""};function FS({loading:n,error:l,report:s,onRetry:u,cohortLink:d}){const f=(s==null?void 0:s.summary)??null,m=w.useMemo(()=>s?GS(s.failures):[],[s]),y=w.useMemo(()=>s?s.failures.reduce((v,g)=>v+g.count,0):0,[s]);return c.jsxs("div",{"aria-live":"polite",children:[n&&c.jsx("p",{role:"status",className:"text-sm text-white/50",children:"Loading execution report…"}),!n&&l&&c.jsxs("div",{className:"rounded border border-red-400/30 bg-red-500/10 px-4 py-3",role:"alert",children:[c.jsxs("p",{className:"font-ui-display text-sm text-red-200",children:["Couldn’t load the execution report: ",l]}),c.jsx("button",{type:"button",className:"font-ui-display mt-2 px-3 py-1.5 text-sm rounded border border-red-300/40 text-red-100 hover:bg-red-500/20",onClick:u,children:"Retry"})]}),!n&&!l&&s&&f&&c.jsxs("div",{className:"space-y-6",children:[s.meta.partial&&c.jsxs("div",{className:"rounded border border-amber-300/30 bg-amber-400/10 px-4 py-3",children:[c.jsx("p",{className:"font-ui-display text-sm text-amber-100 font-medium",children:"Partial metadata"}),c.jsx("ul",{className:"font-ui-display mt-1 list-disc list-inside text-sm text-amber-100/80",children:s.meta.partialReasons.map(v=>c.jsx("li",{children:v},v))})]}),f.issues===0?c.jsx("p",{className:"font-ui-display text-sm text-white/45",children:"No issues match these filters in this window. Widen the date range or clear filters."}):c.jsxs(c.Fragment,{children:[c.jsx("section",{"aria-label":"Summary",children:c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-3",children:[c.jsx(Ca,{label:"Issue success",value:c.jsx(gu,{display:Cs(f.issueSuccess,f.closedIssues,"closed")}),valueTitle:`done / (done + closed), denominator ${f.closedIssues}`,note:`${Ge(f.issues)} issues · ${Ge(f.closedIssues)} closed`}),c.jsx(Ca,{label:"Attempt success",value:c.jsx(gu,{display:Cs(f.attemptSuccess,f.terminalAttempts,"terminal")}),valueTitle:`done sessions / terminal sessions, denominator ${f.terminalAttempts}`,note:`${Ge(f.attempts)} attempts · ${Ge(f.terminalAttempts)} terminal`}),c.jsx(Ca,{label:"Retry rate",value:rd(f.retryRate),valueTitle:`${f.retryExtraAttempts} extra attempts after a terminal attempt in the same issue/role/round ÷ ${f.attempts} attempts`,note:`Reuse rate ${rd(f.reuseRate)} over ${Ge(f.reuseDenominator)} reviewer sessions with input SHA`}),c.jsx(Ca,{label:"Human wait",value:Zt(f.humanWaitMs),note:`${Ge(f.interventions)} interventions`}),c.jsx(Ca,{label:"Session wall P50/P95",value:c.jsx(Ns,{display:wi(f.sessionWallMs,Zt)}),note:"Session bookkeeping proxy — never CLI runtime"}),c.jsx(Ca,{label:"Spawn envelope P50/P95",value:c.jsx(Ns,{display:wi(f.spawnEnvelopeMs,Zt)}),note:"Coordinator-measured; includes slot wait + post-exit work"}),c.jsx(Ca,{label:"Checkpoint latency P50/P95",value:c.jsx(Ns,{display:wi(f.checkpointMs,Zt)}),note:"Session start → first heartbeat"}),c.jsx(Ca,{label:"Reviewer rounds (avg)",value:f.avgReviewerRounds===null?"N/A":f.avgReviewerRounds.toFixed(1),note:`Change-request rate ${rd(f.changeRequestRate)} over ${Ge(f.reviewedIssues)} reviewed`})]})}),c.jsxs("section",{"aria-label":"Failed-attempt waste",children:[c.jsx("h3",{className:"font-ui-display text-sm font-medium text-white/80 mb-2",children:"Failed-attempt waste (known values only)"}),c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[c.jsx(Ca,{label:"Failed cost",value:c.jsx(ga,{display:va(f.failedCostUsd,js)})}),c.jsx(Ca,{label:"Failed tokens",value:c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",children:[c.jsx(ga,{display:va(f.failedTokensIn,Ge,{compact:!0})}),c.jsx("span",{className:"font-ui-display text-xs font-normal text-white/40",children:"in"}),c.jsx("span",{className:"font-ui-display text-xs font-normal text-white/40",children:"·"}),c.jsx(ga,{display:va(f.failedTokensOut,Ge,{compact:!0})}),c.jsx("span",{className:"font-ui-display text-xs font-normal text-white/40",children:"out"})]})}),c.jsx(Ca,{label:"Failed runtime",value:c.jsx(ga,{display:va(f.failedDurationMs,Zt)})})]})]}),c.jsxs("section",{"aria-label":"Phase wall time",children:[c.jsx("h3",{className:"font-ui-display text-sm font-medium text-white/80 mb-2",children:"Phase wall time"}),c.jsx("p",{className:"font-ui-display text-xs text-white/40 mb-2",children:"Composed from the execution-analysis read model over the same issues: exact when agent start/complete events are recorded, inferred usage-envelope backfill otherwise. Rows without evidence read N/A — never a guess. See per-row reasons."}),c.jsx("div",{className:"rounded border border-white/10 bg-panel-elevated/60 overflow-x-auto",children:c.jsxs("table",{className:"w-full min-w-[560px] text-sm",children:[c.jsx("caption",{className:"sr-only",children:"Exclusive phase wall times. Boundaries without defensible evidence are N/A."}),c.jsx("thead",{children:c.jsxs("tr",{className:"font-ui-display text-left text-xs uppercase tracking-wide text-white/40 border-b border-white/10",children:[c.jsx("th",{scope:"col",className:"px-4 py-2 font-medium",children:"Phase"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"P50 / P95"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Why"})]})}),c.jsx("tbody",{className:"divide-y divide-white/5",children:f.phaseWallMs.map(v=>c.jsxs("tr",{className:"tabular-nums",children:[c.jsx("th",{scope:"row",className:"px-4 py-2 text-left font-mono font-medium text-white/85",children:v.phase}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(Ns,{display:wi(v.stat,Zt),compact:!0})}),c.jsx("td",{className:"font-ui-display px-3 py-2 text-xs text-white/45",children:v.stat.reasons.join(", ")})]},v.phase))})]})})]}),c.jsxs("section",{"aria-label":"Comparisons",className:"space-y-4",children:[c.jsxs("h3",{className:"font-ui-display text-sm font-medium text-white/80",children:["Comparisons ",c.jsx("span",{className:"font-normal text-white/40",children:"— sorted by name, never by cost"})]}),c.jsx(ud,{caption:"By role",dimension:"role",rows:s.byRole.map(sd),cohortLink:d}),c.jsx(ud,{caption:"By runtime",dimension:"runtime",rows:s.byRuntime.map(sd),cohortLink:d}),c.jsx(ud,{caption:"By model",dimension:"model",rows:s.byModel.map(sd),cohortLink:d})]}),c.jsxs("section",{"aria-label":"Why attempts failed",children:[c.jsx("h3",{className:"font-ui-display text-sm font-medium text-white/80 mb-2",children:"Why attempts failed"}),c.jsxs("p",{className:"font-ui-display text-xs text-white/40 mb-2",children:["Each issue with a failed attempt is counted once using its primary actionable cause, and may later have recovered. Share is over"," ",Ge(y)," failed ",y===1?"issue":"issues"," in scope."]}),m.length===0?c.jsx("p",{className:"font-ui-display text-sm text-white/45",children:"No failed attempts in this window."}):c.jsx("div",{className:"rounded border border-white/10 bg-panel-elevated/60 overflow-x-auto",children:c.jsxs("table",{className:"w-full min-w-[560px] text-sm",children:[c.jsx("caption",{className:"sr-only",children:"Why attempts failed: each issue counted once by primary cause. Cause not recorded is its own bucket and is never promoted."}),c.jsx("thead",{children:c.jsxs("tr",{className:"font-ui-display text-left text-xs uppercase tracking-wide text-white/40 border-b border-white/10",children:[c.jsx("th",{scope:"col",className:"px-4 py-2 font-medium",children:"Failure"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Domain"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Issues"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Share"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Example issues"})]})}),c.jsx("tbody",{className:"divide-y divide-white/5",children:m.map(v=>c.jsxs("tr",{className:v.isUnknown?"bg-amber-400/5 tabular-nums":"tabular-nums",children:[c.jsxs("th",{scope:"row",className:"px-4 py-2 text-left text-white/85",children:[c.jsx("span",{className:"font-ui-display block font-medium",title:v.code,children:v.displayCode}),c.jsx("span",{className:`font-ui-display block text-xs font-normal ${v.isUnknown?"text-amber-200/90":"text-white/40"}`,children:v.displayNote})]}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:v.domain}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:v.countText}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",title:v.shareTitle,children:v.shareText}),c.jsx("td",{className:"px-3 py-2",children:c.jsxs("span",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[v.issueIds.map(g=>c.jsx(aa,{to:QS(g),className:"text-cyber-teal hover:underline font-mono text-xs",children:g.slice(0,8)},g)),v.hiddenIssueCount>0&&c.jsxs("span",{className:"font-ui-display text-xs text-white/40",children:["+",v.hiddenIssueCount," more"]})]})})]},v.code))})]})})]})]})]})]})}function WS(){const[n,l]=vy(),s=n.toString(),u=w.useMemo(()=>XS(s),[s]),[d,f]=w.useState(()=>Bx(s)),[m,y]=w.useState(null),[v,g]=w.useState(!0),[b,_]=w.useState(null),[U,K]=w.useState(0);w.useEffect(()=>{f(Bx(s))},[s]),w.useEffect(()=>{let L=!1;return g(!0),_(null),U2(u).then(B=>{L||(y(B),g(!1))}).catch(B=>{L||(_(B instanceof Error?B.message:String(B)),g(!1))}),()=>{L=!0}},[s,U]);const C=L=>{const B=Yy(JS(L));l(B?Object.fromEntries(new URLSearchParams(B)):{})},Y=L=>f(B=>({...B,...L}));return c.jsxs("div",{className:"flex-1 min-h-0 px-6 py-4 w-full overflow-y-auto",children:[c.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-2 mb-1",children:[c.jsx("h2",{className:"font-ui-display text-lg font-semibold text-white/90",children:"Execution report"}),m&&c.jsxs("p",{className:"font-ui-display text-xs text-white/40",children:["Window ",new Date(m.window.from).toLocaleDateString()," –"," ",new Date(m.window.to).toLocaleDateString()," · generated"," ",new Date(m.meta.generatedAt).toLocaleTimeString()]})]}),c.jsx("p",{className:"font-ui-display text-sm text-white/50 mb-4",children:"Reliability, latency, retry waste, and metadata coverage by role, runtime, and model. Missing cost/token data reads as N/A — never as zero."}),c.jsx("form",{"aria-label":"Report filters",className:"mb-4 p-4 rounded border border-white/10 bg-panel-elevated/60",onSubmit:L=>{L.preventDefault(),C(d)},children:c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"From"}),c.jsx("input",{type:"date",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.fromDate,onChange:L=>Y({fromDate:L.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"To"}),c.jsx("input",{type:"date",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.toDate,onChange:L=>Y({toDate:L.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Repository"}),c.jsx("input",{type:"text",placeholder:"github.com/owner/repo",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.repo,onChange:L=>Y({repo:L.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Role"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.role,onChange:L=>Y({role:L.target.value}),children:[c.jsx("option",{value:"",children:"All roles"}),YS.map(L=>c.jsx("option",{value:L,children:L},L))]})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Runtime"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.runtime,onChange:L=>{Y({runtime:L.target.value})},children:[c.jsx("option",{value:"",children:"All runtimes"}),Dx.map(L=>c.jsx("option",{value:L,children:L},L)),c.jsx("option",{value:"unknown",children:"unknown (missing metadata)"}),d.runtime&&!Dx.includes(d.runtime)&&c.jsxs("option",{value:d.runtime,children:[d.runtime," (from URL)"]})]})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Model"}),c.jsx("input",{type:"text",placeholder:"Any model",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.model,onChange:L=>Y({model:L.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Issue status"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.status,onChange:L=>Y({status:L.target.value}),children:[c.jsx("option",{value:"",children:"All statuses"}),VS.map(L=>c.jsx("option",{value:L,children:L},L))]})]}),c.jsxs("div",{className:"flex items-end gap-2",children:[c.jsx("button",{type:"submit",className:"btn-gold px-4",children:"Apply"}),c.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm text-white/60 hover:text-white",onClick:()=>{f(IS),l({})},children:"Reset"})]})]})}),c.jsx(FS,{loading:v,error:b,report:m,onRetry:()=>K(L=>L+1),cohortLink:(L,B)=>KS(s,L,B)})]})}function qx(n,l){var d;if(!n)return"Not assigned";const s=l.find(f=>f.id===n);if(!s)return"Unavailable — profile removed";const u=`${s.name} · ${wa(s.runtime)}`;return s.healthy?u:`${u} (unhealthy: ${((d=s.issues[0])==null?void 0:d.message)??"needs attention"})`}function Hx(n,l){var u;if(!n)return;const s=l.find(d=>d.id===n);return s?`${s.name} · ${wa(s.runtime)}${s.healthy?" · healthy":` · ${((u=s.issues[0])==null?void 0:u.message)??"unhealthy"}`}`:`Configured profile ${n} is not on record (deleted?)`}function PS({agents:n,initialRepo:l,initialDeveloperId:s,initialReviewerId:u,busy:d,onSave:f,onCancel:m}){var W,oe;const[y,v]=w.useState(l),[g,b]=w.useState(s??""),[_,U]=w.useState(u??""),K=uv(n),C=n.find(J=>J.id===g),Y=n.find(J=>J.id===_),L=xu(C),B=xu(Y),Q=y.trim()===l&&g===(s??"")&&_===(u??"");return c.jsxs("div",{className:"p-3 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[c.jsx("p",{className:"text-xs text-white/50",children:"Edit configuration — repository, developer, and reviewer save together. Queue position is kept, readiness and the wait reason are rechecked, and the change is recorded on the timeline."}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Repository"}),c.jsx("input",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:y,disabled:d,placeholder:"GitHub URL or owner/repo",title:"GitHub URL or owner/repo — normalized to github.com/owner/repo, same validation as issue creation",onChange:J=>v(J.target.value)})]}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Developer"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:g,disabled:d,title:C?`${C.name} · ${wa(C.runtime)}${C.healthy?" · healthy":` · ${((W=C.issues[0])==null?void 0:W.message)??"unhealthy"}`}`:"Pick a developer agent",onChange:J=>b(J.target.value),children:[c.jsx("option",{value:"",children:"Developer agent…"}),K.map(J=>c.jsx("option",{value:J.id,title:Pn(J),children:(J.healthy?"● ":"○ ")+Pn(J)},J.id))]}),L&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:L})]}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Reviewer"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:_,disabled:d,title:Y?`${Y.name} · ${wa(Y.runtime)}${Y.healthy?" · healthy":` · ${((oe=Y.issues[0])==null?void 0:oe.message)??"unhealthy"}`}`:"Pick a reviewer agent",onChange:J=>U(J.target.value),children:[c.jsx("option",{value:"",children:"Reviewer agent…"}),K.map(J=>J.runtime==="muse_code"?c.jsx("option",{value:J.id,disabled:!0,title:"Muse Code cannot be a reviewer (developer role only)",children:`○ ${J.name} · ${wa(J.runtime)} — reviewer not supported`},J.id):c.jsx("option",{value:J.id,title:Pn(J),children:(J.healthy?"● ":"○ ")+Pn(J)},J.id))]}),B&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:B})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-1.5 text-sm disabled:opacity-50",disabled:d||!y.trim()||!g||!_||Q,title:"Save via the issue PATCH contract — keeps queue position, rechecks readiness and the wait reason",onClick:()=>f(y.trim(),g,_),children:"Save configuration"}),c.jsx("button",{type:"button",className:"px-4 py-1.5 text-sm text-white/60 hover:text-white disabled:opacity-50",disabled:d,onClick:m,children:"Cancel"})]})]})}function ej({issue:n,agents:l,canEdit:s,editing:u,busy:d,onBeginEdit:f,onSave:m,onCancel:y}){return c.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-white/[0.03] space-y-1.5",children:[c.jsx("p",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Configuration"}),c.jsxs("p",{className:"text-sm text-white/85",title:`Exact repository identity: ${n.repo}`,children:[c.jsx("span",{className:"text-white/45",children:"Repository "}),n.repo]}),c.jsxs("p",{className:"text-sm text-white/85",title:Hx(n.developerAgentId,l),children:[c.jsx("span",{className:"text-white/45",children:"Developer "}),qx(n.developerAgentId,l)]}),c.jsxs("p",{className:"text-sm text-white/85",title:Hx(n.reviewerAgentId,l),children:[c.jsx("span",{className:"text-white/45",children:"Reviewer "}),qx(n.reviewerAgentId,l)]}),s&&!u&&c.jsx("button",{type:"button",className:"text-xs text-cyber-teal hover:underline disabled:opacity-50",disabled:d,onClick:f,children:"Edit configuration"}),s&&u&&c.jsx(PS,{agents:l,initialRepo:n.repo,initialDeveloperId:n.developerAgentId,initialReviewerId:n.reviewerAgentId,busy:d,onSave:m,onCancel:y})]})}function Pr(n){return n==="developer"?"Developer":n==="reviewer"?"Reviewer":"Worker"}const cd={"issue.created":()=>"Issue created","issue.reassigned":()=>"Configuration updated","workflow.started":()=>"Workflow started","worker.started":n=>`${Pr(n.actorType)} started${n.round?` (round ${n.round})`:""}`,"worker.completed":n=>`${Pr(n.actorType)} finished${n.round?` (round ${n.round})`:""}`,"worker.failed":n=>`${Pr(n.actorType)} failed${n.round?` (round ${n.round})`:""}`,"worker.deferred":n=>{var l;return((l=_s(n.payloadJson))==null?void 0:l.outcome)==="deck_unavailable"?`Waiting for Agent Deck${n.round?` (round ${n.round})`:""}`:`${Pr(n.actorType)} deferred${n.round?` (round ${n.round})`:""}`},"worktree.ready":()=>"Worktree ready","deck.connected":()=>"Deck connected","brief.resolved":()=>"Brief resolved","branch.pushed":()=>"Branch pushed","checks.started":()=>"Checks started","pull_request.opened":()=>"Developer opened the PR","pull_request.updated":()=>"Developer updated the PR","checks.completed":()=>"Checks completed","review.submitted":()=>"Reviewer submitted a review","repair.started":n=>`Repair round ${n.round??"?"} started`,"guidance.added":()=>"Guidance added","task_snapshot.refreshed":()=>"Task snapshot refreshed","human_action.requested":()=>"Human action requested","human_action.resolved":()=>"Human action resolved","final_review.requested":()=>"Final review requested","issue.completed":()=>"Issue completed","issue.closed":()=>"Issue closed"};function _s(n){if(!n)return null;try{return JSON.parse(n)}catch{return null}}const tj={approved:"text-cyber-teal",changes_requested:"text-amber-300",escalated:"text-red-300"};function aj({e:n}){var l;if(n.type==="pull_request.opened"||n.type==="pull_request.updated"){const s=_s(n.payloadJson);return n.artifactRef?c.jsxs("a",{href:n.artifactRef,target:"_blank",rel:"noreferrer",className:"text-sm text-cyber-teal hover:underline",children:["PR ",s!=null&&s.prNumber?`#${s.prNumber}`:""," ",s!=null&&s.branch?`(${s.branch})`:""]}):null}if(n.type==="review.submitted"){const s=_s(n.payloadJson);return s?c.jsxs("span",{className:"text-sm",children:[c.jsx("span",{className:tj[s.verdict]??"text-white/70",children:s.verdict.replace("_"," ")}),(l=s.findings)!=null&&l.length?` · ${s.findings.length} finding(s)`:""]}):null}if(n.type==="guidance.added"){const s=_s(n.payloadJson);return s!=null&&s.markdown?c.jsxs("span",{className:"text-sm text-white/55 italic",children:["— ",s.markdown]}):null}if(n.type==="worker.started"||n.type==="worker.completed"||n.type==="worker.failed"||n.type==="worker.deferred"||n.type==="worktree.ready"||n.type==="deck.connected"||n.type==="brief.resolved"||n.type==="branch.pushed"||n.type==="checks.started"||n.type==="checks.completed"){const s=_s(n.payloadJson);if(!s)return null;const u=[];return s.runtime&&u.push(s.runtime),s.model&&u.push(s.model),s.sessionId&&u.push(s.sessionId.slice(0,8)),s.worktreePath&&u.push(s.worktreePath),s.resolution&&u.push(s.resolution),s.branch&&u.push(s.branch),s.commitsAhead!=null&&u.push(`${s.commitsAhead} ahead`),s.snapshot&&u.push(s.snapshot),(n.type==="worker.deferred"||n.type==="worker.failed")&&(s.reason&&u.push(s.reason),n.type==="worker.deferred"&&s.until&&u.push(`until ${new Date(s.until).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`)),u.length===0?null:c.jsxs("span",{className:"text-xs text-white/40",children:["· ",u.join(" · ")]})}return null}function nj(n){var l;return((l=cd[n.type])==null?void 0:l.call(cd,n))??n.type}const $x={human:"You",system:"System",developer:"Developer",reviewer:"Reviewer"},lj={human:"bg-cyber-teal/15 text-cyber-teal",system:"bg-white/10 text-white/50",developer:"bg-cyber-violet/20 text-cyber-violet-light",reviewer:"bg-[#C4B643]/25 text-[#E8DC7A]"};function ij(n){return n.actorRef?`${$x[n.actorType]} · ${n.actorRef}`:$x[n.actorType]}function sj({events:n}){return n.length===0?c.jsx("p",{className:"text-white/40 text-sm",children:"No activity yet."}):c.jsx("div",{className:"space-y-1",children:n.map(l=>c.jsxs("div",{className:"flex items-baseline gap-3 py-1.5 border-b border-white/5 last:border-0",children:[c.jsx("span",{className:"text-xs text-white/35 w-20 shrink-0 tabular-nums",children:new Date(l.ts).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),c.jsx("span",{className:`text-[11px] leading-none px-1.5 py-0.5 rounded shrink-0 ${lj[l.actorType]}`,children:ij(l)}),c.jsx("span",{className:"text-sm text-white/80",children:nj(l)}),c.jsx(aj,{e:l})]},l.id))})}function Ta(n){if(n==null||!Number.isFinite(n))return null;if(n<1e3)return"<1s";const l=Math.round(n/1e3);if(l<60)return`${l}s`;const s=Math.floor(l/60);if(s<60){const f=l%60;return f===0?`${s}m`:`${s}m ${f}s`}const u=Math.floor(s/60),d=s%60;return d===0?`${u}h`:`${u}h ${d}m`}function Yx(n){return n==null||!Number.isFinite(n)?null:`${Math.round(n).toLocaleString("en-US")} tokens`}function rj(n){return n==null||!Number.isFinite(n)?null:`$${n.toFixed(2)}`}const uj={queue_wait:"Queue / admission wait",coordinator_setup:"Setup",agent_process:"Agent process",coordinator_validation_publish:"Validation / publish",coordinator_work:"Coordinator work"},Vx={model_provider_wait:"Silent · waiting on model provider",tool_or_subprocess_in_flight:"Silent · tool/subprocess in flight",host_suspended:"Silent · host suspended",no_structured_output:"Silent · no structured output yet",unknown:"Silent · unknown cause"},Rd={worktree:"worktree",commit:"commit",verification_receipt:"verification receipt",publish_only:"publish-only result"},cj=new Set(["failed","timed_out","error"]);function Wd(n){return n.replace(/_/g," ")}function Ts(n,l){const s=`Evidence quality: ${n}`;return l.length>0?`${s} — ${l.join(", ")}`:s}function ba({quality:n,reasons:l}){return c.jsxs("span",{className:`text-[11px] tabular-nums ${n==="exact"?"text-white/60":n==="inferred"?"text-amber-300/90":"text-white/60 italic"}`,title:Ts(n,l),children:["· ",n,l.length>0&&c.jsxs("span",{className:"sr-only",children:[" (",l.join(", "),")"]})]})}function Wn({reasons:n}){const l=n.length>0?n.join(", "):"no reason recorded";return c.jsxs("span",{className:"text-white/45 italic",title:`Unavailable — ${l}`,children:["Unavailable",c.jsxs("span",{className:"text-[11px]",children:[" — ",l]})]})}function eu({covered:n,format:l,unit:s}){if(n.value==null)return c.jsx(Wn,{reasons:n.reasons});const u=n.known<n.total;return c.jsxs("span",{title:`${Ts(n.quality,n.reasons)} · known ${n.known} of ${n.total} ${s}`,children:[l(n.value),c.jsx(ba,{quality:n.quality,reasons:n.reasons}),u&&c.jsxs("span",{className:"text-[11px] text-white/60",title:`Known for ${n.known} of ${n.total} ${s}`,children:[" ","(known ",n.known," of ",n.total,")"]})]})}function Zx({cause:n,primary:l}){return c.jsxs("div",{className:l?"p-2.5 rounded border border-red-400/30 bg-red-500/10 space-y-1":"p-2 rounded border border-white/10 bg-white/[0.02] space-y-1",children:[c.jsxs("p",{className:l?"text-sm font-medium text-red-200":"text-xs text-white/60",children:[l?"First failure: ":"Consequence: ",Wd(n.code)]}),c.jsx("p",{className:l?"text-sm text-white/85 whitespace-pre-wrap break-words":"text-xs text-white/55 whitespace-pre-wrap break-words",children:n.rawReason}),c.jsxs("p",{className:"text-[11px] text-white/60",title:Ts(n.quality==="exact"?"exact":"inferred",[`evidence: ${n.evidenceSource}`,`confidence: ${n.confidence}`]),children:[n.domain," · ",n.confidence," confidence · via ",n.evidenceSource.replace(/_/g," ")," · ",n.quality,n.occurredAt?` · ${new Date(n.occurredAt).toLocaleString()}`:""]})]})}function oj({interval:n}){const l=Vx[n.category??"unknown"]??Vx.unknown,s=Ta(n.durationMs),u=n.category==="host_suspended";return c.jsxs("li",{className:`flex flex-wrap items-baseline gap-x-2 gap-y-0.5 py-1 border-b border-white/5 last:border-0 ${u?"text-amber-200/90":"text-white/70"}`,children:[c.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded border shrink-0 ${u?"border-amber-400/40 bg-amber-500/10":"border-white/15 bg-white/5"}`,title:u?"Overlapping durable host-sleep evidence split this gap — the host was suspended, not the agent.":"Observational gap with no new structured activity — not a diagnosis of what the agent was doing.",children:l}),c.jsx("span",{className:"text-xs tabular-nums",children:s??c.jsx(Wn,{reasons:n.reasons})}),c.jsx(ba,{quality:n.quality,reasons:n.reasons})]})}function dj({attempt:n}){const l=n.reuseKinds;return l===void 0?c.jsx("span",{className:"ml-2 text-[11px] px-1.5 py-0.5 rounded border border-white/15 bg-white/5 text-white/60 italic",title:"Reuse unknown for this retry — no reuse evidence recorded.",children:"reuse unknown"}):l.length===0?c.jsx("span",{className:"ml-2 text-[11px] px-1.5 py-0.5 rounded border border-white/15 bg-white/5 text-white/60",title:"Cold retry — no prior worktree, commit, or verification was reused.",children:"cold retry"}):c.jsx(c.Fragment,{children:l.map(s=>c.jsxs("span",{className:"ml-2 text-[11px] px-1.5 py-0.5 rounded border border-cyber-teal/40 bg-cyber-teal/10 text-cyber-teal",title:`This retry preserved the prior ${Rd[s]??s} instead of starting cold.`,children:["reused ",Rd[s]??s]},s))})}function fj({attempt:n,isRetry:l}){const s=Ta(n.setup.durationMs),u=Ta(n.agentProcess.durationMs),d=Ta(n.validationPublish.durationMs),f=l&&n.role==="developer";return c.jsxs("li",{className:"py-1.5 border-b border-white/5 last:border-0 space-y-0.5",children:[c.jsxs("p",{className:"text-sm text-white/85",children:[c.jsx("span",{className:"capitalize",children:n.role}),c.jsxs("span",{className:"text-white/45",children:[n.runtime?` · ${n.runtime}`:"",n.model?` · ${n.model}`:"",` · round ${n.round} · ${n.status}`]}),n.publishOnly&&c.jsx("span",{className:"ml-2 text-[11px] px-1.5 py-0.5 rounded border border-cyber-violet/40 bg-cyber-violet/10 text-cyber-violet-light",title:"Publish-only attempt: no agent process ran — the coordinator published prior work.",children:"publish-only"}),f&&!n.publishOnly&&c.jsx(dj,{attempt:n})]}),c.jsxs("p",{className:"text-xs text-white/50 tabular-nums",children:[c.jsxs("span",{title:s?void 0:`Setup unavailable — ${n.setup.reasons.join(", ")||"no reason recorded"}`,children:["Setup ",s??c.jsxs("span",{className:"italic",children:["Unavailable — ",n.setup.reasons.join(", ")||"no reason recorded"]})]}),c.jsx(ba,{quality:n.setup.quality,reasons:n.setup.reasons})," · ",c.jsxs("span",{title:u?void 0:`Agent process unavailable — ${n.agentProcess.reasons.join(", ")||"no reason recorded"}`,children:["Agent ",u??c.jsxs("span",{className:"italic",children:["Unavailable — ",n.agentProcess.reasons.join(", ")||"no reason recorded"]})]}),c.jsx(ba,{quality:n.agentProcess.quality,reasons:n.agentProcess.reasons})," · ",c.jsxs("span",{title:d?void 0:`Validation/publish unavailable — ${n.validationPublish.reasons.join(", ")||"no reason recorded"}`,children:["Validation/publish ",d??c.jsxs("span",{className:"italic",children:["Unavailable — ",n.validationPublish.reasons.join(", ")||"no reason recorded"]})]}),c.jsx(ba,{quality:n.validationPublish.quality,reasons:n.validationPublish.reasons})]}),n.failureCauses.length>0&&c.jsxs("p",{className:"text-[11px] text-white/60",children:["Failures: ",n.failureCauses.map(m=>Wd(m.code)).join(", ")]})]})}function hj({analysis:n}){const l=Ta(n.elapsed.durationMs),s=Ta(n.exclusiveTotalMs),u=Ta(n.firstCheckpoint.msSinceWorkflowStart),d=n.nested.filter(C=>C.kind!=="unexplained_silence"),f=n.attempts.flatMap(C=>C.silence),m=n.attempts.length>0&&n.attempts.every(C=>C.silence.length===0&&C.silenceQuality==="unavailable"),y=n.attempts.filter(C=>C.silence.length===0&&C.silenceQuality==="unavailable"),v=n.waste.failedAttempts>0||n.waste.publishOnlyAttempts>0||n.attempts.some(C=>C.failureCauses.length>0||cj.has(C.status)),g=Ta(n.humanWaitMs),b=n.retry.reuseRate==null?null:`${Math.round(n.retry.reuseRate*100)}% reused`,U=(n.retry.preservedKinds??[]).map(C=>Rd[C]??C),K=n.waste.failedAttempts>0||n.waste.publishOnlyAttempts>0;return c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{children:[c.jsxs("p",{className:"text-sm text-white/85 tabular-nums",children:["Elapsed ",l??c.jsx(Wn,{reasons:n.elapsed.reasons}),c.jsx(ba,{quality:n.elapsed.quality,reasons:n.elapsed.reasons})]}),c.jsxs("p",{className:"text-xs text-white/45 tabular-nums",title:"Unioned top-level phases with overlaps removed (human wait excluded). Nested waits below explain phases — they are never added to this total.",children:["Exclusive phase total ",s??c.jsx(Wn,{reasons:n.exclusiveTotalReasons}),c.jsx(ba,{quality:n.exclusiveTotalQuality,reasons:n.exclusiveTotalReasons}),c.jsx("span",{children:" · overlaps unioned, not summed"})]})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Phase breakdown"}),c.jsx("ul",{children:n.unionedDurations.map(C=>{const Y=Ta(C.durationMs);return c.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-2 py-0.5 text-sm",children:[c.jsx("span",{className:"text-white/70 w-36 shrink-0",children:uj[C.phase]??C.phase}),c.jsx("span",{className:"text-white/85 tabular-nums",children:Y??c.jsx(Wn,{reasons:C.reasons})}),c.jsx(ba,{quality:C.quality,reasons:C.reasons}),C.known<C.total&&c.jsxs("span",{className:"text-[11px] text-white/60",children:["(known ",C.known," of ",C.total,")"]})]},C.phase)})}),c.jsxs("p",{className:"text-xs text-white/45 tabular-nums mt-1",children:["Human wait ",g??c.jsx(Wn,{reasons:n.humanWaitReasons}),c.jsx(ba,{quality:n.humanWaitQuality,reasons:n.humanWaitReasons}),c.jsx("span",{title:"Human wait is tracked separately — it never adds to the phase total.",children:" · never additive"})]}),d.length>0&&c.jsx("ul",{className:"mt-1",children:d.map((C,Y)=>c.jsxs("li",{className:"text-xs text-white/50 tabular-nums",children:[c.jsxs("span",{title:"Nested drill-down: explains its parent phase, never adds to the total.",children:["↳ ",C.kind==="human_wait"?"Human wait":C.category??C.kind]})," ",Ta(C.durationMs)??c.jsx(Wn,{reasons:C.reasons}),c.jsx(ba,{quality:C.quality,reasons:C.reasons})]},Y))})]}),c.jsxs("div",{children:[c.jsxs("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:["Attempts (",n.attempts.length,")"]}),n.attempts.length===0?c.jsx("p",{className:"text-xs text-white/45 italic",children:"No attempts recorded yet."}):c.jsx("ul",{children:n.attempts.map((C,Y)=>c.jsx(fj,{attempt:C,isRetry:Y>0},C.sessionId))})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Failure"}),n.primaryFailure?c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(Zx,{cause:n.primaryFailure,primary:!0}),n.consequenceCauses.length>0&&c.jsx("div",{className:"space-y-1 opacity-80",children:n.consequenceCauses.map((C,Y)=>c.jsx(Zx,{cause:C,primary:!1},`${C.code}-${Y}`))})]}):v?c.jsxs("p",{className:"text-sm text-white/60 italic",title:Ts("unavailable",n.primaryFailureReasons),children:["Unknown — ",n.primaryFailureReasons.join(", ")||"no failure evidence recorded"]}):c.jsx("p",{className:"text-sm text-white/45",children:"No failure recorded."})]}),c.jsxs("div",{children:[c.jsxs("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:["Retry waste (",n.waste.failedAttempts," failed attempt",n.waste.failedAttempts===1?"":"s",")"]}),K?c.jsxs("p",{className:"text-sm text-white/85 flex flex-wrap gap-x-3 gap-y-0.5 tabular-nums",children:[c.jsxs("span",{title:"Failed-attempt agent-process time over known values only",children:["Runtime ",c.jsx(eu,{covered:n.waste.runtimeMs,format:C=>Ta(Math.round(C))??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt input tokens over known values only",children:["In ",c.jsx(eu,{covered:n.waste.tokensIn,format:C=>Yx(C)??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt output tokens over known values only",children:["Out ",c.jsx(eu,{covered:n.waste.tokensOut,format:C=>Yx(C)??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt known cost over known values only",children:["Cost ",c.jsx(eu,{covered:n.waste.costUsd,format:C=>rj(C)??"?",unit:"attempts"})]})]}):c.jsx("p",{className:"text-sm text-white/45",children:"No failed attempts — no retry waste."})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"First checkpoint"}),n.firstCheckpoint.msSinceWorkflowStart==null&&n.firstCheckpoint.kind==null?c.jsxs("p",{className:"text-sm text-white/60 italic",title:Ts(n.firstCheckpoint.quality,n.firstCheckpoint.reasons),children:["Unavailable — ",n.firstCheckpoint.reasons.join(", ")||"no checkpoint recorded"]}):c.jsxs("p",{className:"text-sm text-white/85 tabular-nums",children:[n.firstCheckpoint.kind?Wd(n.firstCheckpoint.kind):"Checkpoint",n.firstCheckpoint.observedSha?` · ${n.firstCheckpoint.observedSha.slice(0,12)}`:"",u?` · ${u} after workflow start`:"",c.jsx(ba,{quality:n.firstCheckpoint.quality,reasons:n.firstCheckpoint.reasons})]})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Retry reuse"}),c.jsxs("div",{className:"flex flex-wrap gap-1.5",role:"group","aria-label":"Retry reuse summary",children:[c.jsxs("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-cyber-teal/40 bg-cyber-teal/10 text-cyber-teal",title:"Retries that preserved prior work — a reused worktree, commit, or verification receipt.",children:["Reused ",n.retry.reused]}),c.jsxs("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-white/15 bg-white/5 text-white/60",title:"Retries that started cold — no prior worktree, commit, or verification was reused.",children:["Cold ",n.retry.cold]}),n.retry.unknown>0&&c.jsxs("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-white/15 bg-white/5 text-white/60 italic",title:`Unknown reuse for ${n.retry.unknown} retr${n.retry.unknown===1?"y":"ies"} — ${n.retry.reasons.join(", ")||"no reuse evidence"}.`,children:["Unknown ",n.retry.unknown]}),n.retry.publishOnly>0&&c.jsxs("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-cyber-violet/40 bg-cyber-violet/10 text-cyber-violet-light",title:"Publish-only retries ran no agent process — the coordinator published already-verified work.",children:["Publish-only ",n.retry.publishOnly]}),c.jsxs("span",{className:"text-[11px] text-white/60 tabular-nums self-center",children:[n.retry.retries===0?"No retries":b??c.jsx(Wn,{reasons:n.retry.reasons}),c.jsx(ba,{quality:n.retry.quality,reasons:n.retry.reasons})]})]}),c.jsx("p",{className:"text-[11px] text-white/60 mt-0.5",children:n.retry.retries===0?"No retries — nothing to preserve.":U.length>0?`Preserved: ${U.join(", ")}.`:n.retry.unknown>0?`Preservation unknown for ${n.retry.unknown} retr${n.retry.unknown===1?"y":"ies"} — no reuse evidence.`:"No prior work preserved — every retry started cold."})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Silence"}),c.jsx("p",{className:"text-[11px] text-white/60 mb-1",children:"Silence is observational — gaps with no new structured activity. It describes what was observed, never a diagnosis."}),f.length===0?m?c.jsx("p",{className:"text-sm text-white/60 italic",children:"Unknown — silence cannot be derived without agent-process bounds."}):c.jsx("p",{className:"text-sm text-white/45",children:"No silence observed."}):c.jsxs(c.Fragment,{children:[c.jsx("ul",{"aria-label":"Observed silence intervals",children:f.map((C,Y)=>c.jsx(oj,{interval:C},Y))}),y.length>0&&c.jsx("ul",{"aria-label":"Attempts with unknown silence",className:"mt-1",children:y.map(C=>c.jsxs("li",{className:"text-[11px] text-white/60 italic py-0.5",children:["Silence unknown for attempt ",C.sessionId.length>12?`${C.sessionId.slice(0,8)}…`:C.sessionId," —"," ",C.silenceReasons.join(", ")||"no silence evidence recorded"]},C.sessionId))})]})]})]})}function mj({issueId:n}){const[l,s]=w.useState(null),[u,d]=w.useState(null),[f,m]=w.useState(!0);return w.useEffect(()=>{s(null),d(null),m(!0);let y=!1;return A2(n).then(v=>{y||(s(v),m(!1))}).catch(v=>{y||(/not found/i.test(String(v))?(s(null),d(null)):d(String(v).replace(/^Error:\s*/i,"")),m(!1))}),()=>{y=!0}},[n]),c.jsxs("section",{"aria-labelledby":"execution-analysis-heading",className:"mb-4 p-3 rounded border border-white/10 bg-white/[0.03]",children:[c.jsx("h3",{id:"execution-analysis-heading",className:"font-ui-display text-sm font-medium text-white/85 mb-2",children:"Execution analysis"}),f&&c.jsx("p",{className:"text-xs text-white/40",children:"Loading execution analysis…"}),!f&&u&&c.jsx("p",{className:"text-xs text-red-300",children:u}),!f&&!u&&!l&&c.jsx("p",{className:"text-xs text-white/45",children:"No execution analysis yet — start the workflow to see where time goes."}),!f&&!u&&l&&c.jsx(hj,{analysis:l})]})}const pj="web";function xj(n){try{const l=JSON.parse(n);return typeof l.text=="string"?l.text:JSON.stringify(l,null,2)}catch{return n}}function od(n){const l=Math.floor(n/6e4);return l<60?`${l}m`:`${Math.floor(l/60)}h ${l%60}m`}function yj(n){if(!n)return"no heartbeat yet";const l=Math.max(0,Math.floor((Date.now()-new Date(n).getTime())/1e3));return l<5?"just now":l<60?`${l}s ago`:`${Math.floor(l/60)}m ago`}function As(n){if(!n)return null;const l=n.split(/[/\\]/).filter(Boolean);return l.length<=2?n:l.slice(-2).join("/")}function dd(n){var l;return[n.branch,n.tipLabel,(l=n.worktree)!=null&&l.path?As(n.worktree.path):null].filter(Boolean).join(" · ")}function fd(n){var l;return[n.restartRisk?"restart risk":null,(l=n.worktree)!=null&&l.preserved?"dirty worktree preserved":null].filter(Boolean).map(s=>` · ${s}`).join("")}function hd(n){var l;return!!(n.restartRisk||(l=n.worktree)!=null&&l.preserved)}function vj(n,l){return!n||!l?!1:n===l?!0:n.includes(l)}function gj({busy:n,onConfirm:l,onCancel:s}){return c.jsxs("div",{className:"mt-2 p-3 rounded border border-red-400/30 bg-red-500/10 space-y-2",children:[c.jsx("p",{className:"text-sm text-white/90 font-medium",children:"Close this issue?"}),c.jsx("p",{className:"text-sm text-white/70",children:"It will not execute. Any queue entry will be removed. History is retained and can be found as closed work — filter the Issues list by status closed or open this page directly."}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"px-4 py-1.5 text-sm rounded border border-red-400/50 text-red-200 hover:bg-red-500/20 disabled:opacity-50",disabled:n,onClick:l,children:"Close issue"}),c.jsx("button",{type:"button",className:"font-ui-display px-4 py-1.5 text-sm text-white/60 hover:text-white",onClick:s,children:"Keep issue"})]})]})}function bj(n){const l=n.humanActions.find(s=>s.status==="open");if(l)return Ly(l).title;switch(n.issue.currentOwner){case"developer":return"Waiting on the developer";case"reviewer":return"Waiting on the reviewer";case"human":return"Waiting on you";default:return n.issue.status==="done"||n.issue.status==="closed"?"Complete":"Idle"}}function wj({issueId:n,detail:l,agents:s,onHumanActionsChanged:u,refresh:d,onError:f}){var Qt;const[m,y]=w.useState(null),[v,g]=w.useState({}),[b,_]=w.useState(""),[U,K]=w.useState(!1),[C,Y]=w.useState(""),[L,B]=w.useState(""),[Q,W]=w.useState(""),[oe,J]=w.useState(!1),[ke,I]=w.useState(null),[be,$e]=w.useState(!1),[xt,ot]=w.useState(!1),[tt,Ct]=w.useState(null),[vt,Fe]=w.useState({}),D=G=>f(String(G)),{issue:Z,timeline:ce,humanActions:Re,usageSummary:Ce,readiness:j,humanWaitMs:H,interventionCount:F,latestWorkflowInstance:ee,activeWorkerSession:le,liveProgress:xe,latestSessionFailure:he,branchTipStatus:De,queued:Ye,queueEntry:Na}=l,Lt=s.find(G=>G.id===Z.developerAgentId),la=Lt&&!Lt.healthy,Qa=((Qt=Lt==null?void 0:Lt.issues[0])==null?void 0:Qt.message)??"Developer agent is unhealthy",Le=ee?new Date(ee.completedAt??Date.now()).getTime()-new Date(ee.startedAt).getTime():0,gt=Re.filter(G=>G.status==="open"),Xa=j.ok===!1||gt.some(G=>G.actionType==="product_scope_decision"),Te=ee!=null&&ee.completedAt===null,tl=Z.status==="ready"&&!Te,Ka=Z.status==="ready"&&!Te,za=le&&le.status==="running"&&(Z.status==="developing"||Z.status==="reviewing"||Z.status==="repairing"),Sn=!!he&&!za,al=async()=>{b.trim()&&(await L2(n,b),_(""),d())},ki=()=>{Y(Z.title),B(Z.description??""),W(Z.acceptanceCriteria??""),K(!0)},St=async()=>{J(!0),f(null);try{await kd(n,{title:C.trim()||void 0,description:L.trim()||null,acceptanceCriteria:Q.trim()||null}),K(!1),d()}catch(G){D(G)}finally{J(!1)}},ia=async()=>{J(!0),f(null);try{const G=await Iy(n);I(G.state==="admitted"?null:`Queued at position ${G.position}${G.waitReason?` — ${G.waitReason}`:""}`),d()}catch(G){D(G)}finally{J(!1)}},Ja=async()=>{J(!0),f(null);try{await O2(n),d()}catch(G){D(G)}finally{J(!1)}},Ia=async()=>{J(!0),f(null);try{await Fy(n),I(null),$e(!1),d()}catch(G){D(G),d()}finally{J(!1)}},Tt=async(G,ye,it)=>{J(!0),f(null);try{await kd(n,{repo:G,developerAgentId:ye,reviewerAgentId:it}),$e(!1),d()}catch(Aa){$e(!1),D(Aa),d()}finally{J(!1)}},lt=async()=>{J(!0),f(null);try{await Wy(n),d()}catch(G){D(G)}finally{J(!1)}},nl=async()=>{J(!0),f(null);try{await T2(n),ot(!1),Ct("Issue closed — it will not execute. History is retained and can be found as closed work."),d()}catch(G){D(G)}finally{J(!1)}},Ol=async()=>{if(confirm("Abort this workflow? The current worker will stop and the issue will close. History and evidence are kept.")){J(!0),f(null);try{await C2(n),d()}catch(G){D(G)}finally{J(!1)}}},ll=async(G,ye,it)=>{J(!0),f(null);try{await Py(G,pj,ye,it),u(),d()}catch(Aa){D(Aa)}finally{J(!1)}},_a=()=>{m||E2(n).then(y).catch(G=>D(G))},jt=G=>{v[G]||(g(ye=>({...ye,[G]:{content:"",loading:!0}})),k2(n,G).then(ye=>g(it=>({...it,[G]:{content:ye.content,loading:!1}}))).catch(ye=>g(it=>({...it,[G]:{content:"",loading:!1,error:String(ye)}}))))};return c.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-4",children:c.jsxs("div",{className:"max-w-3xl",children:[c.jsx(aa,{to:"/issues",className:"font-ui-display inline-block text-sm text-white/50 hover:text-white mb-3",children:"← Issues"}),c.jsxs("div",{className:"flex items-start justify-between gap-4 mb-4",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-lg font-semibold text-white/90",children:Z.title}),c.jsxs("p",{className:"text-xs text-white/45 mt-1",children:["Owner: ",c.jsx("span",{className:"capitalize",children:Z.currentOwner}),Z.currentIntent?` · ${Z.currentIntent}`:""]}),c.jsxs("div",{className:"flex flex-wrap gap-3 mt-2 text-xs text-white/40",children:[Z.prUrl&&c.jsxs("a",{href:Z.prUrl,target:"_blank",rel:"noreferrer",className:"text-cyber-teal hover:underline",children:["PR #",Z.prNumber]}),Z.externalUrl&&c.jsx("a",{href:Z.externalUrl,target:"_blank",rel:"noreferrer",className:"text-cyber-teal hover:underline",children:Z.externalLabel??"External link"}),c.jsxs("span",{children:["Round ",Z.currentRound,"/",Z.maxReviewRounds]}),c.jsxs("span",{children:["Infra attempts ",Z.infraAttempts,"/",Z.maxInfraAttempts]}),c.jsxs("span",{title:"Wall-clock time from workflow start to completion (or now)",children:[od(Le)," elapsed"]}),c.jsxs("span",{title:`${Ce.totalTokensIn} in / ${Ce.totalTokensOut} out tokens`,children:["$",Ce.totalCostUsd.toFixed(2)]}),H>0&&c.jsxs("span",{title:"Time spent waiting on a human, excluding autonomous processing",children:[od(H)," human wait"]}),F>0&&c.jsxs("span",{children:[F," intervention",F===1?"":"s"]})]})]}),c.jsx(nv,{status:Z.status})]}),tt&&c.jsx("div",{className:"mb-4 p-3 rounded border border-white/15 bg-white/[0.04]",children:c.jsx("p",{className:"text-sm text-white/85",children:tt})}),c.jsx(ej,{issue:Z,agents:s,canEdit:Ka,editing:be,busy:oe,onBeginEdit:()=>$e(!0),onSave:(G,ye,it)=>void Tt(G,ye,it),onCancel:()=>$e(!1)}),c.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-panel-elevated/40 flex items-start justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-xs text-white/45",children:"Next"}),c.jsx("p",{className:"text-sm text-white/85",children:bj(l)})]}),Te&&c.jsx("button",{type:"button",className:"btn-ghost-danger px-3 py-1.5 text-xs shrink-0 disabled:cursor-not-allowed disabled:opacity-60",disabled:oe,onClick:Ol,children:"Abort workflow"})]}),Na&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-cyber-teal/30 bg-cyber-teal/5",children:[c.jsxs("p",{className:"text-xs text-cyber-teal font-medium uppercase tracking-wide",children:["Queued · position ",Na.position]}),c.jsx("p",{className:"text-sm text-white/80 mt-0.5",children:Na.waitReason??"Next up — starts as soon as the coordinator ticks"})]}),za&&le&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-cyber-teal/35 bg-cyber-teal/5 space-y-1.5",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-cyber-teal animate-pulse","aria-hidden":!0}),c.jsx("p",{className:"text-xs text-cyber-teal font-medium uppercase tracking-wide",children:"Running now"})]}),c.jsxs("p",{className:"text-sm text-white/90",children:[c.jsx("span",{className:"capitalize",children:le.role}),le.runtime?` · ${le.runtime}`:"",le.model?` · ${le.model}`:"",` · round ${le.round}`]}),c.jsxs("p",{className:"text-sm text-[#C4B643] truncate",title:xe??Z.currentIntent??"session started",children:["Last progress: ",xe??Z.currentIntent??"session started"]}),De&&c.jsxs("p",{className:`text-xs ${hd(De)?"text-amber-300":"text-white/55"}`,title:dd(De),children:["Branch tip: ",De.tipLabel,fd(De)]}),xe&&Z.currentIntent&&!/session running/i.test(Z.currentIntent)&&!vj(Z.currentIntent,xe)&&c.jsx("p",{className:"text-xs text-white/45 truncate",title:Z.currentIntent,children:Z.currentIntent}),c.jsxs("p",{className:"text-xs text-white/45",children:["Heartbeat ",yj(le.heartbeatAt),As(le.worktreePath)?` · ${As(le.worktreePath)}`:""]}),le.logPath&&c.jsxs("p",{className:"text-xs text-white/40 font-mono break-all",title:le.logPath,children:["Log: ",As(le.logPath)??le.logPath]})]}),Sn&&he&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-red-400/30 bg-red-500/10 space-y-1.5",children:[c.jsx("p",{className:"text-xs text-red-300 font-medium uppercase tracking-wide",children:"Latest session failure"}),c.jsx("p",{className:"text-sm text-white/90 whitespace-pre-wrap break-words",children:he.reason}),c.jsxs("p",{className:"text-xs text-white/45",children:[he.role?c.jsx("span",{className:"capitalize",children:he.role}):"Worker",he.outcome?` · ${he.outcome}`:"",` · ${new Date(he.when).toLocaleString()}`,` · infra ${he.infraAttempts}/${he.maxInfraAttempts}`]}),De&&c.jsxs("p",{className:`text-xs ${hd(De)?"text-amber-300":"text-white/55"}`,title:dd(De),children:["Branch tip: ",De.tipLabel,fd(De)]}),he.logPath&&c.jsxs("p",{className:"text-xs text-white/40 font-mono break-all",title:he.logPath,children:["Log: ",As(he.logPath)??he.logPath]})]}),De&&!za&&!Sn&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-white/[0.03] space-y-1",children:[c.jsx("p",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Branch tip"}),c.jsxs("p",{className:`text-sm ${hd(De)?"text-amber-300":"text-white/80"}`,title:dd(De),children:[De.tipLabel,fd(De)]})]}),!j.ok&&!gt.some(G=>G.actionType==="product_scope_decision")&&c.jsx("div",{className:"mb-4 p-3 rounded border border-amber-400/30 bg-amber-500/10",children:c.jsxs("p",{className:"text-xs text-amber-300 font-medium",children:["Not startable yet — missing: ",j.missing.join(", ")]})}),gt.length>0&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-red-400/30 bg-red-500/10 space-y-2",children:[c.jsx("p",{className:"text-xs text-red-300 font-medium",children:"Human action needed"}),gt.map(G=>G.actionType==="product_scope_decision"?c.jsx(vu,{action:G,hideChoicesHint:!0,children:j.ok&&c.jsxs("div",{className:"space-y-1",children:[c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm text-white/85 placeholder:text-white/30",rows:2,placeholder:"Decision note (optional) — shown to the next developer round",value:vt[G.id]??"",disabled:oe,onChange:it=>Fe(Aa=>({...Aa,[G.id]:it.target.value}))}),c.jsx("button",{type:"button",className:"btn-gold px-3 py-1 text-xs",disabled:oe,onClick:()=>ll(G.id,"resume",vt[G.id]),children:"Resume"})]})},G.id):c.jsx(vu,{action:G,disabled:oe,onChoose:it=>ll(G.id,it)},G.id))]}),Xa&&!U&&c.jsx("button",{type:"button",className:"font-ui-display mb-4 text-xs text-cyber-teal hover:underline",onClick:ki,children:"Edit title / description / acceptance criteria"}),U&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[c.jsx("input",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:C,onChange:G=>Y(G.target.value),placeholder:"Title"}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",rows:2,value:L,onChange:G=>B(G.target.value),placeholder:"Description"}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",rows:2,value:Q,onChange:G=>W(G.target.value),placeholder:"Acceptance criteria"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-1.5 text-sm",disabled:oe,onClick:St,children:"Save"}),c.jsx("button",{type:"button",className:"font-ui-display px-4 py-1.5 text-sm text-white/60 hover:text-white",onClick:()=>K(!1),children:"Cancel"})]})]}),(Z.status==="ready"||Z.status==="needs_human"&&gt.length===0)&&c.jsxs("div",{className:"mb-4 space-y-2",children:[la&&c.jsxs("p",{className:"text-sm text-amber-200/90",children:["Fix before Start: ",Qa]}),ke&&c.jsx("p",{className:"text-sm text-amber-200/90",children:ke}),c.jsxs("div",{className:"flex flex-wrap gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-2 disabled:opacity-50",disabled:!j.ok||oe||!!la,title:la?Qa:"Run next — move to the front of the admission queue; runs now if a slot is free, otherwise waits first with a reason",onClick:ia,children:"Run next"}),c.jsx("button",{type:"button",className:"px-4 py-2 text-sm border border-cyber-teal/40 rounded text-cyber-teal hover:bg-cyber-teal/10 disabled:opacity-50",disabled:!j.ok||oe||!!la,title:la?Qa:"Execute now — start immediately, skipping queue order; refuses (changing nothing) when capacity, readiness, blockers, or agent health prevents it",onClick:Ia,children:"Execute now"}),Ye?c.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm border border-white/15 rounded text-white/60 hover:text-white disabled:opacity-50",disabled:oe,onClick:lt,children:"Remove from queue"}):c.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm border border-white/15 rounded text-white/80 hover:border-cyber-teal/50 hover:text-cyber-teal disabled:opacity-50",disabled:oe||Te,title:"Add to queue — append to the end of the admission queue; does not start anything now",onClick:Ja,children:"Add to queue"})]}),Ye&&Ka&&!be&&c.jsx("p",{className:"text-xs text-white/40",children:"Queued — edit repository / agents from the Configuration section above; position is kept."})]}),c.jsx(mj,{issueId:n}),c.jsx("div",{className:"border-t border-white/10 pt-3",children:c.jsx(sj,{events:ce})}),c.jsxs("div",{className:"mt-4 flex gap-2",children:[c.jsx("input",{className:"flex-1 bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"Guide this issue…",value:b,onChange:G=>_(G.target.value),onKeyDown:G=>G.key==="Enter"&&al()}),c.jsx("button",{type:"button",className:"btn-gold px-4",onClick:al,children:"Send"})]}),tl&&c.jsxs("details",{className:"mt-6",children:[c.jsx("summary",{className:"text-xs text-white/45 cursor-pointer hover:text-white/70",children:"More actions"}),c.jsxs("div",{className:"mt-2 space-y-2",children:[c.jsx("p",{className:"text-xs text-white/45",children:"Remove from queue means do not run yet — the issue stays ready and can run later. Close issue means this work is no longer needed — it will never execute."}),xt?c.jsx(gj,{busy:oe,onConfirm:()=>void nl(),onCancel:()=>ot(!1)}):c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/50 hover:text-red-300 underline underline-offset-2 disabled:opacity-50",disabled:oe,title:"Retire this issue without running it — removes any queue entry, keeps history as closed work",onClick:()=>ot(!0),children:"Close issue"})]})]}),c.jsxs("details",{className:"mt-6",onToggle:G=>G.currentTarget.open&&_a(),children:[c.jsx("summary",{className:"text-xs text-white/45 cursor-pointer hover:text-white/70",children:"Evidence & raw trace"}),m?c.jsxs("div",{className:"mt-2 space-y-3 text-xs text-white/60",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-white/45 mb-1",children:"Worker sessions"}),m.workerSessions.map(G=>{const ye=m.usageEvents.filter(Ut=>Ut.workerSessionId===G.id),it=ye.reduce((Ut,sa)=>Ut+(sa.costUsd??0),0),Aa=ye.reduce((Ut,sa)=>Ut+(sa.tokensIn??0),0),jn=ye.reduce((Ut,sa)=>Ut+(sa.tokensOut??0),0);return c.jsxs("p",{children:[G.role," round ",G.round," · ",G.status,G.startedAt&&G.completedAt?` · ${od(new Date(G.completedAt).getTime()-new Date(G.startedAt).getTime())}`:"",ye.length>0?` · $${it.toFixed(3)} · ${Aa}→${jn} tok`:""]},G.id)}),m.workerSessions.length===0&&c.jsx("p",{className:"text-white/35",children:"None yet."})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-white/45 mb-1",children:"Artifacts"}),m.artifacts.map(G=>{const ye=v[G.id];return c.jsxs("details",{className:"mb-1.5",onToggle:it=>it.currentTarget.open&&G.blobPath&&jt(G.id),children:[c.jsxs("summary",{className:"cursor-pointer hover:text-white/80",children:[G.kind," · ",new Date(G.createdAt).toLocaleString()]}),c.jsxs("div",{className:"mt-1 pl-3 border-l border-white/10 space-y-1",children:[G.contentJson&&c.jsx("pre",{className:"whitespace-pre-wrap break-words text-white/55",children:xj(G.contentJson)}),G.blobPath&&c.jsxs("div",{children:[c.jsxs("p",{className:"text-white/40",children:["Raw trace: ",G.blobPath]}),(ye==null?void 0:ye.loading)&&c.jsx("p",{className:"text-white/35",children:"Loading trace…"}),(ye==null?void 0:ye.error)&&c.jsx("p",{className:"text-red-300/80",children:ye.error}),ye&&!ye.loading&&!ye.error&&c.jsx("pre",{className:"mt-1 max-h-64 overflow-y-auto whitespace-pre-wrap break-words text-white/50 bg-black/20 rounded p-2",children:ye.content||"(empty)"})]}),!G.contentJson&&!G.blobPath&&c.jsx("p",{className:"text-white/35",children:"No content recorded."})]})]},G.id)}),m.artifacts.length===0&&c.jsx("p",{className:"text-white/35",children:"None yet."})]})]}):c.jsx("p",{className:"text-xs text-white/40 mt-2",children:"Loading…"})]})]})})}function Sj({issueId:n,agents:l,onHumanActionsChanged:s}){const[u,d]=w.useState(null),[f,m]=w.useState(null),[y,v]=w.useState(!1),g=()=>Jy(n).then(b=>{d(b),m(null),v(!1)}).catch(b=>{const _=String(b).replace(/^Error:\s*/i,"").trim();/^not found$/i.test(_)?(v(!0),m(null),d(null)):(m(_),v(!1))});return w.useEffect(()=>{d(null),m(null),v(!1),g();const b=setInterval(g,4e3);return()=>clearInterval(b)},[n]),y?c.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-10",children:c.jsxs("div",{className:"max-w-md space-y-3",children:[c.jsx("h2",{className:"text-lg font-semibold text-white/90",children:"Issue not found"}),c.jsx("p",{className:"text-sm text-white/55",children:"No issue exists for this ID — it may have been deleted, or the link is wrong."}),c.jsx(aa,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]})}):f?c.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-6 space-y-3",children:[c.jsx("p",{className:"text-red-300 text-sm",children:f}),c.jsx(aa,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]}):u?c.jsx(wj,{issueId:n,detail:u,agents:l,onHumanActionsChanged:s,refresh:g,onError:b=>m(b)},n):c.jsx("div",{className:"p-6 text-white/50 text-sm",children:"Loading…"})}function jj(){return c.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-10",children:c.jsxs("div",{className:"max-w-md space-y-3",children:[c.jsx("h2",{className:"font-ui-display text-lg font-semibold text-white/90",children:"Page not found"}),c.jsx("p",{className:"text-sm text-white/55",children:"That URL is not a destination in Agent Dealer."}),c.jsx(aa,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]})})}function Nj(){return c.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0 overflow-hidden","aria-hidden":!0,children:[c.jsx("div",{className:"absolute top-16 left-12",children:c.jsx("div",{className:"ambient-orb ambient-orb-a w-[26rem] h-[26rem] rounded-full bg-cyan-500/10 blur-3xl"})}),c.jsx("div",{className:"absolute bottom-20 right-12",children:c.jsx("div",{className:"ambient-orb ambient-orb-b w-[26rem] h-[26rem] rounded-full bg-pink-500/10 blur-3xl"})}),c.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",children:c.jsx("div",{className:"ambient-orb ambient-orb-c w-[22rem] h-[22rem] rounded-full bg-blue-500/[0.07] blur-3xl"})})]})}function _j({className:n="w-5 h-5"}){return c.jsxs("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:n,"aria-hidden":!0,children:[c.jsx("circle",{cx:"6.75",cy:"6.25",r:"3.25"}),c.jsx("circle",{cx:"13.5",cy:"6.75",r:"2.85",opacity:"0.85"}),c.jsx("path",{d:"M1.75 16v-1.1c0-2.35 1.928-4.25 4.3-4.25 1.16 0 2.21.456 3 1.2.79-.744 1.84-1.2 3-1.2 2.372 0 4.3 1.9 4.3 4.25V16H1.75z"})]})}const Aj="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAN5UlEQVR4AeydXagdVxmGF7loIKSpN/WHttqKktpAvWkVoRctp4gRtf4QbxRrREEb0wtRGkRovLCmKC1Y641CFGpBCtpIsVfHRvAm5KpIrMGfCCJUa8GmTWl6k+5nznlPvzOZ2Xtmz5o1a/Z8Ie/+vjU/a6351nPe/Xv22bFr185LLq9BbAZ2BP/nFeihAg5WD0X1LkNwsJyCXirgYPVSVu/UwXIGeqmAg9VLWTPsNPGUHKzEBZ/KcA7WVFY68XU6WIkLPpXhHKyprHTi63SwEhc89nDv37cndpdR+nOwopQxfScA9dDRfQGRM4O1ew+Fd3/wVtLB5WANtgTLDQxEwITI6eXoDz8dHvjrmbB2+J6ZDrFpcDlYgy9BswkAETAhcnvWnlfOBsS2G2aOlYNrOVisRsYCImBC5HVTveb5327tWjs8vGs5WFvLkVcCRMCEyO3szu/ea5tFjmMhGjm4loPFSmQkIAImRG6nBlDPvedbAZHbfeQ5uZaDxYpkICACJkRupwREwIR+c3w9fPu9+8LRb/7aHlLkOBaiMbRrOViswoACImBC5HYqVUCt/+jR4pBnz5wPqGiYm1xcy8F6c1GSZkAETIjcDj4PKHvcL574l20WuRyLxpCu5WCxAgkFRMCEyO3QTYHSOTgWUlvx2gyeITpYWo2eIxABEyK3w7UFyp5b5Vr27nAo13Kw7Cr1kAMRMCFyO0QXoNQPjoXUVhzatRwsrUTkCETAhMht9zGAsv3l6FoOll2hCDkQARMit13GBkp941hIbcUhXcvB0ip0jEAETIjcdtcXUHaM3Fwra7Bs4XLNgQiYELmdZwqgNB6OhdRWHMq1HCytQMsIRMCEyO3pKYGy4+bkWg6WXZkGORABEyK3pwwFlOaAYyG1FYdwLQdL1V8QgQiYELk93AJ16dyt4R2PXxNueXm/PSRZnotrOVgLlhyIgAmR28MtULw5/NID58LuP11ZHHLj9bcFVDQS3uBYqDxkatdysMorsNkGImBC5Jubi1AGik8b8ObwiWeOFft1c9cdR5QmjTm4loNVWnIgAiZEbnfXAaVj/vLPPwakNo6F1E4VcSxUHi+la7UDqzzTFWsDE2oLlC2Du9ZGNRysjTrU3sqliOdOnQ7c5dUePNuBY6FZWvzHsVDRSHiDY6HykKlcy8EylT91+l2mtZHy+SZEq+knBdy1gn+jH8DgKPcdfCp85AOPh4uv3symbbIfQ2nyGzA4FlIn9I/UThVxLFQeL4VrTdqxWGyAQhQfGF564XOk24RjITa6a1GFxZokWGWgHjz+sYC4C3vtws0r5Vp1CPTtWpMCqw4onIoFIKJVcC2e2fIMF3FtVjwRQdpW4cLatXScBFiLgLLVS+lad3/2urD+xIcCENg5dMnpC5gQue2Lx49/3/Odyt9LbPLY0fa1KF9psNoApULhWKhP1xJQXzhwbTHs3QeuK2KXGyACJkRu++IB/DeOngl/OPnxcOncLXbXVh7btVYSrGWA2qrwLDk7ewW9j8daV139y/Dhj34vCKjZUMV/QEBFo+UN5wETIrenCyigIseNr/jPznDFf3faw7bymK61UmB1BUoVfnLzPb9YrvX8ha+Fd960P1x19WMa4rLY1rWACJgQue0QiIAJkWsfToyu3HyjXNsVY7rWSoAVCygVmHji5LHQ1bXKd3n0WyfgQHX7tZ1jgAmRazsRiIAJkbOtrFSuNWqw+gBKC9HVtVj08l0effNsjO9gINK2muda9AdMiNyeB0TAhMjtvnKOY6G+XWuUYPUJlF2ILq718u69oQoe+mf7v9/+CdJtAhhkN9IGJkRu9wERMCFyu29ensK1RgVWKqC0KMu4Ft+m95XHfh6+PFMVPLyCj4ALaSxFuRYQARMi134iEAETImdbG+FYqE/XGgVYqYGyi9TGtQQUD4Lpg0VH5FZ677EKPCACJkRuz6MvYELkdl/bvG/XyhqsIYHSQrVxLQHFx2t+9vkvhp/OVPVpThwL4VhIYyn2CZTGwLFQX66VJVg5AKUFIDZ1LY4VUP84dZpm8R1WVe4i1+KxWHFgxQ3n4U6IvOKQTpv6dK2swMoNKK1aU9fS8eVY51rv+9sPggArnwNIfQGlsXAs1IdrZQFWrkBpAYi4FndbiLaVhaPq1WsgQfYccu4OiUOqL9caFKwxAKVFx7V4O+SFHQc2NplbAEFs4nEWzwzJrZ7983nbrM0Bl9e5fvz0rtpjYu7AsVBs1xoErDEBZRcR1+JNXBbfbievcy0eiPMMr+rFUs6T6BOgfvfi7eGhr34/6DGa9vcZ+3CtpGCNFSgtahvX+tSX7iz+zg1QAZf6KMcyUDyTTAkV88GxUEzXSgLW2IGi+NIi19rzytnAg/Kv779w2eesgAjRF9E61BBAMQ8ptmv1CtYqAaUFWORaQAVcOp4oiACJF0WJussbGijmh3AsFMu1egFrFYGi+NI819IxRAsUOdt4dshjqFyAYk5STNeKCtaqA6UFmOdaHANEuBIiZ5t9NT71YyjGbyIcC8VwrShg5QFUk9LFO6bKtYAImBC5Riu/Gq/tOcZYrtUJrCkCJRisawERMCFyHTPGiGOhrq61FFhTBsrCgms99/vXKn/rxR5X9Wq83Z9bHsO1WoHlQG1HANd6+MHPBB4/ofVHfrL9gM1W3avxm7uzCzgW6uJajcByoOavPc/wEN9EA2BVR0/NteaC5UBVITJ/2/ojj1YeMDXXqgTLgapko9FGXkpw1yp9jVFkoBotxCoeNCXXqlu/wrEsUOQ82+HbV3gAV3eib6+vwKRc695DlYUowGIPQBHR3utvI7g6VGAqrrV2+J7KKhVg4UxIRwAZUttj+wpM3bUKsCgbL4oRpaG+o1zjr0KcsmttgYVjIS0ojoXU9ti+AlN2rS2wKJu7FlWIq0m41qxk5cda28DCsdDsuOI/joWKht8sVYGputY2sKicuxZViKsputZlYOFYSKXFsZDaHttXYIqudRlYlM1diyrE1dRcqxIsHAuptDgWUttj+wpMzbUqwaJs7lpUIa6m5Fq1YOFYSKXFsZDaHttXIJ1rtZ9b2zMwHr5yoOobmPl0Ry1YDMTJRMlfjVcllo+r4lqvv+1iePHO/4XX33pxqxgApV8cmQsWjoV0Jo6F1PbYvgJjdy2+8ETfXCioLFBcH1WZCxYHuGtRhbgao2tZoPg0LBWpAortaCFYOBbiYIRjIXLXchXgp5pFqTp77XD155uqjk2xrS1QmtNCsDjQXYsqxFXurrUsUKpSI7BwLKSTcCyktsf2FcjVtboCpUo0AouD3bWowtKqPDEn14oFlC60MVg4FtKJOBZS22P7CuTgWrGBUhUag8UJ7lpUIa6Gcq2+gFJ1WoGFYyGdjGMhtT22r0Bq1+obKFWgFVic5K5FFeIqhWulAkqVaQ0WjoXUAY6F1PbYvgJ9ulZqoHT1rcHiRHctqhBXsV1rKKBUlaXAwrGQOsGxkNpjiLnNMZZrDQ2U6roUWJzsrkUV4qqLa+UClCqyNFg4FlJHOBZS22P7CizjWrkBpateGiw6cNeiCnHV1LVyBUrV6AQWjoXUGY6F1PbYvgKLXCt3oHTFncCiE3ctqhBX81yLvzXd5PNQcWfUvrfOYOFYSEPjWEhtj+0rMM+16I3PcukjwBzLttzUGSwuKIpr0ZFrqwJVrjUGoHQBUcDCsZA6xbGQ2h7bVYDaHbjp/qDfgBkTULrSKGDRmbsWVegmgLrv4FMB0RNf7537XR7zrFI0sHAspEEoElLbY30FqBMwIY7i+1/R0796OOlfWmXsWIoGFhNy16IKzVUHlP0Bbd5bXkdGBYuCIF0ihUNqe9yoADXBnRBbcCdka8f2MSsqWBTCXYsqVGsKQOnK54ClQ9pFfuqQzqKYSO0pRq4fd0JcP+6EbJ3YvkqKDhbFcdeiCiFMEaiNKy/9yRNt7Br5SUTqhwIjtVc9cq24E+JacSdka8L2VVYvjkXBpuhaDhQrv6HewOKnE20Ms3G3QOHVXqXIdeFOiOvCnZC9frZPSb2BRRFX3bUcKFa5Wr2CxU8s0tAsBFJ7rJFrwJ0Q14A7IXutbB+L+phnr2Ax4VVyLQeKFW2m3sHipxhpOiwOUnsMkfniToj54k7IXhfbXW9WoHewGGqsruVAsXrLKQlY/GQjTZEFQ2rnFpkb7oSYG+6E7DWw3VVfgSRgMfwYXOuTdxwJx7/7/63PQwETcqBYwXZKBhaLgzQ9XAGpPWQUUHfdfiQwR2BC5EPOa8xjJwOLIpVd68Ybhv3b09kCRbFGrqRg4QBINcMhlKeMDlT/1U4KFpdTdi0Wme0pxFg8hgJoAOfuDpGnGH9KYyQHi0VEKjKLrLyv6ED1Vdn6fpODxVRSuZYDRbWH0SBg4VhIlxzbtSxQJ04eCwfvf0vwuzxVO00cBCwurQ/XqgLqyWeOMZwrcQUGAwvHQrreLq7VP1CapcemFRgMLCbY1bUcKKqYpwYFC8dCKk1T13KgVLF846BgUZY2ruVAUbFxaHCwcCykclW5lgOl6ownDg4WpapzLQeK6oxTWYCFYyGVENfSWy96HcpfNlB1xhGzAItSlV1rAVCc4sq4AtmAhWMhBypjWlpMLRuwmDNvu/hdHpUYv7ICa/zl9CtQBRwsVcJj1Ao4WFHL6Z2pAg6WKuExagWigRV1Vt7Z6CvgYI1+CfO8AAcrz3UZ/awcrNEvYZ4X4GDluS6jn5WDNfolzPMCHKw81yXjWTWb2hsAAAD//0DhVxwAAAAGSURBVAMA8NLI/5AoLlwAAAAASUVORK5CYII=";function Ej({className:n="",size:l=36}){return c.jsx("img",{src:Aj,alt:"",width:l,height:l,className:`shrink-0 object-contain ${n}`,"aria-hidden":!0,draggable:!1})}const bu={unsupported:"not reported by provider",missing:"no data yet",expired:"expired",unparsable:"provider data unparsable",stale:"stale"},Gx="5H",Qx="1W",kj=new Set(["claude_code","codex_local","muse_code"]),Rj="billing_cycle",Cj="1M",Tj=new Set(Dt.options),Oj={critical:"font-medium text-red-300",warning:"font-medium text-yellow-300",normal:"font-medium text-white/75"};function Mj(n){return{fiveHour:n.find(l=>l.criticalRole==="five_hour")??null,weekly:n.find(l=>l.criticalRole==="weekly")??null}}function cv(n,l,s){if(n.unavailableReason!==null)return n.unavailableReason;if(n.remainingPercent===null||n.source==="unavailable")return s??"missing";if(n.resetAt!==null){const u=Date.parse(n.resetAt);if(!Number.isFinite(u)||u<=l)return"expired"}if(n.freshUntil!==null){const u=Date.parse(n.freshUntil);if(!Number.isFinite(u)||u<=l)return"stale"}if(n.expiresAt!==null){const u=Date.parse(n.expiresAt);if(!Number.isFinite(u)||u<=l)return"expired"}if(n.observedAt){const u=Date.parse(n.observedAt);if(!Number.isFinite(u)||u>l+6e4)return"stale"}return s??"missing"}function Xx(n,l,s,u,d=null){if(Uy(n,l)){const f=Math.round(n.remainingPercent??0),m=n.resetAt?`, resets ${new Date(n.resetAt).toLocaleString()}`:"",y=d?`, ${d}`:"";return`${u}: ${f}% available (${100-f}% used${y}${m})`}return`${u}: N/A (${bu[cv(n,l,s)]})`}function Cd(n,l,s,u,d,f=null){if(Uy(n,s)){const y=n.remainingPercent??0;return{key:n.windowKey,label:d,kind:"known",remaining:Math.round(y),rawRemaining:y,detail:Xx(n,s,l.unavailableReason,d,f),isCritical:u}}const m=cv(n,s,l.unavailableReason);return{key:n.windowKey,label:d,kind:"unknown",reason:m,detail:Xx(n,s,l.unavailableReason,d,f),isCritical:u}}function Kx(n,l){const s=l.unavailableReason??"missing";return{key:`missing:${n}`,label:n,kind:"unknown",reason:s,detail:`${n}: N/A (${bu[s]})`,isCritical:!0}}function Dj(n,l,s){return Cd(n,l,s,!0,Cj,"current billing cycle")}function Lj(n,l=Date.now()){return n.runtimes.map(s=>{const u=wa(s.runtime),d=s.runtime;if(s.runtime==="cursor_local"){const f=s.windows.find(y=>y.windowKey===Rj)??null;if(f===null)return{runtime:u,runtimeKey:d,windows:[],exhausted:!1,detail:`N/A (${bu[s.unavailableReason??"missing"]})`};const m=Dj(f,s,l);return{runtime:u,runtimeKey:d,windows:[m],exhausted:m.kind==="known"&&m.rawRemaining===0,detail:m.detail}}if(kj.has(s.runtime)){const{fiveHour:f,weekly:m}=Mj(s.windows),y=f!==null?Cd(f,s,l,!0,Gx):Kx(Gx,s),v=m!==null?Cd(m,s,l,!0,Qx):Kx(Qx,s),g=[y,v],b=g.some(U=>U.kind==="known"&&U.rawRemaining===0),_=g.map(U=>U.detail).join("; ");return{runtime:u,runtimeKey:d,windows:g,exhausted:b,detail:_}}return{runtime:u,runtimeKey:d,windows:[],exhausted:!1,detail:`N/A (${bu[s.unavailableReason??"missing"]})`}})}function Jx(n){return n.exhausted?`${n.runtime} exhausted — a capacity window is at 0%: ${n.detail}`:`${n.runtime}: ${n.detail}`}function Uj({state:n,nowMs:l}){if(n.status==="loading")return c.jsxs("span",{"data-testid":"topbar-capacity","data-status":"loading",title:"Agent capacity is loading",className:"inline-flex min-w-0 max-w-full flex-wrap items-center gap-x-2 gap-y-1 whitespace-nowrap text-xs text-white/40",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Capacity"}),c.jsx("span",{"aria-live":"polite",children:"loading…"})]});if(n.status==="unavailable")return c.jsxs("span",{"data-testid":"topbar-capacity","data-status":"unavailable",title:"Agent capacity is unavailable — the capacity read failed",className:"inline-flex min-w-0 max-w-full flex-wrap items-center gap-x-2 gap-y-1 whitespace-nowrap text-xs text-white/40",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Capacity"}),c.jsx("span",{children:"unavailable"})]});const s=Lj(n.data,l),u=s.length===0||s.every(d=>!d.windows.some(f=>f.kind==="known"));return c.jsxs("span",{"data-testid":"topbar-capacity","data-status":u?"unknown":"ready",title:s.length===0?"Agent capacity: no runtime accounts reported":s.map(Jx).join(" · "),className:"inline-flex min-w-0 max-w-full flex-wrap items-center gap-x-3 gap-y-1 text-xs",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Capacity"}),s.length===0?c.jsx("span",{className:"whitespace-nowrap text-white/35",children:"N/A"}):s.map(d=>{const f=d.windows.some(m=>m.kind==="known");return c.jsxs("span",{"data-testid":`topbar-capacity-${d.runtime}`,"data-known":f?"true":"false","data-exhausted":d.exhausted?"true":"false",title:Jx(d),role:"group","aria-label":`${Tj.has(d.runtimeKey)?d.runtime:"Unknown runtime"} capacity`,className:d.exhausted?"inline-flex items-center gap-1.5 whitespace-nowrap rounded border border-red-400/40 bg-red-500/10 px-1.5 py-0.5":"inline-flex items-center gap-1.5 whitespace-nowrap",children:[c.jsx(av,{runtime:d.runtimeKey,className:"h-4 w-4 shrink-0"}),d.windows.length===0?c.jsx("span",{className:"text-white/35",children:"N/A"}):c.jsx("span",{className:"inline-flex flex-col leading-tight",children:d.windows.map(m=>c.jsxs("span",{"data-window":m.label,"data-window-known":m.kind==="known"?"true":"false",className:"inline-flex items-center gap-1 whitespace-nowrap tabular-nums",children:[c.jsx("span",{className:"text-white/40",children:m.label}),m.kind==="known"?(()=>{const y=ev(m.rawRemaining);return c.jsxs("span",{"data-severity":y,className:Oj[y],children:[m.remaining,"%"]})})():c.jsx("span",{className:"text-white/35",children:"N/A"})]},m.key))})]},d.runtime)})]})}const Ix=5e3;function md({isActive:n}){return`font-ui-display px-3 py-2 text-base rounded ${n?"bg-cyber-teal/20 text-cyber-teal":"text-white/60 hover:text-white"}`}function zj({agents:n,onHumanActionsChanged:l}){const{issueId:s}=xb();return s?c.jsx(Sj,{issueId:s,agents:n,onHumanActionsChanged:l},s):c.jsx(py,{to:"/issues",replace:!0})}function Bj({openHumanActionCount:n,agentCount:l,agentIssueCount:s,capacity:u={status:"loading"}}){return c.jsxs("header",{className:"px-6 py-4 border-b border-white/10 flex flex-wrap gap-4 items-center justify-between glass-header shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-6",children:[c.jsxs(aa,{to:"/issues",className:"flex items-center gap-3 text-left rounded hover:opacity-90 transition-opacity focus-visible:outline focus-visible:outline-2 focus-visible:outline-cyber-teal/45","aria-label":"AgentDealer — go to Issues",title:"AgentDealer — go to Issues",children:[c.jsx(Ej,{size:40}),c.jsxs("div",{children:[c.jsx("h1",{className:"font-mono text-xl font-bold sm:text-2xl",style:{background:"linear-gradient(to right, #C4B643, #D4C760)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:"AgentDealer"}),c.jsx("p",{className:"text-sm text-cyber-teal",children:"Agent Deck carries the method; Agent Dealer runs the issue queue."})]})]}),c.jsxs("nav",{className:"flex gap-1",children:[c.jsxs(nu,{to:"/issues",className:md,children:["Issues",n>0&&c.jsxs("span",{className:"ml-1.5 inline-flex items-center gap-0.5 font-mono text-xs leading-none bg-red-500/20 text-red-300 px-1.5 py-0.5 rounded tabular-nums border border-red-400/30 align-middle",title:`${n} open human action${n===1?"":"s"}`,children:[c.jsx(yu,{className:"w-3 h-3 shrink-0"}),n]})]}),c.jsx(nu,{to:"/reports/execution",className:md,children:"Reports"})]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 min-w-0",children:[c.jsx(Uj,{state:u}),c.jsxs(nu,{to:"/agents",className:({isActive:d})=>`${md({isActive:d})} inline-flex items-center gap-1.5 transition-colors`,"aria-label":"Agents",title:"Agents",children:[c.jsx(_j,{className:"w-6 h-6 shrink-0"}),c.jsx("span",{children:"Agents"}),l>0&&c.jsx("span",{className:"font-mono text-xs leading-none bg-white/10 text-white/55 px-1.5 py-0.5 rounded tabular-nums border border-white/10",title:`${l} configured agent${l===1?"":"s"}`,children:l}),s>0&&c.jsxs("span",{className:"inline-flex items-center gap-0.5 font-mono text-xs leading-none bg-red-500/20 text-red-300 px-1.5 py-0.5 rounded tabular-nums border border-red-400/30",title:`${s} need${s===1?"s":""} attention`,children:[c.jsx(yu,{className:"w-3 h-3 shrink-0"}),s]})]})]})]})}function qj(){const[n,l]=w.useState([]),[s,u]=w.useState(0),[d,f]=w.useState(!1),[m,y]=w.useState([]),[v,g]=w.useState({status:"loading"}),b=w.useCallback(()=>{v2().then(({agents:C,issueCount:Y})=>{l(C),u(Y)}).catch(console.error),Ky().then(C=>f(C.connected)).catch(()=>f(!1)),Xy().then(C=>g({status:"ready",data:C})).catch(()=>g({status:"unavailable"}))},[]),_=w.useCallback(()=>z2().then(y).catch(()=>{}),[]);w.useEffect(()=>{b();const C=setInterval(b,Ix);return()=>clearInterval(C)},[b]),w.useEffect(()=>{_();const C=setInterval(()=>void _(),Ix);return()=>clearInterval(C)},[_]);const U=m.length,K=n.length;return c.jsxs(c.Fragment,{children:[c.jsx(Nj,{}),c.jsxs("div",{className:"relative z-10 min-h-screen flex flex-col",children:[c.jsx(Bj,{openHumanActionCount:U,agentCount:K,agentIssueCount:s,capacity:v}),c.jsx("main",{className:"flex-1 flex overflow-hidden",children:c.jsxs(Tb,{children:[c.jsx(Nl,{path:"/",element:c.jsx(py,{to:"/issues",replace:!0})}),c.jsx(Nl,{path:"/issues",element:c.jsx($S,{agents:n,humanActions:m,onHumanActionsChanged:_})}),c.jsx(Nl,{path:"/issues/:issueId",element:c.jsx(zj,{agents:n,onHumanActionsChanged:_})}),c.jsx(Nl,{path:"/agents",element:c.jsx(oS,{agents:n,agentDeckOnline:d,onRefresh:b})}),c.jsx(Nl,{path:"/reports/execution",element:c.jsx(WS,{})}),c.jsx(Nl,{path:"*",element:c.jsx(jj,{})})]})})]})]})}function Hj(){return typeof document>"u"?Promise.resolve():document.fonts.load('13px "Monaco"').then(()=>{}).catch(()=>{})}Hj();C0.createRoot(document.getElementById("root")).render(c.jsx(w.StrictMode,{children:c.jsx(a1,{children:c.jsx(qj,{})})}));