agent-dealer 1.2.11 → 1.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/server/dist/adapters/linear-inbox.js +72 -16
- package/bundle/server/dist/adapters/linear-inbox.test.js +183 -1
- package/bundle/server/dist/coordinator/commands.js +204 -5
- package/bundle/server/dist/coordinator/commands.test.js +288 -3
- package/bundle/server/dist/repository/intake-settings.js +50 -0
- package/bundle/server/dist/repository/intake-settings.test.js +72 -0
- package/bundle/server/dist/routes/index.js +6 -3
- package/bundle/server/dist/routes/intake-linear-config.js +31 -0
- package/bundle/server/dist/routes/intake-linear.test.js +95 -5
- package/bundle/server/dist/routes/issues.js +54 -7
- package/bundle/server/dist/routes/issues.test.js +326 -7
- package/bundle/server/package.json +2 -2
- package/bundle/server/static-ui/assets/index-BzLjMBI9.js +64 -0
- package/bundle/server/static-ui/assets/index-COYJxD1y.css +1 -0
- package/bundle/server/static-ui/index.html +2 -2
- package/bundle/shared/dist/index.d.ts +303 -0
- package/bundle/shared/dist/index.js +47 -0
- package/bundle/shared/dist/linear-intake.d.ts +14 -0
- package/bundle/shared/dist/linear-intake.js +23 -0
- package/bundle/shared/dist/linear-intake.test.js +41 -2
- package/bundle/shared/package.json +1 -1
- package/dist/index.js +2 -0
- package/dist/issue.d.ts +8 -0
- package/dist/issue.js +35 -0
- package/dist/issue.test.js +92 -0
- package/package.json +1 -1
- package/bundle/server/static-ui/assets/index-Cf4dipuK.js +0 -64
- package/bundle/server/static-ui/assets/index-K_YcYkQU.css +0 -1
|
@@ -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 Qo={exports:{}},Ss={};/**
|
|
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 Ip;function k0(){if(Ip)return Ss;Ip=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 x in d)x!=="key"&&(f[x]=d[x])}else f=d;return d=f.ref,{$$typeof:n,type:u,key:m,ref:d!==void 0?d:null,props:f}}return Ss.Fragment=l,Ss.jsx=s,Ss.jsxs=s,Ss}var Kp;function E0(){return Kp||(Kp=1,Qo.exports=k0()),Qo.exports}var r=E0(),Xo={exports:{}},be={};/**
|
|
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 Jp;function R0(){if(Jp)return be;Jp=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"),x=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),U=Symbol.iterator;function Q(S){return S===null||typeof S!="object"?null:(S=U&&S[U]||S["@@iterator"],typeof S=="function"?S:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,M={};function q(S,$,F){this.props=S,this.context=$,this.refs=M,this.updater=F||E}q.prototype.isReactComponent={},q.prototype.setState=function(S,$){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,$,"setState")},q.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function J(){}J.prototype=q.prototype;function W(S,$,F){this.props=S,this.context=$,this.refs=M,this.updater=F||E}var se=W.prototype=new J;se.constructor=W,H(se,q.prototype),se.isPureReactComponent=!0;var V=Array.isArray;function ke(){}var X={H:null,A:null,T:null,S:null},ge=Object.prototype.hasOwnProperty;function Be(S,$,F){var ee=F.ref;return{$$typeof:n,type:S,key:$,ref:ee!==void 0?ee:null,props:F}}function pt(S,$){return Be(S.type,$,S.props)}function St(S){return typeof S=="object"&&S!==null&&S.$$typeof===n}function lt(S){var $={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(F){return $[F]})}var ft=/\/+/g;function et(S,$){return typeof S=="object"&&S!==null&&S.key!=null?lt(""+S.key):$.toString(36)}function Ke(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(ke,ke):(S.status="pending",S.then(function($){S.status==="pending"&&(S.status="fulfilled",S.value=$)},function($){S.status==="pending"&&(S.status="rejected",S.reason=$)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function D(S,$,F,ee,de){var P=typeof S;(P==="undefined"||P==="boolean")&&(S=null);var ce=!1;if(S===null)ce=!0;else switch(P){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(S.$$typeof){case n:case l:ce=!0;break;case w:return ce=S._init,D(ce(S._payload),$,F,ee,de)}}if(ce)return de=de(S),ce=ee===""?"."+et(S,0):ee,V(de)?(F="",ce!=null&&(F=ce.replace(ft,"$&/")+"/"),D(de,$,F,"",function(Kt){return Kt})):de!=null&&(St(de)&&(de=pt(de,F+(de.key==null||S&&S.key===de.key?"":(""+de.key).replace(ft,"$&/")+"/")+ce)),$.push(de)),1;ce=0;var Ue=ee===""?".":ee+":";if(V(S))for(var ye=0;ye<S.length;ye++)ee=S[ye],P=Ue+et(ee,ye),ce+=D(ee,$,F,P,de);else if(ye=Q(S),typeof ye=="function")for(S=ye.call(S),ye=0;!(ee=S.next()).done;)ee=ee.value,P=Ue+et(ee,ye++),ce+=D(ee,$,F,P,de);else if(P==="object"){if(typeof S.then=="function")return D(Ke(S),$,F,ee,de);throw $=String(S),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return ce}function K(S,$,F){if(S==null)return S;var ee=[],de=0;return D(S,ee,"","",function(P){return $.call(F,P,de++)}),ee}function oe(S){if(S._status===-1){var $=S._result;$=$(),$.then(function(F){(S._status===0||S._status===-1)&&(S._status=1,S._result=F)},function(F){(S._status===0||S._status===-1)&&(S._status=2,S._result=F)}),S._status===-1&&(S._status=0,S._result=$)}if(S._status===1)return S._result.default;throw S._result}var Me=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},ve={map:K,forEach:function(S,$,F){K(S,function(){$.apply(this,arguments)},F)},count:function(S){var $=0;return K(S,function(){$++}),$},toArray:function(S){return K(S,function($){return $})||[]},only:function(S){if(!St(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return be.Activity=N,be.Children=ve,be.Component=q,be.Fragment=s,be.Profiler=d,be.PureComponent=W,be.StrictMode=u,be.Suspense=y,be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,be.__COMPILER_RUNTIME={__proto__:null,c:function(S){return X.H.useMemoCache(S)}},be.cache=function(S){return function(){return S.apply(null,arguments)}},be.cacheSignal=function(){return null},be.cloneElement=function(S,$,F){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var ee=H({},S.props),de=S.key;if($!=null)for(P in $.key!==void 0&&(de=""+$.key),$)!ge.call($,P)||P==="key"||P==="__self"||P==="__source"||P==="ref"&&$.ref===void 0||(ee[P]=$[P]);var P=arguments.length-2;if(P===1)ee.children=F;else if(1<P){for(var ce=Array(P),Ue=0;Ue<P;Ue++)ce[Ue]=arguments[Ue+2];ee.children=ce}return Be(S.type,de,ee)},be.createContext=function(S){return S={$$typeof:m,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:f,_context:S},S},be.createElement=function(S,$,F){var ee,de={},P=null;if($!=null)for(ee in $.key!==void 0&&(P=""+$.key),$)ge.call($,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(de[ee]=$[ee]);var ce=arguments.length-2;if(ce===1)de.children=F;else if(1<ce){for(var Ue=Array(ce),ye=0;ye<ce;ye++)Ue[ye]=arguments[ye+2];de.children=Ue}if(S&&S.defaultProps)for(ee in ce=S.defaultProps,ce)de[ee]===void 0&&(de[ee]=ce[ee]);return Be(S,P,de)},be.createRef=function(){return{current:null}},be.forwardRef=function(S){return{$$typeof:x,render:S}},be.isValidElement=St,be.lazy=function(S){return{$$typeof:w,_payload:{_status:-1,_result:S},_init:oe}},be.memo=function(S,$){return{$$typeof:v,type:S,compare:$===void 0?null:$}},be.startTransition=function(S){var $=X.T,F={};X.T=F;try{var ee=S(),de=X.S;de!==null&&de(F,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(ke,Me)}catch(P){Me(P)}finally{$!==null&&F.types!==null&&($.types=F.types),X.T=$}},be.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},be.use=function(S){return X.H.use(S)},be.useActionState=function(S,$,F){return X.H.useActionState(S,$,F)},be.useCallback=function(S,$){return X.H.useCallback(S,$)},be.useContext=function(S){return X.H.useContext(S)},be.useDebugValue=function(){},be.useDeferredValue=function(S,$){return X.H.useDeferredValue(S,$)},be.useEffect=function(S,$){return X.H.useEffect(S,$)},be.useEffectEvent=function(S){return X.H.useEffectEvent(S)},be.useId=function(){return X.H.useId()},be.useImperativeHandle=function(S,$,F){return X.H.useImperativeHandle(S,$,F)},be.useInsertionEffect=function(S,$){return X.H.useInsertionEffect(S,$)},be.useLayoutEffect=function(S,$){return X.H.useLayoutEffect(S,$)},be.useMemo=function(S,$){return X.H.useMemo(S,$)},be.useOptimistic=function(S,$){return X.H.useOptimistic(S,$)},be.useReducer=function(S,$,F){return X.H.useReducer(S,$,F)},be.useRef=function(S){return X.H.useRef(S)},be.useState=function(S){return X.H.useState(S)},be.useSyncExternalStore=function(S,$,F){return X.H.useSyncExternalStore(S,$,F)},be.useTransition=function(){return X.H.useTransition()},be.version="19.2.7",be}var Fp;function Dd(){return Fp||(Fp=1,Xo.exports=R0()),Xo.exports}var b=Dd(),Io={exports:{}},js={},Ko={exports:{}},Jo={};/**
|
|
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 Wp;function C0(){return Wp||(Wp=1,(function(n){function l(D,K){var oe=D.length;D.push(K);e:for(;0<oe;){var Me=oe-1>>>1,ve=D[Me];if(0<d(ve,K))D[Me]=K,D[oe]=ve,oe=Me;else break e}}function s(D){return D.length===0?null:D[0]}function u(D){if(D.length===0)return null;var K=D[0],oe=D.pop();if(oe!==K){D[0]=oe;e:for(var Me=0,ve=D.length,S=ve>>>1;Me<S;){var $=2*(Me+1)-1,F=D[$],ee=$+1,de=D[ee];if(0>d(F,oe))ee<ve&&0>d(de,F)?(D[Me]=de,D[ee]=oe,Me=ee):(D[Me]=F,D[$]=oe,Me=$);else if(ee<ve&&0>d(de,oe))D[Me]=de,D[ee]=oe,Me=ee;else break e}}return K}function d(D,K){var oe=D.sortIndex-K.sortIndex;return oe!==0?oe:D.id-K.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,x=m.now();n.unstable_now=function(){return m.now()-x}}var y=[],v=[],w=1,N=null,U=3,Q=!1,E=!1,H=!1,M=!1,q=typeof setTimeout=="function"?setTimeout:null,J=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function se(D){for(var K=s(v);K!==null;){if(K.callback===null)u(v);else if(K.startTime<=D)u(v),K.sortIndex=K.expirationTime,l(y,K);else break;K=s(v)}}function V(D){if(H=!1,se(D),!E)if(s(y)!==null)E=!0,ke||(ke=!0,lt());else{var K=s(v);K!==null&&Ke(V,K.startTime-D)}}var ke=!1,X=-1,ge=5,Be=-1;function pt(){return M?!0:!(n.unstable_now()-Be<ge)}function St(){if(M=!1,ke){var D=n.unstable_now();Be=D;var K=!0;try{e:{E=!1,H&&(H=!1,J(X),X=-1),Q=!0;var oe=U;try{t:{for(se(D),N=s(y);N!==null&&!(N.expirationTime>D&&pt());){var Me=N.callback;if(typeof Me=="function"){N.callback=null,U=N.priorityLevel;var ve=Me(N.expirationTime<=D);if(D=n.unstable_now(),typeof ve=="function"){N.callback=ve,se(D),K=!0;break t}N===s(y)&&u(y),se(D)}else u(y);N=s(y)}if(N!==null)K=!0;else{var S=s(v);S!==null&&Ke(V,S.startTime-D),K=!1}}break e}finally{N=null,U=oe,Q=!1}K=void 0}}finally{K?lt():ke=!1}}}var lt;if(typeof W=="function")lt=function(){W(St)};else if(typeof MessageChannel<"u"){var ft=new MessageChannel,et=ft.port2;ft.port1.onmessage=St,lt=function(){et.postMessage(null)}}else lt=function(){q(St,0)};function Ke(D,K){X=q(function(){D(n.unstable_now())},K)}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"):ge=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 K=3;break;default:K=U}var oe=U;U=K;try{return D()}finally{U=oe}},n.unstable_requestPaint=function(){M=!0},n.unstable_runWithPriority=function(D,K){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var oe=U;U=D;try{return K()}finally{U=oe}},n.unstable_scheduleCallback=function(D,K,oe){var Me=n.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?Me+oe:Me):oe=Me,D){case 1:var ve=-1;break;case 2:ve=250;break;case 5:ve=1073741823;break;case 4:ve=1e4;break;default:ve=5e3}return ve=oe+ve,D={id:w++,callback:K,priorityLevel:D,startTime:oe,expirationTime:ve,sortIndex:-1},oe>Me?(D.sortIndex=oe,l(v,D),s(y)===null&&D===s(v)&&(H?(J(X),X=-1):H=!0,Ke(V,oe-Me))):(D.sortIndex=ve,l(y,D),E||Q||(E=!0,ke||(ke=!0,lt()))),D},n.unstable_shouldYield=pt,n.unstable_wrapCallback=function(D){var K=U;return function(){var oe=U;U=K;try{return D.apply(this,arguments)}finally{U=oe}}}})(Jo)),Jo}var Pp;function T0(){return Pp||(Pp=1,Ko.exports=C0()),Ko.exports}var Fo={exports:{}},zt={};/**
|
|
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 ex;function O0(){if(ex)return zt;ex=1;var n=Dd();function l(y){var v="https://react.dev/errors/"+y;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var w=2;w<arguments.length;w++)v+="&args[]="+encodeURIComponent(arguments[w])}return"Minified React error #"+y+"; visit "+v+" 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(y,v,w){var N=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:N==null?null:""+N,children:y,containerInfo:v,implementation:w}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(y,v){if(y==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,zt.createPortal=function(y,v){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(l(299));return f(y,v,null,w)},zt.flushSync=function(y){var v=m.T,w=u.p;try{if(m.T=null,u.p=2,y)return y()}finally{m.T=v,u.p=w,u.d.f()}},zt.preconnect=function(y,v){typeof y=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,u.d.C(y,v))},zt.prefetchDNS=function(y){typeof y=="string"&&u.d.D(y)},zt.preinit=function(y,v){if(typeof y=="string"&&v&&typeof v.as=="string"){var w=v.as,N=x(w,v.crossOrigin),U=typeof v.integrity=="string"?v.integrity:void 0,Q=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;w==="style"?u.d.S(y,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:N,integrity:U,fetchPriority:Q}):w==="script"&&u.d.X(y,{crossOrigin:N,integrity:U,fetchPriority:Q,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},zt.preinitModule=function(y,v){if(typeof y=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var w=x(v.as,v.crossOrigin);u.d.M(y,{crossOrigin:w,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&u.d.M(y)},zt.preload=function(y,v){if(typeof y=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var w=v.as,N=x(w,v.crossOrigin);u.d.L(y,w,{crossOrigin:N,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},zt.preloadModule=function(y,v){if(typeof y=="string")if(v){var w=x(v.as,v.crossOrigin);u.d.m(y,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:w,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else u.d.m(y)},zt.requestFormReset=function(y){u.d.r(y)},zt.unstable_batchedUpdates=function(y,v){return y(v)},zt.useFormState=function(y,v,w){return m.H.useFormState(y,v,w)},zt.useFormStatus=function(){return m.H.useHostTransitionStatus()},zt.version="19.2.7",zt}var tx;function M0(){if(tx)return Fo.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(),Fo.exports=O0(),Fo.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 ax;function L0(){if(ax)return js;ax=1;var n=T0(),l=Dd(),s=M0();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 x(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 y(e){if(f(e)!==e)throw Error(u(188))}function v(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 c=a.return;if(c===null)break;var o=c.alternate;if(o===null){if(i=c.return,i!==null){a=i;continue}break}if(c.child===o.child){for(o=c.child;o;){if(o===a)return y(c),e;if(o===i)return y(c),t;o=o.sibling}throw Error(u(188))}if(a.return!==i.return)a=c,i=o;else{for(var h=!1,g=c.child;g;){if(g===a){h=!0,a=c,i=o;break}if(g===i){h=!0,i=c,a=o;break}g=g.sibling}if(!h){for(g=o.child;g;){if(g===a){h=!0,a=o,i=c;break}if(g===i){h=!0,i=o,a=c;break}g=g.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 w(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=w(e),t!==null)return t;e=e.sibling}return null}var N=Object.assign,U=Symbol.for("react.element"),Q=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),W=Symbol.for("react.context"),se=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),ke=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),Be=Symbol.for("react.activity"),pt=Symbol.for("react.memo_cache_sentinel"),St=Symbol.iterator;function lt(e){return e===null||typeof e!="object"?null:(e=St&&e[St]||e["@@iterator"],typeof e=="function"?e:null)}var ft=Symbol.for("react.client.reference");function et(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ft?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case H:return"Fragment";case q:return"Profiler";case M:return"StrictMode";case V:return"Suspense";case ke:return"SuspenseList";case Be:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case W:return e.displayName||"Context";case J:return(e._context.displayName||"Context")+".Consumer";case se:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return t=e.displayName||null,t!==null?t:et(e.type)||"Memo";case ge:t=e._payload,e=e._init;try{return et(e(t))}catch{}}return null}var Ke=Array.isArray,D=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},Me=[],ve=-1;function S(e){return{current:e}}function $(e){0>ve||(e.current=Me[ve],Me[ve]=null,ve--)}function F(e,t){ve++,Me[ve]=e.current,e.current=t}var ee=S(null),de=S(null),P=S(null),ce=S(null);function Ue(e,t){switch(F(P,t),F(de,e),F(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?yp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=yp(t),e=vp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}$(ee),F(ee,e)}function ye(){$(ee),$(de),$(P)}function Kt(e){e.memoizedState!==null&&F(ce,e);var t=ee.current,a=vp(t,e.type);t!==a&&(F(de,e),F(ee,a))}function ut(e){de.current===e&&($(ee),$(de)),ce.current===e&&($(ce),vs._currentValue=oe)}var it,ll;function Mt(e){if(it===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);it=t&&t[1]||"",ll=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+it+e+ll}var Ba=!1;function Jt(e,t){if(!e||Ba)return"";Ba=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(L){var O=L}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(L){O=L}e.call(Z.prototype)}}else{try{throw Error()}catch(L){O=L}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(L){if(L&&O&&typeof L.stack=="string")return[L.stack,O.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=i.DetermineComponentFrameRoot(),h=o[0],g=o[1];if(h&&g){var j=h.split(`
|
|
44
|
+
`),C=g.split(`
|
|
45
|
+
`);for(c=i=0;i<j.length&&!j[i].includes("DetermineComponentFrameRoot");)i++;for(;c<C.length&&!C[c].includes("DetermineComponentFrameRoot");)c++;if(i===j.length||c===C.length)for(i=j.length-1,c=C.length-1;1<=i&&0<=c&&j[i]!==C[c];)c--;for(;1<=i&&0<=c;i--,c--)if(j[i]!==C[c]){if(i!==1||c!==1)do if(i--,c--,0>c||j[i]!==C[c]){var z=`
|
|
46
|
+
`+j[i].replace(" at new "," at ");return e.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",e.displayName)),z}while(1<=i&&0<=c);break}}}finally{Ba=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Mt(a):""}function qa(e,t){switch(e.tag){case 26:case 27:case 5:return Mt(e.type);case 16:return Mt("Lazy");case 13:return e.child!==t&&t!==null?Mt("Suspense Fallback"):Mt("Suspense");case 19:return Mt("SuspenseList");case 0:case 15:return Jt(e.type,!1);case 11:return Jt(e.type.render,!1);case 1:return Jt(e.type,!0);case 31:return Mt("Activity");default:return""}}function Ja(e){try{var t="",a=null;do t+=qa(e,a),a=e,e=e.return;while(e);return t}catch(i){return`
|
|
47
|
+
Error generating stack: `+i.message+`
|
|
48
|
+
`+i.stack}}var Ze=Object.prototype.hasOwnProperty,jt=n.unstable_scheduleCallback,Fa=n.unstable_cancelCallback,He=n.unstable_shouldYield,Wa=n.unstable_requestPaint,_t=n.unstable_now,il=n.unstable_getCurrentPriorityLevel,Nn=n.unstable_ImmediatePriority,_n=n.unstable_UserBlockingPriority,Pa=n.unstable_NormalPriority,Ei=n.unstable_LowPriority,Ft=n.unstable_IdlePriority,An=n.log,kn=n.unstable_setDisableYieldValue,Lt=null,ze=null;function Wt(e){if(typeof An=="function"&&kn(e),ze&&typeof ze.setStrictMode=="function")try{ze.setStrictMode(Lt,e)}catch{}}var At=Math.clz32?Math.clz32:Ri,Ml=Math.log,sl=Math.LN2;function Ri(e){return e>>>=0,e===0?32:31-(Ml(e)/sl|0)|0}var Ha=256,En=262144,xt=4194304;function Pt(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 G(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var c=0,o=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var g=i&134217727;return g!==0?(i=g&~o,i!==0?c=Pt(i):(h&=g,h!==0?c=Pt(h):a||(a=g&~e,a!==0&&(c=Pt(a))))):(g=i&~o,g!==0?c=Pt(g):h!==0?c=Pt(h):a||(a=i&~e,a!==0&&(c=Pt(a)))),c===0?0:t!==0&&t!==c&&(t&o)===0&&(o=c&-c,a=t&-t,o>=a||o===32&&(a&4194048)!==0)?t:c}function we(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tt(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 Dt(){var e=xt;return xt<<=1,(xt&62914560)===0&&(xt=4194304),e}function $a(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ct(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function oa(e,t,a,i,c,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 g=e.entanglements,j=e.expirationTimes,C=e.hiddenUpdates;for(a=h&~a;0<a;){var z=31-At(a),Z=1<<z;g[z]=0,j[z]=-1;var O=C[z];if(O!==null)for(C[z]=null,z=0;z<O.length;z++){var L=O[z];L!==null&&(L.lane&=-536870913)}a&=~Z}i!==0&&rl(e,i,0),o!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=o&~(h&~t))}function rl(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-At(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&261930}function Bs(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-At(a),c=1<<i;c&t|e[i]&t&&(e[i]|=t),a&=~c}}function Ci(e,t){var a=t&-t;return a=(a&42)!==0?1:Ll(a),(a&(e.suspendedLanes|t))!==0?0:a}function Ll(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 Ti(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Oi(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:$p(e.type))}function qs(e,t){var a=K.p;try{return K.p=e,t()}finally{K.p=a}}var T=Math.random().toString(36).slice(2),te="__reactFiber$"+T,_e="__reactProps$"+T,Ut="__reactContainer$"+T,Uu="__reactEvents$"+T,xv="__reactListeners$"+T,yv="__reactHandles$"+T,nf="__reactResources$"+T,Mi="__reactMarker$"+T;function zu(e){delete e[te],delete e[_e],delete e[Uu],delete e[xv],delete e[yv]}function Dl(e){var t=e[te];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Ut]||a[te]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=_p(e);e!==null;){if(a=e[te])return a;e=_p(e)}return t}e=a,a=e.parentNode}return null}function Ul(e){if(e=e[te]||e[Ut]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Li(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function zl(e){var t=e[nf];return t||(t=e[nf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function kt(e){e[Mi]=!0}var lf=new Set,sf={};function ul(e,t){Bl(e,t),Bl(e+"Capture",t)}function Bl(e,t){for(sf[e]=t,e=0;e<t.length;e++)lf.add(t[e])}var vv=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]*$"),rf={},uf={};function gv(e){return Ze.call(uf,e)?!0:Ze.call(rf,e)?!1:vv.test(e)?uf[e]=!0:(rf[e]=!0,!1)}function Hs(e,t,a){if(gv(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 $s(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 en(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 da(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function cf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bv(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 c=i.get,o=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.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 Bu(e){if(!e._valueTracker){var t=cf(e)?"checked":"value";e._valueTracker=bv(e,t,""+e[t])}}function of(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=cf(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function Ys(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 wv=/[\n"\\]/g;function fa(e){return e.replace(wv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function qu(e,t,a,i,c,o,h,g){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=""+da(t)):e.value!==""+da(t)&&(e.value=""+da(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?Hu(e,h,da(t)):a!=null?Hu(e,h,da(a)):i!=null&&e.removeAttribute("value"),c==null&&o!=null&&(e.defaultChecked=!!o),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.name=""+da(g):e.removeAttribute("name")}function df(e,t,a,i,c,o,h,g){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)){Bu(e);return}a=a!=null?""+da(a):"",t=t!=null?""+da(t):a,g||t===e.value||(e.value=t),e.defaultValue=t}i=i??c,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=g?e.checked:!!i,e.defaultChecked=!!i,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Bu(e)}function Hu(e,t,a){t==="number"&&Ys(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ql(e,t,a,i){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&i&&(e[a].defaultSelected=!0)}else{for(a=""+da(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,i&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function ff(e,t,a){if(t!=null&&(t=""+da(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+da(a):""}function hf(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(u(92));if(Ke(i)){if(1<i.length)throw Error(u(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=da(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i),Bu(e)}function Hl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Sv=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 mf(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||Sv.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function pf(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 c in t)i=t[c],t.hasOwnProperty(c)&&a[c]!==i&&mf(e,c,i)}else for(var o in t)t.hasOwnProperty(o)&&mf(e,o,t[o])}function $u(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 jv=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"]]),Nv=/^[\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 Vs(e){return Nv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function tn(){}var Yu=null;function Vu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $l=null,Yl=null;function xf(e){var t=Ul(e);if(t&&(e=t.stateNode)){var a=e[_e]||null;e:switch(e=t.stateNode,t.type){case"input":if(qu(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="'+fa(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var c=i[_e]||null;if(!c)throw Error(u(90));qu(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&of(i)}break e;case"textarea":ff(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&ql(e,!!a.multiple,t,!1)}}}var Zu=!1;function yf(e,t,a){if(Zu)return e(t,a);Zu=!0;try{var i=e(t);return i}finally{if(Zu=!1,($l!==null||Yl!==null)&&(Cr(),$l&&(t=$l,e=Yl,Yl=$l=null,xf(t),e)))for(t=0;t<e.length;t++)xf(e[t])}}function Di(e,t){var a=e.stateNode;if(a===null)return null;var i=a[_e]||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 an=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gu=!1;if(an)try{var Ui={};Object.defineProperty(Ui,"passive",{get:function(){Gu=!0}}),window.addEventListener("test",Ui,Ui),window.removeEventListener("test",Ui,Ui)}catch{Gu=!1}var Rn=null,Qu=null,Zs=null;function vf(){if(Zs)return Zs;var e,t=Qu,a=t.length,i,c="value"in Rn?Rn.value:Rn.textContent,o=c.length;for(e=0;e<a&&t[e]===c[e];e++);var h=a-e;for(i=1;i<=h&&t[a-i]===c[o-i];i++);return Zs=c.slice(e,1<i?1-i:void 0)}function Gs(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 Qs(){return!0}function gf(){return!1}function $t(e){function t(a,i,c,o,h){this._reactName=a,this._targetInst=c,this.type=i,this.nativeEvent=o,this.target=h,this.currentTarget=null;for(var g in e)e.hasOwnProperty(g)&&(a=e[g],this[g]=a?a(o):o[g]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Qs:gf,this.isPropagationStopped=gf,this}return N(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=Qs)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Qs)},persist:function(){},isPersistent:Qs}),t}var cl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xs=$t(cl),zi=N({},cl,{view:0,detail:0}),_v=$t(zi),Xu,Iu,Bi,Is=N({},zi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ju,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!==Bi&&(Bi&&e.type==="mousemove"?(Xu=e.screenX-Bi.screenX,Iu=e.screenY-Bi.screenY):Iu=Xu=0,Bi=e),Xu)},movementY:function(e){return"movementY"in e?e.movementY:Iu}}),bf=$t(Is),Av=N({},Is,{dataTransfer:0}),kv=$t(Av),Ev=N({},zi,{relatedTarget:0}),Ku=$t(Ev),Rv=N({},cl,{animationName:0,elapsedTime:0,pseudoElement:0}),Cv=$t(Rv),Tv=N({},cl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ov=$t(Tv),Mv=N({},cl,{data:0}),wf=$t(Mv),Lv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dv={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"},Uv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Uv[e])?!!t[e]:!1}function Ju(){return zv}var Bv=N({},zi,{key:function(e){if(e.key){var t=Lv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Gs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Dv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ju,charCode:function(e){return e.type==="keypress"?Gs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Gs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),qv=$t(Bv),Hv=N({},Is,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sf=$t(Hv),$v=N({},zi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ju}),Yv=$t($v),Vv=N({},cl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zv=$t(Vv),Gv=N({},Is,{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}),Qv=$t(Gv),Xv=N({},cl,{newState:0,oldState:0}),Iv=$t(Xv),Kv=[9,13,27,32],Fu=an&&"CompositionEvent"in window,qi=null;an&&"documentMode"in document&&(qi=document.documentMode);var Jv=an&&"TextEvent"in window&&!qi,jf=an&&(!Fu||qi&&8<qi&&11>=qi),Nf=" ",_f=!1;function Af(e,t){switch(e){case"keyup":return Kv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vl=!1;function Fv(e,t){switch(e){case"compositionend":return kf(t);case"keypress":return t.which!==32?null:(_f=!0,Nf);case"textInput":return e=t.data,e===Nf&&_f?null:e;default:return null}}function Wv(e,t){if(Vl)return e==="compositionend"||!Fu&&Af(e,t)?(e=vf(),Zs=Qu=Rn=null,Vl=!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 jf&&t.locale!=="ko"?null:t.data;default:return null}}var Pv={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 Ef(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Pv[e.type]:t==="textarea"}function Rf(e,t,a,i){$l?Yl?Yl.push(i):Yl=[i]:$l=i,t=zr(t,"onChange"),0<t.length&&(a=new Xs("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var Hi=null,$i=null;function eg(e){dp(e,0)}function Ks(e){var t=Li(e);if(of(t))return e}function Cf(e,t){if(e==="change")return t}var Tf=!1;if(an){var Wu;if(an){var Pu="oninput"in document;if(!Pu){var Of=document.createElement("div");Of.setAttribute("oninput","return;"),Pu=typeof Of.oninput=="function"}Wu=Pu}else Wu=!1;Tf=Wu&&(!document.documentMode||9<document.documentMode)}function Mf(){Hi&&(Hi.detachEvent("onpropertychange",Lf),$i=Hi=null)}function Lf(e){if(e.propertyName==="value"&&Ks($i)){var t=[];Rf(t,$i,e,Vu(e)),yf(eg,t)}}function tg(e,t,a){e==="focusin"?(Mf(),Hi=t,$i=a,Hi.attachEvent("onpropertychange",Lf)):e==="focusout"&&Mf()}function ag(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ks($i)}function ng(e,t){if(e==="click")return Ks(t)}function lg(e,t){if(e==="input"||e==="change")return Ks(t)}function ig(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ea=typeof Object.is=="function"?Object.is:ig;function Yi(e,t){if(ea(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 c=a[i];if(!Ze.call(t,c)||!ea(e[c],t[c]))return!1}return!0}function Df(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Uf(e,t){var a=Df(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=Df(a)}}function zf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ys(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=Ys(e.document)}return t}function ec(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 sg=an&&"documentMode"in document&&11>=document.documentMode,Zl=null,tc=null,Vi=null,ac=!1;function qf(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ac||Zl==null||Zl!==Ys(i)||(i=Zl,"selectionStart"in i&&ec(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}),Vi&&Yi(Vi,i)||(Vi=i,i=zr(tc,"onSelect"),0<i.length&&(t=new Xs("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=Zl)))}function ol(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Gl={animationend:ol("Animation","AnimationEnd"),animationiteration:ol("Animation","AnimationIteration"),animationstart:ol("Animation","AnimationStart"),transitionrun:ol("Transition","TransitionRun"),transitionstart:ol("Transition","TransitionStart"),transitioncancel:ol("Transition","TransitionCancel"),transitionend:ol("Transition","TransitionEnd")},nc={},Hf={};an&&(Hf=document.createElement("div").style,"AnimationEvent"in window||(delete Gl.animationend.animation,delete Gl.animationiteration.animation,delete Gl.animationstart.animation),"TransitionEvent"in window||delete Gl.transitionend.transition);function dl(e){if(nc[e])return nc[e];if(!Gl[e])return e;var t=Gl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Hf)return nc[e]=t[a];return e}var $f=dl("animationend"),Yf=dl("animationiteration"),Vf=dl("animationstart"),rg=dl("transitionrun"),ug=dl("transitionstart"),cg=dl("transitioncancel"),Zf=dl("transitionend"),Gf=new Map,lc="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(" ");lc.push("scrollEnd");function Ra(e,t){Gf.set(e,t),ul(t,[e])}var Js=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)},ha=[],Ql=0,ic=0;function Fs(){for(var e=Ql,t=ic=Ql=0;t<e;){var a=ha[t];ha[t++]=null;var i=ha[t];ha[t++]=null;var c=ha[t];ha[t++]=null;var o=ha[t];if(ha[t++]=null,i!==null&&c!==null){var h=i.pending;h===null?c.next=c:(c.next=h.next,h.next=c),i.pending=c}o!==0&&Qf(a,c,o)}}function Ws(e,t,a,i){ha[Ql++]=e,ha[Ql++]=t,ha[Ql++]=a,ha[Ql++]=i,ic|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function sc(e,t,a,i){return Ws(e,t,a,i),Ps(e)}function fl(e,t){return Ws(e,null,null,t),Ps(e)}function Qf(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var c=!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||(c=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,c&&t!==null&&(c=31-At(a),e=o.hiddenUpdates,i=e[c],i===null?e[c]=[t]:i.push(t),t.lane=a|536870912),o):null}function Ps(e){if(50<ds)throw ds=0,xo=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Xl={};function og(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 ta(e,t,a,i){return new og(e,t,a,i)}function rc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function nn(e,t){var a=e.alternate;return a===null?(a=ta(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 Xf(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 er(e,t,a,i,c,o){var h=0;if(i=e,typeof e=="function")rc(e)&&(h=1);else if(typeof e=="string")h=p0(e,a,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Be:return e=ta(31,a,t,c),e.elementType=Be,e.lanes=o,e;case H:return hl(a.children,c,o,t);case M:h=8,c|=24;break;case q:return e=ta(12,a,t,c|2),e.elementType=q,e.lanes=o,e;case V:return e=ta(13,a,t,c),e.elementType=V,e.lanes=o,e;case ke:return e=ta(19,a,t,c),e.elementType=ke,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W:h=10;break e;case J:h=9;break e;case se:h=11;break e;case X:h=14;break e;case ge:h=16,i=null;break e}h=29,a=Error(u(130,e===null?"null":typeof e,"")),i=null}return t=ta(h,a,t,c),t.elementType=e,t.type=i,t.lanes=o,t}function hl(e,t,a,i){return e=ta(7,e,i,t),e.lanes=a,e}function uc(e,t,a){return e=ta(6,e,null,t),e.lanes=a,e}function If(e){var t=ta(18,null,null,0);return t.stateNode=e,t}function cc(e,t,a){return t=ta(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Kf=new WeakMap;function ma(e,t){if(typeof e=="object"&&e!==null){var a=Kf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Ja(t)},Kf.set(e,t),t)}return{value:e,source:t,stack:Ja(t)}}var Il=[],Kl=0,tr=null,Zi=0,pa=[],xa=0,Cn=null,Ya=1,Va="";function ln(e,t){Il[Kl++]=Zi,Il[Kl++]=tr,tr=e,Zi=t}function Jf(e,t,a){pa[xa++]=Ya,pa[xa++]=Va,pa[xa++]=Cn,Cn=e;var i=Ya;e=Va;var c=32-At(i)-1;i&=~(1<<c),a+=1;var o=32-At(t)+c;if(30<o){var h=c-c%5;o=(i&(1<<h)-1).toString(32),i>>=h,c-=h,Ya=1<<32-At(t)+c|a<<c|i,Va=o+e}else Ya=1<<o|a<<c|i,Va=e}function oc(e){e.return!==null&&(ln(e,1),Jf(e,1,0))}function dc(e){for(;e===tr;)tr=Il[--Kl],Il[Kl]=null,Zi=Il[--Kl],Il[Kl]=null;for(;e===Cn;)Cn=pa[--xa],pa[xa]=null,Va=pa[--xa],pa[xa]=null,Ya=pa[--xa],pa[xa]=null}function Ff(e,t){pa[xa++]=Ya,pa[xa++]=Va,pa[xa++]=Cn,Ya=t.id,Va=t.overflow,Cn=e}var Rt=null,at=null,Le=!1,Tn=null,ya=!1,fc=Error(u(519));function On(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Gi(ma(t,e)),fc}function Wf(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[te]=e,t[_e]=i,a){case"dialog":Re("cancel",t),Re("close",t);break;case"iframe":case"object":case"embed":Re("load",t);break;case"video":case"audio":for(a=0;a<hs.length;a++)Re(hs[a],t);break;case"source":Re("error",t);break;case"img":case"image":case"link":Re("error",t),Re("load",t);break;case"details":Re("toggle",t);break;case"input":Re("invalid",t),df(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Re("invalid",t);break;case"textarea":Re("invalid",t),hf(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||pp(t.textContent,a)?(i.popover!=null&&(Re("beforetoggle",t),Re("toggle",t)),i.onScroll!=null&&Re("scroll",t),i.onScrollEnd!=null&&Re("scrollend",t),i.onClick!=null&&(t.onclick=tn),t=!0):t=!1,t||On(e,!0)}function Pf(e){for(Rt=e.return;Rt;)switch(Rt.tag){case 5:case 31:case 13:ya=!1;return;case 27:case 3:ya=!0;return;default:Rt=Rt.return}}function Jl(e){if(e!==Rt)return!1;if(!Le)return Pf(e),Le=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||To(e.type,e.memoizedProps)),a=!a),a&&at&&On(e),Pf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));at=Np(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));at=Np(e)}else t===27?(t=at,Qn(e.type)?(e=Uo,Uo=null,at=e):at=t):at=Rt?ga(e.stateNode.nextSibling):null;return!0}function ml(){at=Rt=null,Le=!1}function hc(){var e=Tn;return e!==null&&(Gt===null?Gt=e:Gt.push.apply(Gt,e),Tn=null),e}function Gi(e){Tn===null?Tn=[e]:Tn.push(e)}var mc=S(null),pl=null,sn=null;function Mn(e,t,a){F(mc,t._currentValue),t._currentValue=a}function rn(e){e._currentValue=mc.current,$(mc)}function pc(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 xc(e,t,a,i){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var o=c.dependencies;if(o!==null){var h=c.child;o=o.firstContext;e:for(;o!==null;){var g=o;o=c;for(var j=0;j<t.length;j++)if(g.context===t[j]){o.lanes|=a,g=o.alternate,g!==null&&(g.lanes|=a),pc(o.return,a,e),i||(h=null);break e}o=g.next}}else if(c.tag===18){if(h=c.return,h===null)throw Error(u(341));h.lanes|=a,o=h.alternate,o!==null&&(o.lanes|=a),pc(h,a,e),h=null}else h=c.child;if(h!==null)h.return=c;else for(h=c;h!==null;){if(h===e){h=null;break}if(c=h.sibling,c!==null){c.return=h.return,h=c;break}h=h.return}c=h}}function Fl(e,t,a,i){e=null;for(var c=t,o=!1;c!==null;){if(!o){if((c.flags&524288)!==0)o=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var h=c.alternate;if(h===null)throw Error(u(387));if(h=h.memoizedProps,h!==null){var g=c.type;ea(c.pendingProps.value,h.value)||(e!==null?e.push(g):e=[g])}}else if(c===ce.current){if(h=c.alternate,h===null)throw Error(u(387));h.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(vs):e=[vs])}c=c.return}e!==null&&xc(t,e,a,i),t.flags|=262144}function ar(e){for(e=e.firstContext;e!==null;){if(!ea(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function xl(e){pl=e,sn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ct(e){return eh(pl,e)}function nr(e,t){return pl===null&&xl(e),eh(e,t)}function eh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},sn===null){if(e===null)throw Error(u(308));sn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sn=sn.next=t;return a}var dg=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()})}},fg=n.unstable_scheduleCallback,hg=n.unstable_NormalPriority,yt={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function yc(){return{controller:new dg,data:new Map,refCount:0}}function Qi(e){e.refCount--,e.refCount===0&&fg(hg,function(){e.controller.abort()})}var Xi=null,vc=0,Wl=0,Pl=null;function mg(e,t){if(Xi===null){var a=Xi=[];vc=0,Wl=So(),Pl={status:"pending",value:void 0,then:function(i){a.push(i)}}}return vc++,t.then(th,th),t}function th(){if(--vc===0&&Xi!==null){Pl!==null&&(Pl.status="fulfilled");var e=Xi;Xi=null,Wl=0,Pl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pg(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(i.status="rejected",i.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),i}var ah=D.S;D.S=function(e,t){qm=_t(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&mg(e,t),ah!==null&&ah(e,t)};var yl=S(null);function gc(){var e=yl.current;return e!==null?e:Pe.pooledCache}function lr(e,t){t===null?F(yl,yl.current):F(yl,t.pool)}function nh(){var e=gc();return e===null?null:{parent:yt._currentValue,pool:e}}var ei=Error(u(460)),bc=Error(u(474)),ir=Error(u(542)),sr={then:function(){}};function lh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ih(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(tn,tn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,rh(e),e;default:if(typeof t.status=="string")t.then(tn,tn);else{if(e=Pe,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=i}},function(i){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,rh(e),e}throw gl=t,ei}}function vl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(gl=a,ei):a}}var gl=null;function sh(){if(gl===null)throw Error(u(459));var e=gl;return gl=null,e}function rh(e){if(e===ei||e===ir)throw Error(u(483))}var ti=null,Ii=0;function rr(e){var t=Ii;return Ii+=1,ti===null&&(ti=[]),ih(ti,e,t)}function Ki(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ur(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 uh(e){function t(A,_){if(e){var R=A.deletions;R===null?(A.deletions=[_],A.flags|=16):R.push(_)}}function a(A,_){if(!e)return null;for(;_!==null;)t(A,_),_=_.sibling;return null}function i(A){for(var _=new Map;A!==null;)A.key!==null?_.set(A.key,A):_.set(A.index,A),A=A.sibling;return _}function c(A,_){return A=nn(A,_),A.index=0,A.sibling=null,A}function o(A,_,R){return A.index=R,e?(R=A.alternate,R!==null?(R=R.index,R<_?(A.flags|=67108866,_):R):(A.flags|=67108866,_)):(A.flags|=1048576,_)}function h(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function g(A,_,R,Y){return _===null||_.tag!==6?(_=uc(R,A.mode,Y),_.return=A,_):(_=c(_,R),_.return=A,_)}function j(A,_,R,Y){var fe=R.type;return fe===H?z(A,_,R.props.children,Y,R.key):_!==null&&(_.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===ge&&vl(fe)===_.type)?(_=c(_,R.props),Ki(_,R),_.return=A,_):(_=er(R.type,R.key,R.props,null,A.mode,Y),Ki(_,R),_.return=A,_)}function C(A,_,R,Y){return _===null||_.tag!==4||_.stateNode.containerInfo!==R.containerInfo||_.stateNode.implementation!==R.implementation?(_=cc(R,A.mode,Y),_.return=A,_):(_=c(_,R.children||[]),_.return=A,_)}function z(A,_,R,Y,fe){return _===null||_.tag!==7?(_=hl(R,A.mode,Y,fe),_.return=A,_):(_=c(_,R),_.return=A,_)}function Z(A,_,R){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return _=uc(""+_,A.mode,R),_.return=A,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Q:return R=er(_.type,_.key,_.props,null,A.mode,R),Ki(R,_),R.return=A,R;case E:return _=cc(_,A.mode,R),_.return=A,_;case ge:return _=vl(_),Z(A,_,R)}if(Ke(_)||lt(_))return _=hl(_,A.mode,R,null),_.return=A,_;if(typeof _.then=="function")return Z(A,rr(_),R);if(_.$$typeof===W)return Z(A,nr(A,_),R);ur(A,_)}return null}function O(A,_,R,Y){var fe=_!==null?_.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return fe!==null?null:g(A,_,""+R,Y);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case Q:return R.key===fe?j(A,_,R,Y):null;case E:return R.key===fe?C(A,_,R,Y):null;case ge:return R=vl(R),O(A,_,R,Y)}if(Ke(R)||lt(R))return fe!==null?null:z(A,_,R,Y,null);if(typeof R.then=="function")return O(A,_,rr(R),Y);if(R.$$typeof===W)return O(A,_,nr(A,R),Y);ur(A,R)}return null}function L(A,_,R,Y,fe){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return A=A.get(R)||null,g(_,A,""+Y,fe);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case Q:return A=A.get(Y.key===null?R:Y.key)||null,j(_,A,Y,fe);case E:return A=A.get(Y.key===null?R:Y.key)||null,C(_,A,Y,fe);case ge:return Y=vl(Y),L(A,_,R,Y,fe)}if(Ke(Y)||lt(Y))return A=A.get(R)||null,z(_,A,Y,fe,null);if(typeof Y.then=="function")return L(A,_,R,rr(Y),fe);if(Y.$$typeof===W)return L(A,_,R,nr(_,Y),fe);ur(_,Y)}return null}function ie(A,_,R,Y){for(var fe=null,$e=null,re=_,je=_=0,Te=null;re!==null&&je<R.length;je++){re.index>je?(Te=re,re=null):Te=re.sibling;var Ye=O(A,re,R[je],Y);if(Ye===null){re===null&&(re=Te);break}e&&re&&Ye.alternate===null&&t(A,re),_=o(Ye,_,je),$e===null?fe=Ye:$e.sibling=Ye,$e=Ye,re=Te}if(je===R.length)return a(A,re),Le&&ln(A,je),fe;if(re===null){for(;je<R.length;je++)re=Z(A,R[je],Y),re!==null&&(_=o(re,_,je),$e===null?fe=re:$e.sibling=re,$e=re);return Le&&ln(A,je),fe}for(re=i(re);je<R.length;je++)Te=L(re,A,je,R[je],Y),Te!==null&&(e&&Te.alternate!==null&&re.delete(Te.key===null?je:Te.key),_=o(Te,_,je),$e===null?fe=Te:$e.sibling=Te,$e=Te);return e&&re.forEach(function(Fn){return t(A,Fn)}),Le&&ln(A,je),fe}function me(A,_,R,Y){if(R==null)throw Error(u(151));for(var fe=null,$e=null,re=_,je=_=0,Te=null,Ye=R.next();re!==null&&!Ye.done;je++,Ye=R.next()){re.index>je?(Te=re,re=null):Te=re.sibling;var Fn=O(A,re,Ye.value,Y);if(Fn===null){re===null&&(re=Te);break}e&&re&&Fn.alternate===null&&t(A,re),_=o(Fn,_,je),$e===null?fe=Fn:$e.sibling=Fn,$e=Fn,re=Te}if(Ye.done)return a(A,re),Le&&ln(A,je),fe;if(re===null){for(;!Ye.done;je++,Ye=R.next())Ye=Z(A,Ye.value,Y),Ye!==null&&(_=o(Ye,_,je),$e===null?fe=Ye:$e.sibling=Ye,$e=Ye);return Le&&ln(A,je),fe}for(re=i(re);!Ye.done;je++,Ye=R.next())Ye=L(re,A,je,Ye.value,Y),Ye!==null&&(e&&Ye.alternate!==null&&re.delete(Ye.key===null?je:Ye.key),_=o(Ye,_,je),$e===null?fe=Ye:$e.sibling=Ye,$e=Ye);return e&&re.forEach(function(A0){return t(A,A0)}),Le&&ln(A,je),fe}function We(A,_,R,Y){if(typeof R=="object"&&R!==null&&R.type===H&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case Q:e:{for(var fe=R.key;_!==null;){if(_.key===fe){if(fe=R.type,fe===H){if(_.tag===7){a(A,_.sibling),Y=c(_,R.props.children),Y.return=A,A=Y;break e}}else if(_.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===ge&&vl(fe)===_.type){a(A,_.sibling),Y=c(_,R.props),Ki(Y,R),Y.return=A,A=Y;break e}a(A,_);break}else t(A,_);_=_.sibling}R.type===H?(Y=hl(R.props.children,A.mode,Y,R.key),Y.return=A,A=Y):(Y=er(R.type,R.key,R.props,null,A.mode,Y),Ki(Y,R),Y.return=A,A=Y)}return h(A);case E:e:{for(fe=R.key;_!==null;){if(_.key===fe)if(_.tag===4&&_.stateNode.containerInfo===R.containerInfo&&_.stateNode.implementation===R.implementation){a(A,_.sibling),Y=c(_,R.children||[]),Y.return=A,A=Y;break e}else{a(A,_);break}else t(A,_);_=_.sibling}Y=cc(R,A.mode,Y),Y.return=A,A=Y}return h(A);case ge:return R=vl(R),We(A,_,R,Y)}if(Ke(R))return ie(A,_,R,Y);if(lt(R)){if(fe=lt(R),typeof fe!="function")throw Error(u(150));return R=fe.call(R),me(A,_,R,Y)}if(typeof R.then=="function")return We(A,_,rr(R),Y);if(R.$$typeof===W)return We(A,_,nr(A,R),Y);ur(A,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,_!==null&&_.tag===6?(a(A,_.sibling),Y=c(_,R),Y.return=A,A=Y):(a(A,_),Y=uc(R,A.mode,Y),Y.return=A,A=Y),h(A)):a(A,_)}return function(A,_,R,Y){try{Ii=0;var fe=We(A,_,R,Y);return ti=null,fe}catch(re){if(re===ei||re===ir)throw re;var $e=ta(29,re,null,A.mode);return $e.lanes=Y,$e.return=A,$e}finally{}}}var bl=uh(!0),ch=uh(!1),Ln=!1;function wc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sc(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 Dn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Un(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Ve&2)!==0){var c=i.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),i.pending=t,t=Ps(e),Qf(e,null,a),t}return Ws(e,i,t,a),Ps(e)}function Ji(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,Bs(e,a)}}function jc(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){var c=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?c=o=h:o=o.next=h,a=a.next}while(a!==null);o===null?c=o=t:o=o.next=t}else c=o=t;a={baseState:i.baseState,firstBaseUpdate:c,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 Nc=!1;function Fi(){if(Nc){var e=Pl;if(e!==null)throw e}}function Wi(e,t,a,i){Nc=!1;var c=e.updateQueue;Ln=!1;var o=c.firstBaseUpdate,h=c.lastBaseUpdate,g=c.shared.pending;if(g!==null){c.shared.pending=null;var j=g,C=j.next;j.next=null,h===null?o=C:h.next=C,h=j;var z=e.alternate;z!==null&&(z=z.updateQueue,g=z.lastBaseUpdate,g!==h&&(g===null?z.firstBaseUpdate=C:g.next=C,z.lastBaseUpdate=j))}if(o!==null){var Z=c.baseState;h=0,z=C=j=null,g=o;do{var O=g.lane&-536870913,L=O!==g.lane;if(L?(Ce&O)===O:(i&O)===O){O!==0&&O===Wl&&(Nc=!0),z!==null&&(z=z.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{var ie=e,me=g;O=t;var We=a;switch(me.tag){case 1:if(ie=me.payload,typeof ie=="function"){Z=ie.call(We,Z,O);break e}Z=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=me.payload,O=typeof ie=="function"?ie.call(We,Z,O):ie,O==null)break e;Z=N({},Z,O);break e;case 2:Ln=!0}}O=g.callback,O!==null&&(e.flags|=64,L&&(e.flags|=8192),L=c.callbacks,L===null?c.callbacks=[O]:L.push(O))}else L={lane:O,tag:g.tag,payload:g.payload,callback:g.callback,next:null},z===null?(C=z=L,j=Z):z=z.next=L,h|=O;if(g=g.next,g===null){if(g=c.shared.pending,g===null)break;L=g,g=L.next,L.next=null,c.lastBaseUpdate=L,c.shared.pending=null}}while(!0);z===null&&(j=Z),c.baseState=j,c.firstBaseUpdate=C,c.lastBaseUpdate=z,o===null&&(c.shared.lanes=0),$n|=h,e.lanes=h,e.memoizedState=Z}}function oh(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function dh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)oh(a[e],t)}var ai=S(null),cr=S(0);function fh(e,t){e=xn,F(cr,e),F(ai,t),xn=e|t.baseLanes}function _c(){F(cr,xn),F(ai,ai.current)}function Ac(){xn=cr.current,$(ai),$(cr)}var aa=S(null),va=null;function zn(e){var t=e.alternate;F(ht,ht.current&1),F(aa,e),va===null&&(t===null||ai.current!==null||t.memoizedState!==null)&&(va=e)}function kc(e){F(ht,ht.current),F(aa,e),va===null&&(va=e)}function hh(e){e.tag===22?(F(ht,ht.current),F(aa,e),va===null&&(va=e)):Bn()}function Bn(){F(ht,ht.current),F(aa,aa.current)}function na(e){$(aa),va===e&&(va=null),$(ht)}var ht=S(0);function or(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Lo(a)||Do(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 un=0,Se=null,Je=null,vt=null,dr=!1,ni=!1,wl=!1,fr=0,Pi=0,li=null,xg=0;function ot(){throw Error(u(321))}function Ec(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!ea(e[a],t[a]))return!1;return!0}function Rc(e,t,a,i,c,o){return un=o,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Jh:Zc,wl=!1,o=a(i,c),wl=!1,ni&&(o=ph(t,a,i,c)),mh(e),o}function mh(e){D.H=as;var t=Je!==null&&Je.next!==null;if(un=0,vt=Je=Se=null,dr=!1,Pi=0,li=null,t)throw Error(u(300));e===null||gt||(e=e.dependencies,e!==null&&ar(e)&&(gt=!0))}function ph(e,t,a,i){Se=e;var c=0;do{if(ni&&(li=null),Pi=0,ni=!1,25<=c)throw Error(u(301));if(c+=1,vt=Je=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=Fh,o=t(a,i)}while(ni);return o}function yg(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?es(t):t,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(Se.flags|=1024),t}function Cc(){var e=fr!==0;return fr=0,e}function Tc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Oc(e){if(dr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}dr=!1}un=0,vt=Je=Se=null,ni=!1,Pi=fr=0,li=null}function Bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vt===null?Se.memoizedState=vt=e:vt=vt.next=e,vt}function mt(){if(Je===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=vt===null?Se.memoizedState:vt.next;if(t!==null)vt=t,Je=e;else{if(e===null)throw Se.alternate===null?Error(u(467)):Error(u(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},vt===null?Se.memoizedState=vt=e:vt=vt.next=e}return vt}function hr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function es(e){var t=Pi;return Pi+=1,li===null&&(li=[]),e=ih(li,e,t),t=Se,(vt===null?t.memoizedState:vt.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Jh:Zc),e}function mr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return es(e);if(e.$$typeof===W)return Ct(e)}throw Error(u(438,String(e)))}function Mc(e){var t=null,a=Se.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=Se.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=hr(),Se.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]=pt;return t.index++,a}function cn(e,t){return typeof t=="function"?t(e):t}function pr(e){var t=mt();return Lc(t,Je,e)}function Lc(e,t,a){var i=e.queue;if(i===null)throw Error(u(311));i.lastRenderedReducer=a;var c=e.baseQueue,o=i.pending;if(o!==null){if(c!==null){var h=c.next;c.next=o.next,o.next=h}t.baseQueue=c=o,i.pending=null}if(o=e.baseState,c===null)e.memoizedState=o;else{t=c.next;var g=h=null,j=null,C=t,z=!1;do{var Z=C.lane&-536870913;if(Z!==C.lane?(Ce&Z)===Z:(un&Z)===Z){var O=C.revertLane;if(O===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null}),Z===Wl&&(z=!0);else if((un&O)===O){C=C.next,O===Wl&&(z=!0);continue}else Z={lane:0,revertLane:C.revertLane,gesture:null,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},j===null?(g=j=Z,h=o):j=j.next=Z,Se.lanes|=O,$n|=O;Z=C.action,wl&&a(o,Z),o=C.hasEagerState?C.eagerState:a(o,Z)}else O={lane:Z,revertLane:C.revertLane,gesture:C.gesture,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},j===null?(g=j=O,h=o):j=j.next=O,Se.lanes|=Z,$n|=Z;C=C.next}while(C!==null&&C!==t);if(j===null?h=o:j.next=g,!ea(o,e.memoizedState)&&(gt=!0,z&&(a=Pl,a!==null)))throw a;e.memoizedState=o,e.baseState=h,e.baseQueue=j,i.lastRenderedState=o}return c===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function Dc(e){var t=mt(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var i=a.dispatch,c=a.pending,o=t.memoizedState;if(c!==null){a.pending=null;var h=c=c.next;do o=e(o,h.action),h=h.next;while(h!==c);ea(o,t.memoizedState)||(gt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),a.lastRenderedState=o}return[o,i]}function xh(e,t,a){var i=Se,c=mt(),o=Le;if(o){if(a===void 0)throw Error(u(407));a=a()}else a=t();var h=!ea((Je||c).memoizedState,a);if(h&&(c.memoizedState=a,gt=!0),c=c.queue,Bc(gh.bind(null,i,c,e),[e]),c.getSnapshot!==t||h||vt!==null&&vt.memoizedState.tag&1){if(i.flags|=2048,ii(9,{destroy:void 0},vh.bind(null,i,c,a,t),null),Pe===null)throw Error(u(349));o||(un&127)!==0||yh(i,t,a)}return a}function yh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Se.updateQueue,t===null?(t=hr(),Se.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function vh(e,t,a,i){t.value=a,t.getSnapshot=i,bh(t)&&wh(e)}function gh(e,t,a){return a(function(){bh(t)&&wh(e)})}function bh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!ea(e,a)}catch{return!0}}function wh(e){var t=fl(e,2);t!==null&&Qt(t,e,2)}function Uc(e){var t=Bt();if(typeof e=="function"){var a=e;if(e=a(),wl){Wt(!0);try{a()}finally{Wt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cn,lastRenderedState:e},t}function Sh(e,t,a,i){return e.baseState=a,Lc(e,Je,typeof i=="function"?i:cn)}function vg(e,t,a,i,c){if(vr(e))throw Error(u(485));if(e=t.action,e!==null){var o={payload:c,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,jh(t,o)):(o.next=a.next,t.pending=a.next=o)}}function jh(e,t){var a=t.action,i=t.payload,c=e.state;if(t.isTransition){var o=D.T,h={};D.T=h;try{var g=a(c,i),j=D.S;j!==null&&j(h,g),Nh(e,t,g)}catch(C){zc(e,t,C)}finally{o!==null&&h.types!==null&&(o.types=h.types),D.T=o}}else try{o=a(c,i),Nh(e,t,o)}catch(C){zc(e,t,C)}}function Nh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){_h(e,t,i)},function(i){return zc(e,t,i)}):_h(e,t,a)}function _h(e,t,a){t.status="fulfilled",t.value=a,Ah(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,jh(e,a)))}function zc(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,Ah(t),t=t.next;while(t!==i)}e.action=null}function Ah(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function kh(e,t){return t}function Eh(e,t){if(Le){var a=Pe.formState;if(a!==null){e:{var i=Se;if(Le){if(at){t:{for(var c=at,o=ya;c.nodeType!==8;){if(!o){c=null;break t}if(c=ga(c.nextSibling),c===null){c=null;break t}}o=c.data,c=o==="F!"||o==="F"?c:null}if(c){at=ga(c.nextSibling),i=c.data==="F!";break e}}On(i)}i=!1}i&&(t=a[0])}}return a=Bt(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:kh,lastRenderedState:t},a.queue=i,a=Xh.bind(null,Se,i),i.dispatch=a,i=Uc(!1),o=Vc.bind(null,Se,!1,i.queue),i=Bt(),c={state:t,dispatch:null,action:e,pending:null},i.queue=c,a=vg.bind(null,Se,c,o,a),c.dispatch=a,i.memoizedState=e,[t,a,!1]}function Rh(e){var t=mt();return Ch(t,Je,e)}function Ch(e,t,a){if(t=Lc(e,t,kh)[0],e=pr(cn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=es(t)}catch(h){throw h===ei?ir:h}else i=t;t=mt();var c=t.queue,o=c.dispatch;return a!==t.memoizedState&&(Se.flags|=2048,ii(9,{destroy:void 0},gg.bind(null,c,a),null)),[i,o,e]}function gg(e,t){e.action=t}function Th(e){var t=mt(),a=Je;if(a!==null)return Ch(t,a,e);mt(),t=t.memoizedState,a=mt();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function ii(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=Se.updateQueue,t===null&&(t=hr(),Se.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 Oh(){return mt().memoizedState}function xr(e,t,a,i){var c=Bt();Se.flags|=e,c.memoizedState=ii(1|t,{destroy:void 0},a,i===void 0?null:i)}function yr(e,t,a,i){var c=mt();i=i===void 0?null:i;var o=c.memoizedState.inst;Je!==null&&i!==null&&Ec(i,Je.memoizedState.deps)?c.memoizedState=ii(t,o,a,i):(Se.flags|=e,c.memoizedState=ii(1|t,o,a,i))}function Mh(e,t){xr(8390656,8,e,t)}function Bc(e,t){yr(2048,8,e,t)}function bg(e){Se.flags|=4;var t=Se.updateQueue;if(t===null)t=hr(),Se.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Lh(e){var t=mt().memoizedState;return bg({ref:t,nextImpl:e}),function(){if((Ve&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Dh(e,t){return yr(4,2,e,t)}function Uh(e,t){return yr(4,4,e,t)}function zh(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 Bh(e,t,a){a=a!=null?a.concat([e]):null,yr(4,4,zh.bind(null,t,e),a)}function qc(){}function qh(e,t){var a=mt();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&Ec(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function Hh(e,t){var a=mt();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&Ec(t,i[1]))return i[0];if(i=e(),wl){Wt(!0);try{e()}finally{Wt(!1)}}return a.memoizedState=[i,t],i}function Hc(e,t,a){return a===void 0||(un&1073741824)!==0&&(Ce&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=$m(),Se.lanes|=e,$n|=e,a)}function $h(e,t,a,i){return ea(a,t)?a:ai.current!==null?(e=Hc(e,a,i),ea(e,t)||(gt=!0),e):(un&42)===0||(un&1073741824)!==0&&(Ce&261930)===0?(gt=!0,e.memoizedState=a):(e=$m(),Se.lanes|=e,$n|=e,t)}function Yh(e,t,a,i,c){var o=K.p;K.p=o!==0&&8>o?o:8;var h=D.T,g={};D.T=g,Vc(e,!1,t,a);try{var j=c(),C=D.S;if(C!==null&&C(g,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var z=pg(j,i);ts(e,t,z,sa(e))}else ts(e,t,i,sa(e))}catch(Z){ts(e,t,{then:function(){},status:"rejected",reason:Z},sa())}finally{K.p=o,h!==null&&g.types!==null&&(h.types=g.types),D.T=h}}function wg(){}function $c(e,t,a,i){if(e.tag!==5)throw Error(u(476));var c=Vh(e).queue;Yh(e,c,t,oe,a===null?wg:function(){return Zh(e),a(i)})}function Vh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cn,lastRenderedState:oe},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Zh(e){var t=Vh(e);t.next===null&&(t=e.alternate.memoizedState),ts(e,t.next.queue,{},sa())}function Yc(){return Ct(vs)}function Gh(){return mt().memoizedState}function Qh(){return mt().memoizedState}function Sg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=sa();e=Dn(a);var i=Un(t,e,a);i!==null&&(Qt(i,t,a),Ji(i,t,a)),t={cache:yc()},e.payload=t;return}t=t.return}}function jg(e,t,a){var i=sa();a={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},vr(e)?Ih(t,a):(a=sc(e,t,a,i),a!==null&&(Qt(a,e,i),Kh(a,t,i)))}function Xh(e,t,a){var i=sa();ts(e,t,a,i)}function ts(e,t,a,i){var c={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(vr(e))Ih(t,c);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var h=t.lastRenderedState,g=o(h,a);if(c.hasEagerState=!0,c.eagerState=g,ea(g,h))return Ws(e,t,c,0),Pe===null&&Fs(),!1}catch{}finally{}if(a=sc(e,t,c,i),a!==null)return Qt(a,e,i),Kh(a,t,i),!0}return!1}function Vc(e,t,a,i){if(i={lane:2,revertLane:So(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},vr(e)){if(t)throw Error(u(479))}else t=sc(e,a,i,2),t!==null&&Qt(t,e,2)}function vr(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function Ih(e,t){ni=dr=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Kh(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Bs(e,a)}}var as={readContext:Ct,use:mr,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useLayoutEffect:ot,useInsertionEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useSyncExternalStore:ot,useId:ot,useHostTransitionStatus:ot,useFormState:ot,useActionState:ot,useOptimistic:ot,useMemoCache:ot,useCacheRefresh:ot};as.useEffectEvent=ot;var Jh={readContext:Ct,use:mr,useCallback:function(e,t){return Bt().memoizedState=[e,t===void 0?null:t],e},useContext:Ct,useEffect:Mh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,xr(4194308,4,zh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return xr(4194308,4,e,t)},useInsertionEffect:function(e,t){xr(4,2,e,t)},useMemo:function(e,t){var a=Bt();t=t===void 0?null:t;var i=e();if(wl){Wt(!0);try{e()}finally{Wt(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=Bt();if(a!==void 0){var c=a(t);if(wl){Wt(!0);try{a(t)}finally{Wt(!1)}}}else c=t;return i.memoizedState=i.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},i.queue=e,e=e.dispatch=jg.bind(null,Se,e),[i.memoizedState,e]},useRef:function(e){var t=Bt();return e={current:e},t.memoizedState=e},useState:function(e){e=Uc(e);var t=e.queue,a=Xh.bind(null,Se,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:qc,useDeferredValue:function(e,t){var a=Bt();return Hc(a,e,t)},useTransition:function(){var e=Uc(!1);return e=Yh.bind(null,Se,e.queue,!0,!1),Bt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=Se,c=Bt();if(Le){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Pe===null)throw Error(u(349));(Ce&127)!==0||yh(i,t,a)}c.memoizedState=a;var o={value:a,getSnapshot:t};return c.queue=o,Mh(gh.bind(null,i,o,e),[e]),i.flags|=2048,ii(9,{destroy:void 0},vh.bind(null,i,o,a,t),null),a},useId:function(){var e=Bt(),t=Pe.identifierPrefix;if(Le){var a=Va,i=Ya;a=(i&~(1<<32-At(i)-1)).toString(32)+a,t="_"+t+"R_"+a,a=fr++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=xg++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Yc,useFormState:Eh,useActionState:Eh,useOptimistic:function(e){var t=Bt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Vc.bind(null,Se,!0,a),a.dispatch=t,[e,t]},useMemoCache:Mc,useCacheRefresh:function(){return Bt().memoizedState=Sg.bind(null,Se)},useEffectEvent:function(e){var t=Bt(),a={impl:e};return t.memoizedState=a,function(){if((Ve&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},Zc={readContext:Ct,use:mr,useCallback:qh,useContext:Ct,useEffect:Bc,useImperativeHandle:Bh,useInsertionEffect:Dh,useLayoutEffect:Uh,useMemo:Hh,useReducer:pr,useRef:Oh,useState:function(){return pr(cn)},useDebugValue:qc,useDeferredValue:function(e,t){var a=mt();return $h(a,Je.memoizedState,e,t)},useTransition:function(){var e=pr(cn)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:es(e),t]},useSyncExternalStore:xh,useId:Gh,useHostTransitionStatus:Yc,useFormState:Rh,useActionState:Rh,useOptimistic:function(e,t){var a=mt();return Sh(a,Je,e,t)},useMemoCache:Mc,useCacheRefresh:Qh};Zc.useEffectEvent=Lh;var Fh={readContext:Ct,use:mr,useCallback:qh,useContext:Ct,useEffect:Bc,useImperativeHandle:Bh,useInsertionEffect:Dh,useLayoutEffect:Uh,useMemo:Hh,useReducer:Dc,useRef:Oh,useState:function(){return Dc(cn)},useDebugValue:qc,useDeferredValue:function(e,t){var a=mt();return Je===null?Hc(a,e,t):$h(a,Je.memoizedState,e,t)},useTransition:function(){var e=Dc(cn)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:es(e),t]},useSyncExternalStore:xh,useId:Gh,useHostTransitionStatus:Yc,useFormState:Th,useActionState:Th,useOptimistic:function(e,t){var a=mt();return Je!==null?Sh(a,Je,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Mc,useCacheRefresh:Qh};Fh.useEffectEvent=Lh;function Gc(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:N({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Qc={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=sa(),c=Dn(i);c.payload=t,a!=null&&(c.callback=a),t=Un(e,c,i),t!==null&&(Qt(t,e,i),Ji(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=sa(),c=Dn(i);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=Un(e,c,i),t!==null&&(Qt(t,e,i),Ji(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=sa(),i=Dn(a);i.tag=2,t!=null&&(i.callback=t),t=Un(e,i,a),t!==null&&(Qt(t,e,a),Ji(t,e,a))}};function Wh(e,t,a,i,c,o,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,o,h):t.prototype&&t.prototype.isPureReactComponent?!Yi(a,i)||!Yi(c,o):!0}function Ph(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&&Qc.enqueueReplaceState(t,t.state,null)}function Sl(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=N({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function em(e){Js(e)}function tm(e){console.error(e)}function am(e){Js(e)}function gr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function nm(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Xc(e,t,a){return a=Dn(a),a.tag=3,a.payload={element:null},a.callback=function(){gr(e,t)},a}function lm(e){return e=Dn(e),e.tag=3,e}function im(e,t,a,i){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var o=i.value;e.payload=function(){return c(o)},e.callback=function(){nm(t,a,i)}}var h=a.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){nm(t,a,i),typeof c!="function"&&(Yn===null?Yn=new Set([this]):Yn.add(this));var g=i.stack;this.componentDidCatch(i.value,{componentStack:g!==null?g:""})})}function Ng(e,t,a,i,c){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&Fl(t,a,c,!0),a=aa.current,a!==null){switch(a.tag){case 31:case 13:return va===null?Tr():a.alternate===null&&dt===0&&(dt=3),a.flags&=-257,a.flags|=65536,a.lanes=c,i===sr?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),go(e,i,c)),!1;case 22:return a.flags|=65536,i===sr?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)),go(e,i,c)),!1}throw Error(u(435,a.tag))}return go(e,i,c),Tr(),!1}if(Le)return t=aa.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,i!==fc&&(e=Error(u(422),{cause:i}),Gi(ma(e,a)))):(i!==fc&&(t=Error(u(423),{cause:i}),Gi(ma(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,i=ma(i,a),c=Xc(e.stateNode,i,c),jc(e,c),dt!==4&&(dt=2)),!1;var o=Error(u(520),{cause:i});if(o=ma(o,a),os===null?os=[o]:os.push(o),dt!==4&&(dt=2),t===null)return!0;i=ma(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Xc(a.stateNode,i,e),jc(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"&&(Yn===null||!Yn.has(o))))return a.flags|=65536,c&=-c,a.lanes|=c,c=lm(c),im(c,e,a,i),jc(a,c),!1}a=a.return}while(a!==null);return!1}var Ic=Error(u(461)),gt=!1;function Tt(e,t,a,i){t.child=e===null?ch(t,null,a,i):bl(t,e.child,a,i)}function sm(e,t,a,i,c){a=a.render;var o=t.ref;if("ref"in i){var h={};for(var g in i)g!=="ref"&&(h[g]=i[g])}else h=i;return xl(t),i=Rc(e,t,a,h,o,c),g=Cc(),e!==null&&!gt?(Tc(e,t,c),on(e,t,c)):(Le&&g&&oc(t),t.flags|=1,Tt(e,t,i,c),t.child)}function rm(e,t,a,i,c){if(e===null){var o=a.type;return typeof o=="function"&&!rc(o)&&o.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=o,um(e,t,o,i,c)):(e=er(a.type,null,i,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!ao(e,c)){var h=o.memoizedProps;if(a=a.compare,a=a!==null?a:Yi,a(h,i)&&e.ref===t.ref)return on(e,t,c)}return t.flags|=1,e=nn(o,i),e.ref=t.ref,e.return=t,t.child=e}function um(e,t,a,i,c){if(e!==null){var o=e.memoizedProps;if(Yi(o,i)&&e.ref===t.ref)if(gt=!1,t.pendingProps=i=o,ao(e,c))(e.flags&131072)!==0&&(gt=!0);else return t.lanes=e.lanes,on(e,t,c)}return Kc(e,t,a,i,c)}function cm(e,t,a,i){var c=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,c=0;i!==null;)c=c|i.lanes|i.childLanes,i=i.sibling;i=c&~o}else i=0,t.child=null;return om(e,t,o,a,i)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&lr(t,o!==null?o.cachePool:null),o!==null?fh(t,o):_c(),hh(t);else return i=t.lanes=536870912,om(e,t,o!==null?o.baseLanes|a:a,a,i)}else o!==null?(lr(t,o.cachePool),fh(t,o),Bn(),t.memoizedState=null):(e!==null&&lr(t,null),_c(),Bn());return Tt(e,t,c,a),t.child}function ns(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function om(e,t,a,i,c){var o=gc();return o=o===null?null:{parent:yt._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&lr(t,null),_c(),hh(t),e!==null&&Fl(e,t,i,!0),t.childLanes=c,null}function br(e,t){return t=Sr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function dm(e,t,a){return bl(t,e.child,null,a),e=br(t,t.pendingProps),e.flags|=2,na(t),t.memoizedState=null,e}function _g(e,t,a){var i=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Le){if(i.mode==="hidden")return e=br(t,i),t.lanes=536870912,ns(null,e);if(kc(t),(e=at)?(e=jp(e,ya),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Cn!==null?{id:Ya,overflow:Va}:null,retryLane:536870912,hydrationErrors:null},a=If(e),a.return=t,t.child=a,Rt=t,at=null)):e=null,e===null)throw On(t);return t.lanes=536870912,null}return br(t,i)}var o=e.memoizedState;if(o!==null){var h=o.dehydrated;if(kc(t),c)if(t.flags&256)t.flags&=-257,t=dm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(gt||Fl(e,t,a,!1),c=(a&e.childLanes)!==0,gt||c){if(i=Pe,i!==null&&(h=Ci(i,a),h!==0&&h!==o.retryLane))throw o.retryLane=h,fl(e,h),Qt(i,e,h),Ic;Tr(),t=dm(e,t,a)}else e=o.treeContext,at=ga(h.nextSibling),Rt=t,Le=!0,Tn=null,ya=!1,e!==null&&Ff(t,e),t=br(t,i),t.flags|=4096;return t}return e=nn(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function wr(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 Kc(e,t,a,i,c){return xl(t),a=Rc(e,t,a,i,void 0,c),i=Cc(),e!==null&&!gt?(Tc(e,t,c),on(e,t,c)):(Le&&i&&oc(t),t.flags|=1,Tt(e,t,a,c),t.child)}function fm(e,t,a,i,c,o){return xl(t),t.updateQueue=null,a=ph(t,i,a,c),mh(e),i=Cc(),e!==null&&!gt?(Tc(e,t,o),on(e,t,o)):(Le&&i&&oc(t),t.flags|=1,Tt(e,t,a,o),t.child)}function hm(e,t,a,i,c){if(xl(t),t.stateNode===null){var o=Xl,h=a.contextType;typeof h=="object"&&h!==null&&(o=Ct(h)),o=new a(i,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Qc,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=i,o.state=t.memoizedState,o.refs={},wc(t),h=a.contextType,o.context=typeof h=="object"&&h!==null?Ct(h):Xl,o.state=t.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(Gc(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&&Qc.enqueueReplaceState(o,o.state,null),Wi(t,i,o,c),Fi(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){o=t.stateNode;var g=t.memoizedProps,j=Sl(a,g);o.props=j;var C=o.context,z=a.contextType;h=Xl,typeof z=="object"&&z!==null&&(h=Ct(z));var Z=a.getDerivedStateFromProps;z=typeof Z=="function"||typeof o.getSnapshotBeforeUpdate=="function",g=t.pendingProps!==g,z||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(g||C!==h)&&Ph(t,o,i,h),Ln=!1;var O=t.memoizedState;o.state=O,Wi(t,i,o,c),Fi(),C=t.memoizedState,g||O!==C||Ln?(typeof Z=="function"&&(Gc(t,a,Z,i),C=t.memoizedState),(j=Ln||Wh(t,a,j,i,O,C,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=C),o.props=i,o.state=C,o.context=h,i=j):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{o=t.stateNode,Sc(e,t),h=t.memoizedProps,z=Sl(a,h),o.props=z,Z=t.pendingProps,O=o.context,C=a.contextType,j=Xl,typeof C=="object"&&C!==null&&(j=Ct(C)),g=a.getDerivedStateFromProps,(C=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(h!==Z||O!==j)&&Ph(t,o,i,j),Ln=!1,O=t.memoizedState,o.state=O,Wi(t,i,o,c),Fi();var L=t.memoizedState;h!==Z||O!==L||Ln||e!==null&&e.dependencies!==null&&ar(e.dependencies)?(typeof g=="function"&&(Gc(t,a,g,i),L=t.memoizedState),(z=Ln||Wh(t,a,z,i,O,L,j)||e!==null&&e.dependencies!==null&&ar(e.dependencies))?(C||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,L,j),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,L,j)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=L),o.props=i,o.state=L,o.context=j,i=z):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),i=!1)}return o=i,wr(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=bl(t,e.child,null,c),t.child=bl(t,null,a,c)):Tt(e,t,a,c),t.memoizedState=o.state,e=t.child):e=on(e,t,c),e}function mm(e,t,a,i){return ml(),t.flags|=256,Tt(e,t,a,i),t.child}var Jc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Fc(e){return{baseLanes:e,cachePool:nh()}}function Wc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=ia),e}function pm(e,t,a){var i=t.pendingProps,c=!1,o=(t.flags&128)!==0,h;if((h=o)||(h=e!==null&&e.memoizedState===null?!1:(ht.current&2)!==0),h&&(c=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Le){if(c?zn(t):Bn(),(e=at)?(e=jp(e,ya),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Cn!==null?{id:Ya,overflow:Va}:null,retryLane:536870912,hydrationErrors:null},a=If(e),a.return=t,t.child=a,Rt=t,at=null)):e=null,e===null)throw On(t);return Do(e)?t.lanes=32:t.lanes=536870912,null}var g=i.children;return i=i.fallback,c?(Bn(),c=t.mode,g=Sr({mode:"hidden",children:g},c),i=hl(i,c,a,null),g.return=t,i.return=t,g.sibling=i,t.child=g,i=t.child,i.memoizedState=Fc(a),i.childLanes=Wc(e,h,a),t.memoizedState=Jc,ns(null,i)):(zn(t),Pc(t,g))}var j=e.memoizedState;if(j!==null&&(g=j.dehydrated,g!==null)){if(o)t.flags&256?(zn(t),t.flags&=-257,t=eo(e,t,a)):t.memoizedState!==null?(Bn(),t.child=e.child,t.flags|=128,t=null):(Bn(),g=i.fallback,c=t.mode,i=Sr({mode:"visible",children:i.children},c),g=hl(g,c,a,null),g.flags|=2,i.return=t,g.return=t,i.sibling=g,t.child=i,bl(t,e.child,null,a),i=t.child,i.memoizedState=Fc(a),i.childLanes=Wc(e,h,a),t.memoizedState=Jc,t=ns(null,i));else if(zn(t),Do(g)){if(h=g.nextSibling&&g.nextSibling.dataset,h)var C=h.dgst;h=C,i=Error(u(419)),i.stack="",i.digest=h,Gi({value:i,source:null,stack:null}),t=eo(e,t,a)}else if(gt||Fl(e,t,a,!1),h=(a&e.childLanes)!==0,gt||h){if(h=Pe,h!==null&&(i=Ci(h,a),i!==0&&i!==j.retryLane))throw j.retryLane=i,fl(e,i),Qt(h,e,i),Ic;Lo(g)||Tr(),t=eo(e,t,a)}else Lo(g)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,at=ga(g.nextSibling),Rt=t,Le=!0,Tn=null,ya=!1,e!==null&&Ff(t,e),t=Pc(t,i.children),t.flags|=4096);return t}return c?(Bn(),g=i.fallback,c=t.mode,j=e.child,C=j.sibling,i=nn(j,{mode:"hidden",children:i.children}),i.subtreeFlags=j.subtreeFlags&65011712,C!==null?g=nn(C,g):(g=hl(g,c,a,null),g.flags|=2),g.return=t,i.return=t,i.sibling=g,t.child=i,ns(null,i),i=t.child,g=e.child.memoizedState,g===null?g=Fc(a):(c=g.cachePool,c!==null?(j=yt._currentValue,c=c.parent!==j?{parent:j,pool:j}:c):c=nh(),g={baseLanes:g.baseLanes|a,cachePool:c}),i.memoizedState=g,i.childLanes=Wc(e,h,a),t.memoizedState=Jc,ns(e.child,i)):(zn(t),a=e.child,e=a.sibling,a=nn(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 Pc(e,t){return t=Sr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Sr(e,t){return e=ta(22,e,null,t),e.lanes=0,e}function eo(e,t,a){return bl(t,e.child,null,a),e=Pc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xm(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),pc(e.return,t,a)}function to(e,t,a,i,c,o){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:c,treeForkCount:o}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=i,h.tail=a,h.tailMode=c,h.treeForkCount=o)}function ym(e,t,a){var i=t.pendingProps,c=i.revealOrder,o=i.tail;i=i.children;var h=ht.current,g=(h&2)!==0;if(g?(h=h&1|2,t.flags|=128):h&=1,F(ht,h),Tt(e,t,i,a),i=Le?Zi:0,!g&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xm(e,a,t);else if(e.tag===19)xm(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(c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&or(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),to(t,!1,c,a,o,i);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&or(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}to(t,!0,a,null,o,i);break;case"together":to(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function on(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),$n|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Fl(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=nn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=nn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function ao(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ar(e)))}function Ag(e,t,a){switch(t.tag){case 3:Ue(t,t.stateNode.containerInfo),Mn(t,yt,e.memoizedState.cache),ml();break;case 27:case 5:Kt(t);break;case 4:Ue(t,t.stateNode.containerInfo);break;case 10:Mn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,kc(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(zn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?pm(e,t,a):(zn(t),e=on(e,t,a),e!==null?e.sibling:null);zn(t);break;case 19:var c=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(Fl(e,t,a,!1),i=(a&t.childLanes)!==0),c){if(i)return ym(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),F(ht,ht.current),i)break;return null;case 22:return t.lanes=0,cm(e,t,a,t.pendingProps);case 24:Mn(t,yt,e.memoizedState.cache)}return on(e,t,a)}function vm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)gt=!0;else{if(!ao(e,a)&&(t.flags&128)===0)return gt=!1,Ag(e,t,a);gt=(e.flags&131072)!==0}else gt=!1,Le&&(t.flags&1048576)!==0&&Jf(t,Zi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=vl(t.elementType),t.type=e,typeof e=="function")rc(e)?(i=Sl(e,i),t.tag=1,t=hm(null,t,e,i,a)):(t.tag=0,t=Kc(null,t,e,i,a));else{if(e!=null){var c=e.$$typeof;if(c===se){t.tag=11,t=sm(null,t,e,i,a);break e}else if(c===X){t.tag=14,t=rm(null,t,e,i,a);break e}}throw t=et(e)||e,Error(u(306,t,""))}}return t;case 0:return Kc(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,c=Sl(i,t.pendingProps),hm(e,t,i,c,a);case 3:e:{if(Ue(t,t.stateNode.containerInfo),e===null)throw Error(u(387));i=t.pendingProps;var o=t.memoizedState;c=o.element,Sc(e,t),Wi(t,i,null,a);var h=t.memoizedState;if(i=h.cache,Mn(t,yt,i),i!==o.cache&&xc(t,[yt],a,!0),Fi(),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=mm(e,t,i,a);break e}else if(i!==c){c=ma(Error(u(424)),t),Gi(c),t=mm(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(at=ga(e.firstChild),Rt=t,Le=!0,Tn=null,ya=!0,a=ch(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(ml(),i===c){t=on(e,t,a);break e}Tt(e,t,i,a)}t=t.child}return t;case 26:return wr(e,t),e===null?(a=Rp(t.type,null,t.pendingProps,null))?t.memoizedState=a:Le||(a=t.type,e=t.pendingProps,i=Br(P.current).createElement(a),i[te]=t,i[_e]=e,Ot(i,a,e),kt(i),t.stateNode=i):t.memoizedState=Rp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Kt(t),e===null&&Le&&(i=t.stateNode=Ap(t.type,t.pendingProps,P.current),Rt=t,ya=!0,c=at,Qn(t.type)?(Uo=c,at=ga(i.firstChild)):at=c),Tt(e,t,t.pendingProps.children,a),wr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Le&&((c=i=at)&&(i=a0(i,t.type,t.pendingProps,ya),i!==null?(t.stateNode=i,Rt=t,at=ga(i.firstChild),ya=!1,c=!0):c=!1),c||On(t)),Kt(t),c=t.type,o=t.pendingProps,h=e!==null?e.memoizedProps:null,i=o.children,To(c,o)?i=null:h!==null&&To(c,h)&&(t.flags|=32),t.memoizedState!==null&&(c=Rc(e,t,yg,null,null,a),vs._currentValue=c),wr(e,t),Tt(e,t,i,a),t.child;case 6:return e===null&&Le&&((e=a=at)&&(a=n0(a,t.pendingProps,ya),a!==null?(t.stateNode=a,Rt=t,at=null,e=!0):e=!1),e||On(t)),null;case 13:return pm(e,t,a);case 4:return Ue(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=bl(t,null,i,a):Tt(e,t,i,a),t.child;case 11:return sm(e,t,t.type,t.pendingProps,a);case 7:return Tt(e,t,t.pendingProps,a),t.child;case 8:return Tt(e,t,t.pendingProps.children,a),t.child;case 12:return Tt(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,Mn(t,t.type,i.value),Tt(e,t,i.children,a),t.child;case 9:return c=t.type._context,i=t.pendingProps.children,xl(t),c=Ct(c),i=i(c),t.flags|=1,Tt(e,t,i,a),t.child;case 14:return rm(e,t,t.type,t.pendingProps,a);case 15:return um(e,t,t.type,t.pendingProps,a);case 19:return ym(e,t,a);case 31:return _g(e,t,a);case 22:return cm(e,t,a,t.pendingProps);case 24:return xl(t),i=Ct(yt),e===null?(c=gc(),c===null&&(c=Pe,o=yc(),c.pooledCache=o,o.refCount++,o!==null&&(c.pooledCacheLanes|=a),c=o),t.memoizedState={parent:i,cache:c},wc(t),Mn(t,yt,c)):((e.lanes&a)!==0&&(Sc(e,t),Wi(t,null,null,a),Fi()),c=e.memoizedState,o=t.memoizedState,c.parent!==i?(c={parent:i,cache:i},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Mn(t,yt,i)):(i=o.cache,Mn(t,yt,i),i!==c.cache&&xc(t,[yt],a,!0))),Tt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function dn(e){e.flags|=4}function no(e,t,a,i,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Gm())e.flags|=8192;else throw gl=sr,bc}else e.flags&=-16777217}function gm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Lp(t))if(Gm())e.flags|=8192;else throw gl=sr,bc}function jr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Dt():536870912,e.lanes|=t,ci|=t)}function ls(e,t){if(!Le)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 nt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,i|=c.subtreeFlags&65011712,i|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,i|=c.subtreeFlags,i|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function kg(e,t,a){var i=t.pendingProps;switch(dc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(t),null;case 1:return nt(t),null;case 3:return a=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),rn(yt),ye(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Jl(t)?dn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,hc())),nt(t),null;case 26:var c=t.type,o=t.memoizedState;return e===null?(dn(t),o!==null?(nt(t),gm(t,o)):(nt(t),no(t,c,null,i,a))):o?o!==e.memoizedState?(dn(t),nt(t),gm(t,o)):(nt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&dn(t),nt(t),no(t,c,e,i,a)),null;case 27:if(ut(t),a=P.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&dn(t);else{if(!i){if(t.stateNode===null)throw Error(u(166));return nt(t),null}e=ee.current,Jl(t)?Wf(t):(e=Ap(c,i,a),t.stateNode=e,dn(t))}return nt(t),null;case 5:if(ut(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&dn(t);else{if(!i){if(t.stateNode===null)throw Error(u(166));return nt(t),null}if(o=ee.current,Jl(t))Wf(t);else{var h=Br(P.current);switch(o){case 1:o=h.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:o=h.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":o=h.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":o=h.createElementNS("http://www.w3.org/1998/Math/MathML",c);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(c,{is:i.is}):h.createElement(c)}}o[te]=t,o[_e]=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(Ot(o,c,i),c){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&dn(t)}}return nt(t),no(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&dn(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(u(166));if(e=P.current,Jl(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,c=Rt,c!==null)switch(c.tag){case 27:case 5:i=c.memoizedProps}e[te]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||pp(e.nodeValue,a)),e||On(t,!0)}else e=Br(e).createTextNode(i),e[te]=t,t.stateNode=e}return nt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(i=Jl(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[te]=t}else ml(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;nt(t),e=!1}else a=hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(na(t),t):(na(t),null);if((t.flags&128)!==0)throw Error(u(558))}return nt(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Jl(t),i!==null&&i.dehydrated!==null){if(e===null){if(!c)throw Error(u(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(u(317));c[te]=t}else ml(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;nt(t),c=!1}else c=hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(na(t),t):(na(t),null)}return na(t),(t.flags&128)!==0?(t.lanes=a,t):(a=i!==null,e=e!==null&&e.memoizedState!==null,a&&(i=t.child,c=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(c=i.alternate.memoizedState.cachePool.pool),o=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),o!==c&&(i.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),jr(t,t.updateQueue),nt(t),null);case 4:return ye(),e===null&&Ao(t.stateNode.containerInfo),nt(t),null;case 10:return rn(t.type),nt(t),null;case 19:if($(ht),i=t.memoizedState,i===null)return nt(t),null;if(c=(t.flags&128)!==0,o=i.rendering,o===null)if(c)ls(i,!1);else{if(dt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=or(e),o!==null){for(t.flags|=128,ls(i,!1),e=o.updateQueue,t.updateQueue=e,jr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Xf(a,e),a=a.sibling;return F(ht,ht.current&1|2),Le&&ln(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&_t()>Er&&(t.flags|=128,c=!0,ls(i,!1),t.lanes=4194304)}else{if(!c)if(e=or(o),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,jr(t,e),ls(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Le)return nt(t),null}else 2*_t()-i.renderingStartTime>Er&&a!==536870912&&(t.flags|=128,c=!0,ls(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=_t(),e.sibling=null,a=ht.current,F(ht,c?a&1|2:a&1),Le&&ln(t,i.treeForkCount),e):(nt(t),null);case 22:case 23:return na(t),Ac(),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&&(nt(t),t.subtreeFlags&6&&(t.flags|=8192)):nt(t),a=t.updateQueue,a!==null&&jr(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&&$(yl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),rn(yt),nt(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Eg(e,t){switch(dc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return rn(yt),ye(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ut(t),null;case 31:if(t.memoizedState!==null){if(na(t),t.alternate===null)throw Error(u(340));ml()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(na(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));ml()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $(ht),null;case 4:return ye(),null;case 10:return rn(t.type),null;case 22:case 23:return na(t),Ac(),e!==null&&$(yl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return rn(yt),null;case 25:return null;default:return null}}function bm(e,t){switch(dc(t),t.tag){case 3:rn(yt),ye();break;case 26:case 27:case 5:ut(t);break;case 4:ye();break;case 31:t.memoizedState!==null&&na(t);break;case 13:na(t);break;case 19:$(ht);break;case 10:rn(t.type);break;case 22:case 23:na(t),Ac(),e!==null&&$(yl);break;case 24:rn(yt)}}function is(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var c=i.next;a=c;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!==c)}}catch(g){Qe(t,t.return,g)}}function qn(e,t,a){try{var i=t.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var o=c.next;i=o;do{if((i.tag&e)===e){var h=i.inst,g=h.destroy;if(g!==void 0){h.destroy=void 0,c=t;var j=a,C=g;try{C()}catch(z){Qe(c,j,z)}}}i=i.next}while(i!==o)}}catch(z){Qe(t,t.return,z)}}function wm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{dh(t,a)}catch(i){Qe(e,e.return,i)}}}function Sm(e,t,a){a.props=Sl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){Qe(e,t,i)}}function ss(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(c){Qe(e,t,c)}}function Za(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}catch(c){Qe(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){Qe(e,t,c)}else a.current=null}function jm(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(c){Qe(e,e.return,c)}}function lo(e,t,a){try{var i=e.stateNode;Jg(i,e.type,a,t),i[_e]=t}catch(c){Qe(e,e.return,c)}}function Nm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qn(e.type)||e.tag===4}function io(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Nm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Qn(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 so(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=tn));else if(i!==4&&(i===27&&Qn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(so(e,t,a),e=e.sibling;e!==null;)so(e,t,a),e=e.sibling}function Nr(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&&Qn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Nr(e,t,a),e=e.sibling;e!==null;)Nr(e,t,a),e=e.sibling}function _m(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Ot(t,i,a),t[te]=e,t[_e]=a}catch(o){Qe(e,e.return,o)}}var fn=!1,bt=!1,ro=!1,Am=typeof WeakSet=="function"?WeakSet:Set,Et=null;function Rg(e,t){if(e=e.containerInfo,Ro=Gr,e=Bf(e),ec(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 c=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var h=0,g=-1,j=-1,C=0,z=0,Z=e,O=null;t:for(;;){for(var L;Z!==a||c!==0&&Z.nodeType!==3||(g=h+c),Z!==o||i!==0&&Z.nodeType!==3||(j=h+i),Z.nodeType===3&&(h+=Z.nodeValue.length),(L=Z.firstChild)!==null;)O=Z,Z=L;for(;;){if(Z===e)break t;if(O===a&&++C===c&&(g=h),O===o&&++z===i&&(j=h),(L=Z.nextSibling)!==null)break;Z=O,O=Z.parentNode}Z=L}a=g===-1||j===-1?null:{start:g,end:j}}else a=null}a=a||{start:0,end:0}}else a=null;for(Co={focusedElem:e,selectionRange:a},Gr=!1,Et=t;Et!==null;)if(t=Et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Et=e;else for(;Et!==null;){switch(t=Et,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++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,a=t,c=o.memoizedProps,o=o.memoizedState,i=a.stateNode;try{var ie=Sl(a.type,c);e=i.getSnapshotBeforeUpdate(ie,o),i.__reactInternalSnapshotBeforeUpdate=e}catch(me){Qe(a,a.return,me)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Mo(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Mo(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,Et=e;break}Et=t.return}}function km(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:mn(e,a),i&4&&is(5,a);break;case 1:if(mn(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(h){Qe(a,a.return,h)}else{var c=Sl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Qe(a,a.return,h)}}i&64&&wm(a),i&512&&ss(a,a.return);break;case 3:if(mn(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{dh(e,t)}catch(h){Qe(a,a.return,h)}}break;case 27:t===null&&i&4&&_m(a);case 26:case 5:mn(e,a),t===null&&i&4&&jm(a),i&512&&ss(a,a.return);break;case 12:mn(e,a);break;case 31:mn(e,a),i&4&&Cm(e,a);break;case 13:mn(e,a),i&4&&Tm(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Bg.bind(null,a),l0(e,a))));break;case 22:if(i=a.memoizedState!==null||fn,!i){t=t!==null&&t.memoizedState!==null||bt,c=fn;var o=bt;fn=i,(bt=t)&&!o?pn(e,a,(a.subtreeFlags&8772)!==0):mn(e,a),fn=c,bt=o}break;case 30:break;default:mn(e,a)}}function Em(e){var t=e.alternate;t!==null&&(e.alternate=null,Em(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&zu(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 st=null,Yt=!1;function hn(e,t,a){for(a=a.child;a!==null;)Rm(e,t,a),a=a.sibling}function Rm(e,t,a){if(ze&&typeof ze.onCommitFiberUnmount=="function")try{ze.onCommitFiberUnmount(Lt,a)}catch{}switch(a.tag){case 26:bt||Za(a,t),hn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:bt||Za(a,t);var i=st,c=Yt;Qn(a.type)&&(st=a.stateNode,Yt=!1),hn(e,t,a),ps(a.stateNode),st=i,Yt=c;break;case 5:bt||Za(a,t);case 6:if(i=st,c=Yt,st=null,hn(e,t,a),st=i,Yt=c,st!==null)if(Yt)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(a.stateNode)}catch(o){Qe(a,t,o)}else try{st.removeChild(a.stateNode)}catch(o){Qe(a,t,o)}break;case 18:st!==null&&(Yt?(e=st,wp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),yi(e)):wp(st,a.stateNode));break;case 4:i=st,c=Yt,st=a.stateNode.containerInfo,Yt=!0,hn(e,t,a),st=i,Yt=c;break;case 0:case 11:case 14:case 15:qn(2,a,t),bt||qn(4,a,t),hn(e,t,a);break;case 1:bt||(Za(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&Sm(a,t,i)),hn(e,t,a);break;case 21:hn(e,t,a);break;case 22:bt=(i=bt)||a.memoizedState!==null,hn(e,t,a),bt=i;break;default:hn(e,t,a)}}function Cm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{yi(e)}catch(a){Qe(t,t.return,a)}}}function Tm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{yi(e)}catch(a){Qe(t,t.return,a)}}function Cg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Am),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Am),t;default:throw Error(u(435,e.tag))}}function _r(e,t){var a=Cg(e);t.forEach(function(i){if(!a.has(i)){a.add(i);var c=qg.bind(null,e,i);i.then(c,c)}})}function Vt(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var c=a[i],o=e,h=t,g=h;e:for(;g!==null;){switch(g.tag){case 27:if(Qn(g.type)){st=g.stateNode,Yt=!1;break e}break;case 5:st=g.stateNode,Yt=!1;break e;case 3:case 4:st=g.stateNode.containerInfo,Yt=!0;break e}g=g.return}if(st===null)throw Error(u(160));Rm(o,h,c),st=null,Yt=!1,o=c.alternate,o!==null&&(o.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Om(t,e),t=t.sibling}var Ca=null;function Om(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Vt(t,e),Zt(e),i&4&&(qn(3,e,e.return),is(3,e),qn(5,e,e.return));break;case 1:Vt(t,e),Zt(e),i&512&&(bt||a===null||Za(a,a.return)),i&64&&fn&&(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 c=Ca;if(Vt(t,e),Zt(e),i&512&&(bt||a===null||Za(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,c=c.ownerDocument||c;t:switch(i){case"title":o=c.getElementsByTagName("title")[0],(!o||o[Mi]||o[te]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=c.createElement(i),c.head.insertBefore(o,c.querySelector("head > title"))),Ot(o,i,a),o[te]=e,kt(o),i=o;break e;case"link":var h=Op("link","href",c).get(i+(a.href||""));if(h){for(var g=0;g<h.length;g++)if(o=h[g],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(g,1);break t}}o=c.createElement(i),Ot(o,i,a),c.head.appendChild(o);break;case"meta":if(h=Op("meta","content",c).get(i+(a.content||""))){for(g=0;g<h.length;g++)if(o=h[g],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(g,1);break t}}o=c.createElement(i),Ot(o,i,a),c.head.appendChild(o);break;default:throw Error(u(468,i))}o[te]=e,kt(o),i=o}e.stateNode=i}else Mp(c,e.type,e.stateNode);else e.stateNode=Tp(c,i,e.memoizedProps);else o!==i?(o===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):o.count--,i===null?Mp(c,e.type,e.stateNode):Tp(c,i,e.memoizedProps)):i===null&&e.stateNode!==null&&lo(e,e.memoizedProps,a.memoizedProps)}break;case 27:Vt(t,e),Zt(e),i&512&&(bt||a===null||Za(a,a.return)),a!==null&&i&4&&lo(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Vt(t,e),Zt(e),i&512&&(bt||a===null||Za(a,a.return)),e.flags&32){c=e.stateNode;try{Hl(c,"")}catch(ie){Qe(e,e.return,ie)}}i&4&&e.stateNode!=null&&(c=e.memoizedProps,lo(e,c,a!==null?a.memoizedProps:c)),i&1024&&(ro=!0);break;case 6:if(Vt(t,e),Zt(e),i&4){if(e.stateNode===null)throw Error(u(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(ie){Qe(e,e.return,ie)}}break;case 3:if($r=null,c=Ca,Ca=qr(t.containerInfo),Vt(t,e),Ca=c,Zt(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{yi(t.containerInfo)}catch(ie){Qe(e,e.return,ie)}ro&&(ro=!1,Mm(e));break;case 4:i=Ca,Ca=qr(e.stateNode.containerInfo),Vt(t,e),Zt(e),Ca=i;break;case 12:Vt(t,e),Zt(e);break;case 31:Vt(t,e),Zt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,_r(e,i)));break;case 13:Vt(t,e),Zt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(kr=_t()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,_r(e,i)));break;case 22:c=e.memoizedState!==null;var j=a!==null&&a.memoizedState!==null,C=fn,z=bt;if(fn=C||c,bt=z||j,Vt(t,e),bt=z,fn=C,Zt(e),i&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||j||fn||bt||jl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){j=a=t;try{if(o=j.stateNode,c)h=o.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{g=j.stateNode;var Z=j.memoizedProps.style,O=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;g.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(ie){Qe(j,j.return,ie)}}}else if(t.tag===6){if(a===null){j=t;try{j.stateNode.nodeValue=c?"":j.memoizedProps}catch(ie){Qe(j,j.return,ie)}}}else if(t.tag===18){if(a===null){j=t;try{var L=j.stateNode;c?Sp(L,!0):Sp(j.stateNode,!1)}catch(ie){Qe(j,j.return,ie)}}}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,_r(e,a))));break;case 19:Vt(t,e),Zt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,_r(e,i)));break;case 30:break;case 21:break;default:Vt(t,e),Zt(e)}}function Zt(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if(Nm(i)){a=i;break}i=i.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var c=a.stateNode,o=io(e);Nr(e,o,c);break;case 5:var h=a.stateNode;a.flags&32&&(Hl(h,""),a.flags&=-33);var g=io(e);Nr(e,g,h);break;case 3:case 4:var j=a.stateNode.containerInfo,C=io(e);so(e,C,j);break;default:throw Error(u(161))}}catch(z){Qe(e,e.return,z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function mn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)km(e,t.alternate,t),t=t.sibling}function jl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:qn(4,t,t.return),jl(t);break;case 1:Za(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Sm(t,t.return,a),jl(t);break;case 27:ps(t.stateNode);case 26:case 5:Za(t,t.return),jl(t);break;case 22:t.memoizedState===null&&jl(t);break;case 30:jl(t);break;default:jl(t)}e=e.sibling}}function pn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,c=e,o=t,h=o.flags;switch(o.tag){case 0:case 11:case 15:pn(c,o,a),is(4,o);break;case 1:if(pn(c,o,a),i=o,c=i.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(C){Qe(i,i.return,C)}if(i=o,c=i.updateQueue,c!==null){var g=i.stateNode;try{var j=c.shared.hiddenCallbacks;if(j!==null)for(c.shared.hiddenCallbacks=null,c=0;c<j.length;c++)oh(j[c],g)}catch(C){Qe(i,i.return,C)}}a&&h&64&&wm(o),ss(o,o.return);break;case 27:_m(o);case 26:case 5:pn(c,o,a),a&&i===null&&h&4&&jm(o),ss(o,o.return);break;case 12:pn(c,o,a);break;case 31:pn(c,o,a),a&&h&4&&Cm(c,o);break;case 13:pn(c,o,a),a&&h&4&&Tm(c,o);break;case 22:o.memoizedState===null&&pn(c,o,a),ss(o,o.return);break;case 30:break;default:pn(c,o,a)}t=t.sibling}}function uo(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&&Qi(a))}function co(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qi(e))}function Ta(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Lm(e,t,a,i),t=t.sibling}function Lm(e,t,a,i){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Ta(e,t,a,i),c&2048&&is(9,t);break;case 1:Ta(e,t,a,i);break;case 3:Ta(e,t,a,i),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qi(e)));break;case 12:if(c&2048){Ta(e,t,a,i),e=t.stateNode;try{var o=t.memoizedProps,h=o.id,g=o.onPostCommit;typeof g=="function"&&g(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){Qe(t,t.return,j)}}else Ta(e,t,a,i);break;case 31:Ta(e,t,a,i);break;case 13:Ta(e,t,a,i);break;case 23:break;case 22:o=t.stateNode,h=t.alternate,t.memoizedState!==null?o._visibility&2?Ta(e,t,a,i):rs(e,t):o._visibility&2?Ta(e,t,a,i):(o._visibility|=2,si(e,t,a,i,(t.subtreeFlags&10256)!==0||!1)),c&2048&&uo(h,t);break;case 24:Ta(e,t,a,i),c&2048&&co(t.alternate,t);break;default:Ta(e,t,a,i)}}function si(e,t,a,i,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,h=t,g=a,j=i,C=h.flags;switch(h.tag){case 0:case 11:case 15:si(o,h,g,j,c),is(8,h);break;case 23:break;case 22:var z=h.stateNode;h.memoizedState!==null?z._visibility&2?si(o,h,g,j,c):rs(o,h):(z._visibility|=2,si(o,h,g,j,c)),c&&C&2048&&uo(h.alternate,h);break;case 24:si(o,h,g,j,c),c&&C&2048&&co(h.alternate,h);break;default:si(o,h,g,j,c)}t=t.sibling}}function rs(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,c=i.flags;switch(i.tag){case 22:rs(a,i),c&2048&&uo(i.alternate,i);break;case 24:rs(a,i),c&2048&&co(i.alternate,i);break;default:rs(a,i)}t=t.sibling}}var us=8192;function ri(e,t,a){if(e.subtreeFlags&us)for(e=e.child;e!==null;)Dm(e,t,a),e=e.sibling}function Dm(e,t,a){switch(e.tag){case 26:ri(e,t,a),e.flags&us&&e.memoizedState!==null&&x0(a,Ca,e.memoizedState,e.memoizedProps);break;case 5:ri(e,t,a);break;case 3:case 4:var i=Ca;Ca=qr(e.stateNode.containerInfo),ri(e,t,a),Ca=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=us,us=16777216,ri(e,t,a),us=i):ri(e,t,a));break;default:ri(e,t,a)}}function Um(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 cs(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];Et=i,Bm(i,e)}Um(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zm(e),e=e.sibling}function zm(e){switch(e.tag){case 0:case 11:case 15:cs(e),e.flags&2048&&qn(9,e,e.return);break;case 3:cs(e);break;case 12:cs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ar(e)):cs(e);break;default:cs(e)}}function Ar(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];Et=i,Bm(i,e)}Um(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:qn(8,t,t.return),Ar(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Ar(t));break;default:Ar(t)}e=e.sibling}}function Bm(e,t){for(;Et!==null;){var a=Et;switch(a.tag){case 0:case 11:case 15:qn(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:Qi(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,Et=i;else e:for(a=e;Et!==null;){i=Et;var c=i.sibling,o=i.return;if(Em(i),i===a){Et=null;break e}if(c!==null){c.return=o,Et=c;break e}Et=o}}}var Tg={getCacheForType:function(e){var t=Ct(yt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Ct(yt).controller.signal}},Og=typeof WeakMap=="function"?WeakMap:Map,Ve=0,Pe=null,Ee=null,Ce=0,Ge=0,la=null,Hn=!1,ui=!1,oo=!1,xn=0,dt=0,$n=0,Nl=0,fo=0,ia=0,ci=0,os=null,Gt=null,ho=!1,kr=0,qm=0,Er=1/0,Rr=null,Yn=null,Nt=0,Vn=null,oi=null,yn=0,mo=0,po=null,Hm=null,ds=0,xo=null;function sa(){return(Ve&2)!==0&&Ce!==0?Ce&-Ce:D.T!==null?So():Oi()}function $m(){if(ia===0)if((Ce&536870912)===0||Le){var e=En;En<<=1,(En&3932160)===0&&(En=262144),ia=e}else ia=536870912;return e=aa.current,e!==null&&(e.flags|=32),ia}function Qt(e,t,a){(e===Pe&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)&&(di(e,0),Zn(e,Ce,ia,!1)),ct(e,a),((Ve&2)===0||e!==Pe)&&(e===Pe&&((Ve&2)===0&&(Nl|=a),dt===4&&Zn(e,Ce,ia,!1)),Ga(e))}function Ym(e,t,a){if((Ve&6)!==0)throw Error(u(327));var i=!a&&(t&127)===0&&(t&e.expiredLanes)===0||we(e,t),c=i?Dg(e,t):vo(e,t,!0),o=i;do{if(c===0){ui&&!i&&Zn(e,t,0,!1);break}else{if(a=e.current.alternate,o&&!Mg(a)){c=vo(e,t,!1),o=!1;continue}if(c===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 g=e;c=os;var j=g.current.memoizedState.isDehydrated;if(j&&(di(g,h).flags|=256),h=vo(g,h,!1),h!==2){if(oo&&!j){g.errorRecoveryDisabledLanes|=o,Nl|=o,c=4;break e}o=Gt,Gt=c,o!==null&&(Gt===null?Gt=o:Gt.push.apply(Gt,o))}c=h}if(o=!1,c!==2)continue}}if(c===1){di(e,0),Zn(e,t,0,!0);break}e:{switch(i=e,o=c,o){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Zn(i,t,ia,!Hn);break e;case 2:Gt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(c=kr+300-_t(),10<c)){if(Zn(i,t,ia,!Hn),G(i,0,!0)!==0)break e;yn=t,i.timeoutHandle=gp(Vm.bind(null,i,a,Gt,Rr,ho,t,ia,Nl,ci,Hn,o,"Throttled",-0,0),c);break e}Vm(i,a,Gt,Rr,ho,t,ia,Nl,ci,Hn,o,null,-0,0)}}break}while(!0);Ga(e)}function Vm(e,t,a,i,c,o,h,g,j,C,z,Z,O,L){if(e.timeoutHandle=-1,Z=t.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:tn},Dm(t,o,Z);var ie=(o&62914560)===o?kr-_t():(o&4194048)===o?qm-_t():0;if(ie=y0(Z,ie),ie!==null){yn=o,e.cancelPendingCommit=ie(Fm.bind(null,e,t,o,a,i,c,h,g,j,z,Z,null,O,L)),Zn(e,o,h,!C);return}}Fm(e,t,o,a,i,c,h,g,j)}function Mg(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 c=a[i],o=c.getSnapshot;c=c.value;try{if(!ea(o(),c))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 Zn(e,t,a,i){t&=~fo,t&=~Nl,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var c=t;0<c;){var o=31-At(c),h=1<<o;i[o]=-1,c&=~h}a!==0&&rl(e,a,t)}function Cr(){return(Ve&6)===0?(fs(0),!1):!0}function yo(){if(Ee!==null){if(Ge===0)var e=Ee.return;else e=Ee,sn=pl=null,Oc(e),ti=null,Ii=0,e=Ee;for(;e!==null;)bm(e.alternate,e),e=e.return;Ee=null}}function di(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Pg(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),yn=0,yo(),Pe=e,Ee=a=nn(e.current,null),Ce=t,Ge=0,la=null,Hn=!1,ui=we(e,t),oo=!1,ci=ia=fo=Nl=$n=dt=0,Gt=os=null,ho=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var c=31-At(i),o=1<<c;t|=e[c],i&=~o}return xn=t,Fs(),a}function Zm(e,t){Se=null,D.H=as,t===ei||t===ir?(t=sh(),Ge=3):t===bc?(t=sh(),Ge=4):Ge=t===Ic?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,la=t,Ee===null&&(dt=1,gr(e,ma(t,e.current)))}function Gm(){var e=aa.current;return e===null?!0:(Ce&4194048)===Ce?va===null:(Ce&62914560)===Ce||(Ce&536870912)!==0?e===va:!1}function Qm(){var e=D.H;return D.H=as,e===null?as:e}function Xm(){var e=D.A;return D.A=Tg,e}function Tr(){dt=4,Hn||(Ce&4194048)!==Ce&&aa.current!==null||(ui=!0),($n&134217727)===0&&(Nl&134217727)===0||Pe===null||Zn(Pe,Ce,ia,!1)}function vo(e,t,a){var i=Ve;Ve|=2;var c=Qm(),o=Xm();(Pe!==e||Ce!==t)&&(Rr=null,di(e,t)),t=!1;var h=dt;e:do try{if(Ge!==0&&Ee!==null){var g=Ee,j=la;switch(Ge){case 8:yo(),h=6;break e;case 3:case 2:case 9:case 6:aa.current===null&&(t=!0);var C=Ge;if(Ge=0,la=null,fi(e,g,j,C),a&&ui){h=0;break e}break;default:C=Ge,Ge=0,la=null,fi(e,g,j,C)}}Lg(),h=dt;break}catch(z){Zm(e,z)}while(!0);return t&&e.shellSuspendCounter++,sn=pl=null,Ve=i,D.H=c,D.A=o,Ee===null&&(Pe=null,Ce=0,Fs()),h}function Lg(){for(;Ee!==null;)Im(Ee)}function Dg(e,t){var a=Ve;Ve|=2;var i=Qm(),c=Xm();Pe!==e||Ce!==t?(Rr=null,Er=_t()+500,di(e,t)):ui=we(e,t);e:do try{if(Ge!==0&&Ee!==null){t=Ee;var o=la;t:switch(Ge){case 1:Ge=0,la=null,fi(e,t,o,1);break;case 2:case 9:if(lh(o)){Ge=0,la=null,Km(t);break}t=function(){Ge!==2&&Ge!==9||Pe!==e||(Ge=7),Ga(e)},o.then(t,t);break e;case 3:Ge=7;break e;case 4:Ge=5;break e;case 7:lh(o)?(Ge=0,la=null,Km(t)):(Ge=0,la=null,fi(e,t,o,7));break;case 5:var h=null;switch(Ee.tag){case 26:h=Ee.memoizedState;case 5:case 27:var g=Ee;if(h?Lp(h):g.stateNode.complete){Ge=0,la=null;var j=g.sibling;if(j!==null)Ee=j;else{var C=g.return;C!==null?(Ee=C,Or(C)):Ee=null}break t}}Ge=0,la=null,fi(e,t,o,5);break;case 6:Ge=0,la=null,fi(e,t,o,6);break;case 8:yo(),dt=6;break e;default:throw Error(u(462))}}Ug();break}catch(z){Zm(e,z)}while(!0);return sn=pl=null,D.H=i,D.A=c,Ve=a,Ee!==null?0:(Pe=null,Ce=0,Fs(),dt)}function Ug(){for(;Ee!==null&&!He();)Im(Ee)}function Im(e){var t=vm(e.alternate,e,xn);e.memoizedProps=e.pendingProps,t===null?Or(e):Ee=t}function Km(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=fm(a,t,t.pendingProps,t.type,void 0,Ce);break;case 11:t=fm(a,t,t.pendingProps,t.type.render,t.ref,Ce);break;case 5:Oc(t);default:bm(a,t),t=Ee=Xf(t,xn),t=vm(a,t,xn)}e.memoizedProps=e.pendingProps,t===null?Or(e):Ee=t}function fi(e,t,a,i){sn=pl=null,Oc(t),ti=null,Ii=0;var c=t.return;try{if(Ng(e,c,t,a,Ce)){dt=1,gr(e,ma(a,e.current)),Ee=null;return}}catch(o){if(c!==null)throw Ee=c,o;dt=1,gr(e,ma(a,e.current)),Ee=null;return}t.flags&32768?(Le||i===1?e=!0:ui||(Ce&536870912)!==0?e=!1:(Hn=e=!0,(i===2||i===9||i===3||i===6)&&(i=aa.current,i!==null&&i.tag===13&&(i.flags|=16384))),Jm(t,e)):Or(t)}function Or(e){var t=e;do{if((t.flags&32768)!==0){Jm(t,Hn);return}e=t.return;var a=kg(t.alternate,t,xn);if(a!==null){Ee=a;return}if(t=t.sibling,t!==null){Ee=t;return}Ee=t=e}while(t!==null);dt===0&&(dt=5)}function Jm(e,t){do{var a=Eg(e.alternate,e);if(a!==null){a.flags&=32767,Ee=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ee=e;return}Ee=e=a}while(e!==null);dt=6,Ee=null}function Fm(e,t,a,i,c,o,h,g,j){e.cancelPendingCommit=null;do Mr();while(Nt!==0);if((Ve&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(o=t.lanes|t.childLanes,o|=ic,oa(e,a,o,h,g,j),e===Pe&&(Ee=Pe=null,Ce=0),oi=t,Vn=e,yn=a,mo=o,po=c,Hm=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Hg(Pa,function(){return ap(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=D.T,D.T=null,c=K.p,K.p=2,h=Ve,Ve|=4;try{Rg(e,t,a)}finally{Ve=h,K.p=c,D.T=i}}Nt=1,Wm(),Pm(),ep()}}function Wm(){if(Nt===1){Nt=0;var e=Vn,t=oi,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=D.T,D.T=null;var i=K.p;K.p=2;var c=Ve;Ve|=4;try{Om(t,e);var o=Co,h=Bf(e.containerInfo),g=o.focusedElem,j=o.selectionRange;if(h!==g&&g&&g.ownerDocument&&zf(g.ownerDocument.documentElement,g)){if(j!==null&&ec(g)){var C=j.start,z=j.end;if(z===void 0&&(z=C),"selectionStart"in g)g.selectionStart=C,g.selectionEnd=Math.min(z,g.value.length);else{var Z=g.ownerDocument||document,O=Z&&Z.defaultView||window;if(O.getSelection){var L=O.getSelection(),ie=g.textContent.length,me=Math.min(j.start,ie),We=j.end===void 0?me:Math.min(j.end,ie);!L.extend&&me>We&&(h=We,We=me,me=h);var A=Uf(g,me),_=Uf(g,We);if(A&&_&&(L.rangeCount!==1||L.anchorNode!==A.node||L.anchorOffset!==A.offset||L.focusNode!==_.node||L.focusOffset!==_.offset)){var R=Z.createRange();R.setStart(A.node,A.offset),L.removeAllRanges(),me>We?(L.addRange(R),L.extend(_.node,_.offset)):(R.setEnd(_.node,_.offset),L.addRange(R))}}}}for(Z=[],L=g;L=L.parentNode;)L.nodeType===1&&Z.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g<Z.length;g++){var Y=Z[g];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}Gr=!!Ro,Co=Ro=null}finally{Ve=c,K.p=i,D.T=a}}e.current=t,Nt=2}}function Pm(){if(Nt===2){Nt=0;var e=Vn,t=oi,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=D.T,D.T=null;var i=K.p;K.p=2;var c=Ve;Ve|=4;try{km(e,t.alternate,t)}finally{Ve=c,K.p=i,D.T=a}}Nt=3}}function ep(){if(Nt===4||Nt===3){Nt=0,Wa();var e=Vn,t=oi,a=yn,i=Hm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Nt=5:(Nt=0,oi=Vn=null,tp(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Yn=null),Ti(a),t=t.stateNode,ze&&typeof ze.onCommitFiberRoot=="function")try{ze.onCommitFiberRoot(Lt,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=D.T,c=K.p,K.p=2,D.T=null;try{for(var o=e.onRecoverableError,h=0;h<i.length;h++){var g=i[h];o(g.value,{componentStack:g.stack})}}finally{D.T=t,K.p=c}}(yn&3)!==0&&Mr(),Ga(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===xo?ds++:(ds=0,xo=e):ds=0,fs(0)}}function tp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Qi(t)))}function Mr(){return Wm(),Pm(),ep(),ap()}function ap(){if(Nt!==5)return!1;var e=Vn,t=mo;mo=0;var a=Ti(yn),i=D.T,c=K.p;try{K.p=32>a?32:a,D.T=null,a=po,po=null;var o=Vn,h=yn;if(Nt=0,oi=Vn=null,yn=0,(Ve&6)!==0)throw Error(u(331));var g=Ve;if(Ve|=4,zm(o.current),Lm(o,o.current,h,a),Ve=g,fs(0,!1),ze&&typeof ze.onPostCommitFiberRoot=="function")try{ze.onPostCommitFiberRoot(Lt,o)}catch{}return!0}finally{K.p=c,D.T=i,tp(e,t)}}function np(e,t,a){t=ma(a,t),t=Xc(e.stateNode,t,2),e=Un(e,t,2),e!==null&&(ct(e,2),Ga(e))}function Qe(e,t,a){if(e.tag===3)np(e,e,a);else for(;t!==null;){if(t.tag===3){np(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Yn===null||!Yn.has(i))){e=ma(a,e),a=lm(2),i=Un(t,a,2),i!==null&&(im(a,i,t,e),ct(i,2),Ga(i));break}}t=t.return}}function go(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new Og;var c=new Set;i.set(t,c)}else c=i.get(t),c===void 0&&(c=new Set,i.set(t,c));c.has(a)||(oo=!0,c.add(a),e=zg.bind(null,e,t,a),t.then(e,e))}function zg(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Pe===e&&(Ce&a)===a&&(dt===4||dt===3&&(Ce&62914560)===Ce&&300>_t()-kr?(Ve&2)===0&&di(e,0):fo|=a,ci===Ce&&(ci=0)),Ga(e)}function lp(e,t){t===0&&(t=Dt()),e=fl(e,t),e!==null&&(ct(e,t),Ga(e))}function Bg(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),lp(e,a)}function qg(e,t){var a=0;switch(e.tag){case 31:case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(a=c.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),lp(e,a)}function Hg(e,t){return jt(e,t)}var Lr=null,hi=null,bo=!1,Dr=!1,wo=!1,Gn=0;function Ga(e){e!==hi&&e.next===null&&(hi===null?Lr=hi=e:hi=hi.next=e),Dr=!0,bo||(bo=!0,Yg())}function fs(e,t){if(!wo&&Dr){wo=!0;do for(var a=!1,i=Lr;i!==null;){if(e!==0){var c=i.pendingLanes;if(c===0)var o=0;else{var h=i.suspendedLanes,g=i.pingedLanes;o=(1<<31-At(42|e)+1)-1,o&=c&~(h&~g),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,up(i,o))}else o=Ce,o=G(i,i===Pe?o:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(o&3)===0||we(i,o)||(a=!0,up(i,o));i=i.next}while(a);wo=!1}}function $g(){ip()}function ip(){Dr=bo=!1;var e=0;Gn!==0&&Wg()&&(e=Gn);for(var t=_t(),a=null,i=Lr;i!==null;){var c=i.next,o=sp(i,t);o===0?(i.next=null,a===null?Lr=c:a.next=c,c===null&&(hi=a)):(a=i,(e!==0||(o&3)!==0)&&(Dr=!0)),i=c}Nt!==0&&Nt!==5||fs(e),Gn!==0&&(Gn=0)}function sp(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,c=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var h=31-At(o),g=1<<h,j=c[h];j===-1?((g&a)===0||(g&i)!==0)&&(c[h]=tt(g,t)):j<=t&&(e.expiredLanes|=g),o&=~g}if(t=Pe,a=Ce,a=G(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&Fa(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||we(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&Fa(i),Ti(a)){case 2:case 8:a=_n;break;case 32:a=Pa;break;case 268435456:a=Ft;break;default:a=Pa}return i=rp.bind(null,e),a=jt(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&Fa(i),e.callbackPriority=2,e.callbackNode=null,2}function rp(e,t){if(Nt!==0&&Nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Mr()&&e.callbackNode!==a)return null;var i=Ce;return i=G(e,e===Pe?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Ym(e,i,t),sp(e,_t()),e.callbackNode!=null&&e.callbackNode===a?rp.bind(null,e):null)}function up(e,t){if(Mr())return null;Ym(e,t,!0)}function Yg(){e0(function(){(Ve&6)!==0?jt(Nn,$g):ip()})}function So(){if(Gn===0){var e=Wl;e===0&&(e=Ha,Ha<<=1,(Ha&261888)===0&&(Ha=256)),Gn=e}return Gn}function cp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Vs(""+e)}function op(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Vg(e,t,a,i,c){if(t==="submit"&&a&&a.stateNode===c){var o=cp((c[_e]||null).action),h=i.submitter;h&&(t=(t=h[_e]||null)?cp(t.formAction):h.getAttribute("formAction"),t!==null&&(o=t,h=null));var g=new Xs("action","action",null,i,c);e.push({event:g,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Gn!==0){var j=h?op(c,h):new FormData(c);$c(a,{pending:!0,data:j,method:c.method,action:o},null,j)}}else typeof o=="function"&&(g.preventDefault(),j=h?op(c,h):new FormData(c),$c(a,{pending:!0,data:j,method:c.method,action:o},o,j))},currentTarget:c}]})}}for(var jo=0;jo<lc.length;jo++){var No=lc[jo],Zg=No.toLowerCase(),Gg=No[0].toUpperCase()+No.slice(1);Ra(Zg,"on"+Gg)}Ra($f,"onAnimationEnd"),Ra(Yf,"onAnimationIteration"),Ra(Vf,"onAnimationStart"),Ra("dblclick","onDoubleClick"),Ra("focusin","onFocus"),Ra("focusout","onBlur"),Ra(rg,"onTransitionRun"),Ra(ug,"onTransitionStart"),Ra(cg,"onTransitionCancel"),Ra(Zf,"onTransitionEnd"),Bl("onMouseEnter",["mouseout","mouseover"]),Bl("onMouseLeave",["mouseout","mouseover"]),Bl("onPointerEnter",["pointerout","pointerover"]),Bl("onPointerLeave",["pointerout","pointerover"]),ul("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ul("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ul("onBeforeInput",["compositionend","keypress","textInput","paste"]),ul("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ul("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ul("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hs="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(" "),Qg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hs));function dp(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],c=i.event;i=i.listeners;e:{var o=void 0;if(t)for(var h=i.length-1;0<=h;h--){var g=i[h],j=g.instance,C=g.currentTarget;if(g=g.listener,j!==o&&c.isPropagationStopped())break e;o=g,c.currentTarget=C;try{o(c)}catch(z){Js(z)}c.currentTarget=null,o=j}else for(h=0;h<i.length;h++){if(g=i[h],j=g.instance,C=g.currentTarget,g=g.listener,j!==o&&c.isPropagationStopped())break e;o=g,c.currentTarget=C;try{o(c)}catch(z){Js(z)}c.currentTarget=null,o=j}}}}function Re(e,t){var a=t[Uu];a===void 0&&(a=t[Uu]=new Set);var i=e+"__bubble";a.has(i)||(fp(t,e,2,!1),a.add(i))}function _o(e,t,a){var i=0;t&&(i|=4),fp(a,e,i,t)}var Ur="_reactListening"+Math.random().toString(36).slice(2);function Ao(e){if(!e[Ur]){e[Ur]=!0,lf.forEach(function(a){a!=="selectionchange"&&(Qg.has(a)||_o(a,!1,e),_o(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ur]||(t[Ur]=!0,_o("selectionchange",!1,t))}}function fp(e,t,a,i){switch($p(t)){case 2:var c=b0;break;case 8:c=w0;break;default:c=$o}a=c.bind(null,t,a,e),c=void 0,!Gu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),i?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function ko(e,t,a,i,c){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 g=i.stateNode.containerInfo;if(g===c)break;if(h===4)for(h=i.return;h!==null;){var j=h.tag;if((j===3||j===4)&&h.stateNode.containerInfo===c)return;h=h.return}for(;g!==null;){if(h=Dl(g),h===null)return;if(j=h.tag,j===5||j===6||j===26||j===27){i=o=h;continue e}g=g.parentNode}}i=i.return}yf(function(){var C=o,z=Vu(a),Z=[];e:{var O=Gf.get(e);if(O!==void 0){var L=Xs,ie=e;switch(e){case"keypress":if(Gs(a)===0)break e;case"keydown":case"keyup":L=qv;break;case"focusin":ie="focus",L=Ku;break;case"focusout":ie="blur",L=Ku;break;case"beforeblur":case"afterblur":L=Ku;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":L=bf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=kv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=Yv;break;case $f:case Yf:case Vf:L=Cv;break;case Zf:L=Zv;break;case"scroll":case"scrollend":L=_v;break;case"wheel":L=Qv;break;case"copy":case"cut":case"paste":L=Ov;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=Sf;break;case"toggle":case"beforetoggle":L=Iv}var me=(t&4)!==0,We=!me&&(e==="scroll"||e==="scrollend"),A=me?O!==null?O+"Capture":null:O;me=[];for(var _=C,R;_!==null;){var Y=_;if(R=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||R===null||A===null||(Y=Di(_,A),Y!=null&&me.push(ms(_,Y,R))),We)break;_=_.return}0<me.length&&(O=new L(O,ie,null,a,z),Z.push({event:O,listeners:me}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",O&&a!==Yu&&(ie=a.relatedTarget||a.fromElement)&&(Dl(ie)||ie[Ut]))break e;if((L||O)&&(O=z.window===z?z:(O=z.ownerDocument)?O.defaultView||O.parentWindow:window,L?(ie=a.relatedTarget||a.toElement,L=C,ie=ie?Dl(ie):null,ie!==null&&(We=f(ie),me=ie.tag,ie!==We||me!==5&&me!==27&&me!==6)&&(ie=null)):(L=null,ie=C),L!==ie)){if(me=bf,Y="onMouseLeave",A="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(me=Sf,Y="onPointerLeave",A="onPointerEnter",_="pointer"),We=L==null?O:Li(L),R=ie==null?O:Li(ie),O=new me(Y,_+"leave",L,a,z),O.target=We,O.relatedTarget=R,Y=null,Dl(z)===C&&(me=new me(A,_+"enter",ie,a,z),me.target=R,me.relatedTarget=We,Y=me),We=Y,L&&ie)t:{for(me=Xg,A=L,_=ie,R=0,Y=A;Y;Y=me(Y))R++;Y=0;for(var fe=_;fe;fe=me(fe))Y++;for(;0<R-Y;)A=me(A),R--;for(;0<Y-R;)_=me(_),Y--;for(;R--;){if(A===_||_!==null&&A===_.alternate){me=A;break t}A=me(A),_=me(_)}me=null}else me=null;L!==null&&hp(Z,O,L,me,!1),ie!==null&&We!==null&&hp(Z,We,ie,me,!0)}}e:{if(O=C?Li(C):window,L=O.nodeName&&O.nodeName.toLowerCase(),L==="select"||L==="input"&&O.type==="file")var $e=Cf;else if(Ef(O))if(Tf)$e=lg;else{$e=ag;var re=tg}else L=O.nodeName,!L||L.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?C&&$u(C.elementType)&&($e=Cf):$e=ng;if($e&&($e=$e(e,C))){Rf(Z,$e,a,z);break e}re&&re(e,O,C),e==="focusout"&&C&&O.type==="number"&&C.memoizedProps.value!=null&&Hu(O,"number",O.value)}switch(re=C?Li(C):window,e){case"focusin":(Ef(re)||re.contentEditable==="true")&&(Zl=re,tc=C,Vi=null);break;case"focusout":Vi=tc=Zl=null;break;case"mousedown":ac=!0;break;case"contextmenu":case"mouseup":case"dragend":ac=!1,qf(Z,a,z);break;case"selectionchange":if(sg)break;case"keydown":case"keyup":qf(Z,a,z)}var je;if(Fu)e:{switch(e){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else Vl?Af(e,a)&&(Te="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Te="onCompositionStart");Te&&(jf&&a.locale!=="ko"&&(Vl||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&Vl&&(je=vf()):(Rn=z,Qu="value"in Rn?Rn.value:Rn.textContent,Vl=!0)),re=zr(C,Te),0<re.length&&(Te=new wf(Te,e,null,a,z),Z.push({event:Te,listeners:re}),je?Te.data=je:(je=kf(a),je!==null&&(Te.data=je)))),(je=Jv?Fv(e,a):Wv(e,a))&&(Te=zr(C,"onBeforeInput"),0<Te.length&&(re=new wf("onBeforeInput","beforeinput",null,a,z),Z.push({event:re,listeners:Te}),re.data=je)),Vg(Z,e,C,a,z)}dp(Z,t)})}function ms(e,t,a){return{instance:e,listener:t,currentTarget:a}}function zr(e,t){for(var a=t+"Capture",i=[];e!==null;){var c=e,o=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||o===null||(c=Di(e,a),c!=null&&i.unshift(ms(e,c,o)),c=Di(e,t),c!=null&&i.push(ms(e,c,o))),e.tag===3)return i;e=e.return}return[]}function Xg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function hp(e,t,a,i,c){for(var o=t._reactName,h=[];a!==null&&a!==i;){var g=a,j=g.alternate,C=g.stateNode;if(g=g.tag,j!==null&&j===i)break;g!==5&&g!==26&&g!==27||C===null||(j=C,c?(C=Di(a,o),C!=null&&h.unshift(ms(a,C,j))):c||(C=Di(a,o),C!=null&&h.push(ms(a,C,j)))),a=a.return}h.length!==0&&e.push({event:t,listeners:h})}var Ig=/\r\n?/g,Kg=/\u0000|\uFFFD/g;function mp(e){return(typeof e=="string"?e:""+e).replace(Ig,`
|
|
49
|
+
`).replace(Kg,"")}function pp(e,t){return t=mp(t),mp(e)===t}function Fe(e,t,a,i,c,o){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Hl(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Hl(e,""+i);break;case"className":$s(e,"class",i);break;case"tabIndex":$s(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":$s(e,a,i);break;case"style":pf(e,i,o);break;case"data":if(t!=="object"){$s(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=Vs(""+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"&&Fe(e,t,"name",c.name,c,null),Fe(e,t,"formEncType",c.formEncType,c,null),Fe(e,t,"formMethod",c.formMethod,c,null),Fe(e,t,"formTarget",c.formTarget,c,null)):(Fe(e,t,"encType",c.encType,c,null),Fe(e,t,"method",c.method,c,null),Fe(e,t,"target",c.target,c,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=Vs(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=tn);break;case"onScroll":i!=null&&Re("scroll",e);break;case"onScrollEnd":i!=null&&Re("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(c.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=Vs(""+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":Re("beforetoggle",e),Re("toggle",e),Hs(e,"popover",i);break;case"xlinkActuate":en(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":en(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":en(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":en(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":en(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":en(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":en(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":en(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":en(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":Hs(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=jv.get(a)||a,Hs(e,a,i))}}function Eo(e,t,a,i,c,o){switch(a){case"style":pf(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(c.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof i=="string"?Hl(e,i):(typeof i=="number"||typeof i=="bigint")&&Hl(e,""+i);break;case"onScroll":i!=null&&Re("scroll",e);break;case"onScrollEnd":i!=null&&Re("scrollend",e);break;case"onClick":i!=null&&(e.onclick=tn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!sf.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),o=e[_e]||null,o=o!=null?o[a]:null,typeof o=="function"&&e.removeEventListener(t,o,c),typeof i=="function")){typeof o!="function"&&o!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,c);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):Hs(e,a,i)}}}function Ot(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",e),Re("load",e);var i=!1,c=!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":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Fe(e,t,o,h,a,null)}}c&&Fe(e,t,"srcSet",a.srcSet,a,null),i&&Fe(e,t,"src",a.src,a,null);return;case"input":Re("invalid",e);var g=o=h=c=null,j=null,C=null;for(i in a)if(a.hasOwnProperty(i)){var z=a[i];if(z!=null)switch(i){case"name":c=z;break;case"type":h=z;break;case"checked":j=z;break;case"defaultChecked":C=z;break;case"value":o=z;break;case"defaultValue":g=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(u(137,t));break;default:Fe(e,t,i,z,a,null)}}df(e,o,g,j,C,h,c,!1);return;case"select":Re("invalid",e),i=h=o=null;for(c in a)if(a.hasOwnProperty(c)&&(g=a[c],g!=null))switch(c){case"value":o=g;break;case"defaultValue":h=g;break;case"multiple":i=g;default:Fe(e,t,c,g,a,null)}t=o,a=h,e.multiple=!!i,t!=null?ql(e,!!i,t,!1):a!=null&&ql(e,!!i,a,!0);return;case"textarea":Re("invalid",e),o=c=i=null;for(h in a)if(a.hasOwnProperty(h)&&(g=a[h],g!=null))switch(h){case"value":i=g;break;case"defaultValue":c=g;break;case"children":o=g;break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(u(91));break;default:Fe(e,t,h,g,a,null)}hf(e,i,c,o);return;case"option":for(j in a)if(a.hasOwnProperty(j)&&(i=a[j],i!=null))switch(j){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:Fe(e,t,j,i,a,null)}return;case"dialog":Re("beforetoggle",e),Re("toggle",e),Re("cancel",e),Re("close",e);break;case"iframe":case"object":Re("load",e);break;case"video":case"audio":for(i=0;i<hs.length;i++)Re(hs[i],e);break;case"image":Re("error",e),Re("load",e);break;case"details":Re("toggle",e);break;case"embed":case"source":case"link":Re("error",e),Re("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(C in a)if(a.hasOwnProperty(C)&&(i=a[C],i!=null))switch(C){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Fe(e,t,C,i,a,null)}return;default:if($u(t)){for(z in a)a.hasOwnProperty(z)&&(i=a[z],i!==void 0&&Eo(e,t,z,i,a,void 0));return}}for(g in a)a.hasOwnProperty(g)&&(i=a[g],i!=null&&Fe(e,t,g,i,a,null))}function Jg(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 c=null,o=null,h=null,g=null,j=null,C=null,z=null;for(L in a){var Z=a[L];if(a.hasOwnProperty(L)&&Z!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":j=Z;default:i.hasOwnProperty(L)||Fe(e,t,L,null,i,Z)}}for(var O in i){var L=i[O];if(Z=a[O],i.hasOwnProperty(O)&&(L!=null||Z!=null))switch(O){case"type":o=L;break;case"name":c=L;break;case"checked":C=L;break;case"defaultChecked":z=L;break;case"value":h=L;break;case"defaultValue":g=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(u(137,t));break;default:L!==Z&&Fe(e,t,O,L,i,Z)}}qu(e,h,g,j,C,z,o,c);return;case"select":L=h=g=O=null;for(o in a)if(j=a[o],a.hasOwnProperty(o)&&j!=null)switch(o){case"value":break;case"multiple":L=j;default:i.hasOwnProperty(o)||Fe(e,t,o,null,i,j)}for(c in i)if(o=i[c],j=a[c],i.hasOwnProperty(c)&&(o!=null||j!=null))switch(c){case"value":O=o;break;case"defaultValue":g=o;break;case"multiple":h=o;default:o!==j&&Fe(e,t,c,o,i,j)}t=g,a=h,i=L,O!=null?ql(e,!!a,O,!1):!!i!=!!a&&(t!=null?ql(e,!!a,t,!0):ql(e,!!a,a?[]:"",!1));return;case"textarea":L=O=null;for(g in a)if(c=a[g],a.hasOwnProperty(g)&&c!=null&&!i.hasOwnProperty(g))switch(g){case"value":break;case"children":break;default:Fe(e,t,g,null,i,c)}for(h in i)if(c=i[h],o=a[h],i.hasOwnProperty(h)&&(c!=null||o!=null))switch(h){case"value":O=c;break;case"defaultValue":L=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(u(91));break;default:c!==o&&Fe(e,t,h,c,i,o)}ff(e,O,L);return;case"option":for(var ie in a)if(O=a[ie],a.hasOwnProperty(ie)&&O!=null&&!i.hasOwnProperty(ie))switch(ie){case"selected":e.selected=!1;break;default:Fe(e,t,ie,null,i,O)}for(j in i)if(O=i[j],L=a[j],i.hasOwnProperty(j)&&O!==L&&(O!=null||L!=null))switch(j){case"selected":e.selected=O&&typeof O!="function"&&typeof O!="symbol";break;default:Fe(e,t,j,O,i,L)}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 me in a)O=a[me],a.hasOwnProperty(me)&&O!=null&&!i.hasOwnProperty(me)&&Fe(e,t,me,null,i,O);for(C in i)if(O=i[C],L=a[C],i.hasOwnProperty(C)&&O!==L&&(O!=null||L!=null))switch(C){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(u(137,t));break;default:Fe(e,t,C,O,i,L)}return;default:if($u(t)){for(var We in a)O=a[We],a.hasOwnProperty(We)&&O!==void 0&&!i.hasOwnProperty(We)&&Eo(e,t,We,void 0,i,O);for(z in i)O=i[z],L=a[z],!i.hasOwnProperty(z)||O===L||O===void 0&&L===void 0||Eo(e,t,z,O,i,L);return}}for(var A in a)O=a[A],a.hasOwnProperty(A)&&O!=null&&!i.hasOwnProperty(A)&&Fe(e,t,A,null,i,O);for(Z in i)O=i[Z],L=a[Z],!i.hasOwnProperty(Z)||O===L||O==null&&L==null||Fe(e,t,Z,O,i,L)}function xp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Fg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),i=0;i<a.length;i++){var c=a[i],o=c.transferSize,h=c.initiatorType,g=c.duration;if(o&&g&&xp(h)){for(h=0,g=c.responseEnd,i+=1;i<a.length;i++){var j=a[i],C=j.startTime;if(C>g)break;var z=j.transferSize,Z=j.initiatorType;z&&xp(Z)&&(j=j.responseEnd,h+=z*(j<g?1:(g-C)/(j-C)))}if(--i,t+=8*(o+h)/(c.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 Ro=null,Co=null;function Br(e){return e.nodeType===9?e:e.ownerDocument}function yp(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 vp(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 To(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 Oo=null;function Wg(){var e=window.event;return e&&e.type==="popstate"?e===Oo?!1:(Oo=e,!0):(Oo=null,!1)}var gp=typeof setTimeout=="function"?setTimeout:void 0,Pg=typeof clearTimeout=="function"?clearTimeout:void 0,bp=typeof Promise=="function"?Promise:void 0,e0=typeof queueMicrotask=="function"?queueMicrotask:typeof bp<"u"?function(e){return bp.resolve(null).then(e).catch(t0)}:gp;function t0(e){setTimeout(function(){throw e})}function Qn(e){return e==="head"}function wp(e,t){var a=t,i=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(i===0){e.removeChild(c),yi(t);return}i--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")i++;else if(a==="html")ps(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,ps(a);for(var o=a.firstChild;o;){var h=o.nextSibling,g=o.nodeName;o[Mi]||g==="SCRIPT"||g==="STYLE"||g==="LINK"&&o.rel.toLowerCase()==="stylesheet"||a.removeChild(o),o=h}}else a==="body"&&ps(e.ownerDocument.body);a=c}while(a);yi(t)}function Sp(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 Mo(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":Mo(a),zu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function a0(e,t,a,i){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Mi])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!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=ga(e.nextSibling),e===null)break}return null}function n0(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=ga(e.nextSibling),e===null))return null;return e}function jp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ga(e.nextSibling),e===null))return null;return e}function Lo(e){return e.data==="$?"||e.data==="$~"}function Do(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function l0(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 ga(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 Uo=null;function Np(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return ga(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function _p(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 Ap(e,t,a){switch(t=Br(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 ps(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);zu(e)}var ba=new Map,kp=new Set;function qr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var vn=K.d;K.d={f:i0,r:s0,D:r0,C:u0,L:c0,m:o0,X:f0,S:d0,M:h0};function i0(){var e=vn.f(),t=Cr();return e||t}function s0(e){var t=Ul(e);t!==null&&t.tag===5&&t.type==="form"?Zh(t):vn.r(e)}var mi=typeof document>"u"?null:document;function Ep(e,t,a){var i=mi;if(i&&typeof t=="string"&&t){var c=fa(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),kp.has(c)||(kp.add(c),e={rel:e,crossOrigin:a,href:t},i.querySelector(c)===null&&(t=i.createElement("link"),Ot(t,"link",e),kt(t),i.head.appendChild(t)))}}function r0(e){vn.D(e),Ep("dns-prefetch",e,null)}function u0(e,t){vn.C(e,t),Ep("preconnect",e,t)}function c0(e,t,a){vn.L(e,t,a);var i=mi;if(i&&e&&t){var c='link[rel="preload"][as="'+fa(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+fa(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+fa(a.imageSizes)+'"]')):c+='[href="'+fa(e)+'"]';var o=c;switch(t){case"style":o=pi(e);break;case"script":o=xi(e)}ba.has(o)||(e=N({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),ba.set(o,e),i.querySelector(c)!==null||t==="style"&&i.querySelector(xs(o))||t==="script"&&i.querySelector(ys(o))||(t=i.createElement("link"),Ot(t,"link",e),kt(t),i.head.appendChild(t)))}}function o0(e,t){vn.m(e,t);var a=mi;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+fa(i)+'"][href="'+fa(e)+'"]',o=c;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=xi(e)}if(!ba.has(o)&&(e=N({rel:"modulepreload",href:e},t),ba.set(o,e),a.querySelector(c)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ys(o)))return}i=a.createElement("link"),Ot(i,"link",e),kt(i),a.head.appendChild(i)}}}function d0(e,t,a){vn.S(e,t,a);var i=mi;if(i&&e){var c=zl(i).hoistableStyles,o=pi(e);t=t||"default";var h=c.get(o);if(!h){var g={loading:0,preload:null};if(h=i.querySelector(xs(o)))g.loading=5;else{e=N({rel:"stylesheet",href:e,"data-precedence":t},a),(a=ba.get(o))&&zo(e,a);var j=h=i.createElement("link");kt(j),Ot(j,"link",e),j._p=new Promise(function(C,z){j.onload=C,j.onerror=z}),j.addEventListener("load",function(){g.loading|=1}),j.addEventListener("error",function(){g.loading|=2}),g.loading|=4,Hr(h,t,i)}h={type:"stylesheet",instance:h,count:1,state:g},c.set(o,h)}}}function f0(e,t){vn.X(e,t);var a=mi;if(a&&e){var i=zl(a).hoistableScripts,c=xi(e),o=i.get(c);o||(o=a.querySelector(ys(c)),o||(e=N({src:e,async:!0},t),(t=ba.get(c))&&Bo(e,t),o=a.createElement("script"),kt(o),Ot(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(c,o))}}function h0(e,t){vn.M(e,t);var a=mi;if(a&&e){var i=zl(a).hoistableScripts,c=xi(e),o=i.get(c);o||(o=a.querySelector(ys(c)),o||(e=N({src:e,async:!0,type:"module"},t),(t=ba.get(c))&&Bo(e,t),o=a.createElement("script"),kt(o),Ot(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(c,o))}}function Rp(e,t,a,i){var c=(c=P.current)?qr(c):null;if(!c)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=pi(a.href),a=zl(c).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=pi(a.href);var o=zl(c).hoistableStyles,h=o.get(e);if(h||(c=c.ownerDocument||c,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,h),(o=c.querySelector(xs(e)))&&!o._p&&(h.instance=o,h.state.loading=5),ba.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},ba.set(e,a),o||m0(c,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=xi(a),a=zl(c).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 pi(e){return'href="'+fa(e)+'"'}function xs(e){return'link[rel="stylesheet"]['+e+"]"}function Cp(e){return N({},e,{"data-precedence":e.precedence,precedence:null})}function m0(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}),Ot(t,"link",a),kt(t),e.head.appendChild(t))}function xi(e){return'[src="'+fa(e)+'"]'}function ys(e){return"script[async]"+e}function Tp(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+fa(a.href)+'"]');if(i)return t.instance=i,kt(i),i;var c=N({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),kt(i),Ot(i,"style",c),Hr(i,a.precedence,e),t.instance=i;case"stylesheet":c=pi(a.href);var o=e.querySelector(xs(c));if(o)return t.state.loading|=4,t.instance=o,kt(o),o;i=Cp(a),(c=ba.get(c))&&zo(i,c),o=(e.ownerDocument||e).createElement("link"),kt(o);var h=o;return h._p=new Promise(function(g,j){h.onload=g,h.onerror=j}),Ot(o,"link",i),t.state.loading|=4,Hr(o,a.precedence,e),t.instance=o;case"script":return o=xi(a.src),(c=e.querySelector(ys(o)))?(t.instance=c,kt(c),c):(i=a,(c=ba.get(o))&&(i=N({},a),Bo(i,c)),e=e.ownerDocument||e,c=e.createElement("script"),kt(c),Ot(c,"link",i),e.head.appendChild(c),t.instance=c);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,Hr(i,a.precedence,e));return t.instance}function Hr(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=i.length?i[i.length-1]:null,o=c,h=0;h<i.length;h++){var g=i[h];if(g.dataset.precedence===t)o=g;else if(o!==c)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function zo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Bo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var $r=null;function Op(e,t,a){if($r===null){var i=new Map,c=$r=new Map;c.set(a,i)}else c=$r,i=c.get(a),i||(i=new Map,c.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var o=a[c];if(!(o[Mi]||o[te]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var h=o.getAttribute(t)||"";h=e+h;var g=i.get(h);g?g.push(o):i.set(h,[o])}}return i}function Mp(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function p0(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 Lp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function x0(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 c=pi(i.href),o=t.querySelector(xs(c));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Yr.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=o,kt(o);return}o=t.ownerDocument||t,i=Cp(i),(c=ba.get(c))&&zo(i,c),o=o.createElement("link"),kt(o);var h=o;h._p=new Promise(function(g,j){h.onload=g,h.onerror=j}),Ot(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=Yr.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var qo=0;function y0(e,t){return e.stylesheets&&e.count===0&&Zr(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var i=setTimeout(function(){if(e.stylesheets&&Zr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&qo===0&&(qo=62500*Fg());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Zr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>qo?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(c)}}:null}function Yr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Vr=null;function Zr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Vr=new Map,t.forEach(v0,e),Vr=null,Yr.call(e))}function v0(e,t){if(!(t.state.loading&4)){var a=Vr.get(e);if(a)var i=a.get(null);else{a=new Map,Vr.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<c.length;o++){var h=c[o];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(a.set(h.dataset.precedence,h),i=h)}i&&a.set(null,i)}c=t.instance,h=c.getAttribute("data-precedence"),o=a.get(h)||i,o===i&&a.set(null,c),a.set(h,c),this.count++,i=Yr.bind(this),c.addEventListener("load",i),c.addEventListener("error",i),o?o.parentNode.insertBefore(c,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var vs={$$typeof:W,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function g0(e,t,a,i,c,o,h,g,j){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=$a(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$a(0),this.hiddenUpdates=$a(null),this.identifierPrefix=i,this.onUncaughtError=c,this.onCaughtError=o,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function Dp(e,t,a,i,c,o,h,g,j,C,z,Z){return e=new g0(e,t,a,h,j,C,z,Z,g),t=1,o===!0&&(t|=24),o=ta(3,null,null,t),e.current=o,o.stateNode=e,t=yc(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:i,isDehydrated:a,cache:t},wc(o),e}function Up(e){return e?(e=Xl,e):Xl}function zp(e,t,a,i,c,o){c=Up(c),i.context===null?i.context=c:i.pendingContext=c,i=Dn(t),i.payload={element:a},o=o===void 0?null:o,o!==null&&(i.callback=o),a=Un(e,i,t),a!==null&&(Qt(a,e,t),Ji(a,e,t))}function Bp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Ho(e,t){Bp(e,t),(e=e.alternate)&&Bp(e,t)}function qp(e){if(e.tag===13||e.tag===31){var t=fl(e,67108864);t!==null&&Qt(t,e,67108864),Ho(e,67108864)}}function Hp(e){if(e.tag===13||e.tag===31){var t=sa();t=Ll(t);var a=fl(e,t);a!==null&&Qt(a,e,t),Ho(e,t)}}var Gr=!0;function b0(e,t,a,i){var c=D.T;D.T=null;var o=K.p;try{K.p=2,$o(e,t,a,i)}finally{K.p=o,D.T=c}}function w0(e,t,a,i){var c=D.T;D.T=null;var o=K.p;try{K.p=8,$o(e,t,a,i)}finally{K.p=o,D.T=c}}function $o(e,t,a,i){if(Gr){var c=Yo(i);if(c===null)ko(e,t,i,Qr,a),Yp(e,i);else if(j0(c,e,t,a,i))i.stopPropagation();else if(Yp(e,i),t&4&&-1<S0.indexOf(e)){for(;c!==null;){var o=Ul(c);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var h=Pt(o.pendingLanes);if(h!==0){var g=o;for(g.pendingLanes|=2,g.entangledLanes|=2;h;){var j=1<<31-At(h);g.entanglements[1]|=j,h&=~j}Ga(o),(Ve&6)===0&&(Er=_t()+500,fs(0))}}break;case 31:case 13:g=fl(o,2),g!==null&&Qt(g,o,2),Cr(),Ho(o,2)}if(o=Yo(i),o===null&&ko(e,t,i,Qr,a),o===c)break;c=o}c!==null&&i.stopPropagation()}else ko(e,t,i,null,a)}}function Yo(e){return e=Vu(e),Vo(e)}var Qr=null;function Vo(e){if(Qr=null,e=Dl(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=x(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 Qr=e,null}function $p(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(il()){case Nn:return 2;case _n:return 8;case Pa:case Ei:return 32;case Ft:return 268435456;default:return 32}default:return 32}}var Zo=!1,Xn=null,In=null,Kn=null,gs=new Map,bs=new Map,Jn=[],S0="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 Yp(e,t){switch(e){case"focusin":case"focusout":Xn=null;break;case"dragenter":case"dragleave":In=null;break;case"mouseover":case"mouseout":Kn=null;break;case"pointerover":case"pointerout":gs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bs.delete(t.pointerId)}}function ws(e,t,a,i,c,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:o,targetContainers:[c]},t!==null&&(t=Ul(t),t!==null&&qp(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function j0(e,t,a,i,c){switch(t){case"focusin":return Xn=ws(Xn,e,t,a,i,c),!0;case"dragenter":return In=ws(In,e,t,a,i,c),!0;case"mouseover":return Kn=ws(Kn,e,t,a,i,c),!0;case"pointerover":var o=c.pointerId;return gs.set(o,ws(gs.get(o)||null,e,t,a,i,c)),!0;case"gotpointercapture":return o=c.pointerId,bs.set(o,ws(bs.get(o)||null,e,t,a,i,c)),!0}return!1}function Vp(e){var t=Dl(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,qs(e.priority,function(){Hp(a)});return}}else if(t===31){if(t=x(a),t!==null){e.blockedOn=t,qs(e.priority,function(){Hp(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 Xr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Yo(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);Yu=i,a.target.dispatchEvent(i),Yu=null}else return t=Ul(a),t!==null&&qp(t),e.blockedOn=a,!1;t.shift()}return!0}function Zp(e,t,a){Xr(e)&&a.delete(t)}function N0(){Zo=!1,Xn!==null&&Xr(Xn)&&(Xn=null),In!==null&&Xr(In)&&(In=null),Kn!==null&&Xr(Kn)&&(Kn=null),gs.forEach(Zp),bs.forEach(Zp)}function Ir(e,t){e.blockedOn===t&&(e.blockedOn=null,Zo||(Zo=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,N0)))}var Kr=null;function Gp(e){Kr!==e&&(Kr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Kr===e&&(Kr=null);for(var t=0;t<e.length;t+=3){var a=e[t],i=e[t+1],c=e[t+2];if(typeof i!="function"){if(Vo(i||a)===null)continue;break}var o=Ul(a);o!==null&&(e.splice(t,3),t-=3,$c(o,{pending:!0,data:c,method:a.method,action:i},i,c))}}))}function yi(e){function t(j){return Ir(j,e)}Xn!==null&&Ir(Xn,e),In!==null&&Ir(In,e),Kn!==null&&Ir(Kn,e),gs.forEach(t),bs.forEach(t);for(var a=0;a<Jn.length;a++){var i=Jn[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Jn.length&&(a=Jn[0],a.blockedOn===null);)Vp(a),a.blockedOn===null&&Jn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var c=a[i],o=a[i+1],h=c[_e]||null;if(typeof o=="function")h||Gp(a);else if(h){var g=null;if(o&&o.hasAttribute("formAction")){if(c=o,h=o[_e]||null)g=h.formAction;else if(Vo(c)!==null)continue}else g=h.action;typeof g=="function"?a[i+1]=g:(a.splice(i,3),i-=3),Gp(a)}}}function Qp(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(h){return c=h})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=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,c=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),c!==null&&(c(),c=null)}}}function Go(e){this._internalRoot=e}Jr.prototype.render=Go.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,i=sa();zp(a,i,e,t,null,null)},Jr.prototype.unmount=Go.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zp(e.current,2,null,e,null,null),Cr(),t[Ut]=null}};function Jr(e){this._internalRoot=e}Jr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Oi();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Jn.length&&t!==0&&t<Jn[a].priority;a++);Jn.splice(a,0,e),a===0&&Vp(e)}};var Xp=l.version;if(Xp!=="19.2.7")throw Error(u(527,Xp,"19.2.7"));K.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=v(t),e=e!==null?w(e):null,e=e===null?null:e.stateNode,e};var _0={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fr.isDisabled&&Fr.supportsFiber)try{Lt=Fr.inject(_0),ze=Fr}catch{}}return js.createRoot=function(e,t){if(!d(e))throw Error(u(299));var a=!1,i="",c=em,o=tm,h=am;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Dp(e,1,!1,null,null,a,i,null,c,o,h,Qp),e[Ut]=t.current,Ao(e),new Go(t)},js.hydrateRoot=function(e,t,a){if(!d(e))throw Error(u(299));var i=!1,c="",o=em,h=tm,g=am,j=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(o=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(g=a.onRecoverableError),a.formState!==void 0&&(j=a.formState)),t=Dp(e,1,!0,t,a??null,i,c,j,o,h,g,Qp),t.context=Up(null),a=t.current,i=sa(),i=Ll(i),c=Dn(i),c.callback=null,Un(a,c,i),a=i,t.current.lanes=a,ct(t,a),Ga(t),e[Ut]=t.current,Ao(e),new Jr(t)},js.version="19.2.7",js}var nx;function D0(){if(nx)return Io.exports;nx=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(),Io.exports=L0(),Io.exports}var U0=D0();/**
|
|
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 Ud=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,ey=/^[\\/]{2}/;function z0(n,l){return l+n.replace(/\\/g,"/")}var lx="popstate";function ix(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function B0(n={}){function l(u,d){var v;let f=(v=d.state)==null?void 0:v.masked,{pathname:m,search:x,hash:y}=f||u.location;return gd("",{pathname:m,search:x,hash:y},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:Al(d)}return H0(l,s,null,n)}function rt(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function ka(n,l){if(!n){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function q0(){return Math.random().toString(36).substring(2,10)}function sx(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 gd(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||q0(),mask:d}}function Al({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 H0(n,l,s,u={}){let{window:d=document.defaultView,v5Compat:f=!1}=u,m=d.history,x="POP",y=null,v=w();v==null&&(v=0,m.replaceState({...m.state,idx:v},""));function w(){return(m.state||{idx:null}).idx}function N(){x="POP";let M=w(),q=M==null?null:M-v;v=M,y&&y({action:x,location:H.location,delta:q})}function U(M,q){x="PUSH";let J=ix(M)?M:gd(H.location,M,q);v=w()+1;let W=sx(J,v),se=H.createHref(J.mask||J);try{m.pushState(W,"",se)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;d.location.assign(se)}f&&y&&y({action:x,location:H.location,delta:1})}function Q(M,q){x="REPLACE";let J=ix(M)?M:gd(H.location,M,q);v=w();let W=sx(J,v),se=H.createHref(J.mask||J);m.replaceState(W,"",se),f&&y&&y({action:x,location:H.location,delta:0})}function E(M){return $0(d,M)}let H={get action(){return x},get location(){return n(d,m)},listen(M){if(y)throw new Error("A history only accepts one active listener");return d.addEventListener(lx,N),y=M,()=>{d.removeEventListener(lx,N),y=null}},createHref(M){return l(d,M)},createURL:E,encodeLocation(M){let q=E(M);return{pathname:q.pathname,search:q.search,hash:q.hash}},push:U,replace:Q,go(M){return m.go(M)}};return H}function $0(n,l,s=!1){let u="http://localhost";n&&(u=n.location.origin!=="null"?n.location.origin:n.location.href),rt(u,"No window.location.(origin|href) available to create URL");let d=typeof l=="string"?l:Al(l);return d=d.replace(/ $/,"%20"),!s&&ey.test(d)&&(d=u+d),new URL(d,u)}function ty(n,l,s="/"){return Y0(n,l,s,!1)}function Y0(n,l,s,u,d){let f=typeof l=="string"?_i(l):l,m=Sn(f.pathname||"/",s);if(m==null)return null;let x=V0(n),y=null,v=eb(m);for(let w=0;y==null&&w<x.length;++w)y=P0(x[w],v,u);return y}function V0(n){let l=ay(n);return Z0(l),l}function ay(n,l=[],s=[],u="",d=!1){let f=(m,x,y=d,v)=>{let w={relativePath:v===void 0?m.path||"":v,caseSensitive:m.caseSensitive===!0,childrenIndex:x,route:m};if(w.relativePath.startsWith("/")){if(!w.relativePath.startsWith(u)&&y)return;rt(w.relativePath.startsWith(u),`Absolute route path "${w.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),w.relativePath=w.relativePath.slice(u.length)}let N=La([u,w.relativePath]),U=s.concat(w);m.children&&m.children.length>0&&(rt(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${N}".`),ay(m.children,l,U,N,y)),!(m.path==null&&!m.index)&&l.push({path:N,score:F0(N,m.index),routesMeta:U.map((Q,E)=>{let[H,M]=iy(Q.relativePath,Q.caseSensitive,E===U.length-1);return{...Q,matcher:H,compiledParams:M}})})};return n.forEach((m,x)=>{var y;if(m.path===""||!((y=m.path)!=null&&y.includes("?")))f(m,x);else for(let v of ny(m.path))f(m,x,!0,v)}),l}function ny(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=ny(u.join("/")),x=[];return x.push(...m.map(y=>y===""?f:[f,y].join("/"))),d&&x.push(...m),x.map(y=>n.startsWith("/")&&y===""?"/":y)}function Z0(n){n.sort((l,s)=>l.score!==s.score?s.score-l.score:W0(l.routesMeta.map(u=>u.childrenIndex),s.routesMeta.map(u=>u.childrenIndex)))}var G0=/^:[\w-]+$/,Q0=3,X0=2,I0=1,K0=10,J0=-2,rx=n=>n==="*";function F0(n,l){let s=n.split("/"),u=s.length;return s.some(rx)&&(u+=J0),l&&(u+=X0),s.filter(d=>!rx(d)).reduce((d,f)=>d+(G0.test(f)?Q0:f===""?I0:K0),u)}function W0(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 P0(n,l,s=!1){let{routesMeta:u}=n,d={},f="/",m=[];for(let x=0;x<u.length;++x){let y=u[x],v=x===u.length-1,w=f==="/"?l:l.slice(f.length)||"/",N={path:y.relativePath,caseSensitive:y.caseSensitive,end:v},U=y.matcher&&y.compiledParams?ly(N,w,y.matcher,y.compiledParams):cu(N,w),Q=y.route;if(!U&&v&&s&&!u[u.length-1].route.index&&(U=cu({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},w)),!U)return null;Object.assign(d,U.params),m.push({params:d,pathname:La([f,U.pathname]),pathnameBase:nb(La([f,U.pathnameBase])),route:Q}),U.pathnameBase!=="/"&&(f=La([f,U.pathnameBase]))}return m}function cu(n,l){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,u]=iy(n.path,n.caseSensitive,n.end);return ly(n,l,s,u)}function ly(n,l,s,u){let d=l.match(s);if(!d)return null;let f=d[0],m=Si(f,1),x=d.slice(1);return{params:u.reduce((v,{paramName:w,isOptional:N},U)=>{if(w==="*"){let E=x[U]||"";m=Si(f.slice(0,f.length-E.length),1)}const Q=x[U];return N&&!Q?v[w]=void 0:v[w]=(Q||"").replace(/%2F/g,"/"),v},{}),pathname:f,pathnameBase:m,pattern:n}}function iy(n,l=!1,s=!0){ka(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,x,y,v,w)=>{if(u.push({paramName:x,isOptional:y!=null}),y){let N=w.charAt(v+m.length);return N&&N!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}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 eb(n){try{return n.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return ka(!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 Sn(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 tb(n,l="/"){let{pathname:s,search:u="",hash:d=""}=typeof n=="string"?_i(n):n,f;return s?(s=sy(s),s.startsWith("/")||s.startsWith("\\")?f=ux(s.substring(1),"/"):f=ux(s,l)):f=l,{pathname:f,search:lb(u),hash:ib(d)}}function ux(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 Wo(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 ab(n){return n.filter((l,s)=>s===0||l.route.path&&l.route.path.length>0)}function zd(n){let l=ab(n);return l.map((s,u)=>u===l.length-1?s.pathname:s.pathnameBase)}function Nu(n,l,s,u=!1){let d;typeof n=="string"?d=_i(n):(d={...n},rt(!d.pathname||!d.pathname.includes("?"),Wo("?","pathname","search",d)),rt(!d.pathname||!d.pathname.includes("#"),Wo("#","pathname","hash",d)),rt(!d.search||!d.search.includes("#"),Wo("#","search","hash",d)));let f=n===""||d.pathname==="",m=f?"/":d.pathname,x;if(m==null)x=s;else{let N=l.length-1;if(!u&&m.startsWith("..")){let U=m.split("/");for(;U[0]==="..";)U.shift(),N-=1;d.pathname=U.join("/")}x=N>=0?l[N]:"/"}let y=tb(d,x),v=m&&m!=="/"&&m.endsWith("/"),w=(f||m===".")&&s.endsWith("/");return!y.pathname.endsWith("/")&&(v||w)&&(y.pathname+="/"),y}var sy=n=>n.replace(/[\\/]{2,}/g,"/"),La=n=>sy(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 nb=n=>Si(n).replace(/^\/*/,"/"),lb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,ib=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,sb=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 rb(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function ub(n){let l=n.map(s=>s.route.path).filter(Boolean);return La(l)||"/"}var ry=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function uy(n,l){let s=n;if(typeof s!="string"||!Ud.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let u=s,d=!1;if(ry)try{let f=new URL(window.location.href),m=ey.test(s)?new URL(z0(s,f.protocol)):new URL(s),x=Sn(m.pathname,l);m.origin===f.origin&&x!=null?s=x+m.search+m.hash:d=!0}catch{ka(!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 cx=new URL("http://localhost");function Bd(n){if(n.createURL)return n.createURL("/");try{return new URL(n.createHref("/"),cx)}catch{return cx}}function Po(n,l){return n.origin===l.origin&&(n.origin!=="null"||n.protocol===l.protocol&&n.host===l.host)}function cb(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 qd(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&&!Po(d,s),x=!Po(f,s);if(u==="reject"){if(m||x)throw new Error("External navigation is not allowed")}else if(x&&(d==null||!cb(n,d)||!Po(d,f)))throw new Error("External navigation is not allowed")}var cy=["POST","PUT","PATCH","DELETE"];new Set(cy);var ob=["GET",...cy];new Set(ob);var db=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function fb(n){try{return db.includes(new URL(n).protocol)}catch{return!1}}var Ai=b.createContext(null);Ai.displayName="DataRouter";var _u=b.createContext(null);_u.displayName="DataRouterState";var oy=b.createContext(!1);function hb(){return b.useContext(oy)}var dy=b.createContext({isTransitioning:!1});dy.displayName="ViewTransition";var mb=b.createContext(new Map);mb.displayName="Fetchers";var pb=b.createContext(null);pb.displayName="Await";var ca=b.createContext(null);ca.displayName="Navigation";var Us=b.createContext(null);Us.displayName="Location";var Ua=b.createContext({outlet:null,matches:[],isDataRoute:!1});Ua.displayName="Route";var Hd=b.createContext(null);Hd.displayName="RouteError";var fy="REACT_ROUTER_ERROR",xb="REDIRECT",yb="ROUTE_ERROR_RESPONSE";function vb(n){if(n.startsWith(`${fy}:${xb}:{`))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 gb(n){if(n.startsWith(`${fy}:${yb}:{`))try{let l=JSON.parse(n.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new sb(l.status,l.statusText,l.data)}catch{}}function bb(n,{relative:l}={}){rt(ki(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:u}=b.useContext(ca),{hash:d,pathname:f,search:m}=zs(n,{relative:l}),x=f;return s!=="/"&&(x=f==="/"?s:La([s,f])),u.createHref({pathname:x,search:m,hash:d})}function ki(){return b.useContext(Us)!=null}function za(){return rt(ki(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Us).location}var hy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function my(n){b.useContext(ca).static||b.useLayoutEffect(n)}function $d(){let{isDataRoute:n}=b.useContext(Ua);return n?Lb():wb()}function wb(){rt(ki(),"useNavigate() may be used only in the context of a <Router> component.");let n=b.useContext(Ai),{basename:l,navigator:s}=b.useContext(ca),{matches:u}=b.useContext(Ua),{pathname:d}=za(),f=JSON.stringify(zd(u)),m=b.useRef(!1);return my(()=>{m.current=!0}),b.useCallback((y,v={})=>{if(ka(m.current,hy),!m.current)return;if(typeof y=="number"){s.go(y);return}let w=Nu(y,JSON.parse(f),d,v.relative==="path");n==null&&l!=="/"&&(w.pathname=w.pathname==="/"?l:La([l,w.pathname])),qd(typeof y=="string"?y:Al(y),s.createHref(w),Bd(s),"reject"),(v.replace?s.replace:s.push)(w,v.state,v)},[l,s,f,d,n])}b.createContext(null);function Sb(){let{matches:n}=b.useContext(Ua),l=n[n.length-1];return(l==null?void 0:l.params)??{}}function zs(n,{relative:l}={}){let{matches:s}=b.useContext(Ua),{pathname:u}=za(),d=JSON.stringify(zd(s));return b.useMemo(()=>Nu(n,JSON.parse(d),u,l==="path"),[n,d,u,l])}function jb(n,l){return py(n,l)}function py(n,l,s){var M;rt(ki(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=b.useContext(ca),{matches:d}=b.useContext(Ua),f=d[d.length-1],m=f?f.params:{},x=f?f.pathname:"/",y=f?f.pathnameBase:"/",v=f&&f.route;{let q=v&&v.path||"";yy(x,!v||q.endsWith("*")||q.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${q}">) 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="${q}"> to <Route path="${q==="/"?"*":`${q}/*`}">.`)}let w=za(),N;if(l){let q=typeof l=="string"?_i(l):l;rt(y==="/"||((M=q.pathname)==null?void 0:M.startsWith(y)),`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 "${y}" but pathname "${q.pathname}" was given in the \`location\` prop.`),N=q}else N=w;let U=N.pathname||"/",Q=U;if(y!=="/"){let q=y.replace(/^\//,"").split("/");Q="/"+U.replace(/^\//,"").split("/").slice(q.length).join("/")}let E=s&&s.state.matches.length?s.state.matches.map(q=>Object.assign(q,{route:s.manifest[q.route.id]||q.route})):ty(n,{pathname:Q});ka(v||E!=null,`No routes matched location "${N.pathname}${N.search}${N.hash}" `),ka(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${N.pathname}${N.search}${N.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 H=Eb(E&&E.map(q=>Object.assign({},q,{params:Object.assign({},m,q.params),pathname:La([y,u.encodeLocation?u.encodeLocation(q.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathname]),pathnameBase:q.pathnameBase==="/"?y:La([y,u.encodeLocation?u.encodeLocation(q.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathnameBase])})),d,s);return l&&H?b.createElement(Us.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...N},navigationType:"POP"}},H):H}function Nb(){let n=Mb(),l=rb(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=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:f},"ErrorBoundary")," or"," ",b.createElement("code",{style:f},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},l),s?b.createElement("pre",{style:d},s):null,m)}var _b=b.createElement(Nb,null),xy=class extends b.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=gb(n.digest);s&&(n=s)}let l=n!==void 0?b.createElement(Ua.Provider,{value:this.props.routeContext},b.createElement(Hd.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?b.createElement(Ab,{error:n},l):l}};xy.contextType=oy;var ed=new WeakMap;function Ab({children:n,error:l}){let{basename:s,navigator:u}=b.useContext(ca);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let d=vb(l.digest);if(d){let f=ed.get(l);if(f)throw f;let m=uy(d.location,s),x=m.absoluteURL||m.to;if(qd(d.location,x,Bd(u),"allow-explicit"),fb(x))throw new Error("Invalid redirect location");if(ry&&!ed.get(l))if(m.isExternal||d.reloadDocument)window.location.href=x;else{const y=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:d.replace}));throw ed.set(l,y),y}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${x}`})}}return n}function kb({routeContext:n,match:l,children:s}){let u=b.useContext(Ai);return u&&u.static&&u.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=l.route.id),b.createElement(Ua.Provider,{value:n},s)}function Eb(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 w=d.findIndex(N=>N.route.id&&(f==null?void 0:f[N.route.id])!==void 0);rt(w>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),d=d.slice(0,Math.min(d.length,w+1))}let m=!1,x=-1;if(s&&u){m=u.renderFallback;for(let w=0;w<d.length;w++){let N=d[w];if((N.route.HydrateFallback||N.route.hydrateFallbackElement)&&(x=w),N.route.id){let{loaderData:U,errors:Q}=u,E=N.route.loader&&!U.hasOwnProperty(N.route.id)&&(!Q||Q[N.route.id]===void 0);if(N.route.lazy||E){s.isStatic&&(m=!0),x>=0?d=d.slice(0,x+1):d=[d[0]];break}}}}let y=s==null?void 0:s.onError,v=u&&y?(w,N)=>{var U,Q;y(w,{location:u.location,params:((Q=(U=u.matches)==null?void 0:U[0])==null?void 0:Q.params)??{},pattern:ub(u.matches),errorInfo:N})}:void 0;return d.reduceRight((w,N,U)=>{let Q,E=!1,H=null,M=null;u&&(Q=f&&N.route.id?f[N.route.id]:void 0,H=N.route.errorElement||_b,m&&(x<0&&U===0?(yy("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,M=null):x===U&&(E=!0,M=N.route.hydrateFallbackElement||null)));let q=l.concat(d.slice(0,U+1)),J=()=>{let W;return Q?W=H:E?W=M:N.route.Component?W=b.createElement(N.route.Component,null):N.route.element?W=N.route.element:W=w,b.createElement(kb,{match:N,routeContext:{outlet:w,matches:q,isDataRoute:u!=null},children:W})};return u&&(N.route.ErrorBoundary||N.route.errorElement||U===0)?b.createElement(xy,{location:u.location,revalidation:u.revalidation,component:H,error:Q,children:J(),routeContext:{outlet:null,matches:q,isDataRoute:!0},onError:v}):J()},null)}function Yd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Rb(n){let l=b.useContext(Ai);return rt(l,Yd(n)),l}function Cb(n){let l=b.useContext(_u);return rt(l,Yd(n)),l}function Tb(n){let l=b.useContext(Ua);return rt(l,Yd(n)),l}function Vd(n){let l=Tb(n),s=l.matches[l.matches.length-1];return rt(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function Ob(){return Vd("useRouteId")}function Mb(){var u;let n=b.useContext(Hd),l=Cb("useRouteError"),s=Vd("useRouteError");return n!==void 0?n:(u=l.errors)==null?void 0:u[s]}function Lb(){let{router:n}=Rb("useNavigate"),l=Vd("useNavigate"),s=b.useRef(!1);return my(()=>{s.current=!0}),b.useCallback(async(d,f={})=>{ka(s.current,hy),s.current&&(typeof d=="number"?await n.navigate(d):await n.navigate(d,{fromRouteId:l,...f}))},[n,l])}var ox={};function yy(n,l,s){!l&&!ox[n]&&(ox[n]=!0,ka(!1,s))}b.memo(Db);function Db({routes:n,manifest:l,future:s,state:u,isStatic:d,onError:f}){return py(n,void 0,{manifest:l,state:u,isStatic:d,onError:f})}function vy({to:n,replace:l,state:s,relative:u}){rt(ki(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d,navigator:f}=b.useContext(ca);ka(!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}=b.useContext(Ua),{pathname:x}=za(),y=$d(),v=Nu(n,zd(m),x,u==="path");qd(typeof n=="string"?n:Al(n),f.createHref(v),Bd(f),"reject");let w=JSON.stringify(v);return b.useEffect(()=>{y(JSON.parse(w),{replace:l,state:s,relative:u})},[y,w,u,l,s]),null}function _l(n){rt(!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 Ub({basename:n="/",children:l=null,location:s,navigationType:u="POP",navigator:d,static:f=!1,useTransitions:m}){rt(!ki(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let x=n.replace(/^\/*/,"/"),y=b.useMemo(()=>({basename:x,navigator:d,static:f,useTransitions:m,future:{}}),[x,d,f,m]);typeof s=="string"&&(s=_i(s));let{pathname:v="/",search:w="",hash:N="",state:U=null,key:Q="default",mask:E}=s,H=b.useMemo(()=>{let M=Sn(v,x);return M==null?null:{location:{pathname:M,search:w,hash:N,state:U,key:Q,mask:E},navigationType:u}},[x,v,w,N,U,Q,u,E]);return ka(H!=null,`<Router basename="${x}"> is not able to match the URL "${v}${w}${N}" because it does not start with the basename, so the <Router> won't render anything.`),H==null?null:b.createElement(ca.Provider,{value:y},b.createElement(Us.Provider,{children:l,value:H}))}function zb({children:n,location:l}){return jb(bd(n),l)}function bd(n,l=[]){let s=[];return b.Children.forEach(n,(u,d)=>{if(!b.isValidElement(u))return;let f=[...l,d];if(u.type===b.Fragment){s.push.apply(s,bd(u.props.children,f));return}rt(u.type===_l,`[${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>`),rt(!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=bd(u.props.children,f)),s.push(m)}),s}var lu="get",iu="application/x-www-form-urlencoded";function Au(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Bb(n){return Au(n)&&n.tagName.toLowerCase()==="button"}function qb(n){return Au(n)&&n.tagName.toLowerCase()==="form"}function Hb(n){return Au(n)&&n.tagName.toLowerCase()==="input"}function $b(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Yb(n,l){return n.button===0&&(!l||l==="_self")&&!$b(n)}function wd(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 Vb(n,l){let s=wd(n);return l&&l.forEach((u,d)=>{s.has(d)||l.getAll(d).forEach(f=>{s.append(d,f)})}),s}var Wr=null;function Zb(){if(Wr===null)try{new FormData(document.createElement("form"),0),Wr=!1}catch{Wr=!0}return Wr}var Gb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function td(n){return n!=null&&!Gb.has(n)?(ka(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${iu}"`),null):n}function Qb(n,l){let s,u,d,f,m;if(qb(n)){let x=n.getAttribute("action");u=x?Sn(x,l):null,s=n.getAttribute("method")||lu,d=td(n.getAttribute("enctype"))||iu,f=new FormData(n)}else if(Bb(n)||Hb(n)&&(n.type==="submit"||n.type==="image")){let x=n.form;if(x==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=n.getAttribute("formaction")||x.getAttribute("action");if(u=y?Sn(y,l):null,s=n.getAttribute("formmethod")||x.getAttribute("method")||lu,d=td(n.getAttribute("formenctype"))||td(x.getAttribute("enctype"))||iu,f=new FormData(x,n),!Zb()){let{name:v,type:w,value:N}=n;if(w==="image"){let U=v?`${v}.`:"";f.append(`${U}x`,"0"),f.append(`${U}y`,"0")}else v&&f.append(v,N)}}else{if(Au(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=lu,u=null,d=iu,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 Zd(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function gy(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&&Sn(d.pathname,l)==="/"?d.pathname=`${Si(l)}/_root.${u}`:d.pathname=`${Si(d.pathname)}.${u}`,d}async function Xb(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 Ib(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 Kb(n,l,s){let u=await Promise.all(n.map(async d=>{let f=l.routes[d.route.id];if(f){let m=await Xb(f,s);return m.links?m.links():[]}return[]}));return Pb(u.flat(1).filter(Ib).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function dx(n,l,s,u,d,f){let m=(y,v)=>s[v]?y.route.id!==s[v].route.id:!0,x=(y,v)=>{var w;return s[v].pathname!==y.pathname||((w=s[v].route.path)==null?void 0:w.endsWith("*"))&&s[v].params["*"]!==y.params["*"]};return f==="assets"?l.filter((y,v)=>m(y,v)||x(y,v)):f==="data"?l.filter((y,v)=>{var N;let w=u.routes[y.route.id];if(!w||!w.hasLoader)return!1;if(m(y,v)||x(y,v))return!0;if(y.route.shouldRevalidate){let U=y.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((N=s[0])==null?void 0:N.params)||{},nextUrl:new URL(n,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof U=="boolean")return U}return!0}):[]}function Jb(n,l,{includeHydrateFallback:s}={}){return Fb(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 Fb(n){return[...new Set(n)]}function Wb(n){let l={},s=Object.keys(n).sort();for(let u of s)l[u]=n[u];return l}function Pb(n,l){let s=new Set;return new Set(l),n.reduce((u,d)=>{let f=JSON.stringify(Wb(d));return s.has(f)||(s.add(f),u.push({key:f,link:d})),u},[])}function Gd(){let n=b.useContext(Ai);return Zd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function e1(){let n=b.useContext(_u);return Zd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Qd=b.createContext(void 0);Qd.displayName="FrameworkContext";function ku(){let n=b.useContext(Qd);return Zd(n,"You must render this element inside a <HydratedRouter> element"),n}function t1(n,l){let s=b.useContext(Qd),[u,d]=b.useState(!1),[f,m]=b.useState(!1),{onFocus:x,onBlur:y,onMouseEnter:v,onMouseLeave:w,onTouchStart:N}=l,U=b.useRef(null);b.useEffect(()=>{if(n==="render"&&m(!0),n==="viewport"){let H=q=>{q.forEach(J=>{m(J.isIntersecting)})},M=new IntersectionObserver(H,{threshold:.5});return U.current&&M.observe(U.current),()=>{M.disconnect()}}},[n]),b.useEffect(()=>{if(u){let H=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(H)}}},[u]);let Q=()=>{d(!0)},E=()=>{d(!1),m(!1)};return s?n!=="intent"?[f,U,{}]:[f,U,{onFocus:Ns(x,Q),onBlur:Ns(y,E),onMouseEnter:Ns(v,Q),onMouseLeave:Ns(w,E),onTouchStart:Ns(N,Q)}]:[!1,U,{}]}function Ns(n,l){return s=>{n&&n(s),s.defaultPrevented||l(s)}}function a1({page:n,...l}){let s=hb(),{nonce:u}=ku(),{router:d}=Gd(),f=b.useMemo(()=>ty(d.routes,n,d.basename),[d.routes,n,d.basename]);return f?(l.nonce==null&&u&&(l={...l,nonce:u}),s?b.createElement(l1,{page:n,matches:f,...l}):b.createElement(i1,{page:n,matches:f,...l})):null}function n1(n){let{manifest:l,routeModules:s}=ku(),[u,d]=b.useState([]);return b.useEffect(()=>{let f=!1;return Kb(n,l,s).then(m=>{f||d(m)}),()=>{f=!0}},[n,l,s]),u}function l1({page:n,matches:l,...s}){let u=za(),{future:d}=ku(),{basename:f}=Gd(),m=b.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let x=gy(n,f,d.v8_trailingSlashAwareDataRequests,"rsc"),y=!1,v=[];for(let w of l)typeof w.route.shouldRevalidate=="function"?y=!0:v.push(w.route.id);return y&&v.length>0&&x.searchParams.set("_routes",v.join(",")),[x.pathname+x.search]},[f,d.v8_trailingSlashAwareDataRequests,n,u,l]);return b.createElement(b.Fragment,null,m.map(x=>b.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...s})))}function i1({page:n,matches:l,...s}){let u=za(),{future:d,manifest:f,routeModules:m}=ku(),{basename:x}=Gd(),{loaderData:y,matches:v}=e1(),w=b.useMemo(()=>dx(n,l,v,f,u,"data"),[n,l,v,f,u]),N=b.useMemo(()=>dx(n,l,v,f,u,"assets"),[n,l,v,f,u]),U=b.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let H=new Set,M=!1;if(l.forEach(J=>{var se;let W=f.routes[J.route.id];!W||!W.hasLoader||(!w.some(V=>V.route.id===J.route.id)&&J.route.id in y&&((se=m[J.route.id])!=null&&se.shouldRevalidate)||W.hasClientLoader?M=!0:H.add(J.route.id))}),H.size===0)return[];let q=gy(n,x,d.v8_trailingSlashAwareDataRequests,"data");return M&&H.size>0&&q.searchParams.set("_routes",l.filter(J=>H.has(J.route.id)).map(J=>J.route.id).join(",")),[q.pathname+q.search]},[x,d.v8_trailingSlashAwareDataRequests,y,u,f,w,l,n,m]),Q=b.useMemo(()=>Jb(N,f),[N,f]),E=n1(N);return b.createElement(b.Fragment,null,U.map(H=>b.createElement("link",{key:H,rel:"prefetch",as:"fetch",href:H,...s})),Q.map(H=>b.createElement("link",{key:H,rel:"modulepreload",href:H,...s})),E.map(({key:H,link:M})=>b.createElement("link",{key:H,nonce:s.nonce,...M,crossOrigin:M.crossOrigin??s.crossOrigin})))}function s1(...n){return l=>{n.forEach(s=>{typeof s=="function"?s(l):s!=null&&(s.current=l)})}}var r1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{r1&&(window.__reactRouterVersion="7.18.4")}catch{}function u1({basename:n,children:l,useTransitions:s,window:u}){let d=b.useRef();d.current==null&&(d.current=B0({window:u,v5Compat:!0}));let f=d.current,[m,x]=b.useState({action:f.action,location:f.location}),y=b.useCallback(v=>{s===!1?x(v):b.startTransition(()=>x(v))},[s]);return b.useLayoutEffect(()=>f.listen(y),[f,y]),b.createElement(Ub,{basename:n,children:l,location:m.location,navigationType:m.action,navigator:f,useTransitions:s})}var ua=b.forwardRef(function({onClick:l,discover:s="render",prefetch:u="none",relative:d,reloadDocument:f,replace:m,mask:x,state:y,target:v,to:w,preventScrollReset:N,viewTransition:U,defaultShouldRevalidate:Q,...E},H){let{basename:M,navigator:q,useTransitions:J}=b.useContext(ca),W=typeof w=="string"&&Ud.test(w),se=uy(w,M);w=se.to;let V=bb(w,{relative:d}),ke=za(),X=null;if(x){let Ke=Nu(x,[],ke.mask?ke.mask.pathname:"/",!0);M!=="/"&&(Ke.pathname=Ke.pathname==="/"?M:La([M,Ke.pathname])),X=q.createHref(Ke)}let[ge,Be,pt]=t1(u,E),St=d1(w,{replace:m,mask:x,state:y,target:v,preventScrollReset:N,relative:d,viewTransition:U,defaultShouldRevalidate:Q,useTransitions:J});function lt(Ke){l&&l(Ke),Ke.defaultPrevented||St(Ke)}let ft=!(se.isExternal||f),et=b.createElement("a",{...E,...pt,href:(ft?X:void 0)||se.absoluteURL||V,onClick:ft?lt:l,ref:s1(H,Be),target:v,"data-discover":!W&&s==="render"?"true":void 0});return ge&&!W?b.createElement(b.Fragment,null,et,b.createElement(a1,{page:V})):et});ua.displayName="Link";var su=b.forwardRef(function({"aria-current":l="page",caseSensitive:s=!1,className:u="",end:d=!1,style:f,to:m,viewTransition:x,children:y,...v},w){let N=zs(m,{relative:v.relative}),U=za(),Q=b.useContext(_u),{navigator:E,basename:H}=b.useContext(ca),M=Q!=null&&x1(N)&&x===!0,q=E.encodeLocation?E.encodeLocation(N).pathname:N.pathname,J=U.pathname,W=Q&&Q.navigation&&Q.navigation.location?Q.navigation.location.pathname:null;s||(J=J.toLowerCase(),W=W?W.toLowerCase():null,q=q.toLowerCase()),W&&H&&(W=Sn(W,H)||W);const se=q!=="/"&&q.endsWith("/")?q.length-1:q.length;let V=J===q||!d&&J.startsWith(q)&&J.charAt(se)==="/",ke=W!=null&&(W===q||!d&&W.startsWith(q)&&W.charAt(q.length)==="/"),X={isActive:V,isPending:ke,isTransitioning:M},ge=V?l:void 0,Be;typeof u=="function"?Be=u(X):Be=[u,V?"active":null,ke?"pending":null,M?"transitioning":null].filter(Boolean).join(" ");let pt=typeof f=="function"?f(X):f;return b.createElement(ua,{...v,"aria-current":ge,className:Be,ref:w,style:pt,to:m,viewTransition:x},typeof y=="function"?y(X):y)});su.displayName="NavLink";var c1=b.forwardRef(({discover:n="render",fetcherKey:l,navigate:s,reloadDocument:u,replace:d,state:f,method:m=lu,action:x,onSubmit:y,relative:v,preventScrollReset:w,viewTransition:N,defaultShouldRevalidate:U,...Q},E)=>{let{useTransitions:H}=b.useContext(ca),M=m1(),q=p1(x,{relative:v}),J=m.toLowerCase()==="get"?"get":"post",W=typeof x=="string"&&Ud.test(x),se=V=>{if(y&&y(V),V.defaultPrevented)return;V.preventDefault();let ke=V.nativeEvent.submitter,X=(ke==null?void 0:ke.getAttribute("formmethod"))||m,ge=()=>M(ke||V.currentTarget,{fetcherKey:l,method:X,navigate:s,replace:d,state:f,relative:v,preventScrollReset:w,viewTransition:N,defaultShouldRevalidate:U});H&&s!==!1?b.startTransition(()=>ge()):ge()};return b.createElement("form",{ref:E,method:J,action:q,onSubmit:u?y:se,...Q,"data-discover":!W&&n==="render"?"true":void 0})});c1.displayName="Form";function o1(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function by(n){let l=b.useContext(Ai);return rt(l,o1(n)),l}function d1(n,{target:l,replace:s,mask:u,state:d,preventScrollReset:f,relative:m,viewTransition:x,defaultShouldRevalidate:y,useTransitions:v}={}){let w=$d(),N=za(),U=zs(n,{relative:m});return b.useCallback(Q=>{if(Yb(Q,l)){Q.preventDefault();let E=s!==void 0?s:Al(N)===Al(U),H=()=>w(n,{replace:E,mask:u,state:d,preventScrollReset:f,relative:m,viewTransition:x,defaultShouldRevalidate:y});v?b.startTransition(()=>H()):H()}},[N,w,U,s,u,d,l,n,f,m,x,y,v])}function wy(n){ka(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=b.useRef(wd(n)),s=b.useRef(!1),u=za(),d=b.useMemo(()=>Vb(u.search,s.current?null:l.current),[u.search]),f=$d(),m=b.useCallback((x,y)=>{const v=wd(typeof x=="function"?x(new URLSearchParams(d)):x);s.current=!0,f("?"+v,y)},[f,d]);return[d,m]}var f1=0,h1=()=>`__${String(++f1)}__`;function m1(){let{router:n}=by("useSubmit"),{basename:l}=b.useContext(ca),s=Ob(),u=n.fetch,d=n.navigate;return b.useCallback(async(f,m={})=>{let{action:x,method:y,encType:v,formData:w,body:N}=Qb(f,l);if(m.navigate===!1){let U=m.fetcherKey||h1();await u(U,s,m.action||x,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:w,body:N,formMethod:m.method||y,formEncType:m.encType||v,flushSync:m.flushSync})}else await d(m.action||x,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:w,body:N,formMethod:m.method||y,formEncType:m.encType||v,replace:m.replace,state:m.state,fromRouteId:s,flushSync:m.flushSync,viewTransition:m.viewTransition})},[u,d,l,s])}function p1(n,{relative:l}={}){let{basename:s}=b.useContext(ca),u=b.useContext(Ua);rt(u,"useFormAction must be used inside a RouteContext");let[d]=u.matches.slice(-1),f={...zs(n||".",{relative:l})},m=za();if(n==null){f.search=m.search;let x=new URLSearchParams(f.search),y=x.getAll("index");if(y.some(w=>w==="")){x.delete("index"),y.filter(N=>N).forEach(N=>x.append("index",N));let w=x.toString();f.search=w?`?${w}`:""}}return(!n||n===".")&&d.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(f.pathname=f.pathname==="/"?s:La([s,f.pathname])),Al(f)}function x1(n,{relative:l}={}){let s=b.useContext(dy);rt(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=by("useViewTransitionState"),d=zs(n,{relative:l});if(!s.isTransitioning)return!1;let f=Sn(s.currentLocation.pathname,u)||s.currentLocation.pathname,m=Sn(s.nextLocation.pathname,u)||s.nextLocation.pathname;return cu(d.pathname,m)!=null||cu(d.pathname,f)!=null}var qe;(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(x=>typeof d[d[x]]!="number"),m={};for(const x of f)m[x]=d[x];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})(qe||(qe={}));var fx;(function(n){n.mergeShapes=(l,s)=>({...l,...s})})(fx||(fx={}));const le=qe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),el=n=>{switch(typeof n){case"undefined":return le.undefined;case"string":return le.string;case"number":return Number.isNaN(n)?le.nan:le.number;case"boolean":return le.boolean;case"function":return le.function;case"bigint":return le.bigint;case"symbol":return le.symbol;case"object":return Array.isArray(n)?le.array:n===null?le.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?le.promise:typeof Map<"u"&&n instanceof Map?le.map:typeof Set<"u"&&n instanceof Set?le.set:typeof Date<"u"&&n instanceof Date?le.date:le.object;default:return le.unknown}},I=qe.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 jn 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 x=u,y=0;for(;y<m.path.length;){const v=m.path[y];y===m.path.length-1?(x[v]=x[v]||{_errors:[]},x[v]._errors.push(s(m))):x[v]=x[v]||{_errors:[]},x=x[v],y++}}};return d(this),u}static assert(l){if(!(l instanceof jn))throw new Error(`Not a ZodError: ${l}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,qe.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()}}jn.create=n=>new jn(n);const Sd=(n,l)=>{let s;switch(n.code){case I.invalid_type:n.received===le.undefined?s="Required":s=`Expected ${n.expected}, received ${n.received}`;break;case I.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(n.expected,qe.jsonStringifyReplacer)}`;break;case I.unrecognized_keys:s=`Unrecognized key(s) in object: ${qe.joinValues(n.keys,", ")}`;break;case I.invalid_union:s="Invalid input";break;case I.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${qe.joinValues(n.options)}`;break;case I.invalid_enum_value:s=`Invalid enum value. Expected ${qe.joinValues(n.options)}, received '${n.received}'`;break;case I.invalid_arguments:s="Invalid function arguments";break;case I.invalid_return_type:s="Invalid function return type";break;case I.invalid_date:s="Invalid date";break;case I.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}"`:qe.assertNever(n.validation):n.validation!=="regex"?s=`Invalid ${n.validation}`:s="Invalid";break;case I.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 I.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 I.custom:s="Invalid input";break;case I.invalid_intersection_types:s="Intersection results could not be merged";break;case I.not_multiple_of:s=`Number must be a multiple of ${n.multipleOf}`;break;case I.not_finite:s="Number must be finite";break;default:s=l.defaultError,qe.assertNever(n)}return{message:s}};let y1=Sd;function v1(){return y1}const g1=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 x="";const y=u.filter(v=>!!v).slice().reverse();for(const v of y)x=v(m,{data:l,defaultError:x}).message;return{...d,path:f,message:x}};function ae(n,l){const s=v1(),u=g1({issueData:l,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,s,s===Sd?void 0:Sd].filter(d=>!!d)});n.common.issues.push(u)}class qt{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 pe;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 qt.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 pe;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 pe=Object.freeze({status:"aborted"}),As=n=>({status:"dirty",value:n}),Ea=n=>({status:"valid",value:n}),hx=n=>n.status==="aborted",mx=n=>n.status==="dirty",ji=n=>n.status==="valid",ou=n=>typeof Promise<"u"&&n instanceof Promise;var ue;(function(n){n.errToObj=l=>typeof l=="string"?{message:l}:l||{},n.toString=l=>typeof l=="string"?l:l==null?void 0:l.message})(ue||(ue={}));class Ka{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 px=(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 jn(n.common.issues);return this._error=s,this._error}}};function Ne(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,x)=>{const{message:y}=n;return m.code==="invalid_enum_value"?{message:y??x.defaultError}:typeof x.data>"u"?{message:y??u??x.defaultError}:m.code!=="invalid_type"?{message:x.defaultError}:{message:y??s??x.defaultError}},description:d}}class Oe{get description(){return this._def.description}_getType(l){return el(l.data)}_getOrReturnCtx(l,s){return s||{common:l.parent.common,data:l.data,parsedType:el(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}_processInputParams(l){return{status:new qt,ctx:{common:l.parent.common,data:l.data,parsedType:el(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}}_parseSync(l){const s=this._parse(l);if(ou(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:el(l)},d=this._parseSync({data:l,path:u.path,parent:u});return px(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:el(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:el(l)},d=this._parse({data:l,path:u.path,parent:u}),f=await(ou(d)?d:Promise.resolve(d));return px(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),x=()=>f.addIssue({code:I.custom,...u(d)});return typeof Promise<"u"&&m instanceof Promise?m.then(y=>y?!0:(x(),!1)):m?!0:(x(),!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 Tl({schema:this,typeName:xe.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 wn.create(this,this._def)}nullable(){return Ol.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ia.create(this)}promise(){return xu.create(this,this._def)}or(l){return fu.create([this,l],this._def)}and(l){return hu.create(this,l,this._def)}transform(l){return new Tl({...Ne(this._def),schema:this,typeName:xe.ZodEffects,effect:{type:"transform",transform:l}})}default(l){const s=typeof l=="function"?l:()=>l;return new yu({...Ne(this._def),innerType:this,defaultValue:s,typeName:xe.ZodDefault})}brand(){return new _y({typeName:xe.ZodBranded,type:this,...Ne(this._def)})}catch(l){const s=typeof l=="function"?l:()=>l;return new vu({...Ne(this._def),innerType:this,catchValue:s,typeName:xe.ZodCatch})}describe(l){const s=this.constructor;return new s({...this._def,description:l})}pipe(l){return Id.create(this,l)}readonly(){return gu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const b1=/^c[^\s-]{8,}$/i,w1=/^[0-9a-z]+$/,S1=/^[0-9A-HJKMNP-TV-Z]{26}$/i,j1=/^[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,N1=/^[a-z0-9_-]{21}$/i,_1=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,A1=/^[-+]?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)?)??$/,k1=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,E1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ad;const R1=/^(?:(?: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])$/,C1=/^(?:(?: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])$/,T1=/^(([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]))$/,O1=/^(([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])$/,M1=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,L1=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Sy="((\\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])))",D1=new RegExp(`^${Sy}$`);function jy(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 U1(n){return new RegExp(`^${jy(n)}$`)}function z1(n){let l=`${Sy}T${jy(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 B1(n,l){return!!((l==="v4"||!l)&&R1.test(n)||(l==="v6"||!l)&&T1.test(n))}function q1(n,l){if(!_1.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 H1(n,l){return!!((l==="v4"||!l)&&C1.test(n)||(l==="v6"||!l)&&O1.test(n))}class Qa extends Oe{_parse(l){if(this._def.coerce&&(l.data=String(l.data)),this._getType(l)!==le.string){const f=this._getOrReturnCtx(l);return ae(f,{code:I.invalid_type,expected:le.string,received:f.parsedType}),pe}const u=new qt;let d;for(const f of this._def.checks)if(f.kind==="min")l.data.length<f.value&&(d=this._getOrReturnCtx(l,d),ae(d,{code:I.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),ae(d,{code:I.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,x=l.data.length<f.value;(m||x)&&(d=this._getOrReturnCtx(l,d),m?ae(d,{code:I.too_big,maximum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}):x&&ae(d,{code:I.too_small,minimum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}),u.dirty())}else if(f.kind==="email")k1.test(l.data)||(d=this._getOrReturnCtx(l,d),ae(d,{validation:"email",code:I.invalid_string,message:f.message}),u.dirty());else if(f.kind==="emoji")ad||(ad=new RegExp(E1,"u")),ad.test(l.data)||(d=this._getOrReturnCtx(l,d),ae(d,{validation:"emoji",code:I.invalid_string,message:f.message}),u.dirty());else if(f.kind==="uuid")j1.test(l.data)||(d=this._getOrReturnCtx(l,d),ae(d,{validation:"uuid",code:I.invalid_string,message:f.message}),u.dirty());else if(f.kind==="nanoid")N1.test(l.data)||(d=this._getOrReturnCtx(l,d),ae(d,{validation:"nanoid",code:I.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid")b1.test(l.data)||(d=this._getOrReturnCtx(l,d),ae(d,{validation:"cuid",code:I.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid2")w1.test(l.data)||(d=this._getOrReturnCtx(l,d),ae(d,{validation:"cuid2",code:I.invalid_string,message:f.message}),u.dirty());else if(f.kind==="ulid")S1.test(l.data)||(d=this._getOrReturnCtx(l,d),ae(d,{validation:"ulid",code:I.invalid_string,message:f.message}),u.dirty());else if(f.kind==="url")try{new URL(l.data)}catch{d=this._getOrReturnCtx(l,d),ae(d,{validation:"url",code:I.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),ae(d,{validation:"regex",code:I.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),ae(d,{code:I.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),ae(d,{code:I.invalid_string,validation:{startsWith:f.value},message:f.message}),u.dirty()):f.kind==="endsWith"?l.data.endsWith(f.value)||(d=this._getOrReturnCtx(l,d),ae(d,{code:I.invalid_string,validation:{endsWith:f.value},message:f.message}),u.dirty()):f.kind==="datetime"?z1(f).test(l.data)||(d=this._getOrReturnCtx(l,d),ae(d,{code:I.invalid_string,validation:"datetime",message:f.message}),u.dirty()):f.kind==="date"?D1.test(l.data)||(d=this._getOrReturnCtx(l,d),ae(d,{code:I.invalid_string,validation:"date",message:f.message}),u.dirty()):f.kind==="time"?U1(f).test(l.data)||(d=this._getOrReturnCtx(l,d),ae(d,{code:I.invalid_string,validation:"time",message:f.message}),u.dirty()):f.kind==="duration"?A1.test(l.data)||(d=this._getOrReturnCtx(l,d),ae(d,{validation:"duration",code:I.invalid_string,message:f.message}),u.dirty()):f.kind==="ip"?B1(l.data,f.version)||(d=this._getOrReturnCtx(l,d),ae(d,{validation:"ip",code:I.invalid_string,message:f.message}),u.dirty()):f.kind==="jwt"?q1(l.data,f.alg)||(d=this._getOrReturnCtx(l,d),ae(d,{validation:"jwt",code:I.invalid_string,message:f.message}),u.dirty()):f.kind==="cidr"?H1(l.data,f.version)||(d=this._getOrReturnCtx(l,d),ae(d,{validation:"cidr",code:I.invalid_string,message:f.message}),u.dirty()):f.kind==="base64"?M1.test(l.data)||(d=this._getOrReturnCtx(l,d),ae(d,{validation:"base64",code:I.invalid_string,message:f.message}),u.dirty()):f.kind==="base64url"?L1.test(l.data)||(d=this._getOrReturnCtx(l,d),ae(d,{validation:"base64url",code:I.invalid_string,message:f.message}),u.dirty()):qe.assertNever(f);return{status:u.value,value:l.data}}_regex(l,s,u){return this.refinement(d=>l.test(d),{validation:s,code:I.invalid_string,...ue.errToObj(u)})}_addCheck(l){return new Qa({...this._def,checks:[...this._def.checks,l]})}email(l){return this._addCheck({kind:"email",...ue.errToObj(l)})}url(l){return this._addCheck({kind:"url",...ue.errToObj(l)})}emoji(l){return this._addCheck({kind:"emoji",...ue.errToObj(l)})}uuid(l){return this._addCheck({kind:"uuid",...ue.errToObj(l)})}nanoid(l){return this._addCheck({kind:"nanoid",...ue.errToObj(l)})}cuid(l){return this._addCheck({kind:"cuid",...ue.errToObj(l)})}cuid2(l){return this._addCheck({kind:"cuid2",...ue.errToObj(l)})}ulid(l){return this._addCheck({kind:"ulid",...ue.errToObj(l)})}base64(l){return this._addCheck({kind:"base64",...ue.errToObj(l)})}base64url(l){return this._addCheck({kind:"base64url",...ue.errToObj(l)})}jwt(l){return this._addCheck({kind:"jwt",...ue.errToObj(l)})}ip(l){return this._addCheck({kind:"ip",...ue.errToObj(l)})}cidr(l){return this._addCheck({kind:"cidr",...ue.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,...ue.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,...ue.errToObj(l==null?void 0:l.message)})}duration(l){return this._addCheck({kind:"duration",...ue.errToObj(l)})}regex(l,s){return this._addCheck({kind:"regex",regex:l,...ue.errToObj(s)})}includes(l,s){return this._addCheck({kind:"includes",value:l,position:s==null?void 0:s.position,...ue.errToObj(s==null?void 0:s.message)})}startsWith(l,s){return this._addCheck({kind:"startsWith",value:l,...ue.errToObj(s)})}endsWith(l,s){return this._addCheck({kind:"endsWith",value:l,...ue.errToObj(s)})}min(l,s){return this._addCheck({kind:"min",value:l,...ue.errToObj(s)})}max(l,s){return this._addCheck({kind:"max",value:l,...ue.errToObj(s)})}length(l,s){return this._addCheck({kind:"length",value:l,...ue.errToObj(s)})}nonempty(l){return this.min(1,ue.errToObj(l))}trim(){return new Qa({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Qa({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Qa({...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}}Qa.create=n=>new Qa({checks:[],typeName:xe.ZodString,coerce:(n==null?void 0:n.coerce)??!1,...Ne(n)});function $1(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 kl extends Oe{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)!==le.number){const f=this._getOrReturnCtx(l);return ae(f,{code:I.invalid_type,expected:le.number,received:f.parsedType}),pe}let u;const d=new qt;for(const f of this._def.checks)f.kind==="int"?qe.isInteger(l.data)||(u=this._getOrReturnCtx(l,u),ae(u,{code:I.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),ae(u,{code:I.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),ae(u,{code:I.too_big,maximum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),d.dirty()):f.kind==="multipleOf"?$1(l.data,f.value)!==0&&(u=this._getOrReturnCtx(l,u),ae(u,{code:I.not_multiple_of,multipleOf:f.value,message:f.message}),d.dirty()):f.kind==="finite"?Number.isFinite(l.data)||(u=this._getOrReturnCtx(l,u),ae(u,{code:I.not_finite,message:f.message}),d.dirty()):qe.assertNever(f);return{status:d.value,value:l.data}}gte(l,s){return this.setLimit("min",l,!0,ue.toString(s))}gt(l,s){return this.setLimit("min",l,!1,ue.toString(s))}lte(l,s){return this.setLimit("max",l,!0,ue.toString(s))}lt(l,s){return this.setLimit("max",l,!1,ue.toString(s))}setLimit(l,s,u,d){return new kl({...this._def,checks:[...this._def.checks,{kind:l,value:s,inclusive:u,message:ue.toString(d)}]})}_addCheck(l){return new kl({...this._def,checks:[...this._def.checks,l]})}int(l){return this._addCheck({kind:"int",message:ue.toString(l)})}positive(l){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ue.toString(l)})}negative(l){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ue.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ue.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ue.toString(l)})}multipleOf(l,s){return this._addCheck({kind:"multipleOf",value:l,message:ue.toString(s)})}finite(l){return this._addCheck({kind:"finite",message:ue.toString(l)})}safe(l){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ue.toString(l)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ue.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"&&qe.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)}}kl.create=n=>new kl({checks:[],typeName:xe.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...Ne(n)});class El extends Oe{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)!==le.bigint)return this._getInvalidInput(l);let u;const d=new qt;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),ae(u,{code:I.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),ae(u,{code:I.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),ae(u,{code:I.not_multiple_of,multipleOf:f.value,message:f.message}),d.dirty()):qe.assertNever(f);return{status:d.value,value:l.data}}_getInvalidInput(l){const s=this._getOrReturnCtx(l);return ae(s,{code:I.invalid_type,expected:le.bigint,received:s.parsedType}),pe}gte(l,s){return this.setLimit("min",l,!0,ue.toString(s))}gt(l,s){return this.setLimit("min",l,!1,ue.toString(s))}lte(l,s){return this.setLimit("max",l,!0,ue.toString(s))}lt(l,s){return this.setLimit("max",l,!1,ue.toString(s))}setLimit(l,s,u,d){return new El({...this._def,checks:[...this._def.checks,{kind:l,value:s,inclusive:u,message:ue.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:ue.toString(l)})}negative(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ue.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ue.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ue.toString(l)})}multipleOf(l,s){return this._addCheck({kind:"multipleOf",value:l,message:ue.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:xe.ZodBigInt,coerce:(n==null?void 0:n.coerce)??!1,...Ne(n)});class du extends Oe{_parse(l){if(this._def.coerce&&(l.data=!!l.data),this._getType(l)!==le.boolean){const u=this._getOrReturnCtx(l);return ae(u,{code:I.invalid_type,expected:le.boolean,received:u.parsedType}),pe}return Ea(l.data)}}du.create=n=>new du({typeName:xe.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...Ne(n)});class Ni extends Oe{_parse(l){if(this._def.coerce&&(l.data=new Date(l.data)),this._getType(l)!==le.date){const f=this._getOrReturnCtx(l);return ae(f,{code:I.invalid_type,expected:le.date,received:f.parsedType}),pe}if(Number.isNaN(l.data.getTime())){const f=this._getOrReturnCtx(l);return ae(f,{code:I.invalid_date}),pe}const u=new qt;let d;for(const f of this._def.checks)f.kind==="min"?l.data.getTime()<f.value&&(d=this._getOrReturnCtx(l,d),ae(d,{code:I.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),ae(d,{code:I.too_big,message:f.message,inclusive:!0,exact:!1,maximum:f.value,type:"date"}),u.dirty()):qe.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:ue.toString(s)})}max(l,s){return this._addCheck({kind:"max",value:l.getTime(),message:ue.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:xe.ZodDate,...Ne(n)});class xx extends Oe{_parse(l){if(this._getType(l)!==le.symbol){const u=this._getOrReturnCtx(l);return ae(u,{code:I.invalid_type,expected:le.symbol,received:u.parsedType}),pe}return Ea(l.data)}}xx.create=n=>new xx({typeName:xe.ZodSymbol,...Ne(n)});class jd extends Oe{_parse(l){if(this._getType(l)!==le.undefined){const u=this._getOrReturnCtx(l);return ae(u,{code:I.invalid_type,expected:le.undefined,received:u.parsedType}),pe}return Ea(l.data)}}jd.create=n=>new jd({typeName:xe.ZodUndefined,...Ne(n)});class Nd extends Oe{_parse(l){if(this._getType(l)!==le.null){const u=this._getOrReturnCtx(l);return ae(u,{code:I.invalid_type,expected:le.null,received:u.parsedType}),pe}return Ea(l.data)}}Nd.create=n=>new Nd({typeName:xe.ZodNull,...Ne(n)});class yx extends Oe{constructor(){super(...arguments),this._any=!0}_parse(l){return Ea(l.data)}}yx.create=n=>new yx({typeName:xe.ZodAny,...Ne(n)});class _d extends Oe{constructor(){super(...arguments),this._unknown=!0}_parse(l){return Ea(l.data)}}_d.create=n=>new _d({typeName:xe.ZodUnknown,...Ne(n)});class nl extends Oe{_parse(l){const s=this._getOrReturnCtx(l);return ae(s,{code:I.invalid_type,expected:le.never,received:s.parsedType}),pe}}nl.create=n=>new nl({typeName:xe.ZodNever,...Ne(n)});class vx extends Oe{_parse(l){if(this._getType(l)!==le.undefined){const u=this._getOrReturnCtx(l);return ae(u,{code:I.invalid_type,expected:le.void,received:u.parsedType}),pe}return Ea(l.data)}}vx.create=n=>new vx({typeName:xe.ZodVoid,...Ne(n)});class Ia extends Oe{_parse(l){const{ctx:s,status:u}=this._processInputParams(l),d=this._def;if(s.parsedType!==le.array)return ae(s,{code:I.invalid_type,expected:le.array,received:s.parsedType}),pe;if(d.exactLength!==null){const m=s.data.length>d.exactLength.value,x=s.data.length<d.exactLength.value;(m||x)&&(ae(s,{code:m?I.too_big:I.too_small,minimum:x?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&&(ae(s,{code:I.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&&(ae(s,{code:I.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,x)=>d.type._parseAsync(new Ka(s,m,s.path,x)))).then(m=>qt.mergeArray(u,m));const f=[...s.data].map((m,x)=>d.type._parseSync(new Ka(s,m,s.path,x)));return qt.mergeArray(u,f)}get element(){return this._def.type}min(l,s){return new Ia({...this._def,minLength:{value:l,message:ue.toString(s)}})}max(l,s){return new Ia({...this._def,maxLength:{value:l,message:ue.toString(s)}})}length(l,s){return new Ia({...this._def,exactLength:{value:l,message:ue.toString(s)}})}nonempty(l){return this.min(1,l)}}Ia.create=(n,l)=>new Ia({type:n,minLength:null,maxLength:null,exactLength:null,typeName:xe.ZodArray,...Ne(l)});function gi(n){if(n instanceof wt){const l={};for(const s in n.shape){const u=n.shape[s];l[s]=wn.create(gi(u))}return new wt({...n._def,shape:()=>l})}else return n instanceof Ia?new Ia({...n._def,type:gi(n.element)}):n instanceof wn?wn.create(gi(n.unwrap())):n instanceof Ol?Ol.create(gi(n.unwrap())):n instanceof Rl?Rl.create(n.items.map(l=>gi(l))):n}class wt extends Oe{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=qe.objectKeys(l);return this._cached={shape:l,keys:s},this._cached}_parse(l){if(this._getType(l)!==le.object){const v=this._getOrReturnCtx(l);return ae(v,{code:I.invalid_type,expected:le.object,received:v.parsedType}),pe}const{status:u,ctx:d}=this._processInputParams(l),{shape:f,keys:m}=this._getCached(),x=[];if(!(this._def.catchall instanceof nl&&this._def.unknownKeys==="strip"))for(const v in d.data)m.includes(v)||x.push(v);const y=[];for(const v of m){const w=f[v],N=d.data[v];y.push({key:{status:"valid",value:v},value:w._parse(new Ka(d,N,d.path,v)),alwaysSet:v in d.data})}if(this._def.catchall instanceof nl){const v=this._def.unknownKeys;if(v==="passthrough")for(const w of x)y.push({key:{status:"valid",value:w},value:{status:"valid",value:d.data[w]}});else if(v==="strict")x.length>0&&(ae(d,{code:I.unrecognized_keys,keys:x}),u.dirty());else if(v!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const v=this._def.catchall;for(const w of x){const N=d.data[w];y.push({key:{status:"valid",value:w},value:v._parse(new Ka(d,N,d.path,w)),alwaysSet:w in d.data})}}return d.common.async?Promise.resolve().then(async()=>{const v=[];for(const w of y){const N=await w.key,U=await w.value;v.push({key:N,value:U,alwaysSet:w.alwaysSet})}return v}).then(v=>qt.mergeObjectSync(u,v)):qt.mergeObjectSync(u,y)}get shape(){return this._def.shape()}strict(l){return ue.errToObj,new wt({...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:ue.errToObj(l).message??d}:{message:d}}}:{}})}strip(){return new wt({...this._def,unknownKeys:"strip"})}passthrough(){return new wt({...this._def,unknownKeys:"passthrough"})}extend(l){return new wt({...this._def,shape:()=>({...this._def.shape(),...l})})}merge(l){return new wt({unknownKeys:l._def.unknownKeys,catchall:l._def.catchall,shape:()=>({...this._def.shape(),...l._def.shape()}),typeName:xe.ZodObject})}setKey(l,s){return this.augment({[l]:s})}catchall(l){return new wt({...this._def,catchall:l})}pick(l){const s={};for(const u of qe.objectKeys(l))l[u]&&this.shape[u]&&(s[u]=this.shape[u]);return new wt({...this._def,shape:()=>s})}omit(l){const s={};for(const u of qe.objectKeys(this.shape))l[u]||(s[u]=this.shape[u]);return new wt({...this._def,shape:()=>s})}deepPartial(){return gi(this)}partial(l){const s={};for(const u of qe.objectKeys(this.shape)){const d=this.shape[u];l&&!l[u]?s[u]=d:s[u]=d.optional()}return new wt({...this._def,shape:()=>s})}required(l){const s={};for(const u of qe.objectKeys(this.shape))if(l&&!l[u])s[u]=this.shape[u];else{let f=this.shape[u];for(;f instanceof wn;)f=f._def.innerType;s[u]=f}return new wt({...this._def,shape:()=>s})}keyof(){return Ny(qe.objectKeys(this.shape))}}wt.create=(n,l)=>new wt({shape:()=>n,unknownKeys:"strip",catchall:nl.create(),typeName:xe.ZodObject,...Ne(l)});wt.strictCreate=(n,l)=>new wt({shape:()=>n,unknownKeys:"strict",catchall:nl.create(),typeName:xe.ZodObject,...Ne(l)});wt.lazycreate=(n,l)=>new wt({shape:n,unknownKeys:"strip",catchall:nl.create(),typeName:xe.ZodObject,...Ne(l)});class fu extends Oe{_parse(l){const{ctx:s}=this._processInputParams(l),u=this._def.options;function d(f){for(const x of f)if(x.result.status==="valid")return x.result;for(const x of f)if(x.result.status==="dirty")return s.common.issues.push(...x.ctx.common.issues),x.result;const m=f.map(x=>new jn(x.ctx.common.issues));return ae(s,{code:I.invalid_union,unionErrors:m}),pe}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 y of u){const v={...s,common:{...s.common,issues:[]},parent:null},w=y._parseSync({data:s.data,path:s.path,parent:v});if(w.status==="valid")return w;w.status==="dirty"&&!f&&(f={result:w,ctx:v}),v.common.issues.length&&m.push(v.common.issues)}if(f)return s.common.issues.push(...f.ctx.common.issues),f.result;const x=m.map(y=>new jn(y));return ae(s,{code:I.invalid_union,unionErrors:x}),pe}}get options(){return this._def.options}}fu.create=(n,l)=>new fu({options:n,typeName:xe.ZodUnion,...Ne(l)});const bn=n=>n instanceof kd?bn(n.schema):n instanceof Tl?bn(n.innerType()):n instanceof pu?[n.value]:n instanceof Cl?n.options:n instanceof Ed?qe.objectValues(n.enum):n instanceof yu?bn(n._def.innerType):n instanceof jd?[void 0]:n instanceof Nd?[null]:n instanceof wn?[void 0,...bn(n.unwrap())]:n instanceof Ol?[null,...bn(n.unwrap())]:n instanceof _y||n instanceof gu?bn(n.unwrap()):n instanceof vu?bn(n._def.innerType):[];class Xd extends Oe{_parse(l){const{ctx:s}=this._processInputParams(l);if(s.parsedType!==le.object)return ae(s,{code:I.invalid_type,expected:le.object,received:s.parsedType}),pe;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}):(ae(s,{code:I.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[u]}),pe)}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=bn(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 x of m){if(d.has(x))throw new Error(`Discriminator property ${String(l)} has duplicate value ${String(x)}`);d.set(x,f)}}return new Xd({typeName:xe.ZodDiscriminatedUnion,discriminator:l,options:s,optionsMap:d,...Ne(u)})}}function Ad(n,l){const s=el(n),u=el(l);if(n===l)return{valid:!0,data:n};if(s===le.object&&u===le.object){const d=qe.objectKeys(l),f=qe.objectKeys(n).filter(x=>d.indexOf(x)!==-1),m={...n,...l};for(const x of f){const y=Ad(n[x],l[x]);if(!y.valid)return{valid:!1};m[x]=y.data}return{valid:!0,data:m}}else if(s===le.array&&u===le.array){if(n.length!==l.length)return{valid:!1};const d=[];for(let f=0;f<n.length;f++){const m=n[f],x=l[f],y=Ad(m,x);if(!y.valid)return{valid:!1};d.push(y.data)}return{valid:!0,data:d}}else return s===le.date&&u===le.date&&+n==+l?{valid:!0,data:n}:{valid:!1}}class hu extends Oe{_parse(l){const{status:s,ctx:u}=this._processInputParams(l),d=(f,m)=>{if(hx(f)||hx(m))return pe;const x=Ad(f.value,m.value);return x.valid?((mx(f)||mx(m))&&s.dirty(),{status:s.value,value:x.data}):(ae(u,{code:I.invalid_intersection_types}),pe)};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}))}}hu.create=(n,l,s)=>new hu({left:n,right:l,typeName:xe.ZodIntersection,...Ne(s)});class Rl extends Oe{_parse(l){const{status:s,ctx:u}=this._processInputParams(l);if(u.parsedType!==le.array)return ae(u,{code:I.invalid_type,expected:le.array,received:u.parsedType}),pe;if(u.data.length<this._def.items.length)return ae(u,{code:I.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),pe;!this._def.rest&&u.data.length>this._def.items.length&&(ae(u,{code:I.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.dirty());const f=[...u.data].map((m,x)=>{const y=this._def.items[x]||this._def.rest;return y?y._parse(new Ka(u,m,u.path,x)):null}).filter(m=>!!m);return u.common.async?Promise.all(f).then(m=>qt.mergeArray(s,m)):qt.mergeArray(s,f)}get items(){return this._def.items}rest(l){return new Rl({...this._def,rest:l})}}Rl.create=(n,l)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Rl({items:n,typeName:xe.ZodTuple,rest:null,...Ne(l)})};class mu extends Oe{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!==le.object)return ae(u,{code:I.invalid_type,expected:le.object,received:u.parsedType}),pe;const d=[],f=this._def.keyType,m=this._def.valueType;for(const x in u.data)d.push({key:f._parse(new Ka(u,x,u.path,x)),value:m._parse(new Ka(u,u.data[x],u.path,x)),alwaysSet:x in u.data});return u.common.async?qt.mergeObjectAsync(s,d):qt.mergeObjectSync(s,d)}get element(){return this._def.valueType}static create(l,s,u){return s instanceof Oe?new mu({keyType:l,valueType:s,typeName:xe.ZodRecord,...Ne(u)}):new mu({keyType:Qa.create(),valueType:l,typeName:xe.ZodRecord,...Ne(s)})}}class gx extends Oe{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!==le.map)return ae(u,{code:I.invalid_type,expected:le.map,received:u.parsedType}),pe;const d=this._def.keyType,f=this._def.valueType,m=[...u.data.entries()].map(([x,y],v)=>({key:d._parse(new Ka(u,x,u.path,[v,"key"])),value:f._parse(new Ka(u,y,u.path,[v,"value"]))}));if(u.common.async){const x=new Map;return Promise.resolve().then(async()=>{for(const y of m){const v=await y.key,w=await y.value;if(v.status==="aborted"||w.status==="aborted")return pe;(v.status==="dirty"||w.status==="dirty")&&s.dirty(),x.set(v.value,w.value)}return{status:s.value,value:x}})}else{const x=new Map;for(const y of m){const v=y.key,w=y.value;if(v.status==="aborted"||w.status==="aborted")return pe;(v.status==="dirty"||w.status==="dirty")&&s.dirty(),x.set(v.value,w.value)}return{status:s.value,value:x}}}}gx.create=(n,l,s)=>new gx({valueType:l,keyType:n,typeName:xe.ZodMap,...Ne(s)});class Os extends Oe{_parse(l){const{status:s,ctx:u}=this._processInputParams(l);if(u.parsedType!==le.set)return ae(u,{code:I.invalid_type,expected:le.set,received:u.parsedType}),pe;const d=this._def;d.minSize!==null&&u.data.size<d.minSize.value&&(ae(u,{code:I.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&&(ae(u,{code:I.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(y){const v=new Set;for(const w of y){if(w.status==="aborted")return pe;w.status==="dirty"&&s.dirty(),v.add(w.value)}return{status:s.value,value:v}}const x=[...u.data.values()].map((y,v)=>f._parse(new Ka(u,y,u.path,v)));return u.common.async?Promise.all(x).then(y=>m(y)):m(x)}min(l,s){return new Os({...this._def,minSize:{value:l,message:ue.toString(s)}})}max(l,s){return new Os({...this._def,maxSize:{value:l,message:ue.toString(s)}})}size(l,s){return this.min(l,s).max(l,s)}nonempty(l){return this.min(1,l)}}Os.create=(n,l)=>new Os({valueType:n,minSize:null,maxSize:null,typeName:xe.ZodSet,...Ne(l)});class kd extends Oe{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})}}kd.create=(n,l)=>new kd({getter:n,typeName:xe.ZodLazy,...Ne(l)});class pu extends Oe{_parse(l){if(l.data!==this._def.value){const s=this._getOrReturnCtx(l);return ae(s,{received:s.data,code:I.invalid_literal,expected:this._def.value}),pe}return{status:"valid",value:l.data}}get value(){return this._def.value}}pu.create=(n,l)=>new pu({value:n,typeName:xe.ZodLiteral,...Ne(l)});function Ny(n,l){return new Cl({values:n,typeName:xe.ZodEnum,...Ne(l)})}class Cl extends Oe{_parse(l){if(typeof l.data!="string"){const s=this._getOrReturnCtx(l),u=this._def.values;return ae(s,{expected:qe.joinValues(u),received:s.parsedType,code:I.invalid_type}),pe}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 ae(s,{received:s.data,code:I.invalid_enum_value,options:u}),pe}return Ea(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 Cl.create(l,{...this._def,...s})}exclude(l,s=this._def){return Cl.create(this.options.filter(u=>!l.includes(u)),{...this._def,...s})}}Cl.create=Ny;class Ed extends Oe{_parse(l){const s=qe.getValidEnumValues(this._def.values),u=this._getOrReturnCtx(l);if(u.parsedType!==le.string&&u.parsedType!==le.number){const d=qe.objectValues(s);return ae(u,{expected:qe.joinValues(d),received:u.parsedType,code:I.invalid_type}),pe}if(this._cache||(this._cache=new Set(qe.getValidEnumValues(this._def.values))),!this._cache.has(l.data)){const d=qe.objectValues(s);return ae(u,{received:u.data,code:I.invalid_enum_value,options:d}),pe}return Ea(l.data)}get enum(){return this._def.values}}Ed.create=(n,l)=>new Ed({values:n,typeName:xe.ZodNativeEnum,...Ne(l)});class xu extends Oe{unwrap(){return this._def.type}_parse(l){const{ctx:s}=this._processInputParams(l);if(s.parsedType!==le.promise&&s.common.async===!1)return ae(s,{code:I.invalid_type,expected:le.promise,received:s.parsedType}),pe;const u=s.parsedType===le.promise?s.data:Promise.resolve(s.data);return Ea(u.then(d=>this._def.type.parseAsync(d,{path:s.path,errorMap:s.common.contextualErrorMap})))}}xu.create=(n,l)=>new xu({type:n,typeName:xe.ZodPromise,...Ne(l)});class Tl extends Oe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===xe.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=>{ae(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 x=>{if(s.value==="aborted")return pe;const y=await this._def.schema._parseAsync({data:x,path:u.path,parent:u});return y.status==="aborted"?pe:y.status==="dirty"||s.value==="dirty"?As(y.value):y});{if(s.value==="aborted")return pe;const x=this._def.schema._parseSync({data:m,path:u.path,parent:u});return x.status==="aborted"?pe:x.status==="dirty"||s.value==="dirty"?As(x.value):x}}if(d.type==="refinement"){const m=x=>{const y=d.refinement(x,f);if(u.common.async)return Promise.resolve(y);if(y instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return x};if(u.common.async===!1){const x=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});return x.status==="aborted"?pe:(x.status==="dirty"&&s.dirty(),m(x.value),{status:s.value,value:x.value})}else return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(x=>x.status==="aborted"?pe:(x.status==="dirty"&&s.dirty(),m(x.value).then(()=>({status:s.value,value:x.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 pe;const x=d.transform(m.value,f);if(x instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:s.value,value:x}}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(x=>({status:s.value,value:x})):pe);qe.assertNever(d)}}Tl.create=(n,l,s)=>new Tl({schema:n,typeName:xe.ZodEffects,effect:l,...Ne(s)});Tl.createWithPreprocess=(n,l,s)=>new Tl({schema:l,effect:{type:"preprocess",transform:n},typeName:xe.ZodEffects,...Ne(s)});class wn extends Oe{_parse(l){return this._getType(l)===le.undefined?Ea(void 0):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}wn.create=(n,l)=>new wn({innerType:n,typeName:xe.ZodOptional,...Ne(l)});class Ol extends Oe{_parse(l){return this._getType(l)===le.null?Ea(null):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}Ol.create=(n,l)=>new Ol({innerType:n,typeName:xe.ZodNullable,...Ne(l)});class yu extends Oe{_parse(l){const{ctx:s}=this._processInputParams(l);let u=s.data;return s.parsedType===le.undefined&&(u=this._def.defaultValue()),this._def.innerType._parse({data:u,path:s.path,parent:s})}removeDefault(){return this._def.innerType}}yu.create=(n,l)=>new yu({innerType:n,typeName:xe.ZodDefault,defaultValue:typeof l.default=="function"?l.default:()=>l.default,...Ne(l)});class vu extends Oe{_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 ou(d)?d.then(f=>({status:"valid",value:f.status==="valid"?f.value:this._def.catchValue({get error(){return new jn(u.common.issues)},input:u.data})})):{status:"valid",value:d.status==="valid"?d.value:this._def.catchValue({get error(){return new jn(u.common.issues)},input:u.data})}}removeCatch(){return this._def.innerType}}vu.create=(n,l)=>new vu({innerType:n,typeName:xe.ZodCatch,catchValue:typeof l.catch=="function"?l.catch:()=>l.catch,...Ne(l)});class bx extends Oe{_parse(l){if(this._getType(l)!==le.nan){const u=this._getOrReturnCtx(l);return ae(u,{code:I.invalid_type,expected:le.nan,received:u.parsedType}),pe}return{status:"valid",value:l.data}}}bx.create=n=>new bx({typeName:xe.ZodNaN,...Ne(n)});class _y extends Oe{_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 Id extends Oe{_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"?pe:f.status==="dirty"?(s.dirty(),As(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"?pe: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 Id({in:l,out:s,typeName:xe.ZodPipeline})}}class gu extends Oe{_parse(l){const s=this._def.innerType._parse(l),u=d=>(ji(d)&&(d.value=Object.freeze(d.value)),d);return ou(s)?s.then(d=>u(d)):u(s)}unwrap(){return this._def.innerType}}gu.create=(n,l)=>new gu({innerType:n,typeName:xe.ZodReadonly,...Ne(l)});var xe;(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"})(xe||(xe={}));const p=Qa.create,k=kl.create;El.create;const De=du.create;Ni.create;const Ay=_d.create;nl.create;const ne=Ia.create,B=wt.create,Y1=fu.create,ky=Xd.create;hu.create;Rl.create;const Ms=mu.create,_a=pu.create,he=Cl.create;xu.create;wn.create;Ol.create;const wx={string:(n=>Qa.create({...n,coerce:!0})),number:(n=>kl.create({...n,coerce:!0})),boolean:(n=>du.create({...n,coerce:!0})),bigint:(n=>El.create({...n,coerce:!0})),date:(n=>Ni.create({...n,coerce:!0}))},V1=pe,Z1=p().regex(/^github\.com\/[^/]+\/[^/]+$/,"Expected github.com/<owner>/<repo>"),G1=/^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?$/;function Q1(n){const l=n.trim();return l?!!(l.startsWith("/")||l.startsWith("~")||l.startsWith(".")||/^[A-Za-z]:[\\/]/.test(l)||l.startsWith("\\\\")):!1}function Kd(n){const l=n.trim();if(!l)throw new Error("Repository is required");if(Q1(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=G1.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 x;try{x=new URL(m)}catch{throw new Error(`Unrecognized GitHub repository reference: ${n}`)}if(!/^([^.]+\.)?github\.com$/i.test(x.hostname))throw new Error(`Only github.com repositories are supported (got host ${x.hostname})`);const y=x.pathname.replace(/^\/+|\/+$/g,"").split("/");if(y.length<2||!y[0]||!y[1])throw new Error(`Unrecognized GitHub repository reference: ${n}`);s=y[0],u=y[1].replace(/\.git$/i,"")}if(!s||!u||s.includes("..")||u.includes(".."))throw new Error(`Unrecognized GitHub repository reference: ${n}`);const f=Z1.parse(`github.com/${s}/${u}`);return{owner:s,repo:u,identity:f,cloneUrl:`https://github.com/${s}/${u}.git`}}const Ey=p().min(1).transform((n,l)=>{try{return Kd(n).identity}catch(s){return l.addIssue({code:I.custom,message:s.message}),V1}}),Ry="repo:",X1=he(["resolved","unresolved","conflict","invalid"]),I1=B({status:X1,repository:p().optional(),sourceLabel:p().optional(),labels:ne(p()).optional(),error:p().optional()});function K1(n){return n?n.filter(l=>l.toLowerCase().startsWith(Ry)):[]}const J1=100,F1=B({label:p(),repository:p()});B({mappings:ne(F1).max(J1+1)});function Cy(n){const l=K1(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(Ry.length).trim();if(!u)return{status:"invalid",labels:[s],error:"Repository label has no value"};try{return{status:"resolved",repository:Kd(u).identity,sourceLabel:s,labels:[s]}}catch(d){return{status:"invalid",labels:[s],error:d.message}}}const Ht=he(["claude_code","cursor_local","codex_local","muse_code"]),Da=B({maxTurns:k().positive().nullable().optional(),maxBudgetUsd:k().positive().nullable().optional()}),Ty=B({plan:Da.optional(),execute:Da.optional(),reflect:Da.optional()});function ru(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 W1(n){return!n||n.maxTurns==null&&n.maxBudgetUsd==null?null:JSON.stringify(n)}const Jd=he(["developer","reviewer","legacy"]),P1=he(["queued","running","done","failed","timed_out","cancelled"]);B({id:p().uuid(),issueId:p().uuid(),role:Jd,round:k().int().min(1),agentId:p().uuid().nullable(),runtime:Ht.nullable(),model:p().nullable(),budgetJson:p().nullable(),worktreePath:p().nullable(),inputSha:p().nullable(),status:P1,sessionRef:p().nullable(),logPath:p().nullable(),exitCode:k().int().nullable(),errorJson:p().nullable(),metadataJson:p().nullable(),profileSnapshotJson:p().nullable(),processPid:k().int().nullable(),processOwner:p().nullable(),processStartedAt:p().nullable(),deckCorrelationId:p().uuid().nullable(),createdAt:p(),startedAt:p().nullable(),heartbeatAt:p().nullable(),completedAt:p().nullable(),updatedAt:p()});B({issueId:p().uuid(),role:Jd,round:k().int().min(1),agentId:p().uuid().nullable(),runtime:Ht.nullable(),model:p().nullable().optional(),budgetJson:p().nullable().optional(),inputSha:p().nullable().optional(),metadataJson:p().nullable().optional(),profileSnapshotJson:p().nullable().optional()});const ew=B({worktreeWrite:De(),publishReview:De(),outboundMutation:De(),resolveHumanAction:De()}),Oy=B({worktreeWrite:De().optional(),outboundMutation:De().optional()}).strict(),Eu=he(["low","medium","high"]);B({version:_a(1),agentId:p().nullable(),role:Jd,runtime:Ht.nullable(),model:p().nullable(),effort:Eu.nullable().default(null),budgetJson:p().nullable(),permissionPolicy:ew,deckId:p().nullable(),purpose:p().nullable(),capturedAt:p()});const My="auto",tw="muse-spark-1.3-contributor",aw=B({code:he(["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()}),nw=B({id:p().uuid(),name:p(),runtime:Ht,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:Eu.nullable(),defaultBudgetJson:p().nullable(),purpose:p().nullable(),playbookIdsJson:p().nullable(),externalMemoryRefsJson:p().nullable(),permissionPolicyJson:p().nullable(),isBuiltin:De(),createdAt:p(),updatedAt:p()}),Ly=nw.extend({healthy:De(),issues:ne(aw)});B({name:p().min(1),runtime:Ht,deckId:p().uuid(),defaultModel:p().nullable().optional(),defaultEffort:Eu.nullable().optional(),defaultBudget:Da.nullable().optional(),purpose:p().nullable().optional(),permissionPolicy:Oy.nullable().optional()});B({name:p().min(1).optional(),runtime:Ht.optional(),deckId:p().uuid().nullable().optional(),defaultModel:p().nullable().optional(),defaultEffort:Eu.nullable().optional(),defaultBudget:Da.nullable().optional(),purpose:p().nullable().optional(),permissionPolicy:Oy.nullable().optional()});B({agents:ne(Ly),issueCount:k()});function Sx(n){return n.defaultModel??n.defaultExecuteModel??n.defaultPlanModel??null}function lw(n){const l=ru(n.defaultBudgetJson)??ru(n.defaultExecuteBudgetJson)??ru(n.defaultPlanBudgetJson);return W1(l)}const iw=he(["slack_message","email","service_tool_call"]),sw=B({target:p().min(1).max(120),body:p().min(1).max(4e3)}),rw=B({serviceName:p().min(1).max(120),toolName:p().min(1).max(120),arguments:Ms(Ay())}),uw=B({actionType:iw,summary:sw,toolCall:rw}),cw=he(["pending","sent","rejected"]);B({draft:uw,status:cw,sentAt:p().optional(),rejectedAt:p().optional(),bodyMismatch:De().optional(),deliveryAttempts:k().int().min(0).default(0)});B({draftArtifactId:p().uuid(),sentAt:p(),toolResult:Ms(Ay()),permalink:p().url().optional()});const ow=B({failure_summary:p().min(1),user_feedback_excerpt:p().min(1),corrected_output_hint:p().optional()}),dw=ky("op",[B({op:_a("add_item"),section:p().min(1),text:p().min(1)}),B({op:_a("amend_item"),section:p().min(1),anchor:p().min(1),text:p().min(1)}),B({op:_a("remove_item"),section:p().min(1),anchor:p().min(1)}),B({op:_a("set_triggers"),triggers:ne(p())}),B({op:_a("rewrite_body"),text:p()})]);B({rationale:p().min(1),ops:ne(dw).min(1),evidence:ow.optional()});const fw="v1",Dy=he(["feature","bug fix","refactor","investigation","split child"]);Dy.options;const hw=B({text:p(),evidence:p().nullable()}),mw=B({version:_a(fw),executionMode:Dy,nonGoals:ne(p()),exitPredicate:p(),onePrStoppingPoint:p(),acceptanceCriteria:ne(hw)}),Uy={executionMode:"Builder execution mode",nonGoals:"Non-goals",exitPredicate:"Exit predicate",onePrStoppingPoint:"One-PR stopping point",acceptanceCriteria:"Acceptance criteria"},pw=Object.keys(Uy);function xw(n){return n.trim().toLowerCase().replace(/[-_]+/g," ").replace(/\s+/g," ").trim()}Object.fromEntries(pw.map(n=>[xw(Uy[n]),n]));const yw=he(["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"]),vw=he(["human","developer","reviewer","system"]),zy=he(["manual","linear","agent"]),gw=B({id:p().uuid(),source:zy,externalId:p().nullable(),externalLabel:p().nullable(),externalUrl:p().nullable(),title:p(),description:p().nullable(),acceptanceCriteria:p().nullable(),executionContract:mw.nullable().optional(),repo:p(),baseBranch:p(),status:yw,currentOwner:vw,currentIntent:p().nullable(),developerAgentId:p().uuid().nullable(),reviewerAgentId:p().uuid().nullable(),maxReviewRounds:k().int().min(1),currentRound:k().int().min(1),maxInfraAttempts:k().int().min(0),infraAttempts:k().int().min(0),maxCiAttempts:k().int().min(0),ciAttempts:k().int().min(0),branch:p().nullable(),baseSha:p().nullable(),headSha:p().nullable(),prNumber:k().int().nullable(),prUrl:p().nullable(),autoMerge:De(),createdAt:p(),updatedAt:p()});B({title:p().min(1),description:p().optional(),acceptanceCriteria:p().optional(),repo:Ey,baseBranch:p().min(1).default("main"),developerAgentId:p().uuid(),reviewerAgentId:p().uuid(),maxReviewRounds:k().int().min(1).default(3),maxInfraAttempts:k().int().min(0).default(3),autoMerge:De().default(!1),source:zy.default("manual"),externalId:p().optional(),externalLabel:p().optional(),externalUrl:p().optional(),enqueue:De().default(!0)});B({title:p().min(1).optional(),description:p().nullable().optional(),acceptanceCriteria:p().nullable().optional(),repo:Ey.optional(),baseBranch:p().min(1).optional(),developerAgentId:p().uuid().optional(),reviewerAgentId:p().uuid().optional(),maxReviewRounds:k().int().min(1).optional(),maxInfraAttempts:k().int().min(0).optional(),autoMerge:De().optional()});const jx={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(jx).filter(n=>jx[n].length===0);const bw=he(["enqueued","already_queued","not_queued"]);gw.extend({created:De(),queue:bw,priorPasses:k().int().min(0)});B({id:p(),issueId:p().nullable(),workerSessionId:p().nullable(),kind:p(),contentJson:p().nullable(),blobPath:p().nullable(),author:he(["human","agent","system"]),createdAt:p()});const ww=he(["authentication_configuration","provider_capacity_rate_limit","agent_cli_crash","tool_test_timeout","muse_no_progress","coordinator_crash","validation_failure","publish_git_failure","agent_deck_unavailable","host_sleep_liveness","unknown"]),Sw=he(["task","infrastructure","unknown"]),jw=he(["high","medium","low"]),Nw=he(["outcome_kind","session_error","spawn_log","workflow_event","recovery"]),_w=he(["exact","inferred"]),Rd=B({code:ww,domain:Sw,primary:De(),confidence:jw,evidenceSource:Nw,occurredAt:p().nullable(),eventCursor:k().int().nullable(),rawReason:p(),sessionId:p().nullable(),logPath:p().nullable(),eventId:p().nullable(),eventType:p().nullable(),quality:_w}),Aw=he(["commit","verification_receipt","branch_pushed"]),kw=he(["sampler","salvage","session_end"]),Fd=he(["worktree","commit","verification_receipt","publish_only"]);B({kind:Aw,observedSha:p().nullable(),observedAt:p(),origin:kw.nullable(),inputSha:p().nullable(),samplingPrecisionMs:k().int().nullable(),branch:p().nullable()});B({kinds:ne(Fd),retryReason:p().nullable()});const Ew=he(["done","closed","migrated"]);B({id:p().uuid(),issueId:p().uuid(),workflowVersion:p(),startedAt:p(),completedAt:p().nullable(),outcome:Ew.nullable()});const Rw=he(["issue.created","issue.reassigned","workflow.started","worker.started","worker.completed","worker.failed","worker.deferred","worktree.ready","worktree.deps_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","auto_merge.conflict_sync","auto_merge.conflict_repair_queued","base.probe","base.advanced","operator_verification.waived","legacy.imported"]);B({id:p().uuid(),issueId:p().uuid(),workflowInstanceId:p().uuid().nullable(),workerSessionId:p().uuid().nullable(),type:Rw,actorType:he(["human","developer","reviewer","system"]),actorRef:p().nullable(),stage:p(),round:k().int().nullable(),payloadJson:p().nullable(),artifactRef:p().nullable(),idempotencyKey:p().nullable(),causationEventId:p().uuid().nullable(),ts:p()});const Cw=he(["product_scope_decision","policy_escalation","attempts_exhausted","final_review","deck_interaction_required","reflection_interaction_required","outbound_delivery_interaction_required","muse_capability","operator_verification"]),Tw=he(["open","resolved"]);B({id:p().uuid(),issueId:p().uuid().nullable(),runId:p().uuid().nullable(),workflowInstanceId:p().uuid().nullable(),actionType:Cw,reason:p(),question:p(),evidenceJson:p().nullable(),responseOptionsJson:p().nullable(),continuationPreviewJson:p().nullable(),requestId:p().nullable(),status:Tw,resolutionJson:p().nullable(),resolvedBy:p().nullable(),requestedAt:p(),resolvedAt:p().nullable()});function Ru(n){if(!n)return null;try{return JSON.parse(n)}catch{return null}}function Ow(n){const l=Ru(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 Wd(n){return Ru(n.evidenceJson)??{}}function Cu(n){const s=Wd(n).pushDivergence;return!s||typeof s!="object"?null:s}function Mw(n){const s=Wd(n).worktreeBlocker;return!!s&&typeof s=="object"&&typeof s.fingerprint=="string"}function Lw(n){return Wd(n).mergeFailure===!0}function By(n){const l=Ru(n.continuationPreviewJson);return typeof(l==null?void 0:l.resumeRole)=="string"?l.resumeRole:null}const Dw=/worktree|unpushed|uncommitted|dirty|preserved|non-fast-forward|diverged|already used by|recovery:|force-with-lease/i,Uw=/could not be pushed|non-fast-forward|rejected.*push|push.*rejected/i,zw=/uncommitted|dirty worktree|has uncommitted changes/i;function qy(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 Bw(n){const s=qy(n).head.replace(/\s+/g," ").trim(),u=s.match(/^(.+?[.!?])(\s|$)/);return(u?u[1]:s).trim()}const qw=/(?:~|\/(?:[^/\s\\:"'*?<>|][^/\s\\:"'*?<>|]*))+(?:\/[^/\s\\:"'*?<>|]+)*/g;function Hw(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(qw)){const x=m[0];/^\/\d+(\.\d+)*$/.test(x)||!x.includes("/")&&!x.startsWith("~")||u(x)}const d=Cu(n);return typeof(d==null?void 0:d.worktreePath)=="string"&&d.worktreePath&&u(d.worktreePath),l}function Nx(n){return n.length>12?n.slice(0,12):n}function $w(n){const l=[],s=Cu(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=By(n);return u&&l.push(`Continuation: resumes as ${u}`),l}function Yw(n){return n==="close"||n==="reject"||n==="abort"}function Wn(n){return n.length===0?null:n.some(l=>l.choice==="push_with_lease")?"push_with_lease":(n.find(l=>!Yw(l.choice))??n[0]).choice}function Vw(n){if(n.actionType!=="policy_escalation")return"other";if(Lw(n))return"merge-failure";const l=Cu(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 Uw.test(s)?"unpushed":By(n)==="reviewer"?"reviewer-retry":zw.test(s)?"dirty-worktree":Mw(n)||/already used by worktree/i.test(s)||/worktree/i.test(s)&&/Recovery:/.test(s)?"worktree-conflict":"ordinary-escalation"}const Zw="Resume safely";function Hy(n){const l=Vw(n),s=Ow(n),{commands:u}=qy(n.reason),d=Hw(n),f=$w(n),m=(()=>{const y=Ru(n.evidenceJson);return y==null?null:JSON.stringify(y,null,2)})(),x={question:n.question,reason:n.reason,commands:u,paths:d,factLines:f,evidencePretty:m};switch(l){case"diverged-push":{const y=Cu(n),v=y&&typeof y.branch=="string"&&typeof y.localSha=="string"&&typeof y.remoteSha=="string"?` (origin/${y.branch}: local ${Nx(y.localSha)} against remote ${Nx(y.remoteSha)})`:"";return{kind:l,title:"Publish these finished commits with a pinned lease?",context:`Your branch diverged from the remote — confirm the pinned commits${v} under Details, then choose Push with lease.`,safeResume:!1,displayOptions:s,primaryChoice:Wn(s),details:x}}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:Wn(s),details:x};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:Wn(s),details:x};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:Wn(s),details:x};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:Wn(s),details:x};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:Wn(s),details:x};case"ordinary-escalation":{const y=Bw(n.reason),v=!Dw.test(`${n.reason}
|
|
63
|
+
${n.question}`),w=v?s.map(N=>N.choice==="resume"&&N.label==="Resume development"?{...N,label:Zw}:N):s;return{kind:l,title:"Development is parked — resume or close?",context:y?`${y} Choose ${v?"Resume safely":"Resume"} to continue, or Close to stop.`:null,safeResume:v,displayOptions:w,primaryChoice:Wn(w),details:x}}case"other":default:return{kind:"other",title:n.question,context:null,safeResume:!1,displayOptions:s,primaryChoice:Wn(s),details:x}}}const Gw=he(["blocking","non_blocking"]),Qw=he(["open","resolved","recurring","superseded"]);B({id:p().uuid(),issueId:p().uuid(),fingerprint:p(),severity:Gw,title:p(),rationale:p(),evidenceRef:p().nullable(),file:p().nullable(),line:k().int().nullable(),status:Qw,firstRound:k().int().min(1),lastRound:k().int().min(1)});B({id:p().uuid(),issueId:p().uuid(),workerSessionId:p().uuid(),role:he(["developer","reviewer","legacy"]),runtime:p().nullable(),tokensIn:k().int().nullable(),tokensOut:k().int().nullable(),costUsd:k().nullable(),durationMs:k().int().nullable(),ts:p(),model:p().nullable().optional()});const Xw=B({available:_a(!0)}),Iw=B({available:_a(!1),until:p(),reason:p()});ky("available",[Xw,Iw]);const Pd=he(["supported_protocol","observed_event","experimental_api","unavailable"]),Tu=he(["unsupported","missing","expired","unparsable","stale"]),Kw=he(["five_hour","weekly"]),Jw=B({windowKey:p().min(1),providerBucket:p().min(1),durationMinutes:k().int().positive().nullable(),displayLabel:p().min(1),usedValue:k().nullable(),usedUnit:p().nullable(),remainingPercent:k().min(0).max(100).nullable(),resetAt:p().nullable(),observedAt:p(),freshUntil:p().nullable(),expiresAt:p().nullable(),source:Pd,unavailableReason:Tu.nullable(),criticalRole:Kw.nullable()}),Fw=B({runtime:Ht,windows:ne(Jw),unavailableReason:Tu.nullable()});B({runtimes:ne(Fw),generatedAt:p()});B({configured:De(),cycleStart:p().nullable(),cycleEnd:p().nullable(),spendValue:k().nullable(),spendUnit:p().nullable(),hardLimitValue:k().nullable(),hardLimitUnit:p().nullable(),memberCount:k().nullable(),memberLimitOverrideCount:k().nullable(),usagePeriodStart:p().nullable(),usagePeriodEnd:p().nullable(),usageSpendValue:k().nullable(),usageSpendUnit:p().nullable(),source:Pd,unavailableReason:Tu.nullable(),observedAt:p().nullable(),generatedAt:p()});B({enabled:De(),configured:De(),cycleLabel:p().nullable(),cycleStart:p().nullable(),cycleEnd:p().nullable(),usageValue:k().nullable(),usageUnit:p().nullable(),remainingPercent:k().min(0).max(100).nullable(),source:Pd,unavailableReason:Tu.nullable(),observedAt:p().nullable(),generatedAt:p()});function $y(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 Ww=he(["queued","admitted","removed"]),Pw=B({id:p().uuid(),issueId:p().uuid(),position:k().int(),enqueuedAt:p(),state:Ww,waitReason:p().nullable(),waitReasonAt:p().nullable()});Pw.extend({title:p().optional(),issueStatus:p().optional()});B({issueId:p().uuid()});const e2=Y1([_a("top"),_a("bottom"),B({before:p().uuid()}).strict(),B({after:p().uuid()}).strict()]);B({to:e2});const t2=2;B({maxActiveIssues:k().int().min(1).max(t2)});B({active:k().int().min(0),waiting:k().int().min(0),limit:k().int().min(0),maxActiveIssues:k().int().min(1),ceiling:k().int().min(0),options:ne(k().int().min(1)),overCap:De()});const ra=he(["exact","inferred","unavailable"]),Ou=B({quality:ra,reasons:ne(p())}),Yy=he(["queue_wait","coordinator_setup","agent_process","coordinator_validation_publish","coordinator_work"]),Cs=B({phase:Yy,startMs:k().int().nullable(),endMs:k().int().nullable(),durationMs:k().int().nullable(),quality:ra,reasons:ne(p()),sessionId:p().nullable(),startCursor:k().int().nullable(),endCursor:k().int().nullable()}),a2=Ou.extend({phase:Yy,durationMs:k().int().nullable(),rawCount:k().int(),known:k().int(),total:k().int()}),Vy=B({kind:he(["admission_dependency_wait","runtime_health_preflight","unexplained_silence","human_wait"]),startMs:k().int().nullable(),endMs:k().int().nullable(),durationMs:k().int().nullable(),quality:ra,reasons:ne(p()),category:p().nullable(),sessionId:p().nullable()}),It=Ou.extend({value:k().nullable(),known:k().int(),total:k().int()}),Xa=Ou.extend({p50:k().nullable(),p95:k().nullable(),n:k().int()}),n2=B({sessionId:p(),role:p(),runtime:p().nullable(),model:p().nullable(),status:p(),round:k().int(),publishOnly:De(),setup:Cs,agentProcess:Cs,validationPublish:Cs,spawnEnvelopeMs:k().int().nullable(),spawnEnvelopeQuality:ra,spawnEnvelopeReasons:ne(p()),failureCauses:ne(Rd),reuseKinds:ne(Fd).optional(),silence:ne(Vy),silenceQuality:ra,silenceReasons:ne(p()),tokensIn:k().int().nullable(),tokensOut:k().int().nullable(),costUsd:k().nullable(),usageDurationMs:k().int().nullable(),usageQuality:ra,usageReasons:ne(p())}),l2=B({kind:p().nullable(),observedSha:p().nullable(),msSinceWorkflowStart:k().int().nullable(),quality:ra,reasons:ne(p())}),i2=B({attempts:k().int(),retries:k().int(),cold:k().int(),reused:k().int(),unknown:k().int(),publishOnly:k().int(),reuseRate:k().nullable(),preservedKinds:ne(Fd).optional(),quality:ra,reasons:ne(p())}),s2=B({rounds:k().int(),verdicts:k().int(),changeRequests:k().int(),changeRequestRate:k().nullable(),quality:ra,reasons:ne(p())});B({issueId:p(),elapsed:Cs,rawIntervals:ne(Cs),unionedDurations:ne(a2),exclusiveTotalMs:k().int().nullable(),exclusiveTotalQuality:ra,exclusiveTotalReasons:ne(p()),nested:ne(Vy),attempts:ne(n2),primaryFailure:Rd.nullable(),primaryFailureQuality:ra,primaryFailureReasons:ne(p()),consequenceCauses:ne(Rd),waste:B({failedAttempts:k().int(),publishOnlyAttempts:k().int(),runtimeMs:It,tokensIn:It,tokensOut:It,costUsd:It}),firstCheckpoint:l2,retry:i2,reviewer:s2,humanWaitMs:k().int().nullable(),humanWaitQuality:ra,humanWaitReasons:ne(p()),interventionCount:k().int(),coverage:B({duration:It,tokens:It,cost:It})});B({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:k().int().min(1).max(200).default(50),offset:k().int().min(0).default(0)});const nd=Ou.extend({numerator:k().int(),denominator:k().int(),rate:k().nullable()}),ld=B({key:p(),attempts:k().int(),successes:k().int(),successRate:k().nullable(),retries:k().int(),retryRate:k().nullable(),wallTimeMs:Xa});B({window:B({from:p(),to:p(),defaultApplied:De()}),pagination:B({limit:k().int(),offset:k().int(),totalIssues:k().int()}),issueIds:ne(p()),phaseWallTime:Ms(p(),Xa),attemptSuccess:nd,issueSuccess:nd,primaryFailures:ne(B({code:p(),count:k().int(),rate:k().nullable()})),primaryFailureDenominator:k().int(),waste:B({failedAttempts:k().int(),runtimeMs:It,tokensIn:It,tokensOut:It,costUsd:It}),checkpointLatencyMs:Xa,retryReuse:nd,reviewer:B({rounds:k().int(),verdicts:k().int(),changeRequests:k().int(),changeRequestRate:k().nullable(),quality:ra,reasons:ne(p())}),humanInterventions:B({totalActions:k().int(),issuesWithIntervention:k().int(),humanWaitMs:Xa}),byRole:ne(ld),byRuntime:ne(ld),byModel:ne(ld),coverage:B({duration:It,tokens:It,cost:It})});const r2=100,Zy=25,Gy=5,u2=he(["developer","reviewer","legacy"]),c2=he(["authentication_configuration","provider_capacity_rate_limit","agent_cli_crash","tool_test_timeout","muse_no_progress","coordinator_crash","validation_failure","publish_git_failure","agent_deck_unavailable","host_sleep_liveness","unknown"]),o2=he(["task","infrastructure","unknown"]);B({from:p().optional(),to:p().optional(),repo:p().optional(),role:u2.optional(),runtime:p().optional(),model:p().optional(),status:p().optional(),page:wx.number().int().min(1).default(1),limit:wx.number().int().min(1).max(r2).default(Zy)});const Qy=he(["exact","inferred","unavailable"]),wa=B({sum:k().nullable(),known:k().int().min(0),total:k().int().min(0),quality:Qy,reasons:ne(p())}),id=B({key:p(),issues:k().int().min(0),attempts:k().int().min(0),issueSuccess:k().nullable(),issueSuccessDenominator:k().int().min(0),attemptSuccess:k().nullable(),attemptSuccessDenominator:k().int().min(0),sessionWallMs:Xa,spawnEnvelopeMs:Xa,retryRate:k().nullable(),tokensIn:wa,tokensOut:wa,costUsd:wa,durationMs:wa,failedDurationMs:wa,failedTokensIn:wa,failedTokensOut:wa,failedCostUsd:wa}),d2=B({code:c2,domain:o2,count:k().int().min(0),share:k().nullable(),issueIds:ne(p()),issueTotal:k().int().min(0)}),f2=B({id:p(),title:p(),status:p(),repo:p(),attempts:k().int().min(0),updatedAt:p()}),h2=B({window:B({from:p(),to:p()}),filters:B({repo:p().nullable(),role:p().nullable(),runtime:p().nullable(),model:p().nullable(),status:ne(p())}),summary:B({issues:k().int().min(0),closedIssues:k().int().min(0),issueSuccess:k().nullable(),attempts:k().int().min(0),terminalAttempts:k().int().min(0),attemptSuccess:k().nullable(),retryRate:k().nullable(),retryExtraAttempts:k().int().min(0),reuseRate:k().nullable(),reuseDenominator:k().int().min(0),humanWaitMs:k().int().min(0),humanWaitQuality:Qy,interventions:k().int().min(0),avgReviewerRounds:k().nullable(),reviewedIssues:k().int().min(0),changeRequestRate:k().nullable(),sessionWallMs:Xa,spawnEnvelopeMs:Xa,checkpointMs:Xa,phaseWallMs:ne(B({phase:p(),stat:Xa})),failedDurationMs:wa,failedTokensIn:wa,failedTokensOut:wa,failedCostUsd:wa}),byRole:ne(id),byRuntime:ne(id),byModel:ne(id),failures:ne(d2),issues:ne(f2),pagination:B({page:k().int().min(1),limit:k().int().min(1),total:k().int().min(0),totalPages:k().int().min(0)}),meta:B({generatedAt:p(),partial:De(),partialReasons:ne(p())})});function Xy(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(Zy)||l.set(s,d))}return l.sort(),l.toString()}function Pn(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 Iy(n){return n<Gy?`n=${n} (sparse)`:`n=${n}`}function Cd(n){return n<Gy}function _x(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)} (${Iy(n.n)})`}function ks(n){return`$${n.toFixed(2)}`}function Xe(n){return n.toLocaleString("en-US")}function m2(n){if(!Number.isFinite(n))return Xe(n);const l=Math.abs(n);if(l<1e3)return Xe(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 Xt(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 Mu(n){return n===null||!Number.isFinite(n)?"Unavailable":`${(n*100).toFixed(1)}%`}const p2=he(["queued","plan_pending","plan_approved","running","review","done","failed","cancelled"]),Ky=he(["code","communication","email","research","content","other"]),x2=he(["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","playbook_use_receipt","deck_feedback_signal","reflect_status","linear_sync","send_receipt","result_qa"]),Lu=he(["plan","execute","reflect","qa"]),Jy=he(["retry","approve"]);B({patchId:p(),playbookId:p().optional(),playbookTitle:p().optional(),rationale:p().optional(),status:_a("proposed"),trigger:Jy,dashboardUrl:p().optional()});B({status:he(["pending","completed","failed","skipped"]),trigger:Jy,error:p().optional()});const y2=B({type:he(["system","human","context","thinking","assistant","tool","rate_limit","result"]),text:p(),toolName:p().optional()});B({phase:Lu,runtime:Ht,entries:ne(y2)});const v2=B({phase:Lu,runtime:Ht,totalCostUsd:k().optional(),inputTokens:k().optional(),outputTokens:k().optional(),cacheReadTokens:k().optional(),cacheWriteTokens:k().optional(),durationMs:k().optional(),model:p().optional(),numTurns:k().optional(),maxTurns:k().optional(),maxBudgetUsd:k().optional()}),g2=B({label:p(),usage:v2,maxTurns:k().optional(),maxBudgetUsd:k().optional()});B({lines:ne(g2),total:B({totalCostUsd:k(),inputTokens:k(),outputTokens:k(),durationMs:k(),numTurns:k()})});B({phase:Lu,runtime:Ht,sessionId:p()});B({phase:Lu,exitCode:k(),resultText:p().optional(),isError:De().optional(),blocker:B({summary:p().optional()}).optional()});B({path:p(),title:p(),markdown:p()});B({markdown:p(),sessionId:p().optional()});const b2=he(["manual","linear"]);B({id:p(),title:p(),description:p().optional(),url:p().optional()});const gn=B({id:p().uuid(),source:b2,externalId:p().nullable(),externalLabel:p().nullable(),taskCategory:Ky,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:Ht.nullable(),planModel:p().nullable(),executeModel:p().nullable(),status:p2,lineageId:p().uuid().nullable(),acceptanceCriteria:p().nullable(),approvalGatesJson:p().nullable(),budgetJson:p().nullable(),createdAt:p(),updatedAt:p()});B({id:p().uuid(),runId:p().uuid(),kind:x2,contentJson:p().nullable(),blobPath:p().nullable(),author:he(["human","agent","system"]),createdAt:p()});B({id:p().uuid(),runId:p().uuid(),type:p(),payloadJson:p().nullable(),ts:p()});B({title:p().min(1),description:p().optional(),taskCategory:Ky.default("other"),repo:p().optional(),artifactWorkspace:p().optional(),acceptanceCriteria:p().optional(),status:he(["queued","plan_pending","plan_approved"]).default("plan_pending"),agentId:p().uuid(),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),budget:Ty.optional()});B({runtime:Ht,deckId:p().uuid().optional(),playbookId:p().optional(),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),budget:Ty.optional()});B({planMarkdown:p(),approve:De().default(!1),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),planBudget:Da.nullable().optional(),executeBudget:Da.nullable().optional()});B({runtime:Ht.optional(),deckId:p().uuid().optional(),playbookId:p().optional(),executeModel:p().nullable().optional(),executeBudget:Da.nullable().optional()});B({feedback:p().min(1),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),executeBudget:Da.nullable().optional()});B({outboundBody:p().min(1).max(4e3).optional()});const w2=B({id:p(),identifier:p(),title:p(),description:p().optional(),url:p(),state:p().optional(),labels:ne(p()).optional(),teamId:p().optional(),repoResolution:I1.optional()});B({stateFilter:ne(p()),teamId:p().nullable(),assigneeMe:De(),syncEnabled:De()});const Td=B({stateFilter:ne(p().min(1)).min(1),teamId:p().nullable(),assigneeMe:De()});Td.extend({persisted:Td,envOverrides:B({stateFilter:De(),teamId:De()})});Td.partial();const S2=B({id:p(),name:p(),key:p().optional()}),j2=B({name:p(),type:p().optional(),teamId:p().optional()});B({teams:ne(S2),workflowStates:ne(j2),viewer:B({id:p(),name:p(),email:p().optional()}).nullable()});B({candidates:ne(w2),hasMore:De()});B({host:p(),port:k().int().min(1).max(65535),envOverride:De()});const N2=he(["UNAUTHORIZED","DECK_UNAVAILABLE"]);B({connected:De(),apiUrl:p(),mcpUrl:p(),deckCount:k().optional(),envOverride:De(),error:p().optional(),deckAccessError:N2.optional(),deckAccessErrorMessage:p().optional()});B({agentId:p().uuid().optional(),autoAgent:De().optional(),planModel:p().nullable().optional()}).refine(n=>n.agentId!==void 0||n.autoAgent===!0,{message:"Provide agentId or autoAgent: true"});B({planModel:p().nullable().optional(),planBudget:Da.nullable().optional(),feedback:p().optional(),editedMarkdown:p().optional()});const _2=B({id:p(),label:p()});B({runtime:Ht,models:ne(_2),source:he(["live","fallback"])});B({planReviewCount:k(),resultReviewCount:k(),maxConcurrent:k(),planningActiveRuns:ne(gn),planningQueuedRuns:ne(gn),runningRuns:ne(gn),waitingExecution:ne(gn),resultReviewRuns:ne(gn),recentDone:ne(gn),awaitingPlanReview:ne(gn),awaitingAnswerRuns:ne(gn),openQuestionCounts:Ms(p(),k()),pendingSendCounts:Ms(p(),k()),sentRunIds:ne(p()).optional(),autoApprovedRunIds:ne(p()),runs:ne(gn),agentDeckOnline:De(),agents:ne(Ly),agentIssueCount:k()});const Fy=new Map,sd=new Map;function Od(n){return Fy.get(n)??null}function A2(n,l){l.models.length!==0&&Fy.set(n,l)}function k2(n,l){const s=Od(n);if(s)return Promise.resolve(s);const u=sd.get(n);if(u)return u;const d=l().then(f=>(A2(n,f),f)).finally(()=>sd.delete(n));return sd.set(n,d),d}const Ae="";async function Ie(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 E2(){const n=await fetch(`${Ae}/api/intake/linear`);if(!n.ok)throw new Error(await n.text());const l=await n.json();return{candidates:l.candidates??[],hasMore:!!l.hasMore}}async function R2(n){const l=await fetch(`${Ae}/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 C2(){const n=await fetch(`${Ae}/api/intake/linear/config`);if(!n.ok)throw new Error(await Ie(n));return n.json()}async function T2(n){const l=await fetch(`${Ae}/api/intake/linear/config`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw new Error(await Ie(l));return l.json()}async function O2(){const n=await fetch(`${Ae}/api/intake/linear/metadata`);if(!n.ok)throw new Error(await Ie(n));return n.json()}async function M2(){const n=await fetch(`${Ae}/api/settings/repository-mappings`);if(!n.ok)throw new Error(await Ie(n));return(await n.json()).mappings??[]}async function L2(n){const l=await fetch(`${Ae}/api/settings/repository-mappings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({mappings:n})});if(!l.ok)throw new Error(await Ie(l));return(await l.json()).mappings??[]}async function D2(){const n=await fetch(`${Ae}/api/agents`);if(!n.ok)throw new Error("Failed to fetch agents");return n.json()}async function U2(n){const l=await fetch(`${Ae}/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 z2(n,l){const s=await fetch(`${Ae}/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 B2(n){const l=await fetch(`${Ae}/api/agents/${n}`,{method:"DELETE"});if(!l.ok)throw new Error(await l.text())}async function q2(n,l){return k2(n,async()=>{const u=await fetch(`${Ae}/api/runtimes/${n}/models`);if(!u.ok)throw new Error(await u.text());return u.json()})}async function Wy(){const n=await fetch(`${Ae}/api/runtime-capacity`);if(!n.ok)throw new Error(await n.text());return n.json()}async function Py(){const n=await fetch(`${Ae}/api/agent-deck/status`);if(!n.ok)throw new Error(await n.text());return n.json()}async function H2(){try{const n=await fetch(`${Ae}/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 Ax(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(`${Ae}/api/issues?${l.toString()}`);if(!u.ok)throw new Error(await Ie(u));const d=await u.json();return typeof d.total=="number"?d.total:0}async function $2(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(`${Ae}/api/issues?${l.toString()}`);if(!s.ok)throw new Error(await Ie(s));return s.json()}async function Y2(){const n=await fetch(`${Ae}/api/issues/recent-repos`);if(!n.ok)throw new Error(await Ie(n));return(await n.json()).repos??[]}async function ev(n){const l=await fetch(`${Ae}/api/issues/${n}`);if(!l.ok)throw new Error(await Ie(l));return l.json()}async function V2(n){const l=await fetch(`${Ae}/api/issues/${n}/execution-analysis`);if(!l.ok)throw new Error(await Ie(l));return l.json()}async function Z2(n){const l=await fetch(`${Ae}/api/issues/${n}/evidence`);if(!l.ok)throw new Error(await Ie(l));return l.json()}async function G2(n,l){const s=await fetch(`${Ae}/api/issues/${n}/artifacts/${l}/trace`);if(!s.ok)throw new Error(await Ie(s));return s.json()}async function Q2(n){const l=await fetch(`${Ae}/api/issues`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw new Error(await Ie(l));return l.json()}async function uu(n,l){const s=await fetch(`${Ae}/api/issues/${n}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(l)});if(!s.ok)throw new Error(await Ie(s));return s.json()}async function tv(n){const l=await fetch(`${Ae}/api/issues/${n}/start`,{method:"POST"});if(!l.ok)throw new Error(await Ie(l));return l.json()}async function av(n){const l=await fetch(`${Ae}/api/issues/${n}/execute`,{method:"POST"});if(!l.ok)throw new Error(await Ie(l));return l.json()}async function X2(n,l="web"){const s=await fetch(`${Ae}/api/issues/${n}/abort`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({resolvedBy:l})});if(!s.ok)throw new Error(await Ie(s));return s.json()}async function I2(n){const l=await fetch(`${Ae}/api/issues/${n}/park`,{method:"POST"});if(!l.ok)throw new Error(await Ie(l));return l.json()}async function K2(n,l="web"){const s=await fetch(`${Ae}/api/issues/${n}/close`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({closedBy:l})});if(!s.ok)throw new Error(await Ie(s));return s.json()}async function J2(n){const l=await fetch(`${Ae}/api/queue`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({issueId:n})});if(!l.ok)throw new Error(await Ie(l));return l.json()}async function nv(n){const l=await fetch(`${Ae}/api/queue/${n}`,{method:"DELETE"});if(!l.ok)throw new Error(await Ie(l));return l.json()}async function Pr(n,l){const s=await fetch(`${Ae}/api/queue/${n}/move`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({to:l})});if(!s.ok)throw new Error(await Ie(s));return s.json()}async function rd(){const n=await fetch(`${Ae}/api/queue`);if(!n.ok)throw new Error(await Ie(n));return n.json()}async function F2(){const n=await fetch(`${Ae}/api/queue/status`);if(!n.ok)throw new Error(await Ie(n));return n.json()}async function W2(n){const l=await fetch(`${Ae}/api/queue/settings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({maxActiveIssues:n})});if(!l.ok)throw new Error(await Ie(l));return l.json()}async function P2(n,l){const s=await fetch(`${Ae}/api/issues/${n}/guidance`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({markdown:l})});if(!s.ok)throw new Error(await Ie(s));return s.json()}async function eS(n){const l=Xy(n),s=await fetch(`${Ae}/api/execution-report${l?`?${l}`:""}`);if(!s.ok)throw new Error(await Ie(s));const u=await s.json(),d=h2.safeParse(u);if(!d.success)throw new Error(`Unexpected report shape: ${d.error.message}`);return d.data}async function tS(){const n=await fetch(`${Ae}/api/human-actions`);if(!n.ok)throw new Error(await Ie(n));return n.json()}async function lv(n,l,s,u){const d=await fetch(`${Ae}/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 Ie(d));return d.json()}function aS(n){return n||My}function nS({runtime:n,label:l,value:s,onChange:u,defaultModelId:d,disabled:f,compact:m}){const x=Od(n),[y,v]=b.useState((x==null?void 0:x.models)??[]),[w,N]=b.useState((x==null?void 0:x.source)??"fallback"),[U,Q]=b.useState(!x);b.useEffect(()=>{const M=Od(n);if(M){v(M.models),N(M.source),Q(!1);return}Q(!0),q2(n).then(q=>{v(q.models),N(q.source)}).catch(()=>v([])).finally(()=>Q(!1))},[n]);const E=b.useMemo(()=>{var M,q;if(n==="cursor_local"){const J=aS(d);return((M=y.find(W=>W.id===J))==null?void 0:M.label)??"Auto (subscription pool)"}return d?((q=y.find(J=>J.id===d))==null?void 0:q.label)??d:"runtime default"},[n,d,y]),H=n==="cursor_local"?U?"Loading models…":`Agent default (${E})`:U?"Loading models…":`Default (${E})`;return r.jsxs("label",{className:"block space-y-1",children:[r.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:l}),r.jsxs("select",{className:"field text-sm",disabled:f||U,value:s,onChange:M=>u(M.target.value),children:[r.jsx("option",{value:"",children:H}),y.map(M=>r.jsx("option",{value:M.id,children:M.label},M.id))]}),n==="cursor_local"&&!U&&!m&&r.jsx("p",{className:"text-xs text-white/40",children:"Auto and Composer use your Cursor subscription pool. Other models draw API credits."}),w==="fallback"&&y.length>0&&!U&&n==="cursor_local"&&!m&&r.jsx("p",{className:"text-xs text-white/40",children:"Run cursor-agent login to load the full model list."})]})}function kx(n){const l={};return n.allowWorktreeWrite||(l.worktreeWrite=!1),Object.keys(l).length?l:null}function lS(n){let l={};try{n!=null&&n.trim()&&(l=JSON.parse(n))}catch{l={}}return{allowWorktreeWrite:l.worktreeWrite!==!1}}function Ex({value:n,onChange:l,agentDeckOnline:s,disabled:u}){const[d,f]=b.useState([]),[m,x]=b.useState(null);b.useEffect(()=>{H2().then(w=>{w.ok?(f(w.decks),x(null)):(f([]),x(w.message))})},[]);const y=w=>l({...n,...w}),v=n.runtime==="codex_local"||n.runtime==="claude_code";return r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"font-ui-display text-base uppercase tracking-wide text-[#92E4DD]",children:"Agent"}),r.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Runtime (required)"}),r.jsxs("select",{className:"field",disabled:u,value:n.runtime,onChange:w=>{const N=w.target.value;y({runtime:N,defaultModel:N==="cursor_local"?My:N==="muse_code"?tw:"",defaultEffort:N==="cursor_local"||N==="muse_code"?"":n.defaultEffort})},children:[r.jsx("option",{value:"claude_code",children:"Claude Code (claude -p)"}),r.jsx("option",{value:"cursor_local",children:"Cursor local (cursor-agent -p)"}),r.jsx("option",{value:"codex_local",children:"Codex local (codex exec)"}),r.jsx("option",{value:"muse_code",children:"Muse Code (muse exec) — developer only, trial"})]}),r.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Agent Deck (required)"}),r.jsxs("select",{className:"field",disabled:u||!s||!!m,value:n.deckId,onChange:w=>y({deckId:w.target.value}),required:!0,children:[r.jsx("option",{value:"",disabled:!!n.deckId,children:s?m?"Agent Deck error — see below":"Select a deck…":"Agent Deck offline"}),d.map(w=>r.jsxs("option",{value:w.id,children:["◆ ",w.name]},w.id))]}),s&&m&&r.jsx("p",{className:"text-xs text-amber-300/90",children:m}),r.jsxs("div",{className:"pt-2 mt-2 border-t border-white/10 space-y-2",children:[r.jsx("div",{className:"font-ui-display text-xs uppercase tracking-wide text-white/40",children:"Issue-centric session defaults"}),r.jsxs("label",{className:"block space-y-1",children:[r.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Purpose (optional)"}),r.jsx("input",{className:"field text-sm",placeholder:"e.g. backend refactors on the payments service",disabled:u,value:n.purpose,onChange:w=>y({purpose:w.target.value})})]}),r.jsxs("div",{className:`grid gap-2 ${v?"grid-cols-2":"grid-cols-1"}`,children:[r.jsx(nS,{runtime:n.runtime,label:"Default model",value:n.defaultModel,onChange:w=>y({defaultModel:w}),disabled:u,compact:!0}),v&&r.jsxs("label",{className:"space-y-1",children:[r.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Reasoning effort"}),r.jsxs("select",{className:"field text-sm",disabled:u,value:n.defaultEffort,onChange:w=>y({defaultEffort:w.target.value}),children:[r.jsx("option",{value:"",children:"Runtime default"}),r.jsx("option",{value:"low",children:"Low"}),r.jsx("option",{value:"medium",children:"Medium"}),r.jsx("option",{value:"high",children:"High"})]})]})]}),n.runtime==="muse_code"&&r.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"&&r.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]`)."}),r.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[r.jsxs("label",{className:"space-y-1",children:[r.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Max turns"}),r.jsx("input",{className:"field text-sm",type:"number",min:1,placeholder:"none",disabled:u,value:n.defaultBudget.maxTurns,onChange:w=>y({defaultBudget:{...n.defaultBudget,maxTurns:w.target.value}})})]}),r.jsxs("label",{className:"space-y-1",children:[r.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Max $ / session"}),r.jsx("input",{className:"field text-sm",type:"number",min:0,step:"0.1",placeholder:"none",disabled:u,value:n.defaultBudget.maxBudgetUsd,onChange:w=>y({defaultBudget:{...n.defaultBudget,maxBudgetUsd:w.target.value}})})]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Developer capabilities"}),r.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-sm text-white/70",children:r.jsxs("label",{className:"flex items-center gap-1.5",children:[r.jsx("input",{type:"checkbox",disabled:u,checked:n.allowWorktreeWrite,onChange:w=>y({allowWorktreeWrite:w.target.checked})}),"Write files"]})}),r.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 Aa(n){return n==="claude_code"?"Claude":n==="cursor_local"?"Cursor":n==="codex_local"?"Codex":n==="muse_code"?"Muse Code":"No agent"}function iS(){return{maxTurns:"",maxBudgetUsd:""}}function Rx(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 sS(n){const l=ru(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 _s({children:n,className:l="",title:s}){return r.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 eu(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 rS(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 vi({ok:n}){return r.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 uS({agents:n,agentDeckOnline:l}){const[s,u]=b.useState(null);b.useEffect(()=>{Py().then(w=>u(w.mcpUrl)).catch(()=>u(null))},[l]);const d=eu(n,"claude_code"),f=eu(n,"cursor_local"),m=eu(n,"codex_local"),x=n.some(w=>w.runtime==="muse_code")?eu(n,"muse_code"):null,y=rS(n),v=n.flatMap(w=>w.issues).find(w=>w.code==="mcp_not_registered");return r.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-x-4 gap-y-1.5 text-xs text-white/45",children:[r.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Connections"}),r.jsxs("span",{className:"inline-flex items-center gap-1.5",title:d.detail,children:[r.jsx(vi,{ok:d.ok}),r.jsx("span",{className:d.ok?"text-white/55":"text-amber-200/90",children:"Claude"})]}),r.jsxs("span",{className:"inline-flex items-center gap-1.5",title:f.detail,children:[r.jsx(vi,{ok:f.ok}),r.jsx("span",{className:f.ok?"text-white/55":"text-amber-200/90",children:"Cursor"})]}),r.jsxs("span",{className:"inline-flex items-center gap-1.5",title:m.detail,children:[r.jsx(vi,{ok:m.ok}),r.jsx("span",{className:m.ok?"text-white/55":"text-amber-200/90",children:"Codex"})]}),x&&r.jsxs("span",{className:"inline-flex items-center gap-1.5",title:x.detail,children:[r.jsx(vi,{ok:x.ok}),r.jsx("span",{className:x.ok?"text-white/55":"text-amber-200/90",children:"Muse Code"})]}),r.jsxs("span",{className:"inline-flex items-center gap-1.5",title:y.detail,children:[r.jsx(vi,{ok:y.ok}),r.jsx("span",{className:y.ok?"text-white/55":"text-amber-200/90",children:"GitHub"})]}),r.jsxs("span",{className:"inline-flex items-center gap-1.5",title:(v==null?void 0:v.message)??(s?`MCP ${s}`:"Agent Deck optional"),children:[r.jsx(vi,{ok:l&&!v}),r.jsxs("span",{className:l&&!v?"text-[#92E4DD]/80":v?"text-amber-200/90":"text-white/35",children:["Agent Deck MCP",l?v?" (setup needed)":"":" (optional)"]})]})]})}function iv(n){return n<10?"critical":n<30?"warning":"normal"}const ef={unsupported:"not reported by provider",missing:"no data yet",expired:"expired",unparsable:"provider data unparsable",stale:"stale"},cS={critical:"font-bold text-red-400",warning:"text-yellow-400",normal:"font-medium"},oS=new Set(["claude_code","codex_local","muse_code"]),dS="billing_cycle",fS="1M",hS="5H",mS="1W";function Cx(n,l,s,u){if(n!==null)return sv(n,l,null);const d=s??"missing";return{key:u,label:l,kind:"unknown",reason:d,title:`${l}: N/A (${ef[d]})`}}function sv(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 (${ef[u]})`}}function pS(n){if(n.runtime==="cursor_local"){const l=n.windows.find(s=>s.windowKey===dS)??null;return l===null?[]:[sv(l,fS,"current billing cycle")]}if(oS.has(n.runtime)){const l=n.windows.find(u=>u.criticalRole==="five_hour")??null,s=n.windows.find(u=>u.criticalRole==="weekly")??null;return[Cx(l,hS,n.unavailableReason,"missing-5H"),Cx(s,mS,n.unavailableReason,"missing-1W")]}return[]}function xS({row:n}){const l=n.kind==="known";return r.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:[r.jsx("span",{className:"text-white/40",children:n.label}),n.kind==="known"?(()=>{const s=iv(n.rawRemaining);return r.jsxs("span",{"data-severity":s,className:cS[s],children:[n.remaining,"%"]})})():r.jsx("span",{children:"N/A"})]})}function yS({data:n}){return n.runtimes.length===0?null:r.jsxs("div",{"data-testid":"runtime-capacity-strip",className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs",children:[r.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Runtime capacity"}),n.runtimes.map(l=>{const s=pS(l);return r.jsxs("span",{"data-testid":`capacity-entry-${l.runtime}`,className:"inline-flex min-w-0 flex-wrap items-center gap-1.5",children:[r.jsx("span",{className:"shrink-0 whitespace-nowrap font-medium text-white/55",children:Aa(l.runtime)}),s.length===0?r.jsx("span",{"data-testid":`capacity-entry-${l.runtime}-na`,"data-reason":l.unavailableReason??"missing",title:`N/A (${ef[l.unavailableReason??"missing"]})`,className:"whitespace-nowrap text-white/35",children:"N/A"}):s.map(u=>r.jsx(xS,{row:u},u.key))]},l.runtime)})]})}function vS({refreshTick:n}){const[l,s]=b.useState(null);return b.useEffect(()=>{let u=!1;return Wy().then(d=>{u||s(d)}).catch(()=>{u||s(null)}),()=>{u=!0}},[n]),l?r.jsx(yS,{data:l}):null}const gS="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",bS="/assets/codex-YZSpL-SB.png",wS="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",SS="/assets/muse-CtdcC6ve.svg";function Du({src:n,className:l}){return r.jsx("span",{className:`inline-flex items-center justify-center rounded-lg bg-white/[0.04] ${l??"h-8 w-8"}`,children:r.jsx("img",{src:n,alt:"",className:"h-[70%] w-[70%] object-contain",draggable:!1})})}function jS({className:n="h-8 w-8"}){return r.jsx(Du,{src:gS,className:n})}function NS({className:n="h-8 w-8"}){return r.jsx(Du,{src:wS,className:n})}function _S({className:n="h-8 w-8"}){return r.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,"aria-hidden":!0,children:[r.jsx("rect",{width:"32",height:"32",rx:"8",fill:"white",fillOpacity:"0.06"}),r.jsx("circle",{cx:"16",cy:"13",r:"4.5",stroke:"#92E4DD",strokeWidth:"1.75"}),r.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 AS({className:n="h-8 w-8"}){return r.jsx(Du,{src:bS,className:n})}function kS({className:n="h-8 w-8"}){return r.jsx(Du,{src:SS,className:n})}function rv({runtime:n,className:l="h-8 w-8 shrink-0"}){return n==="claude_code"?r.jsx(jS,{className:l}):n==="cursor_local"?r.jsx(NS,{className:l}):n==="codex_local"?r.jsx(AS,{className:l}):n==="muse_code"?r.jsx(kS,{className:l}):r.jsx(_S,{className:l})}const tu=()=>({runtime:"claude_code",deckId:"",purpose:"",defaultModel:"",defaultEffort:"",defaultBudget:iS(),allowWorktreeWrite:!0});function ES({agents:n,agentDeckOnline:l,onRefresh:s}){const[u,d]=b.useState(!1),[f,m]=b.useState(""),[x,y]=b.useState(tu()),[v,w]=b.useState(!1),[N,U]=b.useState(null),[Q,E]=b.useState(""),[H,M]=b.useState(tu()),q=async X=>{if(X.preventDefault(),!(!f.trim()||!x.deckId)){w(!0);try{const ge={name:f.trim(),runtime:x.runtime,deckId:x.deckId,defaultModel:x.defaultModel.trim()||null,defaultEffort:x.defaultEffort||null,defaultBudget:Rx(x.defaultBudget),purpose:x.purpose.trim()||null,permissionPolicy:kx(x)};await U2(ge),m(""),y(tu()),d(!1),s()}catch(ge){alert(String(ge))}finally{w(!1)}}},J=X=>{U(X.id),E(X.name),M({runtime:X.runtime,deckId:X.deckId??"",purpose:X.purpose??"",defaultModel:Sx(X)??"",defaultEffort:X.defaultEffort??"",defaultBudget:sS(lw(X)),...lS(X.permissionPolicyJson)})},W=()=>{U(null),M(tu())},se=async X=>{if(!(!Q.trim()||!H.deckId)){w(!0);try{const ge={name:Q.trim(),runtime:H.runtime,deckId:H.deckId,defaultModel:H.defaultModel.trim()||null,defaultEffort:H.defaultEffort||null,defaultBudget:Rx(H.defaultBudget),purpose:H.purpose.trim()||null,permissionPolicy:kx(H)};await z2(X.id,ge),W(),s()}catch(ge){alert(String(ge))}finally{w(!1)}}},V=async X=>{if(confirm(`Delete agent "${X.name}"?`)){w(!0);try{await B2(X.id),s()}catch(ge){alert(String(ge))}finally{w(!1)}}},ke=n.filter(X=>!X.healthy).length;return r.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4 max-w-6xl mx-auto w-full",children:[r.jsxs("div",{className:"mb-6 flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("h1",{className:"heading-page",children:"Agents"}),r.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"}),r.jsxs("p",{className:"text-sm text-white/45 mt-2",children:[n.length," agent",n.length===1?"":"s",ke>0&&r.jsxs("span",{className:"text-red-400 ml-2",children:["· ",ke," need",ke===1?"s":""," attention"]})]})]}),r.jsx(uS,{agents:n,agentDeckOnline:l})]}),r.jsx("div",{className:"mb-4 overflow-x-auto space-y-2",children:r.jsx(vS,{})}),r.jsx("div",{className:"space-y-3 mb-6",children:n.map(X=>{const ge=Sx(X);return r.jsxs("div",{className:"panel flex flex-col sm:flex-row sm:items-start gap-3 justify-between",children:[r.jsxs("div",{className:"flex gap-3 min-w-0 flex-1",children:[r.jsx(rv,{runtime:X.runtime}),r.jsxs("div",{className:"space-y-2 min-w-0 flex-1",children:[r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[r.jsx("span",{className:"text-lg font-semibold text-[#E8F6F4]",children:X.name}),!X.healthy&&r.jsx(_s,{className:"bg-red-500/15 text-red-300 border-red-400/30 normal-case",children:"Needs fix"})]}),r.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[r.jsx(_s,{className:"bg-white/5 text-white/55 border-white/15 normal-case",children:Aa(X.runtime)}),X.deckName?r.jsxs(_s,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",X.deckName]}):r.jsx(_s,{className:"bg-white/5 text-white/40 border-white/10 normal-case",children:"No deck"}),ge&&r.jsx(_s,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:ge,children:ge})]}),N===X.id&&r.jsxs("div",{className:"space-y-3 pt-2 border-t border-white/10",children:[r.jsxs("label",{className:"block space-y-1",children:[r.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),r.jsx("input",{className:"field text-sm",value:Q,onChange:Be=>E(Be.target.value)})]}),r.jsx(Ex,{value:H,onChange:M,agentDeckOnline:l}),r.jsxs("div",{className:"flex gap-2 pt-1",children:[r.jsx("button",{type:"button",disabled:v||!Q.trim()||!H.deckId,onClick:()=>se(X),className:"btn-gold text-sm px-3 py-1.5",children:"Save"}),r.jsx("button",{type:"button",onClick:W,className:"btn-ghost text-sm px-3 py-1.5",children:"Cancel"})]})]}),X.issues.length>0&&r.jsx("ul",{className:"text-sm text-red-300/90 space-y-1",children:X.issues.map((Be,pt)=>r.jsxs("li",{children:["· ",Be.message]},pt))})]})]}),r.jsxs("div",{className:"flex gap-2 shrink-0",children:[N!==X.id&&r.jsx("button",{type:"button",disabled:v,onClick:()=>J(X),className:"btn-ghost text-sm px-3 py-1.5",children:"Edit"}),r.jsx("button",{type:"button",disabled:v,onClick:()=>V(X),className:"btn-ghost text-sm px-3 py-1.5",children:"Delete"})]})]},X.id)})}),u?r.jsxs("form",{onSubmit:q,className:"panel space-y-3",children:[r.jsx("h2",{className:"heading-panel",children:"New Agent"}),r.jsxs("label",{className:"block space-y-1",children:[r.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),r.jsx("input",{className:"field",placeholder:"e.g. Claude · Work",value:f,onChange:X=>m(X.target.value)})]}),r.jsx(Ex,{value:x,onChange:y,agentDeckOnline:l}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("button",{type:"submit",disabled:v||!f.trim()||!x.deckId,className:"btn-gold px-4 py-2",children:v?"Saving…":"Create agent"}),r.jsx("button",{type:"button",onClick:()=>d(!1),className:"btn-ghost px-4 py-2",children:"Cancel"})]})]}):r.jsx("button",{type:"button",onClick:()=>d(!0),className:"btn-gold px-4 py-2",children:"Add agent"})]})}function RS(n){try{return Kd(n).identity}catch{return null}}function CS(n,l){return n!=="linear"||!l?null:l.repoResolution??Cy(l.labels)}function TS(n,l){if(!l)return n;const s=l.repoResolution??Cy(l.labels);return s.status==="resolved"&&s.repository?s.repository:n}function OS(n,l){var u;const s=CS(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 Tx(n){return n.title.trim().length>0&&RS(n.repo)!=null&&n.developerAgentId.length>0&&n.reviewerAgentId.length>0}function MS(n,l,s){const u=s?n.find(d=>d.id===s):void 0;return u&&!l.some(d=>d.id===u.id)?[u,...l]:[...l]}function LS(n,l){return{candidates:[l,...n.filter(s=>s.id!==l.id)],selectedId:l.id}}const ud=["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"],DS={q:"",status:"",repo:"",needsAttention:!1};function tf(n){return n.startsWith("?")?n.slice(1):n}function Ox(n){var s,u,d;const l=new URLSearchParams(tf(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 US(n){const l=new URLSearchParams(tf(n)),s=y=>{var w;const v=(w=l.get(y))==null?void 0:w.trim();return v||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 x=Number(l.get("page"));return Number.isInteger(x)&&x>=1&&(u.page=x),u}function zS(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 BS(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 qS(n,l){const s=new URLSearchParams(tf(n));return l<=1?s.delete("page"):s.set("page",String(Math.floor(l))),s.sort(),s.toString()}function Mx(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 Lx(n){return n.totalPages<=1?"":`Page ${n.page} of ${n.totalPages}`}function Dx(n){return!!(n.q||n.status||n.repo||n.needsAttention)}const HS={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"},$S={ready:"Ready",developing:"Developing",reviewing:"Reviewing",repairing:"Repairing",final_review:"Final review",needs_human:"Needs human",done:"Done",closed:"Closed"};function uv({status:n}){return r.jsx("span",{className:`text-xs leading-none px-2 py-1 rounded border tabular-nums ${HS[n]}`,children:$S[n]})}const cv="agent-dealer:first-issue-dismissed:v1";function YS(n){return n.healthy}function VS(n){return n.healthy&&n.runtime!=="muse_code"}function ZS(n){const l=n.some(YS),s=n.some(VS);return l&&s?"new-issue":"agents"}function GS(n){return n.historyTotal===0&&!n.filtersActive&&!n.dismissed}function ov(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}function QS(n=ov()){try{return(n==null?void 0:n.getItem(cv))==="1"}catch{return!1}}function XS(n=ov()){try{n==null||n.setItem(cv,"1")}catch{}}function IS({agents:n,onStartIssue:l,onDismiss:s}){const u=ZS(n);return r.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:r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"font-ui-display text-sm font-medium text-white/90",children:"Create your first issue"}),r.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."}),r.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[u==="agents"?r.jsx(ua,{to:"/agents","data-testid":"first-issue-primary",className:"btn-gold px-4 py-2 text-sm",children:"Configure agents"}):r.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"&&r.jsx("span",{className:"text-xs text-white/40",children:"then pick a repository and create the issue"})]})]}),r.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 dv({value:n,onChange:l,recentRepos:s=[],id:u}){return r.jsxs("div",{className:"space-y-1",children:[s.length>0&&r.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:[r.jsx("option",{value:"",children:"Recent repositories…"}),s.map(d=>r.jsx("option",{value:d,children:d},d))]}),r.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 KS(){return{label:"",repository:""}}function JS(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 FS({recentRepos:n=[],initialMappings:l,loadMappings:s=M2,saveMappings:u=L2,onClose:d}){const[f,m]=b.useState(l??[]),[x,y]=b.useState(l!==void 0),[v,w]=b.useState(null),[N,U]=b.useState(null),[Q,E]=b.useState(!1);b.useEffect(()=>{if(l!==void 0)return;let q=!0;return s().then(J=>{q&&(m(J),y(!0))}).catch(J=>{q&&(w(String(J)),y(!0))}),()=>{q=!1}},[l,s]);const H=(q,J)=>{m(W=>W.map((se,V)=>V===q?{...se,...J}:se))},M=async()=>{w(null),U(null);const q=JS(f);if(q){w(q);return}E(!0);try{const J=await u(f.map(W=>({label:W.label.trim(),repository:W.repository})));m(J),U(J.length===0?"Mappings cleared":`Saved ${J.length} mapping${J.length===1?"":"s"}`)}catch(J){w(String(J))}finally{E(!1)}};return r.jsxs("div",{className:"rounded border border-white/10 bg-black/20 px-3 py-2 space-y-2","aria-label":"Repository mappings",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("p",{className:"text-xs text-white/60",children:"Repository mappings"}),d&&r.jsx("button",{type:"button",className:"text-xs text-white/50 hover:text-white",onClick:d,children:"Close"})]}),x?f.length===0?r.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((q,J)=>r.jsxs("div",{className:"flex gap-2 items-start","data-testid":"mapping-row",children:[r.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 ${J+1}`,value:q.label,onChange:W=>H(J,{label:W.target.value})}),r.jsx("div",{className:"flex-1 min-w-0",children:r.jsx(dv,{value:q.repository,onChange:W=>H(J,{repository:W}),recentRepos:n})}),r.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((se,V)=>V!==J)),children:"Remove"})]},J)):r.jsx("p",{className:"text-xs text-white/40",children:"Loading…"}),v&&r.jsx("p",{className:"text-xs text-red-300","data-testid":"mappings-error",children:v}),N&&r.jsx("p",{className:"text-xs text-teal-200/80",children:N}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded border border-white/15 text-white/70 hover:text-white",onClick:()=>m(q=>[...q,KS()]),children:"Add mapping"}),r.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded border border-teal/40 text-teal disabled:opacity-50",disabled:Q||!x,onClick:()=>void M(),children:Q?"Saving…":"Save changes"})]})]})}const WS=["Backlog","Todo","In Progress","In Review"];function cd(n,l){const s=l?n.filter(f=>f.teamId===l):n,u=new Set,d=[];for(const f of s){const m=f.name.toLowerCase();u.has(m)||(u.add(m),d.push(f.name))}return d}function Ux(n,l){return l.length===0?[...n]:n.filter(s=>l.some(u=>u.toLowerCase()===s.toLowerCase()))}function PS(n,l){return n!==null&&!l}function ej({initialConfig:n,initialMetadata:l,loadConfig:s=C2,loadMetadata:u=O2,saveConfig:d=T2,onSaved:f,onClose:m}){var de;const[x,y]=b.useState(n===void 0?null:n),[v,w]=b.useState(l===void 0?null:l),[N,U]=b.useState((n==null?void 0:n.persisted.teamId)??""),[Q,E]=b.useState((n==null?void 0:n.persisted.assigneeMe)??!1),[H,M]=b.useState((n==null?void 0:n.persisted.stateFilter)??[...WS]),[q,J]=b.useState(n!==void 0),[W,se]=b.useState(l!==void 0),[V,ke]=b.useState(n===null?"Could not load saved Linear intake filters":null),[X,ge]=b.useState(l===null?"Could not load Linear teams and statuses":null),[Be,pt]=b.useState(null),[St,lt]=b.useState(!1),[ft,et]=b.useState(null);b.useEffect(()=>{if(n!==void 0)return;let P=!0;return s().then(ce=>{P&&(y(ce),U(ce.persisted.teamId??""),E(ce.persisted.assigneeMe),M(ce.persisted.stateFilter),ke(null),J(!0))}).catch(ce=>{P&&(y(null),ke(String(ce)),J(!0))}),()=>{P=!1}},[n,s]),b.useEffect(()=>{if(l!==void 0)return;let P=!0;return u().then(ce=>{P&&(w(ce),ge(null),se(!0))}).catch(ce=>{P&&(w(null),ge(String(ce)),se(!0))}),()=>{P=!1}},[l,u]),b.useEffect(()=>{if(!v)return;const P=cd(v.workflowStates,N||null);M(ce=>Ux(ce,P))},[v,N]);const Ke=b.useMemo(()=>cd((v==null?void 0:v.workflowStates)??[],N||null),[v,N]),D=Ke.length>0?Ke:H,K=!!(x!=null&&x.envOverrides.teamId),oe=!!(x!=null&&x.envOverrides.stateFilter),Me=K||oe,ve=q&&W,S=PS(x,St),$=P=>{M(ce=>ce.some(ye=>ye.toLowerCase()===P.toLowerCase())?ce.filter(ye=>ye.toLowerCase()!==P.toLowerCase()):[...ce,P])},F=async()=>{if(et(null),pt(null),!x){et("Saved filters are unavailable — reload before saving");return}if(H.length===0){et("Select at least one workflow status");return}lt(!0);try{const P=cd((v==null?void 0:v.workflowStates)??[],N.trim()||null),ce=Ux(H,P);if(ce.length===0){et("Select at least one workflow status"),lt(!1);return}const Ue=await d({stateFilter:ce,teamId:N.trim()||null,assigneeMe:Q});y(Ue),U(Ue.persisted.teamId??""),E(Ue.persisted.assigneeMe),M(Ue.persisted.stateFilter),pt(Ue.envOverrides.stateFilter||Ue.envOverrides.teamId?"Saved locally — env still overrides the disabled controls":"Saved"),f==null||f()}catch(P){et(String(P))}finally{lt(!1)}},ee=V||X||ft;return r.jsxs("div",{className:"rounded border border-white/10 bg-black/20 px-3 py-2 space-y-2","aria-label":"Linear intake filters",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("p",{className:"text-xs text-white/60",children:"Linear intake filters"}),m&&r.jsx("button",{type:"button",className:"text-xs text-white/50 hover:text-white",onClick:m,children:"Close"})]}),ve?r.jsxs(r.Fragment,{children:[Me&&r.jsxs("p",{className:"text-xs text-amber-200/90 rounded bg-amber-500/10 border border-amber-400/20 px-2 py-1.5","data-testid":"linear-filter-env-notice",children:[K&&oe?r.jsxs(r.Fragment,{children:[r.jsx("code",{className:"text-amber-100/90",children:"LINEAR_TEAM_ID"})," and"," ",r.jsx("code",{className:"text-amber-100/90",children:"LINEAR_STATE_FILTER"})," override saved Team and Status."]}):K?r.jsxs(r.Fragment,{children:[r.jsx("code",{className:"text-amber-100/90",children:"LINEAR_TEAM_ID"})," overrides saved Team."]}):r.jsxs(r.Fragment,{children:[r.jsx("code",{className:"text-amber-100/90",children:"LINEAR_STATE_FILTER"})," overrides saved Status."]})," ","Remove the env var to use the value below."]}),r.jsxs("label",{className:"block space-y-1",children:[r.jsx("span",{className:"text-xs text-white/50",children:"Team"}),r.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-2 py-1.5 text-sm disabled:opacity-50","aria-label":"Team",value:N,disabled:K||!x,onChange:P=>U(P.target.value),children:[r.jsx("option",{value:"",children:"All teams"}),((v==null?void 0:v.teams)??[]).map(P=>r.jsxs("option",{value:P.id,children:[P.name,P.key?` (${P.key})`:""]},P.id))]})]}),r.jsxs("fieldset",{className:"space-y-1",disabled:!x,children:[r.jsx("legend",{className:"text-xs text-white/50",children:"Assignee"}),r.jsxs("label",{className:"flex items-center gap-2 text-sm text-white/80 cursor-pointer",children:[r.jsx("input",{type:"radio",name:"linear-assignee",checked:!Q,onChange:()=>E(!1),className:"accent-[#C4B643]"}),"Anyone"]}),r.jsxs("label",{className:"flex items-center gap-2 text-sm text-white/80 cursor-pointer",children:[r.jsx("input",{type:"radio",name:"linear-assignee",checked:Q,onChange:()=>E(!0),className:"accent-[#C4B643]"}),"Assigned to me",(de=v==null?void 0:v.viewer)!=null&&de.name?r.jsxs("span",{className:"text-xs text-white/40",children:["(",v.viewer.name,")"]}):null]})]}),r.jsxs("fieldset",{className:"space-y-1",disabled:oe||!x,children:[r.jsx("legend",{className:"text-xs text-white/50",children:"Status"}),D.length===0?r.jsx("p",{className:"text-xs text-white/40",children:"No workflow statuses available."}):r.jsx("div",{className:"max-h-40 overflow-y-auto space-y-1","data-testid":"linear-status-list",children:D.map(P=>{const ce=H.some(Ue=>Ue.toLowerCase()===P.toLowerCase());return r.jsxs("label",{className:"flex items-center gap-2 text-sm text-white/80 cursor-pointer",children:[r.jsx("input",{type:"checkbox",checked:ce,disabled:oe||!x,onChange:()=>$(P),className:"accent-[#C4B643]","aria-label":`Status ${P}`}),P]},P)})})]}),ee&&r.jsx("p",{className:"text-xs text-red-300","data-testid":"linear-filters-error",children:ee}),Be&&r.jsx("p",{className:"text-xs text-teal-200/80","data-testid":"linear-filters-notice",children:Be}),r.jsx("div",{className:"flex gap-2",children:r.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded border border-teal/40 text-teal disabled:opacity-50",disabled:!S,"data-testid":"linear-filters-save",onClick:()=>void F(),children:St?"Saving…":"Save"})})]}):r.jsx("p",{className:"text-xs text-white/40",children:"Loading…"})]})}function fv(n){return n.issues.some(l=>l.code==="usage_capped")}function hv(n){return[...n].sort((l,s)=>Number(s.healthy)-Number(l.healthy))}function al(n){var u;const l=`${n.name} · ${Aa(n.runtime)}`,s=[];if(!n.healthy){const d=((u=n.issues[0])==null?void 0:u.message)??"unhealthy";s.push(`NEEDS FIX: ${d}`)}return fv(n)&&s.push("USAGE CAPPED"),s.length>0?`${l} — ${s.join(" · ")}`:l}function bu(n){var l;return n?n.healthy?fv(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 mv({agents:n,initialDeveloperId:l,initialReviewerId:s,busy:u,onSave:d,onCancel:f,variant:m="queued",notice:x=null}){var W,se;const[y,v]=b.useState(l??""),[w,N]=b.useState(s??""),U=hv(n),Q=n.find(V=>V.id===y),E=n.find(V=>V.id===w),H=bu(Q),M=bu(E),q=y===(l??"")&&w===(s??""),J=m==="parked"?"Save via the issue PATCH contract — keeps the worktree and branch, records the change on the timeline; resume continues with the new agents":"Save via the issue PATCH contract — keeps queue position and rechecks the wait reason";return r.jsxs("div",{className:"p-3 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[r.jsx("p",{className:"text-xs text-white/50",children:m==="parked"?r.jsx(r.Fragment,{children:"Swap the developer and/or reviewer to another profile — the worktree, branch and review rounds are kept, the change is recorded on the timeline, and a resume continues with the new agents."}):r.jsx(r.Fragment,{children:"Reassign agents — queue position is kept, the wait reason is rechecked, and the change is recorded on the timeline."})}),r.jsxs("label",{className:"block space-y-1",children:[r.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Developer"}),r.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:y,disabled:u,title:Q?`${Q.name} · ${Aa(Q.runtime)}${Q.healthy?" · healthy":` · ${((W=Q.issues[0])==null?void 0:W.message)??"unhealthy"}`}`:"Pick a developer agent",onChange:V=>v(V.target.value),children:[r.jsx("option",{value:"",children:"Developer agent…"}),U.map(V=>r.jsx("option",{value:V.id,title:al(V),children:(V.healthy?"● ":"○ ")+al(V)},V.id))]}),H&&r.jsx("span",{className:"text-xs text-amber-200/80 block",children:H})]}),r.jsxs("label",{className:"block space-y-1",children:[r.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Reviewer"}),r.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:w,disabled:u,title:E?`${E.name} · ${Aa(E.runtime)}${E.healthy?" · healthy":` · ${((se=E.issues[0])==null?void 0:se.message)??"unhealthy"}`}`:"Pick a reviewer agent",onChange:V=>N(V.target.value),children:[r.jsx("option",{value:"",children:"Reviewer agent…"}),U.map(V=>V.runtime==="muse_code"?r.jsx("option",{value:V.id,disabled:!0,title:"Muse Code cannot be a reviewer (developer role only)",children:`○ ${V.name} · ${Aa(V.runtime)} — reviewer not supported`},V.id):r.jsx("option",{value:V.id,title:al(V),children:(V.healthy?"● ":"○ ")+al(V)},V.id))]}),M&&r.jsx("span",{className:"text-xs text-amber-200/80 block",children:M})]}),r.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.jsx("button",{type:"button",className:"btn-gold px-4 py-1.5 text-sm disabled:opacity-50",disabled:u||!y||!w||q,title:J,onClick:()=>d(y,w),children:"Save agents"}),r.jsx("button",{type:"button",className:"px-4 py-1.5 text-sm text-white/60 hover:text-white disabled:opacity-50",disabled:u,title:m==="parked"?"Reset the selectors to the issue's current agents":void 0,onClick:()=>{if(m==="parked"){v(l??""),N(s??""),f==null||f();return}f==null||f()},children:"Cancel"})]}),x&&r.jsx("p",{className:"text-xs text-emerald-200/90",children:x})]})}function wu({className:n="w-3.5 h-3.5"}){return r.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor",className:n,"aria-hidden":!0,children:r.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 tj={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",muse_capability:"Muse capability",operator_verification:"Operator verification"};function aj(n){return tj[n]??n}function nj(n){if(!n)return null;try{return JSON.parse(n)}catch{return null}}function lj(n){const l=nj(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 ij(n){return n==="close"||n==="reject"||n==="abort"}function sj({options:n,disabled:l,onChoose:s}){return n.length===0?null:r.jsx("div",{className:"flex flex-wrap gap-2",children:n.map(u=>r.jsx("button",{type:"button",className:`${ij(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 Ts({action:n,linkTo:l,onChoose:s,disabled:u,children:d,hideChoicesHint:f}){const m=Hy(n),x=l?r.jsx(ua,{to:l,className:"text-sm text-white/85 hover:text-white hover:underline",children:m.title}):r.jsx("span",{className:"text-sm text-white/85",children:m.title});return r.jsxs("div",{className:"space-y-1.5",children:[r.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[r.jsx("span",{className:"text-xs uppercase tracking-wide text-red-300/80",children:aj(n.actionType)}),r.jsx("span",{className:"text-xs text-white/35 shrink-0",children:new Date(n.requestedAt).toLocaleString()})]}),r.jsx("div",{children:x}),m.context&&r.jsx("p",{className:"text-xs text-white/55",children:m.context}),s?m.displayOptions.length>0?r.jsx(sj,{options:m.displayOptions,disabled:u,onChoose:s}):r.jsxs("p",{className:"text-xs text-amber-200/80",children:["This item declares no response options — resolve it from the CLI (",r.jsx("code",{children:"agent-dealer action"}),")."]}):!f&&m.displayOptions.length>0&&r.jsxs("p",{className:"text-xs text-white/50",children:["To decide: ",m.displayOptions.map(y=>y.label).join(" · ")]}),d,r.jsxs("details",{children:[r.jsx("summary",{className:"text-xs text-white/45 cursor-pointer hover:text-white/70",children:"Details"}),r.jsxs("div",{className:"mt-1.5 space-y-1.5 rounded border border-white/10 bg-black/20 px-3 py-2",children:[r.jsx("p",{className:"text-xs text-white/60 whitespace-pre-wrap",children:m.details.question}),m.details.question!==m.details.reason&&r.jsx("p",{className:"text-xs text-white/60 whitespace-pre-wrap",children:m.details.reason}),m.details.factLines.map(y=>r.jsx("p",{className:"text-xs text-white/60",children:y},y)),m.details.paths.length>0&&r.jsxs("div",{className:"text-xs text-white/60",children:[r.jsx("p",{className:"text-white/40",children:"Saved paths:"}),m.details.paths.map(y=>r.jsx("p",{className:"font-mono break-all",children:y},y))]}),m.details.commands.length>0&&r.jsxs("div",{className:"text-xs text-white/60",children:[r.jsx("p",{className:"text-white/40",children:"Recovery commands:"}),r.jsx("pre",{className:"font-mono whitespace-pre-wrap break-all",children:m.details.commands.join(`
|
|
64
|
+
`)})]}),m.details.evidencePretty&&r.jsxs("div",{className:"text-xs text-white/60",children:[r.jsx("p",{className:"text-white/40",children:"Evidence:"}),r.jsx("pre",{className:"font-mono whitespace-pre-wrap break-all",children:m.details.evidencePretty})]})]})]})]})}function rj({actions:n,busyActionId:l,onResolve:s}){const[u,d]=b.useState({});return n.length===0?null:r.jsxs("div",{className:"mb-4 rounded border border-red-400/30 bg-red-500/10",children:[r.jsxs("div",{className:"px-4 py-2 flex items-center gap-2 border-b border-red-400/20",children:[r.jsx(wu,{className:"w-4 h-4 shrink-0 text-red-300"}),r.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"]})]}),r.jsx("div",{className:"divide-y divide-white/5",children:n.map(f=>{if(f.issueId)return r.jsx("div",{className:"px-4 py-3 hover:bg-white/5 transition-colors",children:r.jsx(Ts,{action:f,linkTo:`/issues/${f.issueId}`})},f.id);const m=f.actionType==="operator_verification",x=u[f.id]??"";return r.jsx("div",{className:"px-4 py-3",children:r.jsx(Ts,{action:f,disabled:l===f.id||m&&!x.trim(),onChoose:y=>s(f.id,y,m?x:void 0),children:m&&r.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:"Result note (required) — paste the probe output, waiver reason, or repair note",value:x,disabled:l===f.id,onChange:y=>d(v=>({...v,[f.id]:y.target.value}))})})},f.id)})})]})}const uj="web";function cj(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 oj({agents:n,humanActions:l,onHumanActionsChanged:s}){const[u,d]=b.useState(null),[f,m]=b.useState(null),[x,y]=wy(),v=x.toString(),w=US(v),N=b.useRef(w);N.current=w;const[U,Q]=b.useState(()=>Ox(v)),[E,H]=b.useState(!1),M=Dx(w),[q,J]=b.useState(!1),[W,se]=b.useState(!1),[V,ke]=b.useState(!1),[X,ge]=b.useState("manual"),[Be,pt]=b.useState([]),[St,lt]=b.useState(!1),[ft,et]=b.useState(""),Ke=b.useRef(ft);Ke.current=ft;const[D,K]=b.useState(""),[oe,Me]=b.useState(!1),[ve,S]=b.useState([]),[$,F]=b.useState(""),[ee,de]=b.useState(""),[P,ce]=b.useState("main"),[Ue,ye]=b.useState(""),[Kt,ut]=b.useState(""),[it,ll]=b.useState(""),[Mt,Ba]=b.useState(""),[Jt,qa]=b.useState(!0),[Ja,Ze]=b.useState(null),[jt,Fa]=b.useState([]),[He,Wa]=b.useState(null),[_t,il]=b.useState(!1),[Nn,_n]=b.useState(null),[Pa,Ei]=b.useState(()=>QS()),[Ft,An]=b.useState(null),[kn,Lt]=b.useState(null),ze=Be.find(T=>T.id===ft)??null,Wt=X==="linear"&&ze!=null,At=OS(X,ze),Ml=Tx({title:$,repo:ee,developerAgentId:it,reviewerAgentId:Mt}),sl=T=>{$2(T).then(d).catch(te=>Ze(String(te)))},Ri=()=>{Ax([...ud]).then(_n).catch(()=>{})},Ha=()=>{XS(),Ei(!0)},En=GS({historyTotal:Nn,filtersActive:M,dismissed:Pa}),xt=()=>{sl(N.current),rd().then(Fa).catch(()=>{}),F2().then(Wa).catch(()=>{}),Ri()},Pt=async T=>{il(!0),Ze(null);try{const te=await W2(T);Wa(te),xt()}catch(te){Ze(String(te))}finally{il(!1)}},G=async T=>{Lt(T),Ze(null);try{const te=await ev(T);An({issueId:T,developerAgentId:te.issue.developerAgentId,reviewerAgentId:te.issue.reviewerAgentId})}catch(te){Ze(String(te))}finally{Lt(null)}},we=async(T,te)=>{if(Ft){Lt(Ft.issueId);try{await uu(Ft.issueId,{developerAgentId:T,reviewerAgentId:te}),An(null),xt()}catch(_e){An(null),Ze(String(_e)),xt()}finally{Lt(null)}}},tt=async T=>{Lt(T),Ze(null);try{await tv(T),xt()}catch(te){Ze(String(te))}finally{Lt(null)}},Dt=async T=>{Lt(T),Ze(null);try{await av(T),xt()}catch(te){Ze(String(te)),xt()}finally{Lt(null)}},$a=T=>{const te=zS(BS(T));y(te?Object.fromEntries(new URLSearchParams(te)):{})},ct=()=>{Q(DS),y({})},oa=T=>{const te=qS(v,T);y(te?Object.fromEntries(new URLSearchParams(te)):{})},rl=T=>Q(te=>({...te,...T})),Bs=async(T,te,_e)=>{m(T),Ze(null);try{await lv(T,uj,te,_e),s(),xt()}catch(Ut){Ze(String(Ut))}finally{m(null)}};b.useEffect(()=>{Q(Ox(v))},[v]),b.useEffect(()=>{sl(N.current),rd().then(Fa).catch(()=>{}),Ax([...ud]).then(_n).catch(()=>{});const T=setInterval(()=>{sl(N.current),rd().then(Fa).catch(()=>{})},5e3);return()=>clearInterval(T)},[v]);const Ci=()=>{E2().then(T=>{lt(T.hasMore),pt(te=>MS(te,T.candidates,Ke.current))}).catch(T=>Ze(`Linear inbox: ${String(T)}`))};b.useEffect(()=>{q&&(Y2().then(S).catch(()=>S([])),X==="linear"&&Ci())},[q,X]),b.useEffect(()=>{ze&&(F(`${ze.identifier}: ${ze.title}`),ye(ze.description??""),ut(""),de(T=>TS(T,ze)))},[ze]);const Ll=()=>{F(""),de(""),ye(""),ut(""),et(""),K(""),qa(!0),ce("main")},Ti=T=>{pt(te=>LS(te,T).candidates),et(T.id),K(T.identifier)},Oi=async()=>{const T=D.trim();if(!T){Ze("Paste a Linear id (e.g. NOT-103) or issue URL");return}Me(!0),Ze(null);try{const te=await R2(T);Ti(te)}catch(te){Ze(`Linear lookup: ${String(te)}`)}finally{Me(!1)}},qs=async()=>{if(!Tx({title:$,repo:ee,developerAgentId:it,reviewerAgentId:Mt})){Ze("Title, GitHub repository, developer, and reviewer are required");return}try{await Q2({title:$.trim(),repo:ee.trim(),baseBranch:P.trim()||"main",description:Ue.trim()||void 0,acceptanceCriteria:Kt.trim()||void 0,developerAgentId:it,reviewerAgentId:Mt,maxReviewRounds:3,maxInfraAttempts:3,autoMerge:Jt,source:X==="linear"&&ze?"linear":"manual",externalId:ze==null?void 0:ze.id,externalLabel:ze==null?void 0:ze.identifier,externalUrl:ze==null?void 0:ze.url}),J(!1),Ll(),xt()}catch(T){Ze(String(T))}};return r.jsxs("div",{className:"flex-1 min-h-0 px-6 py-4 w-full overflow-y-auto",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h2",{className:"font-ui-display text-lg font-semibold text-white/90",children:"Issues"}),r.jsx("button",{type:"button",className:"btn-gold px-4",onClick:()=>J(T=>!T),children:"New issue"})]}),Ja&&r.jsx("p",{className:"text-sm text-red-300 mb-3",children:Ja}),En&&r.jsx(IS,{agents:n,onStartIssue:()=>J(!0),onDismiss:Ha}),q&&r.jsxs("div",{className:"mb-4 p-4 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[r.jsxs("p",{className:"text-xs text-white/50",children:["Workflow:"," ",r.jsxs("span",{className:"text-white/75",children:["developer → reviewer → ",Jt?"auto-merge on approve":"final human review"]}),"."]}),r.jsxs("div",{className:"flex gap-2 text-sm",children:[r.jsx("button",{type:"button",className:`font-ui-display px-3 py-1 rounded border ${X==="manual"?"border-teal/50 text-teal":"border-white/10 text-white/50"}`,onClick:()=>{ge("manual"),et("")},children:"Manual"}),r.jsx("button",{type:"button",className:`font-ui-display px-3 py-1 rounded border ${X==="linear"?"border-teal/50 text-teal":"border-white/10 text-white/50"}`,onClick:()=>ge("linear"),children:"From Linear"})]}),X==="linear"&&r.jsxs("div",{className:"space-y-2",children:[r.jsxs("div",{className:"flex gap-2",children:[r.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:D,onChange:T=>K(T.target.value),onKeyDown:T=>{T.key==="Enter"&&(T.preventDefault(),Oi())}}),r.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:oe||!D.trim(),onClick:()=>void Oi(),children:oe?"…":"Lookup"})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"text-xs text-white/50",children:"Or pick from open inbox…"}),r.jsx("button",{type:"button","aria-label":"Configure Linear intake filters",title:"Configure Linear intake filters","aria-expanded":V,onClick:()=>ke(T=>!T),className:"text-white/40 hover:text-white shrink-0 rounded focus-visible:outline focus-visible:outline-2 focus-visible:outline-cyber-teal/45",children:r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[r.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"}),r.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"})]})})]}),r.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm","aria-label":"Or pick from open inbox",value:ft,onChange:T=>{const te=T.target.value;et(te);const _e=Be.find(Ut=>Ut.id===te);_e&&K(_e.identifier)},children:[r.jsx("option",{value:"",children:"Select an issue…"}),Be.map(T=>r.jsxs("option",{value:T.id,children:[T.identifier,": ",T.title]},T.id))]}),V&&r.jsx(ej,{onClose:()=>ke(!1),onSaved:Ci}),St&&r.jsx("p",{className:"text-xs text-white/40","data-testid":"linear-candidates-has-more",children:"Showing the 50 most recently updated matches. Use exact ID/URL lookup above for another issue."})]})]}),r.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:$,disabled:Wt,onChange:T=>F(T.target.value)}),r.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:Ue,disabled:Wt,onChange:T=>ye(T.target.value)}),r.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",rows:3,placeholder:"Acceptance criteria (derived from the ticket when left empty)",value:Kt,onChange:T=>ut(T.target.value)}),r.jsxs("div",{className:"flex gap-2 items-stretch",children:[r.jsxs("div",{className:"flex-1 space-y-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"text-xs text-white/50",children:"Repository"}),r.jsx("button",{type:"button","aria-label":"Configure repository mappings",title:"Configure repository mappings","aria-expanded":W,onClick:()=>se(T=>!T),className:"text-white/40 hover:text-white shrink-0 rounded focus-visible:outline focus-visible:outline-2 focus-visible:outline-cyber-teal/45",children:r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[r.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"}),r.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"})]})})]}),r.jsx(dv,{value:ee,onChange:de,recentRepos:ve}),W&&r.jsx(FS,{recentRepos:ve,onClose:()=>se(!1)}),At&&r.jsx("p",{className:"text-xs text-amber-200/80","data-testid":"repo-label-warning",children:At})]}),r.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:P,onChange:T=>ce(T.target.value)})]}),r.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:it,onChange:T=>ll(T.target.value),children:[r.jsx("option",{value:"",children:"Developer agent…"}),n.map(T=>r.jsx("option",{value:T.id,children:T.name},T.id))]}),r.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:Mt,onChange:T=>Ba(T.target.value),children:[r.jsx("option",{value:"",children:"Reviewer agent…"}),n.map(T=>r.jsx("option",{value:T.id,children:T.name},T.id))]}),r.jsxs("label",{className:"flex items-center gap-2 text-sm text-white/70 cursor-pointer",children:[r.jsx("input",{type:"checkbox",checked:Jt,onChange:T=>qa(T.target.checked),className:"accent-[#C4B643]"}),"Auto-merge when reviewer approves (skip final human review)"]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("button",{type:"button",className:"btn-gold px-4 disabled:opacity-40",disabled:!Ml,title:Ml?void 0:"Title, GitHub repository, developer, and reviewer are required",onClick:qs,children:X==="linear"?"Kick from Linear":"Create"}),r.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm text-white/60 hover:text-white",onClick:()=>{J(!1),Ll()},children:"Cancel"})]})]}),jt.length>0?r.jsxs("div",{className:"mb-4 rounded border border-cyber-teal/25 bg-cyber-teal/5",children:[r.jsxs("div",{className:"px-4 py-2 border-b border-cyber-teal/20 flex items-center justify-between gap-3",children:[r.jsx("span",{className:"font-ui-display text-sm font-medium text-cyber-teal",children:"Admission queue"}),r.jsx("span",{className:"flex items-center gap-2 text-xs text-white/40",children:He?r.jsxs(r.Fragment,{children:[r.jsxs("span",{children:[He.active," active · ",He.waiting," waiting · limit"," ",He.limit,He.overCap?" · over capacity":""]}),He.options.length>0?r.jsxs("label",{className:"flex items-center gap-1",children:[r.jsx("span",{className:"text-white/35",children:"limit"}),r.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:He.options.includes(He.maxActiveIssues)?He.maxActiveIssues:He.limit,disabled:_t,title:He.ceiling<2?`Capped by the worker/spawn ceiling (${He.ceiling})`:"How many issues may execute in parallel (max one per repository)",onChange:T=>void Pt(Number(T.target.value)),children:He.options.map(T=>r.jsx("option",{value:T,children:T},T))})]}):r.jsxs("span",{title:`Capped by the worker/spawn ceiling (${He.ceiling})`,children:["max ",He.ceiling]})]}):r.jsxs("span",{children:[jt.length," waiting · sequential"]})})]}),r.jsx("div",{className:"divide-y divide-white/5",children:jt.map((T,te)=>r.jsxs("div",{children:[r.jsxs("div",{className:"px-4 py-2 flex items-start gap-3",children:[r.jsx("span",{className:"text-xs text-white/35 w-5 shrink-0 pt-0.5",children:T.position}),r.jsxs(ua,{to:`/issues/${T.issueId}`,className:"flex-1 min-w-0 text-left hover:text-cyber-teal",children:[r.jsx("span",{className:"text-sm text-white/85 truncate block",children:T.title??T.issueId.slice(0,8)}),T.waitReason?r.jsx("span",{className:"text-xs text-amber-200/80 block mt-0.5",children:T.waitReason}):r.jsxs("span",{className:"text-xs text-white/35 block mt-0.5",children:[T.issueStatus??"queued"," · next up"]})]}),r.jsxs("div",{className:"flex items-center gap-2 shrink-0 flex-wrap justify-end",children:[r.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:kn===T.issueId,title:"Change the developer/reviewer agents — keeps queue position and rechecks the wait reason",onClick:()=>void G(T.issueId),children:"Edit"}),r.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:kn===T.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 tt(T.issueId),children:"Run next"}),r.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:kn===T.issueId,title:"Execute now — start immediately, skipping queue order; refuses (changing nothing) when capacity, readiness, blockers, or agent health prevents it",onClick:()=>void Dt(T.issueId),children:"Execute now"}),r.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:te===0,title:"Move to top",onClick:()=>{Pr(T.issueId,"top").then(xt).catch(_e=>Ze(String(_e)))},children:"Top"}),r.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:te===0,title:"Move up",onClick:()=>{const _e=jt[te-1];_e&&Pr(T.issueId,{before:_e.issueId}).then(xt).catch(Ut=>Ze(String(Ut)))},children:"↑"}),r.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:te===jt.length-1,title:"Move down",onClick:()=>{const _e=jt[te+1];_e&&Pr(T.issueId,{after:_e.issueId}).then(xt).catch(Ut=>Ze(String(Ut)))},children:"↓"}),r.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:te===jt.length-1,title:"Move to bottom",onClick:()=>{Pr(T.issueId,"bottom").then(xt).catch(_e=>Ze(String(_e)))},children:"Bottom"}),r.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-white",onClick:()=>{nv(T.issueId).then(xt).catch(_e=>Ze(String(_e)))},children:"Remove"})]})]}),(Ft==null?void 0:Ft.issueId)===T.issueId&&r.jsx("div",{className:"px-4 pb-3 pl-12",children:r.jsx(mv,{agents:n,initialDeveloperId:Ft.developerAgentId,initialReviewerId:Ft.reviewerAgentId,busy:kn===T.issueId,onSave:(_e,Ut)=>void we(_e,Ut),onCancel:()=>An(null)})})]},T.id))})]}):He?r.jsxs("p",{"data-testid":"admission-idle-status",className:"mb-4 text-xs text-white/35 tabular-nums",children:["Admission: ",He.active," active · ",He.waiting," waiting · limit"," ",He.limit,He.overCap?" · over capacity":"",He.options.length>0&&r.jsxs("label",{className:"ml-2 inline-flex items-center gap-1",children:[r.jsx("span",{children:"limit"}),r.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:He.options.includes(He.maxActiveIssues)?He.maxActiveIssues:He.limit,disabled:_t,title:He.ceiling<2?`Capped by the worker/spawn ceiling (${He.ceiling})`:"How many issues may execute in parallel (max one per repository)",onChange:T=>void Pt(Number(T.target.value)),children:He.options.map(T=>r.jsx("option",{value:T,children:T},T))})]})]}):null,r.jsx(rj,{actions:l,busyActionId:f,onResolve:(T,te,_e)=>void Bs(T,te,_e)}),r.jsxs("div",{className:"mb-4 rounded border border-white/10 bg-panel-elevated/60",children:[r.jsxs("button",{type:"button","aria-expanded":E,"aria-controls":"issues-filter-form",onClick:()=>H(T=>!T),className:"w-full flex items-center gap-2 px-4 py-2.5 text-sm text-white/70 hover:text-white",children:[r.jsx("span",{"aria-hidden":"true",className:"text-xs text-white/40 w-3 shrink-0",children:E?"▾":"▸"}),r.jsx("span",{className:"font-ui-display",children:E?"Hide filters":"Show filters"}),M&&r.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"})]}),E&&r.jsx("form",{id:"issues-filter-form","aria-label":"Issues filters",className:"px-4 pb-4",onSubmit:T=>{T.preventDefault(),$a(U)},children:r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[r.jsxs("label",{className:"block text-sm",children:[r.jsx("span",{className:"block text-xs text-white/50 mb-1",children:"Search"}),r.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:T=>rl({q:T.target.value})})]}),r.jsxs("label",{className:"block text-sm",children:[r.jsx("span",{className:"block text-xs text-white/50 mb-1",children:"Status"}),r.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:U.status,onChange:T=>rl({status:T.target.value}),children:[r.jsx("option",{value:"",children:"All statuses"}),ud.map(T=>r.jsx("option",{value:T,children:T},T))]})]}),r.jsxs("label",{className:"block text-sm",children:[r.jsx("span",{className:"block text-xs text-white/50 mb-1",children:"Repository"}),r.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:T=>rl({repo:T.target.value})})]}),r.jsx("div",{className:"flex items-end gap-2",children:r.jsxs("label",{className:"flex items-center gap-2 text-sm text-white/70 cursor-pointer pb-2",children:[r.jsx("input",{type:"checkbox",checked:U.needsAttention,onChange:T=>rl({needsAttention:T.target.checked}),className:"accent-[#C4B643]"}),"Needs attention"]})}),r.jsxs("div",{className:"flex items-end gap-2 sm:col-span-2 lg:col-span-4",children:[r.jsx("button",{type:"submit",className:"btn-gold px-4",children:"Apply"}),r.jsx("button",{type:"button",className:"px-4 py-2 text-sm text-white/60 hover:text-white",onClick:ct,children:"Reset"})]})]})})]}),u===null?r.jsx("p",{className:"text-white/50 text-sm",children:"Loading…"}):u.total===0&&!Dx(w)?r.jsx("p",{className:"text-white/45 text-sm",children:"No issues yet — create one to get started."}):u.total===0?r.jsxs("div",{className:"rounded border border-white/10 bg-panel-elevated/40 px-4 py-3",children:[r.jsx("p",{className:"text-white/45 text-sm",children:Mx(u)}),r.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:ct,children:"Reset filters"})]}):r.jsxs("div",{children:[r.jsx("div",{className:"flex justify-end mb-2",children:r.jsxs("p",{className:"text-xs text-white/40 tabular-nums",children:[Mx(u),Lx(u)?` · ${Lx(u)}`:""]})}),r.jsx("div",{className:"space-y-2",children:u.issues.map(T=>{const te=jt.find(_e=>_e.issueId===T.id);return r.jsxs(ua,{to:`/issues/${T.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:[T.hasOpenHumanAction&&r.jsx(wu,{className:"w-4 h-4 shrink-0 text-red-400"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"text-sm font-medium text-white/90 truncate",children:T.title}),te!=null&&te.waitReason?r.jsx("p",{className:"text-xs text-amber-200/80 truncate",title:te.waitReason,children:te.waitReason}):T.currentIntent&&r.jsx("p",{className:"text-xs text-white/50 truncate",children:T.currentIntent})]}),r.jsx("span",{className:"text-xs text-white/40 capitalize shrink-0",children:T.currentOwner}),te&&r.jsxs("span",{className:"text-xs px-2 py-0.5 rounded border border-cyber-teal/40 text-cyber-teal shrink-0",title:te.waitReason??"Next up for admission",children:["Queued #",te.position]}),r.jsx(uv,{status:T.status}),r.jsx("span",{className:"text-xs text-white/35 shrink-0 w-16 text-right",children:cj(T.updatedAt)})]},T.id)})}),u.totalPages>1&&r.jsxs("nav",{"aria-label":"Issues pages",className:"mt-3 flex items-center gap-2",children:[r.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:()=>oa(u.page-1),children:"Previous"}),r.jsxs("span",{className:"text-xs text-white/45 tabular-nums",children:["Page ",u.page," of ",u.totalPages]}),r.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:()=>oa(u.page+1),children:"Next"})]})]})]})}const dj=["developer","reviewer","legacy"],zx=["claude_code","cursor_local","codex_local"],fj=["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"];function bi(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:Iy(n.n),sampleTitle:`Sample size ${n.n}${Cd(n.n)?" — fewer than 5 observations, compare with care":""}`,sparse:Cd(n.n)}}function Sa(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?m2(n.sum):u,f=n.known<n.total;return{available:!0,valueText:d,exactText:s!=null&&s.compact?u:null,noteText:f?`${Xe(n.known)}/${Xe(n.total)} known`:null,noteTitle:f?"Partial sample — missing provider metadata is excluded, never zero":null,incomplete:f}}function Ls(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:Mu(n),evidenceCounts:`${Xe(Math.round(n*l))}/${Xe(l)}`,evidenceNoun:s,title:`Exact share over ${l} ${s}`}}function Bx(n,l,s){const u=Ls(n,l,s);return u.available?{text:`${u.valueText} (${u.evidenceCounts} ${u.evidenceNoun})`,title:u.title}:{text:u.valueText,title:u.title}}function od(n){const l=Bx(n.issueSuccess,n.issueSuccessDenominator,"closed"),s=Bx(n.attemptSuccess,n.attemptSuccessDenominator,"terminal attempts");return{key:n.key,issuesText:Xe(n.issues),attemptsText:Xe(n.attempts),issueSuccessText:l.text,issueSuccessTitle:l.title,attemptSuccessText:s.text,attemptSuccessTitle:s.title,issueSuccessDisplay:Ls(n.issueSuccess,n.issueSuccessDenominator,"closed"),attemptSuccessDisplay:Ls(n.attemptSuccess,n.attemptSuccessDenominator,"terminal attempts"),wallText:_x(n.sessionWallMs,Xt),envelopeText:_x(n.spawnEnvelopeMs,Xt),retryText:n.retryRate===null?"N/A":Mu(n.retryRate),retryTitle:"Extra attempts after a terminal attempt in the same issue/role/round ÷ attempts",tokensInText:Pn(n.tokensIn,Xe),tokensOutText:Pn(n.tokensOut,Xe),costText:Pn(n.costUsd,ks),costIncomplete:n.costUsd.known<n.costUsd.total,durationText:Pn(n.durationMs,Xt),failedCostText:Pn(n.failedCostUsd,ks),failedTokensText:`${Pn(n.failedTokensIn,Xe)} in · ${Pn(n.failedTokensOut,Xe)} out`,failedDurationText:Pn(n.failedDurationMs,Xt),wall:bi(n.sessionWallMs,Xt),envelope:bi(n.spawnEnvelopeMs,Xt),tokensIn:Sa(n.tokensIn,Xe,{compact:!0}),tokensOut:Sa(n.tokensOut,Xe,{compact:!0}),cost:Sa(n.costUsd,ks),duration:Sa(n.durationMs,Xt),failedCost:Sa(n.failedCostUsd,ks),failedTokensIn:Sa(n.failedTokensIn,Xe,{compact:!0}),failedTokensOut:Sa(n.failedTokensOut,Xe,{compact:!0}),failedDuration:Sa(n.failedDurationMs,Xt),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&&Cd(n.attempts)}}function hj(n,l){const s=n.code==="unknown";return{code:n.code,domain:n.domain,countText:Xe(n.count),shareText:n.share===null?"N/A":Mu(n.share),shareTitle:l>0?`${Xe(n.count)} of ${Xe(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 mj(n){const l=n.reduce((s,u)=>s+u.count,0);return n.map(s=>hj(s,l))}function pj(n){return`/issues/${n}`}function qx(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 Hx(n){if(!n)return"";const l=n.match(/^(\d{4}-\d{2}-\d{2})/);return l?l[1]:""}function $x(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:Hx(s("from")),toDate:Hx(s("to")),repo:s("repo"),role:s("role"),runtime:s("runtime"),model:s("model"),status:s("status")}}function xj(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 yj(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 vj(n){return{from:qx(n.fromDate,!1),to:qx(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 dd(n){return n===null?"N/A":Mu(n)}function Oa({label:n,value:l,valueTitle:s,note:u}){return r.jsxs("div",{className:"rounded border border-white/10 bg-panel-elevated/60 px-4 py-3",children:[r.jsx("p",{className:"font-ui-display text-xs uppercase tracking-wide text-white/40",children:n}),r.jsx("div",{className:"mt-1 font-mono text-lg font-semibold text-white/90 tabular-nums",title:s,children:l}),u&&r.jsx("div",{className:"mt-0.5 font-ui-display text-xs text-white/40",children:u})]})}function Su({display:n,compact:l}){if(!n.available)return r.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 r.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",title:n.title,children:[r.jsx("span",{className:s,"aria-label":n.title,children:n.valueText}),r.jsxs("span",{className:"font-ui-display min-w-0 break-words text-xs text-white/40",children:["(",r.jsx("span",{className:"font-mono tabular-nums",children:n.evidenceCounts})," ",n.evidenceNoun,")"]})]})}function Es({display:n,compact:l}){if(!n.available)return r.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 r.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-3 gap-y-0.5",children:[r.jsxs("span",{className:"inline-flex items-baseline gap-x-1.5",children:[r.jsx("span",{className:s,children:"P50"}),r.jsx("span",{className:u,children:n.p50Text??"N/A"})]}),r.jsxs("span",{className:"inline-flex items-baseline gap-x-1.5",children:[r.jsx("span",{className:s,children:"P95"}),r.jsx("span",{className:u,children:n.p95Text??"N/A"})]}),r.jsx("span",{className:"font-ui-display text-xs text-white/40",title:n.sampleTitle,children:n.sampleText})]})}function ja({display:n,compact:l}){if(!n.available)return r.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 r.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",children:[r.jsx("span",{className:u,title:s,"aria-label":s,children:n.valueText}),n.noteText&&r.jsx("span",{className:"font-ui-display text-xs text-white/40",title:n.noteTitle??void 0,children:n.noteText})]})}function fd({caption:n,dimension:l,rows:s,cohortLink:u}){return s.length===0?r.jsxs("div",{className:"rounded border border-white/10 bg-panel-elevated/60 px-4 py-3",children:[r.jsx("h4",{className:"font-ui-display text-sm font-medium text-white/80",children:n}),r.jsx("p",{className:"font-ui-display mt-1 text-sm text-white/45",children:"No attempts in this dimension for these filters."})]}):r.jsx("div",{className:"rounded border border-white/10 bg-panel-elevated/60 overflow-x-auto",children:r.jsxs("table",{className:"w-full min-w-[1440px] text-sm",children:[r.jsxs("caption",{className:"sr-only",children:[n," — sorted by name, never by cost"]}),r.jsx("thead",{children:r.jsxs("tr",{className:"font-ui-display text-left text-xs uppercase tracking-wide text-white/40 border-b border-white/10",children:[r.jsx("th",{scope:"col",className:"px-4 py-2 font-medium",children:n}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Issues"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Attempts"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Issue success"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Attempt success"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Session wall P50/P95"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Retry rate"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Tokens in"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Tokens out"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Cost"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Duration"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Failed cost"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Failed tokens"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Failed runtime"})]})}),r.jsx("tbody",{className:"divide-y divide-white/5",children:s.map(d=>r.jsxs("tr",{className:"tabular-nums",children:[r.jsxs("th",{scope:"row",className:"px-4 py-2 text-left font-mono font-medium text-white/85",children:[u?r.jsx(ua,{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&&r.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"})]}),r.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:d.issuesText}),r.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:d.attemptsText}),r.jsx("td",{className:"px-3 py-2 text-white/75",title:d.issueSuccessTitle,children:r.jsx(Su,{display:d.issueSuccessDisplay,compact:!0})}),r.jsx("td",{className:"px-3 py-2 text-white/75",title:d.attemptSuccessTitle,children:r.jsx(Su,{display:d.attemptSuccessDisplay,compact:!0})}),r.jsx("td",{className:"px-3 py-2 text-white/75",children:r.jsx(Es,{display:d.wall,compact:!0})}),r.jsx("td",{className:"px-3 py-2 font-mono text-white/75",title:d.retryTitle,children:d.retryText}),r.jsx("td",{className:"px-3 py-2 text-white/75",children:r.jsx(ja,{display:d.tokensIn,compact:!0})}),r.jsx("td",{className:"px-3 py-2 text-white/75",children:r.jsx(ja,{display:d.tokensOut,compact:!0})}),r.jsx("td",{className:"px-3 py-2 text-white/75",children:r.jsx(ja,{display:d.cost,compact:!0})}),r.jsx("td",{className:"px-3 py-2 text-white/75",children:r.jsx(ja,{display:d.duration,compact:!0})}),r.jsx("td",{className:"px-3 py-2 text-white/75",children:r.jsx(ja,{display:d.failedCost,compact:!0})}),r.jsx("td",{className:"px-3 py-2 text-white/75",children:r.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-1.5",children:[r.jsx(ja,{display:d.failedTokensIn,compact:!0}),r.jsx("span",{className:"font-ui-display text-xs text-white/40",children:"in"}),r.jsx("span",{className:"font-ui-display text-xs text-white/40",children:"·"}),r.jsx(ja,{display:d.failedTokensOut,compact:!0}),r.jsx("span",{className:"font-ui-display text-xs text-white/40",children:"out"})]})}),r.jsx("td",{className:"px-3 py-2 text-white/75",children:r.jsx(ja,{display:d.failedDuration,compact:!0})})]},d.key))})]})})}const gj={fromDate:"",toDate:"",repo:"",role:"",runtime:"",model:"",status:""};function bj({loading:n,error:l,report:s,onRetry:u,cohortLink:d}){const f=(s==null?void 0:s.summary)??null,m=b.useMemo(()=>s?mj(s.failures):[],[s]),x=b.useMemo(()=>s?s.failures.reduce((y,v)=>y+v.count,0):0,[s]);return r.jsxs("div",{"aria-live":"polite",children:[n&&r.jsx("p",{role:"status",className:"text-sm text-white/50",children:"Loading execution report…"}),!n&&l&&r.jsxs("div",{className:"rounded border border-red-400/30 bg-red-500/10 px-4 py-3",role:"alert",children:[r.jsxs("p",{className:"font-ui-display text-sm text-red-200",children:["Couldn’t load the execution report: ",l]}),r.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&&r.jsxs("div",{className:"space-y-6",children:[s.meta.partial&&r.jsxs("div",{className:"rounded border border-amber-300/30 bg-amber-400/10 px-4 py-3",children:[r.jsx("p",{className:"font-ui-display text-sm text-amber-100 font-medium",children:"Partial metadata"}),r.jsx("ul",{className:"font-ui-display mt-1 list-disc list-inside text-sm text-amber-100/80",children:s.meta.partialReasons.map(y=>r.jsx("li",{children:y},y))})]}),f.issues===0?r.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."}):r.jsxs(r.Fragment,{children:[r.jsx("section",{"aria-label":"Summary",children:r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-3",children:[r.jsx(Oa,{label:"Issue success",value:r.jsx(Su,{display:Ls(f.issueSuccess,f.closedIssues,"closed")}),valueTitle:`done / (done + closed), denominator ${f.closedIssues}`,note:`${Xe(f.issues)} issues · ${Xe(f.closedIssues)} closed`}),r.jsx(Oa,{label:"Attempt success",value:r.jsx(Su,{display:Ls(f.attemptSuccess,f.terminalAttempts,"terminal")}),valueTitle:`done sessions / terminal sessions, denominator ${f.terminalAttempts}`,note:`${Xe(f.attempts)} attempts · ${Xe(f.terminalAttempts)} terminal`}),r.jsx(Oa,{label:"Retry rate",value:dd(f.retryRate),valueTitle:`${f.retryExtraAttempts} extra attempts after a terminal attempt in the same issue/role/round ÷ ${f.attempts} attempts`,note:`Reuse rate ${dd(f.reuseRate)} over ${Xe(f.reuseDenominator)} reviewer sessions with input SHA`}),r.jsx(Oa,{label:"Human wait",value:Xt(f.humanWaitMs),note:`${Xe(f.interventions)} interventions`}),r.jsx(Oa,{label:"Session wall P50/P95",value:r.jsx(Es,{display:bi(f.sessionWallMs,Xt)}),note:"Session bookkeeping proxy — never CLI runtime"}),r.jsx(Oa,{label:"Spawn envelope P50/P95",value:r.jsx(Es,{display:bi(f.spawnEnvelopeMs,Xt)}),note:"Coordinator-measured; includes slot wait + post-exit work"}),r.jsx(Oa,{label:"Checkpoint latency P50/P95",value:r.jsx(Es,{display:bi(f.checkpointMs,Xt)}),note:"Session start → first heartbeat"}),r.jsx(Oa,{label:"Reviewer rounds (avg)",value:f.avgReviewerRounds===null?"N/A":f.avgReviewerRounds.toFixed(1),note:`Change-request rate ${dd(f.changeRequestRate)} over ${Xe(f.reviewedIssues)} reviewed`})]})}),r.jsxs("section",{"aria-label":"Failed-attempt waste",children:[r.jsx("h3",{className:"font-ui-display text-sm font-medium text-white/80 mb-2",children:"Failed-attempt waste (known values only)"}),r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[r.jsx(Oa,{label:"Failed cost",value:r.jsx(ja,{display:Sa(f.failedCostUsd,ks)})}),r.jsx(Oa,{label:"Failed tokens",value:r.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",children:[r.jsx(ja,{display:Sa(f.failedTokensIn,Xe,{compact:!0})}),r.jsx("span",{className:"font-ui-display text-xs font-normal text-white/40",children:"in"}),r.jsx("span",{className:"font-ui-display text-xs font-normal text-white/40",children:"·"}),r.jsx(ja,{display:Sa(f.failedTokensOut,Xe,{compact:!0})}),r.jsx("span",{className:"font-ui-display text-xs font-normal text-white/40",children:"out"})]})}),r.jsx(Oa,{label:"Failed runtime",value:r.jsx(ja,{display:Sa(f.failedDurationMs,Xt)})})]})]}),r.jsxs("section",{"aria-label":"Phase wall time",children:[r.jsx("h3",{className:"font-ui-display text-sm font-medium text-white/80 mb-2",children:"Phase wall time"}),r.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."}),r.jsx("div",{className:"rounded border border-white/10 bg-panel-elevated/60 overflow-x-auto",children:r.jsxs("table",{className:"w-full min-w-[560px] text-sm",children:[r.jsx("caption",{className:"sr-only",children:"Exclusive phase wall times. Boundaries without defensible evidence are N/A."}),r.jsx("thead",{children:r.jsxs("tr",{className:"font-ui-display text-left text-xs uppercase tracking-wide text-white/40 border-b border-white/10",children:[r.jsx("th",{scope:"col",className:"px-4 py-2 font-medium",children:"Phase"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"P50 / P95"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Why"})]})}),r.jsx("tbody",{className:"divide-y divide-white/5",children:f.phaseWallMs.map(y=>r.jsxs("tr",{className:"tabular-nums",children:[r.jsx("th",{scope:"row",className:"px-4 py-2 text-left font-mono font-medium text-white/85",children:y.phase}),r.jsx("td",{className:"px-3 py-2 text-white/75",children:r.jsx(Es,{display:bi(y.stat,Xt),compact:!0})}),r.jsx("td",{className:"font-ui-display px-3 py-2 text-xs text-white/45",children:y.stat.reasons.join(", ")})]},y.phase))})]})})]}),r.jsxs("section",{"aria-label":"Comparisons",className:"space-y-4",children:[r.jsxs("h3",{className:"font-ui-display text-sm font-medium text-white/80",children:["Comparisons ",r.jsx("span",{className:"font-normal text-white/40",children:"— sorted by name, never by cost"})]}),r.jsx(fd,{caption:"By role",dimension:"role",rows:s.byRole.map(od),cohortLink:d}),r.jsx(fd,{caption:"By runtime",dimension:"runtime",rows:s.byRuntime.map(od),cohortLink:d}),r.jsx(fd,{caption:"By model",dimension:"model",rows:s.byModel.map(od),cohortLink:d})]}),r.jsxs("section",{"aria-label":"Why attempts failed",children:[r.jsx("h3",{className:"font-ui-display text-sm font-medium text-white/80 mb-2",children:"Why attempts failed"}),r.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"," ",Xe(x)," failed ",x===1?"issue":"issues"," in scope."]}),m.length===0?r.jsx("p",{className:"font-ui-display text-sm text-white/45",children:"No failed attempts in this window."}):r.jsx("div",{className:"rounded border border-white/10 bg-panel-elevated/60 overflow-x-auto",children:r.jsxs("table",{className:"w-full min-w-[560px] text-sm",children:[r.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."}),r.jsx("thead",{children:r.jsxs("tr",{className:"font-ui-display text-left text-xs uppercase tracking-wide text-white/40 border-b border-white/10",children:[r.jsx("th",{scope:"col",className:"px-4 py-2 font-medium",children:"Failure"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Domain"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Issues"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Share"}),r.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Example issues"})]})}),r.jsx("tbody",{className:"divide-y divide-white/5",children:m.map(y=>r.jsxs("tr",{className:y.isUnknown?"bg-amber-400/5 tabular-nums":"tabular-nums",children:[r.jsxs("th",{scope:"row",className:"px-4 py-2 text-left text-white/85",children:[r.jsx("span",{className:"font-ui-display block font-medium",title:y.code,children:y.displayCode}),r.jsx("span",{className:`font-ui-display block text-xs font-normal ${y.isUnknown?"text-amber-200/90":"text-white/40"}`,children:y.displayNote})]}),r.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:y.domain}),r.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:y.countText}),r.jsx("td",{className:"px-3 py-2 font-mono text-white/75",title:y.shareTitle,children:y.shareText}),r.jsx("td",{className:"px-3 py-2",children:r.jsxs("span",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[y.issueIds.map(v=>r.jsx(ua,{to:pj(v),className:"text-cyber-teal hover:underline font-mono text-xs",children:v.slice(0,8)},v)),y.hiddenIssueCount>0&&r.jsxs("span",{className:"font-ui-display text-xs text-white/40",children:["+",y.hiddenIssueCount," more"]})]})})]},y.code))})]})})]})]})]})]})}function wj(){const[n,l]=wy(),s=n.toString(),u=b.useMemo(()=>xj(s),[s]),[d,f]=b.useState(()=>$x(s)),[m,x]=b.useState(null),[y,v]=b.useState(!0),[w,N]=b.useState(null),[U,Q]=b.useState(0);b.useEffect(()=>{f($x(s))},[s]),b.useEffect(()=>{let M=!1;return v(!0),N(null),eS(u).then(q=>{M||(x(q),v(!1))}).catch(q=>{M||(N(q instanceof Error?q.message:String(q)),v(!1))}),()=>{M=!0}},[s,U]);const E=M=>{const q=Xy(vj(M));l(q?Object.fromEntries(new URLSearchParams(q)):{})},H=M=>f(q=>({...q,...M}));return r.jsxs("div",{className:"flex-1 min-h-0 px-6 py-4 w-full overflow-y-auto",children:[r.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-2 mb-1",children:[r.jsx("h2",{className:"font-ui-display text-lg font-semibold text-white/90",children:"Execution report"}),m&&r.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()]})]}),r.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."}),r.jsx("form",{"aria-label":"Report filters",className:"mb-4 p-4 rounded border border-white/10 bg-panel-elevated/60",onSubmit:M=>{M.preventDefault(),E(d)},children:r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[r.jsxs("label",{className:"block text-sm",children:[r.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"From"}),r.jsx("input",{type:"date",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.fromDate,onChange:M=>H({fromDate:M.target.value})})]}),r.jsxs("label",{className:"block text-sm",children:[r.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"To"}),r.jsx("input",{type:"date",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.toDate,onChange:M=>H({toDate:M.target.value})})]}),r.jsxs("label",{className:"block text-sm",children:[r.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Repository"}),r.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:M=>H({repo:M.target.value})})]}),r.jsxs("label",{className:"block text-sm",children:[r.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Role"}),r.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.role,onChange:M=>H({role:M.target.value}),children:[r.jsx("option",{value:"",children:"All roles"}),dj.map(M=>r.jsx("option",{value:M,children:M},M))]})]}),r.jsxs("label",{className:"block text-sm",children:[r.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Runtime"}),r.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.runtime,onChange:M=>{H({runtime:M.target.value})},children:[r.jsx("option",{value:"",children:"All runtimes"}),zx.map(M=>r.jsx("option",{value:M,children:M},M)),r.jsx("option",{value:"unknown",children:"unknown (missing metadata)"}),d.runtime&&!zx.includes(d.runtime)&&r.jsxs("option",{value:d.runtime,children:[d.runtime," (from URL)"]})]})]}),r.jsxs("label",{className:"block text-sm",children:[r.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Model"}),r.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:M=>H({model:M.target.value})})]}),r.jsxs("label",{className:"block text-sm",children:[r.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Issue status"}),r.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.status,onChange:M=>H({status:M.target.value}),children:[r.jsx("option",{value:"",children:"All statuses"}),fj.map(M=>r.jsx("option",{value:M,children:M},M))]})]}),r.jsxs("div",{className:"flex items-end gap-2",children:[r.jsx("button",{type:"submit",className:"btn-gold px-4",children:"Apply"}),r.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm text-white/60 hover:text-white",onClick:()=>{f(gj),l({})},children:"Reset"})]})]})}),r.jsx(bj,{loading:y,error:w,report:m,onRetry:()=>Q(M=>M+1),cohortLink:(M,q)=>yj(s,M,q)})]})}function Yx(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} · ${Aa(s.runtime)}`;return s.healthy?u:`${u} (unhealthy: ${((d=s.issues[0])==null?void 0:d.message)??"needs attention"})`}function Vx(n,l){var u;if(!n)return;const s=l.find(d=>d.id===n);return s?`${s.name} · ${Aa(s.runtime)}${s.healthy?" · healthy":` · ${((u=s.issues[0])==null?void 0:u.message)??"unhealthy"}`}`:`Configured profile ${n} is not on record (deleted?)`}function Sj({agents:n,initialRepo:l,initialDeveloperId:s,initialReviewerId:u,busy:d,onSave:f,onCancel:m}){var W,se;const[x,y]=b.useState(l),[v,w]=b.useState(s??""),[N,U]=b.useState(u??""),Q=hv(n),E=n.find(V=>V.id===v),H=n.find(V=>V.id===N),M=bu(E),q=bu(H),J=x.trim()===l&&v===(s??"")&&N===(u??"");return r.jsxs("div",{className:"p-3 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[r.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."}),r.jsxs("label",{className:"block space-y-1",children:[r.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Repository"}),r.jsx("input",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:x,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:V=>y(V.target.value)})]}),r.jsxs("label",{className:"block space-y-1",children:[r.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Developer"}),r.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:v,disabled:d,title:E?`${E.name} · ${Aa(E.runtime)}${E.healthy?" · healthy":` · ${((W=E.issues[0])==null?void 0:W.message)??"unhealthy"}`}`:"Pick a developer agent",onChange:V=>w(V.target.value),children:[r.jsx("option",{value:"",children:"Developer agent…"}),Q.map(V=>r.jsx("option",{value:V.id,title:al(V),children:(V.healthy?"● ":"○ ")+al(V)},V.id))]}),M&&r.jsx("span",{className:"text-xs text-amber-200/80 block",children:M})]}),r.jsxs("label",{className:"block space-y-1",children:[r.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Reviewer"}),r.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:N,disabled:d,title:H?`${H.name} · ${Aa(H.runtime)}${H.healthy?" · healthy":` · ${((se=H.issues[0])==null?void 0:se.message)??"unhealthy"}`}`:"Pick a reviewer agent",onChange:V=>U(V.target.value),children:[r.jsx("option",{value:"",children:"Reviewer agent…"}),Q.map(V=>V.runtime==="muse_code"?r.jsx("option",{value:V.id,disabled:!0,title:"Muse Code cannot be a reviewer (developer role only)",children:`○ ${V.name} · ${Aa(V.runtime)} — reviewer not supported`},V.id):r.jsx("option",{value:V.id,title:al(V),children:(V.healthy?"● ":"○ ")+al(V)},V.id))]}),q&&r.jsx("span",{className:"text-xs text-amber-200/80 block",children:q})]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("button",{type:"button",className:"btn-gold px-4 py-1.5 text-sm disabled:opacity-50",disabled:d||!x.trim()||!v||!N||J,title:"Save via the issue PATCH contract — keeps queue position, rechecks readiness and the wait reason",onClick:()=>f(x.trim(),v,N),children:"Save configuration"}),r.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 jj({issue:n,agents:l,canEdit:s,editing:u,busy:d,onBeginEdit:f,onSave:m,onCancel:x}){return r.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-white/[0.03] space-y-1.5",children:[r.jsx("p",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Configuration"}),r.jsxs("p",{className:"text-sm text-white/85",title:`Exact repository identity: ${n.repo}`,children:[r.jsx("span",{className:"text-white/45",children:"Repository "}),n.repo]}),r.jsxs("p",{className:"text-sm text-white/85",title:Vx(n.developerAgentId,l),children:[r.jsx("span",{className:"text-white/45",children:"Developer "}),Yx(n.developerAgentId,l)]}),r.jsxs("p",{className:"text-sm text-white/85",title:Vx(n.reviewerAgentId,l),children:[r.jsx("span",{className:"text-white/45",children:"Reviewer "}),Yx(n.reviewerAgentId,l)]}),s&&!u&&r.jsx("button",{type:"button",className:"text-xs text-cyber-teal hover:underline disabled:opacity-50",disabled:d,onClick:f,children:"Edit configuration"}),s&&u&&r.jsx(Sj,{agents:l,initialRepo:n.repo,initialDeveloperId:n.developerAgentId,initialReviewerId:n.reviewerAgentId,busy:d,onSave:m,onCancel:x})]})}function Nj({contract:n}){return r.jsxs("section",{"aria-label":"Execution contract",className:"mb-4 p-3 rounded border border-white/10 bg-white/[0.03] space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("p",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Execution contract"}),r.jsx("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-cyber-teal/40 text-cyber-teal",children:n.version}),r.jsx("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-white/15 text-white/70",children:n.executionMode})]}),r.jsxs("div",{className:"text-sm text-white/85 space-y-1.5",children:[r.jsxs("p",{children:[r.jsx("span",{className:"text-white/45",children:"Exit predicate: "}),n.exitPredicate]}),r.jsxs("p",{children:[r.jsx("span",{className:"text-white/45",children:"One-PR stopping point: "}),n.onePrStoppingPoint]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-white/45",children:"Non-goals:"}),r.jsx("ul",{className:"list-disc pl-5 text-white/75",children:n.nonGoals.map(l=>r.jsx("li",{children:l},l))})]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-white/45",children:"Acceptance criteria:"}),r.jsx("ul",{className:"space-y-1",children:n.acceptanceCriteria.map(l=>r.jsxs("li",{children:[r.jsxs("p",{className:"text-white/80",children:["☐ ",l.text]}),l.evidence&&r.jsxs("p",{className:"pl-5 text-xs text-white/55",children:["Evidence: ",l.evidence]})]},l.text))})]})]}),r.jsx("p",{className:"text-[11px] text-white/35",children:"Compiled from the ticket description — edit the description to change it."})]})}function au(n){return n==="developer"?"Developer":n==="reviewer"?"Reviewer":"Worker"}const hd={"issue.created":()=>"Issue created","issue.reassigned":()=>"Configuration updated","workflow.started":()=>"Workflow started","worker.started":n=>`${au(n.actorType)} started${n.round?` (round ${n.round})`:""}`,"worker.completed":n=>`${au(n.actorType)} finished${n.round?` (round ${n.round})`:""}`,"worker.failed":n=>`${au(n.actorType)} failed${n.round?` (round ${n.round})`:""}`,"worker.deferred":n=>{var l;return((l=wi(n.payloadJson))==null?void 0:l.outcome)==="deck_unavailable"?`Waiting for Agent Deck${n.round?` (round ${n.round})`:""}`:`${au(n.actorType)} deferred${n.round?` (round ${n.round})`:""}`},"worktree.ready":()=>"Worktree ready","worktree.deps_ready":()=>"Dependencies ready","deck.connected":()=>"Deck connected","brief.resolved":()=>"Brief resolved","base.probe":n=>{var s;const l=(s=wi(n.payloadJson))==null?void 0:s.result;return l==="conflict"?"Base conflict found before publish":l==="skipped"?"Base conflict probe skipped":l==="deferred"?"Base conflict probe waiting on base fetch":l==="failed"?"Base conflict probe failed; not published":"Base conflict probe clean"},"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 wi(n){if(!n)return null;try{return JSON.parse(n)}catch{return null}}const _j={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=wi(n.payloadJson);return n.artifactRef?r.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=wi(n.payloadJson);return s?r.jsxs("span",{className:"text-sm",children:[r.jsx("span",{className:_j[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=wi(n.payloadJson);return s!=null&&s.markdown?r.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=wi(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:r.jsxs("span",{className:"text-xs text-white/40",children:["· ",u.join(" · ")]})}return null}function kj(n){var l;return((l=hd[n.type])==null?void 0:l.call(hd,n))??n.type}const Zx={human:"You",system:"System",developer:"Developer",reviewer:"Reviewer"},Ej={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 Rj(n){return n.actorRef?`${Zx[n.actorType]} · ${n.actorRef}`:Zx[n.actorType]}function Cj({events:n}){return n.length===0?r.jsx("p",{className:"text-white/40 text-sm",children:"No activity yet."}):r.jsx("div",{className:"space-y-1",children:n.map(l=>r.jsxs("div",{className:"flex items-baseline gap-3 py-1.5 border-b border-white/5 last:border-0",children:[r.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"})}),r.jsx("span",{className:`text-[11px] leading-none px-1.5 py-0.5 rounded shrink-0 ${Ej[l.actorType]}`,children:Rj(l)}),r.jsx("span",{className:"text-sm text-white/80",children:kj(l)}),r.jsx(Aj,{e:l})]},l.id))})}function Ma(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 Gx(n){return n==null||!Number.isFinite(n)?null:`${Math.round(n).toLocaleString("en-US")} tokens`}function Tj(n){return n==null||!Number.isFinite(n)?null:`$${n.toFixed(2)}`}const Oj={queue_wait:"Queue / admission wait",coordinator_setup:"Setup",agent_process:"Agent process",coordinator_validation_publish:"Validation / publish",coordinator_work:"Coordinator work"},Qx={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"},Md={worktree:"worktree",commit:"commit",verification_receipt:"verification receipt",publish_only:"publish-only result"},Mj=new Set(["failed","timed_out","error"]);function af(n){return n.replace(/_/g," ")}function Ds(n,l){const s=`Evidence quality: ${n}`;return l.length>0?`${s} — ${l.join(", ")}`:s}function Na({quality:n,reasons:l}){return r.jsxs("span",{className:`text-[11px] tabular-nums ${n==="exact"?"text-white/60":n==="inferred"?"text-amber-300/90":"text-white/60 italic"}`,title:Ds(n,l),children:["· ",n,l.length>0&&r.jsxs("span",{className:"sr-only",children:[" (",l.join(", "),")"]})]})}function tl({reasons:n}){const l=n.length>0?n.join(", "):"no reason recorded";return r.jsxs("span",{className:"text-white/45 italic",title:`Unavailable — ${l}`,children:["Unavailable",r.jsxs("span",{className:"text-[11px]",children:[" — ",l]})]})}function nu({covered:n,format:l,unit:s}){if(n.value==null)return r.jsx(tl,{reasons:n.reasons});const u=n.known<n.total;return r.jsxs("span",{title:`${Ds(n.quality,n.reasons)} · known ${n.known} of ${n.total} ${s}`,children:[l(n.value),r.jsx(Na,{quality:n.quality,reasons:n.reasons}),u&&r.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 Xx({cause:n,primary:l}){return r.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:[r.jsxs("p",{className:l?"text-sm font-medium text-red-200":"text-xs text-white/60",children:[l?"First failure: ":"Consequence: ",af(n.code)]}),r.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}),r.jsxs("p",{className:"text-[11px] text-white/60",title:Ds(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 Lj({interval:n}){const l=Qx[n.category??"unknown"]??Qx.unknown,s=Ma(n.durationMs),u=n.category==="host_suspended";return r.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:[r.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}),r.jsx("span",{className:"text-xs tabular-nums",children:s??r.jsx(tl,{reasons:n.reasons})}),r.jsx(Na,{quality:n.quality,reasons:n.reasons})]})}function Dj({attempt:n}){const l=n.reuseKinds;return l===void 0?r.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?r.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"}):r.jsx(r.Fragment,{children:l.map(s=>r.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 ${Md[s]??s} instead of starting cold.`,children:["reused ",Md[s]??s]},s))})}function Uj({attempt:n,isRetry:l}){const s=Ma(n.setup.durationMs),u=Ma(n.agentProcess.durationMs),d=Ma(n.validationPublish.durationMs),f=l&&n.role==="developer";return r.jsxs("li",{className:"py-1.5 border-b border-white/5 last:border-0 space-y-0.5",children:[r.jsxs("p",{className:"text-sm text-white/85",children:[r.jsx("span",{className:"capitalize",children:n.role}),r.jsxs("span",{className:"text-white/45",children:[n.runtime?` · ${n.runtime}`:"",n.model?` · ${n.model}`:"",` · round ${n.round} · ${n.status}`]}),n.publishOnly&&r.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&&r.jsx(Dj,{attempt:n})]}),r.jsxs("p",{className:"text-xs text-white/50 tabular-nums",children:[r.jsxs("span",{title:s?void 0:`Setup unavailable — ${n.setup.reasons.join(", ")||"no reason recorded"}`,children:["Setup ",s??r.jsxs("span",{className:"italic",children:["Unavailable — ",n.setup.reasons.join(", ")||"no reason recorded"]})]}),r.jsx(Na,{quality:n.setup.quality,reasons:n.setup.reasons})," · ",r.jsxs("span",{title:u?void 0:`Agent process unavailable — ${n.agentProcess.reasons.join(", ")||"no reason recorded"}`,children:["Agent ",u??r.jsxs("span",{className:"italic",children:["Unavailable — ",n.agentProcess.reasons.join(", ")||"no reason recorded"]})]}),r.jsx(Na,{quality:n.agentProcess.quality,reasons:n.agentProcess.reasons})," · ",r.jsxs("span",{title:d?void 0:`Validation/publish unavailable — ${n.validationPublish.reasons.join(", ")||"no reason recorded"}`,children:["Validation/publish ",d??r.jsxs("span",{className:"italic",children:["Unavailable — ",n.validationPublish.reasons.join(", ")||"no reason recorded"]})]}),r.jsx(Na,{quality:n.validationPublish.quality,reasons:n.validationPublish.reasons})]}),n.failureCauses.length>0&&r.jsxs("p",{className:"text-[11px] text-white/60",children:["Failures: ",n.failureCauses.map(m=>af(m.code)).join(", ")]})]})}function zj({analysis:n}){const l=Ma(n.elapsed.durationMs),s=Ma(n.exclusiveTotalMs),u=Ma(n.firstCheckpoint.msSinceWorkflowStart),d=n.nested.filter(E=>E.kind!=="unexplained_silence"),f=n.attempts.flatMap(E=>E.silence),m=n.attempts.length>0&&n.attempts.every(E=>E.silence.length===0&&E.silenceQuality==="unavailable"),x=n.attempts.filter(E=>E.silence.length===0&&E.silenceQuality==="unavailable"),y=n.waste.failedAttempts>0||n.waste.publishOnlyAttempts>0||n.attempts.some(E=>E.failureCauses.length>0||Mj.has(E.status)),v=Ma(n.humanWaitMs),w=n.retry.reuseRate==null?null:`${Math.round(n.retry.reuseRate*100)}% reused`,U=(n.retry.preservedKinds??[]).map(E=>Md[E]??E),Q=n.waste.failedAttempts>0||n.waste.publishOnlyAttempts>0;return r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{children:[r.jsxs("p",{className:"text-sm text-white/85 tabular-nums",children:["Elapsed ",l??r.jsx(tl,{reasons:n.elapsed.reasons}),r.jsx(Na,{quality:n.elapsed.quality,reasons:n.elapsed.reasons})]}),r.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??r.jsx(tl,{reasons:n.exclusiveTotalReasons}),r.jsx(Na,{quality:n.exclusiveTotalQuality,reasons:n.exclusiveTotalReasons}),r.jsx("span",{children:" · overlaps unioned, not summed"})]})]}),r.jsxs("div",{children:[r.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Phase breakdown"}),r.jsx("ul",{children:n.unionedDurations.map(E=>{const H=Ma(E.durationMs);return r.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-2 py-0.5 text-sm",children:[r.jsx("span",{className:"text-white/70 w-36 shrink-0",children:Oj[E.phase]??E.phase}),r.jsx("span",{className:"text-white/85 tabular-nums",children:H??r.jsx(tl,{reasons:E.reasons})}),r.jsx(Na,{quality:E.quality,reasons:E.reasons}),E.known<E.total&&r.jsxs("span",{className:"text-[11px] text-white/60",children:["(known ",E.known," of ",E.total,")"]})]},E.phase)})}),r.jsxs("p",{className:"text-xs text-white/45 tabular-nums mt-1",children:["Human wait ",v??r.jsx(tl,{reasons:n.humanWaitReasons}),r.jsx(Na,{quality:n.humanWaitQuality,reasons:n.humanWaitReasons}),r.jsx("span",{title:"Human wait is tracked separately — it never adds to the phase total.",children:" · never additive"})]}),d.length>0&&r.jsx("ul",{className:"mt-1",children:d.map((E,H)=>r.jsxs("li",{className:"text-xs text-white/50 tabular-nums",children:[r.jsxs("span",{title:"Nested drill-down: explains its parent phase, never adds to the total.",children:["↳ ",E.kind==="human_wait"?"Human wait":E.category??E.kind]})," ",Ma(E.durationMs)??r.jsx(tl,{reasons:E.reasons}),r.jsx(Na,{quality:E.quality,reasons:E.reasons})]},H))})]}),r.jsxs("div",{children:[r.jsxs("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:["Attempts (",n.attempts.length,")"]}),n.attempts.length===0?r.jsx("p",{className:"text-xs text-white/45 italic",children:"No attempts recorded yet."}):r.jsx("ul",{children:n.attempts.map((E,H)=>r.jsx(Uj,{attempt:E,isRetry:H>0},E.sessionId))})]}),r.jsxs("div",{children:[r.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Failure"}),n.primaryFailure?r.jsxs("div",{className:"space-y-1.5",children:[r.jsx(Xx,{cause:n.primaryFailure,primary:!0}),n.consequenceCauses.length>0&&r.jsx("div",{className:"space-y-1 opacity-80",children:n.consequenceCauses.map((E,H)=>r.jsx(Xx,{cause:E,primary:!1},`${E.code}-${H}`))})]}):y?r.jsxs("p",{className:"text-sm text-white/60 italic",title:Ds("unavailable",n.primaryFailureReasons),children:["Unknown — ",n.primaryFailureReasons.join(", ")||"no failure evidence recorded"]}):r.jsx("p",{className:"text-sm text-white/45",children:"No failure recorded."})]}),r.jsxs("div",{children:[r.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",")"]}),Q?r.jsxs("p",{className:"text-sm text-white/85 flex flex-wrap gap-x-3 gap-y-0.5 tabular-nums",children:[r.jsxs("span",{title:"Failed-attempt agent-process time over known values only",children:["Runtime ",r.jsx(nu,{covered:n.waste.runtimeMs,format:E=>Ma(Math.round(E))??"?",unit:"attempts"})]}),r.jsxs("span",{title:"Failed-attempt input tokens over known values only",children:["In ",r.jsx(nu,{covered:n.waste.tokensIn,format:E=>Gx(E)??"?",unit:"attempts"})]}),r.jsxs("span",{title:"Failed-attempt output tokens over known values only",children:["Out ",r.jsx(nu,{covered:n.waste.tokensOut,format:E=>Gx(E)??"?",unit:"attempts"})]}),r.jsxs("span",{title:"Failed-attempt known cost over known values only",children:["Cost ",r.jsx(nu,{covered:n.waste.costUsd,format:E=>Tj(E)??"?",unit:"attempts"})]})]}):r.jsx("p",{className:"text-sm text-white/45",children:"No failed attempts — no retry waste."})]}),r.jsxs("div",{children:[r.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"First checkpoint"}),n.firstCheckpoint.msSinceWorkflowStart==null&&n.firstCheckpoint.kind==null?r.jsxs("p",{className:"text-sm text-white/60 italic",title:Ds(n.firstCheckpoint.quality,n.firstCheckpoint.reasons),children:["Unavailable — ",n.firstCheckpoint.reasons.join(", ")||"no checkpoint recorded"]}):r.jsxs("p",{className:"text-sm text-white/85 tabular-nums",children:[n.firstCheckpoint.kind?af(n.firstCheckpoint.kind):"Checkpoint",n.firstCheckpoint.observedSha?` · ${n.firstCheckpoint.observedSha.slice(0,12)}`:"",u?` · ${u} after workflow start`:"",r.jsx(Na,{quality:n.firstCheckpoint.quality,reasons:n.firstCheckpoint.reasons})]})]}),r.jsxs("div",{children:[r.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Retry reuse"}),r.jsxs("div",{className:"flex flex-wrap gap-1.5",role:"group","aria-label":"Retry reuse summary",children:[r.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]}),r.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&&r.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&&r.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]}),r.jsxs("span",{className:"text-[11px] text-white/60 tabular-nums self-center",children:[n.retry.retries===0?"No retries":w??r.jsx(tl,{reasons:n.retry.reasons}),r.jsx(Na,{quality:n.retry.quality,reasons:n.retry.reasons})]})]}),r.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."})]}),r.jsxs("div",{children:[r.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Silence"}),r.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?r.jsx("p",{className:"text-sm text-white/60 italic",children:"Unknown — silence cannot be derived without agent-process bounds."}):r.jsx("p",{className:"text-sm text-white/45",children:"No silence observed."}):r.jsxs(r.Fragment,{children:[r.jsx("ul",{"aria-label":"Observed silence intervals",children:f.map((E,H)=>r.jsx(Lj,{interval:E},H))}),x.length>0&&r.jsx("ul",{"aria-label":"Attempts with unknown silence",className:"mt-1",children:x.map(E=>r.jsxs("li",{className:"text-[11px] text-white/60 italic py-0.5",children:["Silence unknown for attempt ",E.sessionId.length>12?`${E.sessionId.slice(0,8)}…`:E.sessionId," —"," ",E.silenceReasons.join(", ")||"no silence evidence recorded"]},E.sessionId))})]})]})]})}function Bj({issueId:n}){const[l,s]=b.useState(null),[u,d]=b.useState(null),[f,m]=b.useState(!0);return b.useEffect(()=>{s(null),d(null),m(!0);let x=!1;return V2(n).then(y=>{x||(s(y),m(!1))}).catch(y=>{x||(/not found/i.test(String(y))?(s(null),d(null)):d(String(y).replace(/^Error:\s*/i,"")),m(!1))}),()=>{x=!0}},[n]),r.jsxs("section",{"aria-labelledby":"execution-analysis-heading",className:"mb-4 p-3 rounded border border-white/10 bg-white/[0.03]",children:[r.jsx("h3",{id:"execution-analysis-heading",className:"font-ui-display text-sm font-medium text-white/85 mb-2",children:"Execution analysis"}),f&&r.jsx("p",{className:"text-xs text-white/40",children:"Loading execution analysis…"}),!f&&u&&r.jsx("p",{className:"text-xs text-red-300",children:u}),!f&&!u&&!l&&r.jsx("p",{className:"text-xs text-white/45",children:"No execution analysis yet — start the workflow to see where time goes."}),!f&&!u&&l&&r.jsx(zj,{analysis:l})]})}const qj="web";function Hj(n){try{const l=JSON.parse(n);return typeof l.text=="string"?l.text:JSON.stringify(l,null,2)}catch{return n}}function md(n){const l=Math.floor(n/6e4);return l<60?`${l}m`:`${Math.floor(l/60)}h ${l%60}m`}function $j(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 Rs(n){if(!n)return null;const l=n.split(/[/\\]/).filter(Boolean);return l.length<=2?n:l.slice(-2).join("/")}function pd(n){var l;return[n.branch,n.tipLabel,(l=n.worktree)!=null&&l.path?Rs(n.worktree.path):null].filter(Boolean).join(" · ")}function xd(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 yd(n){var l;return!!(n.restartRisk||(l=n.worktree)!=null&&l.preserved)}function Yj(n,l){return!n||!l?!1:n===l?!0:n.includes(l)}function Vj({busy:n,onConfirm:l,onCancel:s}){return r.jsxs("div",{className:"mt-2 p-3 rounded border border-red-400/30 bg-red-500/10 space-y-2",children:[r.jsx("p",{className:"text-sm text-white/90 font-medium",children:"Close this issue?"}),r.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."}),r.jsxs("div",{className:"flex gap-2",children:[r.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"}),r.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"})]})]})}const Zj="Agents updated. Resume to continue with the new agents.";function Gj(n,l,s,u){const d={};return s!==(n??"")&&(d.developerAgentId=s),u!==(l??"")&&(d.reviewerAgentId=u),d}function Qj(n){const l=n.humanActions.find(s=>s.status==="open");if(l)return Hy(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 Xj({issueId:n,detail:l,agents:s,onHumanActionsChanged:u,refresh:d,onError:f}){var Pt;const[m,x]=b.useState(null),[y,v]=b.useState({}),[w,N]=b.useState(""),[U,Q]=b.useState(!1),[E,H]=b.useState(""),[M,q]=b.useState(""),[J,W]=b.useState(""),[se,V]=b.useState(!1),[ke,X]=b.useState(null),[ge,Be]=b.useState(!1),[pt,St]=b.useState(null),[lt,ft]=b.useState(!1),[et,Ke]=b.useState(null),[D,K]=b.useState({}),[oe,Me]=b.useState({}),ve=G=>f(String(G)),{issue:S,timeline:$,humanActions:F,usageSummary:ee,readiness:de,humanWaitMs:P,interventionCount:ce,latestWorkflowInstance:Ue,activeWorkerSession:ye,liveProgress:Kt,latestSessionFailure:ut,branchTipStatus:it,queued:ll,queueEntry:Mt,capWait:Ba}=l,Jt=s.find(G=>G.id===S.developerAgentId),qa=Jt&&!Jt.healthy,Ja=((Pt=Jt==null?void 0:Jt.issues[0])==null?void 0:Pt.message)??"Developer agent is unhealthy",Ze=Ue?new Date(Ue.completedAt??Date.now()).getTime()-new Date(Ue.startedAt).getTime():0,jt=F.filter(G=>G.status==="open"),Fa=S.status==="needs_human"&&jt.some(G=>G.actionType==="attempts_exhausted"||G.actionType==="policy_escalation"),He=de.ok===!1||jt.some(G=>G.actionType==="product_scope_decision"),Wa=Ue!=null&&Ue.completedAt===null,_t=S.status==="ready"&&!Wa,il=S.status==="ready"&&!Wa,Nn=ye&&ye.status==="running"&&(S.status==="developing"||S.status==="reviewing"||S.status==="repairing"),_n=!!ut&&!Nn,Pa=async()=>{w.trim()&&(await P2(n,w),N(""),d())},Ei=()=>{H(S.title),q(S.description??""),W(S.acceptanceCriteria??""),Q(!0)},Ft=async()=>{V(!0),f(null);try{await uu(n,{title:E.trim()||void 0,description:M.trim()||null,acceptanceCriteria:J.trim()||null}),Q(!1),d()}catch(G){ve(G)}finally{V(!1)}},An=async()=>{V(!0),f(null);try{const G=await tv(n);X(G.state==="admitted"?null:`Queued at position ${G.position}${G.waitReason?` — ${G.waitReason}`:""}`),d()}catch(G){ve(G)}finally{V(!1)}},kn=async()=>{V(!0),f(null);try{await J2(n),d()}catch(G){ve(G)}finally{V(!1)}},Lt=async()=>{V(!0),f(null);try{await av(n),X(null),Be(!1),d()}catch(G){ve(G),d()}finally{V(!1)}},ze=async(G,we,tt)=>{V(!0),f(null);try{await uu(n,{repo:G,developerAgentId:we,reviewerAgentId:tt}),Be(!1),d()}catch(Dt){Be(!1),ve(Dt),d()}finally{V(!1)}},Wt=async(G,we)=>{V(!0),f(null);try{await uu(n,Gj(S.developerAgentId,S.reviewerAgentId,G,we)),St(Zj),d()}catch(tt){ve(tt),d()}finally{V(!1)}},At=async()=>{V(!0),f(null);try{await I2(n),u(),d()}catch(G){ve(G)}finally{V(!1)}},Ml=async()=>{V(!0),f(null);try{await nv(n),d()}catch(G){ve(G)}finally{V(!1)}},sl=async()=>{V(!0),f(null);try{await K2(n),ft(!1),Ke("Issue closed — it will not execute. History is retained and can be found as closed work."),d()}catch(G){ve(G)}finally{V(!1)}},Ri=async()=>{if(confirm("Abort this workflow? The current worker will stop and the issue will close. History and evidence are kept.")){V(!0),f(null);try{await X2(n),d()}catch(G){ve(G)}finally{V(!1)}}},Ha=async(G,we,tt)=>{V(!0),f(null);try{await lv(G,qj,we,tt),u(),d()}catch(Dt){ve(Dt)}finally{V(!1)}},En=()=>{m||Z2(n).then(x).catch(G=>ve(G))},xt=G=>{y[G]||(v(we=>({...we,[G]:{content:"",loading:!0}})),G2(n,G).then(we=>v(tt=>({...tt,[G]:{content:we.content,loading:!1}}))).catch(we=>v(tt=>({...tt,[G]:{content:"",loading:!1,error:String(we)}}))))};return r.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-4",children:r.jsxs("div",{className:"max-w-3xl",children:[r.jsx(ua,{to:"/issues",className:"font-ui-display inline-block text-sm text-white/50 hover:text-white mb-3",children:"← Issues"}),r.jsxs("div",{className:"flex items-start justify-between gap-4 mb-4",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-lg font-semibold text-white/90",children:S.title}),r.jsxs("p",{className:"text-xs text-white/45 mt-1",children:["Owner: ",r.jsx("span",{className:"capitalize",children:S.currentOwner}),S.currentIntent?` · ${S.currentIntent}`:""]}),r.jsxs("div",{className:"flex flex-wrap gap-3 mt-2 text-xs text-white/40",children:[S.prUrl&&r.jsxs("a",{href:S.prUrl,target:"_blank",rel:"noreferrer",className:"text-cyber-teal hover:underline",children:["PR #",S.prNumber]}),S.externalUrl&&r.jsx("a",{href:S.externalUrl,target:"_blank",rel:"noreferrer",className:"text-cyber-teal hover:underline",children:S.externalLabel??"External link"}),r.jsxs("span",{children:["Round ",S.currentRound,"/",S.maxReviewRounds]}),r.jsxs("span",{children:["Infra attempts ",S.infraAttempts,"/",S.maxInfraAttempts]}),r.jsxs("span",{title:"Wall-clock time from workflow start to completion (or now)",children:[md(Ze)," elapsed"]}),r.jsxs("span",{title:`${ee.totalTokensIn} in / ${ee.totalTokensOut} out tokens`,children:["$",ee.totalCostUsd.toFixed(2)]}),P>0&&r.jsxs("span",{title:"Time spent waiting on a human, excluding autonomous processing",children:[md(P)," human wait"]}),ce>0&&r.jsxs("span",{children:[ce," intervention",ce===1?"":"s"]})]})]}),r.jsx(uv,{status:S.status})]}),et&&r.jsx("div",{className:"mb-4 p-3 rounded border border-white/15 bg-white/[0.04]",children:r.jsx("p",{className:"text-sm text-white/85",children:et})}),r.jsx(jj,{issue:S,agents:s,canEdit:il,editing:ge,busy:se,onBeginEdit:()=>Be(!0),onSave:(G,we,tt)=>void ze(G,we,tt),onCancel:()=>Be(!1)}),S.executionContract&&r.jsx(Nj,{contract:S.executionContract}),r.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-panel-elevated/40 flex items-start justify-between gap-3",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-white/45",children:"Next"}),r.jsx("p",{className:"text-sm text-white/85",children:Qj(l)})]}),Wa&&r.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:se,onClick:Ri,children:"Abort workflow"})]}),Mt&&r.jsxs("div",{className:"mb-4 p-3 rounded border border-cyber-teal/30 bg-cyber-teal/5",children:[r.jsxs("p",{className:"text-xs text-cyber-teal font-medium uppercase tracking-wide",children:["Queued · position ",Mt.position]}),r.jsx("p",{className:"text-sm text-white/80 mt-0.5",children:Mt.waitReason??"Next up — starts as soon as the coordinator ticks"})]}),Ba&&r.jsxs("div",{className:"mb-4 p-3 rounded border border-amber-400/30 bg-amber-500/10 flex flex-wrap items-start justify-between gap-3",children:[r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("p",{className:"text-xs text-amber-300 font-medium uppercase tracking-wide",children:Ba.kind==="usage_capped"?"Waiting on usage cap":"Waiting on Agent Deck"}),r.jsx("p",{className:"text-sm text-white/80 mt-0.5 break-words",children:Ba.reason}),r.jsxs("p",{className:"text-xs text-white/45 mt-0.5",children:["Wait until ",new Date(Ba.until).toLocaleString()]})]}),r.jsx("button",{type:"button",className:"btn-gold px-3 py-1.5 text-xs shrink-0 disabled:opacity-50",disabled:se,title:"Park this issue for a human — cancels the wait without touching the worktree; a resume continues with whichever agents are then set",onClick:At,children:"Park for human"})]}),Nn&&ye&&r.jsxs("div",{className:"mb-4 p-3 rounded border border-cyber-teal/35 bg-cyber-teal/5 space-y-1.5",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-cyber-teal animate-pulse","aria-hidden":!0}),r.jsx("p",{className:"text-xs text-cyber-teal font-medium uppercase tracking-wide",children:"Running now"})]}),r.jsxs("p",{className:"text-sm text-white/90",children:[r.jsx("span",{className:"capitalize",children:ye.role}),ye.runtime?` · ${ye.runtime}`:"",ye.model?` · ${ye.model}`:"",` · round ${ye.round}`]}),r.jsxs("p",{className:"text-sm text-[#C4B643] truncate",title:Kt??S.currentIntent??"session started",children:["Last progress: ",Kt??S.currentIntent??"session started"]}),it&&r.jsxs("p",{className:`text-xs ${yd(it)?"text-amber-300":"text-white/55"}`,title:pd(it),children:["Branch tip: ",it.tipLabel,xd(it)]}),Kt&&S.currentIntent&&!/session running/i.test(S.currentIntent)&&!Yj(S.currentIntent,Kt)&&r.jsx("p",{className:"text-xs text-white/45 truncate",title:S.currentIntent,children:S.currentIntent}),r.jsxs("p",{className:"text-xs text-white/45",children:["Heartbeat ",$j(ye.heartbeatAt),Rs(ye.worktreePath)?` · ${Rs(ye.worktreePath)}`:""]}),ye.logPath&&r.jsxs("p",{className:"text-xs text-white/40 font-mono break-all",title:ye.logPath,children:["Log: ",Rs(ye.logPath)??ye.logPath]})]}),_n&&ut&&r.jsxs("div",{className:"mb-4 p-3 rounded border border-red-400/30 bg-red-500/10 space-y-1.5",children:[r.jsx("p",{className:"text-xs text-red-300 font-medium uppercase tracking-wide",children:"Latest session failure"}),r.jsx("p",{className:"text-sm text-white/90 whitespace-pre-wrap break-words",children:ut.reason}),r.jsxs("p",{className:"text-xs text-white/45",children:[ut.role?r.jsx("span",{className:"capitalize",children:ut.role}):"Worker",ut.outcome?` · ${ut.outcome}`:"",` · ${new Date(ut.when).toLocaleString()}`,` · infra ${ut.infraAttempts}/${ut.maxInfraAttempts}`]}),it&&r.jsxs("p",{className:`text-xs ${yd(it)?"text-amber-300":"text-white/55"}`,title:pd(it),children:["Branch tip: ",it.tipLabel,xd(it)]}),ut.logPath&&r.jsxs("p",{className:"text-xs text-white/40 font-mono break-all",title:ut.logPath,children:["Log: ",Rs(ut.logPath)??ut.logPath]})]}),it&&!Nn&&!_n&&r.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-white/[0.03] space-y-1",children:[r.jsx("p",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Branch tip"}),r.jsxs("p",{className:`text-sm ${yd(it)?"text-amber-300":"text-white/80"}`,title:pd(it),children:[it.tipLabel,xd(it)]})]}),!de.ok&&!jt.some(G=>G.actionType==="product_scope_decision")&&r.jsx("div",{className:"mb-4 p-3 rounded border border-amber-400/30 bg-amber-500/10",children:r.jsxs("p",{className:"text-xs text-amber-300 font-medium",children:["Not startable yet — missing: ",de.missing.join(", ")]})}),jt.length>0&&r.jsxs("div",{className:"mb-4 p-3 rounded border border-red-400/30 bg-red-500/10 space-y-2",children:[r.jsx("p",{className:"text-xs text-red-300 font-medium",children:"Human action needed"}),jt.map(G=>{const we=G.actionType==="product_scope_decision";if(G.actionType==="operator_verification"){const tt=lj(G),Dt=oe[G.id]??"",$a=Dt.trim().length>0;return r.jsx(Ts,{action:G,hideChoicesHint:!0,children:r.jsxs("div",{className:"space-y-1",children:[r.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:"Result note (required) — paste the probe output, waiver reason, or repair note",value:Dt,disabled:se,onChange:ct=>Me(oa=>({...oa,[G.id]:ct.target.value}))}),r.jsx("div",{className:"flex flex-wrap gap-2",children:tt.map(ct=>r.jsx("button",{type:"button",className:"btn-gold px-3 py-1 text-xs disabled:opacity-50",disabled:se||!$a,title:$a?void 0:"Enter the result note first — the server requires it",onClick:()=>Ha(G.id,ct.choice,Dt),children:ct.label},ct.choice))})]})},G.id)}return we?r.jsx(Ts,{action:G,hideChoicesHint:!0,children:de.ok&&r.jsxs("div",{className:"space-y-1",children:[r.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:D[G.id]??"",disabled:se,onChange:tt=>K(Dt=>({...Dt,[G.id]:tt.target.value}))}),r.jsx("button",{type:"button",className:"btn-gold px-3 py-1 text-xs",disabled:se,onClick:()=>Ha(G.id,"resume",D[G.id]),children:"Resume"})]})},G.id):r.jsx(Ts,{action:G,disabled:se,onChoose:tt=>Ha(G.id,tt)},G.id)})]}),Fa&&r.jsx("div",{className:"mb-4",children:r.jsx(mv,{variant:"parked",agents:s,initialDeveloperId:S.developerAgentId,initialReviewerId:S.reviewerAgentId,busy:se,notice:pt,onSave:(G,we)=>void Wt(G,we)},`${S.developerAgentId??""}:${S.reviewerAgentId??""}`)}),He&&!U&&r.jsx("button",{type:"button",className:"font-ui-display mb-4 text-xs text-cyber-teal hover:underline",onClick:Ei,children:"Edit title / description / acceptance criteria"}),U&&r.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[r.jsx("input",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:E,onChange:G=>H(G.target.value),placeholder:"Title"}),r.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",rows:2,value:M,onChange:G=>q(G.target.value),placeholder:"Description"}),r.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",rows:2,value:J,onChange:G=>W(G.target.value),placeholder:"Acceptance criteria"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("button",{type:"button",className:"btn-gold px-4 py-1.5 text-sm",disabled:se,onClick:Ft,children:"Save"}),r.jsx("button",{type:"button",className:"font-ui-display px-4 py-1.5 text-sm text-white/60 hover:text-white",onClick:()=>Q(!1),children:"Cancel"})]})]}),(S.status==="ready"||S.status==="needs_human"&&jt.length===0)&&r.jsxs("div",{className:"mb-4 space-y-2",children:[qa&&r.jsxs("p",{className:"text-sm text-amber-200/90",children:["Fix before Start: ",Ja]}),ke&&r.jsx("p",{className:"text-sm text-amber-200/90",children:ke}),r.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.jsx("button",{type:"button",className:"btn-gold px-4 py-2 disabled:opacity-50",disabled:!de.ok||se||!!qa,title:qa?Ja:"Run next — move to the front of the admission queue; runs now if a slot is free, otherwise waits first with a reason",onClick:An,children:"Run next"}),r.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:!de.ok||se||!!qa,title:qa?Ja:"Execute now — start immediately, skipping queue order; refuses (changing nothing) when capacity, readiness, blockers, or agent health prevents it",onClick:Lt,children:"Execute now"}),ll?r.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:se,onClick:Ml,children:"Remove from queue"}):r.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:se||Wa,title:"Add to queue — append to the end of the admission queue; does not start anything now",onClick:kn,children:"Add to queue"})]}),ll&&il&&!ge&&r.jsx("p",{className:"text-xs text-white/40",children:"Queued — edit repository / agents from the Configuration section above; position is kept."})]}),r.jsx(Bj,{issueId:n}),r.jsx("div",{className:"border-t border-white/10 pt-3",children:r.jsx(Cj,{events:$})}),r.jsxs("div",{className:"mt-4 flex gap-2",children:[r.jsx("input",{className:"flex-1 bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"Guide this issue…",value:w,onChange:G=>N(G.target.value),onKeyDown:G=>G.key==="Enter"&&Pa()}),r.jsx("button",{type:"button",className:"btn-gold px-4",onClick:Pa,children:"Send"})]}),_t&&r.jsxs("details",{className:"mt-6",children:[r.jsx("summary",{className:"text-xs text-white/45 cursor-pointer hover:text-white/70",children:"More actions"}),r.jsxs("div",{className:"mt-2 space-y-2",children:[r.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."}),lt?r.jsx(Vj,{busy:se,onConfirm:()=>void sl(),onCancel:()=>ft(!1)}):r.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:se,title:"Retire this issue without running it — removes any queue entry, keeps history as closed work",onClick:()=>ft(!0),children:"Close issue"})]})]}),r.jsxs("details",{className:"mt-6",onToggle:G=>G.currentTarget.open&&En(),children:[r.jsx("summary",{className:"text-xs text-white/45 cursor-pointer hover:text-white/70",children:"Evidence & raw trace"}),m?r.jsxs("div",{className:"mt-2 space-y-3 text-xs text-white/60",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-white/45 mb-1",children:"Worker sessions"}),m.workerSessions.map(G=>{const we=m.usageEvents.filter(ct=>ct.workerSessionId===G.id),tt=we.reduce((ct,oa)=>ct+(oa.costUsd??0),0),Dt=we.reduce((ct,oa)=>ct+(oa.tokensIn??0),0),$a=we.reduce((ct,oa)=>ct+(oa.tokensOut??0),0);return r.jsxs("p",{children:[G.role," round ",G.round," · ",G.status,G.startedAt&&G.completedAt?` · ${md(new Date(G.completedAt).getTime()-new Date(G.startedAt).getTime())}`:"",we.length>0?` · $${tt.toFixed(3)} · ${Dt}→${$a} tok`:""]},G.id)}),m.workerSessions.length===0&&r.jsx("p",{className:"text-white/35",children:"None yet."})]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-white/45 mb-1",children:"Artifacts"}),m.artifacts.map(G=>{const we=y[G.id];return r.jsxs("details",{className:"mb-1.5",onToggle:tt=>tt.currentTarget.open&&G.blobPath&&xt(G.id),children:[r.jsxs("summary",{className:"cursor-pointer hover:text-white/80",children:[G.kind," · ",new Date(G.createdAt).toLocaleString()]}),r.jsxs("div",{className:"mt-1 pl-3 border-l border-white/10 space-y-1",children:[G.contentJson&&r.jsx("pre",{className:"whitespace-pre-wrap break-words text-white/55",children:Hj(G.contentJson)}),G.blobPath&&r.jsxs("div",{children:[r.jsxs("p",{className:"text-white/40",children:["Raw trace: ",G.blobPath]}),(we==null?void 0:we.loading)&&r.jsx("p",{className:"text-white/35",children:"Loading trace…"}),(we==null?void 0:we.error)&&r.jsx("p",{className:"text-red-300/80",children:we.error}),we&&!we.loading&&!we.error&&r.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:we.content||"(empty)"})]}),!G.contentJson&&!G.blobPath&&r.jsx("p",{className:"text-white/35",children:"No content recorded."})]})]},G.id)}),m.artifacts.length===0&&r.jsx("p",{className:"text-white/35",children:"None yet."})]})]}):r.jsx("p",{className:"text-xs text-white/40 mt-2",children:"Loading…"})]})]})})}function Ij({issueId:n,agents:l,onHumanActionsChanged:s}){const[u,d]=b.useState(null),[f,m]=b.useState(null),[x,y]=b.useState(!1),v=()=>ev(n).then(w=>{d(w),m(null),y(!1)}).catch(w=>{const N=String(w).replace(/^Error:\s*/i,"").trim();/^not found$/i.test(N)?(y(!0),m(null),d(null)):(m(N),y(!1))});return b.useEffect(()=>{d(null),m(null),y(!1),v();const w=setInterval(v,4e3);return()=>clearInterval(w)},[n]),x?r.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-10",children:r.jsxs("div",{className:"max-w-md space-y-3",children:[r.jsx("h2",{className:"text-lg font-semibold text-white/90",children:"Issue not found"}),r.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."}),r.jsx(ua,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]})}):f?r.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-6 space-y-3",children:[r.jsx("p",{className:"text-red-300 text-sm",children:f}),r.jsx(ua,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]}):u?r.jsx(Xj,{issueId:n,detail:u,agents:l,onHumanActionsChanged:s,refresh:v,onError:w=>m(w)},n):r.jsx("div",{className:"p-6 text-white/50 text-sm",children:"Loading…"})}function Kj(){return r.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-10",children:r.jsxs("div",{className:"max-w-md space-y-3",children:[r.jsx("h2",{className:"font-ui-display text-lg font-semibold text-white/90",children:"Page not found"}),r.jsx("p",{className:"text-sm text-white/55",children:"That URL is not a destination in Agent Dealer."}),r.jsx(ua,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]})})}function Jj(){return r.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0 overflow-hidden","aria-hidden":!0,children:[r.jsx("div",{className:"absolute top-16 left-12",children:r.jsx("div",{className:"ambient-orb ambient-orb-a w-[26rem] h-[26rem] rounded-full bg-cyan-500/10 blur-3xl"})}),r.jsx("div",{className:"absolute bottom-20 right-12",children:r.jsx("div",{className:"ambient-orb ambient-orb-b w-[26rem] h-[26rem] rounded-full bg-pink-500/10 blur-3xl"})}),r.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",children:r.jsx("div",{className:"ambient-orb ambient-orb-c w-[22rem] h-[22rem] rounded-full bg-blue-500/[0.07] blur-3xl"})})]})}function Fj({className:n="w-5 h-5"}){return r.jsxs("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:n,"aria-hidden":!0,children:[r.jsx("circle",{cx:"6.75",cy:"6.25",r:"3.25"}),r.jsx("circle",{cx:"13.5",cy:"6.75",r:"2.85",opacity:"0.85"}),r.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 Wj="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 Pj({className:n="",size:l=36}){return r.jsx("img",{src:Wj,alt:"",width:l,height:l,className:`shrink-0 object-contain ${n}`,"aria-hidden":!0,draggable:!1})}const ju={unsupported:"not reported by provider",missing:"no data yet",expired:"expired",unparsable:"provider data unparsable",stale:"stale"},Ix="5H",Kx="1W",eN=new Set(["claude_code","codex_local","muse_code"]),tN="billing_cycle",aN="1M",nN=new Set(Ht.options),lN={critical:"font-medium text-red-300",warning:"font-medium text-yellow-300",normal:"font-medium text-white/75"};function iN(n){return{fiveHour:n.find(l=>l.criticalRole==="five_hour")??null,weekly:n.find(l=>l.criticalRole==="weekly")??null}}function pv(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 Jx(n,l,s,u,d=null){if($y(n,l)){const f=Math.round(n.remainingPercent??0),m=n.resetAt?`, resets ${new Date(n.resetAt).toLocaleString()}`:"",x=d?`, ${d}`:"";return`${u}: ${f}% available (${100-f}% used${x}${m})`}return`${u}: N/A (${ju[pv(n,l,s)]})`}function Ld(n,l,s,u,d,f=null){if($y(n,s)){const x=n.remainingPercent??0;return{key:n.windowKey,label:d,kind:"known",remaining:Math.round(x),rawRemaining:x,detail:Jx(n,s,l.unavailableReason,d,f),isCritical:u}}const m=pv(n,s,l.unavailableReason);return{key:n.windowKey,label:d,kind:"unknown",reason:m,detail:Jx(n,s,l.unavailableReason,d,f),isCritical:u}}function Fx(n,l){const s=l.unavailableReason??"missing";return{key:`missing:${n}`,label:n,kind:"unknown",reason:s,detail:`${n}: N/A (${ju[s]})`,isCritical:!0}}function sN(n,l,s){return Ld(n,l,s,!0,aN,"current billing cycle")}function rN(n,l=Date.now()){return n.runtimes.map(s=>{const u=Aa(s.runtime),d=s.runtime;if(s.runtime==="cursor_local"){const f=s.windows.find(x=>x.windowKey===tN)??null;if(f===null)return{runtime:u,runtimeKey:d,windows:[],exhausted:!1,detail:`N/A (${ju[s.unavailableReason??"missing"]})`};const m=sN(f,s,l);return{runtime:u,runtimeKey:d,windows:[m],exhausted:m.kind==="known"&&m.rawRemaining===0,detail:m.detail}}if(eN.has(s.runtime)){const{fiveHour:f,weekly:m}=iN(s.windows),x=f!==null?Ld(f,s,l,!0,Ix):Fx(Ix,s),y=m!==null?Ld(m,s,l,!0,Kx):Fx(Kx,s),v=[x,y],w=v.some(U=>U.kind==="known"&&U.rawRemaining===0),N=v.map(U=>U.detail).join("; ");return{runtime:u,runtimeKey:d,windows:v,exhausted:w,detail:N}}return{runtime:u,runtimeKey:d,windows:[],exhausted:!1,detail:`N/A (${ju[s.unavailableReason??"missing"]})`}})}function Wx(n){return n.exhausted?`${n.runtime} exhausted — a capacity window is at 0%: ${n.detail}`:`${n.runtime}: ${n.detail}`}function uN({state:n,nowMs:l}){if(n.status==="loading")return r.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:[r.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Capacity"}),r.jsx("span",{"aria-live":"polite",children:"loading…"})]});if(n.status==="unavailable")return r.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:[r.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Capacity"}),r.jsx("span",{children:"unavailable"})]});const s=rN(n.data,l),u=s.length===0||s.every(d=>!d.windows.some(f=>f.kind==="known"));return r.jsxs("span",{"data-testid":"topbar-capacity","data-status":u?"unknown":"ready",title:s.length===0?"Agent capacity: no runtime accounts reported":s.map(Wx).join(" · "),className:"inline-flex min-w-0 max-w-full flex-wrap items-center gap-x-3 gap-y-1 text-xs",children:[r.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Capacity"}),s.length===0?r.jsx("span",{className:"whitespace-nowrap text-white/35",children:"N/A"}):s.map(d=>{const f=d.windows.some(m=>m.kind==="known");return r.jsxs("span",{"data-testid":`topbar-capacity-${d.runtime}`,"data-known":f?"true":"false","data-exhausted":d.exhausted?"true":"false",title:Wx(d),role:"group","aria-label":`${nN.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:[r.jsx(rv,{runtime:d.runtimeKey,className:"h-4 w-4 shrink-0"}),d.windows.length===0?r.jsx("span",{className:"text-white/35",children:"N/A"}):r.jsx("span",{className:"inline-flex flex-col leading-tight",children:d.windows.map(m=>r.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:[r.jsx("span",{className:"text-white/40",children:m.label}),m.kind==="known"?(()=>{const x=iv(m.rawRemaining);return r.jsxs("span",{"data-severity":x,className:lN[x],children:[m.remaining,"%"]})})():r.jsx("span",{className:"text-white/35",children:"N/A"})]},m.key))})]},d.runtime)})]})}const Px=5e3;function vd({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 cN({agents:n,onHumanActionsChanged:l}){const{issueId:s}=Sb();return s?r.jsx(Ij,{issueId:s,agents:n,onHumanActionsChanged:l},s):r.jsx(vy,{to:"/issues",replace:!0})}function oN({openHumanActionCount:n,agentCount:l,agentIssueCount:s,capacity:u={status:"loading"}}){return r.jsxs("header",{className:"px-6 py-3 border-b border-white/10 flex flex-wrap gap-4 items-center justify-between glass-header shrink-0",children:[r.jsxs("div",{className:"flex items-center gap-6",children:[r.jsxs(ua,{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:[r.jsx(Pj,{size:40}),r.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"})]}),r.jsxs("nav",{className:"flex gap-1",children:[r.jsxs(su,{to:"/issues",className:vd,children:["Issues",n>0&&r.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:[r.jsx(wu,{className:"w-3 h-3 shrink-0"}),n]})]}),r.jsx(su,{to:"/reports/execution",className:vd,children:"Reports"})]})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 min-w-0",children:[r.jsx(uN,{state:u}),r.jsxs(su,{to:"/agents",className:({isActive:d})=>`${vd({isActive:d})} inline-flex items-center gap-1.5 transition-colors`,"aria-label":"Agents",title:"Agents",children:[r.jsx(Fj,{className:"w-6 h-6 shrink-0"}),r.jsx("span",{children:"Agents"}),l>0&&r.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&&r.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:[r.jsx(wu,{className:"w-3 h-3 shrink-0"}),s]})]})]})]})}function dN(){const[n,l]=b.useState([]),[s,u]=b.useState(0),[d,f]=b.useState(!1),[m,x]=b.useState([]),[y,v]=b.useState({status:"loading"}),w=b.useCallback(()=>{D2().then(({agents:E,issueCount:H})=>{l(E),u(H)}).catch(console.error),Py().then(E=>f(E.connected)).catch(()=>f(!1)),Wy().then(E=>v({status:"ready",data:E})).catch(()=>v({status:"unavailable"}))},[]),N=b.useCallback(()=>tS().then(x).catch(()=>{}),[]);b.useEffect(()=>{w();const E=setInterval(w,Px);return()=>clearInterval(E)},[w]),b.useEffect(()=>{N();const E=setInterval(()=>void N(),Px);return()=>clearInterval(E)},[N]);const U=m.length,Q=n.length;return r.jsxs(r.Fragment,{children:[r.jsx(Jj,{}),r.jsxs("div",{className:"relative z-10 min-h-screen flex flex-col",children:[r.jsx(oN,{openHumanActionCount:U,agentCount:Q,agentIssueCount:s,capacity:y}),r.jsx("main",{className:"flex-1 flex overflow-hidden",children:r.jsxs(zb,{children:[r.jsx(_l,{path:"/",element:r.jsx(vy,{to:"/issues",replace:!0})}),r.jsx(_l,{path:"/issues",element:r.jsx(oj,{agents:n,humanActions:m,onHumanActionsChanged:N})}),r.jsx(_l,{path:"/issues/:issueId",element:r.jsx(cN,{agents:n,onHumanActionsChanged:N})}),r.jsx(_l,{path:"/agents",element:r.jsx(ES,{agents:n,agentDeckOnline:d,onRefresh:w})}),r.jsx(_l,{path:"/reports/execution",element:r.jsx(wj,{})}),r.jsx(_l,{path:"*",element:r.jsx(Kj,{})})]})})]})]})}function fN(){return typeof document>"u"?Promise.resolve():document.fonts.load('13px "Monaco"').then(()=>{}).catch(()=>{})}fN();U0.createRoot(document.getElementById("root")).render(r.jsx(b.StrictMode,{children:r.jsx(u1,{children:r.jsx(dN,{})})}));
|