agent-dealer 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/server/dist/adapters/linear-inbox.js +9 -5
- package/bundle/server/dist/capacity/adapter.js +2 -0
- package/bundle/server/dist/capacity/claude-events.js +18 -0
- package/bundle/server/dist/capacity/claude-events.test.js +7 -0
- package/bundle/server/dist/capacity/codex-app-server.js +100 -10
- package/bundle/server/dist/capacity/codex-app-server.test.js +195 -2
- package/bundle/server/dist/capacity/cursor-individual-credentials.js +238 -0
- package/bundle/server/dist/capacity/cursor-individual-credentials.test.js +185 -0
- package/bundle/server/dist/capacity/cursor-individual.js +970 -0
- package/bundle/server/dist/capacity/cursor-individual.test.js +815 -0
- package/bundle/server/dist/capacity/muse.js +94 -43
- package/bundle/server/dist/capacity/muse.test.js +95 -13
- package/bundle/server/dist/capacity/service.js +1 -0
- package/bundle/server/dist/db/index.js +30 -0
- package/bundle/server/dist/db/schema.sql +27 -0
- package/bundle/server/dist/index.js +2 -0
- package/bundle/server/dist/repository/cursor-individual-billing.js +84 -0
- package/bundle/server/dist/repository/repository-mappings.js +46 -0
- package/bundle/server/dist/repository/repository-mappings.test.js +83 -0
- package/bundle/server/dist/repository/runtime-capacity.js +8 -3
- package/bundle/server/dist/repository/runtime-capacity.test.js +4 -0
- package/bundle/server/dist/routes/cursor-individual-billing.test.js +80 -0
- package/bundle/server/dist/routes/index.js +32 -0
- package/bundle/server/dist/routes/intake-linear.test.js +55 -1
- package/bundle/server/dist/routes/repository-mappings.js +22 -0
- package/bundle/server/dist/routes/repository-mappings.test.js +110 -0
- package/bundle/server/dist/routes/runtime-capacity.test.js +72 -2
- package/bundle/server/package.json +2 -2
- package/bundle/server/static-ui/assets/index-0GDYfbaM.js +60 -0
- package/bundle/server/static-ui/assets/index-DUYzboWh.css +1 -0
- package/bundle/server/static-ui/index.html +2 -2
- package/bundle/shared/dist/index.d.ts +6 -6
- package/bundle/shared/dist/linear-intake.d.ts +71 -0
- package/bundle/shared/dist/linear-intake.js +90 -0
- package/bundle/shared/dist/linear-intake.test.js +80 -1
- package/bundle/shared/dist/runtime-capacity.d.ts +89 -0
- package/bundle/shared/dist/runtime-capacity.js +60 -0
- package/bundle/shared/dist/runtime-capacity.test.js +1 -0
- package/bundle/shared/package.json +1 -1
- package/dist/doctor.js +6 -0
- package/package.json +1 -1
- package/bundle/server/static-ui/assets/index-ChnI0F02.css +0 -1
- package/bundle/server/static-ui/assets/index-CyB1573Q.js +0 -60
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.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 Ro={exports:{}},os={};/**
|
|
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 Lp;function e0(){if(Lp)return os;Lp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(u,d,f){var m=null;if(f!==void 0&&(m=""+f),d.key!==void 0&&(m=""+d.key),"key"in d){f={};for(var y in d)y!=="key"&&(f[y]=d[y])}else f=d;return d=f.ref,{$$typeof:n,type:u,key:m,ref:d!==void 0?d:null,props:f}}return os.Fragment=i,os.jsx=s,os.jsxs=s,os}var Up;function t0(){return Up||(Up=1,Ro.exports=e0()),Ro.exports}var c=t0(),ko={exports:{}},ve={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var zp;function a0(){if(zp)return ve;zp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),m=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),z=Symbol.iterator;function K(j){return j===null||typeof j!="object"?null:(j=z&&j[z]||j["@@iterator"],typeof j=="function"?j:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$=Object.assign,M={};function Y(j,B,G){this.props=j,this.context=B,this.refs=M,this.updater=G||O}Y.prototype.isReactComponent={},Y.prototype.setState=function(j,B){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,B,"setState")},Y.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function J(){}J.prototype=Y.prototype;function ne(j,B,G){this.props=j,this.context=B,this.refs=M,this.updater=G||O}var pe=ne.prototype=new J;pe.constructor=ne,$(pe,Y.prototype),pe.isPureReactComponent=!0;var I=Array.isArray;function Ee(){}var X={H:null,A:null,T:null,S:null},be=Object.prototype.hasOwnProperty;function $e(j,B,G){var P=G.ref;return{$$typeof:n,type:j,key:B,ref:P!==void 0?P:null,props:G}}function gt(j,B){return $e(j.type,B,j.props)}function xt(j){return typeof j=="object"&&j!==null&&j.$$typeof===n}function et(j){var B={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(G){return B[G]})}var Ct=/\/+/g;function He(j,B){return typeof j=="object"&&j!==null&&j.key!=null?et(""+j.key):B.toString(36)}function ie(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(Ee,Ee):(j.status="pending",j.then(function(B){j.status==="pending"&&(j.status="fulfilled",j.value=B)},function(B){j.status==="pending"&&(j.status="rejected",j.reason=B)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function L(j,B,G,P,re){var ce=typeof j;(ce==="undefined"||ce==="boolean")&&(j=null);var Ce=!1;if(j===null)Ce=!0;else switch(ce){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(j.$$typeof){case n:case i:Ce=!0;break;case b:return Ce=j._init,L(Ce(j._payload),B,G,P,re)}}if(Ce)return re=re(j),Ce=P===""?"."+He(j,0):P,I(re)?(G="",Ce!=null&&(G=Ce.replace(Ct,"$&/")+"/"),L(re,B,G,"",function(ot){return ot})):re!=null&&(xt(re)&&(re=gt(re,G+(re.key==null||j&&j.key===re.key?"":(""+re.key).replace(Ct,"$&/")+"/")+Ce)),B.push(re)),1;Ce=0;var nt=P===""?".":P+":";if(I(j))for(var fe=0;fe<j.length;fe++)P=j[fe],ce=nt+He(P,fe),Ce+=L(P,B,G,ce,re);else if(fe=K(j),typeof fe=="function")for(j=fe.call(j),fe=0;!(P=j.next()).done;)P=P.value,ce=nt+He(P,fe++),Ce+=L(P,B,G,ce,re);else if(ce==="object"){if(typeof j.then=="function")return L(ie(j),B,G,P,re);throw B=String(j),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function F(j,B,G){if(j==null)return j;var P=[],re=0;return L(j,P,"","",function(ce){return B.call(G,ce,re++)}),P}function oe(j){if(j._status===-1){var B=j._result;B=B(),B.then(function(G){(j._status===0||j._status===-1)&&(j._status=1,j._result=G)},function(G){(j._status===0||j._status===-1)&&(j._status=2,j._result=G)}),j._status===-1&&(j._status=0,j._result=B)}if(j._status===1)return j._result.default;throw j._result}var _e=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},Me={map:F,forEach:function(j,B,G){F(j,function(){B.apply(this,arguments)},G)},count:function(j){var B=0;return F(j,function(){B++}),B},toArray:function(j){return F(j,function(B){return B})||[]},only:function(j){if(!xt(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return ve.Activity=N,ve.Children=Me,ve.Component=Y,ve.Fragment=s,ve.Profiler=d,ve.PureComponent=ne,ve.StrictMode=u,ve.Suspense=v,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,ve.__COMPILER_RUNTIME={__proto__:null,c:function(j){return X.H.useMemoCache(j)}},ve.cache=function(j){return function(){return j.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(j,B,G){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var P=$({},j.props),re=j.key;if(B!=null)for(ce in B.key!==void 0&&(re=""+B.key),B)!be.call(B,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&B.ref===void 0||(P[ce]=B[ce]);var ce=arguments.length-2;if(ce===1)P.children=G;else if(1<ce){for(var Ce=Array(ce),nt=0;nt<ce;nt++)Ce[nt]=arguments[nt+2];P.children=Ce}return $e(j.type,re,P)},ve.createContext=function(j){return j={$$typeof:m,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:f,_context:j},j},ve.createElement=function(j,B,G){var P,re={},ce=null;if(B!=null)for(P in B.key!==void 0&&(ce=""+B.key),B)be.call(B,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(re[P]=B[P]);var Ce=arguments.length-2;if(Ce===1)re.children=G;else if(1<Ce){for(var nt=Array(Ce),fe=0;fe<Ce;fe++)nt[fe]=arguments[fe+2];re.children=nt}if(j&&j.defaultProps)for(P in Ce=j.defaultProps,Ce)re[P]===void 0&&(re[P]=Ce[P]);return $e(j,ce,re)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(j){return{$$typeof:y,render:j}},ve.isValidElement=xt,ve.lazy=function(j){return{$$typeof:b,_payload:{_status:-1,_result:j},_init:oe}},ve.memo=function(j,B){return{$$typeof:g,type:j,compare:B===void 0?null:B}},ve.startTransition=function(j){var B=X.T,G={};X.T=G;try{var P=j(),re=X.S;re!==null&&re(G,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(Ee,_e)}catch(ce){_e(ce)}finally{B!==null&&G.types!==null&&(B.types=G.types),X.T=B}},ve.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},ve.use=function(j){return X.H.use(j)},ve.useActionState=function(j,B,G){return X.H.useActionState(j,B,G)},ve.useCallback=function(j,B){return X.H.useCallback(j,B)},ve.useContext=function(j){return X.H.useContext(j)},ve.useDebugValue=function(){},ve.useDeferredValue=function(j,B){return X.H.useDeferredValue(j,B)},ve.useEffect=function(j,B){return X.H.useEffect(j,B)},ve.useEffectEvent=function(j){return X.H.useEffectEvent(j)},ve.useId=function(){return X.H.useId()},ve.useImperativeHandle=function(j,B,G){return X.H.useImperativeHandle(j,B,G)},ve.useInsertionEffect=function(j,B){return X.H.useInsertionEffect(j,B)},ve.useLayoutEffect=function(j,B){return X.H.useLayoutEffect(j,B)},ve.useMemo=function(j,B){return X.H.useMemo(j,B)},ve.useOptimistic=function(j,B){return X.H.useOptimistic(j,B)},ve.useReducer=function(j,B,G){return X.H.useReducer(j,B,G)},ve.useRef=function(j){return X.H.useRef(j)},ve.useState=function(j){return X.H.useState(j)},ve.useSyncExternalStore=function(j,B,G){return X.H.useSyncExternalStore(j,B,G)},ve.useTransition=function(){return X.H.useTransition()},ve.version="19.2.7",ve}var Bp;function vd(){return Bp||(Bp=1,ko.exports=a0()),ko.exports}var S=vd(),Oo={exports:{}},ds={},Mo={exports:{}},Do={};/**
|
|
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 qp;function n0(){return qp||(qp=1,(function(n){function i(L,F){var oe=L.length;L.push(F);e:for(;0<oe;){var _e=oe-1>>>1,Me=L[_e];if(0<d(Me,F))L[_e]=F,L[oe]=Me,oe=_e;else break e}}function s(L){return L.length===0?null:L[0]}function u(L){if(L.length===0)return null;var F=L[0],oe=L.pop();if(oe!==F){L[0]=oe;e:for(var _e=0,Me=L.length,j=Me>>>1;_e<j;){var B=2*(_e+1)-1,G=L[B],P=B+1,re=L[P];if(0>d(G,oe))P<Me&&0>d(re,G)?(L[_e]=re,L[P]=oe,_e=P):(L[_e]=G,L[B]=oe,_e=B);else if(P<Me&&0>d(re,oe))L[_e]=re,L[P]=oe,_e=P;else break e}}return F}function d(L,F){var oe=L.sortIndex-F.sortIndex;return oe!==0?oe:L.id-F.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var m=Date,y=m.now();n.unstable_now=function(){return m.now()-y}}var v=[],g=[],b=1,N=null,z=3,K=!1,O=!1,$=!1,M=!1,Y=typeof setTimeout=="function"?setTimeout:null,J=typeof clearTimeout=="function"?clearTimeout:null,ne=typeof setImmediate<"u"?setImmediate:null;function pe(L){for(var F=s(g);F!==null;){if(F.callback===null)u(g);else if(F.startTime<=L)u(g),F.sortIndex=F.expirationTime,i(v,F);else break;F=s(g)}}function I(L){if($=!1,pe(L),!O)if(s(v)!==null)O=!0,Ee||(Ee=!0,et());else{var F=s(g);F!==null&&ie(I,F.startTime-L)}}var Ee=!1,X=-1,be=5,$e=-1;function gt(){return M?!0:!(n.unstable_now()-$e<be)}function xt(){if(M=!1,Ee){var L=n.unstable_now();$e=L;var F=!0;try{e:{O=!1,$&&($=!1,J(X),X=-1),K=!0;var oe=z;try{t:{for(pe(L),N=s(v);N!==null&&!(N.expirationTime>L&>());){var _e=N.callback;if(typeof _e=="function"){N.callback=null,z=N.priorityLevel;var Me=_e(N.expirationTime<=L);if(L=n.unstable_now(),typeof Me=="function"){N.callback=Me,pe(L),F=!0;break t}N===s(v)&&u(v),pe(L)}else u(v);N=s(v)}if(N!==null)F=!0;else{var j=s(g);j!==null&&ie(I,j.startTime-L),F=!1}}break e}finally{N=null,z=oe,K=!1}F=void 0}}finally{F?et():Ee=!1}}}var et;if(typeof ne=="function")et=function(){ne(xt)};else if(typeof MessageChannel<"u"){var Ct=new MessageChannel,He=Ct.port2;Ct.port1.onmessage=xt,et=function(){He.postMessage(null)}}else et=function(){Y(xt,0)};function ie(L,F){X=Y(function(){L(n.unstable_now())},F)}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(L){L.callback=null},n.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):be=0<L?Math.floor(1e3/L):5},n.unstable_getCurrentPriorityLevel=function(){return z},n.unstable_next=function(L){switch(z){case 1:case 2:case 3:var F=3;break;default:F=z}var oe=z;z=F;try{return L()}finally{z=oe}},n.unstable_requestPaint=function(){M=!0},n.unstable_runWithPriority=function(L,F){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var oe=z;z=L;try{return F()}finally{z=oe}},n.unstable_scheduleCallback=function(L,F,oe){var _e=n.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?_e+oe:_e):oe=_e,L){case 1:var Me=-1;break;case 2:Me=250;break;case 5:Me=1073741823;break;case 4:Me=1e4;break;default:Me=5e3}return Me=oe+Me,L={id:b++,callback:F,priorityLevel:L,startTime:oe,expirationTime:Me,sortIndex:-1},oe>_e?(L.sortIndex=oe,i(g,L),s(v)===null&&L===s(g)&&($?(J(X),X=-1):$=!0,ie(I,oe-_e))):(L.sortIndex=Me,i(v,L),O||K||(O=!0,Ee||(Ee=!0,et()))),L},n.unstable_shouldYield=gt,n.unstable_wrapCallback=function(L){var F=z;return function(){var oe=z;z=F;try{return L.apply(this,arguments)}finally{z=oe}}}})(Do)),Do}var Hp;function l0(){return Hp||(Hp=1,Mo.exports=n0()),Mo.exports}var Lo={exports:{}},Tt={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var $p;function i0(){if($p)return Tt;$p=1;var n=vd();function i(v){var g="https://react.dev/errors/"+v;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+v+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var u={d:{f:s,r:function(){throw Error(i(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(v,g,b){var N=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:N==null?null:""+N,children:v,containerInfo:g,implementation:b}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(v,g){if(v==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Tt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Tt.createPortal=function(v,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(i(299));return f(v,g,null,b)},Tt.flushSync=function(v){var g=m.T,b=u.p;try{if(m.T=null,u.p=2,v)return v()}finally{m.T=g,u.p=b,u.d.f()}},Tt.preconnect=function(v,g){typeof v=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,u.d.C(v,g))},Tt.prefetchDNS=function(v){typeof v=="string"&&u.d.D(v)},Tt.preinit=function(v,g){if(typeof v=="string"&&g&&typeof g.as=="string"){var b=g.as,N=y(b,g.crossOrigin),z=typeof g.integrity=="string"?g.integrity:void 0,K=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?u.d.S(v,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:N,integrity:z,fetchPriority:K}):b==="script"&&u.d.X(v,{crossOrigin:N,integrity:z,fetchPriority:K,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Tt.preinitModule=function(v,g){if(typeof v=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=y(g.as,g.crossOrigin);u.d.M(v,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&u.d.M(v)},Tt.preload=function(v,g){if(typeof v=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,N=y(b,g.crossOrigin);u.d.L(v,b,{crossOrigin:N,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Tt.preloadModule=function(v,g){if(typeof v=="string")if(g){var b=y(g.as,g.crossOrigin);u.d.m(v,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else u.d.m(v)},Tt.requestFormReset=function(v){u.d.r(v)},Tt.unstable_batchedUpdates=function(v,g){return v(g)},Tt.useFormState=function(v,g,b){return m.H.useFormState(v,g,b)},Tt.useFormStatus=function(){return m.H.useHostTransitionStatus()},Tt.version="19.2.7",Tt}var Vp;function s0(){if(Vp)return Lo.exports;Vp=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(i){console.error(i)}}return n(),Lo.exports=i0(),Lo.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 Yp;function r0(){if(Yp)return ds;Yp=1;var n=l0(),i=vd(),s=s0();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(f(e)!==e)throw Error(u(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,l=t;;){var r=a.return;if(r===null)break;var o=r.alternate;if(o===null){if(l=r.return,l!==null){a=l;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===a)return v(r),e;if(o===l)return v(r),t;o=o.sibling}throw Error(u(188))}if(a.return!==l.return)a=r,l=o;else{for(var h=!1,x=r.child;x;){if(x===a){h=!0,a=r,l=o;break}if(x===l){h=!0,l=r,a=o;break}x=x.sibling}if(!h){for(x=o.child;x;){if(x===a){h=!0,a=o,l=r;break}if(x===l){h=!0,l=o,a=r;break}x=x.sibling}if(!h)throw Error(u(189))}}if(a.alternate!==l)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var N=Object.assign,z=Symbol.for("react.element"),K=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),ne=Symbol.for("react.context"),pe=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),Ee=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),be=Symbol.for("react.lazy"),$e=Symbol.for("react.activity"),gt=Symbol.for("react.memo_cache_sentinel"),xt=Symbol.iterator;function et(e){return e===null||typeof e!="object"?null:(e=xt&&e[xt]||e["@@iterator"],typeof e=="function"?e:null)}var Ct=Symbol.for("react.client.reference");function He(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ct?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $:return"Fragment";case Y:return"Profiler";case M:return"StrictMode";case I:return"Suspense";case Ee:return"SuspenseList";case $e:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case O:return"Portal";case ne:return e.displayName||"Context";case J:return(e._context.displayName||"Context")+".Consumer";case pe: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:He(e.type)||"Memo";case be:t=e._payload,e=e._init;try{return He(e(t))}catch{}}return null}var ie=Array.isArray,L=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},_e=[],Me=-1;function j(e){return{current:e}}function B(e){0>Me||(e.current=_e[Me],_e[Me]=null,Me--)}function G(e,t){Me++,_e[Me]=e.current,e.current=t}var P=j(null),re=j(null),ce=j(null),Ce=j(null);function nt(e,t){switch(G(ce,t),G(re,e),G(P,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?lp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=lp(t),e=ip(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(P),G(P,e)}function fe(){B(P),B(re),B(ce)}function ot(e){e.memoizedState!==null&&G(Ce,e);var t=P.current,a=ip(t,e.type);t!==a&&(G(re,e),G(P,a))}function ea(e){re.current===e&&(B(P),B(re)),Ce.current===e&&(B(Ce),ss._currentValue=oe)}var lt,ga;function ba(e){if(lt===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);lt=t&&t[1]||"",ga=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+lt+e+ga}var wa=!1;function Dt(e,t){if(!e||wa)return"";wa=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(D){var k=D}Reflect.construct(e,[],H)}else{try{H.call()}catch(D){k=D}e.call(H.prototype)}}else{try{throw Error()}catch(D){k=D}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(D){if(D&&k&&typeof D.stack=="string")return[D.stack,k.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=l.DetermineComponentFrameRoot(),h=o[0],x=o[1];if(h&&x){var w=h.split(`
|
|
44
|
-
`),T=x.split(`
|
|
45
|
-
`);for(r=l=0;l<w.length&&!w[l].includes("DetermineComponentFrameRoot");)l++;for(;r<T.length&&!T[r].includes("DetermineComponentFrameRoot");)r++;if(l===w.length||r===T.length)for(l=w.length-1,r=T.length-1;1<=l&&0<=r&&w[l]!==T[r];)r--;for(;1<=l&&0<=r;l--,r--)if(w[l]!==T[r]){if(l!==1||r!==1)do if(l--,r--,0>r||w[l]!==T[r]){var U=`
|
|
46
|
-
`+w[l].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),U}while(1<=l&&0<=r);break}}}finally{wa=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ba(a):""}function Ya(e,t){switch(e.tag){case 26:case 27:case 5:return ba(e.type);case 16:return ba("Lazy");case 13:return e.child!==t&&t!==null?ba("Suspense Fallback"):ba("Suspense");case 19:return ba("SuspenseList");case 0:case 15:return Dt(e.type,!1);case 11:return Dt(e.type.render,!1);case 1:return Dt(e.type,!0);case 31:return ba("Activity");default:return""}}function Sa(e){try{var t="",a=null;do t+=Ya(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
-
Error generating stack: `+l.message+`
|
|
48
|
-
`+l.stack}}var Rt=Object.prototype.hasOwnProperty,Fe=n.unstable_scheduleCallback,mn=n.unstable_cancelCallback,vl=n.unstable_shouldYield,gl=n.unstable_requestPaint,yt=n.unstable_now,St=n.unstable_getCurrentPriorityLevel,bl=n.unstable_ImmediatePriority,wl=n.unstable_UserBlockingPriority,pn=n.unstable_NormalPriority,yi=n.unstable_LowPriority,Gn=n.unstable_IdlePriority,vi=n.log,Sl=n.unstable_setDisableYieldValue,ja=null,Z=null;function we(e){if(typeof vi=="function"&&Sl(e),Z&&typeof Z.setStrictMode=="function")try{Z.setStrictMode(ja,e)}catch{}}var Ue=Math.clz32?Math.clz32:_a,Qn=Math.log,jl=Math.LN2;function _a(e){return e>>>=0,e===0?32:31-(Qn(e)/jl|0)|0}var R=256,ue=262144,Ve=4194304;function kt(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 As(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var r=0,o=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var x=l&134217727;return x!==0?(l=x&~o,l!==0?r=kt(l):(h&=x,h!==0?r=kt(h):a||(a=x&~e,a!==0&&(r=kt(a))))):(x=l&~o,x!==0?r=kt(x):h!==0?r=kt(h):a||(a=l&~e,a!==0&&(r=kt(a)))),r===0?0:t!==0&&t!==r&&(t&o)===0&&(o=r&-r,a=t&-t,o>=a||o===32&&(a&4194048)!==0)?t:r}function gi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $y(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 Bd(){var e=Ve;return Ve<<=1,(Ve&62914560)===0&&(Ve=4194304),e}function yu(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function bi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Vy(e,t,a,l,r,o){var h=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var x=e.entanglements,w=e.expirationTimes,T=e.hiddenUpdates;for(a=h&~a;0<a;){var U=31-Ue(a),H=1<<U;x[U]=0,w[U]=-1;var k=T[U];if(k!==null)for(T[U]=null,U=0;U<k.length;U++){var D=k[U];D!==null&&(D.lane&=-536870913)}a&=~H}l!==0&&qd(e,l,0),o!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=o&~(h&~t))}function qd(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Ue(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Hd(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-Ue(a),r=1<<l;r&t|e[l]&t&&(e[l]|=t),a&=~r}}function $d(e,t){var a=t&-t;return a=(a&42)!==0?1:vu(a),(a&(e.suspendedLanes|t))!==0?0:a}function vu(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 gu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vd(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:Cp(e.type))}function Yd(e,t){var a=F.p;try{return F.p=e,t()}finally{F.p=a}}var xn=Math.random().toString(36).slice(2),jt="__reactFiber$"+xn,Lt="__reactProps$"+xn,_l="__reactContainer$"+xn,bu="__reactEvents$"+xn,Yy="__reactListeners$"+xn,Zy="__reactHandles$"+xn,Zd="__reactResources$"+xn,wi="__reactMarker$"+xn;function wu(e){delete e[jt],delete e[Lt],delete e[bu],delete e[Yy],delete e[Zy]}function Nl(e){var t=e[jt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[_l]||a[jt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=fp(e);e!==null;){if(a=e[jt])return a;e=fp(e)}return t}e=a,a=e.parentNode}return null}function Al(e){if(e=e[jt]||e[_l]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Si(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function El(e){var t=e[Zd];return t||(t=e[Zd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function bt(e){e[wi]=!0}var Gd=new Set,Qd={};function Xn(e,t){Cl(e,t),Cl(e+"Capture",t)}function Cl(e,t){for(Qd[e]=t,e=0;e<t.length;e++)Gd.add(t[e])}var Gy=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]*$"),Xd={},Kd={};function Qy(e){return Rt.call(Kd,e)?!0:Rt.call(Xd,e)?!1:Gy.test(e)?Kd[e]=!0:(Xd[e]=!0,!1)}function Es(e,t,a){if(Qy(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Cs(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 Za(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function ta(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Jd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Xy(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var r=l.get,o=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(h){a=""+h,o.call(this,h)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(h){a=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Su(e){if(!e._valueTracker){var t=Jd(e)?"checked":"value";e._valueTracker=Xy(e,t,""+e[t])}}function Id(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Jd(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Ts(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 Ky=/[\n"\\]/g;function aa(e){return e.replace(Ky,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ju(e,t,a,l,r,o,h,x){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+ta(t)):e.value!==""+ta(t)&&(e.value=""+ta(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?_u(e,h,ta(t)):a!=null?_u(e,h,ta(a)):l!=null&&e.removeAttribute("value"),r==null&&o!=null&&(e.defaultChecked=!!o),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+ta(x):e.removeAttribute("name")}function Fd(e,t,a,l,r,o,h,x){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||a!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Su(e);return}a=a!=null?""+ta(a):"",t=t!=null?""+ta(t):a,x||t===e.value||(e.value=t),e.defaultValue=t}l=l??r,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=x?e.checked:!!l,e.defaultChecked=!!l,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Su(e)}function _u(e,t,a){t==="number"&&Ts(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Tl(e,t,a,l){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&l&&(e[a].defaultSelected=!0)}else{for(a=""+ta(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,l&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Wd(e,t,a){if(t!=null&&(t=""+ta(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+ta(a):""}function Pd(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(u(92));if(ie(l)){if(1<l.length)throw Error(u(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=ta(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Su(e)}function Rl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Jy=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 ef(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||Jy.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function tf(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var r in t)l=t[r],t.hasOwnProperty(r)&&a[r]!==l&&ef(e,r,l)}else for(var o in t)t.hasOwnProperty(o)&&ef(e,o,t[o])}function Nu(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 Iy=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"]]),Fy=/^[\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 Rs(e){return Fy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ga(){}var Au=null;function Eu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var kl=null,Ol=null;function af(e){var t=Al(e);if(t&&(e=t.stateNode)){var a=e[Lt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ju(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="'+aa(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var r=l[Lt]||null;if(!r)throw Error(u(90));ju(l,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Id(l)}break e;case"textarea":Wd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Tl(e,!!a.multiple,t,!1)}}}var Cu=!1;function nf(e,t,a){if(Cu)return e(t,a);Cu=!0;try{var l=e(t);return l}finally{if(Cu=!1,(kl!==null||Ol!==null)&&(yr(),kl&&(t=kl,e=Ol,Ol=kl=null,af(t),e)))for(t=0;t<e.length;t++)af(e[t])}}function ji(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Lt]||null;if(l===null)return null;a=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var Qa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tu=!1;if(Qa)try{var _i={};Object.defineProperty(_i,"passive",{get:function(){Tu=!0}}),window.addEventListener("test",_i,_i),window.removeEventListener("test",_i,_i)}catch{Tu=!1}var yn=null,Ru=null,ks=null;function lf(){if(ks)return ks;var e,t=Ru,a=t.length,l,r="value"in yn?yn.value:yn.textContent,o=r.length;for(e=0;e<a&&t[e]===r[e];e++);var h=a-e;for(l=1;l<=h&&t[a-l]===r[o-l];l++);return ks=r.slice(e,1<l?1-l:void 0)}function Os(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 Ms(){return!0}function sf(){return!1}function Ut(e){function t(a,l,r,o,h){this._reactName=a,this._targetInst=r,this.type=l,this.nativeEvent=o,this.target=h,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(a=e[x],this[x]=a?a(o):o[x]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Ms:sf,this.isPropagationStopped=sf,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=Ms)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ms)},persist:function(){},isPersistent:Ms}),t}var Kn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ds=Ut(Kn),Ni=N({},Kn,{view:0,detail:0}),Wy=Ut(Ni),ku,Ou,Ai,Ls=N({},Ni,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Du,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!==Ai&&(Ai&&e.type==="mousemove"?(ku=e.screenX-Ai.screenX,Ou=e.screenY-Ai.screenY):Ou=ku=0,Ai=e),ku)},movementY:function(e){return"movementY"in e?e.movementY:Ou}}),rf=Ut(Ls),Py=N({},Ls,{dataTransfer:0}),ev=Ut(Py),tv=N({},Ni,{relatedTarget:0}),Mu=Ut(tv),av=N({},Kn,{animationName:0,elapsedTime:0,pseudoElement:0}),nv=Ut(av),lv=N({},Kn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),iv=Ut(lv),sv=N({},Kn,{data:0}),uf=Ut(sv),rv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uv={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},cv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ov(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=cv[e])?!!t[e]:!1}function Du(){return ov}var dv=N({},Ni,{key:function(e){if(e.key){var t=rv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Os(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?uv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Du,charCode:function(e){return e.type==="keypress"?Os(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Os(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),fv=Ut(dv),hv=N({},Ls,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cf=Ut(hv),mv=N({},Ni,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Du}),pv=Ut(mv),xv=N({},Kn,{propertyName:0,elapsedTime:0,pseudoElement:0}),yv=Ut(xv),vv=N({},Ls,{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}),gv=Ut(vv),bv=N({},Kn,{newState:0,oldState:0}),wv=Ut(bv),Sv=[9,13,27,32],Lu=Qa&&"CompositionEvent"in window,Ei=null;Qa&&"documentMode"in document&&(Ei=document.documentMode);var jv=Qa&&"TextEvent"in window&&!Ei,of=Qa&&(!Lu||Ei&&8<Ei&&11>=Ei),df=" ",ff=!1;function hf(e,t){switch(e){case"keyup":return Sv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ml=!1;function _v(e,t){switch(e){case"compositionend":return mf(t);case"keypress":return t.which!==32?null:(ff=!0,df);case"textInput":return e=t.data,e===df&&ff?null:e;default:return null}}function Nv(e,t){if(Ml)return e==="compositionend"||!Lu&&hf(e,t)?(e=lf(),ks=Ru=yn=null,Ml=!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 of&&t.locale!=="ko"?null:t.data;default:return null}}var Av={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 pf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Av[e.type]:t==="textarea"}function xf(e,t,a,l){kl?Ol?Ol.push(l):Ol=[l]:kl=l,t=_r(t,"onChange"),0<t.length&&(a=new Ds("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Ci=null,Ti=null;function Ev(e){Wm(e,0)}function Us(e){var t=Si(e);if(Id(t))return e}function yf(e,t){if(e==="change")return t}var vf=!1;if(Qa){var Uu;if(Qa){var zu="oninput"in document;if(!zu){var gf=document.createElement("div");gf.setAttribute("oninput","return;"),zu=typeof gf.oninput=="function"}Uu=zu}else Uu=!1;vf=Uu&&(!document.documentMode||9<document.documentMode)}function bf(){Ci&&(Ci.detachEvent("onpropertychange",wf),Ti=Ci=null)}function wf(e){if(e.propertyName==="value"&&Us(Ti)){var t=[];xf(t,Ti,e,Eu(e)),nf(Ev,t)}}function Cv(e,t,a){e==="focusin"?(bf(),Ci=t,Ti=a,Ci.attachEvent("onpropertychange",wf)):e==="focusout"&&bf()}function Tv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Us(Ti)}function Rv(e,t){if(e==="click")return Us(t)}function kv(e,t){if(e==="input"||e==="change")return Us(t)}function Ov(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Gt=typeof Object.is=="function"?Object.is:Ov;function Ri(e,t){if(Gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var r=a[l];if(!Rt.call(t,r)||!Gt(e[r],t[r]))return!1}return!0}function Sf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jf(e,t){var a=Sf(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Sf(a)}}function _f(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_f(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ts(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=Ts(e.document)}return t}function Bu(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 Mv=Qa&&"documentMode"in document&&11>=document.documentMode,Dl=null,qu=null,ki=null,Hu=!1;function Af(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Hu||Dl==null||Dl!==Ts(l)||(l=Dl,"selectionStart"in l&&Bu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ki&&Ri(ki,l)||(ki=l,l=_r(qu,"onSelect"),0<l.length&&(t=new Ds("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Dl)))}function Jn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Ll={animationend:Jn("Animation","AnimationEnd"),animationiteration:Jn("Animation","AnimationIteration"),animationstart:Jn("Animation","AnimationStart"),transitionrun:Jn("Transition","TransitionRun"),transitionstart:Jn("Transition","TransitionStart"),transitioncancel:Jn("Transition","TransitionCancel"),transitionend:Jn("Transition","TransitionEnd")},$u={},Ef={};Qa&&(Ef=document.createElement("div").style,"AnimationEvent"in window||(delete Ll.animationend.animation,delete Ll.animationiteration.animation,delete Ll.animationstart.animation),"TransitionEvent"in window||delete Ll.transitionend.transition);function In(e){if($u[e])return $u[e];if(!Ll[e])return e;var t=Ll[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Ef)return $u[e]=t[a];return e}var Cf=In("animationend"),Tf=In("animationiteration"),Rf=In("animationstart"),Dv=In("transitionrun"),Lv=In("transitionstart"),Uv=In("transitioncancel"),kf=In("transitionend"),Of=new Map,Vu="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(" ");Vu.push("scrollEnd");function Na(e,t){Of.set(e,t),Xn(t,[e])}var zs=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)},na=[],Ul=0,Yu=0;function Bs(){for(var e=Ul,t=Yu=Ul=0;t<e;){var a=na[t];na[t++]=null;var l=na[t];na[t++]=null;var r=na[t];na[t++]=null;var o=na[t];if(na[t++]=null,l!==null&&r!==null){var h=l.pending;h===null?r.next=r:(r.next=h.next,h.next=r),l.pending=r}o!==0&&Mf(a,r,o)}}function qs(e,t,a,l){na[Ul++]=e,na[Ul++]=t,na[Ul++]=a,na[Ul++]=l,Yu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Zu(e,t,a,l){return qs(e,t,a,l),Hs(e)}function Fn(e,t){return qs(e,null,null,t),Hs(e)}function Mf(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var r=!1,o=e.return;o!==null;)o.childLanes|=a,l=o.alternate,l!==null&&(l.childLanes|=a),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(r=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,r&&t!==null&&(r=31-Ue(a),e=o.hiddenUpdates,l=e[r],l===null?e[r]=[t]:l.push(t),t.lane=a|536870912),o):null}function Hs(e){if(50<Pi)throw Pi=0,Pc=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var zl={};function zv(e,t,a,l){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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qt(e,t,a,l){return new zv(e,t,a,l)}function Gu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xa(e,t){var a=e.alternate;return a===null?(a=Qt(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 Df(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 $s(e,t,a,l,r,o){var h=0;if(l=e,typeof e=="function")Gu(e)&&(h=1);else if(typeof e=="string")h=Vg(e,a,P.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case $e:return e=Qt(31,a,t,r),e.elementType=$e,e.lanes=o,e;case $:return Wn(a.children,r,o,t);case M:h=8,r|=24;break;case Y:return e=Qt(12,a,t,r|2),e.elementType=Y,e.lanes=o,e;case I:return e=Qt(13,a,t,r),e.elementType=I,e.lanes=o,e;case Ee:return e=Qt(19,a,t,r),e.elementType=Ee,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ne:h=10;break e;case J:h=9;break e;case pe:h=11;break e;case X:h=14;break e;case be:h=16,l=null;break e}h=29,a=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=Qt(h,a,t,r),t.elementType=e,t.type=l,t.lanes=o,t}function Wn(e,t,a,l){return e=Qt(7,e,l,t),e.lanes=a,e}function Qu(e,t,a){return e=Qt(6,e,null,t),e.lanes=a,e}function Lf(e){var t=Qt(18,null,null,0);return t.stateNode=e,t}function Xu(e,t,a){return t=Qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Uf=new WeakMap;function la(e,t){if(typeof e=="object"&&e!==null){var a=Uf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Sa(t)},Uf.set(e,t),t)}return{value:e,source:t,stack:Sa(t)}}var Bl=[],ql=0,Vs=null,Oi=0,ia=[],sa=0,vn=null,La=1,Ua="";function Ka(e,t){Bl[ql++]=Oi,Bl[ql++]=Vs,Vs=e,Oi=t}function zf(e,t,a){ia[sa++]=La,ia[sa++]=Ua,ia[sa++]=vn,vn=e;var l=La;e=Ua;var r=32-Ue(l)-1;l&=~(1<<r),a+=1;var o=32-Ue(t)+r;if(30<o){var h=r-r%5;o=(l&(1<<h)-1).toString(32),l>>=h,r-=h,La=1<<32-Ue(t)+r|a<<r|l,Ua=o+e}else La=1<<o|a<<r|l,Ua=e}function Ku(e){e.return!==null&&(Ka(e,1),zf(e,1,0))}function Ju(e){for(;e===Vs;)Vs=Bl[--ql],Bl[ql]=null,Oi=Bl[--ql],Bl[ql]=null;for(;e===vn;)vn=ia[--sa],ia[sa]=null,Ua=ia[--sa],ia[sa]=null,La=ia[--sa],ia[sa]=null}function Bf(e,t){ia[sa++]=La,ia[sa++]=Ua,ia[sa++]=vn,La=t.id,Ua=t.overflow,vn=e}var _t=null,We=null,Oe=!1,gn=null,ra=!1,Iu=Error(u(519));function bn(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Mi(la(t,e)),Iu}function qf(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[jt]=e,t[Lt]=l,a){case"dialog":Ae("cancel",t),Ae("close",t);break;case"iframe":case"object":case"embed":Ae("load",t);break;case"video":case"audio":for(a=0;a<ts.length;a++)Ae(ts[a],t);break;case"source":Ae("error",t);break;case"img":case"image":case"link":Ae("error",t),Ae("load",t);break;case"details":Ae("toggle",t);break;case"input":Ae("invalid",t),Fd(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),Pd(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||ap(t.textContent,a)?(l.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),l.onScroll!=null&&Ae("scroll",t),l.onScrollEnd!=null&&Ae("scrollend",t),l.onClick!=null&&(t.onclick=Ga),t=!0):t=!1,t||bn(e,!0)}function Hf(e){for(_t=e.return;_t;)switch(_t.tag){case 5:case 31:case 13:ra=!1;return;case 27:case 3:ra=!0;return;default:_t=_t.return}}function Hl(e){if(e!==_t)return!1;if(!Oe)return Hf(e),Oe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||po(e.type,e.memoizedProps)),a=!a),a&&We&&bn(e),Hf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));We=dp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));We=dp(e)}else t===27?(t=We,Dn(e.type)?(e=bo,bo=null,We=e):We=t):We=_t?ca(e.stateNode.nextSibling):null;return!0}function Pn(){We=_t=null,Oe=!1}function Fu(){var e=gn;return e!==null&&(Ht===null?Ht=e:Ht.push.apply(Ht,e),gn=null),e}function Mi(e){gn===null?gn=[e]:gn.push(e)}var Wu=j(null),el=null,Ja=null;function wn(e,t,a){G(Wu,t._currentValue),t._currentValue=a}function Ia(e){e._currentValue=Wu.current,B(Wu)}function Pu(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function ec(e,t,a,l){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var o=r.dependencies;if(o!==null){var h=r.child;o=o.firstContext;e:for(;o!==null;){var x=o;o=r;for(var w=0;w<t.length;w++)if(x.context===t[w]){o.lanes|=a,x=o.alternate,x!==null&&(x.lanes|=a),Pu(o.return,a,e),l||(h=null);break e}o=x.next}}else if(r.tag===18){if(h=r.return,h===null)throw Error(u(341));h.lanes|=a,o=h.alternate,o!==null&&(o.lanes|=a),Pu(h,a,e),h=null}else h=r.child;if(h!==null)h.return=r;else for(h=r;h!==null;){if(h===e){h=null;break}if(r=h.sibling,r!==null){r.return=h.return,h=r;break}h=h.return}r=h}}function $l(e,t,a,l){e=null;for(var r=t,o=!1;r!==null;){if(!o){if((r.flags&524288)!==0)o=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var h=r.alternate;if(h===null)throw Error(u(387));if(h=h.memoizedProps,h!==null){var x=r.type;Gt(r.pendingProps.value,h.value)||(e!==null?e.push(x):e=[x])}}else if(r===Ce.current){if(h=r.alternate,h===null)throw Error(u(387));h.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(ss):e=[ss])}r=r.return}e!==null&&ec(t,e,a,l),t.flags|=262144}function Ys(e){for(e=e.firstContext;e!==null;){if(!Gt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function tl(e){el=e,Ja=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Nt(e){return $f(el,e)}function Zs(e,t){return el===null&&tl(e),$f(e,t)}function $f(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ja===null){if(e===null)throw Error(u(308));Ja=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ja=Ja.next=t;return a}var Bv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},qv=n.unstable_scheduleCallback,Hv=n.unstable_NormalPriority,dt={$$typeof:ne,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function tc(){return{controller:new Bv,data:new Map,refCount:0}}function Di(e){e.refCount--,e.refCount===0&&qv(Hv,function(){e.controller.abort()})}var Li=null,ac=0,Vl=0,Yl=null;function $v(e,t){if(Li===null){var a=Li=[];ac=0,Vl=io(),Yl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return ac++,t.then(Vf,Vf),t}function Vf(){if(--ac===0&&Li!==null){Yl!==null&&(Yl.status="fulfilled");var e=Li;Li=null,Vl=0,Yl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Vv(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(l.status="rejected",l.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),l}var Yf=L.S;L.S=function(e,t){Am=yt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&$v(e,t),Yf!==null&&Yf(e,t)};var al=j(null);function nc(){var e=al.current;return e!==null?e:Ie.pooledCache}function Gs(e,t){t===null?G(al,al.current):G(al,t.pool)}function Zf(){var e=nc();return e===null?null:{parent:dt._currentValue,pool:e}}var Zl=Error(u(460)),lc=Error(u(474)),Qs=Error(u(542)),Xs={then:function(){}};function Gf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Qf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ga,Ga),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Kf(e),e;default:if(typeof t.status=="string")t.then(Ga,Ga);else{if(e=Ie,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=l}},function(l){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Kf(e),e}throw ll=t,Zl}}function nl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ll=a,Zl):a}}var ll=null;function Xf(){if(ll===null)throw Error(u(459));var e=ll;return ll=null,e}function Kf(e){if(e===Zl||e===Qs)throw Error(u(483))}var Gl=null,Ui=0;function Ks(e){var t=Ui;return Ui+=1,Gl===null&&(Gl=[]),Qf(Gl,e,t)}function zi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Js(e,t){throw t.$$typeof===z?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Jf(e){function t(A,_){if(e){var C=A.deletions;C===null?(A.deletions=[_],A.flags|=16):C.push(_)}}function a(A,_){if(!e)return null;for(;_!==null;)t(A,_),_=_.sibling;return null}function l(A){for(var _=new Map;A!==null;)A.key!==null?_.set(A.key,A):_.set(A.index,A),A=A.sibling;return _}function r(A,_){return A=Xa(A,_),A.index=0,A.sibling=null,A}function o(A,_,C){return A.index=C,e?(C=A.alternate,C!==null?(C=C.index,C<_?(A.flags|=67108866,_):C):(A.flags|=67108866,_)):(A.flags|=1048576,_)}function h(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function x(A,_,C,q){return _===null||_.tag!==6?(_=Qu(C,A.mode,q),_.return=A,_):(_=r(_,C),_.return=A,_)}function w(A,_,C,q){var de=C.type;return de===$?U(A,_,C.props.children,q,C.key):_!==null&&(_.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===be&&nl(de)===_.type)?(_=r(_,C.props),zi(_,C),_.return=A,_):(_=$s(C.type,C.key,C.props,null,A.mode,q),zi(_,C),_.return=A,_)}function T(A,_,C,q){return _===null||_.tag!==4||_.stateNode.containerInfo!==C.containerInfo||_.stateNode.implementation!==C.implementation?(_=Xu(C,A.mode,q),_.return=A,_):(_=r(_,C.children||[]),_.return=A,_)}function U(A,_,C,q,de){return _===null||_.tag!==7?(_=Wn(C,A.mode,q,de),_.return=A,_):(_=r(_,C),_.return=A,_)}function H(A,_,C){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return _=Qu(""+_,A.mode,C),_.return=A,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case K:return C=$s(_.type,_.key,_.props,null,A.mode,C),zi(C,_),C.return=A,C;case O:return _=Xu(_,A.mode,C),_.return=A,_;case be:return _=nl(_),H(A,_,C)}if(ie(_)||et(_))return _=Wn(_,A.mode,C,null),_.return=A,_;if(typeof _.then=="function")return H(A,Ks(_),C);if(_.$$typeof===ne)return H(A,Zs(A,_),C);Js(A,_)}return null}function k(A,_,C,q){var de=_!==null?_.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return de!==null?null:x(A,_,""+C,q);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case K:return C.key===de?w(A,_,C,q):null;case O:return C.key===de?T(A,_,C,q):null;case be:return C=nl(C),k(A,_,C,q)}if(ie(C)||et(C))return de!==null?null:U(A,_,C,q,null);if(typeof C.then=="function")return k(A,_,Ks(C),q);if(C.$$typeof===ne)return k(A,_,Zs(A,C),q);Js(A,C)}return null}function D(A,_,C,q,de){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return A=A.get(C)||null,x(_,A,""+q,de);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case K:return A=A.get(q.key===null?C:q.key)||null,w(_,A,q,de);case O:return A=A.get(q.key===null?C:q.key)||null,T(_,A,q,de);case be:return q=nl(q),D(A,_,C,q,de)}if(ie(q)||et(q))return A=A.get(C)||null,U(_,A,q,de,null);if(typeof q.then=="function")return D(A,_,C,Ks(q),de);if(q.$$typeof===ne)return D(A,_,C,Zs(_,q),de);Js(_,q)}return null}function te(A,_,C,q){for(var de=null,ze=null,le=_,Se=_=0,Re=null;le!==null&&Se<C.length;Se++){le.index>Se?(Re=le,le=null):Re=le.sibling;var Be=k(A,le,C[Se],q);if(Be===null){le===null&&(le=Re);break}e&&le&&Be.alternate===null&&t(A,le),_=o(Be,_,Se),ze===null?de=Be:ze.sibling=Be,ze=Be,le=Re}if(Se===C.length)return a(A,le),Oe&&Ka(A,Se),de;if(le===null){for(;Se<C.length;Se++)le=H(A,C[Se],q),le!==null&&(_=o(le,_,Se),ze===null?de=le:ze.sibling=le,ze=le);return Oe&&Ka(A,Se),de}for(le=l(le);Se<C.length;Se++)Re=D(le,A,Se,C[Se],q),Re!==null&&(e&&Re.alternate!==null&&le.delete(Re.key===null?Se:Re.key),_=o(Re,_,Se),ze===null?de=Re:ze.sibling=Re,ze=Re);return e&&le.forEach(function(qn){return t(A,qn)}),Oe&&Ka(A,Se),de}function he(A,_,C,q){if(C==null)throw Error(u(151));for(var de=null,ze=null,le=_,Se=_=0,Re=null,Be=C.next();le!==null&&!Be.done;Se++,Be=C.next()){le.index>Se?(Re=le,le=null):Re=le.sibling;var qn=k(A,le,Be.value,q);if(qn===null){le===null&&(le=Re);break}e&&le&&qn.alternate===null&&t(A,le),_=o(qn,_,Se),ze===null?de=qn:ze.sibling=qn,ze=qn,le=Re}if(Be.done)return a(A,le),Oe&&Ka(A,Se),de;if(le===null){for(;!Be.done;Se++,Be=C.next())Be=H(A,Be.value,q),Be!==null&&(_=o(Be,_,Se),ze===null?de=Be:ze.sibling=Be,ze=Be);return Oe&&Ka(A,Se),de}for(le=l(le);!Be.done;Se++,Be=C.next())Be=D(le,A,Se,Be.value,q),Be!==null&&(e&&Be.alternate!==null&&le.delete(Be.key===null?Se:Be.key),_=o(Be,_,Se),ze===null?de=Be:ze.sibling=Be,ze=Be);return e&&le.forEach(function(Pg){return t(A,Pg)}),Oe&&Ka(A,Se),de}function Je(A,_,C,q){if(typeof C=="object"&&C!==null&&C.type===$&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case K:e:{for(var de=C.key;_!==null;){if(_.key===de){if(de=C.type,de===$){if(_.tag===7){a(A,_.sibling),q=r(_,C.props.children),q.return=A,A=q;break e}}else if(_.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===be&&nl(de)===_.type){a(A,_.sibling),q=r(_,C.props),zi(q,C),q.return=A,A=q;break e}a(A,_);break}else t(A,_);_=_.sibling}C.type===$?(q=Wn(C.props.children,A.mode,q,C.key),q.return=A,A=q):(q=$s(C.type,C.key,C.props,null,A.mode,q),zi(q,C),q.return=A,A=q)}return h(A);case O:e:{for(de=C.key;_!==null;){if(_.key===de)if(_.tag===4&&_.stateNode.containerInfo===C.containerInfo&&_.stateNode.implementation===C.implementation){a(A,_.sibling),q=r(_,C.children||[]),q.return=A,A=q;break e}else{a(A,_);break}else t(A,_);_=_.sibling}q=Xu(C,A.mode,q),q.return=A,A=q}return h(A);case be:return C=nl(C),Je(A,_,C,q)}if(ie(C))return te(A,_,C,q);if(et(C)){if(de=et(C),typeof de!="function")throw Error(u(150));return C=de.call(C),he(A,_,C,q)}if(typeof C.then=="function")return Je(A,_,Ks(C),q);if(C.$$typeof===ne)return Je(A,_,Zs(A,C),q);Js(A,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,_!==null&&_.tag===6?(a(A,_.sibling),q=r(_,C),q.return=A,A=q):(a(A,_),q=Qu(C,A.mode,q),q.return=A,A=q),h(A)):a(A,_)}return function(A,_,C,q){try{Ui=0;var de=Je(A,_,C,q);return Gl=null,de}catch(le){if(le===Zl||le===Qs)throw le;var ze=Qt(29,le,null,A.mode);return ze.lanes=q,ze.return=A,ze}finally{}}}var il=Jf(!0),If=Jf(!1),Sn=!1;function ic(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 jn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _n(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(qe&2)!==0){var r=l.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),l.pending=t,t=Hs(e),Mf(e,null,a),t}return qs(e,l,t,a),Hs(e)}function Bi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Hd(e,a)}}function rc(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var r=null,o=null;if(a=a.firstBaseUpdate,a!==null){do{var h={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};o===null?r=o=h:o=o.next=h,a=a.next}while(a!==null);o===null?r=o=t:o=o.next=t}else r=o=t;a={baseState:l.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var uc=!1;function qi(){if(uc){var e=Yl;if(e!==null)throw e}}function Hi(e,t,a,l){uc=!1;var r=e.updateQueue;Sn=!1;var o=r.firstBaseUpdate,h=r.lastBaseUpdate,x=r.shared.pending;if(x!==null){r.shared.pending=null;var w=x,T=w.next;w.next=null,h===null?o=T:h.next=T,h=w;var U=e.alternate;U!==null&&(U=U.updateQueue,x=U.lastBaseUpdate,x!==h&&(x===null?U.firstBaseUpdate=T:x.next=T,U.lastBaseUpdate=w))}if(o!==null){var H=r.baseState;h=0,U=T=w=null,x=o;do{var k=x.lane&-536870913,D=k!==x.lane;if(D?(Te&k)===k:(l&k)===k){k!==0&&k===Vl&&(uc=!0),U!==null&&(U=U.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var te=e,he=x;k=t;var Je=a;switch(he.tag){case 1:if(te=he.payload,typeof te=="function"){H=te.call(Je,H,k);break e}H=te;break e;case 3:te.flags=te.flags&-65537|128;case 0:if(te=he.payload,k=typeof te=="function"?te.call(Je,H,k):te,k==null)break e;H=N({},H,k);break e;case 2:Sn=!0}}k=x.callback,k!==null&&(e.flags|=64,D&&(e.flags|=8192),D=r.callbacks,D===null?r.callbacks=[k]:D.push(k))}else D={lane:k,tag:x.tag,payload:x.payload,callback:x.callback,next:null},U===null?(T=U=D,w=H):U=U.next=D,h|=k;if(x=x.next,x===null){if(x=r.shared.pending,x===null)break;D=x,x=D.next,D.next=null,r.lastBaseUpdate=D,r.shared.pending=null}}while(!0);U===null&&(w=H),r.baseState=w,r.firstBaseUpdate=T,r.lastBaseUpdate=U,o===null&&(r.shared.lanes=0),Tn|=h,e.lanes=h,e.memoizedState=H}}function Ff(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Wf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Ff(a[e],t)}var Ql=j(null),Is=j(0);function Pf(e,t){e=sn,G(Is,e),G(Ql,t),sn=e|t.baseLanes}function cc(){G(Is,sn),G(Ql,Ql.current)}function oc(){sn=Is.current,B(Ql),B(Is)}var Xt=j(null),ua=null;function Nn(e){var t=e.alternate;G(ut,ut.current&1),G(Xt,e),ua===null&&(t===null||Ql.current!==null||t.memoizedState!==null)&&(ua=e)}function dc(e){G(ut,ut.current),G(Xt,e),ua===null&&(ua=e)}function eh(e){e.tag===22?(G(ut,ut.current),G(Xt,e),ua===null&&(ua=e)):An()}function An(){G(ut,ut.current),G(Xt,Xt.current)}function Kt(e){B(Xt),ua===e&&(ua=null),B(ut)}var ut=j(0);function Fs(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||vo(a)||go(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 Fa=0,ge=null,Xe=null,ft=null,Ws=!1,Xl=!1,sl=!1,Ps=0,$i=0,Kl=null,Yv=0;function it(){throw Error(u(321))}function fc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Gt(e[a],t[a]))return!1;return!0}function hc(e,t,a,l,r,o){return Fa=o,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?zh:Cc,sl=!1,o=a(l,r),sl=!1,Xl&&(o=ah(t,a,l,r)),th(e),o}function th(e){L.H=Zi;var t=Xe!==null&&Xe.next!==null;if(Fa=0,ft=Xe=ge=null,Ws=!1,$i=0,Kl=null,t)throw Error(u(300));e===null||ht||(e=e.dependencies,e!==null&&Ys(e)&&(ht=!0))}function ah(e,t,a,l){ge=e;var r=0;do{if(Xl&&(Kl=null),$i=0,Xl=!1,25<=r)throw Error(u(301));if(r+=1,ft=Xe=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}L.H=Bh,o=t(a,l)}while(Xl);return o}function Zv(){var e=L.H,t=e.useState()[0];return t=typeof t.then=="function"?Vi(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(ge.flags|=1024),t}function mc(){var e=Ps!==0;return Ps=0,e}function pc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function xc(e){if(Ws){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ws=!1}Fa=0,ft=Xe=ge=null,Xl=!1,$i=Ps=0,Kl=null}function Ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?ge.memoizedState=ft=e:ft=ft.next=e,ft}function ct(){if(Xe===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ft===null?ge.memoizedState:ft.next;if(t!==null)ft=t,Xe=e;else{if(e===null)throw ge.alternate===null?Error(u(467)):Error(u(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ft===null?ge.memoizedState=ft=e:ft=ft.next=e}return ft}function er(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Vi(e){var t=$i;return $i+=1,Kl===null&&(Kl=[]),e=Qf(Kl,e,t),t=ge,(ft===null?t.memoizedState:ft.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?zh:Cc),e}function tr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Vi(e);if(e.$$typeof===ne)return Nt(e)}throw Error(u(438,String(e)))}function yc(e){var t=null,a=ge.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=ge.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=er(),ge.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=gt;return t.index++,a}function Wa(e,t){return typeof t=="function"?t(e):t}function ar(e){var t=ct();return vc(t,Xe,e)}function vc(e,t,a){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=a;var r=e.baseQueue,o=l.pending;if(o!==null){if(r!==null){var h=r.next;r.next=o.next,o.next=h}t.baseQueue=r=o,l.pending=null}if(o=e.baseState,r===null)e.memoizedState=o;else{t=r.next;var x=h=null,w=null,T=t,U=!1;do{var H=T.lane&-536870913;if(H!==T.lane?(Te&H)===H:(Fa&H)===H){var k=T.revertLane;if(k===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null}),H===Vl&&(U=!0);else if((Fa&k)===k){T=T.next,k===Vl&&(U=!0);continue}else H={lane:0,revertLane:T.revertLane,gesture:null,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},w===null?(x=w=H,h=o):w=w.next=H,ge.lanes|=k,Tn|=k;H=T.action,sl&&a(o,H),o=T.hasEagerState?T.eagerState:a(o,H)}else k={lane:H,revertLane:T.revertLane,gesture:T.gesture,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},w===null?(x=w=k,h=o):w=w.next=k,ge.lanes|=H,Tn|=H;T=T.next}while(T!==null&&T!==t);if(w===null?h=o:w.next=x,!Gt(o,e.memoizedState)&&(ht=!0,U&&(a=Yl,a!==null)))throw a;e.memoizedState=o,e.baseState=h,e.baseQueue=w,l.lastRenderedState=o}return r===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function gc(e){var t=ct(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var l=a.dispatch,r=a.pending,o=t.memoizedState;if(r!==null){a.pending=null;var h=r=r.next;do o=e(o,h.action),h=h.next;while(h!==r);Gt(o,t.memoizedState)||(ht=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),a.lastRenderedState=o}return[o,l]}function nh(e,t,a){var l=ge,r=ct(),o=Oe;if(o){if(a===void 0)throw Error(u(407));a=a()}else a=t();var h=!Gt((Xe||r).memoizedState,a);if(h&&(r.memoizedState=a,ht=!0),r=r.queue,Sc(sh.bind(null,l,r,e),[e]),r.getSnapshot!==t||h||ft!==null&&ft.memoizedState.tag&1){if(l.flags|=2048,Jl(9,{destroy:void 0},ih.bind(null,l,r,a,t),null),Ie===null)throw Error(u(349));o||(Fa&127)!==0||lh(l,t,a)}return a}function lh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ge.updateQueue,t===null?(t=er(),ge.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function ih(e,t,a,l){t.value=a,t.getSnapshot=l,rh(t)&&uh(e)}function sh(e,t,a){return a(function(){rh(t)&&uh(e)})}function rh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Gt(e,a)}catch{return!0}}function uh(e){var t=Fn(e,2);t!==null&&$t(t,e,2)}function bc(e){var t=Ot();if(typeof e=="function"){var a=e;if(e=a(),sl){we(!0);try{a()}finally{we(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wa,lastRenderedState:e},t}function ch(e,t,a,l){return e.baseState=a,vc(e,Xe,typeof l=="function"?l:Wa)}function Gv(e,t,a,l,r){if(ir(e))throw Error(u(485));if(e=t.action,e!==null){var o={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){o.listeners.push(h)}};L.T!==null?a(!0):o.isTransition=!1,l(o),a=t.pending,a===null?(o.next=t.pending=o,oh(t,o)):(o.next=a.next,t.pending=a.next=o)}}function oh(e,t){var a=t.action,l=t.payload,r=e.state;if(t.isTransition){var o=L.T,h={};L.T=h;try{var x=a(r,l),w=L.S;w!==null&&w(h,x),dh(e,t,x)}catch(T){wc(e,t,T)}finally{o!==null&&h.types!==null&&(o.types=h.types),L.T=o}}else try{o=a(r,l),dh(e,t,o)}catch(T){wc(e,t,T)}}function dh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){fh(e,t,l)},function(l){return wc(e,t,l)}):fh(e,t,a)}function fh(e,t,a){t.status="fulfilled",t.value=a,hh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,oh(e,a)))}function wc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,hh(t),t=t.next;while(t!==l)}e.action=null}function hh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function mh(e,t){return t}function ph(e,t){if(Oe){var a=Ie.formState;if(a!==null){e:{var l=ge;if(Oe){if(We){t:{for(var r=We,o=ra;r.nodeType!==8;){if(!o){r=null;break t}if(r=ca(r.nextSibling),r===null){r=null;break t}}o=r.data,r=o==="F!"||o==="F"?r:null}if(r){We=ca(r.nextSibling),l=r.data==="F!";break e}}bn(l)}l=!1}l&&(t=a[0])}}return a=Ot(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mh,lastRenderedState:t},a.queue=l,a=Dh.bind(null,ge,l),l.dispatch=a,l=bc(!1),o=Ec.bind(null,ge,!1,l.queue),l=Ot(),r={state:t,dispatch:null,action:e,pending:null},l.queue=r,a=Gv.bind(null,ge,r,o,a),r.dispatch=a,l.memoizedState=e,[t,a,!1]}function xh(e){var t=ct();return yh(t,Xe,e)}function yh(e,t,a){if(t=vc(e,t,mh)[0],e=ar(Wa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Vi(t)}catch(h){throw h===Zl?Qs:h}else l=t;t=ct();var r=t.queue,o=r.dispatch;return a!==t.memoizedState&&(ge.flags|=2048,Jl(9,{destroy:void 0},Qv.bind(null,r,a),null)),[l,o,e]}function Qv(e,t){e.action=t}function vh(e){var t=ct(),a=Xe;if(a!==null)return yh(t,a,e);ct(),t=t.memoizedState,a=ct();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Jl(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=ge.updateQueue,t===null&&(t=er(),ge.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function gh(){return ct().memoizedState}function nr(e,t,a,l){var r=Ot();ge.flags|=e,r.memoizedState=Jl(1|t,{destroy:void 0},a,l===void 0?null:l)}function lr(e,t,a,l){var r=ct();l=l===void 0?null:l;var o=r.memoizedState.inst;Xe!==null&&l!==null&&fc(l,Xe.memoizedState.deps)?r.memoizedState=Jl(t,o,a,l):(ge.flags|=e,r.memoizedState=Jl(1|t,o,a,l))}function bh(e,t){nr(8390656,8,e,t)}function Sc(e,t){lr(2048,8,e,t)}function Xv(e){ge.flags|=4;var t=ge.updateQueue;if(t===null)t=er(),ge.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function wh(e){var t=ct().memoizedState;return Xv({ref:t,nextImpl:e}),function(){if((qe&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Sh(e,t){return lr(4,2,e,t)}function jh(e,t){return lr(4,4,e,t)}function _h(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 Nh(e,t,a){a=a!=null?a.concat([e]):null,lr(4,4,_h.bind(null,t,e),a)}function jc(){}function Ah(e,t){var a=ct();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&fc(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function Eh(e,t){var a=ct();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&fc(t,l[1]))return l[0];if(l=e(),sl){we(!0);try{e()}finally{we(!1)}}return a.memoizedState=[l,t],l}function _c(e,t,a){return a===void 0||(Fa&1073741824)!==0&&(Te&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Cm(),ge.lanes|=e,Tn|=e,a)}function Ch(e,t,a,l){return Gt(a,t)?a:Ql.current!==null?(e=_c(e,a,l),Gt(e,t)||(ht=!0),e):(Fa&42)===0||(Fa&1073741824)!==0&&(Te&261930)===0?(ht=!0,e.memoizedState=a):(e=Cm(),ge.lanes|=e,Tn|=e,t)}function Th(e,t,a,l,r){var o=F.p;F.p=o!==0&&8>o?o:8;var h=L.T,x={};L.T=x,Ec(e,!1,t,a);try{var w=r(),T=L.S;if(T!==null&&T(x,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var U=Vv(w,l);Yi(e,t,U,Ft(e))}else Yi(e,t,l,Ft(e))}catch(H){Yi(e,t,{then:function(){},status:"rejected",reason:H},Ft())}finally{F.p=o,h!==null&&x.types!==null&&(h.types=x.types),L.T=h}}function Kv(){}function Nc(e,t,a,l){if(e.tag!==5)throw Error(u(476));var r=Rh(e).queue;Th(e,r,t,oe,a===null?Kv:function(){return kh(e),a(l)})}function Rh(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:Wa,lastRenderedState:oe},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function kh(e){var t=Rh(e);t.next===null&&(t=e.alternate.memoizedState),Yi(e,t.next.queue,{},Ft())}function Ac(){return Nt(ss)}function Oh(){return ct().memoizedState}function Mh(){return ct().memoizedState}function Jv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ft();e=jn(a);var l=_n(t,e,a);l!==null&&($t(l,t,a),Bi(l,t,a)),t={cache:tc()},e.payload=t;return}t=t.return}}function Iv(e,t,a){var l=Ft();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ir(e)?Lh(t,a):(a=Zu(e,t,a,l),a!==null&&($t(a,e,l),Uh(a,t,l)))}function Dh(e,t,a){var l=Ft();Yi(e,t,a,l)}function Yi(e,t,a,l){var r={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ir(e))Lh(t,r);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var h=t.lastRenderedState,x=o(h,a);if(r.hasEagerState=!0,r.eagerState=x,Gt(x,h))return qs(e,t,r,0),Ie===null&&Bs(),!1}catch{}finally{}if(a=Zu(e,t,r,l),a!==null)return $t(a,e,l),Uh(a,t,l),!0}return!1}function Ec(e,t,a,l){if(l={lane:2,revertLane:io(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ir(e)){if(t)throw Error(u(479))}else t=Zu(e,a,l,2),t!==null&&$t(t,e,2)}function ir(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function Lh(e,t){Xl=Ws=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Uh(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Hd(e,a)}}var Zi={readContext:Nt,use:tr,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useLayoutEffect:it,useInsertionEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useSyncExternalStore:it,useId:it,useHostTransitionStatus:it,useFormState:it,useActionState:it,useOptimistic:it,useMemoCache:it,useCacheRefresh:it};Zi.useEffectEvent=it;var zh={readContext:Nt,use:tr,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:Nt,useEffect:bh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,nr(4194308,4,_h.bind(null,t,e),a)},useLayoutEffect:function(e,t){return nr(4194308,4,e,t)},useInsertionEffect:function(e,t){nr(4,2,e,t)},useMemo:function(e,t){var a=Ot();t=t===void 0?null:t;var l=e();if(sl){we(!0);try{e()}finally{we(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Ot();if(a!==void 0){var r=a(t);if(sl){we(!0);try{a(t)}finally{we(!1)}}}else r=t;return l.memoizedState=l.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},l.queue=e,e=e.dispatch=Iv.bind(null,ge,e),[l.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:function(e){e=bc(e);var t=e.queue,a=Dh.bind(null,ge,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:jc,useDeferredValue:function(e,t){var a=Ot();return _c(a,e,t)},useTransition:function(){var e=bc(!1);return e=Th.bind(null,ge,e.queue,!0,!1),Ot().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ge,r=Ot();if(Oe){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Ie===null)throw Error(u(349));(Te&127)!==0||lh(l,t,a)}r.memoizedState=a;var o={value:a,getSnapshot:t};return r.queue=o,bh(sh.bind(null,l,o,e),[e]),l.flags|=2048,Jl(9,{destroy:void 0},ih.bind(null,l,o,a,t),null),a},useId:function(){var e=Ot(),t=Ie.identifierPrefix;if(Oe){var a=Ua,l=La;a=(l&~(1<<32-Ue(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ps++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Yv++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ac,useFormState:ph,useActionState:ph,useOptimistic:function(e){var t=Ot();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Ec.bind(null,ge,!0,a),a.dispatch=t,[e,t]},useMemoCache:yc,useCacheRefresh:function(){return Ot().memoizedState=Jv.bind(null,ge)},useEffectEvent:function(e){var t=Ot(),a={impl:e};return t.memoizedState=a,function(){if((qe&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},Cc={readContext:Nt,use:tr,useCallback:Ah,useContext:Nt,useEffect:Sc,useImperativeHandle:Nh,useInsertionEffect:Sh,useLayoutEffect:jh,useMemo:Eh,useReducer:ar,useRef:gh,useState:function(){return ar(Wa)},useDebugValue:jc,useDeferredValue:function(e,t){var a=ct();return Ch(a,Xe.memoizedState,e,t)},useTransition:function(){var e=ar(Wa)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:Vi(e),t]},useSyncExternalStore:nh,useId:Oh,useHostTransitionStatus:Ac,useFormState:xh,useActionState:xh,useOptimistic:function(e,t){var a=ct();return ch(a,Xe,e,t)},useMemoCache:yc,useCacheRefresh:Mh};Cc.useEffectEvent=wh;var Bh={readContext:Nt,use:tr,useCallback:Ah,useContext:Nt,useEffect:Sc,useImperativeHandle:Nh,useInsertionEffect:Sh,useLayoutEffect:jh,useMemo:Eh,useReducer:gc,useRef:gh,useState:function(){return gc(Wa)},useDebugValue:jc,useDeferredValue:function(e,t){var a=ct();return Xe===null?_c(a,e,t):Ch(a,Xe.memoizedState,e,t)},useTransition:function(){var e=gc(Wa)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:Vi(e),t]},useSyncExternalStore:nh,useId:Oh,useHostTransitionStatus:Ac,useFormState:vh,useActionState:vh,useOptimistic:function(e,t){var a=ct();return Xe!==null?ch(a,Xe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:yc,useCacheRefresh:Mh};Bh.useEffectEvent=wh;function Tc(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:N({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Rc={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Ft(),r=jn(l);r.payload=t,a!=null&&(r.callback=a),t=_n(e,r,l),t!==null&&($t(t,e,l),Bi(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Ft(),r=jn(l);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=_n(e,r,l),t!==null&&($t(t,e,l),Bi(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ft(),l=jn(a);l.tag=2,t!=null&&(l.callback=t),t=_n(e,l,a),t!==null&&($t(t,e,a),Bi(t,e,a))}};function qh(e,t,a,l,r,o,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,o,h):t.prototype&&t.prototype.isPureReactComponent?!Ri(a,l)||!Ri(r,o):!0}function Hh(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Rc.enqueueReplaceState(t,t.state,null)}function rl(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=N({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}function $h(e){zs(e)}function Vh(e){console.error(e)}function Yh(e){zs(e)}function sr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Zh(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function kc(e,t,a){return a=jn(a),a.tag=3,a.payload={element:null},a.callback=function(){sr(e,t)},a}function Gh(e){return e=jn(e),e.tag=3,e}function Qh(e,t,a,l){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var o=l.value;e.payload=function(){return r(o)},e.callback=function(){Zh(t,a,l)}}var h=a.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){Zh(t,a,l),typeof r!="function"&&(Rn===null?Rn=new Set([this]):Rn.add(this));var x=l.stack;this.componentDidCatch(l.value,{componentStack:x!==null?x:""})})}function Fv(e,t,a,l,r){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&$l(t,a,r,!0),a=Xt.current,a!==null){switch(a.tag){case 31:case 13:return ua===null?vr():a.alternate===null&&st===0&&(st=3),a.flags&=-257,a.flags|=65536,a.lanes=r,l===Xs?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),ao(e,l,r)),!1;case 22:return a.flags|=65536,l===Xs?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),ao(e,l,r)),!1}throw Error(u(435,a.tag))}return ao(e,l,r),vr(),!1}if(Oe)return t=Xt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,l!==Iu&&(e=Error(u(422),{cause:l}),Mi(la(e,a)))):(l!==Iu&&(t=Error(u(423),{cause:l}),Mi(la(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,l=la(l,a),r=kc(e.stateNode,l,r),rc(e,r),st!==4&&(st=2)),!1;var o=Error(u(520),{cause:l});if(o=la(o,a),Wi===null?Wi=[o]:Wi.push(o),st!==4&&(st=2),t===null)return!0;l=la(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=kc(a.stateNode,l,e),rc(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"&&(Rn===null||!Rn.has(o))))return a.flags|=65536,r&=-r,a.lanes|=r,r=Gh(r),Qh(r,e,a,l),rc(a,r),!1}a=a.return}while(a!==null);return!1}var Oc=Error(u(461)),ht=!1;function At(e,t,a,l){t.child=e===null?If(t,null,a,l):il(t,e.child,a,l)}function Xh(e,t,a,l,r){a=a.render;var o=t.ref;if("ref"in l){var h={};for(var x in l)x!=="ref"&&(h[x]=l[x])}else h=l;return tl(t),l=hc(e,t,a,h,o,r),x=mc(),e!==null&&!ht?(pc(e,t,r),Pa(e,t,r)):(Oe&&x&&Ku(t),t.flags|=1,At(e,t,l,r),t.child)}function Kh(e,t,a,l,r){if(e===null){var o=a.type;return typeof o=="function"&&!Gu(o)&&o.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=o,Jh(e,t,o,l,r)):(e=$s(a.type,null,l,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!Hc(e,r)){var h=o.memoizedProps;if(a=a.compare,a=a!==null?a:Ri,a(h,l)&&e.ref===t.ref)return Pa(e,t,r)}return t.flags|=1,e=Xa(o,l),e.ref=t.ref,e.return=t,t.child=e}function Jh(e,t,a,l,r){if(e!==null){var o=e.memoizedProps;if(Ri(o,l)&&e.ref===t.ref)if(ht=!1,t.pendingProps=l=o,Hc(e,r))(e.flags&131072)!==0&&(ht=!0);else return t.lanes=e.lanes,Pa(e,t,r)}return Mc(e,t,a,l,r)}function Ih(e,t,a,l){var r=l.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|a:a,e!==null){for(l=t.child=e.child,r=0;l!==null;)r=r|l.lanes|l.childLanes,l=l.sibling;l=r&~o}else l=0,t.child=null;return Fh(e,t,o,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Gs(t,o!==null?o.cachePool:null),o!==null?Pf(t,o):cc(),eh(t);else return l=t.lanes=536870912,Fh(e,t,o!==null?o.baseLanes|a:a,a,l)}else o!==null?(Gs(t,o.cachePool),Pf(t,o),An(),t.memoizedState=null):(e!==null&&Gs(t,null),cc(),An());return At(e,t,r,a),t.child}function Gi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Fh(e,t,a,l,r){var o=nc();return o=o===null?null:{parent:dt._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&Gs(t,null),cc(),eh(t),e!==null&&$l(e,t,l,!0),t.childLanes=r,null}function rr(e,t){return t=cr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Wh(e,t,a){return il(t,e.child,null,a),e=rr(t,t.pendingProps),e.flags|=2,Kt(t),t.memoizedState=null,e}function Wv(e,t,a){var l=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Oe){if(l.mode==="hidden")return e=rr(t,l),t.lanes=536870912,Gi(null,e);if(dc(t),(e=We)?(e=op(e,ra),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vn!==null?{id:La,overflow:Ua}:null,retryLane:536870912,hydrationErrors:null},a=Lf(e),a.return=t,t.child=a,_t=t,We=null)):e=null,e===null)throw bn(t);return t.lanes=536870912,null}return rr(t,l)}var o=e.memoizedState;if(o!==null){var h=o.dehydrated;if(dc(t),r)if(t.flags&256)t.flags&=-257,t=Wh(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(ht||$l(e,t,a,!1),r=(a&e.childLanes)!==0,ht||r){if(l=Ie,l!==null&&(h=$d(l,a),h!==0&&h!==o.retryLane))throw o.retryLane=h,Fn(e,h),$t(l,e,h),Oc;vr(),t=Wh(e,t,a)}else e=o.treeContext,We=ca(h.nextSibling),_t=t,Oe=!0,gn=null,ra=!1,e!==null&&Bf(t,e),t=rr(t,l),t.flags|=4096;return t}return e=Xa(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ur(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 Mc(e,t,a,l,r){return tl(t),a=hc(e,t,a,l,void 0,r),l=mc(),e!==null&&!ht?(pc(e,t,r),Pa(e,t,r)):(Oe&&l&&Ku(t),t.flags|=1,At(e,t,a,r),t.child)}function Ph(e,t,a,l,r,o){return tl(t),t.updateQueue=null,a=ah(t,l,a,r),th(e),l=mc(),e!==null&&!ht?(pc(e,t,o),Pa(e,t,o)):(Oe&&l&&Ku(t),t.flags|=1,At(e,t,a,o),t.child)}function em(e,t,a,l,r){if(tl(t),t.stateNode===null){var o=zl,h=a.contextType;typeof h=="object"&&h!==null&&(o=Nt(h)),o=new a(l,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Rc,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=l,o.state=t.memoizedState,o.refs={},ic(t),h=a.contextType,o.context=typeof h=="object"&&h!==null?Nt(h):zl,o.state=t.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(Tc(t,a,h,l),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&&Rc.enqueueReplaceState(o,o.state,null),Hi(t,l,o,r),qi(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){o=t.stateNode;var x=t.memoizedProps,w=rl(a,x);o.props=w;var T=o.context,U=a.contextType;h=zl,typeof U=="object"&&U!==null&&(h=Nt(U));var H=a.getDerivedStateFromProps;U=typeof H=="function"||typeof o.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,U||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(x||T!==h)&&Hh(t,o,l,h),Sn=!1;var k=t.memoizedState;o.state=k,Hi(t,l,o,r),qi(),T=t.memoizedState,x||k!==T||Sn?(typeof H=="function"&&(Tc(t,a,H,l),T=t.memoizedState),(w=Sn||qh(t,a,w,l,k,T,h))?(U||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=l,t.memoizedState=T),o.props=l,o.state=T,o.context=h,l=w):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{o=t.stateNode,sc(e,t),h=t.memoizedProps,U=rl(a,h),o.props=U,H=t.pendingProps,k=o.context,T=a.contextType,w=zl,typeof T=="object"&&T!==null&&(w=Nt(T)),x=a.getDerivedStateFromProps,(T=typeof x=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(h!==H||k!==w)&&Hh(t,o,l,w),Sn=!1,k=t.memoizedState,o.state=k,Hi(t,l,o,r),qi();var D=t.memoizedState;h!==H||k!==D||Sn||e!==null&&e.dependencies!==null&&Ys(e.dependencies)?(typeof x=="function"&&(Tc(t,a,x,l),D=t.memoizedState),(U=Sn||qh(t,a,U,l,k,D,w)||e!==null&&e.dependencies!==null&&Ys(e.dependencies))?(T||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(l,D,w),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(l,D,w)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=D),o.props=l,o.state=D,o.context=w,l=U):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),l=!1)}return o=l,ur(e,t),l=(t.flags&128)!==0,o||l?(o=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&l?(t.child=il(t,e.child,null,r),t.child=il(t,null,a,r)):At(e,t,a,r),t.memoizedState=o.state,e=t.child):e=Pa(e,t,r),e}function tm(e,t,a,l){return Pn(),t.flags|=256,At(e,t,a,l),t.child}var Dc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Lc(e){return{baseLanes:e,cachePool:Zf()}}function Uc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=It),e}function am(e,t,a){var l=t.pendingProps,r=!1,o=(t.flags&128)!==0,h;if((h=o)||(h=e!==null&&e.memoizedState===null?!1:(ut.current&2)!==0),h&&(r=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Oe){if(r?Nn(t):An(),(e=We)?(e=op(e,ra),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vn!==null?{id:La,overflow:Ua}:null,retryLane:536870912,hydrationErrors:null},a=Lf(e),a.return=t,t.child=a,_t=t,We=null)):e=null,e===null)throw bn(t);return go(e)?t.lanes=32:t.lanes=536870912,null}var x=l.children;return l=l.fallback,r?(An(),r=t.mode,x=cr({mode:"hidden",children:x},r),l=Wn(l,r,a,null),x.return=t,l.return=t,x.sibling=l,t.child=x,l=t.child,l.memoizedState=Lc(a),l.childLanes=Uc(e,h,a),t.memoizedState=Dc,Gi(null,l)):(Nn(t),zc(t,x))}var w=e.memoizedState;if(w!==null&&(x=w.dehydrated,x!==null)){if(o)t.flags&256?(Nn(t),t.flags&=-257,t=Bc(e,t,a)):t.memoizedState!==null?(An(),t.child=e.child,t.flags|=128,t=null):(An(),x=l.fallback,r=t.mode,l=cr({mode:"visible",children:l.children},r),x=Wn(x,r,a,null),x.flags|=2,l.return=t,x.return=t,l.sibling=x,t.child=l,il(t,e.child,null,a),l=t.child,l.memoizedState=Lc(a),l.childLanes=Uc(e,h,a),t.memoizedState=Dc,t=Gi(null,l));else if(Nn(t),go(x)){if(h=x.nextSibling&&x.nextSibling.dataset,h)var T=h.dgst;h=T,l=Error(u(419)),l.stack="",l.digest=h,Mi({value:l,source:null,stack:null}),t=Bc(e,t,a)}else if(ht||$l(e,t,a,!1),h=(a&e.childLanes)!==0,ht||h){if(h=Ie,h!==null&&(l=$d(h,a),l!==0&&l!==w.retryLane))throw w.retryLane=l,Fn(e,l),$t(h,e,l),Oc;vo(x)||vr(),t=Bc(e,t,a)}else vo(x)?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,We=ca(x.nextSibling),_t=t,Oe=!0,gn=null,ra=!1,e!==null&&Bf(t,e),t=zc(t,l.children),t.flags|=4096);return t}return r?(An(),x=l.fallback,r=t.mode,w=e.child,T=w.sibling,l=Xa(w,{mode:"hidden",children:l.children}),l.subtreeFlags=w.subtreeFlags&65011712,T!==null?x=Xa(T,x):(x=Wn(x,r,a,null),x.flags|=2),x.return=t,l.return=t,l.sibling=x,t.child=l,Gi(null,l),l=t.child,x=e.child.memoizedState,x===null?x=Lc(a):(r=x.cachePool,r!==null?(w=dt._currentValue,r=r.parent!==w?{parent:w,pool:w}:r):r=Zf(),x={baseLanes:x.baseLanes|a,cachePool:r}),l.memoizedState=x,l.childLanes=Uc(e,h,a),t.memoizedState=Dc,Gi(e.child,l)):(Nn(t),a=e.child,e=a.sibling,a=Xa(a,{mode:"visible",children:l.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 zc(e,t){return t=cr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function cr(e,t){return e=Qt(22,e,null,t),e.lanes=0,e}function Bc(e,t,a){return il(t,e.child,null,a),e=zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nm(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Pu(e.return,t,a)}function qc(e,t,a,l,r,o){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:r,treeForkCount:o}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=l,h.tail=a,h.tailMode=r,h.treeForkCount=o)}function lm(e,t,a){var l=t.pendingProps,r=l.revealOrder,o=l.tail;l=l.children;var h=ut.current,x=(h&2)!==0;if(x?(h=h&1|2,t.flags|=128):h&=1,G(ut,h),At(e,t,l,a),l=Oe?Oi:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nm(e,a,t);else if(e.tag===19)nm(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&Fs(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),qc(t,!1,r,a,o,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Fs(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}qc(t,!0,a,null,o,l);break;case"together":qc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Pa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Tn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if($l(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=Xa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Xa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Hc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ys(e)))}function Pv(e,t,a){switch(t.tag){case 3:nt(t,t.stateNode.containerInfo),wn(t,dt,e.memoizedState.cache),Pn();break;case 27:case 5:ot(t);break;case 4:nt(t,t.stateNode.containerInfo);break;case 10:wn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,dc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Nn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?am(e,t,a):(Nn(t),e=Pa(e,t,a),e!==null?e.sibling:null);Nn(t);break;case 19:var r=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||($l(e,t,a,!1),l=(a&t.childLanes)!==0),r){if(l)return lm(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),G(ut,ut.current),l)break;return null;case 22:return t.lanes=0,Ih(e,t,a,t.pendingProps);case 24:wn(t,dt,e.memoizedState.cache)}return Pa(e,t,a)}function im(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)ht=!0;else{if(!Hc(e,a)&&(t.flags&128)===0)return ht=!1,Pv(e,t,a);ht=(e.flags&131072)!==0}else ht=!1,Oe&&(t.flags&1048576)!==0&&zf(t,Oi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=nl(t.elementType),t.type=e,typeof e=="function")Gu(e)?(l=rl(e,l),t.tag=1,t=em(null,t,e,l,a)):(t.tag=0,t=Mc(null,t,e,l,a));else{if(e!=null){var r=e.$$typeof;if(r===pe){t.tag=11,t=Xh(null,t,e,l,a);break e}else if(r===X){t.tag=14,t=Kh(null,t,e,l,a);break e}}throw t=He(e)||e,Error(u(306,t,""))}}return t;case 0:return Mc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,r=rl(l,t.pendingProps),em(e,t,l,r,a);case 3:e:{if(nt(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var o=t.memoizedState;r=o.element,sc(e,t),Hi(t,l,null,a);var h=t.memoizedState;if(l=h.cache,wn(t,dt,l),l!==o.cache&&ec(t,[dt],a,!0),qi(),l=h.element,o.isDehydrated)if(o={element:l,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=tm(e,t,l,a);break e}else if(l!==r){r=la(Error(u(424)),t),Mi(r),t=tm(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(We=ca(e.firstChild),_t=t,Oe=!0,gn=null,ra=!0,a=If(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Pn(),l===r){t=Pa(e,t,a);break e}At(e,t,l,a)}t=t.child}return t;case 26:return ur(e,t),e===null?(a=xp(t.type,null,t.pendingProps,null))?t.memoizedState=a:Oe||(a=t.type,e=t.pendingProps,l=Nr(ce.current).createElement(a),l[jt]=t,l[Lt]=e,Et(l,a,e),bt(l),t.stateNode=l):t.memoizedState=xp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ot(t),e===null&&Oe&&(l=t.stateNode=hp(t.type,t.pendingProps,ce.current),_t=t,ra=!0,r=We,Dn(t.type)?(bo=r,We=ca(l.firstChild)):We=r),At(e,t,t.pendingProps.children,a),ur(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Oe&&((r=l=We)&&(l=Tg(l,t.type,t.pendingProps,ra),l!==null?(t.stateNode=l,_t=t,We=ca(l.firstChild),ra=!1,r=!0):r=!1),r||bn(t)),ot(t),r=t.type,o=t.pendingProps,h=e!==null?e.memoizedProps:null,l=o.children,po(r,o)?l=null:h!==null&&po(r,h)&&(t.flags|=32),t.memoizedState!==null&&(r=hc(e,t,Zv,null,null,a),ss._currentValue=r),ur(e,t),At(e,t,l,a),t.child;case 6:return e===null&&Oe&&((e=a=We)&&(a=Rg(a,t.pendingProps,ra),a!==null?(t.stateNode=a,_t=t,We=null,e=!0):e=!1),e||bn(t)),null;case 13:return am(e,t,a);case 4:return nt(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=il(t,null,l,a):At(e,t,l,a),t.child;case 11:return Xh(e,t,t.type,t.pendingProps,a);case 7:return At(e,t,t.pendingProps,a),t.child;case 8:return At(e,t,t.pendingProps.children,a),t.child;case 12:return At(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,wn(t,t.type,l.value),At(e,t,l.children,a),t.child;case 9:return r=t.type._context,l=t.pendingProps.children,tl(t),r=Nt(r),l=l(r),t.flags|=1,At(e,t,l,a),t.child;case 14:return Kh(e,t,t.type,t.pendingProps,a);case 15:return Jh(e,t,t.type,t.pendingProps,a);case 19:return lm(e,t,a);case 31:return Wv(e,t,a);case 22:return Ih(e,t,a,t.pendingProps);case 24:return tl(t),l=Nt(dt),e===null?(r=nc(),r===null&&(r=Ie,o=tc(),r.pooledCache=o,o.refCount++,o!==null&&(r.pooledCacheLanes|=a),r=o),t.memoizedState={parent:l,cache:r},ic(t),wn(t,dt,r)):((e.lanes&a)!==0&&(sc(e,t),Hi(t,null,null,a),qi()),r=e.memoizedState,o=t.memoizedState,r.parent!==l?(r={parent:l,cache:l},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),wn(t,dt,l)):(l=o.cache,wn(t,dt,l),l!==r.cache&&ec(t,[dt],a,!0))),At(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function en(e){e.flags|=4}function $c(e,t,a,l,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(Om())e.flags|=8192;else throw ll=Xs,lc}else e.flags&=-16777217}function sm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wp(t))if(Om())e.flags|=8192;else throw ll=Xs,lc}function or(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Bd():536870912,e.lanes|=t,Pl|=t)}function Qi(e,t){if(!Oe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,l|=r.subtreeFlags&65011712,l|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,l|=r.subtreeFlags,l|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function eg(e,t,a){var l=t.pendingProps;switch(Ju(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(t),null;case 1:return Pe(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ia(dt),fe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Hl(t)?en(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Fu())),Pe(t),null;case 26:var r=t.type,o=t.memoizedState;return e===null?(en(t),o!==null?(Pe(t),sm(t,o)):(Pe(t),$c(t,r,null,l,a))):o?o!==e.memoizedState?(en(t),Pe(t),sm(t,o)):(Pe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&en(t),Pe(t),$c(t,r,e,l,a)),null;case 27:if(ea(t),a=ce.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&en(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return Pe(t),null}e=P.current,Hl(t)?qf(t):(e=hp(r,l,a),t.stateNode=e,en(t))}return Pe(t),null;case 5:if(ea(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&en(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return Pe(t),null}if(o=P.current,Hl(t))qf(t);else{var h=Nr(ce.current);switch(o){case 1:o=h.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:o=h.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":o=h.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":o=h.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":o=h.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof l.is=="string"?h.createElement("select",{is:l.is}):h.createElement("select"),l.multiple?o.multiple=!0:l.size&&(o.size=l.size);break;default:o=typeof l.is=="string"?h.createElement(r,{is:l.is}):h.createElement(r)}}o[jt]=t,o[Lt]=l;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(Et(o,r,l),r){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&en(t)}}return Pe(t),$c(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&en(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=ce.current,Hl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,r=_t,r!==null)switch(r.tag){case 27:case 5:l=r.memoizedProps}e[jt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||ap(e.nodeValue,a)),e||bn(t,!0)}else e=Nr(e).createTextNode(l),e[jt]=t,t.stateNode=e}return Pe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Hl(t),a!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[jt]=t}else Pn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),e=!1}else a=Fu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Kt(t),t):(Kt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Pe(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Hl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!r)throw Error(u(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(u(317));r[jt]=t}else Pn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),r=!1}else r=Fu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Kt(t),t):(Kt(t),null)}return Kt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,r=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(r=l.alternate.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==r&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),or(t,t.updateQueue),Pe(t),null);case 4:return fe(),e===null&&co(t.stateNode.containerInfo),Pe(t),null;case 10:return Ia(t.type),Pe(t),null;case 19:if(B(ut),l=t.memoizedState,l===null)return Pe(t),null;if(r=(t.flags&128)!==0,o=l.rendering,o===null)if(r)Qi(l,!1);else{if(st!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Fs(e),o!==null){for(t.flags|=128,Qi(l,!1),e=o.updateQueue,t.updateQueue=e,or(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Df(a,e),a=a.sibling;return G(ut,ut.current&1|2),Oe&&Ka(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&yt()>pr&&(t.flags|=128,r=!0,Qi(l,!1),t.lanes=4194304)}else{if(!r)if(e=Fs(o),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,or(t,e),Qi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!o.alternate&&!Oe)return Pe(t),null}else 2*yt()-l.renderingStartTime>pr&&a!==536870912&&(t.flags|=128,r=!0,Qi(l,!1),t.lanes=4194304);l.isBackwards?(o.sibling=t.child,t.child=o):(e=l.last,e!==null?e.sibling=o:t.child=o,l.last=o)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=yt(),e.sibling=null,a=ut.current,G(ut,r?a&1|2:a&1),Oe&&Ka(t,l.treeForkCount),e):(Pe(t),null);case 22:case 23:return Kt(t),oc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),a=t.updateQueue,a!==null&&or(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&B(al),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ia(dt),Pe(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function tg(e,t){switch(Ju(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ia(dt),fe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ea(t),null;case 31:if(t.memoizedState!==null){if(Kt(t),t.alternate===null)throw Error(u(340));Pn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Kt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Pn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(ut),null;case 4:return fe(),null;case 10:return Ia(t.type),null;case 22:case 23:return Kt(t),oc(),e!==null&&B(al),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ia(dt),null;case 25:return null;default:return null}}function rm(e,t){switch(Ju(t),t.tag){case 3:Ia(dt),fe();break;case 26:case 27:case 5:ea(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&Kt(t);break;case 13:Kt(t);break;case 19:B(ut);break;case 10:Ia(t.type);break;case 22:case 23:Kt(t),oc(),e!==null&&B(al);break;case 24:Ia(dt)}}function Xi(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var r=l.next;a=r;do{if((a.tag&e)===e){l=void 0;var o=a.create,h=a.inst;l=o(),h.destroy=l}a=a.next}while(a!==r)}}catch(x){Ze(t,t.return,x)}}function En(e,t,a){try{var l=t.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var o=r.next;l=o;do{if((l.tag&e)===e){var h=l.inst,x=h.destroy;if(x!==void 0){h.destroy=void 0,r=t;var w=a,T=x;try{T()}catch(U){Ze(r,w,U)}}}l=l.next}while(l!==o)}}catch(U){Ze(t,t.return,U)}}function um(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Wf(t,a)}catch(l){Ze(e,e.return,l)}}}function cm(e,t,a){a.props=rl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Ze(e,t,l)}}function Ki(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(r){Ze(e,t,r)}}function za(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(r){Ze(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){Ze(e,t,r)}else a.current=null}function om(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(r){Ze(e,e.return,r)}}function Vc(e,t,a){try{var l=e.stateNode;jg(l,e.type,a,t),l[Lt]=t}catch(r){Ze(e,e.return,r)}}function dm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dn(e.type)||e.tag===4}function Yc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||dm(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&&Dn(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 Zc(e,t,a){var l=e.tag;if(l===5||l===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=Ga));else if(l!==4&&(l===27&&Dn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,a),e=e.sibling;e!==null;)Zc(e,t,a),e=e.sibling}function dr(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Dn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(dr(e,t,a),e=e.sibling;e!==null;)dr(e,t,a),e=e.sibling}function fm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Et(t,l,a),t[jt]=e,t[Lt]=a}catch(o){Ze(e,e.return,o)}}var tn=!1,mt=!1,Gc=!1,hm=typeof WeakSet=="function"?WeakSet:Set,wt=null;function ag(e,t){if(e=e.containerInfo,ho=Or,e=Nf(e),Bu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var r=l.anchorOffset,o=l.focusNode;l=l.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var h=0,x=-1,w=-1,T=0,U=0,H=e,k=null;t:for(;;){for(var D;H!==a||r!==0&&H.nodeType!==3||(x=h+r),H!==o||l!==0&&H.nodeType!==3||(w=h+l),H.nodeType===3&&(h+=H.nodeValue.length),(D=H.firstChild)!==null;)k=H,H=D;for(;;){if(H===e)break t;if(k===a&&++T===r&&(x=h),k===o&&++U===l&&(w=h),(D=H.nextSibling)!==null)break;H=k,k=H.parentNode}H=D}a=x===-1||w===-1?null:{start:x,end:w}}else a=null}a=a||{start:0,end:0}}else a=null;for(mo={focusedElem:e,selectionRange:a},Or=!1,wt=t;wt!==null;)if(t=wt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,wt=e;else for(;wt!==null;){switch(t=wt,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)r=e[a],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,a=t,r=o.memoizedProps,o=o.memoizedState,l=a.stateNode;try{var te=rl(a.type,r);e=l.getSnapshotBeforeUpdate(te,o),l.__reactInternalSnapshotBeforeUpdate=e}catch(he){Ze(a,a.return,he)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)yo(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":yo(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,wt=e;break}wt=t.return}}function mm(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:nn(e,a),l&4&&Xi(5,a);break;case 1:if(nn(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(h){Ze(a,a.return,h)}else{var r=rl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Ze(a,a.return,h)}}l&64&&um(a),l&512&&Ki(a,a.return);break;case 3:if(nn(e,a),l&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{Wf(e,t)}catch(h){Ze(a,a.return,h)}}break;case 27:t===null&&l&4&&fm(a);case 26:case 5:nn(e,a),t===null&&l&4&&om(a),l&512&&Ki(a,a.return);break;case 12:nn(e,a);break;case 31:nn(e,a),l&4&&ym(e,a);break;case 13:nn(e,a),l&4&&vm(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=dg.bind(null,a),kg(e,a))));break;case 22:if(l=a.memoizedState!==null||tn,!l){t=t!==null&&t.memoizedState!==null||mt,r=tn;var o=mt;tn=l,(mt=t)&&!o?ln(e,a,(a.subtreeFlags&8772)!==0):nn(e,a),tn=r,mt=o}break;case 30:break;default:nn(e,a)}}function pm(e){var t=e.alternate;t!==null&&(e.alternate=null,pm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&wu(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 tt=null,zt=!1;function an(e,t,a){for(a=a.child;a!==null;)xm(e,t,a),a=a.sibling}function xm(e,t,a){if(Z&&typeof Z.onCommitFiberUnmount=="function")try{Z.onCommitFiberUnmount(ja,a)}catch{}switch(a.tag){case 26:mt||za(a,t),an(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:mt||za(a,t);var l=tt,r=zt;Dn(a.type)&&(tt=a.stateNode,zt=!1),an(e,t,a),ns(a.stateNode),tt=l,zt=r;break;case 5:mt||za(a,t);case 6:if(l=tt,r=zt,tt=null,an(e,t,a),tt=l,zt=r,tt!==null)if(zt)try{(tt.nodeType===9?tt.body:tt.nodeName==="HTML"?tt.ownerDocument.body:tt).removeChild(a.stateNode)}catch(o){Ze(a,t,o)}else try{tt.removeChild(a.stateNode)}catch(o){Ze(a,t,o)}break;case 18:tt!==null&&(zt?(e=tt,up(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),ri(e)):up(tt,a.stateNode));break;case 4:l=tt,r=zt,tt=a.stateNode.containerInfo,zt=!0,an(e,t,a),tt=l,zt=r;break;case 0:case 11:case 14:case 15:En(2,a,t),mt||En(4,a,t),an(e,t,a);break;case 1:mt||(za(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&cm(a,t,l)),an(e,t,a);break;case 21:an(e,t,a);break;case 22:mt=(l=mt)||a.memoizedState!==null,an(e,t,a),mt=l;break;default:an(e,t,a)}}function ym(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ri(e)}catch(a){Ze(t,t.return,a)}}}function vm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ri(e)}catch(a){Ze(t,t.return,a)}}function ng(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new hm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new hm),t;default:throw Error(u(435,e.tag))}}function fr(e,t){var a=ng(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var r=fg.bind(null,e,l);l.then(r,r)}})}function Bt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var r=a[l],o=e,h=t,x=h;e:for(;x!==null;){switch(x.tag){case 27:if(Dn(x.type)){tt=x.stateNode,zt=!1;break e}break;case 5:tt=x.stateNode,zt=!1;break e;case 3:case 4:tt=x.stateNode.containerInfo,zt=!0;break e}x=x.return}if(tt===null)throw Error(u(160));xm(o,h,r),tt=null,zt=!1,o=r.alternate,o!==null&&(o.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)gm(t,e),t=t.sibling}var Aa=null;function gm(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Bt(t,e),qt(e),l&4&&(En(3,e,e.return),Xi(3,e),En(5,e,e.return));break;case 1:Bt(t,e),qt(e),l&512&&(mt||a===null||za(a,a.return)),l&64&&tn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var r=Aa;if(Bt(t,e),qt(e),l&512&&(mt||a===null||za(a,a.return)),l&4){var o=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(l){case"title":o=r.getElementsByTagName("title")[0],(!o||o[wi]||o[jt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=r.createElement(l),r.head.insertBefore(o,r.querySelector("head > title"))),Et(o,l,a),o[jt]=e,bt(o),l=o;break e;case"link":var h=gp("link","href",r).get(l+(a.href||""));if(h){for(var x=0;x<h.length;x++)if(o=h[x],o.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&o.getAttribute("rel")===(a.rel==null?null:a.rel)&&o.getAttribute("title")===(a.title==null?null:a.title)&&o.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){h.splice(x,1);break t}}o=r.createElement(l),Et(o,l,a),r.head.appendChild(o);break;case"meta":if(h=gp("meta","content",r).get(l+(a.content||""))){for(x=0;x<h.length;x++)if(o=h[x],o.getAttribute("content")===(a.content==null?null:""+a.content)&&o.getAttribute("name")===(a.name==null?null:a.name)&&o.getAttribute("property")===(a.property==null?null:a.property)&&o.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&o.getAttribute("charset")===(a.charSet==null?null:a.charSet)){h.splice(x,1);break t}}o=r.createElement(l),Et(o,l,a),r.head.appendChild(o);break;default:throw Error(u(468,l))}o[jt]=e,bt(o),l=o}e.stateNode=l}else bp(r,e.type,e.stateNode);else e.stateNode=vp(r,l,e.memoizedProps);else o!==l?(o===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):o.count--,l===null?bp(r,e.type,e.stateNode):vp(r,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Vc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Bt(t,e),qt(e),l&512&&(mt||a===null||za(a,a.return)),a!==null&&l&4&&Vc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Bt(t,e),qt(e),l&512&&(mt||a===null||za(a,a.return)),e.flags&32){r=e.stateNode;try{Rl(r,"")}catch(te){Ze(e,e.return,te)}}l&4&&e.stateNode!=null&&(r=e.memoizedProps,Vc(e,r,a!==null?a.memoizedProps:r)),l&1024&&(Gc=!0);break;case 6:if(Bt(t,e),qt(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(te){Ze(e,e.return,te)}}break;case 3:if(Cr=null,r=Aa,Aa=Ar(t.containerInfo),Bt(t,e),Aa=r,qt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{ri(t.containerInfo)}catch(te){Ze(e,e.return,te)}Gc&&(Gc=!1,bm(e));break;case 4:l=Aa,Aa=Ar(e.stateNode.containerInfo),Bt(t,e),qt(e),Aa=l;break;case 12:Bt(t,e),qt(e);break;case 31:Bt(t,e),qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,fr(e,l)));break;case 13:Bt(t,e),qt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(mr=yt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,fr(e,l)));break;case 22:r=e.memoizedState!==null;var w=a!==null&&a.memoizedState!==null,T=tn,U=mt;if(tn=T||r,mt=U||w,Bt(t,e),mt=U,tn=T,qt(e),l&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||w||tn||mt||ul(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){w=a=t;try{if(o=w.stateNode,r)h=o.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{x=w.stateNode;var H=w.memoizedProps.style,k=H!=null&&H.hasOwnProperty("display")?H.display:null;x.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(te){Ze(w,w.return,te)}}}else if(t.tag===6){if(a===null){w=t;try{w.stateNode.nodeValue=r?"":w.memoizedProps}catch(te){Ze(w,w.return,te)}}}else if(t.tag===18){if(a===null){w=t;try{var D=w.stateNode;r?cp(D,!0):cp(w.stateNode,!1)}catch(te){Ze(w,w.return,te)}}}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}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,fr(e,a))));break;case 19:Bt(t,e),qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,fr(e,l)));break;case 30:break;case 21:break;default:Bt(t,e),qt(e)}}function qt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(dm(l)){a=l;break}l=l.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var r=a.stateNode,o=Yc(e);dr(e,o,r);break;case 5:var h=a.stateNode;a.flags&32&&(Rl(h,""),a.flags&=-33);var x=Yc(e);dr(e,x,h);break;case 3:case 4:var w=a.stateNode.containerInfo,T=Yc(e);Zc(e,T,w);break;default:throw Error(u(161))}}catch(U){Ze(e,e.return,U)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function nn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)mm(e,t.alternate,t),t=t.sibling}function ul(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:En(4,t,t.return),ul(t);break;case 1:za(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&cm(t,t.return,a),ul(t);break;case 27:ns(t.stateNode);case 26:case 5:za(t,t.return),ul(t);break;case 22:t.memoizedState===null&&ul(t);break;case 30:ul(t);break;default:ul(t)}e=e.sibling}}function ln(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,r=e,o=t,h=o.flags;switch(o.tag){case 0:case 11:case 15:ln(r,o,a),Xi(4,o);break;case 1:if(ln(r,o,a),l=o,r=l.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(T){Ze(l,l.return,T)}if(l=o,r=l.updateQueue,r!==null){var x=l.stateNode;try{var w=r.shared.hiddenCallbacks;if(w!==null)for(r.shared.hiddenCallbacks=null,r=0;r<w.length;r++)Ff(w[r],x)}catch(T){Ze(l,l.return,T)}}a&&h&64&&um(o),Ki(o,o.return);break;case 27:fm(o);case 26:case 5:ln(r,o,a),a&&l===null&&h&4&&om(o),Ki(o,o.return);break;case 12:ln(r,o,a);break;case 31:ln(r,o,a),a&&h&4&&ym(r,o);break;case 13:ln(r,o,a),a&&h&4&&vm(r,o);break;case 22:o.memoizedState===null&&ln(r,o,a),Ki(o,o.return);break;case 30:break;default:ln(r,o,a)}t=t.sibling}}function Qc(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&&Di(a))}function Xc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Di(e))}function Ea(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wm(e,t,a,l),t=t.sibling}function wm(e,t,a,l){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Ea(e,t,a,l),r&2048&&Xi(9,t);break;case 1:Ea(e,t,a,l);break;case 3:Ea(e,t,a,l),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Di(e)));break;case 12:if(r&2048){Ea(e,t,a,l),e=t.stateNode;try{var o=t.memoizedProps,h=o.id,x=o.onPostCommit;typeof x=="function"&&x(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(w){Ze(t,t.return,w)}}else Ea(e,t,a,l);break;case 31:Ea(e,t,a,l);break;case 13:Ea(e,t,a,l);break;case 23:break;case 22:o=t.stateNode,h=t.alternate,t.memoizedState!==null?o._visibility&2?Ea(e,t,a,l):Ji(e,t):o._visibility&2?Ea(e,t,a,l):(o._visibility|=2,Il(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Qc(h,t);break;case 24:Ea(e,t,a,l),r&2048&&Xc(t.alternate,t);break;default:Ea(e,t,a,l)}}function Il(e,t,a,l,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,h=t,x=a,w=l,T=h.flags;switch(h.tag){case 0:case 11:case 15:Il(o,h,x,w,r),Xi(8,h);break;case 23:break;case 22:var U=h.stateNode;h.memoizedState!==null?U._visibility&2?Il(o,h,x,w,r):Ji(o,h):(U._visibility|=2,Il(o,h,x,w,r)),r&&T&2048&&Qc(h.alternate,h);break;case 24:Il(o,h,x,w,r),r&&T&2048&&Xc(h.alternate,h);break;default:Il(o,h,x,w,r)}t=t.sibling}}function Ji(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,r=l.flags;switch(l.tag){case 22:Ji(a,l),r&2048&&Qc(l.alternate,l);break;case 24:Ji(a,l),r&2048&&Xc(l.alternate,l);break;default:Ji(a,l)}t=t.sibling}}var Ii=8192;function Fl(e,t,a){if(e.subtreeFlags&Ii)for(e=e.child;e!==null;)Sm(e,t,a),e=e.sibling}function Sm(e,t,a){switch(e.tag){case 26:Fl(e,t,a),e.flags&Ii&&e.memoizedState!==null&&Yg(a,Aa,e.memoizedState,e.memoizedProps);break;case 5:Fl(e,t,a);break;case 3:case 4:var l=Aa;Aa=Ar(e.stateNode.containerInfo),Fl(e,t,a),Aa=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ii,Ii=16777216,Fl(e,t,a),Ii=l):Fl(e,t,a));break;default:Fl(e,t,a)}}function jm(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 Fi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];wt=l,Nm(l,e)}jm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_m(e),e=e.sibling}function _m(e){switch(e.tag){case 0:case 11:case 15:Fi(e),e.flags&2048&&En(9,e,e.return);break;case 3:Fi(e);break;case 12:Fi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,hr(e)):Fi(e);break;default:Fi(e)}}function hr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];wt=l,Nm(l,e)}jm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:En(8,t,t.return),hr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,hr(t));break;default:hr(t)}e=e.sibling}}function Nm(e,t){for(;wt!==null;){var a=wt;switch(a.tag){case 0:case 11:case 15:En(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Di(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,wt=l;else e:for(a=e;wt!==null;){l=wt;var r=l.sibling,o=l.return;if(pm(l),l===a){wt=null;break e}if(r!==null){r.return=o,wt=r;break e}wt=o}}}var lg={getCacheForType:function(e){var t=Nt(dt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Nt(dt).controller.signal}},ig=typeof WeakMap=="function"?WeakMap:Map,qe=0,Ie=null,Ne=null,Te=0,Ye=0,Jt=null,Cn=!1,Wl=!1,Kc=!1,sn=0,st=0,Tn=0,cl=0,Jc=0,It=0,Pl=0,Wi=null,Ht=null,Ic=!1,mr=0,Am=0,pr=1/0,xr=null,Rn=null,vt=0,kn=null,ei=null,rn=0,Fc=0,Wc=null,Em=null,Pi=0,Pc=null;function Ft(){return(qe&2)!==0&&Te!==0?Te&-Te:L.T!==null?io():Vd()}function Cm(){if(It===0)if((Te&536870912)===0||Oe){var e=ue;ue<<=1,(ue&3932160)===0&&(ue=262144),It=e}else It=536870912;return e=Xt.current,e!==null&&(e.flags|=32),It}function $t(e,t,a){(e===Ie&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)&&(ti(e,0),On(e,Te,It,!1)),bi(e,a),((qe&2)===0||e!==Ie)&&(e===Ie&&((qe&2)===0&&(cl|=a),st===4&&On(e,Te,It,!1)),Ba(e))}function Tm(e,t,a){if((qe&6)!==0)throw Error(u(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||gi(e,t),r=l?ug(e,t):to(e,t,!0),o=l;do{if(r===0){Wl&&!l&&On(e,t,0,!1);break}else{if(a=e.current.alternate,o&&!sg(a)){r=to(e,t,!1),o=!1;continue}if(r===2){if(o=t,e.errorRecoveryDisabledLanes&o)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var x=e;r=Wi;var w=x.current.memoizedState.isDehydrated;if(w&&(ti(x,h).flags|=256),h=to(x,h,!1),h!==2){if(Kc&&!w){x.errorRecoveryDisabledLanes|=o,cl|=o,r=4;break e}o=Ht,Ht=r,o!==null&&(Ht===null?Ht=o:Ht.push.apply(Ht,o))}r=h}if(o=!1,r!==2)continue}}if(r===1){ti(e,0),On(e,t,0,!0);break}e:{switch(l=e,o=r,o){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:On(l,t,It,!Cn);break e;case 2:Ht=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(r=mr+300-yt(),10<r)){if(On(l,t,It,!Cn),As(l,0,!0)!==0)break e;rn=t,l.timeoutHandle=sp(Rm.bind(null,l,a,Ht,xr,Ic,t,It,cl,Pl,Cn,o,"Throttled",-0,0),r);break e}Rm(l,a,Ht,xr,Ic,t,It,cl,Pl,Cn,o,null,-0,0)}}break}while(!0);Ba(e)}function Rm(e,t,a,l,r,o,h,x,w,T,U,H,k,D){if(e.timeoutHandle=-1,H=t.subtreeFlags,H&8192||(H&16785408)===16785408){H={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ga},Sm(t,o,H);var te=(o&62914560)===o?mr-yt():(o&4194048)===o?Am-yt():0;if(te=Zg(H,te),te!==null){rn=o,e.cancelPendingCommit=te(Bm.bind(null,e,t,o,a,l,r,h,x,w,U,H,null,k,D)),On(e,o,h,!T);return}}Bm(e,t,o,a,l,r,h,x,w)}function sg(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 l=0;l<a.length;l++){var r=a[l],o=r.getSnapshot;r=r.value;try{if(!Gt(o(),r))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function On(e,t,a,l){t&=~Jc,t&=~cl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var r=t;0<r;){var o=31-Ue(r),h=1<<o;l[o]=-1,r&=~h}a!==0&&qd(e,a,t)}function yr(){return(qe&6)===0?(es(0),!1):!0}function eo(){if(Ne!==null){if(Ye===0)var e=Ne.return;else e=Ne,Ja=el=null,xc(e),Gl=null,Ui=0,e=Ne;for(;e!==null;)rm(e.alternate,e),e=e.return;Ne=null}}function ti(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Ag(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),rn=0,eo(),Ie=e,Ne=a=Xa(e.current,null),Te=t,Ye=0,Jt=null,Cn=!1,Wl=gi(e,t),Kc=!1,Pl=It=Jc=cl=Tn=st=0,Ht=Wi=null,Ic=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var r=31-Ue(l),o=1<<r;t|=e[r],l&=~o}return sn=t,Bs(),a}function km(e,t){ge=null,L.H=Zi,t===Zl||t===Qs?(t=Xf(),Ye=3):t===lc?(t=Xf(),Ye=4):Ye=t===Oc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Jt=t,Ne===null&&(st=1,sr(e,la(t,e.current)))}function Om(){var e=Xt.current;return e===null?!0:(Te&4194048)===Te?ua===null:(Te&62914560)===Te||(Te&536870912)!==0?e===ua:!1}function Mm(){var e=L.H;return L.H=Zi,e===null?Zi:e}function Dm(){var e=L.A;return L.A=lg,e}function vr(){st=4,Cn||(Te&4194048)!==Te&&Xt.current!==null||(Wl=!0),(Tn&134217727)===0&&(cl&134217727)===0||Ie===null||On(Ie,Te,It,!1)}function to(e,t,a){var l=qe;qe|=2;var r=Mm(),o=Dm();(Ie!==e||Te!==t)&&(xr=null,ti(e,t)),t=!1;var h=st;e:do try{if(Ye!==0&&Ne!==null){var x=Ne,w=Jt;switch(Ye){case 8:eo(),h=6;break e;case 3:case 2:case 9:case 6:Xt.current===null&&(t=!0);var T=Ye;if(Ye=0,Jt=null,ai(e,x,w,T),a&&Wl){h=0;break e}break;default:T=Ye,Ye=0,Jt=null,ai(e,x,w,T)}}rg(),h=st;break}catch(U){km(e,U)}while(!0);return t&&e.shellSuspendCounter++,Ja=el=null,qe=l,L.H=r,L.A=o,Ne===null&&(Ie=null,Te=0,Bs()),h}function rg(){for(;Ne!==null;)Lm(Ne)}function ug(e,t){var a=qe;qe|=2;var l=Mm(),r=Dm();Ie!==e||Te!==t?(xr=null,pr=yt()+500,ti(e,t)):Wl=gi(e,t);e:do try{if(Ye!==0&&Ne!==null){t=Ne;var o=Jt;t:switch(Ye){case 1:Ye=0,Jt=null,ai(e,t,o,1);break;case 2:case 9:if(Gf(o)){Ye=0,Jt=null,Um(t);break}t=function(){Ye!==2&&Ye!==9||Ie!==e||(Ye=7),Ba(e)},o.then(t,t);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:Gf(o)?(Ye=0,Jt=null,Um(t)):(Ye=0,Jt=null,ai(e,t,o,7));break;case 5:var h=null;switch(Ne.tag){case 26:h=Ne.memoizedState;case 5:case 27:var x=Ne;if(h?wp(h):x.stateNode.complete){Ye=0,Jt=null;var w=x.sibling;if(w!==null)Ne=w;else{var T=x.return;T!==null?(Ne=T,gr(T)):Ne=null}break t}}Ye=0,Jt=null,ai(e,t,o,5);break;case 6:Ye=0,Jt=null,ai(e,t,o,6);break;case 8:eo(),st=6;break e;default:throw Error(u(462))}}cg();break}catch(U){km(e,U)}while(!0);return Ja=el=null,L.H=l,L.A=r,qe=a,Ne!==null?0:(Ie=null,Te=0,Bs(),st)}function cg(){for(;Ne!==null&&!vl();)Lm(Ne)}function Lm(e){var t=im(e.alternate,e,sn);e.memoizedProps=e.pendingProps,t===null?gr(e):Ne=t}function Um(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Ph(a,t,t.pendingProps,t.type,void 0,Te);break;case 11:t=Ph(a,t,t.pendingProps,t.type.render,t.ref,Te);break;case 5:xc(t);default:rm(a,t),t=Ne=Df(t,sn),t=im(a,t,sn)}e.memoizedProps=e.pendingProps,t===null?gr(e):Ne=t}function ai(e,t,a,l){Ja=el=null,xc(t),Gl=null,Ui=0;var r=t.return;try{if(Fv(e,r,t,a,Te)){st=1,sr(e,la(a,e.current)),Ne=null;return}}catch(o){if(r!==null)throw Ne=r,o;st=1,sr(e,la(a,e.current)),Ne=null;return}t.flags&32768?(Oe||l===1?e=!0:Wl||(Te&536870912)!==0?e=!1:(Cn=e=!0,(l===2||l===9||l===3||l===6)&&(l=Xt.current,l!==null&&l.tag===13&&(l.flags|=16384))),zm(t,e)):gr(t)}function gr(e){var t=e;do{if((t.flags&32768)!==0){zm(t,Cn);return}e=t.return;var a=eg(t.alternate,t,sn);if(a!==null){Ne=a;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);st===0&&(st=5)}function zm(e,t){do{var a=tg(e.alternate,e);if(a!==null){a.flags&=32767,Ne=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=a}while(e!==null);st=6,Ne=null}function Bm(e,t,a,l,r,o,h,x,w){e.cancelPendingCommit=null;do br();while(vt!==0);if((qe&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(o=t.lanes|t.childLanes,o|=Yu,Vy(e,a,o,h,x,w),e===Ie&&(Ne=Ie=null,Te=0),ei=t,kn=e,rn=a,Fc=o,Wc=r,Em=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,hg(pn,function(){return Ym(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=L.T,L.T=null,r=F.p,F.p=2,h=qe,qe|=4;try{ag(e,t,a)}finally{qe=h,F.p=r,L.T=l}}vt=1,qm(),Hm(),$m()}}function qm(){if(vt===1){vt=0;var e=kn,t=ei,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=L.T,L.T=null;var l=F.p;F.p=2;var r=qe;qe|=4;try{gm(t,e);var o=mo,h=Nf(e.containerInfo),x=o.focusedElem,w=o.selectionRange;if(h!==x&&x&&x.ownerDocument&&_f(x.ownerDocument.documentElement,x)){if(w!==null&&Bu(x)){var T=w.start,U=w.end;if(U===void 0&&(U=T),"selectionStart"in x)x.selectionStart=T,x.selectionEnd=Math.min(U,x.value.length);else{var H=x.ownerDocument||document,k=H&&H.defaultView||window;if(k.getSelection){var D=k.getSelection(),te=x.textContent.length,he=Math.min(w.start,te),Je=w.end===void 0?he:Math.min(w.end,te);!D.extend&&he>Je&&(h=Je,Je=he,he=h);var A=jf(x,he),_=jf(x,Je);if(A&&_&&(D.rangeCount!==1||D.anchorNode!==A.node||D.anchorOffset!==A.offset||D.focusNode!==_.node||D.focusOffset!==_.offset)){var C=H.createRange();C.setStart(A.node,A.offset),D.removeAllRanges(),he>Je?(D.addRange(C),D.extend(_.node,_.offset)):(C.setEnd(_.node,_.offset),D.addRange(C))}}}}for(H=[],D=x;D=D.parentNode;)D.nodeType===1&&H.push({element:D,left:D.scrollLeft,top:D.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<H.length;x++){var q=H[x];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}Or=!!ho,mo=ho=null}finally{qe=r,F.p=l,L.T=a}}e.current=t,vt=2}}function Hm(){if(vt===2){vt=0;var e=kn,t=ei,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=L.T,L.T=null;var l=F.p;F.p=2;var r=qe;qe|=4;try{mm(e,t.alternate,t)}finally{qe=r,F.p=l,L.T=a}}vt=3}}function $m(){if(vt===4||vt===3){vt=0,gl();var e=kn,t=ei,a=rn,l=Em;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?vt=5:(vt=0,ei=kn=null,Vm(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Rn=null),gu(a),t=t.stateNode,Z&&typeof Z.onCommitFiberRoot=="function")try{Z.onCommitFiberRoot(ja,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=L.T,r=F.p,F.p=2,L.T=null;try{for(var o=e.onRecoverableError,h=0;h<l.length;h++){var x=l[h];o(x.value,{componentStack:x.stack})}}finally{L.T=t,F.p=r}}(rn&3)!==0&&br(),Ba(e),r=e.pendingLanes,(a&261930)!==0&&(r&42)!==0?e===Pc?Pi++:(Pi=0,Pc=e):Pi=0,es(0)}}function Vm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Di(t)))}function br(){return qm(),Hm(),$m(),Ym()}function Ym(){if(vt!==5)return!1;var e=kn,t=Fc;Fc=0;var a=gu(rn),l=L.T,r=F.p;try{F.p=32>a?32:a,L.T=null,a=Wc,Wc=null;var o=kn,h=rn;if(vt=0,ei=kn=null,rn=0,(qe&6)!==0)throw Error(u(331));var x=qe;if(qe|=4,_m(o.current),wm(o,o.current,h,a),qe=x,es(0,!1),Z&&typeof Z.onPostCommitFiberRoot=="function")try{Z.onPostCommitFiberRoot(ja,o)}catch{}return!0}finally{F.p=r,L.T=l,Vm(e,t)}}function Zm(e,t,a){t=la(a,t),t=kc(e.stateNode,t,2),e=_n(e,t,2),e!==null&&(bi(e,2),Ba(e))}function Ze(e,t,a){if(e.tag===3)Zm(e,e,a);else for(;t!==null;){if(t.tag===3){Zm(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Rn===null||!Rn.has(l))){e=la(a,e),a=Gh(2),l=_n(t,a,2),l!==null&&(Qh(a,l,t,e),bi(l,2),Ba(l));break}}t=t.return}}function ao(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new ig;var r=new Set;l.set(t,r)}else r=l.get(t),r===void 0&&(r=new Set,l.set(t,r));r.has(a)||(Kc=!0,r.add(a),e=og.bind(null,e,t,a),t.then(e,e))}function og(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ie===e&&(Te&a)===a&&(st===4||st===3&&(Te&62914560)===Te&&300>yt()-mr?(qe&2)===0&&ti(e,0):Jc|=a,Pl===Te&&(Pl=0)),Ba(e)}function Gm(e,t){t===0&&(t=Bd()),e=Fn(e,t),e!==null&&(bi(e,t),Ba(e))}function dg(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Gm(e,a)}function fg(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),Gm(e,a)}function hg(e,t){return Fe(e,t)}var wr=null,ni=null,no=!1,Sr=!1,lo=!1,Mn=0;function Ba(e){e!==ni&&e.next===null&&(ni===null?wr=ni=e:ni=ni.next=e),Sr=!0,no||(no=!0,pg())}function es(e,t){if(!lo&&Sr){lo=!0;do for(var a=!1,l=wr;l!==null;){if(e!==0){var r=l.pendingLanes;if(r===0)var o=0;else{var h=l.suspendedLanes,x=l.pingedLanes;o=(1<<31-Ue(42|e)+1)-1,o&=r&~(h&~x),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,Jm(l,o))}else o=Te,o=As(l,l===Ie?o:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(o&3)===0||gi(l,o)||(a=!0,Jm(l,o));l=l.next}while(a);lo=!1}}function mg(){Qm()}function Qm(){Sr=no=!1;var e=0;Mn!==0&&Ng()&&(e=Mn);for(var t=yt(),a=null,l=wr;l!==null;){var r=l.next,o=Xm(l,t);o===0?(l.next=null,a===null?wr=r:a.next=r,r===null&&(ni=a)):(a=l,(e!==0||(o&3)!==0)&&(Sr=!0)),l=r}vt!==0&&vt!==5||es(e),Mn!==0&&(Mn=0)}function Xm(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var h=31-Ue(o),x=1<<h,w=r[h];w===-1?((x&a)===0||(x&l)!==0)&&(r[h]=$y(x,t)):w<=t&&(e.expiredLanes|=x),o&=~x}if(t=Ie,a=Te,a=As(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&mn(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||gi(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&mn(l),gu(a)){case 2:case 8:a=wl;break;case 32:a=pn;break;case 268435456:a=Gn;break;default:a=pn}return l=Km.bind(null,e),a=Fe(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&mn(l),e.callbackPriority=2,e.callbackNode=null,2}function Km(e,t){if(vt!==0&&vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(br()&&e.callbackNode!==a)return null;var l=Te;return l=As(e,e===Ie?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Tm(e,l,t),Xm(e,yt()),e.callbackNode!=null&&e.callbackNode===a?Km.bind(null,e):null)}function Jm(e,t){if(br())return null;Tm(e,t,!0)}function pg(){Eg(function(){(qe&6)!==0?Fe(bl,mg):Qm()})}function io(){if(Mn===0){var e=Vl;e===0&&(e=R,R<<=1,(R&261888)===0&&(R=256)),Mn=e}return Mn}function Im(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Rs(""+e)}function Fm(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 xg(e,t,a,l,r){if(t==="submit"&&a&&a.stateNode===r){var o=Im((r[Lt]||null).action),h=l.submitter;h&&(t=(t=h[Lt]||null)?Im(t.formAction):h.getAttribute("formAction"),t!==null&&(o=t,h=null));var x=new Ds("action","action",null,l,r);e.push({event:x,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Mn!==0){var w=h?Fm(r,h):new FormData(r);Nc(a,{pending:!0,data:w,method:r.method,action:o},null,w)}}else typeof o=="function"&&(x.preventDefault(),w=h?Fm(r,h):new FormData(r),Nc(a,{pending:!0,data:w,method:r.method,action:o},o,w))},currentTarget:r}]})}}for(var so=0;so<Vu.length;so++){var ro=Vu[so],yg=ro.toLowerCase(),vg=ro[0].toUpperCase()+ro.slice(1);Na(yg,"on"+vg)}Na(Cf,"onAnimationEnd"),Na(Tf,"onAnimationIteration"),Na(Rf,"onAnimationStart"),Na("dblclick","onDoubleClick"),Na("focusin","onFocus"),Na("focusout","onBlur"),Na(Dv,"onTransitionRun"),Na(Lv,"onTransitionStart"),Na(Uv,"onTransitionCancel"),Na(kf,"onTransitionEnd"),Cl("onMouseEnter",["mouseout","mouseover"]),Cl("onMouseLeave",["mouseout","mouseover"]),Cl("onPointerEnter",["pointerout","pointerover"]),Cl("onPointerLeave",["pointerout","pointerover"]),Xn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ts="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(" "),gg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ts));function Wm(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],r=l.event;l=l.listeners;e:{var o=void 0;if(t)for(var h=l.length-1;0<=h;h--){var x=l[h],w=x.instance,T=x.currentTarget;if(x=x.listener,w!==o&&r.isPropagationStopped())break e;o=x,r.currentTarget=T;try{o(r)}catch(U){zs(U)}r.currentTarget=null,o=w}else for(h=0;h<l.length;h++){if(x=l[h],w=x.instance,T=x.currentTarget,x=x.listener,w!==o&&r.isPropagationStopped())break e;o=x,r.currentTarget=T;try{o(r)}catch(U){zs(U)}r.currentTarget=null,o=w}}}}function Ae(e,t){var a=t[bu];a===void 0&&(a=t[bu]=new Set);var l=e+"__bubble";a.has(l)||(Pm(t,e,2,!1),a.add(l))}function uo(e,t,a){var l=0;t&&(l|=4),Pm(a,e,l,t)}var jr="_reactListening"+Math.random().toString(36).slice(2);function co(e){if(!e[jr]){e[jr]=!0,Gd.forEach(function(a){a!=="selectionchange"&&(gg.has(a)||uo(a,!1,e),uo(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jr]||(t[jr]=!0,uo("selectionchange",!1,t))}}function Pm(e,t,a,l){switch(Cp(t)){case 2:var r=Xg;break;case 8:r=Kg;break;default:r=No}a=r.bind(null,t,a,e),r=void 0,!Tu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),l?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function oo(e,t,a,l,r){var o=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var h=l.tag;if(h===3||h===4){var x=l.stateNode.containerInfo;if(x===r)break;if(h===4)for(h=l.return;h!==null;){var w=h.tag;if((w===3||w===4)&&h.stateNode.containerInfo===r)return;h=h.return}for(;x!==null;){if(h=Nl(x),h===null)return;if(w=h.tag,w===5||w===6||w===26||w===27){l=o=h;continue e}x=x.parentNode}}l=l.return}nf(function(){var T=o,U=Eu(a),H=[];e:{var k=Of.get(e);if(k!==void 0){var D=Ds,te=e;switch(e){case"keypress":if(Os(a)===0)break e;case"keydown":case"keyup":D=fv;break;case"focusin":te="focus",D=Mu;break;case"focusout":te="blur",D=Mu;break;case"beforeblur":case"afterblur":D=Mu;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":D=rf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":D=ev;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":D=pv;break;case Cf:case Tf:case Rf:D=nv;break;case kf:D=yv;break;case"scroll":case"scrollend":D=Wy;break;case"wheel":D=gv;break;case"copy":case"cut":case"paste":D=iv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":D=cf;break;case"toggle":case"beforetoggle":D=wv}var he=(t&4)!==0,Je=!he&&(e==="scroll"||e==="scrollend"),A=he?k!==null?k+"Capture":null:k;he=[];for(var _=T,C;_!==null;){var q=_;if(C=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||C===null||A===null||(q=ji(_,A),q!=null&&he.push(as(_,q,C))),Je)break;_=_.return}0<he.length&&(k=new D(k,te,null,a,U),H.push({event:k,listeners:he}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",k&&a!==Au&&(te=a.relatedTarget||a.fromElement)&&(Nl(te)||te[_l]))break e;if((D||k)&&(k=U.window===U?U:(k=U.ownerDocument)?k.defaultView||k.parentWindow:window,D?(te=a.relatedTarget||a.toElement,D=T,te=te?Nl(te):null,te!==null&&(Je=f(te),he=te.tag,te!==Je||he!==5&&he!==27&&he!==6)&&(te=null)):(D=null,te=T),D!==te)){if(he=rf,q="onMouseLeave",A="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(he=cf,q="onPointerLeave",A="onPointerEnter",_="pointer"),Je=D==null?k:Si(D),C=te==null?k:Si(te),k=new he(q,_+"leave",D,a,U),k.target=Je,k.relatedTarget=C,q=null,Nl(U)===T&&(he=new he(A,_+"enter",te,a,U),he.target=C,he.relatedTarget=Je,q=he),Je=q,D&&te)t:{for(he=bg,A=D,_=te,C=0,q=A;q;q=he(q))C++;q=0;for(var de=_;de;de=he(de))q++;for(;0<C-q;)A=he(A),C--;for(;0<q-C;)_=he(_),q--;for(;C--;){if(A===_||_!==null&&A===_.alternate){he=A;break t}A=he(A),_=he(_)}he=null}else he=null;D!==null&&ep(H,k,D,he,!1),te!==null&&Je!==null&&ep(H,Je,te,he,!0)}}e:{if(k=T?Si(T):window,D=k.nodeName&&k.nodeName.toLowerCase(),D==="select"||D==="input"&&k.type==="file")var ze=yf;else if(pf(k))if(vf)ze=kv;else{ze=Tv;var le=Cv}else D=k.nodeName,!D||D.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?T&&Nu(T.elementType)&&(ze=yf):ze=Rv;if(ze&&(ze=ze(e,T))){xf(H,ze,a,U);break e}le&&le(e,k,T),e==="focusout"&&T&&k.type==="number"&&T.memoizedProps.value!=null&&_u(k,"number",k.value)}switch(le=T?Si(T):window,e){case"focusin":(pf(le)||le.contentEditable==="true")&&(Dl=le,qu=T,ki=null);break;case"focusout":ki=qu=Dl=null;break;case"mousedown":Hu=!0;break;case"contextmenu":case"mouseup":case"dragend":Hu=!1,Af(H,a,U);break;case"selectionchange":if(Mv)break;case"keydown":case"keyup":Af(H,a,U)}var Se;if(Lu)e:{switch(e){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else Ml?hf(e,a)&&(Re="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Re="onCompositionStart");Re&&(of&&a.locale!=="ko"&&(Ml||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&Ml&&(Se=lf()):(yn=U,Ru="value"in yn?yn.value:yn.textContent,Ml=!0)),le=_r(T,Re),0<le.length&&(Re=new uf(Re,e,null,a,U),H.push({event:Re,listeners:le}),Se?Re.data=Se:(Se=mf(a),Se!==null&&(Re.data=Se)))),(Se=jv?_v(e,a):Nv(e,a))&&(Re=_r(T,"onBeforeInput"),0<Re.length&&(le=new uf("onBeforeInput","beforeinput",null,a,U),H.push({event:le,listeners:Re}),le.data=Se)),xg(H,e,T,a,U)}Wm(H,t)})}function as(e,t,a){return{instance:e,listener:t,currentTarget:a}}function _r(e,t){for(var a=t+"Capture",l=[];e!==null;){var r=e,o=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||o===null||(r=ji(e,a),r!=null&&l.unshift(as(e,r,o)),r=ji(e,t),r!=null&&l.push(as(e,r,o))),e.tag===3)return l;e=e.return}return[]}function bg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ep(e,t,a,l,r){for(var o=t._reactName,h=[];a!==null&&a!==l;){var x=a,w=x.alternate,T=x.stateNode;if(x=x.tag,w!==null&&w===l)break;x!==5&&x!==26&&x!==27||T===null||(w=T,r?(T=ji(a,o),T!=null&&h.unshift(as(a,T,w))):r||(T=ji(a,o),T!=null&&h.push(as(a,T,w)))),a=a.return}h.length!==0&&e.push({event:t,listeners:h})}var wg=/\r\n?/g,Sg=/\u0000|\uFFFD/g;function tp(e){return(typeof e=="string"?e:""+e).replace(wg,`
|
|
49
|
-
`).replace(Sg,"")}function ap(e,t){return t=tp(t),tp(e)===t}function Ke(e,t,a,l,r,o){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Rl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Rl(e,""+l);break;case"className":Cs(e,"class",l);break;case"tabIndex":Cs(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Cs(e,a,l);break;case"style":tf(e,l,o);break;case"data":if(t!=="object"){Cs(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Rs(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(a==="formAction"?(t!=="input"&&Ke(e,t,"name",r.name,r,null),Ke(e,t,"formEncType",r.formEncType,r,null),Ke(e,t,"formMethod",r.formMethod,r,null),Ke(e,t,"formTarget",r.formTarget,r,null)):(Ke(e,t,"encType",r.encType,r,null),Ke(e,t,"method",r.method,r,null),Ke(e,t,"target",r.target,r,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Rs(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Ga);break;case"onScroll":l!=null&&Ae("scroll",e);break;case"onScrollEnd":l!=null&&Ae("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=Rs(""+l),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":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),Es(e,"popover",l);break;case"xlinkActuate":Za(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Za(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Za(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Za(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Za(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Za(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Za(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Za(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Za(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Es(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Iy.get(a)||a,Es(e,a,l))}}function fo(e,t,a,l,r,o){switch(a){case"style":tf(e,l,o);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Rl(e,l):(typeof l=="number"||typeof l=="bigint")&&Rl(e,""+l);break;case"onScroll":l!=null&&Ae("scroll",e);break;case"onScrollEnd":l!=null&&Ae("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Ga);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Qd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),o=e[Lt]||null,o=o!=null?o[a]:null,typeof o=="function"&&e.removeEventListener(t,o,r),typeof l=="function")){typeof o!="function"&&o!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,r);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):Es(e,a,l)}}}function Et(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("load",e);var l=!1,r=!1,o;for(o in a)if(a.hasOwnProperty(o)){var h=a[o];if(h!=null)switch(o){case"src":l=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ke(e,t,o,h,a,null)}}r&&Ke(e,t,"srcSet",a.srcSet,a,null),l&&Ke(e,t,"src",a.src,a,null);return;case"input":Ae("invalid",e);var x=o=h=r=null,w=null,T=null;for(l in a)if(a.hasOwnProperty(l)){var U=a[l];if(U!=null)switch(l){case"name":r=U;break;case"type":h=U;break;case"checked":w=U;break;case"defaultChecked":T=U;break;case"value":o=U;break;case"defaultValue":x=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(u(137,t));break;default:Ke(e,t,l,U,a,null)}}Fd(e,o,x,w,T,h,r,!1);return;case"select":Ae("invalid",e),l=h=o=null;for(r in a)if(a.hasOwnProperty(r)&&(x=a[r],x!=null))switch(r){case"value":o=x;break;case"defaultValue":h=x;break;case"multiple":l=x;default:Ke(e,t,r,x,a,null)}t=o,a=h,e.multiple=!!l,t!=null?Tl(e,!!l,t,!1):a!=null&&Tl(e,!!l,a,!0);return;case"textarea":Ae("invalid",e),o=r=l=null;for(h in a)if(a.hasOwnProperty(h)&&(x=a[h],x!=null))switch(h){case"value":l=x;break;case"defaultValue":r=x;break;case"children":o=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(u(91));break;default:Ke(e,t,h,x,a,null)}Pd(e,l,r,o);return;case"option":for(w in a)if(a.hasOwnProperty(w)&&(l=a[w],l!=null))switch(w){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ke(e,t,w,l,a,null)}return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(l=0;l<ts.length;l++)Ae(ts[l],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("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(T in a)if(a.hasOwnProperty(T)&&(l=a[T],l!=null))switch(T){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ke(e,t,T,l,a,null)}return;default:if(Nu(t)){for(U in a)a.hasOwnProperty(U)&&(l=a[U],l!==void 0&&fo(e,t,U,l,a,void 0));return}}for(x in a)a.hasOwnProperty(x)&&(l=a[x],l!=null&&Ke(e,t,x,l,a,null))}function jg(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,o=null,h=null,x=null,w=null,T=null,U=null;for(D in a){var H=a[D];if(a.hasOwnProperty(D)&&H!=null)switch(D){case"checked":break;case"value":break;case"defaultValue":w=H;default:l.hasOwnProperty(D)||Ke(e,t,D,null,l,H)}}for(var k in l){var D=l[k];if(H=a[k],l.hasOwnProperty(k)&&(D!=null||H!=null))switch(k){case"type":o=D;break;case"name":r=D;break;case"checked":T=D;break;case"defaultChecked":U=D;break;case"value":h=D;break;case"defaultValue":x=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(u(137,t));break;default:D!==H&&Ke(e,t,k,D,l,H)}}ju(e,h,x,w,T,U,o,r);return;case"select":D=h=x=k=null;for(o in a)if(w=a[o],a.hasOwnProperty(o)&&w!=null)switch(o){case"value":break;case"multiple":D=w;default:l.hasOwnProperty(o)||Ke(e,t,o,null,l,w)}for(r in l)if(o=l[r],w=a[r],l.hasOwnProperty(r)&&(o!=null||w!=null))switch(r){case"value":k=o;break;case"defaultValue":x=o;break;case"multiple":h=o;default:o!==w&&Ke(e,t,r,o,l,w)}t=x,a=h,l=D,k!=null?Tl(e,!!a,k,!1):!!l!=!!a&&(t!=null?Tl(e,!!a,t,!0):Tl(e,!!a,a?[]:"",!1));return;case"textarea":D=k=null;for(x in a)if(r=a[x],a.hasOwnProperty(x)&&r!=null&&!l.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Ke(e,t,x,null,l,r)}for(h in l)if(r=l[h],o=a[h],l.hasOwnProperty(h)&&(r!=null||o!=null))switch(h){case"value":k=r;break;case"defaultValue":D=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(u(91));break;default:r!==o&&Ke(e,t,h,r,l,o)}Wd(e,k,D);return;case"option":for(var te in a)if(k=a[te],a.hasOwnProperty(te)&&k!=null&&!l.hasOwnProperty(te))switch(te){case"selected":e.selected=!1;break;default:Ke(e,t,te,null,l,k)}for(w in l)if(k=l[w],D=a[w],l.hasOwnProperty(w)&&k!==D&&(k!=null||D!=null))switch(w){case"selected":e.selected=k&&typeof k!="function"&&typeof k!="symbol";break;default:Ke(e,t,w,k,l,D)}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 he in a)k=a[he],a.hasOwnProperty(he)&&k!=null&&!l.hasOwnProperty(he)&&Ke(e,t,he,null,l,k);for(T in l)if(k=l[T],D=a[T],l.hasOwnProperty(T)&&k!==D&&(k!=null||D!=null))switch(T){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(u(137,t));break;default:Ke(e,t,T,k,l,D)}return;default:if(Nu(t)){for(var Je in a)k=a[Je],a.hasOwnProperty(Je)&&k!==void 0&&!l.hasOwnProperty(Je)&&fo(e,t,Je,void 0,l,k);for(U in l)k=l[U],D=a[U],!l.hasOwnProperty(U)||k===D||k===void 0&&D===void 0||fo(e,t,U,k,l,D);return}}for(var A in a)k=a[A],a.hasOwnProperty(A)&&k!=null&&!l.hasOwnProperty(A)&&Ke(e,t,A,null,l,k);for(H in l)k=l[H],D=a[H],!l.hasOwnProperty(H)||k===D||k==null&&D==null||Ke(e,t,H,k,l,D)}function np(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function _g(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var r=a[l],o=r.transferSize,h=r.initiatorType,x=r.duration;if(o&&x&&np(h)){for(h=0,x=r.responseEnd,l+=1;l<a.length;l++){var w=a[l],T=w.startTime;if(T>x)break;var U=w.transferSize,H=w.initiatorType;U&&np(H)&&(w=w.responseEnd,h+=U*(w<x?1:(x-T)/(w-T)))}if(--l,t+=8*(o+h)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ho=null,mo=null;function Nr(e){return e.nodeType===9?e:e.ownerDocument}function lp(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 ip(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 po(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 xo=null;function Ng(){var e=window.event;return e&&e.type==="popstate"?e===xo?!1:(xo=e,!0):(xo=null,!1)}var sp=typeof setTimeout=="function"?setTimeout:void 0,Ag=typeof clearTimeout=="function"?clearTimeout:void 0,rp=typeof Promise=="function"?Promise:void 0,Eg=typeof queueMicrotask=="function"?queueMicrotask:typeof rp<"u"?function(e){return rp.resolve(null).then(e).catch(Cg)}:sp;function Cg(e){setTimeout(function(){throw e})}function Dn(e){return e==="head"}function up(e,t){var a=t,l=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(r),ri(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")ns(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,ns(a);for(var o=a.firstChild;o;){var h=o.nextSibling,x=o.nodeName;o[wi]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&o.rel.toLowerCase()==="stylesheet"||a.removeChild(o),o=h}}else a==="body"&&ns(e.ownerDocument.body);a=r}while(a);ri(t)}function cp(e,t){var a=e;e=0;do{var l=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||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function yo(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":yo(a),wu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Tg(e,t,a,l){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[wi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=ca(e.nextSibling),e===null)break}return null}function Rg(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=ca(e.nextSibling),e===null))return null;return e}function op(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ca(e.nextSibling),e===null))return null;return e}function vo(e){return e.data==="$?"||e.data==="$~"}function go(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function kg(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function ca(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 bo=null;function dp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return ca(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function fp(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 hp(e,t,a){switch(t=Nr(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 ns(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);wu(e)}var oa=new Map,mp=new Set;function Ar(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var un=F.d;F.d={f:Og,r:Mg,D:Dg,C:Lg,L:Ug,m:zg,X:qg,S:Bg,M:Hg};function Og(){var e=un.f(),t=yr();return e||t}function Mg(e){var t=Al(e);t!==null&&t.tag===5&&t.type==="form"?kh(t):un.r(e)}var li=typeof document>"u"?null:document;function pp(e,t,a){var l=li;if(l&&typeof t=="string"&&t){var r=aa(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),mp.has(r)||(mp.add(r),e={rel:e,crossOrigin:a,href:t},l.querySelector(r)===null&&(t=l.createElement("link"),Et(t,"link",e),bt(t),l.head.appendChild(t)))}}function Dg(e){un.D(e),pp("dns-prefetch",e,null)}function Lg(e,t){un.C(e,t),pp("preconnect",e,t)}function Ug(e,t,a){un.L(e,t,a);var l=li;if(l&&e&&t){var r='link[rel="preload"][as="'+aa(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+aa(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+aa(a.imageSizes)+'"]')):r+='[href="'+aa(e)+'"]';var o=r;switch(t){case"style":o=ii(e);break;case"script":o=si(e)}oa.has(o)||(e=N({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),oa.set(o,e),l.querySelector(r)!==null||t==="style"&&l.querySelector(ls(o))||t==="script"&&l.querySelector(is(o))||(t=l.createElement("link"),Et(t,"link",e),bt(t),l.head.appendChild(t)))}}function zg(e,t){un.m(e,t);var a=li;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+aa(l)+'"][href="'+aa(e)+'"]',o=r;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=si(e)}if(!oa.has(o)&&(e=N({rel:"modulepreload",href:e},t),oa.set(o,e),a.querySelector(r)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(is(o)))return}l=a.createElement("link"),Et(l,"link",e),bt(l),a.head.appendChild(l)}}}function Bg(e,t,a){un.S(e,t,a);var l=li;if(l&&e){var r=El(l).hoistableStyles,o=ii(e);t=t||"default";var h=r.get(o);if(!h){var x={loading:0,preload:null};if(h=l.querySelector(ls(o)))x.loading=5;else{e=N({rel:"stylesheet",href:e,"data-precedence":t},a),(a=oa.get(o))&&wo(e,a);var w=h=l.createElement("link");bt(w),Et(w,"link",e),w._p=new Promise(function(T,U){w.onload=T,w.onerror=U}),w.addEventListener("load",function(){x.loading|=1}),w.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Er(h,t,l)}h={type:"stylesheet",instance:h,count:1,state:x},r.set(o,h)}}}function qg(e,t){un.X(e,t);var a=li;if(a&&e){var l=El(a).hoistableScripts,r=si(e),o=l.get(r);o||(o=a.querySelector(is(r)),o||(e=N({src:e,async:!0},t),(t=oa.get(r))&&So(e,t),o=a.createElement("script"),bt(o),Et(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},l.set(r,o))}}function Hg(e,t){un.M(e,t);var a=li;if(a&&e){var l=El(a).hoistableScripts,r=si(e),o=l.get(r);o||(o=a.querySelector(is(r)),o||(e=N({src:e,async:!0,type:"module"},t),(t=oa.get(r))&&So(e,t),o=a.createElement("script"),bt(o),Et(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},l.set(r,o))}}function xp(e,t,a,l){var r=(r=ce.current)?Ar(r):null;if(!r)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=ii(a.href),a=El(r).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=ii(a.href);var o=El(r).hoistableStyles,h=o.get(e);if(h||(r=r.ownerDocument||r,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,h),(o=r.querySelector(ls(e)))&&!o._p&&(h.instance=o,h.state.loading=5),oa.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},oa.set(e,a),o||$g(r,e,a,h.state))),t&&l===null)throw Error(u(528,""));return h}if(t&&l!==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=si(a),a=El(r).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function ii(e){return'href="'+aa(e)+'"'}function ls(e){return'link[rel="stylesheet"]['+e+"]"}function yp(e){return N({},e,{"data-precedence":e.precedence,precedence:null})}function $g(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Et(t,"link",a),bt(t),e.head.appendChild(t))}function si(e){return'[src="'+aa(e)+'"]'}function is(e){return"script[async]"+e}function vp(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+aa(a.href)+'"]');if(l)return t.instance=l,bt(l),l;var r=N({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),bt(l),Et(l,"style",r),Er(l,a.precedence,e),t.instance=l;case"stylesheet":r=ii(a.href);var o=e.querySelector(ls(r));if(o)return t.state.loading|=4,t.instance=o,bt(o),o;l=yp(a),(r=oa.get(r))&&wo(l,r),o=(e.ownerDocument||e).createElement("link"),bt(o);var h=o;return h._p=new Promise(function(x,w){h.onload=x,h.onerror=w}),Et(o,"link",l),t.state.loading|=4,Er(o,a.precedence,e),t.instance=o;case"script":return o=si(a.src),(r=e.querySelector(is(o)))?(t.instance=r,bt(r),r):(l=a,(r=oa.get(o))&&(l=N({},a),So(l,r)),e=e.ownerDocument||e,r=e.createElement("script"),bt(r),Et(r,"link",l),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Er(l,a.precedence,e));return t.instance}function Er(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=l.length?l[l.length-1]:null,o=r,h=0;h<l.length;h++){var x=l[h];if(x.dataset.precedence===t)o=x;else if(o!==r)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function wo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function So(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Cr=null;function gp(e,t,a){if(Cr===null){var l=new Map,r=Cr=new Map;r.set(a,l)}else r=Cr,l=r.get(a),l||(l=new Map,r.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var o=a[r];if(!(o[wi]||o[jt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var h=o.getAttribute(t)||"";h=e+h;var x=l.get(h);x?x.push(o):l.set(h,[o])}}return l}function bp(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Vg(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 wp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Yg(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=ii(l.href),o=t.querySelector(ls(r));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Tr.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=o,bt(o);return}o=t.ownerDocument||t,l=yp(l),(r=oa.get(r))&&wo(l,r),o=o.createElement("link"),bt(o);var h=o;h._p=new Promise(function(x,w){h.onload=x,h.onerror=w}),Et(o,"link",l),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=Tr.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var jo=0;function Zg(e,t){return e.stylesheets&&e.count===0&&kr(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&kr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&jo===0&&(jo=62500*_g());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&kr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>jo?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(r)}}:null}function Tr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)kr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Rr=null;function kr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rr=new Map,t.forEach(Gg,e),Rr=null,Tr.call(e))}function Gg(e,t){if(!(t.state.loading&4)){var a=Rr.get(e);if(a)var l=a.get(null);else{a=new Map,Rr.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<r.length;o++){var h=r[o];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(a.set(h.dataset.precedence,h),l=h)}l&&a.set(null,l)}r=t.instance,h=r.getAttribute("data-precedence"),o=a.get(h)||l,o===l&&a.set(null,r),a.set(h,r),this.count++,l=Tr.bind(this),r.addEventListener("load",l),r.addEventListener("error",l),o?o.parentNode.insertBefore(r,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var ss={$$typeof:ne,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function Qg(e,t,a,l,r,o,h,x,w){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=yu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yu(0),this.hiddenUpdates=yu(null),this.identifierPrefix=l,this.onUncaughtError=r,this.onCaughtError=o,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.incompleteTransitions=new Map}function Sp(e,t,a,l,r,o,h,x,w,T,U,H){return e=new Qg(e,t,a,h,w,T,U,H,x),t=1,o===!0&&(t|=24),o=Qt(3,null,null,t),e.current=o,o.stateNode=e,t=tc(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:l,isDehydrated:a,cache:t},ic(o),e}function jp(e){return e?(e=zl,e):zl}function _p(e,t,a,l,r,o){r=jp(r),l.context===null?l.context=r:l.pendingContext=r,l=jn(t),l.payload={element:a},o=o===void 0?null:o,o!==null&&(l.callback=o),a=_n(e,l,t),a!==null&&($t(a,e,t),Bi(a,e,t))}function Np(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function _o(e,t){Np(e,t),(e=e.alternate)&&Np(e,t)}function Ap(e){if(e.tag===13||e.tag===31){var t=Fn(e,67108864);t!==null&&$t(t,e,67108864),_o(e,67108864)}}function Ep(e){if(e.tag===13||e.tag===31){var t=Ft();t=vu(t);var a=Fn(e,t);a!==null&&$t(a,e,t),_o(e,t)}}var Or=!0;function Xg(e,t,a,l){var r=L.T;L.T=null;var o=F.p;try{F.p=2,No(e,t,a,l)}finally{F.p=o,L.T=r}}function Kg(e,t,a,l){var r=L.T;L.T=null;var o=F.p;try{F.p=8,No(e,t,a,l)}finally{F.p=o,L.T=r}}function No(e,t,a,l){if(Or){var r=Ao(l);if(r===null)oo(e,t,l,Mr,a),Tp(e,l);else if(Ig(r,e,t,a,l))l.stopPropagation();else if(Tp(e,l),t&4&&-1<Jg.indexOf(e)){for(;r!==null;){var o=Al(r);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var h=kt(o.pendingLanes);if(h!==0){var x=o;for(x.pendingLanes|=2,x.entangledLanes|=2;h;){var w=1<<31-Ue(h);x.entanglements[1]|=w,h&=~w}Ba(o),(qe&6)===0&&(pr=yt()+500,es(0))}}break;case 31:case 13:x=Fn(o,2),x!==null&&$t(x,o,2),yr(),_o(o,2)}if(o=Ao(l),o===null&&oo(e,t,l,Mr,a),o===r)break;r=o}r!==null&&l.stopPropagation()}else oo(e,t,l,null,a)}}function Ao(e){return e=Eu(e),Eo(e)}var Mr=null;function Eo(e){if(Mr=null,e=Nl(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=m(t),e!==null)return e;e=null}else if(a===31){if(e=y(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Mr=e,null}function Cp(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(St()){case bl:return 2;case wl:return 8;case pn:case yi:return 32;case Gn:return 268435456;default:return 32}default:return 32}}var Co=!1,Ln=null,Un=null,zn=null,rs=new Map,us=new Map,Bn=[],Jg="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 Tp(e,t){switch(e){case"focusin":case"focusout":Ln=null;break;case"dragenter":case"dragleave":Un=null;break;case"mouseover":case"mouseout":zn=null;break;case"pointerover":case"pointerout":rs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":us.delete(t.pointerId)}}function cs(e,t,a,l,r,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:o,targetContainers:[r]},t!==null&&(t=Al(t),t!==null&&Ap(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Ig(e,t,a,l,r){switch(t){case"focusin":return Ln=cs(Ln,e,t,a,l,r),!0;case"dragenter":return Un=cs(Un,e,t,a,l,r),!0;case"mouseover":return zn=cs(zn,e,t,a,l,r),!0;case"pointerover":var o=r.pointerId;return rs.set(o,cs(rs.get(o)||null,e,t,a,l,r)),!0;case"gotpointercapture":return o=r.pointerId,us.set(o,cs(us.get(o)||null,e,t,a,l,r)),!0}return!1}function Rp(e){var t=Nl(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,Yd(e.priority,function(){Ep(a)});return}}else if(t===31){if(t=y(a),t!==null){e.blockedOn=t,Yd(e.priority,function(){Ep(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 Dr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Ao(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Au=l,a.target.dispatchEvent(l),Au=null}else return t=Al(a),t!==null&&Ap(t),e.blockedOn=a,!1;t.shift()}return!0}function kp(e,t,a){Dr(e)&&a.delete(t)}function Fg(){Co=!1,Ln!==null&&Dr(Ln)&&(Ln=null),Un!==null&&Dr(Un)&&(Un=null),zn!==null&&Dr(zn)&&(zn=null),rs.forEach(kp),us.forEach(kp)}function Lr(e,t){e.blockedOn===t&&(e.blockedOn=null,Co||(Co=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Fg)))}var Ur=null;function Op(e){Ur!==e&&(Ur=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ur===e&&(Ur=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],r=e[t+2];if(typeof l!="function"){if(Eo(l||a)===null)continue;break}var o=Al(a);o!==null&&(e.splice(t,3),t-=3,Nc(o,{pending:!0,data:r,method:a.method,action:l},l,r))}}))}function ri(e){function t(w){return Lr(w,e)}Ln!==null&&Lr(Ln,e),Un!==null&&Lr(Un,e),zn!==null&&Lr(zn,e),rs.forEach(t),us.forEach(t);for(var a=0;a<Bn.length;a++){var l=Bn[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Bn.length&&(a=Bn[0],a.blockedOn===null);)Rp(a),a.blockedOn===null&&Bn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var r=a[l],o=a[l+1],h=r[Lt]||null;if(typeof o=="function")h||Op(a);else if(h){var x=null;if(o&&o.hasAttribute("formAction")){if(r=o,h=o[Lt]||null)x=h.formAction;else if(Eo(r)!==null)continue}else x=h.action;typeof x=="function"?a[l+1]=x:(a.splice(l,3),l-=3),Op(a)}}}function Mp(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(h){return r=h})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),l||setTimeout(a,20)}function a(){if(!l&&!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 l=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function To(e){this._internalRoot=e}zr.prototype.render=To.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,l=Ft();_p(a,l,e,t,null,null)},zr.prototype.unmount=To.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_p(e.current,2,null,e,null,null),yr(),t[_l]=null}};function zr(e){this._internalRoot=e}zr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vd();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Bn.length&&t!==0&&t<Bn[a].priority;a++);Bn.splice(a,0,e),a===0&&Rp(e)}};var Dp=i.version;if(Dp!=="19.2.7")throw Error(u(527,Dp,"19.2.7"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=g(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Wg={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Br=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Br.isDisabled&&Br.supportsFiber)try{ja=Br.inject(Wg),Z=Br}catch{}}return ds.createRoot=function(e,t){if(!d(e))throw Error(u(299));var a=!1,l="",r=$h,o=Vh,h=Yh;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Sp(e,1,!1,null,null,a,l,null,r,o,h,Mp),e[_l]=t.current,co(e),new To(t)},ds.hydrateRoot=function(e,t,a){if(!d(e))throw Error(u(299));var l=!1,r="",o=$h,h=Vh,x=Yh,w=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(o=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError),a.formState!==void 0&&(w=a.formState)),t=Sp(e,1,!0,t,a??null,l,r,w,o,h,x,Mp),t.context=jp(null),a=t.current,l=Ft(),l=vu(l),r=jn(l),r.callback=null,_n(a,r,l),a=l,t.current.lanes=a,bi(t,a),Ba(t),e[_l]=t.current,co(e),new zr(t)},ds.version="19.2.7",ds}var Zp;function u0(){if(Zp)return Oo.exports;Zp=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(i){console.error(i)}}return n(),Oo.exports=r0(),Oo.exports}var c0=u0();/**
|
|
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 gd=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Mx=/^[\\/]{2}/;function o0(n,i){return i+n.replace(/\\/g,"/")}var Gp="popstate";function Qp(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function d0(n={}){function i(u,d){var g;let f=(g=d.state)==null?void 0:g.masked,{pathname:m,search:y,hash:v}=f||u.location;return ad("",{pathname:m,search:y,hash:v},d.state&&d.state.usr||null,d.state&&d.state.key||"default",f?{pathname:u.location.pathname,search:u.location.search,hash:u.location.hash}:void 0)}function s(u,d){return typeof d=="string"?d:dl(d)}return h0(i,s,null,n)}function at(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function xa(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function f0(){return Math.random().toString(36).substring(2,10)}function Xp(n,i){return{usr:n.state,key:n.key,idx:i,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function ad(n,i,s=null,u,d){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof i=="string"?mi(i):i,state:s,key:i&&i.key||u||f0(),mask:d}}function dl({pathname:n="/",search:i="",hash:s=""}){return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function mi(n){let i={};if(n){let s=n.indexOf("#");s>=0&&(i.hash=n.substring(s),n=n.substring(0,s));let u=n.indexOf("?");u>=0&&(i.search=n.substring(u),n=n.substring(0,u)),n&&(i.pathname=n)}return i}function h0(n,i,s,u={}){let{window:d=document.defaultView,v5Compat:f=!1}=u,m=d.history,y="POP",v=null,g=b();g==null&&(g=0,m.replaceState({...m.state,idx:g},""));function b(){return(m.state||{idx:null}).idx}function N(){y="POP";let M=b(),Y=M==null?null:M-g;g=M,v&&v({action:y,location:$.location,delta:Y})}function z(M,Y){y="PUSH";let J=Qp(M)?M:ad($.location,M,Y);g=b()+1;let ne=Xp(J,g),pe=$.createHref(J.mask||J);try{m.pushState(ne,"",pe)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;d.location.assign(pe)}f&&v&&v({action:y,location:$.location,delta:1})}function K(M,Y){y="REPLACE";let J=Qp(M)?M:ad($.location,M,Y);g=b();let ne=Xp(J,g),pe=$.createHref(J.mask||J);m.replaceState(ne,"",pe),f&&v&&v({action:y,location:$.location,delta:0})}function O(M){return m0(d,M)}let $={get action(){return y},get location(){return n(d,m)},listen(M){if(v)throw new Error("A history only accepts one active listener");return d.addEventListener(Gp,N),v=M,()=>{d.removeEventListener(Gp,N),v=null}},createHref(M){return i(d,M)},createURL:O,encodeLocation(M){let Y=O(M);return{pathname:Y.pathname,search:Y.search,hash:Y.hash}},push:z,replace:K,go(M){return m.go(M)}};return $}function m0(n,i,s=!1){let u="http://localhost";n&&(u=n.location.origin!=="null"?n.location.origin:n.location.href),at(u,"No window.location.(origin|href) available to create URL");let d=typeof i=="string"?i:dl(i);return d=d.replace(/ $/,"%20"),!s&&Mx.test(d)&&(d=u+d),new URL(d,u)}function Dx(n,i,s="/"){return p0(n,i,s,!1)}function p0(n,i,s,u,d){let f=typeof i=="string"?mi(i):i,m=fn(f.pathname||"/",s);if(m==null)return null;let y=x0(n),v=null,g=E0(m);for(let b=0;v==null&&b<y.length;++b)v=A0(y[b],g,u);return v}function x0(n){let i=Lx(n);return y0(i),i}function Lx(n,i=[],s=[],u="",d=!1){let f=(m,y,v=d,g)=>{let b={relativePath:g===void 0?m.path||"":g,caseSensitive:m.caseSensitive===!0,childrenIndex:y,route:m};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(u)&&v)return;at(b.relativePath.startsWith(u),`Absolute route path "${b.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(u.length)}let N=ka([u,b.relativePath]),z=s.concat(b);m.children&&m.children.length>0&&(at(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${N}".`),Lx(m.children,i,z,N,v)),!(m.path==null&&!m.index)&&i.push({path:N,score:_0(N,m.index),routesMeta:z.map((K,O)=>{let[$,M]=Bx(K.relativePath,K.caseSensitive,O===z.length-1);return{...K,matcher:$,compiledParams:M}})})};return n.forEach((m,y)=>{var v;if(m.path===""||!((v=m.path)!=null&&v.includes("?")))f(m,y);else for(let g of Ux(m.path))f(m,y,!0,g)}),i}function Ux(n){let i=n.split("/");if(i.length===0)return[];let[s,...u]=i,d=s.endsWith("?"),f=s.replace(/\?$/,"");if(u.length===0)return d?[f,""]:[f];let m=Ux(u.join("/")),y=[];return y.push(...m.map(v=>v===""?f:[f,v].join("/"))),d&&y.push(...m),y.map(v=>n.startsWith("/")&&v===""?"/":v)}function y0(n){n.sort((i,s)=>i.score!==s.score?s.score-i.score:N0(i.routesMeta.map(u=>u.childrenIndex),s.routesMeta.map(u=>u.childrenIndex)))}var v0=/^:[\w-]+$/,g0=3,b0=2,w0=1,S0=10,j0=-2,Kp=n=>n==="*";function _0(n,i){let s=n.split("/"),u=s.length;return s.some(Kp)&&(u+=j0),i&&(u+=b0),s.filter(d=>!Kp(d)).reduce((d,f)=>d+(v0.test(f)?g0:f===""?w0:S0),u)}function N0(n,i){return n.length===i.length&&n.slice(0,-1).every((u,d)=>u===i[d])?n[n.length-1]-i[i.length-1]:0}function A0(n,i,s=!1){let{routesMeta:u}=n,d={},f="/",m=[];for(let y=0;y<u.length;++y){let v=u[y],g=y===u.length-1,b=f==="/"?i:i.slice(f.length)||"/",N={path:v.relativePath,caseSensitive:v.caseSensitive,end:g},z=v.matcher&&v.compiledParams?zx(N,b,v.matcher,v.compiledParams):Jr(N,b),K=v.route;if(!z&&g&&s&&!u[u.length-1].route.index&&(z=Jr({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},b)),!z)return null;Object.assign(d,z.params),m.push({params:d,pathname:ka([f,z.pathname]),pathnameBase:R0(ka([f,z.pathnameBase])),route:K}),z.pathnameBase!=="/"&&(f=ka([f,z.pathnameBase]))}return m}function Jr(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,u]=Bx(n.path,n.caseSensitive,n.end);return zx(n,i,s,u)}function zx(n,i,s,u){let d=i.match(s);if(!d)return null;let f=d[0],m=di(f,1),y=d.slice(1);return{params:u.reduce((g,{paramName:b,isOptional:N},z)=>{if(b==="*"){let O=y[z]||"";m=di(f.slice(0,f.length-O.length),1)}const K=y[z];return N&&!K?g[b]=void 0:g[b]=(K||"").replace(/%2F/g,"/"),g},{}),pathname:f,pathnameBase:m,pattern:n}}function Bx(n,i=!1,s=!0){xa(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let u=[],d="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,y,v,g,b)=>{if(u.push({paramName:y,isOptional:v!=null}),v){let N=b.charAt(g+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,i?void 0:"i"),u]}function E0(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return xa(!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 (${i}).`),n}}function fn(n,i){if(i==="/")return n;if(!n.toLowerCase().startsWith(i.toLowerCase()))return null;let s=i.endsWith("/")?i.length-1:i.length,u=n.charAt(s);return u&&u!=="/"?null:n.slice(s)||"/"}function C0(n,i="/"){let{pathname:s,search:u="",hash:d=""}=typeof n=="string"?mi(n):n,f;return s?(s=qx(s),s.startsWith("/")||s.startsWith("\\")?f=Jp(s.substring(1),"/"):f=Jp(s,i)):f=i,{pathname:f,search:k0(u),hash:O0(d)}}function Jp(n,i){let s=di(i).split("/");return n.split("/").forEach(d=>{d===".."?s.length>1&&s.pop():d!=="."&&s.push(d)}),s.length>1?s.join("/"):"/"}function Uo(n,i,s,u){return`Cannot include a '${n}' character in a manually specified \`to.${i}\` 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 T0(n){return n.filter((i,s)=>s===0||i.route.path&&i.route.path.length>0)}function bd(n){let i=T0(n);return i.map((s,u)=>u===i.length-1?s.pathname:s.pathnameBase)}function cu(n,i,s,u=!1){let d;typeof n=="string"?d=mi(n):(d={...n},at(!d.pathname||!d.pathname.includes("?"),Uo("?","pathname","search",d)),at(!d.pathname||!d.pathname.includes("#"),Uo("#","pathname","hash",d)),at(!d.search||!d.search.includes("#"),Uo("#","search","hash",d)));let f=n===""||d.pathname==="",m=f?"/":d.pathname,y;if(m==null)y=s;else{let N=i.length-1;if(!u&&m.startsWith("..")){let z=m.split("/");for(;z[0]==="..";)z.shift(),N-=1;d.pathname=z.join("/")}y=N>=0?i[N]:"/"}let v=C0(d,y),g=m&&m!=="/"&&m.endsWith("/"),b=(f||m===".")&&s.endsWith("/");return!v.pathname.endsWith("/")&&(g||b)&&(v.pathname+="/"),v}var qx=n=>n.replace(/[\\/]{2,}/g,"/"),ka=n=>qx(n.join("/"));function di(n,i=0){let s=n.length;for(;s>i&&n.charCodeAt(s-1)===47;)s--;return s===n.length?n:n.slice(0,s)}var R0=n=>di(n).replace(/^\/*/,"/"),k0=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,O0=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,M0=class{constructor(n,i,s,u=!1){this.status=n,this.statusText=i||"",this.internal=u,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function D0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function L0(n){let i=n.map(s=>s.route.path).filter(Boolean);return ka(i)||"/"}var Hx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $x(n,i){let s=n;if(typeof s!="string"||!gd.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let u=s,d=!1;if(Hx)try{let f=new URL(window.location.href),m=Mx.test(s)?new URL(o0(s,f.protocol)):new URL(s),y=fn(m.pathname,i);m.origin===f.origin&&y!=null?s=y+m.search+m.hash:d=!0}catch{xa(!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 Ip=new URL("http://localhost");function wd(n){if(n.createURL)return n.createURL("/");try{return new URL(n.createHref("/"),Ip)}catch{return Ip}}function zo(n,i){return n.origin===i.origin&&(n.origin!=="null"||n.protocol===i.protocol&&n.host===i.host)}function U0(n,i){if(n.startsWith("//"))return!0;let s=i.protocol.toLowerCase();return n.toLowerCase().startsWith(s)?i.host===""||n.slice(s.length).startsWith("//"):!1}function Sd(n,i,s,u){let d=null;try{d=n==null?null:new URL(n,s)}catch{}let f=new URL(i,s),m=d!=null&&!zo(d,s),y=!zo(f,s);if(u==="reject"){if(m||y)throw new Error("External navigation is not allowed")}else if(y&&(d==null||!U0(n,d)||!zo(d,f)))throw new Error("External navigation is not allowed")}var Vx=["POST","PUT","PATCH","DELETE"];new Set(Vx);var z0=["GET",...Vx];new Set(z0);var B0=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function q0(n){try{return B0.includes(new URL(n).protocol)}catch{return!1}}var pi=S.createContext(null);pi.displayName="DataRouter";var ou=S.createContext(null);ou.displayName="DataRouterState";var Yx=S.createContext(!1);function H0(){return S.useContext(Yx)}var Zx=S.createContext({isTransitioning:!1});Zx.displayName="ViewTransition";var $0=S.createContext(new Map);$0.displayName="Fetchers";var V0=S.createContext(null);V0.displayName="Await";var Pt=S.createContext(null);Pt.displayName="Navigation";var _s=S.createContext(null);_s.displayName="Location";var Ma=S.createContext({outlet:null,matches:[],isDataRoute:!1});Ma.displayName="Route";var jd=S.createContext(null);jd.displayName="RouteError";var Gx="REACT_ROUTER_ERROR",Y0="REDIRECT",Z0="ROUTE_ERROR_RESPONSE";function G0(n){if(n.startsWith(`${Gx}:${Y0}:{`))try{let i=JSON.parse(n.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function Q0(n){if(n.startsWith(`${Gx}:${Z0}:{`))try{let i=JSON.parse(n.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new M0(i.status,i.statusText,i.data)}catch{}}function X0(n,{relative:i}={}){at(xi(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:u}=S.useContext(Pt),{hash:d,pathname:f,search:m}=Ns(n,{relative:i}),y=f;return s!=="/"&&(y=f==="/"?s:ka([s,f])),u.createHref({pathname:y,search:m,hash:d})}function xi(){return S.useContext(_s)!=null}function Da(){return at(xi(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(_s).location}var Qx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Xx(n){S.useContext(Pt).static||S.useLayoutEffect(n)}function _d(){let{isDataRoute:n}=S.useContext(Ma);return n?rb():K0()}function K0(){at(xi(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(pi),{basename:i,navigator:s}=S.useContext(Pt),{matches:u}=S.useContext(Ma),{pathname:d}=Da(),f=JSON.stringify(bd(u)),m=S.useRef(!1);return Xx(()=>{m.current=!0}),S.useCallback((v,g={})=>{if(xa(m.current,Qx),!m.current)return;if(typeof v=="number"){s.go(v);return}let b=cu(v,JSON.parse(f),d,g.relative==="path");n==null&&i!=="/"&&(b.pathname=b.pathname==="/"?i:ka([i,b.pathname])),Sd(typeof v=="string"?v:dl(v),s.createHref(b),wd(s),"reject"),(g.replace?s.replace:s.push)(b,g.state,g)},[i,s,f,d,n])}S.createContext(null);function J0(){let{matches:n}=S.useContext(Ma),i=n[n.length-1];return(i==null?void 0:i.params)??{}}function Ns(n,{relative:i}={}){let{matches:s}=S.useContext(Ma),{pathname:u}=Da(),d=JSON.stringify(bd(s));return S.useMemo(()=>cu(n,JSON.parse(d),u,i==="path"),[n,d,u,i])}function I0(n,i){return Kx(n,i)}function Kx(n,i,s){var M;at(xi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=S.useContext(Pt),{matches:d}=S.useContext(Ma),f=d[d.length-1],m=f?f.params:{},y=f?f.pathname:"/",v=f?f.pathnameBase:"/",g=f&&f.route;{let Y=g&&g.path||"";Ix(y,!g||Y.endsWith("*")||Y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${Y}">) 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="${Y}"> to <Route path="${Y==="/"?"*":`${Y}/*`}">.`)}let b=Da(),N;if(i){let Y=typeof i=="string"?mi(i):i;at(v==="/"||((M=Y.pathname)==null?void 0:M.startsWith(v)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${v}" but pathname "${Y.pathname}" was given in the \`location\` prop.`),N=Y}else N=b;let z=N.pathname||"/",K=z;if(v!=="/"){let Y=v.replace(/^\//,"").split("/");K="/"+z.replace(/^\//,"").split("/").slice(Y.length).join("/")}let O=s&&s.state.matches.length?s.state.matches.map(Y=>Object.assign(Y,{route:s.manifest[Y.route.id]||Y.route})):Dx(n,{pathname:K});xa(g||O!=null,`No routes matched location "${N.pathname}${N.search}${N.hash}" `),xa(O==null||O[O.length-1].route.element!==void 0||O[O.length-1].route.Component!==void 0||O[O.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 $=tb(O&&O.map(Y=>Object.assign({},Y,{params:Object.assign({},m,Y.params),pathname:ka([v,u.encodeLocation?u.encodeLocation(Y.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathname]),pathnameBase:Y.pathnameBase==="/"?v:ka([v,u.encodeLocation?u.encodeLocation(Y.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathnameBase])})),d,s);return i&&$?S.createElement(_s.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...N},navigationType:"POP"}},$):$}function F0(){let n=sb(),i=D0(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=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:f},"ErrorBoundary")," or"," ",S.createElement("code",{style:f},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},i),s?S.createElement("pre",{style:d},s):null,m)}var W0=S.createElement(F0,null),Jx=class extends S.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,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){this.props.onError?this.props.onError(n,i):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=Q0(n.digest);s&&(n=s)}let i=n!==void 0?S.createElement(Ma.Provider,{value:this.props.routeContext},S.createElement(jd.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(P0,{error:n},i):i}};Jx.contextType=Yx;var Bo=new WeakMap;function P0({children:n,error:i}){let{basename:s,navigator:u}=S.useContext(Pt);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let d=G0(i.digest);if(d){let f=Bo.get(i);if(f)throw f;let m=$x(d.location,s),y=m.absoluteURL||m.to;if(Sd(d.location,y,wd(u),"allow-explicit"),q0(y))throw new Error("Invalid redirect location");if(Hx&&!Bo.get(i))if(m.isExternal||d.reloadDocument)window.location.href=y;else{const v=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:d.replace}));throw Bo.set(i,v),v}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${y}`})}}return n}function eb({routeContext:n,match:i,children:s}){let u=S.useContext(pi);return u&&u.static&&u.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=i.route.id),S.createElement(Ma.Provider,{value:n},s)}function tb(n,i=[],s){let u=s==null?void 0:s.state;if(n==null){if(!u)return null;if(u.errors)n=u.matches;else if(i.length===0&&!u.initialized&&u.matches.length>0)n=u.matches;else return null}let d=n,f=u==null?void 0:u.errors;if(f!=null){let b=d.findIndex(N=>N.route.id&&(f==null?void 0:f[N.route.id])!==void 0);at(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),d=d.slice(0,Math.min(d.length,b+1))}let m=!1,y=-1;if(s&&u){m=u.renderFallback;for(let b=0;b<d.length;b++){let N=d[b];if((N.route.HydrateFallback||N.route.hydrateFallbackElement)&&(y=b),N.route.id){let{loaderData:z,errors:K}=u,O=N.route.loader&&!z.hasOwnProperty(N.route.id)&&(!K||K[N.route.id]===void 0);if(N.route.lazy||O){s.isStatic&&(m=!0),y>=0?d=d.slice(0,y+1):d=[d[0]];break}}}}let v=s==null?void 0:s.onError,g=u&&v?(b,N)=>{var z,K;v(b,{location:u.location,params:((K=(z=u.matches)==null?void 0:z[0])==null?void 0:K.params)??{},pattern:L0(u.matches),errorInfo:N})}:void 0;return d.reduceRight((b,N,z)=>{let K,O=!1,$=null,M=null;u&&(K=f&&N.route.id?f[N.route.id]:void 0,$=N.route.errorElement||W0,m&&(y<0&&z===0?(Ix("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),O=!0,M=null):y===z&&(O=!0,M=N.route.hydrateFallbackElement||null)));let Y=i.concat(d.slice(0,z+1)),J=()=>{let ne;return K?ne=$:O?ne=M:N.route.Component?ne=S.createElement(N.route.Component,null):N.route.element?ne=N.route.element:ne=b,S.createElement(eb,{match:N,routeContext:{outlet:b,matches:Y,isDataRoute:u!=null},children:ne})};return u&&(N.route.ErrorBoundary||N.route.errorElement||z===0)?S.createElement(Jx,{location:u.location,revalidation:u.revalidation,component:$,error:K,children:J(),routeContext:{outlet:null,matches:Y,isDataRoute:!0},onError:g}):J()},null)}function Nd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ab(n){let i=S.useContext(pi);return at(i,Nd(n)),i}function nb(n){let i=S.useContext(ou);return at(i,Nd(n)),i}function lb(n){let i=S.useContext(Ma);return at(i,Nd(n)),i}function Ad(n){let i=lb(n),s=i.matches[i.matches.length-1];return at(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function ib(){return Ad("useRouteId")}function sb(){var u;let n=S.useContext(jd),i=nb("useRouteError"),s=Ad("useRouteError");return n!==void 0?n:(u=i.errors)==null?void 0:u[s]}function rb(){let{router:n}=ab("useNavigate"),i=Ad("useNavigate"),s=S.useRef(!1);return Xx(()=>{s.current=!0}),S.useCallback(async(d,f={})=>{xa(s.current,Qx),s.current&&(typeof d=="number"?await n.navigate(d):await n.navigate(d,{fromRouteId:i,...f}))},[n,i])}var Fp={};function Ix(n,i,s){!i&&!Fp[n]&&(Fp[n]=!0,xa(!1,s))}S.memo(ub);function ub({routes:n,manifest:i,future:s,state:u,isStatic:d,onError:f}){return Kx(n,void 0,{manifest:i,state:u,isStatic:d,onError:f})}function Fx({to:n,replace:i,state:s,relative:u}){at(xi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d,navigator:f}=S.useContext(Pt);xa(!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}=S.useContext(Ma),{pathname:y}=Da(),v=_d(),g=cu(n,bd(m),y,u==="path");Sd(typeof n=="string"?n:dl(n),f.createHref(g),wd(f),"reject");let b=JSON.stringify(g);return S.useEffect(()=>{v(JSON.parse(b),{replace:i,state:s,relative:u})},[v,b,u,i,s]),null}function ol(n){at(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function cb({basename:n="/",children:i=null,location:s,navigationType:u="POP",navigator:d,static:f=!1,useTransitions:m}){at(!xi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let y=n.replace(/^\/*/,"/"),v=S.useMemo(()=>({basename:y,navigator:d,static:f,useTransitions:m,future:{}}),[y,d,f,m]);typeof s=="string"&&(s=mi(s));let{pathname:g="/",search:b="",hash:N="",state:z=null,key:K="default",mask:O}=s,$=S.useMemo(()=>{let M=fn(g,y);return M==null?null:{location:{pathname:M,search:b,hash:N,state:z,key:K,mask:O},navigationType:u}},[y,g,b,N,z,K,u,O]);return xa($!=null,`<Router basename="${y}"> is not able to match the URL "${g}${b}${N}" because it does not start with the basename, so the <Router> won't render anything.`),$==null?null:S.createElement(Pt.Provider,{value:v},S.createElement(_s.Provider,{children:i,value:$}))}function ob({children:n,location:i}){return I0(nd(n),i)}function nd(n,i=[]){let s=[];return S.Children.forEach(n,(u,d)=>{if(!S.isValidElement(u))return;let f=[...i,d];if(u.type===S.Fragment){s.push.apply(s,nd(u.props.children,f));return}at(u.type===ol,`[${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>`),at(!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=nd(u.props.children,f)),s.push(m)}),s}var Gr="get",Qr="application/x-www-form-urlencoded";function du(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function db(n){return du(n)&&n.tagName.toLowerCase()==="button"}function fb(n){return du(n)&&n.tagName.toLowerCase()==="form"}function hb(n){return du(n)&&n.tagName.toLowerCase()==="input"}function mb(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function pb(n,i){return n.button===0&&(!i||i==="_self")&&!mb(n)}function ld(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((i,s)=>{let u=n[s];return i.concat(Array.isArray(u)?u.map(d=>[s,d]):[[s,u]])},[]))}function xb(n,i){let s=ld(n);return i&&i.forEach((u,d)=>{s.has(d)||i.getAll(d).forEach(f=>{s.append(d,f)})}),s}var qr=null;function yb(){if(qr===null)try{new FormData(document.createElement("form"),0),qr=!1}catch{qr=!0}return qr}var vb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function qo(n){return n!=null&&!vb.has(n)?(xa(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Qr}"`),null):n}function gb(n,i){let s,u,d,f,m;if(fb(n)){let y=n.getAttribute("action");u=y?fn(y,i):null,s=n.getAttribute("method")||Gr,d=qo(n.getAttribute("enctype"))||Qr,f=new FormData(n)}else if(db(n)||hb(n)&&(n.type==="submit"||n.type==="image")){let y=n.form;if(y==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let v=n.getAttribute("formaction")||y.getAttribute("action");if(u=v?fn(v,i):null,s=n.getAttribute("formmethod")||y.getAttribute("method")||Gr,d=qo(n.getAttribute("formenctype"))||qo(y.getAttribute("enctype"))||Qr,f=new FormData(y,n),!yb()){let{name:g,type:b,value:N}=n;if(b==="image"){let z=g?`${g}.`:"";f.append(`${z}x`,"0"),f.append(`${z}y`,"0")}else g&&f.append(g,N)}}else{if(du(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Gr,u=null,d=Qr,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 Ed(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function Wx(n,i,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}`:i&&fn(d.pathname,i)==="/"?d.pathname=`${di(i)}/_root.${u}`:d.pathname=`${di(d.pathname)}.${u}`,d}async function bb(n,i){if(n.id in i)return i[n.id];try{let s=await import(n.module);return i[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 wb(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 Sb(n,i,s){let u=await Promise.all(n.map(async d=>{let f=i.routes[d.route.id];if(f){let m=await bb(f,s);return m.links?m.links():[]}return[]}));return Ab(u.flat(1).filter(wb).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Wp(n,i,s,u,d,f){let m=(v,g)=>s[g]?v.route.id!==s[g].route.id:!0,y=(v,g)=>{var b;return s[g].pathname!==v.pathname||((b=s[g].route.path)==null?void 0:b.endsWith("*"))&&s[g].params["*"]!==v.params["*"]};return f==="assets"?i.filter((v,g)=>m(v,g)||y(v,g)):f==="data"?i.filter((v,g)=>{var N;let b=u.routes[v.route.id];if(!b||!b.hasLoader)return!1;if(m(v,g)||y(v,g))return!0;if(v.route.shouldRevalidate){let z=v.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:v.params,defaultShouldRevalidate:!0});if(typeof z=="boolean")return z}return!0}):[]}function jb(n,i,{includeHydrateFallback:s}={}){return _b(n.map(u=>{let d=i.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 _b(n){return[...new Set(n)]}function Nb(n){let i={},s=Object.keys(n).sort();for(let u of s)i[u]=n[u];return i}function Ab(n,i){let s=new Set;return new Set(i),n.reduce((u,d)=>{let f=JSON.stringify(Nb(d));return s.has(f)||(s.add(f),u.push({key:f,link:d})),u},[])}function Cd(){let n=S.useContext(pi);return Ed(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Eb(){let n=S.useContext(ou);return Ed(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Td=S.createContext(void 0);Td.displayName="FrameworkContext";function fu(){let n=S.useContext(Td);return Ed(n,"You must render this element inside a <HydratedRouter> element"),n}function Cb(n,i){let s=S.useContext(Td),[u,d]=S.useState(!1),[f,m]=S.useState(!1),{onFocus:y,onBlur:v,onMouseEnter:g,onMouseLeave:b,onTouchStart:N}=i,z=S.useRef(null);S.useEffect(()=>{if(n==="render"&&m(!0),n==="viewport"){let $=Y=>{Y.forEach(J=>{m(J.isIntersecting)})},M=new IntersectionObserver($,{threshold:.5});return z.current&&M.observe(z.current),()=>{M.disconnect()}}},[n]),S.useEffect(()=>{if(u){let $=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout($)}}},[u]);let K=()=>{d(!0)},O=()=>{d(!1),m(!1)};return s?n!=="intent"?[f,z,{}]:[f,z,{onFocus:fs(y,K),onBlur:fs(v,O),onMouseEnter:fs(g,K),onMouseLeave:fs(b,O),onTouchStart:fs(N,K)}]:[!1,z,{}]}function fs(n,i){return s=>{n&&n(s),s.defaultPrevented||i(s)}}function Tb({page:n,...i}){let s=H0(),{nonce:u}=fu(),{router:d}=Cd(),f=S.useMemo(()=>Dx(d.routes,n,d.basename),[d.routes,n,d.basename]);return f?(i.nonce==null&&u&&(i={...i,nonce:u}),s?S.createElement(kb,{page:n,matches:f,...i}):S.createElement(Ob,{page:n,matches:f,...i})):null}function Rb(n){let{manifest:i,routeModules:s}=fu(),[u,d]=S.useState([]);return S.useEffect(()=>{let f=!1;return Sb(n,i,s).then(m=>{f||d(m)}),()=>{f=!0}},[n,i,s]),u}function kb({page:n,matches:i,...s}){let u=Da(),{future:d}=fu(),{basename:f}=Cd(),m=S.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let y=Wx(n,f,d.v8_trailingSlashAwareDataRequests,"rsc"),v=!1,g=[];for(let b of i)typeof b.route.shouldRevalidate=="function"?v=!0:g.push(b.route.id);return v&&g.length>0&&y.searchParams.set("_routes",g.join(",")),[y.pathname+y.search]},[f,d.v8_trailingSlashAwareDataRequests,n,u,i]);return S.createElement(S.Fragment,null,m.map(y=>S.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...s})))}function Ob({page:n,matches:i,...s}){let u=Da(),{future:d,manifest:f,routeModules:m}=fu(),{basename:y}=Cd(),{loaderData:v,matches:g}=Eb(),b=S.useMemo(()=>Wp(n,i,g,f,u,"data"),[n,i,g,f,u]),N=S.useMemo(()=>Wp(n,i,g,f,u,"assets"),[n,i,g,f,u]),z=S.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let $=new Set,M=!1;if(i.forEach(J=>{var pe;let ne=f.routes[J.route.id];!ne||!ne.hasLoader||(!b.some(I=>I.route.id===J.route.id)&&J.route.id in v&&((pe=m[J.route.id])!=null&&pe.shouldRevalidate)||ne.hasClientLoader?M=!0:$.add(J.route.id))}),$.size===0)return[];let Y=Wx(n,y,d.v8_trailingSlashAwareDataRequests,"data");return M&&$.size>0&&Y.searchParams.set("_routes",i.filter(J=>$.has(J.route.id)).map(J=>J.route.id).join(",")),[Y.pathname+Y.search]},[y,d.v8_trailingSlashAwareDataRequests,v,u,f,b,i,n,m]),K=S.useMemo(()=>jb(N,f),[N,f]),O=Rb(N);return S.createElement(S.Fragment,null,z.map($=>S.createElement("link",{key:$,rel:"prefetch",as:"fetch",href:$,...s})),K.map($=>S.createElement("link",{key:$,rel:"modulepreload",href:$,...s})),O.map(({key:$,link:M})=>S.createElement("link",{key:$,nonce:s.nonce,...M,crossOrigin:M.crossOrigin??s.crossOrigin})))}function Mb(...n){return i=>{n.forEach(s=>{typeof s=="function"?s(i):s!=null&&(s.current=i)})}}var Db=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Db&&(window.__reactRouterVersion="7.18.4")}catch{}function Lb({basename:n,children:i,useTransitions:s,window:u}){let d=S.useRef();d.current==null&&(d.current=d0({window:u,v5Compat:!0}));let f=d.current,[m,y]=S.useState({action:f.action,location:f.location}),v=S.useCallback(g=>{s===!1?y(g):S.startTransition(()=>y(g))},[s]);return S.useLayoutEffect(()=>f.listen(v),[f,v]),S.createElement(cb,{basename:n,children:i,location:m.location,navigationType:m.action,navigator:f,useTransitions:s})}var ya=S.forwardRef(function({onClick:i,discover:s="render",prefetch:u="none",relative:d,reloadDocument:f,replace:m,mask:y,state:v,target:g,to:b,preventScrollReset:N,viewTransition:z,defaultShouldRevalidate:K,...O},$){let{basename:M,navigator:Y,useTransitions:J}=S.useContext(Pt),ne=typeof b=="string"&&gd.test(b),pe=$x(b,M);b=pe.to;let I=X0(b,{relative:d}),Ee=Da(),X=null;if(y){let ie=cu(y,[],Ee.mask?Ee.mask.pathname:"/",!0);M!=="/"&&(ie.pathname=ie.pathname==="/"?M:ka([M,ie.pathname])),X=Y.createHref(ie)}let[be,$e,gt]=Cb(u,O),xt=Bb(b,{replace:m,mask:y,state:v,target:g,preventScrollReset:N,relative:d,viewTransition:z,defaultShouldRevalidate:K,useTransitions:J});function et(ie){i&&i(ie),ie.defaultPrevented||xt(ie)}let Ct=!(pe.isExternal||f),He=S.createElement("a",{...O,...gt,href:(Ct?X:void 0)||pe.absoluteURL||I,onClick:Ct?et:i,ref:Mb($,$e),target:g,"data-discover":!ne&&s==="render"?"true":void 0});return be&&!ne?S.createElement(S.Fragment,null,He,S.createElement(Tb,{page:I})):He});ya.displayName="Link";var Xr=S.forwardRef(function({"aria-current":i="page",caseSensitive:s=!1,className:u="",end:d=!1,style:f,to:m,viewTransition:y,children:v,...g},b){let N=Ns(m,{relative:g.relative}),z=Da(),K=S.useContext(ou),{navigator:O,basename:$}=S.useContext(Pt),M=K!=null&&Yb(N)&&y===!0,Y=O.encodeLocation?O.encodeLocation(N).pathname:N.pathname,J=z.pathname,ne=K&&K.navigation&&K.navigation.location?K.navigation.location.pathname:null;s||(J=J.toLowerCase(),ne=ne?ne.toLowerCase():null,Y=Y.toLowerCase()),ne&&$&&(ne=fn(ne,$)||ne);const pe=Y!=="/"&&Y.endsWith("/")?Y.length-1:Y.length;let I=J===Y||!d&&J.startsWith(Y)&&J.charAt(pe)==="/",Ee=ne!=null&&(ne===Y||!d&&ne.startsWith(Y)&&ne.charAt(Y.length)==="/"),X={isActive:I,isPending:Ee,isTransitioning:M},be=I?i:void 0,$e;typeof u=="function"?$e=u(X):$e=[u,I?"active":null,Ee?"pending":null,M?"transitioning":null].filter(Boolean).join(" ");let gt=typeof f=="function"?f(X):f;return S.createElement(ya,{...g,"aria-current":be,className:$e,ref:b,style:gt,to:m,viewTransition:y},typeof v=="function"?v(X):v)});Xr.displayName="NavLink";var Ub=S.forwardRef(({discover:n="render",fetcherKey:i,navigate:s,reloadDocument:u,replace:d,state:f,method:m=Gr,action:y,onSubmit:v,relative:g,preventScrollReset:b,viewTransition:N,defaultShouldRevalidate:z,...K},O)=>{let{useTransitions:$}=S.useContext(Pt),M=$b(),Y=Vb(y,{relative:g}),J=m.toLowerCase()==="get"?"get":"post",ne=typeof y=="string"&&gd.test(y),pe=I=>{if(v&&v(I),I.defaultPrevented)return;I.preventDefault();let Ee=I.nativeEvent.submitter,X=(Ee==null?void 0:Ee.getAttribute("formmethod"))||m,be=()=>M(Ee||I.currentTarget,{fetcherKey:i,method:X,navigate:s,replace:d,state:f,relative:g,preventScrollReset:b,viewTransition:N,defaultShouldRevalidate:z});$&&s!==!1?S.startTransition(()=>be()):be()};return S.createElement("form",{ref:O,method:J,action:Y,onSubmit:u?v:pe,...K,"data-discover":!ne&&n==="render"?"true":void 0})});Ub.displayName="Form";function zb(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Px(n){let i=S.useContext(pi);return at(i,zb(n)),i}function Bb(n,{target:i,replace:s,mask:u,state:d,preventScrollReset:f,relative:m,viewTransition:y,defaultShouldRevalidate:v,useTransitions:g}={}){let b=_d(),N=Da(),z=Ns(n,{relative:m});return S.useCallback(K=>{if(pb(K,i)){K.preventDefault();let O=s!==void 0?s:dl(N)===dl(z),$=()=>b(n,{replace:O,mask:u,state:d,preventScrollReset:f,relative:m,viewTransition:y,defaultShouldRevalidate:v});g?S.startTransition(()=>$()):$()}},[N,b,z,s,u,d,i,n,f,m,y,v,g])}function ey(n){xa(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 i=S.useRef(ld(n)),s=S.useRef(!1),u=Da(),d=S.useMemo(()=>xb(u.search,s.current?null:i.current),[u.search]),f=_d(),m=S.useCallback((y,v)=>{const g=ld(typeof y=="function"?y(new URLSearchParams(d)):y);s.current=!0,f("?"+g,v)},[f,d]);return[d,m]}var qb=0,Hb=()=>`__${String(++qb)}__`;function $b(){let{router:n}=Px("useSubmit"),{basename:i}=S.useContext(Pt),s=ib(),u=n.fetch,d=n.navigate;return S.useCallback(async(f,m={})=>{let{action:y,method:v,encType:g,formData:b,body:N}=gb(f,i);if(m.navigate===!1){let z=m.fetcherKey||Hb();await u(z,s,m.action||y,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:N,formMethod:m.method||v,formEncType:m.encType||g,flushSync:m.flushSync})}else await d(m.action||y,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:N,formMethod:m.method||v,formEncType:m.encType||g,replace:m.replace,state:m.state,fromRouteId:s,flushSync:m.flushSync,viewTransition:m.viewTransition})},[u,d,i,s])}function Vb(n,{relative:i}={}){let{basename:s}=S.useContext(Pt),u=S.useContext(Ma);at(u,"useFormAction must be used inside a RouteContext");let[d]=u.matches.slice(-1),f={...Ns(n||".",{relative:i})},m=Da();if(n==null){f.search=m.search;let y=new URLSearchParams(f.search),v=y.getAll("index");if(v.some(b=>b==="")){y.delete("index"),v.filter(N=>N).forEach(N=>y.append("index",N));let b=y.toString();f.search=b?`?${b}`:""}}return(!n||n===".")&&d.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(f.pathname=f.pathname==="/"?s:ka([s,f.pathname])),dl(f)}function Yb(n,{relative:i}={}){let s=S.useContext(Zx);at(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=Px("useViewTransitionState"),d=Ns(n,{relative:i});if(!s.isTransitioning)return!1;let f=fn(s.currentLocation.pathname,u)||s.currentLocation.pathname,m=fn(s.nextLocation.pathname,u)||s.nextLocation.pathname;return Jr(d.pathname,m)!=null||Jr(d.pathname,f)!=null}var De;(function(n){n.assertEqual=d=>{};function i(d){}n.assertIs=i;function s(d){throw new Error}n.assertNever=s,n.arrayToEnum=d=>{const f={};for(const m of d)f[m]=m;return f},n.getValidEnumValues=d=>{const f=n.objectKeys(d).filter(y=>typeof d[d[y]]!="number"),m={};for(const y of f)m[y]=d[y];return n.objectValues(m)},n.objectValues=d=>n.objectKeys(d).map(function(f){return d[f]}),n.objectKeys=typeof Object.keys=="function"?d=>Object.keys(d):d=>{const f=[];for(const m in d)Object.prototype.hasOwnProperty.call(d,m)&&f.push(m);return f},n.find=(d,f)=>{for(const m of d)if(f(m))return m},n.isInteger=typeof Number.isInteger=="function"?d=>Number.isInteger(d):d=>typeof d=="number"&&Number.isFinite(d)&&Math.floor(d)===d;function u(d,f=" | "){return d.map(m=>typeof m=="string"?`'${m}'`:m).join(f)}n.joinValues=u,n.jsonStringifyReplacer=(d,f)=>typeof f=="bigint"?f.toString():f})(De||(De={}));var Pp;(function(n){n.mergeShapes=(i,s)=>({...i,...s})})(Pp||(Pp={}));const ee=De.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$n=n=>{switch(typeof n){case"undefined":return ee.undefined;case"string":return ee.string;case"number":return Number.isNaN(n)?ee.nan:ee.number;case"boolean":return ee.boolean;case"function":return ee.function;case"bigint":return ee.bigint;case"symbol":return ee.symbol;case"object":return Array.isArray(n)?ee.array:n===null?ee.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?ee.promise:typeof Map<"u"&&n instanceof Map?ee.map:typeof Set<"u"&&n instanceof Set?ee.set:typeof Date<"u"&&n instanceof Date?ee.date:ee.object;default:return ee.unknown}},Q=De.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 hn extends Error{get errors(){return this.issues}constructor(i){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=i}format(i){const s=i||function(f){return f.message},u={_errors:[]},d=f=>{for(const m of f.issues)if(m.code==="invalid_union")m.unionErrors.map(d);else if(m.code==="invalid_return_type")d(m.returnTypeError);else if(m.code==="invalid_arguments")d(m.argumentsError);else if(m.path.length===0)u._errors.push(s(m));else{let y=u,v=0;for(;v<m.path.length;){const g=m.path[v];v===m.path.length-1?(y[g]=y[g]||{_errors:[]},y[g]._errors.push(s(m))):y[g]=y[g]||{_errors:[]},y=y[g],v++}}};return d(this),u}static assert(i){if(!(i instanceof hn))throw new Error(`Not a ZodError: ${i}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,De.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(i=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(i(d))}else u.push(i(d));return{formErrors:u,fieldErrors:s}}get formErrors(){return this.flatten()}}hn.create=n=>new hn(n);const id=(n,i)=>{let s;switch(n.code){case Q.invalid_type:n.received===ee.undefined?s="Required":s=`Expected ${n.expected}, received ${n.received}`;break;case Q.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(n.expected,De.jsonStringifyReplacer)}`;break;case Q.unrecognized_keys:s=`Unrecognized key(s) in object: ${De.joinValues(n.keys,", ")}`;break;case Q.invalid_union:s="Invalid input";break;case Q.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${De.joinValues(n.options)}`;break;case Q.invalid_enum_value:s=`Invalid enum value. Expected ${De.joinValues(n.options)}, received '${n.received}'`;break;case Q.invalid_arguments:s="Invalid function arguments";break;case Q.invalid_return_type:s="Invalid function return type";break;case Q.invalid_date:s="Invalid date";break;case Q.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}"`:De.assertNever(n.validation):n.validation!=="regex"?s=`Invalid ${n.validation}`:s="Invalid";break;case Q.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 Q.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 Q.custom:s="Invalid input";break;case Q.invalid_intersection_types:s="Intersection results could not be merged";break;case Q.not_multiple_of:s=`Number must be a multiple of ${n.multipleOf}`;break;case Q.not_finite:s="Number must be finite";break;default:s=i.defaultError,De.assertNever(n)}return{message:s}};let Zb=id;function Gb(){return Zb}const Qb=n=>{const{data:i,path:s,errorMaps:u,issueData:d}=n,f=[...s,...d.path||[]],m={...d,path:f};if(d.message!==void 0)return{...d,path:f,message:d.message};let y="";const v=u.filter(g=>!!g).slice().reverse();for(const g of v)y=g(m,{data:i,defaultError:y}).message;return{...d,path:f,message:y}};function W(n,i){const s=Gb(),u=Qb({issueData:i,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,s,s===id?void 0:id].filter(d=>!!d)});n.common.issues.push(u)}class Mt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(i,s){const u=[];for(const d of s){if(d.status==="aborted")return xe;d.status==="dirty"&&i.dirty(),u.push(d.value)}return{status:i.value,value:u}}static async mergeObjectAsync(i,s){const u=[];for(const d of s){const f=await d.key,m=await d.value;u.push({key:f,value:m})}return Mt.mergeObjectSync(i,u)}static mergeObjectSync(i,s){const u={};for(const d of s){const{key:f,value:m}=d;if(f.status==="aborted"||m.status==="aborted")return xe;f.status==="dirty"&&i.dirty(),m.status==="dirty"&&i.dirty(),f.value!=="__proto__"&&(typeof m.value<"u"||d.alwaysSet)&&(u[f.value]=m.value)}return{status:i.value,value:u}}}const xe=Object.freeze({status:"aborted"}),ms=n=>({status:"dirty",value:n}),va=n=>({status:"valid",value:n}),ex=n=>n.status==="aborted",tx=n=>n.status==="dirty",fi=n=>n.status==="valid",Ir=n=>typeof Promise<"u"&&n instanceof Promise;var se;(function(n){n.errToObj=i=>typeof i=="string"?{message:i}:i||{},n.toString=i=>typeof i=="string"?i:i==null?void 0:i.message})(se||(se={}));class Va{constructor(i,s,u,d){this._cachedPath=[],this.parent=i,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 ax=(n,i)=>{if(fi(i))return{success:!0,data:i.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 hn(n.common.issues);return this._error=s,this._error}}};function je(n){if(!n)return{};const{errorMap:i,invalid_type_error:s,required_error:u,description:d}=n;if(i&&(s||u))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return i?{errorMap:i,description:d}:{errorMap:(m,y)=>{const{message:v}=n;return m.code==="invalid_enum_value"?{message:v??y.defaultError}:typeof y.data>"u"?{message:v??u??y.defaultError}:m.code!=="invalid_type"?{message:y.defaultError}:{message:v??s??y.defaultError}},description:d}}class ke{get description(){return this._def.description}_getType(i){return $n(i.data)}_getOrReturnCtx(i,s){return s||{common:i.parent.common,data:i.data,parsedType:$n(i.data),schemaErrorMap:this._def.errorMap,path:i.path,parent:i.parent}}_processInputParams(i){return{status:new Mt,ctx:{common:i.parent.common,data:i.data,parsedType:$n(i.data),schemaErrorMap:this._def.errorMap,path:i.path,parent:i.parent}}}_parseSync(i){const s=this._parse(i);if(Ir(s))throw new Error("Synchronous parse encountered promise.");return s}_parseAsync(i){const s=this._parse(i);return Promise.resolve(s)}parse(i,s){const u=this.safeParse(i,s);if(u.success)return u.data;throw u.error}safeParse(i,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:i,parsedType:$n(i)},d=this._parseSync({data:i,path:u.path,parent:u});return ax(u,d)}"~validate"(i){var u,d;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:$n(i)};if(!this["~standard"].async)try{const f=this._parseSync({data:i,path:[],parent:s});return fi(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:i,path:[],parent:s}).then(f=>fi(f)?{value:f.value}:{issues:s.common.issues})}async parseAsync(i,s){const u=await this.safeParseAsync(i,s);if(u.success)return u.data;throw u.error}async safeParseAsync(i,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:i,parsedType:$n(i)},d=this._parse({data:i,path:u.path,parent:u}),f=await(Ir(d)?d:Promise.resolve(d));return ax(u,f)}refine(i,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=i(d),y=()=>f.addIssue({code:Q.custom,...u(d)});return typeof Promise<"u"&&m instanceof Promise?m.then(v=>v?!0:(y(),!1)):m?!0:(y(),!1)})}refinement(i,s){return this._refinement((u,d)=>i(u)?!0:(d.addIssue(typeof s=="function"?s(u,d):s),!1))}_refinement(i){return new xl({schema:this,typeName:ye.ZodEffects,effect:{type:"refinement",refinement:i}})}superRefine(i){return this._refinement(i)}constructor(i){this.spa=this.safeParseAsync,this._def=i,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 dn.create(this,this._def)}nullable(){return yl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $a.create(this)}promise(){return au.create(this,this._def)}or(i){return Wr.create([this,i],this._def)}and(i){return Pr.create(this,i,this._def)}transform(i){return new xl({...je(this._def),schema:this,typeName:ye.ZodEffects,effect:{type:"transform",transform:i}})}default(i){const s=typeof i=="function"?i:()=>i;return new nu({...je(this._def),innerType:this,defaultValue:s,typeName:ye.ZodDefault})}brand(){return new ly({typeName:ye.ZodBranded,type:this,...je(this._def)})}catch(i){const s=typeof i=="function"?i:()=>i;return new lu({...je(this._def),innerType:this,catchValue:s,typeName:ye.ZodCatch})}describe(i){const s=this.constructor;return new s({...this._def,description:i})}pipe(i){return kd.create(this,i)}readonly(){return iu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Xb=/^c[^\s-]{8,}$/i,Kb=/^[0-9a-z]+$/,Jb=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ib=/^[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,Fb=/^[a-z0-9_-]{21}$/i,Wb=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Pb=/^[-+]?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)?)??$/,e1=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,t1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ho;const a1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,n1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,l1=/^(([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]))$/,i1=/^(([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])$/,s1=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,r1=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ty="((\\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])))",u1=new RegExp(`^${ty}$`);function ay(n){let i="[0-5]\\d";n.precision?i=`${i}\\.\\d{${n.precision}}`:n.precision==null&&(i=`${i}(\\.\\d+)?`);const s=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${i})${s}`}function c1(n){return new RegExp(`^${ay(n)}$`)}function o1(n){let i=`${ty}T${ay(n)}`;const s=[];return s.push(n.local?"Z?":"Z"),n.offset&&s.push("([+-]\\d{2}:?\\d{2})"),i=`${i}(${s.join("|")})`,new RegExp(`^${i}$`)}function d1(n,i){return!!((i==="v4"||!i)&&a1.test(n)||(i==="v6"||!i)&&l1.test(n))}function f1(n,i){if(!Wb.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||i&&d.alg!==i)}catch{return!1}}function h1(n,i){return!!((i==="v4"||!i)&&n1.test(n)||(i==="v6"||!i)&&i1.test(n))}class qa extends ke{_parse(i){if(this._def.coerce&&(i.data=String(i.data)),this._getType(i)!==ee.string){const f=this._getOrReturnCtx(i);return W(f,{code:Q.invalid_type,expected:ee.string,received:f.parsedType}),xe}const u=new Mt;let d;for(const f of this._def.checks)if(f.kind==="min")i.data.length<f.value&&(d=this._getOrReturnCtx(i,d),W(d,{code:Q.too_small,minimum:f.value,type:"string",inclusive:!0,exact:!1,message:f.message}),u.dirty());else if(f.kind==="max")i.data.length>f.value&&(d=this._getOrReturnCtx(i,d),W(d,{code:Q.too_big,maximum:f.value,type:"string",inclusive:!0,exact:!1,message:f.message}),u.dirty());else if(f.kind==="length"){const m=i.data.length>f.value,y=i.data.length<f.value;(m||y)&&(d=this._getOrReturnCtx(i,d),m?W(d,{code:Q.too_big,maximum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}):y&&W(d,{code:Q.too_small,minimum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}),u.dirty())}else if(f.kind==="email")e1.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"email",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="emoji")Ho||(Ho=new RegExp(t1,"u")),Ho.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"emoji",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="uuid")Ib.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"uuid",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="nanoid")Fb.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"nanoid",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid")Xb.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"cuid",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid2")Kb.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"cuid2",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="ulid")Jb.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"ulid",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="url")try{new URL(i.data)}catch{d=this._getOrReturnCtx(i,d),W(d,{validation:"url",code:Q.invalid_string,message:f.message}),u.dirty()}else f.kind==="regex"?(f.regex.lastIndex=0,f.regex.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"regex",code:Q.invalid_string,message:f.message}),u.dirty())):f.kind==="trim"?i.data=i.data.trim():f.kind==="includes"?i.data.includes(f.value,f.position)||(d=this._getOrReturnCtx(i,d),W(d,{code:Q.invalid_string,validation:{includes:f.value,position:f.position},message:f.message}),u.dirty()):f.kind==="toLowerCase"?i.data=i.data.toLowerCase():f.kind==="toUpperCase"?i.data=i.data.toUpperCase():f.kind==="startsWith"?i.data.startsWith(f.value)||(d=this._getOrReturnCtx(i,d),W(d,{code:Q.invalid_string,validation:{startsWith:f.value},message:f.message}),u.dirty()):f.kind==="endsWith"?i.data.endsWith(f.value)||(d=this._getOrReturnCtx(i,d),W(d,{code:Q.invalid_string,validation:{endsWith:f.value},message:f.message}),u.dirty()):f.kind==="datetime"?o1(f).test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{code:Q.invalid_string,validation:"datetime",message:f.message}),u.dirty()):f.kind==="date"?u1.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{code:Q.invalid_string,validation:"date",message:f.message}),u.dirty()):f.kind==="time"?c1(f).test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{code:Q.invalid_string,validation:"time",message:f.message}),u.dirty()):f.kind==="duration"?Pb.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"duration",code:Q.invalid_string,message:f.message}),u.dirty()):f.kind==="ip"?d1(i.data,f.version)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"ip",code:Q.invalid_string,message:f.message}),u.dirty()):f.kind==="jwt"?f1(i.data,f.alg)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"jwt",code:Q.invalid_string,message:f.message}),u.dirty()):f.kind==="cidr"?h1(i.data,f.version)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"cidr",code:Q.invalid_string,message:f.message}),u.dirty()):f.kind==="base64"?s1.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"base64",code:Q.invalid_string,message:f.message}),u.dirty()):f.kind==="base64url"?r1.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"base64url",code:Q.invalid_string,message:f.message}),u.dirty()):De.assertNever(f);return{status:u.value,value:i.data}}_regex(i,s,u){return this.refinement(d=>i.test(d),{validation:s,code:Q.invalid_string,...se.errToObj(u)})}_addCheck(i){return new qa({...this._def,checks:[...this._def.checks,i]})}email(i){return this._addCheck({kind:"email",...se.errToObj(i)})}url(i){return this._addCheck({kind:"url",...se.errToObj(i)})}emoji(i){return this._addCheck({kind:"emoji",...se.errToObj(i)})}uuid(i){return this._addCheck({kind:"uuid",...se.errToObj(i)})}nanoid(i){return this._addCheck({kind:"nanoid",...se.errToObj(i)})}cuid(i){return this._addCheck({kind:"cuid",...se.errToObj(i)})}cuid2(i){return this._addCheck({kind:"cuid2",...se.errToObj(i)})}ulid(i){return this._addCheck({kind:"ulid",...se.errToObj(i)})}base64(i){return this._addCheck({kind:"base64",...se.errToObj(i)})}base64url(i){return this._addCheck({kind:"base64url",...se.errToObj(i)})}jwt(i){return this._addCheck({kind:"jwt",...se.errToObj(i)})}ip(i){return this._addCheck({kind:"ip",...se.errToObj(i)})}cidr(i){return this._addCheck({kind:"cidr",...se.errToObj(i)})}datetime(i){return typeof i=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:i}):this._addCheck({kind:"datetime",precision:typeof(i==null?void 0:i.precision)>"u"?null:i==null?void 0:i.precision,offset:(i==null?void 0:i.offset)??!1,local:(i==null?void 0:i.local)??!1,...se.errToObj(i==null?void 0:i.message)})}date(i){return this._addCheck({kind:"date",message:i})}time(i){return typeof i=="string"?this._addCheck({kind:"time",precision:null,message:i}):this._addCheck({kind:"time",precision:typeof(i==null?void 0:i.precision)>"u"?null:i==null?void 0:i.precision,...se.errToObj(i==null?void 0:i.message)})}duration(i){return this._addCheck({kind:"duration",...se.errToObj(i)})}regex(i,s){return this._addCheck({kind:"regex",regex:i,...se.errToObj(s)})}includes(i,s){return this._addCheck({kind:"includes",value:i,position:s==null?void 0:s.position,...se.errToObj(s==null?void 0:s.message)})}startsWith(i,s){return this._addCheck({kind:"startsWith",value:i,...se.errToObj(s)})}endsWith(i,s){return this._addCheck({kind:"endsWith",value:i,...se.errToObj(s)})}min(i,s){return this._addCheck({kind:"min",value:i,...se.errToObj(s)})}max(i,s){return this._addCheck({kind:"max",value:i,...se.errToObj(s)})}length(i,s){return this._addCheck({kind:"length",value:i,...se.errToObj(s)})}nonempty(i){return this.min(1,se.errToObj(i))}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(i=>i.kind==="datetime")}get isDate(){return!!this._def.checks.find(i=>i.kind==="date")}get isTime(){return!!this._def.checks.find(i=>i.kind==="time")}get isDuration(){return!!this._def.checks.find(i=>i.kind==="duration")}get isEmail(){return!!this._def.checks.find(i=>i.kind==="email")}get isURL(){return!!this._def.checks.find(i=>i.kind==="url")}get isEmoji(){return!!this._def.checks.find(i=>i.kind==="emoji")}get isUUID(){return!!this._def.checks.find(i=>i.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(i=>i.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(i=>i.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(i=>i.kind==="cuid2")}get isULID(){return!!this._def.checks.find(i=>i.kind==="ulid")}get isIP(){return!!this._def.checks.find(i=>i.kind==="ip")}get isCIDR(){return!!this._def.checks.find(i=>i.kind==="cidr")}get isBase64(){return!!this._def.checks.find(i=>i.kind==="base64")}get isBase64url(){return!!this._def.checks.find(i=>i.kind==="base64url")}get minLength(){let i=null;for(const s of this._def.checks)s.kind==="min"&&(i===null||s.value>i)&&(i=s.value);return i}get maxLength(){let i=null;for(const s of this._def.checks)s.kind==="max"&&(i===null||s.value<i)&&(i=s.value);return i}}qa.create=n=>new qa({checks:[],typeName:ye.ZodString,coerce:(n==null?void 0:n.coerce)??!1,...je(n)});function m1(n,i){const s=(n.toString().split(".")[1]||"").length,u=(i.toString().split(".")[1]||"").length,d=s>u?s:u,f=Number.parseInt(n.toFixed(d).replace(".","")),m=Number.parseInt(i.toFixed(d).replace(".",""));return f%m/10**d}class fl extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(i){if(this._def.coerce&&(i.data=Number(i.data)),this._getType(i)!==ee.number){const f=this._getOrReturnCtx(i);return W(f,{code:Q.invalid_type,expected:ee.number,received:f.parsedType}),xe}let u;const d=new Mt;for(const f of this._def.checks)f.kind==="int"?De.isInteger(i.data)||(u=this._getOrReturnCtx(i,u),W(u,{code:Q.invalid_type,expected:"integer",received:"float",message:f.message}),d.dirty()):f.kind==="min"?(f.inclusive?i.data<f.value:i.data<=f.value)&&(u=this._getOrReturnCtx(i,u),W(u,{code:Q.too_small,minimum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),d.dirty()):f.kind==="max"?(f.inclusive?i.data>f.value:i.data>=f.value)&&(u=this._getOrReturnCtx(i,u),W(u,{code:Q.too_big,maximum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),d.dirty()):f.kind==="multipleOf"?m1(i.data,f.value)!==0&&(u=this._getOrReturnCtx(i,u),W(u,{code:Q.not_multiple_of,multipleOf:f.value,message:f.message}),d.dirty()):f.kind==="finite"?Number.isFinite(i.data)||(u=this._getOrReturnCtx(i,u),W(u,{code:Q.not_finite,message:f.message}),d.dirty()):De.assertNever(f);return{status:d.value,value:i.data}}gte(i,s){return this.setLimit("min",i,!0,se.toString(s))}gt(i,s){return this.setLimit("min",i,!1,se.toString(s))}lte(i,s){return this.setLimit("max",i,!0,se.toString(s))}lt(i,s){return this.setLimit("max",i,!1,se.toString(s))}setLimit(i,s,u,d){return new fl({...this._def,checks:[...this._def.checks,{kind:i,value:s,inclusive:u,message:se.toString(d)}]})}_addCheck(i){return new fl({...this._def,checks:[...this._def.checks,i]})}int(i){return this._addCheck({kind:"int",message:se.toString(i)})}positive(i){return this._addCheck({kind:"min",value:0,inclusive:!1,message:se.toString(i)})}negative(i){return this._addCheck({kind:"max",value:0,inclusive:!1,message:se.toString(i)})}nonpositive(i){return this._addCheck({kind:"max",value:0,inclusive:!0,message:se.toString(i)})}nonnegative(i){return this._addCheck({kind:"min",value:0,inclusive:!0,message:se.toString(i)})}multipleOf(i,s){return this._addCheck({kind:"multipleOf",value:i,message:se.toString(s)})}finite(i){return this._addCheck({kind:"finite",message:se.toString(i)})}safe(i){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:se.toString(i)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:se.toString(i)})}get minValue(){let i=null;for(const s of this._def.checks)s.kind==="min"&&(i===null||s.value>i)&&(i=s.value);return i}get maxValue(){let i=null;for(const s of this._def.checks)s.kind==="max"&&(i===null||s.value<i)&&(i=s.value);return i}get isInt(){return!!this._def.checks.find(i=>i.kind==="int"||i.kind==="multipleOf"&&De.isInteger(i.value))}get isFinite(){let i=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"&&(i===null||u.value<i)&&(i=u.value)}return Number.isFinite(s)&&Number.isFinite(i)}}fl.create=n=>new fl({checks:[],typeName:ye.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...je(n)});class hl extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(i){if(this._def.coerce)try{i.data=BigInt(i.data)}catch{return this._getInvalidInput(i)}if(this._getType(i)!==ee.bigint)return this._getInvalidInput(i);let u;const d=new Mt;for(const f of this._def.checks)f.kind==="min"?(f.inclusive?i.data<f.value:i.data<=f.value)&&(u=this._getOrReturnCtx(i,u),W(u,{code:Q.too_small,type:"bigint",minimum:f.value,inclusive:f.inclusive,message:f.message}),d.dirty()):f.kind==="max"?(f.inclusive?i.data>f.value:i.data>=f.value)&&(u=this._getOrReturnCtx(i,u),W(u,{code:Q.too_big,type:"bigint",maximum:f.value,inclusive:f.inclusive,message:f.message}),d.dirty()):f.kind==="multipleOf"?i.data%f.value!==BigInt(0)&&(u=this._getOrReturnCtx(i,u),W(u,{code:Q.not_multiple_of,multipleOf:f.value,message:f.message}),d.dirty()):De.assertNever(f);return{status:d.value,value:i.data}}_getInvalidInput(i){const s=this._getOrReturnCtx(i);return W(s,{code:Q.invalid_type,expected:ee.bigint,received:s.parsedType}),xe}gte(i,s){return this.setLimit("min",i,!0,se.toString(s))}gt(i,s){return this.setLimit("min",i,!1,se.toString(s))}lte(i,s){return this.setLimit("max",i,!0,se.toString(s))}lt(i,s){return this.setLimit("max",i,!1,se.toString(s))}setLimit(i,s,u,d){return new hl({...this._def,checks:[...this._def.checks,{kind:i,value:s,inclusive:u,message:se.toString(d)}]})}_addCheck(i){return new hl({...this._def,checks:[...this._def.checks,i]})}positive(i){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:se.toString(i)})}negative(i){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:se.toString(i)})}nonpositive(i){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:se.toString(i)})}nonnegative(i){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:se.toString(i)})}multipleOf(i,s){return this._addCheck({kind:"multipleOf",value:i,message:se.toString(s)})}get minValue(){let i=null;for(const s of this._def.checks)s.kind==="min"&&(i===null||s.value>i)&&(i=s.value);return i}get maxValue(){let i=null;for(const s of this._def.checks)s.kind==="max"&&(i===null||s.value<i)&&(i=s.value);return i}}hl.create=n=>new hl({checks:[],typeName:ye.ZodBigInt,coerce:(n==null?void 0:n.coerce)??!1,...je(n)});class Fr extends ke{_parse(i){if(this._def.coerce&&(i.data=!!i.data),this._getType(i)!==ee.boolean){const u=this._getOrReturnCtx(i);return W(u,{code:Q.invalid_type,expected:ee.boolean,received:u.parsedType}),xe}return va(i.data)}}Fr.create=n=>new Fr({typeName:ye.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...je(n)});class hi extends ke{_parse(i){if(this._def.coerce&&(i.data=new Date(i.data)),this._getType(i)!==ee.date){const f=this._getOrReturnCtx(i);return W(f,{code:Q.invalid_type,expected:ee.date,received:f.parsedType}),xe}if(Number.isNaN(i.data.getTime())){const f=this._getOrReturnCtx(i);return W(f,{code:Q.invalid_date}),xe}const u=new Mt;let d;for(const f of this._def.checks)f.kind==="min"?i.data.getTime()<f.value&&(d=this._getOrReturnCtx(i,d),W(d,{code:Q.too_small,message:f.message,inclusive:!0,exact:!1,minimum:f.value,type:"date"}),u.dirty()):f.kind==="max"?i.data.getTime()>f.value&&(d=this._getOrReturnCtx(i,d),W(d,{code:Q.too_big,message:f.message,inclusive:!0,exact:!1,maximum:f.value,type:"date"}),u.dirty()):De.assertNever(f);return{status:u.value,value:new Date(i.data.getTime())}}_addCheck(i){return new hi({...this._def,checks:[...this._def.checks,i]})}min(i,s){return this._addCheck({kind:"min",value:i.getTime(),message:se.toString(s)})}max(i,s){return this._addCheck({kind:"max",value:i.getTime(),message:se.toString(s)})}get minDate(){let i=null;for(const s of this._def.checks)s.kind==="min"&&(i===null||s.value>i)&&(i=s.value);return i!=null?new Date(i):null}get maxDate(){let i=null;for(const s of this._def.checks)s.kind==="max"&&(i===null||s.value<i)&&(i=s.value);return i!=null?new Date(i):null}}hi.create=n=>new hi({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:ye.ZodDate,...je(n)});class nx extends ke{_parse(i){if(this._getType(i)!==ee.symbol){const u=this._getOrReturnCtx(i);return W(u,{code:Q.invalid_type,expected:ee.symbol,received:u.parsedType}),xe}return va(i.data)}}nx.create=n=>new nx({typeName:ye.ZodSymbol,...je(n)});class sd extends ke{_parse(i){if(this._getType(i)!==ee.undefined){const u=this._getOrReturnCtx(i);return W(u,{code:Q.invalid_type,expected:ee.undefined,received:u.parsedType}),xe}return va(i.data)}}sd.create=n=>new sd({typeName:ye.ZodUndefined,...je(n)});class rd extends ke{_parse(i){if(this._getType(i)!==ee.null){const u=this._getOrReturnCtx(i);return W(u,{code:Q.invalid_type,expected:ee.null,received:u.parsedType}),xe}return va(i.data)}}rd.create=n=>new rd({typeName:ye.ZodNull,...je(n)});class lx extends ke{constructor(){super(...arguments),this._any=!0}_parse(i){return va(i.data)}}lx.create=n=>new lx({typeName:ye.ZodAny,...je(n)});class ud extends ke{constructor(){super(...arguments),this._unknown=!0}_parse(i){return va(i.data)}}ud.create=n=>new ud({typeName:ye.ZodUnknown,...je(n)});class Zn extends ke{_parse(i){const s=this._getOrReturnCtx(i);return W(s,{code:Q.invalid_type,expected:ee.never,received:s.parsedType}),xe}}Zn.create=n=>new Zn({typeName:ye.ZodNever,...je(n)});class ix extends ke{_parse(i){if(this._getType(i)!==ee.undefined){const u=this._getOrReturnCtx(i);return W(u,{code:Q.invalid_type,expected:ee.void,received:u.parsedType}),xe}return va(i.data)}}ix.create=n=>new ix({typeName:ye.ZodVoid,...je(n)});class $a extends ke{_parse(i){const{ctx:s,status:u}=this._processInputParams(i),d=this._def;if(s.parsedType!==ee.array)return W(s,{code:Q.invalid_type,expected:ee.array,received:s.parsedType}),xe;if(d.exactLength!==null){const m=s.data.length>d.exactLength.value,y=s.data.length<d.exactLength.value;(m||y)&&(W(s,{code:m?Q.too_big:Q.too_small,minimum:y?d.exactLength.value:void 0,maximum:m?d.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:d.exactLength.message}),u.dirty())}if(d.minLength!==null&&s.data.length<d.minLength.value&&(W(s,{code:Q.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&&(W(s,{code:Q.too_big,maximum:d.maxLength.value,type:"array",inclusive:!0,exact:!1,message:d.maxLength.message}),u.dirty()),s.common.async)return Promise.all([...s.data].map((m,y)=>d.type._parseAsync(new Va(s,m,s.path,y)))).then(m=>Mt.mergeArray(u,m));const f=[...s.data].map((m,y)=>d.type._parseSync(new Va(s,m,s.path,y)));return Mt.mergeArray(u,f)}get element(){return this._def.type}min(i,s){return new $a({...this._def,minLength:{value:i,message:se.toString(s)}})}max(i,s){return new $a({...this._def,maxLength:{value:i,message:se.toString(s)}})}length(i,s){return new $a({...this._def,exactLength:{value:i,message:se.toString(s)}})}nonempty(i){return this.min(1,i)}}$a.create=(n,i)=>new $a({type:n,minLength:null,maxLength:null,exactLength:null,typeName:ye.ZodArray,...je(i)});function ci(n){if(n instanceof pt){const i={};for(const s in n.shape){const u=n.shape[s];i[s]=dn.create(ci(u))}return new pt({...n._def,shape:()=>i})}else return n instanceof $a?new $a({...n._def,type:ci(n.element)}):n instanceof dn?dn.create(ci(n.unwrap())):n instanceof yl?yl.create(ci(n.unwrap())):n instanceof ml?ml.create(n.items.map(i=>ci(i))):n}class pt extends ke{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const i=this._def.shape(),s=De.objectKeys(i);return this._cached={shape:i,keys:s},this._cached}_parse(i){if(this._getType(i)!==ee.object){const g=this._getOrReturnCtx(i);return W(g,{code:Q.invalid_type,expected:ee.object,received:g.parsedType}),xe}const{status:u,ctx:d}=this._processInputParams(i),{shape:f,keys:m}=this._getCached(),y=[];if(!(this._def.catchall instanceof Zn&&this._def.unknownKeys==="strip"))for(const g in d.data)m.includes(g)||y.push(g);const v=[];for(const g of m){const b=f[g],N=d.data[g];v.push({key:{status:"valid",value:g},value:b._parse(new Va(d,N,d.path,g)),alwaysSet:g in d.data})}if(this._def.catchall instanceof Zn){const g=this._def.unknownKeys;if(g==="passthrough")for(const b of y)v.push({key:{status:"valid",value:b},value:{status:"valid",value:d.data[b]}});else if(g==="strict")y.length>0&&(W(d,{code:Q.unrecognized_keys,keys:y}),u.dirty());else if(g!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const g=this._def.catchall;for(const b of y){const N=d.data[b];v.push({key:{status:"valid",value:b},value:g._parse(new Va(d,N,d.path,b)),alwaysSet:b in d.data})}}return d.common.async?Promise.resolve().then(async()=>{const g=[];for(const b of v){const N=await b.key,z=await b.value;g.push({key:N,value:z,alwaysSet:b.alwaysSet})}return g}).then(g=>Mt.mergeObjectSync(u,g)):Mt.mergeObjectSync(u,v)}get shape(){return this._def.shape()}strict(i){return se.errToObj,new pt({...this._def,unknownKeys:"strict",...i!==void 0?{errorMap:(s,u)=>{var f,m;const d=((m=(f=this._def).errorMap)==null?void 0:m.call(f,s,u).message)??u.defaultError;return s.code==="unrecognized_keys"?{message:se.errToObj(i).message??d}:{message:d}}}:{}})}strip(){return new pt({...this._def,unknownKeys:"strip"})}passthrough(){return new pt({...this._def,unknownKeys:"passthrough"})}extend(i){return new pt({...this._def,shape:()=>({...this._def.shape(),...i})})}merge(i){return new pt({unknownKeys:i._def.unknownKeys,catchall:i._def.catchall,shape:()=>({...this._def.shape(),...i._def.shape()}),typeName:ye.ZodObject})}setKey(i,s){return this.augment({[i]:s})}catchall(i){return new pt({...this._def,catchall:i})}pick(i){const s={};for(const u of De.objectKeys(i))i[u]&&this.shape[u]&&(s[u]=this.shape[u]);return new pt({...this._def,shape:()=>s})}omit(i){const s={};for(const u of De.objectKeys(this.shape))i[u]||(s[u]=this.shape[u]);return new pt({...this._def,shape:()=>s})}deepPartial(){return ci(this)}partial(i){const s={};for(const u of De.objectKeys(this.shape)){const d=this.shape[u];i&&!i[u]?s[u]=d:s[u]=d.optional()}return new pt({...this._def,shape:()=>s})}required(i){const s={};for(const u of De.objectKeys(this.shape))if(i&&!i[u])s[u]=this.shape[u];else{let f=this.shape[u];for(;f instanceof dn;)f=f._def.innerType;s[u]=f}return new pt({...this._def,shape:()=>s})}keyof(){return ny(De.objectKeys(this.shape))}}pt.create=(n,i)=>new pt({shape:()=>n,unknownKeys:"strip",catchall:Zn.create(),typeName:ye.ZodObject,...je(i)});pt.strictCreate=(n,i)=>new pt({shape:()=>n,unknownKeys:"strict",catchall:Zn.create(),typeName:ye.ZodObject,...je(i)});pt.lazycreate=(n,i)=>new pt({shape:n,unknownKeys:"strip",catchall:Zn.create(),typeName:ye.ZodObject,...je(i)});class Wr extends ke{_parse(i){const{ctx:s}=this._processInputParams(i),u=this._def.options;function d(f){for(const y of f)if(y.result.status==="valid")return y.result;for(const y of f)if(y.result.status==="dirty")return s.common.issues.push(...y.ctx.common.issues),y.result;const m=f.map(y=>new hn(y.ctx.common.issues));return W(s,{code:Q.invalid_union,unionErrors:m}),xe}if(s.common.async)return Promise.all(u.map(async f=>{const m={...s,common:{...s.common,issues:[]},parent:null};return{result:await f._parseAsync({data:s.data,path:s.path,parent:m}),ctx:m}})).then(d);{let f;const m=[];for(const v of u){const g={...s,common:{...s.common,issues:[]},parent:null},b=v._parseSync({data:s.data,path:s.path,parent:g});if(b.status==="valid")return b;b.status==="dirty"&&!f&&(f={result:b,ctx:g}),g.common.issues.length&&m.push(g.common.issues)}if(f)return s.common.issues.push(...f.ctx.common.issues),f.result;const y=m.map(v=>new hn(v));return W(s,{code:Q.invalid_union,unionErrors:y}),xe}}get options(){return this._def.options}}Wr.create=(n,i)=>new Wr({options:n,typeName:ye.ZodUnion,...je(i)});const on=n=>n instanceof od?on(n.schema):n instanceof xl?on(n.innerType()):n instanceof tu?[n.value]:n instanceof pl?n.options:n instanceof dd?De.objectValues(n.enum):n instanceof nu?on(n._def.innerType):n instanceof sd?[void 0]:n instanceof rd?[null]:n instanceof dn?[void 0,...on(n.unwrap())]:n instanceof yl?[null,...on(n.unwrap())]:n instanceof ly||n instanceof iu?on(n.unwrap()):n instanceof lu?on(n._def.innerType):[];class Rd extends ke{_parse(i){const{ctx:s}=this._processInputParams(i);if(s.parsedType!==ee.object)return W(s,{code:Q.invalid_type,expected:ee.object,received:s.parsedType}),xe;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}):(W(s,{code:Q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[u]}),xe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(i,s,u){const d=new Map;for(const f of s){const m=on(f.shape[i]);if(!m.length)throw new Error(`A discriminator value for key \`${i}\` could not be extracted from all schema options`);for(const y of m){if(d.has(y))throw new Error(`Discriminator property ${String(i)} has duplicate value ${String(y)}`);d.set(y,f)}}return new Rd({typeName:ye.ZodDiscriminatedUnion,discriminator:i,options:s,optionsMap:d,...je(u)})}}function cd(n,i){const s=$n(n),u=$n(i);if(n===i)return{valid:!0,data:n};if(s===ee.object&&u===ee.object){const d=De.objectKeys(i),f=De.objectKeys(n).filter(y=>d.indexOf(y)!==-1),m={...n,...i};for(const y of f){const v=cd(n[y],i[y]);if(!v.valid)return{valid:!1};m[y]=v.data}return{valid:!0,data:m}}else if(s===ee.array&&u===ee.array){if(n.length!==i.length)return{valid:!1};const d=[];for(let f=0;f<n.length;f++){const m=n[f],y=i[f],v=cd(m,y);if(!v.valid)return{valid:!1};d.push(v.data)}return{valid:!0,data:d}}else return s===ee.date&&u===ee.date&&+n==+i?{valid:!0,data:n}:{valid:!1}}class Pr extends ke{_parse(i){const{status:s,ctx:u}=this._processInputParams(i),d=(f,m)=>{if(ex(f)||ex(m))return xe;const y=cd(f.value,m.value);return y.valid?((tx(f)||tx(m))&&s.dirty(),{status:s.value,value:y.data}):(W(u,{code:Q.invalid_intersection_types}),xe)};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}))}}Pr.create=(n,i,s)=>new Pr({left:n,right:i,typeName:ye.ZodIntersection,...je(s)});class ml extends ke{_parse(i){const{status:s,ctx:u}=this._processInputParams(i);if(u.parsedType!==ee.array)return W(u,{code:Q.invalid_type,expected:ee.array,received:u.parsedType}),xe;if(u.data.length<this._def.items.length)return W(u,{code:Q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xe;!this._def.rest&&u.data.length>this._def.items.length&&(W(u,{code:Q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.dirty());const f=[...u.data].map((m,y)=>{const v=this._def.items[y]||this._def.rest;return v?v._parse(new Va(u,m,u.path,y)):null}).filter(m=>!!m);return u.common.async?Promise.all(f).then(m=>Mt.mergeArray(s,m)):Mt.mergeArray(s,f)}get items(){return this._def.items}rest(i){return new ml({...this._def,rest:i})}}ml.create=(n,i)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ml({items:n,typeName:ye.ZodTuple,rest:null,...je(i)})};class eu extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(i){const{status:s,ctx:u}=this._processInputParams(i);if(u.parsedType!==ee.object)return W(u,{code:Q.invalid_type,expected:ee.object,received:u.parsedType}),xe;const d=[],f=this._def.keyType,m=this._def.valueType;for(const y in u.data)d.push({key:f._parse(new Va(u,y,u.path,y)),value:m._parse(new Va(u,u.data[y],u.path,y)),alwaysSet:y in u.data});return u.common.async?Mt.mergeObjectAsync(s,d):Mt.mergeObjectSync(s,d)}get element(){return this._def.valueType}static create(i,s,u){return s instanceof ke?new eu({keyType:i,valueType:s,typeName:ye.ZodRecord,...je(u)}):new eu({keyType:qa.create(),valueType:i,typeName:ye.ZodRecord,...je(s)})}}class sx extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(i){const{status:s,ctx:u}=this._processInputParams(i);if(u.parsedType!==ee.map)return W(u,{code:Q.invalid_type,expected:ee.map,received:u.parsedType}),xe;const d=this._def.keyType,f=this._def.valueType,m=[...u.data.entries()].map(([y,v],g)=>({key:d._parse(new Va(u,y,u.path,[g,"key"])),value:f._parse(new Va(u,v,u.path,[g,"value"]))}));if(u.common.async){const y=new Map;return Promise.resolve().then(async()=>{for(const v of m){const g=await v.key,b=await v.value;if(g.status==="aborted"||b.status==="aborted")return xe;(g.status==="dirty"||b.status==="dirty")&&s.dirty(),y.set(g.value,b.value)}return{status:s.value,value:y}})}else{const y=new Map;for(const v of m){const g=v.key,b=v.value;if(g.status==="aborted"||b.status==="aborted")return xe;(g.status==="dirty"||b.status==="dirty")&&s.dirty(),y.set(g.value,b.value)}return{status:s.value,value:y}}}}sx.create=(n,i,s)=>new sx({valueType:i,keyType:n,typeName:ye.ZodMap,...je(s)});class bs extends ke{_parse(i){const{status:s,ctx:u}=this._processInputParams(i);if(u.parsedType!==ee.set)return W(u,{code:Q.invalid_type,expected:ee.set,received:u.parsedType}),xe;const d=this._def;d.minSize!==null&&u.data.size<d.minSize.value&&(W(u,{code:Q.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&&(W(u,{code:Q.too_big,maximum:d.maxSize.value,type:"set",inclusive:!0,exact:!1,message:d.maxSize.message}),s.dirty());const f=this._def.valueType;function m(v){const g=new Set;for(const b of v){if(b.status==="aborted")return xe;b.status==="dirty"&&s.dirty(),g.add(b.value)}return{status:s.value,value:g}}const y=[...u.data.values()].map((v,g)=>f._parse(new Va(u,v,u.path,g)));return u.common.async?Promise.all(y).then(v=>m(v)):m(y)}min(i,s){return new bs({...this._def,minSize:{value:i,message:se.toString(s)}})}max(i,s){return new bs({...this._def,maxSize:{value:i,message:se.toString(s)}})}size(i,s){return this.min(i,s).max(i,s)}nonempty(i){return this.min(1,i)}}bs.create=(n,i)=>new bs({valueType:n,minSize:null,maxSize:null,typeName:ye.ZodSet,...je(i)});class od extends ke{get schema(){return this._def.getter()}_parse(i){const{ctx:s}=this._processInputParams(i);return this._def.getter()._parse({data:s.data,path:s.path,parent:s})}}od.create=(n,i)=>new od({getter:n,typeName:ye.ZodLazy,...je(i)});class tu extends ke{_parse(i){if(i.data!==this._def.value){const s=this._getOrReturnCtx(i);return W(s,{received:s.data,code:Q.invalid_literal,expected:this._def.value}),xe}return{status:"valid",value:i.data}}get value(){return this._def.value}}tu.create=(n,i)=>new tu({value:n,typeName:ye.ZodLiteral,...je(i)});function ny(n,i){return new pl({values:n,typeName:ye.ZodEnum,...je(i)})}class pl extends ke{_parse(i){if(typeof i.data!="string"){const s=this._getOrReturnCtx(i),u=this._def.values;return W(s,{expected:De.joinValues(u),received:s.parsedType,code:Q.invalid_type}),xe}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(i.data)){const s=this._getOrReturnCtx(i),u=this._def.values;return W(s,{received:s.data,code:Q.invalid_enum_value,options:u}),xe}return va(i.data)}get options(){return this._def.values}get enum(){const i={};for(const s of this._def.values)i[s]=s;return i}get Values(){const i={};for(const s of this._def.values)i[s]=s;return i}get Enum(){const i={};for(const s of this._def.values)i[s]=s;return i}extract(i,s=this._def){return pl.create(i,{...this._def,...s})}exclude(i,s=this._def){return pl.create(this.options.filter(u=>!i.includes(u)),{...this._def,...s})}}pl.create=ny;class dd extends ke{_parse(i){const s=De.getValidEnumValues(this._def.values),u=this._getOrReturnCtx(i);if(u.parsedType!==ee.string&&u.parsedType!==ee.number){const d=De.objectValues(s);return W(u,{expected:De.joinValues(d),received:u.parsedType,code:Q.invalid_type}),xe}if(this._cache||(this._cache=new Set(De.getValidEnumValues(this._def.values))),!this._cache.has(i.data)){const d=De.objectValues(s);return W(u,{received:u.data,code:Q.invalid_enum_value,options:d}),xe}return va(i.data)}get enum(){return this._def.values}}dd.create=(n,i)=>new dd({values:n,typeName:ye.ZodNativeEnum,...je(i)});class au extends ke{unwrap(){return this._def.type}_parse(i){const{ctx:s}=this._processInputParams(i);if(s.parsedType!==ee.promise&&s.common.async===!1)return W(s,{code:Q.invalid_type,expected:ee.promise,received:s.parsedType}),xe;const u=s.parsedType===ee.promise?s.data:Promise.resolve(s.data);return va(u.then(d=>this._def.type.parseAsync(d,{path:s.path,errorMap:s.common.contextualErrorMap})))}}au.create=(n,i)=>new au({type:n,typeName:ye.ZodPromise,...je(i)});class xl extends ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ye.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(i){const{status:s,ctx:u}=this._processInputParams(i),d=this._def.effect||null,f={addIssue:m=>{W(u,m),m.fatal?s.abort():s.dirty()},get path(){return u.path}};if(f.addIssue=f.addIssue.bind(f),d.type==="preprocess"){const m=d.transform(u.data,f);if(u.common.async)return Promise.resolve(m).then(async y=>{if(s.value==="aborted")return xe;const v=await this._def.schema._parseAsync({data:y,path:u.path,parent:u});return v.status==="aborted"?xe:v.status==="dirty"||s.value==="dirty"?ms(v.value):v});{if(s.value==="aborted")return xe;const y=this._def.schema._parseSync({data:m,path:u.path,parent:u});return y.status==="aborted"?xe:y.status==="dirty"||s.value==="dirty"?ms(y.value):y}}if(d.type==="refinement"){const m=y=>{const v=d.refinement(y,f);if(u.common.async)return Promise.resolve(v);if(v instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return y};if(u.common.async===!1){const y=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});return y.status==="aborted"?xe:(y.status==="dirty"&&s.dirty(),m(y.value),{status:s.value,value:y.value})}else return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(y=>y.status==="aborted"?xe:(y.status==="dirty"&&s.dirty(),m(y.value).then(()=>({status:s.value,value:y.value}))))}if(d.type==="transform")if(u.common.async===!1){const m=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});if(!fi(m))return xe;const y=d.transform(m.value,f);if(y instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:s.value,value:y}}else return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(m=>fi(m)?Promise.resolve(d.transform(m.value,f)).then(y=>({status:s.value,value:y})):xe);De.assertNever(d)}}xl.create=(n,i,s)=>new xl({schema:n,typeName:ye.ZodEffects,effect:i,...je(s)});xl.createWithPreprocess=(n,i,s)=>new xl({schema:i,effect:{type:"preprocess",transform:n},typeName:ye.ZodEffects,...je(s)});class dn extends ke{_parse(i){return this._getType(i)===ee.undefined?va(void 0):this._def.innerType._parse(i)}unwrap(){return this._def.innerType}}dn.create=(n,i)=>new dn({innerType:n,typeName:ye.ZodOptional,...je(i)});class yl extends ke{_parse(i){return this._getType(i)===ee.null?va(null):this._def.innerType._parse(i)}unwrap(){return this._def.innerType}}yl.create=(n,i)=>new yl({innerType:n,typeName:ye.ZodNullable,...je(i)});class nu extends ke{_parse(i){const{ctx:s}=this._processInputParams(i);let u=s.data;return s.parsedType===ee.undefined&&(u=this._def.defaultValue()),this._def.innerType._parse({data:u,path:s.path,parent:s})}removeDefault(){return this._def.innerType}}nu.create=(n,i)=>new nu({innerType:n,typeName:ye.ZodDefault,defaultValue:typeof i.default=="function"?i.default:()=>i.default,...je(i)});class lu extends ke{_parse(i){const{ctx:s}=this._processInputParams(i),u={...s,common:{...s.common,issues:[]}},d=this._def.innerType._parse({data:u.data,path:u.path,parent:{...u}});return Ir(d)?d.then(f=>({status:"valid",value:f.status==="valid"?f.value:this._def.catchValue({get error(){return new hn(u.common.issues)},input:u.data})})):{status:"valid",value:d.status==="valid"?d.value:this._def.catchValue({get error(){return new hn(u.common.issues)},input:u.data})}}removeCatch(){return this._def.innerType}}lu.create=(n,i)=>new lu({innerType:n,typeName:ye.ZodCatch,catchValue:typeof i.catch=="function"?i.catch:()=>i.catch,...je(i)});class rx extends ke{_parse(i){if(this._getType(i)!==ee.nan){const u=this._getOrReturnCtx(i);return W(u,{code:Q.invalid_type,expected:ee.nan,received:u.parsedType}),xe}return{status:"valid",value:i.data}}}rx.create=n=>new rx({typeName:ye.ZodNaN,...je(n)});class ly extends ke{_parse(i){const{ctx:s}=this._processInputParams(i),u=s.data;return this._def.type._parse({data:u,path:s.path,parent:s})}unwrap(){return this._def.type}}class kd extends ke{_parse(i){const{status:s,ctx:u}=this._processInputParams(i);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"?xe:f.status==="dirty"?(s.dirty(),ms(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"?xe:d.status==="dirty"?(s.dirty(),{status:"dirty",value:d.value}):this._def.out._parseSync({data:d.value,path:u.path,parent:u})}}static create(i,s){return new kd({in:i,out:s,typeName:ye.ZodPipeline})}}class iu extends ke{_parse(i){const s=this._def.innerType._parse(i),u=d=>(fi(d)&&(d.value=Object.freeze(d.value)),d);return Ir(s)?s.then(d=>u(d)):u(s)}unwrap(){return this._def.innerType}}iu.create=(n,i)=>new iu({innerType:n,typeName:ye.ZodReadonly,...je(i)});var ye;(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"})(ye||(ye={}));const p=qa.create,E=fl.create;hl.create;const Qe=Fr.create;hi.create;const iy=ud.create;Zn.create;const ae=$a.create,V=pt.create,p1=Wr.create,sy=Rd.create;Pr.create;ml.create;const ws=eu.create,Ra=tu.create,me=pl.create;au.create;dn.create;yl.create;const ux={string:(n=>qa.create({...n,coerce:!0})),number:(n=>fl.create({...n,coerce:!0})),boolean:(n=>Fr.create({...n,coerce:!0})),bigint:(n=>hl.create({...n,coerce:!0})),date:(n=>hi.create({...n,coerce:!0}))},x1=xe,y1=p().regex(/^github\.com\/[^/]+\/[^/]+$/,"Expected github.com/<owner>/<repo>"),v1=/^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?$/;function g1(n){const i=n.trim();return i?!!(i.startsWith("/")||i.startsWith("~")||i.startsWith(".")||/^[A-Za-z]:[\\/]/.test(i)||i.startsWith("\\\\")):!1}function Od(n){const i=n.trim();if(!i)throw new Error("Repository is required");if(g1(i))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=v1.exec(i);if(d&&!i.includes("://")&&!i.toLowerCase().includes("github.com"))s=d[1],u=d[2];else{let m=i;/^[a-z][a-z0-9+.-]*:\/\//i.test(m)||(m.startsWith("git@")?m=m.replace(/^git@([^:]+):/,"https://$1/"):m=`https://${m}`);let y;try{y=new URL(m)}catch{throw new Error(`Unrecognized GitHub repository reference: ${n}`)}if(!/^([^.]+\.)?github\.com$/i.test(y.hostname))throw new Error(`Only github.com repositories are supported (got host ${y.hostname})`);const v=y.pathname.replace(/^\/+|\/+$/g,"").split("/");if(v.length<2||!v[0]||!v[1])throw new Error(`Unrecognized GitHub repository reference: ${n}`);s=v[0],u=v[1].replace(/\.git$/i,"")}if(!s||!u||s.includes("..")||u.includes(".."))throw new Error(`Unrecognized GitHub repository reference: ${n}`);const f=y1.parse(`github.com/${s}/${u}`);return{owner:s,repo:u,identity:f,cloneUrl:`https://github.com/${s}/${u}.git`}}const ry=p().min(1).transform((n,i)=>{try{return Od(n).identity}catch(s){return i.addIssue({code:Q.custom,message:s.message}),x1}}),uy="repo:",b1=me(["resolved","unresolved","conflict","invalid"]),w1=V({status:b1,repository:p().optional(),sourceLabel:p().optional(),labels:ae(p()).optional(),error:p().optional()});function S1(n){return n?n.filter(i=>i.toLowerCase().startsWith(uy)):[]}function cy(n){const i=S1(n);if(i.length===0)return{status:"unresolved",labels:[]};if(i.length>1)return{status:"conflict",labels:[...i]};const s=i[0],u=s.slice(uy.length).trim();if(!u)return{status:"invalid",labels:[s],error:"Repository label has no value"};try{return{status:"resolved",repository:Od(u).identity,sourceLabel:s,labels:[s]}}catch(d){return{status:"invalid",labels:[s],error:d.message}}}const Zt=me(["claude_code","cursor_local","codex_local","muse_code"]),Oa=V({maxTurns:E().positive().nullable().optional(),maxBudgetUsd:E().positive().nullable().optional()}),oy=V({plan:Oa.optional(),execute:Oa.optional(),reflect:Oa.optional()});function Kr(n){if(!(n!=null&&n.trim()))return null;try{const i=Oa.parse(JSON.parse(n));return i.maxTurns==null&&i.maxBudgetUsd==null?null:i}catch{return null}}function j1(n){return!n||n.maxTurns==null&&n.maxBudgetUsd==null?null:JSON.stringify(n)}const Md=me(["developer","reviewer","legacy"]),_1=me(["queued","running","done","failed","timed_out","cancelled"]);V({id:p().uuid(),issueId:p().uuid(),role:Md,round:E().int().min(1),agentId:p().uuid().nullable(),runtime:Zt.nullable(),model:p().nullable(),budgetJson:p().nullable(),worktreePath:p().nullable(),inputSha:p().nullable(),status:_1,sessionRef:p().nullable(),logPath:p().nullable(),exitCode:E().int().nullable(),errorJson:p().nullable(),metadataJson:p().nullable(),profileSnapshotJson:p().nullable(),processPid:E().int().nullable(),processOwner:p().nullable(),processStartedAt:p().nullable(),createdAt:p(),startedAt:p().nullable(),heartbeatAt:p().nullable(),completedAt:p().nullable(),updatedAt:p()});V({issueId:p().uuid(),role:Md,round:E().int().min(1),agentId:p().uuid().nullable(),runtime:Zt.nullable(),model:p().nullable().optional(),budgetJson:p().nullable().optional(),inputSha:p().nullable().optional(),metadataJson:p().nullable().optional(),profileSnapshotJson:p().nullable().optional()});const N1=V({worktreeWrite:Qe(),publishReview:Qe(),outboundMutation:Qe(),resolveHumanAction:Qe()}),dy=V({worktreeWrite:Qe().optional(),outboundMutation:Qe().optional()}).strict(),hu=me(["low","medium","high"]);V({version:Ra(1),agentId:p().nullable(),role:Md,runtime:Zt.nullable(),model:p().nullable(),effort:hu.nullable().default(null),budgetJson:p().nullable(),permissionPolicy:N1,deckId:p().nullable(),purpose:p().nullable(),capturedAt:p()});const fy="auto",A1="muse-spark-1.3-contributor",E1=V({code:me(["cli_missing","runtime_auth","runtime_unknown","cursor_keychain","usage_capped","deck_offline","deck_unauthorized","workspace_missing","deck_missing","mcp_not_registered","github_cli_missing","github_auth","github_unreachable"]),message:p()}),C1=V({id:p().uuid(),name:p(),runtime:Zt,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:hu.nullable(),defaultBudgetJson:p().nullable(),purpose:p().nullable(),playbookIdsJson:p().nullable(),externalMemoryRefsJson:p().nullable(),permissionPolicyJson:p().nullable(),isBuiltin:Qe(),createdAt:p(),updatedAt:p()}),hy=C1.extend({healthy:Qe(),issues:ae(E1)});V({name:p().min(1),runtime:Zt,deckId:p().uuid(),defaultModel:p().nullable().optional(),defaultEffort:hu.nullable().optional(),defaultBudget:Oa.nullable().optional(),purpose:p().nullable().optional(),permissionPolicy:dy.nullable().optional()});V({name:p().min(1).optional(),runtime:Zt.optional(),deckId:p().uuid().nullable().optional(),defaultModel:p().nullable().optional(),defaultEffort:hu.nullable().optional(),defaultBudget:Oa.nullable().optional(),purpose:p().nullable().optional(),permissionPolicy:dy.nullable().optional()});V({agents:ae(hy),issueCount:E()});function cx(n){return n.defaultModel??n.defaultExecuteModel??n.defaultPlanModel??null}function T1(n){const i=Kr(n.defaultBudgetJson)??Kr(n.defaultExecuteBudgetJson)??Kr(n.defaultPlanBudgetJson);return j1(i)}const R1=me(["slack_message","email","service_tool_call"]),k1=V({target:p().min(1).max(120),body:p().min(1).max(4e3)}),O1=V({serviceName:p().min(1).max(120),toolName:p().min(1).max(120),arguments:ws(iy())}),M1=V({actionType:R1,summary:k1,toolCall:O1}),D1=me(["pending","sent","rejected"]);V({draft:M1,status:D1,sentAt:p().optional(),rejectedAt:p().optional(),bodyMismatch:Qe().optional(),deliveryAttempts:E().int().min(0).default(0)});V({draftArtifactId:p().uuid(),sentAt:p(),toolResult:ws(iy()),permalink:p().url().optional()});const L1=V({failure_summary:p().min(1),user_feedback_excerpt:p().min(1),corrected_output_hint:p().optional()}),U1=sy("op",[V({op:Ra("add_item"),section:p().min(1),text:p().min(1)}),V({op:Ra("amend_item"),section:p().min(1),anchor:p().min(1),text:p().min(1)}),V({op:Ra("remove_item"),section:p().min(1),anchor:p().min(1)}),V({op:Ra("set_triggers"),triggers:ae(p())}),V({op:Ra("rewrite_body"),text:p()})]);V({rationale:p().min(1),ops:ae(U1).min(1),evidence:L1.optional()});const z1=me(["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"]),B1=me(["human","developer","reviewer","system"]),my=me(["manual","linear","agent"]),q1=V({id:p().uuid(),source:my,externalId:p().nullable(),externalLabel:p().nullable(),externalUrl:p().nullable(),title:p(),description:p().nullable(),acceptanceCriteria:p().nullable(),repo:p(),baseBranch:p(),status:z1,currentOwner:B1,currentIntent:p().nullable(),developerAgentId:p().uuid().nullable(),reviewerAgentId:p().uuid().nullable(),maxReviewRounds:E().int().min(1),currentRound:E().int().min(1),maxInfraAttempts:E().int().min(0),infraAttempts:E().int().min(0),branch:p().nullable(),baseSha:p().nullable(),headSha:p().nullable(),prNumber:E().int().nullable(),prUrl:p().nullable(),autoMerge:Qe(),createdAt:p(),updatedAt:p()});V({title:p().min(1),description:p().optional(),acceptanceCriteria:p().optional(),repo:ry,baseBranch:p().min(1).default("main"),developerAgentId:p().uuid(),reviewerAgentId:p().uuid(),maxReviewRounds:E().int().min(1).default(3),maxInfraAttempts:E().int().min(0).default(3),autoMerge:Qe().default(!1),source:my.default("manual"),externalId:p().optional(),externalLabel:p().optional(),externalUrl:p().optional(),enqueue:Qe().default(!0)});V({title:p().min(1).optional(),description:p().nullable().optional(),acceptanceCriteria:p().nullable().optional(),repo:ry.optional(),baseBranch:p().min(1).optional(),developerAgentId:p().uuid().optional(),reviewerAgentId:p().uuid().optional(),maxReviewRounds:E().int().min(1).optional(),maxInfraAttempts:E().int().min(0).optional(),autoMerge:Qe().optional()});const ox={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(ox).filter(n=>ox[n].length===0);const H1=me(["enqueued","already_queued","not_queued"]);q1.extend({created:Qe(),queue:H1,priorPasses:E().int().min(0)});V({id:p(),issueId:p().nullable(),workerSessionId:p().nullable(),kind:p(),contentJson:p().nullable(),blobPath:p().nullable(),author:me(["human","agent","system"]),createdAt:p()});const $1=me(["authentication_configuration","provider_capacity_rate_limit","agent_cli_crash","tool_test_timeout","coordinator_crash","validation_failure","publish_git_failure","agent_deck_unavailable","host_sleep_liveness","unknown"]),V1=me(["task","infrastructure","unknown"]),Y1=me(["high","medium","low"]),Z1=me(["outcome_kind","session_error","spawn_log","workflow_event","recovery"]),G1=me(["exact","inferred"]),fd=V({code:$1,domain:V1,primary:Qe(),confidence:Y1,evidenceSource:Z1,occurredAt:p().nullable(),eventCursor:E().int().nullable(),rawReason:p(),sessionId:p().nullable(),logPath:p().nullable(),eventId:p().nullable(),eventType:p().nullable(),quality:G1}),Q1=me(["commit","verification_receipt","branch_pushed"]),X1=me(["sampler","salvage","session_end"]),Dd=me(["worktree","commit","verification_receipt","publish_only"]);V({kind:Q1,observedSha:p().nullable(),observedAt:p(),origin:X1.nullable(),inputSha:p().nullable(),samplingPrecisionMs:E().int().nullable(),branch:p().nullable()});V({kinds:ae(Dd),retryReason:p().nullable()});const K1=me(["done","closed","migrated"]);V({id:p().uuid(),issueId:p().uuid(),workflowVersion:p(),startedAt:p(),completedAt:p().nullable(),outcome:K1.nullable()});const J1=me(["issue.created","issue.reassigned","workflow.started","worker.started","worker.completed","worker.failed","worker.deferred","worktree.ready","deck.connected","brief.resolved","branch.pushed","checks.started","pull_request.opened","pull_request.updated","checks.completed","review.submitted","repair.started","guidance.added","task_snapshot.refreshed","human_action.requested","human_action.resolved","final_review.requested","issue.completed","issue.closed","queue.enqueued","queue.wait_reason_changed","queue.admitted","queue.removed","agent.started","agent.completed","host.suspended","checkpoint.observed","retry.reused","legacy.imported"]);V({id:p().uuid(),issueId:p().uuid(),workflowInstanceId:p().uuid().nullable(),workerSessionId:p().uuid().nullable(),type:J1,actorType:me(["human","developer","reviewer","system"]),actorRef:p().nullable(),stage:p(),round:E().int().nullable(),payloadJson:p().nullable(),artifactRef:p().nullable(),idempotencyKey:p().nullable(),causationEventId:p().uuid().nullable(),ts:p()});const I1=me(["product_scope_decision","policy_escalation","attempts_exhausted","final_review","deck_interaction_required","reflection_interaction_required","outbound_delivery_interaction_required"]),F1=me(["open","resolved"]);V({id:p().uuid(),issueId:p().uuid().nullable(),runId:p().uuid().nullable(),workflowInstanceId:p().uuid().nullable(),actionType:I1,reason:p(),question:p(),evidenceJson:p().nullable(),responseOptionsJson:p().nullable(),continuationPreviewJson:p().nullable(),requestId:p().nullable(),status:F1,resolutionJson:p().nullable(),resolvedBy:p().nullable(),requestedAt:p(),resolvedAt:p().nullable()});const W1=me(["blocking","non_blocking"]),P1=me(["open","resolved","recurring","superseded"]);V({id:p().uuid(),issueId:p().uuid(),fingerprint:p(),severity:W1,title:p(),rationale:p(),evidenceRef:p().nullable(),file:p().nullable(),line:E().int().nullable(),status:P1,firstRound:E().int().min(1),lastRound:E().int().min(1)});V({id:p().uuid(),issueId:p().uuid(),workerSessionId:p().uuid(),role:me(["developer","reviewer","legacy"]),runtime:p().nullable(),tokensIn:E().int().nullable(),tokensOut:E().int().nullable(),costUsd:E().nullable(),durationMs:E().int().nullable(),ts:p(),model:p().nullable().optional()});const ew=V({available:Ra(!0)}),tw=V({available:Ra(!1),until:p(),reason:p()});sy("available",[ew,tw]);const py=me(["supported_protocol","observed_event","experimental_api","unavailable"]),Ld=me(["unsupported","missing","expired","unparsable","stale"]),aw=V({windowKey:p().min(1),providerBucket:p().min(1),durationMinutes:E().int().positive().nullable(),displayLabel:p().min(1),usedValue:E().nullable(),usedUnit:p().nullable(),remainingPercent:E().min(0).max(100).nullable(),resetAt:p().nullable(),observedAt:p(),freshUntil:p().nullable(),expiresAt:p().nullable(),source:py,unavailableReason:Ld.nullable()}),nw=V({runtime:Zt,windows:ae(aw),unavailableReason:Ld.nullable()});V({runtimes:ae(nw),generatedAt:p()});V({configured:Qe(),cycleStart:p().nullable(),cycleEnd:p().nullable(),spendValue:E().nullable(),spendUnit:p().nullable(),hardLimitValue:E().nullable(),hardLimitUnit:p().nullable(),memberCount:E().nullable(),memberLimitOverrideCount:E().nullable(),usagePeriodStart:p().nullable(),usagePeriodEnd:p().nullable(),usageSpendValue:E().nullable(),usageSpendUnit:p().nullable(),source:py,unavailableReason:Ld.nullable(),observedAt:p().nullable(),generatedAt:p()});function lw(n,i=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<=i)return!1}if(n.freshUntil!==null){const s=Date.parse(n.freshUntil);if(!Number.isFinite(s)||s<=i)return!1}if(n.expiresAt!==null){const s=Date.parse(n.expiresAt);if(!Number.isFinite(s)||s<=i)return!1}if(n.observedAt){const s=Date.parse(n.observedAt);if(!Number.isFinite(s)||s>i+6e4)return!1}return!0}const iw=me(["queued","admitted","removed"]),sw=V({id:p().uuid(),issueId:p().uuid(),position:E().int(),enqueuedAt:p(),state:iw,waitReason:p().nullable(),waitReasonAt:p().nullable()});sw.extend({title:p().optional(),issueStatus:p().optional()});V({issueId:p().uuid()});const rw=p1([Ra("top"),Ra("bottom"),V({before:p().uuid()}).strict(),V({after:p().uuid()}).strict()]);V({to:rw});const uw=2;V({maxActiveIssues:E().int().min(1).max(uw)});V({active:E().int().min(0),waiting:E().int().min(0),limit:E().int().min(0),maxActiveIssues:E().int().min(1),ceiling:E().int().min(0),options:ae(E().int().min(1)),overCap:Qe()});const Wt=me(["exact","inferred","unavailable"]),mu=V({quality:Wt,reasons:ae(p())}),xy=me(["queue_wait","coordinator_setup","agent_process","coordinator_validation_publish","coordinator_work"]),gs=V({phase:xy,startMs:E().int().nullable(),endMs:E().int().nullable(),durationMs:E().int().nullable(),quality:Wt,reasons:ae(p()),sessionId:p().nullable(),startCursor:E().int().nullable(),endCursor:E().int().nullable()}),cw=mu.extend({phase:xy,durationMs:E().int().nullable(),rawCount:E().int(),known:E().int(),total:E().int()}),yy=V({kind:me(["admission_dependency_wait","runtime_health_preflight","unexplained_silence","human_wait"]),startMs:E().int().nullable(),endMs:E().int().nullable(),durationMs:E().int().nullable(),quality:Wt,reasons:ae(p()),category:p().nullable(),sessionId:p().nullable()}),Yt=mu.extend({value:E().nullable(),known:E().int(),total:E().int()}),Ha=mu.extend({p50:E().nullable(),p95:E().nullable(),n:E().int()}),ow=V({sessionId:p(),role:p(),runtime:p().nullable(),model:p().nullable(),status:p(),round:E().int(),publishOnly:Qe(),setup:gs,agentProcess:gs,validationPublish:gs,spawnEnvelopeMs:E().int().nullable(),spawnEnvelopeQuality:Wt,spawnEnvelopeReasons:ae(p()),failureCauses:ae(fd),reuseKinds:ae(Dd).optional(),silence:ae(yy),silenceQuality:Wt,silenceReasons:ae(p()),tokensIn:E().int().nullable(),tokensOut:E().int().nullable(),costUsd:E().nullable(),usageDurationMs:E().int().nullable(),usageQuality:Wt,usageReasons:ae(p())}),dw=V({kind:p().nullable(),observedSha:p().nullable(),msSinceWorkflowStart:E().int().nullable(),quality:Wt,reasons:ae(p())}),fw=V({attempts:E().int(),retries:E().int(),cold:E().int(),reused:E().int(),unknown:E().int(),publishOnly:E().int(),reuseRate:E().nullable(),preservedKinds:ae(Dd).optional(),quality:Wt,reasons:ae(p())}),hw=V({rounds:E().int(),verdicts:E().int(),changeRequests:E().int(),changeRequestRate:E().nullable(),quality:Wt,reasons:ae(p())});V({issueId:p(),elapsed:gs,rawIntervals:ae(gs),unionedDurations:ae(cw),exclusiveTotalMs:E().int().nullable(),exclusiveTotalQuality:Wt,exclusiveTotalReasons:ae(p()),nested:ae(yy),attempts:ae(ow),primaryFailure:fd.nullable(),primaryFailureQuality:Wt,primaryFailureReasons:ae(p()),consequenceCauses:ae(fd),waste:V({failedAttempts:E().int(),publishOnlyAttempts:E().int(),runtimeMs:Yt,tokensIn:Yt,tokensOut:Yt,costUsd:Yt}),firstCheckpoint:dw,retry:fw,reviewer:hw,humanWaitMs:E().int().nullable(),humanWaitQuality:Wt,humanWaitReasons:ae(p()),interventionCount:E().int(),coverage:V({duration:Yt,tokens:Yt,cost:Yt})});V({from:p().nullable().default(null),to:p().nullable().default(null),role:p().nullable().default(null),runtime:p().nullable().default(null),model:p().nullable().default(null),status:p().nullable().default(null),repo:p().nullable().default(null),limit:E().int().min(1).max(200).default(50),offset:E().int().min(0).default(0)});const $o=mu.extend({numerator:E().int(),denominator:E().int(),rate:E().nullable()}),Vo=V({key:p(),attempts:E().int(),successes:E().int(),successRate:E().nullable(),retries:E().int(),retryRate:E().nullable(),wallTimeMs:Ha});V({window:V({from:p(),to:p(),defaultApplied:Qe()}),pagination:V({limit:E().int(),offset:E().int(),totalIssues:E().int()}),issueIds:ae(p()),phaseWallTime:ws(p(),Ha),attemptSuccess:$o,issueSuccess:$o,primaryFailures:ae(V({code:p(),count:E().int(),rate:E().nullable()})),primaryFailureDenominator:E().int(),waste:V({failedAttempts:E().int(),runtimeMs:Yt,tokensIn:Yt,tokensOut:Yt,costUsd:Yt}),checkpointLatencyMs:Ha,retryReuse:$o,reviewer:V({rounds:E().int(),verdicts:E().int(),changeRequests:E().int(),changeRequestRate:E().nullable(),quality:Wt,reasons:ae(p())}),humanInterventions:V({totalActions:E().int(),issuesWithIntervention:E().int(),humanWaitMs:Ha}),byRole:ae(Vo),byRuntime:ae(Vo),byModel:ae(Vo),coverage:V({duration:Yt,tokens:Yt,cost:Yt})});const mw=100,vy=25,gy=5,pw=me(["developer","reviewer","legacy"]),xw=me(["authentication_configuration","provider_capacity_rate_limit","agent_cli_crash","tool_test_timeout","coordinator_crash","validation_failure","publish_git_failure","agent_deck_unavailable","host_sleep_liveness","unknown"]),yw=me(["task","infrastructure","unknown"]);V({from:p().optional(),to:p().optional(),repo:p().optional(),role:pw.optional(),runtime:p().optional(),model:p().optional(),status:p().optional(),page:ux.number().int().min(1).default(1),limit:ux.number().int().min(1).max(mw).default(vy)});const by=me(["exact","inferred","unavailable"]),da=V({sum:E().nullable(),known:E().int().min(0),total:E().int().min(0),quality:by,reasons:ae(p())}),Yo=V({key:p(),issues:E().int().min(0),attempts:E().int().min(0),issueSuccess:E().nullable(),issueSuccessDenominator:E().int().min(0),attemptSuccess:E().nullable(),attemptSuccessDenominator:E().int().min(0),sessionWallMs:Ha,spawnEnvelopeMs:Ha,retryRate:E().nullable(),tokensIn:da,tokensOut:da,costUsd:da,durationMs:da,failedDurationMs:da,failedTokensIn:da,failedTokensOut:da,failedCostUsd:da}),vw=V({code:xw,domain:yw,count:E().int().min(0),share:E().nullable(),issueIds:ae(p()),issueTotal:E().int().min(0)}),gw=V({id:p(),title:p(),status:p(),repo:p(),attempts:E().int().min(0),updatedAt:p()}),bw=V({window:V({from:p(),to:p()}),filters:V({repo:p().nullable(),role:p().nullable(),runtime:p().nullable(),model:p().nullable(),status:ae(p())}),summary:V({issues:E().int().min(0),closedIssues:E().int().min(0),issueSuccess:E().nullable(),attempts:E().int().min(0),terminalAttempts:E().int().min(0),attemptSuccess:E().nullable(),retryRate:E().nullable(),retryExtraAttempts:E().int().min(0),reuseRate:E().nullable(),reuseDenominator:E().int().min(0),humanWaitMs:E().int().min(0),humanWaitQuality:by,interventions:E().int().min(0),avgReviewerRounds:E().nullable(),reviewedIssues:E().int().min(0),changeRequestRate:E().nullable(),sessionWallMs:Ha,spawnEnvelopeMs:Ha,checkpointMs:Ha,phaseWallMs:ae(V({phase:p(),stat:Ha})),failedDurationMs:da,failedTokensIn:da,failedTokensOut:da,failedCostUsd:da}),byRole:ae(Yo),byRuntime:ae(Yo),byModel:ae(Yo),failures:ae(vw),issues:ae(gw),pagination:V({page:E().int().min(1),limit:E().int().min(1),total:E().int().min(0),totalPages:E().int().min(0)}),meta:V({generatedAt:p(),partial:Qe(),partialReasons:ae(p())})});function wy(n){const i=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(vy)||i.set(s,d))}return i.sort(),i.toString()}function Hn(n,i){return n.sum===null||n.known===0?"Unavailable":n.known<n.total?`${i(n.sum)} (${n.known}/${n.total} known)`:i(n.sum)}function Sy(n){return n<gy?`n=${n} (sparse)`:`n=${n}`}function hd(n){return n<gy}function dx(n,i){if(n.n===0||n.p50===null&&n.p95===null)return"Unavailable";const s=u=>u===null?"–":i(u);return`P50 ${s(n.p50)} · P95 ${s(n.p95)} (${Sy(n.n)})`}function ps(n){return`$${n.toFixed(2)}`}function Ge(n){return n.toLocaleString("en-US")}function ww(n){if(!Number.isFinite(n))return Ge(n);const i=Math.abs(n);if(i<1e3)return Ge(n);const s=u=>u>=100?String(Math.round(u)):u.toFixed(1).replace(/\.0$/,"");return i<1e6?`${s(n/1e3)}K`:`${s(n/1e6)}M`}function Vt(n){if(n<1e3)return`${Math.round(n)} ms`;const i=n/1e3;if(i<60)return`${i.toFixed(1)} s`;const s=Math.floor(i/60),u=Math.round(i%60);return s<60?`${s}m ${u}s`:`${Math.floor(s/60)}h ${s%60}m`}function pu(n){return n===null||!Number.isFinite(n)?"Unavailable":`${(n*100).toFixed(1)}%`}const Sw=me(["queued","plan_pending","plan_approved","running","review","done","failed","cancelled"]),jy=me(["code","communication","email","research","content","other"]),jw=me(["task_snapshot","draft_plan","approved_plan","plan_triage","plan_answers","acceptance_criteria","transcript","stream_trace","usage","agent_session","execution_result","diff","pr","email_draft","slack_draft","service_draft","document","research_brief","deliverable","feedback","playbook_patch","reflect_status","linear_sync","send_receipt","result_qa"]),xu=me(["plan","execute","reflect","qa"]),_y=me(["retry","approve"]);V({patchId:p(),playbookId:p().optional(),playbookTitle:p().optional(),rationale:p().optional(),status:Ra("proposed"),trigger:_y,dashboardUrl:p().optional()});V({status:me(["pending","completed","failed","skipped"]),trigger:_y,error:p().optional()});const _w=V({type:me(["system","human","context","thinking","assistant","tool","rate_limit","result"]),text:p(),toolName:p().optional()});V({phase:xu,runtime:Zt,entries:ae(_w)});const Nw=V({phase:xu,runtime:Zt,totalCostUsd:E().optional(),inputTokens:E().optional(),outputTokens:E().optional(),cacheReadTokens:E().optional(),cacheWriteTokens:E().optional(),durationMs:E().optional(),model:p().optional(),numTurns:E().optional(),maxTurns:E().optional(),maxBudgetUsd:E().optional()}),Aw=V({label:p(),usage:Nw,maxTurns:E().optional(),maxBudgetUsd:E().optional()});V({lines:ae(Aw),total:V({totalCostUsd:E(),inputTokens:E(),outputTokens:E(),durationMs:E(),numTurns:E()})});V({phase:xu,runtime:Zt,sessionId:p()});V({phase:xu,exitCode:E(),resultText:p().optional(),isError:Qe().optional(),blocker:V({summary:p().optional()}).optional()});V({path:p(),title:p(),markdown:p()});V({markdown:p(),sessionId:p().optional()});const Ew=me(["manual","linear"]);V({id:p(),title:p(),description:p().optional(),url:p().optional()});const cn=V({id:p().uuid(),source:Ew,externalId:p().nullable(),externalLabel:p().nullable(),taskCategory:jy,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:Zt.nullable(),planModel:p().nullable(),executeModel:p().nullable(),status:Sw,lineageId:p().uuid().nullable(),acceptanceCriteria:p().nullable(),approvalGatesJson:p().nullable(),budgetJson:p().nullable(),createdAt:p(),updatedAt:p()});V({id:p().uuid(),runId:p().uuid(),kind:jw,contentJson:p().nullable(),blobPath:p().nullable(),author:me(["human","agent","system"]),createdAt:p()});V({id:p().uuid(),runId:p().uuid(),type:p(),payloadJson:p().nullable(),ts:p()});V({title:p().min(1),description:p().optional(),taskCategory:jy.default("other"),repo:p().optional(),artifactWorkspace:p().optional(),acceptanceCriteria:p().optional(),status:me(["queued","plan_pending","plan_approved"]).default("plan_pending"),agentId:p().uuid(),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),budget:oy.optional()});V({runtime:Zt,deckId:p().uuid().optional(),playbookId:p().optional(),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),budget:oy.optional()});V({planMarkdown:p(),approve:Qe().default(!1),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),planBudget:Oa.nullable().optional(),executeBudget:Oa.nullable().optional()});V({runtime:Zt.optional(),deckId:p().uuid().optional(),playbookId:p().optional(),executeModel:p().nullable().optional(),executeBudget:Oa.nullable().optional()});V({feedback:p().min(1),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),executeBudget:Oa.nullable().optional()});V({outboundBody:p().min(1).max(4e3).optional()});V({id:p(),identifier:p(),title:p(),description:p().optional(),url:p(),state:p().optional(),labels:ae(p()).optional(),teamId:p().optional(),repoResolution:w1.optional()});V({stateFilter:ae(p()),teamId:p().nullable(),assigneeMe:Qe(),syncEnabled:Qe()});V({host:p(),port:E().int().min(1).max(65535),envOverride:Qe()});const Cw=me(["UNAUTHORIZED","DECK_UNAVAILABLE"]);V({connected:Qe(),apiUrl:p(),mcpUrl:p(),deckCount:E().optional(),envOverride:Qe(),error:p().optional(),deckAccessError:Cw.optional(),deckAccessErrorMessage:p().optional()});V({agentId:p().uuid().optional(),autoAgent:Qe().optional(),planModel:p().nullable().optional()}).refine(n=>n.agentId!==void 0||n.autoAgent===!0,{message:"Provide agentId or autoAgent: true"});V({planModel:p().nullable().optional(),planBudget:Oa.nullable().optional(),feedback:p().optional(),editedMarkdown:p().optional()});const Tw=V({id:p(),label:p()});V({runtime:Zt,models:ae(Tw),source:me(["live","fallback"])});V({planReviewCount:E(),resultReviewCount:E(),maxConcurrent:E(),planningActiveRuns:ae(cn),planningQueuedRuns:ae(cn),runningRuns:ae(cn),waitingExecution:ae(cn),resultReviewRuns:ae(cn),recentDone:ae(cn),awaitingPlanReview:ae(cn),awaitingAnswerRuns:ae(cn),openQuestionCounts:ws(p(),E()),pendingSendCounts:ws(p(),E()),sentRunIds:ae(p()).optional(),autoApprovedRunIds:ae(p()),runs:ae(cn),agentDeckOnline:Qe(),agents:ae(hy),agentIssueCount:E()});const Ny=new Map,Zo=new Map;function md(n){return Ny.get(n)??null}function Rw(n,i){i.models.length!==0&&Ny.set(n,i)}function kw(n,i){const s=md(n);if(s)return Promise.resolve(s);const u=Zo.get(n);if(u)return u;const d=i().then(f=>(Rw(n,f),f)).finally(()=>Zo.delete(n));return Zo.set(n,d),d}const Le="";async function rt(n){const i=await n.text();try{const s=JSON.parse(i),u=s.error??s.message;if(typeof u=="string"&&u.trim())return u.replace(/^Error:\s*/i,"")}catch{}return i}async function Ow(){const n=await fetch(`${Le}/api/intake/linear`);if(!n.ok)throw new Error(await n.text());return(await n.json()).candidates??[]}async function Mw(n){const i=await fetch(`${Le}/api/intake/linear/lookup?q=${encodeURIComponent(n)}`),s=await i.json().catch(()=>({}));if(!i.ok)throw new Error(s.error??`Lookup failed (${i.status})`);if(!s.candidate)throw new Error("Linear issue not found");return s.candidate}async function Dw(){const n=await fetch(`${Le}/api/agents`);if(!n.ok)throw new Error("Failed to fetch agents");return n.json()}async function Lw(n){const i=await fetch(`${Le}/api/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!i.ok)throw new Error(await i.text());return i.json()}async function Uw(n,i){const s=await fetch(`${Le}/api/agents/${n}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(await s.text());return s.json()}async function zw(n){const i=await fetch(`${Le}/api/agents/${n}`,{method:"DELETE"});if(!i.ok)throw new Error(await i.text())}async function Bw(n,i){return kw(n,async()=>{const u=await fetch(`${Le}/api/runtimes/${n}/models`);if(!u.ok)throw new Error(await u.text());return u.json()})}async function Ay(){const n=await fetch(`${Le}/api/runtime-capacity`);if(!n.ok)throw new Error(await n.text());return n.json()}async function qw(){const n=await fetch(`${Le}/api/cursor-team-billing`);if(!n.ok)throw new Error(await n.text());return n.json()}async function Ey(){const n=await fetch(`${Le}/api/agent-deck/status`);if(!n.ok)throw new Error(await n.text());return n.json()}async function Hw(){try{const n=await fetch(`${Le}/api/agent-deck/decks`),i=await n.json().catch(()=>null);return n.ok?{ok:!0,decks:(i==null?void 0:i.data)??[]}:{ok:!1,code:i==null?void 0:i.code,message:(i==null?void 0:i.error)??`Agent Deck error (${n.status})`}}catch(n){return{ok:!1,message:n instanceof Error?n.message:String(n)}}}async function $w(n){var u,d,f;const i=new URLSearchParams;(u=n.q)!=null&&u.trim()&&i.set("q",n.q.trim()),(d=n.status)!=null&&d.trim()&&i.set("status",n.status.trim()),(f=n.repo)!=null&&f.trim()&&i.set("repo",n.repo.trim()),n.needsAttention&&i.set("needsAttention","1"),i.set("page",String(n.page&&n.page>1?Math.floor(n.page):1)),i.sort();const s=await fetch(`${Le}/api/issues?${i.toString()}`);if(!s.ok)throw new Error(await rt(s));return s.json()}async function Vw(){const n=await fetch(`${Le}/api/issues/recent-repos`);if(!n.ok)throw new Error(await rt(n));return(await n.json()).repos??[]}async function Cy(n){const i=await fetch(`${Le}/api/issues/${n}`);if(!i.ok)throw new Error(await rt(i));return i.json()}async function Yw(n){const i=await fetch(`${Le}/api/issues/${n}/execution-analysis`);if(!i.ok)throw new Error(await rt(i));return i.json()}async function Zw(n){const i=await fetch(`${Le}/api/issues/${n}/evidence`);if(!i.ok)throw new Error(await rt(i));return i.json()}async function Gw(n,i){const s=await fetch(`${Le}/api/issues/${n}/artifacts/${i}/trace`);if(!s.ok)throw new Error(await rt(s));return s.json()}async function Qw(n){const i=await fetch(`${Le}/api/issues`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!i.ok)throw new Error(await rt(i));return i.json()}async function pd(n,i){const s=await fetch(`${Le}/api/issues/${n}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(await rt(s));return s.json()}async function Ty(n){const i=await fetch(`${Le}/api/issues/${n}/start`,{method:"POST"});if(!i.ok)throw new Error(await rt(i));return i.json()}async function Ry(n){const i=await fetch(`${Le}/api/issues/${n}/execute`,{method:"POST"});if(!i.ok)throw new Error(await rt(i));return i.json()}async function Xw(n,i="web"){const s=await fetch(`${Le}/api/issues/${n}/abort`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({resolvedBy:i})});if(!s.ok)throw new Error(await rt(s));return s.json()}async function Kw(n,i="web"){const s=await fetch(`${Le}/api/issues/${n}/close`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({closedBy:i})});if(!s.ok)throw new Error(await rt(s));return s.json()}async function Jw(n){const i=await fetch(`${Le}/api/queue`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({issueId:n})});if(!i.ok)throw new Error(await rt(i));return i.json()}async function ky(n){const i=await fetch(`${Le}/api/queue/${n}`,{method:"DELETE"});if(!i.ok)throw new Error(await rt(i));return i.json()}async function Hr(n,i){const s=await fetch(`${Le}/api/queue/${n}/move`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({to:i})});if(!s.ok)throw new Error(await rt(s));return s.json()}async function Go(){const n=await fetch(`${Le}/api/queue`);if(!n.ok)throw new Error(await rt(n));return n.json()}async function Iw(){const n=await fetch(`${Le}/api/queue/status`);if(!n.ok)throw new Error(await rt(n));return n.json()}async function Fw(n){const i=await fetch(`${Le}/api/queue/settings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({maxActiveIssues:n})});if(!i.ok)throw new Error(await rt(i));return i.json()}async function Ww(n,i){const s=await fetch(`${Le}/api/issues/${n}/guidance`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({markdown:i})});if(!s.ok)throw new Error(await rt(s));return s.json()}async function Pw(n){const i=wy(n),s=await fetch(`${Le}/api/execution-report${i?`?${i}`:""}`);if(!s.ok)throw new Error(await rt(s));const u=await s.json(),d=bw.safeParse(u);if(!d.success)throw new Error(`Unexpected report shape: ${d.error.message}`);return d.data}async function e2(){const n=await fetch(`${Le}/api/human-actions`);if(!n.ok)throw new Error(await rt(n));return n.json()}async function Oy(n,i,s){const u=await fetch(`${Le}/api/human-actions/${n}/resolve`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({resolvedBy:i,choice:s})});if(!u.ok)throw new Error(await rt(u));return u.json()}function t2(n){return n||fy}function a2({runtime:n,label:i,value:s,onChange:u,defaultModelId:d,disabled:f,compact:m}){const y=md(n),[v,g]=S.useState((y==null?void 0:y.models)??[]),[b,N]=S.useState((y==null?void 0:y.source)??"fallback"),[z,K]=S.useState(!y);S.useEffect(()=>{const M=md(n);if(M){g(M.models),N(M.source),K(!1);return}K(!0),Bw(n).then(Y=>{g(Y.models),N(Y.source)}).catch(()=>g([])).finally(()=>K(!1))},[n]);const O=S.useMemo(()=>{var M,Y;if(n==="cursor_local"){const J=t2(d);return((M=v.find(ne=>ne.id===J))==null?void 0:M.label)??"Auto (subscription pool)"}return d?((Y=v.find(J=>J.id===d))==null?void 0:Y.label)??d:"runtime default"},[n,d,v]),$=n==="cursor_local"?z?"Loading models…":`Agent default (${O})`:z?"Loading models…":`Default (${O})`;return c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:i}),c.jsxs("select",{className:"field text-sm",disabled:f||z,value:s,onChange:M=>u(M.target.value),children:[c.jsx("option",{value:"",children:$}),v.map(M=>c.jsx("option",{value:M.id,children:M.label},M.id))]}),n==="cursor_local"&&!z&&!m&&c.jsx("p",{className:"text-xs text-white/40",children:"Auto and Composer use your Cursor subscription pool. Other models draw API credits."}),b==="fallback"&&v.length>0&&!z&&n==="cursor_local"&&!m&&c.jsx("p",{className:"text-xs text-white/40",children:"Run cursor-agent login to load the full model list."})]})}function fx(n){const i={};return n.allowWorktreeWrite||(i.worktreeWrite=!1),Object.keys(i).length?i:null}function n2(n){let i={};try{n!=null&&n.trim()&&(i=JSON.parse(n))}catch{i={}}return{allowWorktreeWrite:i.worktreeWrite!==!1}}function hx({value:n,onChange:i,agentDeckOnline:s,disabled:u}){const[d,f]=S.useState([]),[m,y]=S.useState(null);S.useEffect(()=>{Hw().then(b=>{b.ok?(f(b.decks),y(null)):(f([]),y(b.message))})},[]);const v=b=>i({...n,...b}),g=n.runtime==="codex_local"||n.runtime==="claude_code";return c.jsxs("div",{className:"space-y-2",children:[c.jsx("div",{className:"font-ui-display text-base uppercase tracking-wide text-[#92E4DD]",children:"Agent"}),c.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Runtime (required)"}),c.jsxs("select",{className:"field",disabled:u,value:n.runtime,onChange:b=>{const N=b.target.value;v({runtime:N,defaultModel:N==="cursor_local"?fy:N==="muse_code"?A1:"",defaultEffort:N==="cursor_local"||N==="muse_code"?"":n.defaultEffort})},children:[c.jsx("option",{value:"claude_code",children:"Claude Code (claude -p)"}),c.jsx("option",{value:"cursor_local",children:"Cursor local (cursor-agent -p)"}),c.jsx("option",{value:"codex_local",children:"Codex local (codex exec)"}),c.jsx("option",{value:"muse_code",children:"Muse Code (muse exec) — developer only, trial"})]}),c.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Agent Deck (required)"}),c.jsxs("select",{className:"field",disabled:u||!s||!!m,value:n.deckId,onChange:b=>v({deckId:b.target.value}),required:!0,children:[c.jsx("option",{value:"",disabled:!!n.deckId,children:s?m?"Agent Deck error — see below":"Select a deck…":"Agent Deck offline"}),d.map(b=>c.jsxs("option",{value:b.id,children:["◆ ",b.name]},b.id))]}),s&&m&&c.jsx("p",{className:"text-xs text-amber-300/90",children:m}),c.jsxs("div",{className:"pt-2 mt-2 border-t border-white/10 space-y-2",children:[c.jsx("div",{className:"font-ui-display text-xs uppercase tracking-wide text-white/40",children:"Issue-centric session defaults"}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Purpose (optional)"}),c.jsx("input",{className:"field text-sm",placeholder:"e.g. backend refactors on the payments service",disabled:u,value:n.purpose,onChange:b=>v({purpose:b.target.value})})]}),c.jsxs("div",{className:`grid gap-2 ${g?"grid-cols-2":"grid-cols-1"}`,children:[c.jsx(a2,{runtime:n.runtime,label:"Default model",value:n.defaultModel,onChange:b=>v({defaultModel:b}),disabled:u,compact:!0}),g&&c.jsxs("label",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Reasoning effort"}),c.jsxs("select",{className:"field text-sm",disabled:u,value:n.defaultEffort,onChange:b=>v({defaultEffort:b.target.value}),children:[c.jsx("option",{value:"",children:"Runtime default"}),c.jsx("option",{value:"low",children:"Low"}),c.jsx("option",{value:"medium",children:"Medium"}),c.jsx("option",{value:"high",children:"High"})]})]})]}),n.runtime==="muse_code"&&c.jsx("p",{className:"text-xs text-white/40",children:"Developer role only — keep a Claude or Codex agent as the reviewer. Contributor-tier content may be used for product improvement; use it on non-sensitive tickets."}),n.runtime==="cursor_local"&&c.jsx("p",{className:"text-xs text-white/40",children:"Cursor has no separate effort flag — put effort in the model id if needed (e.g. parameterized `[effort=high]`)."}),c.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[c.jsxs("label",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Max turns"}),c.jsx("input",{className:"field text-sm",type:"number",min:1,placeholder:"none",disabled:u,value:n.defaultBudget.maxTurns,onChange:b=>v({defaultBudget:{...n.defaultBudget,maxTurns:b.target.value}})})]}),c.jsxs("label",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Max $ / session"}),c.jsx("input",{className:"field text-sm",type:"number",min:0,step:"0.1",placeholder:"none",disabled:u,value:n.defaultBudget.maxBudgetUsd,onChange:b=>v({defaultBudget:{...n.defaultBudget,maxBudgetUsd:b.target.value}})})]})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Developer capabilities"}),c.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-sm text-white/70",children:c.jsxs("label",{className:"flex items-center gap-1.5",children:[c.jsx("input",{type:"checkbox",disabled:u,checked:n.allowWorktreeWrite,onChange:b=>v({allowWorktreeWrite:b.target.checked})}),"Write files"]})}),c.jsx("p",{className:"text-xs text-white/40",children:"Unchecking runs the developer read-only (no Write/Edit/Bash grant), same as a reviewer. There is no separate push / open-PR toggle — a session with file-write access can already push and open PRs, and no mechanism here can restrict just that without also removing write access."})]})]})]})}function pa(n){return n==="claude_code"?"Claude":n==="cursor_local"?"Cursor":n==="codex_local"?"Codex":n==="muse_code"?"Muse Code":"No agent"}function l2(){return{maxTurns:"",maxBudgetUsd:""}}function mx(n){const i=n.maxTurns.trim()?Number(n.maxTurns):null,s=n.maxBudgetUsd.trim()?Number(n.maxBudgetUsd):null;return i==null&&s==null||i!=null&&(!Number.isFinite(i)||i<=0)||s!=null&&(!Number.isFinite(s)||s<=0)?null:{maxTurns:i,maxBudgetUsd:s}}function i2(n){const i=Kr(n);return{maxTurns:(i==null?void 0:i.maxTurns)!=null?String(i.maxTurns):"",maxBudgetUsd:(i==null?void 0:i.maxBudgetUsd)!=null?String(i.maxBudgetUsd):""}}function hs({children:n,className:i="",title:s}){return c.jsx("span",{title:s,className:`inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium uppercase tracking-wide border ${i}`,children:n})}function $r(n,i){const s=n.find(d=>d.runtime===i);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==="cursor_keychain");return u?{ok:!1,detail:u.message}:{ok:!0,detail:"CLI ready"}}function s2(n){const i=n.flatMap(s=>s.issues).find(s=>s.code==="github_cli_missing"||s.code==="github_auth"||s.code==="github_unreachable");return i?{ok:!1,detail:i.message}:n.length===0?{ok:!1,detail:"no agent"}:{ok:!0,detail:"gh ready"}}function ui({ok:n}){return c.jsx("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${n?"bg-emerald-400":"bg-amber-400"}`,"aria-hidden":!0})}function r2({agents:n,agentDeckOnline:i}){const[s,u]=S.useState(null);S.useEffect(()=>{Ey().then(b=>u(b.mcpUrl)).catch(()=>u(null))},[i]);const d=$r(n,"claude_code"),f=$r(n,"cursor_local"),m=$r(n,"codex_local"),y=n.some(b=>b.runtime==="muse_code")?$r(n,"muse_code"):null,v=s2(n),g=n.flatMap(b=>b.issues).find(b=>b.code==="mcp_not_registered");return c.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-x-4 gap-y-1.5 text-xs text-white/45",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Connections"}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:d.detail,children:[c.jsx(ui,{ok:d.ok}),c.jsx("span",{className:d.ok?"text-white/55":"text-amber-200/90",children:"Claude"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:f.detail,children:[c.jsx(ui,{ok:f.ok}),c.jsx("span",{className:f.ok?"text-white/55":"text-amber-200/90",children:"Cursor"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:m.detail,children:[c.jsx(ui,{ok:m.ok}),c.jsx("span",{className:m.ok?"text-white/55":"text-amber-200/90",children:"Codex"})]}),y&&c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:y.detail,children:[c.jsx(ui,{ok:y.ok}),c.jsx("span",{className:y.ok?"text-white/55":"text-amber-200/90",children:"Muse Code"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:v.detail,children:[c.jsx(ui,{ok:v.ok}),c.jsx("span",{className:v.ok?"text-white/55":"text-amber-200/90",children:"GitHub"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:(g==null?void 0:g.message)??(s?`MCP ${s}`:"Agent Deck optional"),children:[c.jsx(ui,{ok:i&&!g}),c.jsxs("span",{className:i&&!g?"text-[#92E4DD]/80":g?"text-amber-200/90":"text-white/35",children:["Agent Deck MCP",i?g?" (setup needed)":"":" (optional)"]})]})]})}const My={unsupported:"not reported by provider",missing:"no data yet",expired:"expired",unparsable:"provider data unparsable",stale:"stale"};function u2(n){if(n.unavailableReason!==null)return`${n.displayLabel}: N/A (${My[n.unavailableReason]})`;const i=n.resetAt?`, resets ${new Date(n.resetAt).toLocaleString()}`:"";return`${n.displayLabel}: ${Math.round(n.remainingPercent??0)}% remaining${i}`}function c2({window:n}){const i=n.unavailableReason===null&&n.remainingPercent!==null;return c.jsxs("span",{"data-testid":`capacity-window-${n.windowKey}`,"data-reason":n.unavailableReason??void 0,title:u2(n),className:`inline-flex items-center gap-1 rounded border px-1.5 py-0.5 whitespace-nowrap ${i?"border-white/15 bg-white/5 text-white/70":"border-white/10 bg-transparent text-white/35"}`,children:[c.jsx("span",{className:"text-white/40",children:n.displayLabel}),i?c.jsxs("span",{className:"font-medium",children:[Math.round(n.remainingPercent??0),"%"]}):c.jsx("span",{children:"N/A"})]})}function o2({data:n}){return n.runtimes.length===0?null:c.jsxs("div",{"data-testid":"runtime-capacity-strip",className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Runtime capacity"}),n.runtimes.map(i=>c.jsxs("span",{"data-testid":`capacity-entry-${i.runtime}`,className:"inline-flex min-w-0 flex-wrap items-center gap-1.5",children:[c.jsx("span",{className:"shrink-0 font-medium text-white/55",children:pa(i.runtime)}),i.windows.length===0?c.jsx("span",{"data-testid":`capacity-entry-${i.runtime}-na`,"data-reason":i.unavailableReason??"missing",title:`N/A (${My[i.unavailableReason??"missing"]})`,className:"text-white/35",children:"N/A"}):i.windows.map(s=>c.jsx(c2,{window:s},s.windowKey))]},i.runtime))]})}function d2({refreshTick:n}){const[i,s]=S.useState(null);return S.useEffect(()=>{let u=!1;return Ay().then(d=>{u||s(d)}).catch(()=>{u||s(null)}),()=>{u=!0}},[n]),i?c.jsx(o2,{data:i}):null}const px={unsupported:"not reported by provider",missing:"no data yet",expired:"expired",unparsable:"provider data unparsable",stale:"stale"};function Qo(n,i){return n===null||!Number.isFinite(n)?null:i?`${n} ${i}`:`${n}`}function f2(n){if(!n.cycleStart&&!n.cycleEnd)return null;const i=s=>new Date(s).toLocaleDateString();return n.cycleStart&&n.cycleEnd?`${i(n.cycleStart)} → ${i(n.cycleEnd)}`:i(n.cycleStart??n.cycleEnd)}function h2(n){if(n.memberCount===null||!Number.isFinite(n.memberCount))return null;const i=`${n.memberCount} member${n.memberCount===1?"":"s"}`;return n.memberLimitOverrideCount!==null&&Number.isFinite(n.memberLimitOverrideCount)&&n.memberLimitOverrideCount>0?`${i} · ${n.memberLimitOverrideCount} with a per-member limit override`:i}function m2({data:n}){const i=n.unavailableReason===null&&n.source!=="unavailable",s=Qo(n.spendValue,n.spendUnit),u=Qo(n.hardLimitValue,n.hardLimitUnit),d=Qo(n.usageSpendValue,n.usageSpendUnit),f=h2(n),m=f2(n);return c.jsxs("div",{"data-testid":"cursor-team-billing","data-reason":n.unavailableReason??void 0,"data-configured":n.configured?"true":"false",className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Cursor team billing"}),c.jsx("span",{className:"rounded border border-white/10 px-1.5 py-0.5 text-white/35",title:"Official Cursor Admin API — team-level billing, not individual runtime quota",children:"Admin API"}),i?c.jsxs("span",{className:"inline-flex flex-wrap items-center gap-x-3 gap-y-1 text-white/70",children:[s&&c.jsxs("span",{"data-testid":"cursor-team-spend",title:`Team spend ${s}${u?` of ${u} hard limit`:""}`,children:["Spend ",s,u&&c.jsxs("span",{className:"text-white/40",children:[" of ",u," hard limit"]})]}),!s&&u&&c.jsxs("span",{"data-testid":"cursor-team-spend",title:`Hard limit ${u}`,children:["Hard limit ",u]}),m&&c.jsxs("span",{"data-testid":"cursor-team-cycle",className:"text-white/40",children:["cycle ",m]}),f&&c.jsx("span",{"data-testid":"cursor-team-members",className:"text-white/40",title:"Team size and per-member limit overrides as reported — never summed into a team total",children:f}),d&&c.jsxs("span",{"data-testid":"cursor-team-usage",className:"text-white/40",title:"Summed trailing-window usage spend as reported",children:["trailing usage ",d]})]}):c.jsxs("span",{"data-testid":"cursor-team-billing-na",className:"text-white/35",title:`N/A (${px[n.unavailableReason??"missing"]})`,children:["N/A (",px[n.unavailableReason??"missing"],")",!n.configured&&c.jsx("span",{className:"ml-1 text-white/25",children:"— set CURSOR_ADMIN_API_KEY to enable"})]})]})}function p2({refreshTick:n}){const[i,s]=S.useState(null);return S.useEffect(()=>{let u=!1;return qw().then(d=>{u||s(d)}).catch(()=>{u||s(null)}),()=>{u=!0}},[n]),i?c.jsx(m2,{data:i}):null}const x2="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",y2="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";function Dy({src:n,className:i}){return c.jsx("span",{className:`inline-flex items-center justify-center rounded-lg bg-white/[0.04] ${i??"h-8 w-8"}`,children:c.jsx("img",{src:n,alt:"",className:"h-[70%] w-[70%] object-contain",draggable:!1})})}function v2({className:n="h-8 w-8"}){return c.jsx(Dy,{src:x2,className:n})}function g2({className:n="h-8 w-8"}){return c.jsx(Dy,{src:y2,className:n})}function b2({className:n="h-8 w-8"}){return c.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,"aria-hidden":!0,children:[c.jsx("rect",{width:"32",height:"32",rx:"8",fill:"white",fillOpacity:"0.06"}),c.jsx("circle",{cx:"16",cy:"13",r:"4.5",stroke:"#92E4DD",strokeWidth:"1.75"}),c.jsx("path",{d:"M8.5 24.5c1.2-3.5 3.8-5.5 7.5-5.5s6.3 2 7.5 5.5",stroke:"#92E4DD",strokeWidth:"1.75",strokeLinecap:"round"})]})}function w2({className:n="h-8 w-8"}){return c.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,"aria-hidden":!0,children:[c.jsx("rect",{width:"32",height:"32",rx:"8",fill:"white",fillOpacity:"0.06"}),c.jsx("text",{x:"16",y:"21",textAnchor:"middle",fill:"#92E4DD",fontSize:"11",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:"600",children:"Cx"})]})}function S2({className:n="h-8 w-8"}){return c.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,"aria-hidden":!0,children:[c.jsx("rect",{width:"32",height:"32",rx:"8",fill:"white",fillOpacity:"0.06"}),c.jsx("text",{x:"16",y:"21",textAnchor:"middle",fill:"#92E4DD",fontSize:"11",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:"600",children:"Mu"})]})}function j2({runtime:n,className:i="h-8 w-8 shrink-0"}){return n==="claude_code"?c.jsx(v2,{className:i}):n==="cursor_local"?c.jsx(g2,{className:i}):n==="codex_local"?c.jsx(w2,{className:i}):n==="muse_code"?c.jsx(S2,{className:i}):c.jsx(b2,{className:i})}const Vr=()=>({runtime:"claude_code",deckId:"",purpose:"",defaultModel:"",defaultEffort:"",defaultBudget:l2(),allowWorktreeWrite:!0});function _2({agents:n,agentDeckOnline:i,onRefresh:s}){const[u,d]=S.useState(!1),[f,m]=S.useState(""),[y,v]=S.useState(Vr()),[g,b]=S.useState(!1),[N,z]=S.useState(null),[K,O]=S.useState(""),[$,M]=S.useState(Vr()),Y=async X=>{if(X.preventDefault(),!(!f.trim()||!y.deckId)){b(!0);try{const be={name:f.trim(),runtime:y.runtime,deckId:y.deckId,defaultModel:y.defaultModel.trim()||null,defaultEffort:y.defaultEffort||null,defaultBudget:mx(y.defaultBudget),purpose:y.purpose.trim()||null,permissionPolicy:fx(y)};await Lw(be),m(""),v(Vr()),d(!1),s()}catch(be){alert(String(be))}finally{b(!1)}}},J=X=>{z(X.id),O(X.name),M({runtime:X.runtime,deckId:X.deckId??"",purpose:X.purpose??"",defaultModel:cx(X)??"",defaultEffort:X.defaultEffort??"",defaultBudget:i2(T1(X)),...n2(X.permissionPolicyJson)})},ne=()=>{z(null),M(Vr())},pe=async X=>{if(!(!K.trim()||!$.deckId)){b(!0);try{const be={name:K.trim(),runtime:$.runtime,deckId:$.deckId,defaultModel:$.defaultModel.trim()||null,defaultEffort:$.defaultEffort||null,defaultBudget:mx($.defaultBudget),purpose:$.purpose.trim()||null,permissionPolicy:fx($)};await Uw(X.id,be),ne(),s()}catch(be){alert(String(be))}finally{b(!1)}}},I=async X=>{if(confirm(`Delete agent "${X.name}"?`)){b(!0);try{await zw(X.id),s()}catch(be){alert(String(be))}finally{b(!1)}}},Ee=n.filter(X=>!X.healthy).length;return c.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4 max-w-6xl mx-auto w-full",children:[c.jsxs("div",{className:"mb-6 flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h1",{className:"heading-page",children:"Agents"}),c.jsx("p",{className:"text-sm text-white/50 mt-1",children:"Saved execution profiles — pick one when creating an issue instead of configuring each task"}),c.jsxs("p",{className:"text-sm text-white/45 mt-2",children:[n.length," agent",n.length===1?"":"s",Ee>0&&c.jsxs("span",{className:"text-red-400 ml-2",children:["· ",Ee," need",Ee===1?"s":""," attention"]})]})]}),c.jsx(r2,{agents:n,agentDeckOnline:i})]}),c.jsxs("div",{className:"mb-4 overflow-x-auto space-y-2",children:[c.jsx(d2,{}),c.jsx(p2,{})]}),c.jsx("div",{className:"space-y-3 mb-6",children:n.map(X=>{const be=cx(X);return c.jsxs("div",{className:"panel flex flex-col sm:flex-row sm:items-start gap-3 justify-between",children:[c.jsxs("div",{className:"flex gap-3 min-w-0 flex-1",children:[c.jsx(j2,{runtime:X.runtime}),c.jsxs("div",{className:"space-y-2 min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsx("span",{className:"text-lg font-semibold text-[#E8F6F4]",children:X.name}),!X.healthy&&c.jsx(hs,{className:"bg-red-500/15 text-red-300 border-red-400/30 normal-case",children:"Needs fix"})]}),c.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[c.jsx(hs,{className:"bg-white/5 text-white/55 border-white/15 normal-case",children:pa(X.runtime)}),X.deckName?c.jsxs(hs,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",X.deckName]}):c.jsx(hs,{className:"bg-white/5 text-white/40 border-white/10 normal-case",children:"No deck"}),be&&c.jsx(hs,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:be,children:be})]}),N===X.id&&c.jsxs("div",{className:"space-y-3 pt-2 border-t border-white/10",children:[c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),c.jsx("input",{className:"field text-sm",value:K,onChange:$e=>O($e.target.value)})]}),c.jsx(hx,{value:$,onChange:M,agentDeckOnline:i}),c.jsxs("div",{className:"flex gap-2 pt-1",children:[c.jsx("button",{type:"button",disabled:g||!K.trim()||!$.deckId,onClick:()=>pe(X),className:"btn-gold text-sm px-3 py-1.5",children:"Save"}),c.jsx("button",{type:"button",onClick:ne,className:"btn-ghost text-sm px-3 py-1.5",children:"Cancel"})]})]}),X.issues.length>0&&c.jsx("ul",{className:"text-sm text-red-300/90 space-y-1",children:X.issues.map(($e,gt)=>c.jsxs("li",{children:["· ",$e.message]},gt))})]})]}),c.jsxs("div",{className:"flex gap-2 shrink-0",children:[N!==X.id&&c.jsx("button",{type:"button",disabled:g,onClick:()=>J(X),className:"btn-ghost text-sm px-3 py-1.5",children:"Edit"}),c.jsx("button",{type:"button",disabled:g,onClick:()=>I(X),className:"btn-ghost text-sm px-3 py-1.5",children:"Delete"})]})]},X.id)})}),u?c.jsxs("form",{onSubmit:Y,className:"panel space-y-3",children:[c.jsx("h2",{className:"heading-panel",children:"New Agent"}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),c.jsx("input",{className:"field",placeholder:"e.g. Claude · Work",value:f,onChange:X=>m(X.target.value)})]}),c.jsx(hx,{value:y,onChange:v,agentDeckOnline:i}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"submit",disabled:g||!f.trim()||!y.deckId,className:"btn-gold px-4 py-2",children:g?"Saving…":"Create agent"}),c.jsx("button",{type:"button",onClick:()=>d(!1),className:"btn-ghost px-4 py-2",children:"Cancel"})]})]}):c.jsx("button",{type:"button",onClick:()=>d(!0),className:"btn-gold px-4 py-2",children:"Add agent"})]})}function N2(n){try{return Od(n).identity}catch{return null}}function A2(n,i){return n!=="linear"||!i?null:i.repoResolution??cy(i.labels)}function E2(n,i){if(!i)return n;const s=i.repoResolution??cy(i.labels);return s.status==="resolved"&&s.repository?s.repository:n}function C2(n,i){var u;const s=A2(n,i);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 xx(n){return n.title.trim().length>0&&N2(n.repo)!=null&&n.developerAgentId.length>0&&n.reviewerAgentId.length>0}const T2=["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"],R2={q:"",status:"",repo:"",needsAttention:!1};function Ud(n){return n.startsWith("?")?n.slice(1):n}function yx(n){var s,u,d;const i=new URLSearchParams(Ud(n));return{q:((s=i.get("q"))==null?void 0:s.trim())??"",status:((u=i.get("status"))==null?void 0:u.trim())??"",repo:((d=i.get("repo"))==null?void 0:d.trim())??"",needsAttention:i.get("needsAttention")==="1"||i.get("needsAttention")==="true"}}function k2(n){const i=new URLSearchParams(Ud(n)),s=v=>{var b;const g=(b=i.get(v))==null?void 0:b.trim();return g||void 0},u={},d=s("q");d!==void 0&&(u.q=d);const f=s("status");f!==void 0&&(u.status=f);const m=s("repo");m!==void 0&&(u.repo=m),(i.get("needsAttention")==="1"||i.get("needsAttention")==="true")&&(u.needsAttention=!0);const y=Number(i.get("page"));return Number.isInteger(y)&&y>=1&&(u.page=y),u}function O2(n){var s,u,d;const i=new URLSearchParams;return(s=n.q)!=null&&s.trim()&&i.set("q",n.q.trim()),(u=n.status)!=null&&u.trim()&&i.set("status",n.status.trim()),(d=n.repo)!=null&&d.trim()&&i.set("repo",n.repo.trim()),n.needsAttention&&i.set("needsAttention","1"),n.page!==void 0&&Number.isInteger(n.page)&&n.page>1&&i.set("page",String(n.page)),i.sort(),i.toString()}function M2(n){const i={};return n.q.trim()&&(i.q=n.q.trim()),n.status.trim()&&(i.status=n.status.trim()),n.repo.trim()&&(i.repo=n.repo.trim()),n.needsAttention&&(i.needsAttention=!0),i}function D2(n,i){const s=new URLSearchParams(Ud(n));return i<=1?s.delete("page"):s.set("page",String(Math.floor(i))),s.sort(),s.toString()}function vx(n){if(n.total===0)return"No issues match these filters";const i=(n.page-1)*n.limit+1,s=Math.min(n.total,n.page*n.limit);return`Showing ${i}–${s} of ${n.total} issues`}function gx(n){return n.totalPages<=1?"":`Page ${n.page} of ${n.totalPages}`}function L2(n){return!!(n.q||n.status||n.repo||n.needsAttention)}const U2={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"},z2={ready:"Ready",developing:"Developing",reviewing:"Reviewing",repairing:"Repairing",final_review:"Final review",needs_human:"Needs human",done:"Done",closed:"Closed"};function Ly({status:n}){return c.jsx("span",{className:`text-xs leading-none px-2 py-1 rounded border tabular-nums ${U2[n]}`,children:z2[n]})}function Uy(n){return n.issues.some(i=>i.code==="usage_capped")}function zy(n){return[...n].sort((i,s)=>Number(s.healthy)-Number(i.healthy))}function Yn(n){var u;const i=`${n.name} · ${pa(n.runtime)}`,s=[];if(!n.healthy){const d=((u=n.issues[0])==null?void 0:u.message)??"unhealthy";s.push(`NEEDS FIX: ${d}`)}return Uy(n)&&s.push("USAGE CAPPED"),s.length>0?`${i} — ${s.join(" · ")}`:i}function su(n){var i;return n?n.healthy?Uy(n)?"Usage capped — admission will refuse until the cap lifts":null:((i=n.issues[0])==null?void 0:i.message)??"Agent is unhealthy":null}function B2({agents:n,initialDeveloperId:i,initialReviewerId:s,busy:u,onSave:d,onCancel:f}){var M,Y;const[m,y]=S.useState(i??""),[v,g]=S.useState(s??""),b=zy(n),N=n.find(J=>J.id===m),z=n.find(J=>J.id===v),K=su(N),O=su(z),$=m===(i??"")&&v===(s??"");return c.jsxs("div",{className:"p-3 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[c.jsx("p",{className:"text-xs text-white/50",children:"Reassign agents — queue position is kept, the wait reason is rechecked, and the change is recorded on the timeline."}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Developer"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:m,disabled:u,title:N?`${N.name} · ${pa(N.runtime)}${N.healthy?" · healthy":` · ${((M=N.issues[0])==null?void 0:M.message)??"unhealthy"}`}`:"Pick a developer agent",onChange:J=>y(J.target.value),children:[c.jsx("option",{value:"",children:"Developer agent…"}),b.map(J=>c.jsx("option",{value:J.id,title:Yn(J),children:(J.healthy?"● ":"○ ")+Yn(J)},J.id))]}),K&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:K})]}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Reviewer"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:v,disabled:u,title:z?`${z.name} · ${pa(z.runtime)}${z.healthy?" · healthy":` · ${((Y=z.issues[0])==null?void 0:Y.message)??"unhealthy"}`}`:"Pick a reviewer agent",onChange:J=>g(J.target.value),children:[c.jsx("option",{value:"",children:"Reviewer agent…"}),b.map(J=>J.runtime==="muse_code"?c.jsx("option",{value:J.id,disabled:!0,title:"Muse Code cannot be a reviewer (developer role only)",children:`○ ${J.name} · ${pa(J.runtime)} — reviewer not supported`},J.id):c.jsx("option",{value:J.id,title:Yn(J),children:(J.healthy?"● ":"○ ")+Yn(J)},J.id))]}),O&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:O})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-1.5 text-sm disabled:opacity-50",disabled:u||!m||!v||$,title:"Save via the issue PATCH contract — keeps queue position and rechecks the wait reason",onClick:()=>d(m,v),children:"Save agents"}),c.jsx("button",{type:"button",className:"px-4 py-1.5 text-sm text-white/60 hover:text-white disabled:opacity-50",disabled:u,onClick:f,children:"Cancel"})]})]})}function ru({className:n="w-3.5 h-3.5"}){return c.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor",className:n,"aria-hidden":!0,children:c.jsx("path",{fillRule:"evenodd",d:"M8.982 1.566a1.13 1.13 0 0 0-1.964 0L.165 13.233c-.457.778.091 1.767.982 1.767h13.706c.891 0 1.439-.99.982-1.767L8.982 1.566zM8 5.697a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 5.697zm0 7.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})})}const q2={final_review:"Final review",attempts_exhausted:"Attempts exhausted",policy_escalation:"Policy escalation",product_scope_decision:"Product scope decision",deck_interaction_required:"Agent Deck interaction required",reflection_interaction_required:"Reflection interaction required",outbound_delivery_interaction_required:"Outbound delivery interaction required"};function H2(n){return q2[n]??n}function xd(n){if(!n)return null;try{return JSON.parse(n)}catch{return null}}function By(n){const i=xd(n.responseOptionsJson);return Array.isArray(i)?i.filter(s=>typeof(s==null?void 0:s.choice)=="string"&&typeof(s==null?void 0:s.label)=="string"):[]}function $2(n){var f;const i=[],s=xd(n.evidenceJson),u=xd(n.continuationPreviewJson);if((f=s==null?void 0:s.review)!=null&&f.verdict){const m=Array.isArray(s.review.findings)?s.review.findings.length:0;i.push(`Reviewer verdict: ${s.review.verdict}${m?` · ${m} finding(s)`:""}`)}(s!=null&&s.serviceId||s!=null&&s.toolName)&&i.push(`Delivery: ${[s.serviceId,s.toolName].filter(Boolean).join(" · ")}`);const d=s==null?void 0:s.pushDivergence;if(d&&typeof d.localSha=="string"&&typeof d.remoteSha=="string"){const m=typeof d.branch=="string"?d.branch:"the branch",y=typeof d.ahead=="number"?` (+${d.ahead})`:"",v=typeof d.behind=="number"?` (+${d.behind})`:"";i.push(`Push: local ${d.localSha}${y} · origin/${m} ${d.remoteSha}${v}`),typeof d.observedRemoteSha=="string"&&d.observedRemoteSha!==d.remoteSha&&i.push(`Remote moved: origin/${m} is now at ${d.observedRemoteSha}`),typeof d.lastLeaseError=="string"&&d.lastLeaseError&&i.push(`Last lease attempt: ${d.lastLeaseError}`)}return u!=null&&u.resumeRole&&i.push(`Continuation: resumes as ${u.resumeRole}${u.resumeHeadSha?` at ${u.resumeHeadSha.slice(0,8)}`:""}`),i}function V2(n){return n==="close"||n==="reject"||n==="abort"}function qy({options:n,disabled:i,onChoose:s}){return n.length===0?null:c.jsx("div",{className:"flex flex-wrap gap-2",children:n.map(u=>c.jsx("button",{type:"button",className:`${V2(u.choice)?"btn-ghost-danger":"btn-gold"} px-3 py-1 text-xs disabled:opacity-50`,disabled:i,onClick:()=>s(u.choice),children:u.label},u.choice))})}function Y2({actions:n,busyActionId:i,onResolve:s}){return n.length===0?null:c.jsxs("div",{className:"mb-4 rounded border border-red-400/30 bg-red-500/10",children:[c.jsxs("div",{className:"px-4 py-2 flex items-center gap-2 border-b border-red-400/20",children:[c.jsx(ru,{className:"w-4 h-4 shrink-0 text-red-300"}),c.jsxs("span",{className:"font-ui-display text-sm font-medium text-red-200",children:[n.length," ",n.length===1?"item needs":"items need"," your attention"]})]}),c.jsx("div",{className:"divide-y divide-white/5",children:n.map(u=>{const d=H2(u.actionType),f=$2(u);if(u.issueId)return c.jsxs(ya,{to:`/issues/${u.issueId}`,className:"block w-full text-left px-4 py-2 hover:bg-white/5 transition-colors",children:[c.jsx("span",{className:"text-xs uppercase tracking-wide text-red-300/80",children:d}),c.jsx("span",{className:"text-sm text-white/80 ml-2",children:u.question})]},u.id);const m=By(u);return c.jsxs("div",{className:"px-4 py-3 space-y-1.5",children:[c.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[c.jsx("span",{className:"text-xs uppercase tracking-wide text-red-300/80",children:d}),c.jsx("span",{className:"text-xs text-white/35 shrink-0",children:new Date(u.requestedAt).toLocaleString()})]}),c.jsx("p",{className:"text-sm text-white/85",children:u.question}),u.reason&&u.reason!==u.question&&c.jsx("p",{className:"text-xs text-white/50",children:u.reason}),f.map(y=>c.jsx("p",{className:"text-xs text-white/50",children:y},y)),m.length>0?c.jsx(qy,{options:m,disabled:i===u.id,onChoose:y=>s(u.id,y)}):c.jsxs("p",{className:"text-xs text-amber-200/80",children:["This item declares no response options — resolve it from the CLI (",c.jsx("code",{children:"agent-dealer action"}),")."]})]},u.id)})})]})}const Z2="web";function G2(n){const i=Date.now()-new Date(n).getTime(),s=Math.floor(i/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 Q2(n){var u;if(!(n!=null&&n.trim()))return;const i=n.match(/##\s*Acceptance criteria\s*\n([\s\S]*?)(?=\n##\s|$)/i);return((u=i==null?void 0:i[1])==null?void 0:u.trim())||void 0}function X2({agents:n,humanActions:i,onHumanActionsChanged:s}){const[u,d]=S.useState(null),[f,m]=S.useState(null),[y,v]=ey(),g=y.toString(),b=k2(g),N=S.useRef(b);N.current=b;const[z,K]=S.useState(()=>yx(g)),[O,$]=S.useState(!1),[M,Y]=S.useState("manual"),[J,ne]=S.useState([]),[pe,I]=S.useState(""),[Ee,X]=S.useState(""),[be,$e]=S.useState(!1),[gt,xt]=S.useState([]),[et,Ct]=S.useState(""),[He,ie]=S.useState(""),[L,F]=S.useState("main"),[oe,_e]=S.useState(""),[Me,j]=S.useState(""),[B,G]=S.useState(""),[P,re]=S.useState(""),[ce,Ce]=S.useState(!0),[nt,fe]=S.useState(null),[ot,ea]=S.useState([]),[lt,ga]=S.useState(null),[ba,wa]=S.useState(!1),[Dt,Ya]=S.useState(null),[Sa,Rt]=S.useState(null),Fe=J.find(R=>R.id===pe)??null,mn=M==="linear"&&Fe!=null,vl=C2(M,Fe),gl=xx({title:et,repo:He,developerAgentId:B,reviewerAgentId:P}),yt=R=>{$w(R).then(d).catch(ue=>fe(String(ue)))},St=()=>{yt(N.current),Go().then(ea).catch(()=>{}),Iw().then(ga).catch(()=>{})},bl=async R=>{wa(!0),fe(null);try{const ue=await Fw(R);ga(ue),St()}catch(ue){fe(String(ue))}finally{wa(!1)}},wl=async R=>{Rt(R),fe(null);try{const ue=await Cy(R);Ya({issueId:R,developerAgentId:ue.issue.developerAgentId,reviewerAgentId:ue.issue.reviewerAgentId})}catch(ue){fe(String(ue))}finally{Rt(null)}},pn=async(R,ue)=>{if(Dt){Rt(Dt.issueId);try{await pd(Dt.issueId,{developerAgentId:R,reviewerAgentId:ue}),Ya(null),St()}catch(Ve){Ya(null),fe(String(Ve)),St()}finally{Rt(null)}}},yi=async R=>{Rt(R),fe(null);try{await Ty(R),St()}catch(ue){fe(String(ue))}finally{Rt(null)}},Gn=async R=>{Rt(R),fe(null);try{await Ry(R),St()}catch(ue){fe(String(ue)),St()}finally{Rt(null)}},vi=R=>{const ue=O2(M2(R));v(ue?Object.fromEntries(new URLSearchParams(ue)):{})},Sl=()=>{K(R2),v({})},ja=R=>{const ue=D2(g,R);v(ue?Object.fromEntries(new URLSearchParams(ue)):{})},Z=R=>K(ue=>({...ue,...R})),we=async(R,ue)=>{m(R),fe(null);try{await Oy(R,Z2,ue),s(),St()}catch(Ve){fe(String(Ve))}finally{m(null)}};S.useEffect(()=>{K(yx(g))},[g]),S.useEffect(()=>{yt(N.current),Go().then(ea).catch(()=>{});const R=setInterval(()=>{yt(N.current),Go().then(ea).catch(()=>{})},5e3);return()=>clearInterval(R)},[g]),S.useEffect(()=>{O&&(Vw().then(xt).catch(()=>xt([])),M==="linear"&&Ow().then(ne).catch(R=>fe(`Linear inbox: ${String(R)}`)))},[O,M]),S.useEffect(()=>{Fe&&(Ct(`${Fe.identifier}: ${Fe.title}`),_e(Fe.description??""),j(Q2(Fe.description)??""),ie(R=>E2(R,Fe)))},[Fe]);const Ue=()=>{Ct(""),ie(""),_e(""),j(""),I(""),X(""),Ce(!0),F("main")},Qn=R=>{ne(ue=>[R,...ue.filter(Ve=>Ve.id!==R.id)]),I(R.id),X(R.identifier)},jl=async()=>{const R=Ee.trim();if(!R){fe("Paste a Linear id (e.g. NOT-103) or issue URL");return}$e(!0),fe(null);try{const ue=await Mw(R);Qn(ue)}catch(ue){fe(`Linear lookup: ${String(ue)}`)}finally{$e(!1)}},_a=async()=>{if(!xx({title:et,repo:He,developerAgentId:B,reviewerAgentId:P})){fe("Title, GitHub repository, developer, and reviewer are required");return}try{await Qw({title:et.trim(),repo:He.trim(),baseBranch:L.trim()||"main",description:oe.trim()||void 0,acceptanceCriteria:Me.trim()||void 0,developerAgentId:B,reviewerAgentId:P,maxReviewRounds:3,maxInfraAttempts:3,autoMerge:ce,source:M==="linear"&&Fe?"linear":"manual",externalId:Fe==null?void 0:Fe.id,externalLabel:Fe==null?void 0:Fe.identifier,externalUrl:Fe==null?void 0:Fe.url}),$(!1),Ue(),St()}catch(R){fe(String(R))}};return c.jsxs("div",{className:"flex-1 min-h-0 px-6 py-4 w-full overflow-y-auto",children:[c.jsx("div",{className:"flex items-center justify-end mb-4",children:c.jsx("button",{type:"button",className:"btn-gold px-4",onClick:()=>$(R=>!R),children:"New issue"})}),nt&&c.jsx("p",{className:"text-sm text-red-300 mb-3",children:nt}),O&&c.jsxs("div",{className:"mb-4 p-4 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[c.jsxs("p",{className:"text-xs text-white/50",children:["Workflow:"," ",c.jsxs("span",{className:"text-white/75",children:["developer → reviewer → ",ce?"auto-merge on approve":"final human review"]}),"."]}),c.jsxs("div",{className:"flex gap-2 text-sm",children:[c.jsx("button",{type:"button",className:`font-ui-display px-3 py-1 rounded border ${M==="manual"?"border-teal/50 text-teal":"border-white/10 text-white/50"}`,onClick:()=>{Y("manual"),I("")},children:"Manual"}),c.jsx("button",{type:"button",className:`font-ui-display px-3 py-1 rounded border ${M==="linear"?"border-teal/50 text-teal":"border-white/10 text-white/50"}`,onClick:()=>Y("linear"),children:"From Linear"})]}),M==="linear"&&c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{className:"flex-1 bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"NOT-103 or Linear URL",value:Ee,onChange:R=>X(R.target.value),onKeyDown:R=>{R.key==="Enter"&&(R.preventDefault(),jl())}}),c.jsx("button",{type:"button",className:"font-ui-display px-3 py-2 rounded border border-teal/40 text-teal text-sm disabled:opacity-50",disabled:be||!Ee.trim(),onClick:()=>void jl(),children:be?"…":"Lookup"})]}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:pe,onChange:R=>{const ue=R.target.value;I(ue);const Ve=J.find(kt=>kt.id===ue);Ve&&X(Ve.identifier)},children:[c.jsx("option",{value:"",children:"Or pick from open inbox…"}),J.map(R=>c.jsxs("option",{value:R.id,children:[R.identifier,": ",R.title]},R.id))]})]}),c.jsx("input",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm disabled:opacity-60",placeholder:"Title",value:et,disabled:mn,onChange:R=>Ct(R.target.value)}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm disabled:opacity-60",rows:3,placeholder:"Problem statement / description",value:oe,disabled:mn,onChange:R=>_e(R.target.value)}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",rows:3,placeholder:"Acceptance criteria",value:Me,onChange:R=>j(R.target.value)}),c.jsxs("div",{className:"flex gap-2 items-stretch",children:[c.jsxs("div",{className:"flex-1 space-y-1",children:[gt.length>0&&c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:gt.includes(He)?He:"",onChange:R=>{R.target.value&&ie(R.target.value)},children:[c.jsx("option",{value:"",children:"Recent repositories…"}),gt.map(R=>c.jsx("option",{value:R,children:R},R))]}),c.jsx("input",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"GitHub URL or owner/repo",value:He,onChange:R=>ie(R.target.value)}),vl&&c.jsx("p",{className:"text-xs text-amber-200/80","data-testid":"repo-label-warning",children:vl})]}),c.jsx("input",{className:"w-32 bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"Base (seed)",title:"Seed only — managed GitHub clones use the remote default at first checkout",value:L,onChange:R=>F(R.target.value)})]}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:B,onChange:R=>G(R.target.value),children:[c.jsx("option",{value:"",children:"Developer agent…"}),n.map(R=>c.jsx("option",{value:R.id,children:R.name},R.id))]}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:P,onChange:R=>re(R.target.value),children:[c.jsx("option",{value:"",children:"Reviewer agent…"}),n.map(R=>c.jsx("option",{value:R.id,children:R.name},R.id))]}),c.jsxs("label",{className:"flex items-center gap-2 text-sm text-white/70 cursor-pointer",children:[c.jsx("input",{type:"checkbox",checked:ce,onChange:R=>Ce(R.target.checked),className:"accent-[#C4B643]"}),"Auto-merge when reviewer approves (skip final human review)"]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 disabled:opacity-40",disabled:!gl,title:gl?void 0:"Title, GitHub repository, developer, and reviewer are required",onClick:_a,children:M==="linear"?"Kick from Linear":"Create"}),c.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm text-white/60 hover:text-white",onClick:()=>{$(!1),Ue()},children:"Cancel"})]})]}),(ot.length>0||lt)&&c.jsxs("div",{className:"mb-4 rounded border border-cyber-teal/25 bg-cyber-teal/5",children:[c.jsxs("div",{className:"px-4 py-2 border-b border-cyber-teal/20 flex items-center justify-between gap-3",children:[c.jsx("span",{className:"font-ui-display text-sm font-medium text-cyber-teal",children:"Admission queue"}),c.jsx("span",{className:"flex items-center gap-2 text-xs text-white/40",children:lt?c.jsxs(c.Fragment,{children:[c.jsxs("span",{children:[lt.active," active · ",lt.waiting," waiting · limit"," ",lt.limit,lt.overCap?" · over capacity":""]}),lt.options.length>0?c.jsxs("label",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"text-white/35",children:"limit"}),c.jsx("select",{className:"bg-black/30 border border-white/10 rounded px-1.5 py-0.5 text-xs text-white/80 disabled:opacity-50",value:lt.options.includes(lt.maxActiveIssues)?lt.maxActiveIssues:lt.limit,disabled:ba,title:lt.ceiling<2?`Capped by the worker/spawn ceiling (${lt.ceiling})`:"How many issues may execute in parallel (max one per repository)",onChange:R=>void bl(Number(R.target.value)),children:lt.options.map(R=>c.jsx("option",{value:R,children:R},R))})]}):c.jsxs("span",{title:`Capped by the worker/spawn ceiling (${lt.ceiling})`,children:["max ",lt.ceiling]})]}):c.jsxs("span",{children:[ot.length," waiting · sequential"]})})]}),c.jsx("div",{className:"divide-y divide-white/5",children:ot.map((R,ue)=>c.jsxs("div",{children:[c.jsxs("div",{className:"px-4 py-2 flex items-start gap-3",children:[c.jsx("span",{className:"text-xs text-white/35 w-5 shrink-0 pt-0.5",children:R.position}),c.jsxs(ya,{to:`/issues/${R.issueId}`,className:"flex-1 min-w-0 text-left hover:text-cyber-teal",children:[c.jsx("span",{className:"text-sm text-white/85 truncate block",children:R.title??R.issueId.slice(0,8)}),R.waitReason?c.jsx("span",{className:"text-xs text-amber-200/80 block mt-0.5",children:R.waitReason}):c.jsxs("span",{className:"text-xs text-white/35 block mt-0.5",children:[R.issueStatus??"queued"," · next up"]})]}),c.jsxs("div",{className:"flex items-center gap-2 shrink-0 flex-wrap justify-end",children:[c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:Sa===R.issueId,title:"Change the developer/reviewer agents — keeps queue position and rechecks the wait reason",onClick:()=>void wl(R.issueId),children:"Edit"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:Sa===R.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 yi(R.issueId),children:"Run next"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:Sa===R.issueId,title:"Execute now — start immediately, skipping queue order; refuses (changing nothing) when capacity, readiness, blockers, or agent health prevents it",onClick:()=>void Gn(R.issueId),children:"Execute now"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:ue===0,title:"Move to top",onClick:()=>{Hr(R.issueId,"top").then(St).catch(Ve=>fe(String(Ve)))},children:"Top"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:ue===0,title:"Move up",onClick:()=>{const Ve=ot[ue-1];Ve&&Hr(R.issueId,{before:Ve.issueId}).then(St).catch(kt=>fe(String(kt)))},children:"↑"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:ue===ot.length-1,title:"Move down",onClick:()=>{const Ve=ot[ue+1];Ve&&Hr(R.issueId,{after:Ve.issueId}).then(St).catch(kt=>fe(String(kt)))},children:"↓"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:ue===ot.length-1,title:"Move to bottom",onClick:()=>{Hr(R.issueId,"bottom").then(St).catch(Ve=>fe(String(Ve)))},children:"Bottom"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-white",onClick:()=>{ky(R.issueId).then(St).catch(Ve=>fe(String(Ve)))},children:"Remove"})]})]}),(Dt==null?void 0:Dt.issueId)===R.issueId&&c.jsx("div",{className:"px-4 pb-3 pl-12",children:c.jsx(B2,{agents:n,initialDeveloperId:Dt.developerAgentId,initialReviewerId:Dt.reviewerAgentId,busy:Sa===R.issueId,onSave:(Ve,kt)=>void pn(Ve,kt),onCancel:()=>Ya(null)})})]},R.id))})]}),c.jsx(Y2,{actions:i,busyActionId:f,onResolve:(R,ue)=>void we(R,ue)}),c.jsx("form",{"aria-label":"Issues filters",className:"mb-4 p-4 rounded border border-white/10 bg-panel-elevated/60",onSubmit:R=>{R.preventDefault(),vi(z)},children:c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"block text-xs text-white/50 mb-1",children:"Search"}),c.jsx("input",{type:"text",placeholder:"Title or label (e.g. NOT-175)",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:z.q,onChange:R=>Z({q:R.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"block text-xs text-white/50 mb-1",children:"Status"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:z.status,onChange:R=>Z({status:R.target.value}),children:[c.jsx("option",{value:"",children:"All statuses"}),T2.map(R=>c.jsx("option",{value:R,children:R},R))]})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"block text-xs text-white/50 mb-1",children:"Repository"}),c.jsx("input",{type:"text",placeholder:"github.com/owner/repo",title:"Exact repository identity",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:z.repo,onChange:R=>Z({repo:R.target.value})})]}),c.jsx("div",{className:"flex items-end gap-2",children:c.jsxs("label",{className:"flex items-center gap-2 text-sm text-white/70 cursor-pointer pb-2",children:[c.jsx("input",{type:"checkbox",checked:z.needsAttention,onChange:R=>Z({needsAttention:R.target.checked}),className:"accent-[#C4B643]"}),"Needs attention"]})}),c.jsxs("div",{className:"flex items-end gap-2 sm:col-span-2 lg:col-span-4",children:[c.jsx("button",{type:"submit",className:"btn-gold px-4",children:"Apply"}),c.jsx("button",{type:"button",className:"px-4 py-2 text-sm text-white/60 hover:text-white",onClick:Sl,children:"Reset"})]})]})}),u===null?c.jsx("p",{className:"text-white/50 text-sm",children:"Loading…"}):u.total===0&&!L2(b)?c.jsx("p",{className:"text-white/45 text-sm",children:"No issues yet — create one to get started."}):u.total===0?c.jsxs("div",{className:"rounded border border-white/10 bg-panel-elevated/40 px-4 py-3",children:[c.jsx("p",{className:"text-white/45 text-sm",children:vx(u)}),c.jsx("button",{type:"button",className:"mt-2 px-3 py-1.5 text-sm rounded border border-white/15 text-white/70 hover:text-white",onClick:Sl,children:"Reset filters"})]}):c.jsxs("div",{children:[c.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-2 mb-2",children:[c.jsx("h3",{className:"text-sm font-medium text-white/80",children:"Issues"}),c.jsxs("p",{className:"text-xs text-white/40 tabular-nums",children:[vx(u),gx(u)?` · ${gx(u)}`:""]})]}),c.jsx("div",{className:"space-y-2",children:u.issues.map(R=>{const ue=ot.find(Ve=>Ve.issueId===R.id);return c.jsxs(ya,{to:`/issues/${R.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:[R.hasOpenHumanAction&&c.jsx(ru,{className:"w-4 h-4 shrink-0 text-red-400"}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"text-sm font-medium text-white/90 truncate",children:R.title}),ue!=null&&ue.waitReason?c.jsx("p",{className:"text-xs text-amber-200/80 truncate",title:ue.waitReason,children:ue.waitReason}):R.currentIntent&&c.jsx("p",{className:"text-xs text-white/50 truncate",children:R.currentIntent})]}),c.jsx("span",{className:"text-xs text-white/40 capitalize shrink-0",children:R.currentOwner}),ue&&c.jsxs("span",{className:"text-xs px-2 py-0.5 rounded border border-cyber-teal/40 text-cyber-teal shrink-0",title:ue.waitReason??"Next up for admission",children:["Queued #",ue.position]}),c.jsx(Ly,{status:R.status}),c.jsx("span",{className:"text-xs text-white/35 shrink-0 w-16 text-right",children:G2(R.updatedAt)})]},R.id)})}),u.totalPages>1&&c.jsxs("nav",{"aria-label":"Issues pages",className:"mt-3 flex items-center gap-2",children:[c.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded border border-white/15 text-white/70 hover:text-white disabled:opacity-40",disabled:u.page<=1,onClick:()=>ja(u.page-1),children:"Previous"}),c.jsxs("span",{className:"text-xs text-white/45 tabular-nums",children:["Page ",u.page," of ",u.totalPages]}),c.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded border border-white/15 text-white/70 hover:text-white disabled:opacity-40",disabled:u.page>=u.totalPages,onClick:()=>ja(u.page+1),children:"Next"})]})]})]})}const K2=["developer","reviewer","legacy"],bx=["claude_code","cursor_local","codex_local"],J2=["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"];function oi(n,i){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:i(n.p50),p95Text:n.p95===null?null:i(n.p95),sampleText:Sy(n.n),sampleTitle:`Sample size ${n.n}${hd(n.n)?" — fewer than 5 observations, compare with care":""}`,sparse:hd(n.n)}}function fa(n,i,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=i(n.sum),d=s!=null&&s.compact?ww(n.sum):u,f=n.known<n.total;return{available:!0,valueText:d,exactText:s!=null&&s.compact?u:null,noteText:f?`${Ge(n.known)}/${Ge(n.total)} known`:null,noteTitle:f?"Partial sample — missing provider metadata is excluded, never zero":null,incomplete:f}}function Ss(n,i,s){return n===null||i===0?{available:!1,valueText:"N/A",evidenceCounts:null,evidenceNoun:null,title:`No ${s} in this cohort`}:{available:!0,valueText:pu(n),evidenceCounts:`${Ge(Math.round(n*i))}/${Ge(i)}`,evidenceNoun:s,title:`Exact share over ${i} ${s}`}}function wx(n,i,s){const u=Ss(n,i,s);return u.available?{text:`${u.valueText} (${u.evidenceCounts} ${u.evidenceNoun})`,title:u.title}:{text:u.valueText,title:u.title}}function Xo(n){const i=wx(n.issueSuccess,n.issueSuccessDenominator,"closed"),s=wx(n.attemptSuccess,n.attemptSuccessDenominator,"terminal attempts");return{key:n.key,issuesText:Ge(n.issues),attemptsText:Ge(n.attempts),issueSuccessText:i.text,issueSuccessTitle:i.title,attemptSuccessText:s.text,attemptSuccessTitle:s.title,issueSuccessDisplay:Ss(n.issueSuccess,n.issueSuccessDenominator,"closed"),attemptSuccessDisplay:Ss(n.attemptSuccess,n.attemptSuccessDenominator,"terminal attempts"),wallText:dx(n.sessionWallMs,Vt),envelopeText:dx(n.spawnEnvelopeMs,Vt),retryText:n.retryRate===null?"N/A":pu(n.retryRate),retryTitle:"Extra attempts after a terminal attempt in the same issue/role/round ÷ attempts",tokensInText:Hn(n.tokensIn,Ge),tokensOutText:Hn(n.tokensOut,Ge),costText:Hn(n.costUsd,ps),costIncomplete:n.costUsd.known<n.costUsd.total,durationText:Hn(n.durationMs,Vt),failedCostText:Hn(n.failedCostUsd,ps),failedTokensText:`${Hn(n.failedTokensIn,Ge)} in · ${Hn(n.failedTokensOut,Ge)} out`,failedDurationText:Hn(n.failedDurationMs,Vt),wall:oi(n.sessionWallMs,Vt),envelope:oi(n.spawnEnvelopeMs,Vt),tokensIn:fa(n.tokensIn,Ge,{compact:!0}),tokensOut:fa(n.tokensOut,Ge,{compact:!0}),cost:fa(n.costUsd,ps),duration:fa(n.durationMs,Vt),failedCost:fa(n.failedCostUsd,ps),failedTokensIn:fa(n.failedTokensIn,Ge,{compact:!0}),failedTokensOut:fa(n.failedTokensOut,Ge,{compact:!0}),failedDuration:fa(n.failedDurationMs,Vt),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&&hd(n.attempts)}}function I2(n,i){const s=n.code==="unknown";return{code:n.code,domain:n.domain,countText:Ge(n.count),shareText:n.share===null?"N/A":pu(n.share),shareTitle:i>0?`${Ge(n.count)} of ${Ge(i)} 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 F2(n){const i=n.reduce((s,u)=>s+u.count,0);return n.map(s=>I2(s,i))}function W2(n){return`/issues/${n}`}function Sx(n,i){if(n!=null&&n.trim()&&/^\d{4}-\d{2}-\d{2}$/.test(n.trim()))return i?`${n.trim()}T23:59:59.999Z`:`${n.trim()}T00:00:00.000Z`}function jx(n){if(!n)return"";const i=n.match(/^(\d{4}-\d{2}-\d{2})/);return i?i[1]:""}function _x(n){const i=new URLSearchParams(n.startsWith("?")?n.slice(1):n),s=u=>{var d;return((d=i.get(u))==null?void 0:d.trim())??""};return{fromDate:jx(s("from")),toDate:jx(s("to")),repo:s("repo"),role:s("role"),runtime:s("runtime"),model:s("model"),status:s("status")}}function P2(n){const i=new URLSearchParams(n.startsWith("?")?n.slice(1):n),s=d=>{var m;const f=(m=i.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 eS(n,i,s){const u=new URLSearchParams(n.startsWith("?")?n.slice(1):n);u.set(i,s),u.delete("page"),u.delete("limit"),u.sort();const d=u.toString();return`/reports/execution${d?`?${d}`:""}`}function tS(n){return{from:Sx(n.fromDate,!1),to:Sx(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 Ko(n){return n===null?"N/A":pu(n)}function Ca({label:n,value:i,valueTitle:s,note:u}){return c.jsxs("div",{className:"rounded border border-white/10 bg-panel-elevated/60 px-4 py-3",children:[c.jsx("p",{className:"font-ui-display text-xs uppercase tracking-wide text-white/40",children:n}),c.jsx("div",{className:"mt-1 font-mono text-lg font-semibold text-white/90 tabular-nums",title:s,children:i}),u&&c.jsx("div",{className:"mt-0.5 font-ui-display text-xs text-white/40",children:u})]})}function uu({display:n,compact:i}){if(!n.available)return c.jsx("span",{className:"font-mono text-white/45",title:n.title,children:"N/A"});const s=i?"font-mono text-sm font-medium text-white/85 tabular-nums leading-tight whitespace-nowrap":"font-mono text-base sm:text-lg font-semibold text-white/90 tabular-nums leading-tight whitespace-nowrap";return c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",title:n.title,children:[c.jsx("span",{className:s,"aria-label":n.title,children:n.valueText}),c.jsxs("span",{className:"font-ui-display min-w-0 break-words text-xs text-white/40",children:["(",c.jsx("span",{className:"font-mono tabular-nums",children:n.evidenceCounts})," ",n.evidenceNoun,")"]})]})}function xs({display:n,compact:i}){if(!n.available)return c.jsx("span",{className:"font-mono text-white/45",children:"N/A"});const s=i?"font-ui-display text-[11px] uppercase tracking-wide text-white/40":"font-ui-display text-xs uppercase tracking-wide text-white/40",u=i?"font-mono text-sm font-medium text-white/85 tabular-nums":"font-mono text-base font-semibold text-white/90 tabular-nums";return c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-3 gap-y-0.5",children:[c.jsxs("span",{className:"inline-flex items-baseline gap-x-1.5",children:[c.jsx("span",{className:s,children:"P50"}),c.jsx("span",{className:u,children:n.p50Text??"N/A"})]}),c.jsxs("span",{className:"inline-flex items-baseline gap-x-1.5",children:[c.jsx("span",{className:s,children:"P95"}),c.jsx("span",{className:u,children:n.p95Text??"N/A"})]}),c.jsx("span",{className:"font-ui-display text-xs text-white/40",title:n.sampleTitle,children:n.sampleText})]})}function ha({display:n,compact:i}){if(!n.available)return c.jsx("span",{className:"font-mono text-white/45",children:"N/A"});const s=n.exactText??n.valueText,u=i?"font-mono text-sm font-medium text-white/85 tabular-nums":"font-mono text-base font-semibold text-white/90 tabular-nums";return c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",children:[c.jsx("span",{className:u,title:s,"aria-label":s,children:n.valueText}),n.noteText&&c.jsx("span",{className:"font-ui-display text-xs text-white/40",title:n.noteTitle??void 0,children:n.noteText})]})}function Jo({caption:n,dimension:i,rows:s,cohortLink:u}){return s.length===0?c.jsxs("div",{className:"rounded border border-white/10 bg-panel-elevated/60 px-4 py-3",children:[c.jsx("h4",{className:"font-ui-display text-sm font-medium text-white/80",children:n}),c.jsx("p",{className:"font-ui-display mt-1 text-sm text-white/45",children:"No attempts in this dimension for these filters."})]}):c.jsx("div",{className:"rounded border border-white/10 bg-panel-elevated/60 overflow-x-auto",children:c.jsxs("table",{className:"w-full min-w-[1440px] text-sm",children:[c.jsxs("caption",{className:"sr-only",children:[n," — sorted by name, never by cost"]}),c.jsx("thead",{children:c.jsxs("tr",{className:"font-ui-display text-left text-xs uppercase tracking-wide text-white/40 border-b border-white/10",children:[c.jsx("th",{scope:"col",className:"px-4 py-2 font-medium",children:n}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Issues"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Attempts"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Issue success"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Attempt success"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Session wall P50/P95"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Retry rate"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Tokens in"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Tokens out"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Cost"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Duration"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Failed cost"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Failed tokens"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Failed runtime"})]})}),c.jsx("tbody",{className:"divide-y divide-white/5",children:s.map(d=>c.jsxs("tr",{className:"tabular-nums",children:[c.jsxs("th",{scope:"row",className:"px-4 py-2 text-left font-mono font-medium text-white/85",children:[u?c.jsx(ya,{to:u(i,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 ${i} ${d.key}`,children:d.key}):d.key,d.sparse&&c.jsx("span",{className:"font-ui-display ml-2 text-xs font-normal text-amber-200/80",title:"Fewer than 5 attempts — compare with care",children:"sparse"})]}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:d.issuesText}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:d.attemptsText}),c.jsx("td",{className:"px-3 py-2 text-white/75",title:d.issueSuccessTitle,children:c.jsx(uu,{display:d.issueSuccessDisplay,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",title:d.attemptSuccessTitle,children:c.jsx(uu,{display:d.attemptSuccessDisplay,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(xs,{display:d.wall,compact:!0})}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",title:d.retryTitle,children:d.retryText}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ha,{display:d.tokensIn,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ha,{display:d.tokensOut,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ha,{display:d.cost,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ha,{display:d.duration,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ha,{display:d.failedCost,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-1.5",children:[c.jsx(ha,{display:d.failedTokensIn,compact:!0}),c.jsx("span",{className:"font-ui-display text-xs text-white/40",children:"in"}),c.jsx("span",{className:"font-ui-display text-xs text-white/40",children:"·"}),c.jsx(ha,{display:d.failedTokensOut,compact:!0}),c.jsx("span",{className:"font-ui-display text-xs text-white/40",children:"out"})]})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ha,{display:d.failedDuration,compact:!0})})]},d.key))})]})})}const aS={fromDate:"",toDate:"",repo:"",role:"",runtime:"",model:"",status:""};function nS({loading:n,error:i,report:s,onRetry:u,cohortLink:d}){const f=(s==null?void 0:s.summary)??null,m=S.useMemo(()=>s?F2(s.failures):[],[s]),y=S.useMemo(()=>s?s.failures.reduce((v,g)=>v+g.count,0):0,[s]);return c.jsxs("div",{"aria-live":"polite",children:[n&&c.jsx("p",{role:"status",className:"text-sm text-white/50",children:"Loading execution report…"}),!n&&i&&c.jsxs("div",{className:"rounded border border-red-400/30 bg-red-500/10 px-4 py-3",role:"alert",children:[c.jsxs("p",{className:"font-ui-display text-sm text-red-200",children:["Couldn’t load the execution report: ",i]}),c.jsx("button",{type:"button",className:"font-ui-display mt-2 px-3 py-1.5 text-sm rounded border border-red-300/40 text-red-100 hover:bg-red-500/20",onClick:u,children:"Retry"})]}),!n&&!i&&s&&f&&c.jsxs("div",{className:"space-y-6",children:[s.meta.partial&&c.jsxs("div",{className:"rounded border border-amber-300/30 bg-amber-400/10 px-4 py-3",children:[c.jsx("p",{className:"font-ui-display text-sm text-amber-100 font-medium",children:"Partial metadata"}),c.jsx("ul",{className:"font-ui-display mt-1 list-disc list-inside text-sm text-amber-100/80",children:s.meta.partialReasons.map(v=>c.jsx("li",{children:v},v))})]}),f.issues===0?c.jsx("p",{className:"font-ui-display text-sm text-white/45",children:"No issues match these filters in this window. Widen the date range or clear filters."}):c.jsxs(c.Fragment,{children:[c.jsx("section",{"aria-label":"Summary",children:c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-3",children:[c.jsx(Ca,{label:"Issue success",value:c.jsx(uu,{display:Ss(f.issueSuccess,f.closedIssues,"closed")}),valueTitle:`done / (done + closed), denominator ${f.closedIssues}`,note:`${Ge(f.issues)} issues · ${Ge(f.closedIssues)} closed`}),c.jsx(Ca,{label:"Attempt success",value:c.jsx(uu,{display:Ss(f.attemptSuccess,f.terminalAttempts,"terminal")}),valueTitle:`done sessions / terminal sessions, denominator ${f.terminalAttempts}`,note:`${Ge(f.attempts)} attempts · ${Ge(f.terminalAttempts)} terminal`}),c.jsx(Ca,{label:"Retry rate",value:Ko(f.retryRate),valueTitle:`${f.retryExtraAttempts} extra attempts after a terminal attempt in the same issue/role/round ÷ ${f.attempts} attempts`,note:`Reuse rate ${Ko(f.reuseRate)} over ${Ge(f.reuseDenominator)} reviewer sessions with input SHA`}),c.jsx(Ca,{label:"Human wait",value:Vt(f.humanWaitMs),note:`${Ge(f.interventions)} interventions`}),c.jsx(Ca,{label:"Session wall P50/P95",value:c.jsx(xs,{display:oi(f.sessionWallMs,Vt)}),note:"Session bookkeeping proxy — never CLI runtime"}),c.jsx(Ca,{label:"Spawn envelope P50/P95",value:c.jsx(xs,{display:oi(f.spawnEnvelopeMs,Vt)}),note:"Coordinator-measured; includes slot wait + post-exit work"}),c.jsx(Ca,{label:"Checkpoint latency P50/P95",value:c.jsx(xs,{display:oi(f.checkpointMs,Vt)}),note:"Session start → first heartbeat"}),c.jsx(Ca,{label:"Reviewer rounds (avg)",value:f.avgReviewerRounds===null?"N/A":f.avgReviewerRounds.toFixed(1),note:`Change-request rate ${Ko(f.changeRequestRate)} over ${Ge(f.reviewedIssues)} reviewed`})]})}),c.jsxs("section",{"aria-label":"Failed-attempt waste",children:[c.jsx("h3",{className:"font-ui-display text-sm font-medium text-white/80 mb-2",children:"Failed-attempt waste (known values only)"}),c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[c.jsx(Ca,{label:"Failed cost",value:c.jsx(ha,{display:fa(f.failedCostUsd,ps)})}),c.jsx(Ca,{label:"Failed tokens",value:c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",children:[c.jsx(ha,{display:fa(f.failedTokensIn,Ge,{compact:!0})}),c.jsx("span",{className:"font-ui-display text-xs font-normal text-white/40",children:"in"}),c.jsx("span",{className:"font-ui-display text-xs font-normal text-white/40",children:"·"}),c.jsx(ha,{display:fa(f.failedTokensOut,Ge,{compact:!0})}),c.jsx("span",{className:"font-ui-display text-xs font-normal text-white/40",children:"out"})]})}),c.jsx(Ca,{label:"Failed runtime",value:c.jsx(ha,{display:fa(f.failedDurationMs,Vt)})})]})]}),c.jsxs("section",{"aria-label":"Phase wall time",children:[c.jsx("h3",{className:"font-ui-display text-sm font-medium text-white/80 mb-2",children:"Phase wall time"}),c.jsx("p",{className:"font-ui-display text-xs text-white/40 mb-2",children:"Composed from the execution-analysis read model over the same issues: exact when agent start/complete events are recorded, inferred usage-envelope backfill otherwise. Rows without evidence read N/A — never a guess. See per-row reasons."}),c.jsx("div",{className:"rounded border border-white/10 bg-panel-elevated/60 overflow-x-auto",children:c.jsxs("table",{className:"w-full min-w-[560px] text-sm",children:[c.jsx("caption",{className:"sr-only",children:"Exclusive phase wall times. Boundaries without defensible evidence are N/A."}),c.jsx("thead",{children:c.jsxs("tr",{className:"font-ui-display text-left text-xs uppercase tracking-wide text-white/40 border-b border-white/10",children:[c.jsx("th",{scope:"col",className:"px-4 py-2 font-medium",children:"Phase"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"P50 / P95"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Why"})]})}),c.jsx("tbody",{className:"divide-y divide-white/5",children:f.phaseWallMs.map(v=>c.jsxs("tr",{className:"tabular-nums",children:[c.jsx("th",{scope:"row",className:"px-4 py-2 text-left font-mono font-medium text-white/85",children:v.phase}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(xs,{display:oi(v.stat,Vt),compact:!0})}),c.jsx("td",{className:"font-ui-display px-3 py-2 text-xs text-white/45",children:v.stat.reasons.join(", ")})]},v.phase))})]})})]}),c.jsxs("section",{"aria-label":"Comparisons",className:"space-y-4",children:[c.jsxs("h3",{className:"font-ui-display text-sm font-medium text-white/80",children:["Comparisons ",c.jsx("span",{className:"font-normal text-white/40",children:"— sorted by name, never by cost"})]}),c.jsx(Jo,{caption:"By role",dimension:"role",rows:s.byRole.map(Xo),cohortLink:d}),c.jsx(Jo,{caption:"By runtime",dimension:"runtime",rows:s.byRuntime.map(Xo),cohortLink:d}),c.jsx(Jo,{caption:"By model",dimension:"model",rows:s.byModel.map(Xo),cohortLink:d})]}),c.jsxs("section",{"aria-label":"Why attempts failed",children:[c.jsx("h3",{className:"font-ui-display text-sm font-medium text-white/80 mb-2",children:"Why attempts failed"}),c.jsxs("p",{className:"font-ui-display text-xs text-white/40 mb-2",children:["Each issue with a failed attempt is counted once using its primary actionable cause, and may later have recovered. Share is over"," ",Ge(y)," failed ",y===1?"issue":"issues"," in scope."]}),m.length===0?c.jsx("p",{className:"font-ui-display text-sm text-white/45",children:"No failed attempts in this window."}):c.jsx("div",{className:"rounded border border-white/10 bg-panel-elevated/60 overflow-x-auto",children:c.jsxs("table",{className:"w-full min-w-[560px] text-sm",children:[c.jsx("caption",{className:"sr-only",children:"Why attempts failed: each issue counted once by primary cause. Cause not recorded is its own bucket and is never promoted."}),c.jsx("thead",{children:c.jsxs("tr",{className:"font-ui-display text-left text-xs uppercase tracking-wide text-white/40 border-b border-white/10",children:[c.jsx("th",{scope:"col",className:"px-4 py-2 font-medium",children:"Failure"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Domain"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Issues"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Share"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Example issues"})]})}),c.jsx("tbody",{className:"divide-y divide-white/5",children:m.map(v=>c.jsxs("tr",{className:v.isUnknown?"bg-amber-400/5 tabular-nums":"tabular-nums",children:[c.jsxs("th",{scope:"row",className:"px-4 py-2 text-left text-white/85",children:[c.jsx("span",{className:"font-ui-display block font-medium",title:v.code,children:v.displayCode}),c.jsx("span",{className:`font-ui-display block text-xs font-normal ${v.isUnknown?"text-amber-200/90":"text-white/40"}`,children:v.displayNote})]}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:v.domain}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:v.countText}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",title:v.shareTitle,children:v.shareText}),c.jsx("td",{className:"px-3 py-2",children:c.jsxs("span",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[v.issueIds.map(g=>c.jsx(ya,{to:W2(g),className:"text-cyber-teal hover:underline font-mono text-xs",children:g.slice(0,8)},g)),v.hiddenIssueCount>0&&c.jsxs("span",{className:"font-ui-display text-xs text-white/40",children:["+",v.hiddenIssueCount," more"]})]})})]},v.code))})]})})]})]})]})]})}function lS(){const[n,i]=ey(),s=n.toString(),u=S.useMemo(()=>P2(s),[s]),[d,f]=S.useState(()=>_x(s)),[m,y]=S.useState(null),[v,g]=S.useState(!0),[b,N]=S.useState(null),[z,K]=S.useState(0);S.useEffect(()=>{f(_x(s))},[s]),S.useEffect(()=>{let M=!1;return g(!0),N(null),Pw(u).then(Y=>{M||(y(Y),g(!1))}).catch(Y=>{M||(N(Y instanceof Error?Y.message:String(Y)),g(!1))}),()=>{M=!0}},[s,z]);const O=M=>{const Y=wy(tS(M));i(Y?Object.fromEntries(new URLSearchParams(Y)):{})},$=M=>f(Y=>({...Y,...M}));return c.jsxs("div",{className:"flex-1 min-h-0 px-6 py-4 w-full overflow-y-auto",children:[c.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-2 mb-1",children:[c.jsx("h2",{className:"font-ui-display text-lg font-semibold text-white/90",children:"Execution report"}),m&&c.jsxs("p",{className:"font-ui-display text-xs text-white/40",children:["Window ",new Date(m.window.from).toLocaleDateString()," –"," ",new Date(m.window.to).toLocaleDateString()," · generated"," ",new Date(m.meta.generatedAt).toLocaleTimeString()]})]}),c.jsx("p",{className:"font-ui-display text-sm text-white/50 mb-4",children:"Reliability, latency, retry waste, and metadata coverage by role, runtime, and model. Missing cost/token data reads as N/A — never as zero."}),c.jsx("form",{"aria-label":"Report filters",className:"mb-4 p-4 rounded border border-white/10 bg-panel-elevated/60",onSubmit:M=>{M.preventDefault(),O(d)},children:c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"From"}),c.jsx("input",{type:"date",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.fromDate,onChange:M=>$({fromDate:M.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"To"}),c.jsx("input",{type:"date",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.toDate,onChange:M=>$({toDate:M.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Repository"}),c.jsx("input",{type:"text",placeholder:"github.com/owner/repo",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.repo,onChange:M=>$({repo:M.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Role"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.role,onChange:M=>$({role:M.target.value}),children:[c.jsx("option",{value:"",children:"All roles"}),K2.map(M=>c.jsx("option",{value:M,children:M},M))]})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Runtime"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.runtime,onChange:M=>{$({runtime:M.target.value})},children:[c.jsx("option",{value:"",children:"All runtimes"}),bx.map(M=>c.jsx("option",{value:M,children:M},M)),c.jsx("option",{value:"unknown",children:"unknown (missing metadata)"}),d.runtime&&!bx.includes(d.runtime)&&c.jsxs("option",{value:d.runtime,children:[d.runtime," (from URL)"]})]})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Model"}),c.jsx("input",{type:"text",placeholder:"Any model",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.model,onChange:M=>$({model:M.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Issue status"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.status,onChange:M=>$({status:M.target.value}),children:[c.jsx("option",{value:"",children:"All statuses"}),J2.map(M=>c.jsx("option",{value:M,children:M},M))]})]}),c.jsxs("div",{className:"flex items-end gap-2",children:[c.jsx("button",{type:"submit",className:"btn-gold px-4",children:"Apply"}),c.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm text-white/60 hover:text-white",onClick:()=>{f(aS),i({})},children:"Reset"})]})]})}),c.jsx(nS,{loading:v,error:b,report:m,onRetry:()=>K(M=>M+1),cohortLink:(M,Y)=>eS(s,M,Y)})]})}function Nx(n,i){var d;if(!n)return"Not assigned";const s=i.find(f=>f.id===n);if(!s)return"Unavailable — profile removed";const u=`${s.name} · ${pa(s.runtime)}`;return s.healthy?u:`${u} (unhealthy: ${((d=s.issues[0])==null?void 0:d.message)??"needs attention"})`}function Ax(n,i){var u;if(!n)return;const s=i.find(d=>d.id===n);return s?`${s.name} · ${pa(s.runtime)}${s.healthy?" · healthy":` · ${((u=s.issues[0])==null?void 0:u.message)??"unhealthy"}`}`:`Configured profile ${n} is not on record (deleted?)`}function iS({agents:n,initialRepo:i,initialDeveloperId:s,initialReviewerId:u,busy:d,onSave:f,onCancel:m}){var ne,pe;const[y,v]=S.useState(i),[g,b]=S.useState(s??""),[N,z]=S.useState(u??""),K=zy(n),O=n.find(I=>I.id===g),$=n.find(I=>I.id===N),M=su(O),Y=su($),J=y.trim()===i&&g===(s??"")&&N===(u??"");return c.jsxs("div",{className:"p-3 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[c.jsx("p",{className:"text-xs text-white/50",children:"Edit configuration — repository, developer, and reviewer save together. Queue position is kept, readiness and the wait reason are rechecked, and the change is recorded on the timeline."}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Repository"}),c.jsx("input",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:y,disabled:d,placeholder:"GitHub URL or owner/repo",title:"GitHub URL or owner/repo — normalized to github.com/owner/repo, same validation as issue creation",onChange:I=>v(I.target.value)})]}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Developer"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:g,disabled:d,title:O?`${O.name} · ${pa(O.runtime)}${O.healthy?" · healthy":` · ${((ne=O.issues[0])==null?void 0:ne.message)??"unhealthy"}`}`:"Pick a developer agent",onChange:I=>b(I.target.value),children:[c.jsx("option",{value:"",children:"Developer agent…"}),K.map(I=>c.jsx("option",{value:I.id,title:Yn(I),children:(I.healthy?"● ":"○ ")+Yn(I)},I.id))]}),M&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:M})]}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Reviewer"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:N,disabled:d,title:$?`${$.name} · ${pa($.runtime)}${$.healthy?" · healthy":` · ${((pe=$.issues[0])==null?void 0:pe.message)??"unhealthy"}`}`:"Pick a reviewer agent",onChange:I=>z(I.target.value),children:[c.jsx("option",{value:"",children:"Reviewer agent…"}),K.map(I=>I.runtime==="muse_code"?c.jsx("option",{value:I.id,disabled:!0,title:"Muse Code cannot be a reviewer (developer role only)",children:`○ ${I.name} · ${pa(I.runtime)} — reviewer not supported`},I.id):c.jsx("option",{value:I.id,title:Yn(I),children:(I.healthy?"● ":"○ ")+Yn(I)},I.id))]}),Y&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:Y})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-1.5 text-sm disabled:opacity-50",disabled:d||!y.trim()||!g||!N||J,title:"Save via the issue PATCH contract — keeps queue position, rechecks readiness and the wait reason",onClick:()=>f(y.trim(),g,N),children:"Save configuration"}),c.jsx("button",{type:"button",className:"px-4 py-1.5 text-sm text-white/60 hover:text-white disabled:opacity-50",disabled:d,onClick:m,children:"Cancel"})]})]})}function sS({issue:n,agents:i,canEdit:s,editing:u,busy:d,onBeginEdit:f,onSave:m,onCancel:y}){return c.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-white/[0.03] space-y-1.5",children:[c.jsx("p",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Configuration"}),c.jsxs("p",{className:"text-sm text-white/85",title:`Exact repository identity: ${n.repo}`,children:[c.jsx("span",{className:"text-white/45",children:"Repository "}),n.repo]}),c.jsxs("p",{className:"text-sm text-white/85",title:Ax(n.developerAgentId,i),children:[c.jsx("span",{className:"text-white/45",children:"Developer "}),Nx(n.developerAgentId,i)]}),c.jsxs("p",{className:"text-sm text-white/85",title:Ax(n.reviewerAgentId,i),children:[c.jsx("span",{className:"text-white/45",children:"Reviewer "}),Nx(n.reviewerAgentId,i)]}),s&&!u&&c.jsx("button",{type:"button",className:"text-xs text-cyber-teal hover:underline disabled:opacity-50",disabled:d,onClick:f,children:"Edit configuration"}),s&&u&&c.jsx(iS,{agents:i,initialRepo:n.repo,initialDeveloperId:n.developerAgentId,initialReviewerId:n.reviewerAgentId,busy:d,onSave:m,onCancel:y})]})}function Yr(n){return n==="developer"?"Developer":n==="reviewer"?"Reviewer":"Worker"}const Io={"issue.created":()=>"Issue created","issue.reassigned":()=>"Configuration updated","workflow.started":()=>"Workflow started","worker.started":n=>`${Yr(n.actorType)} started${n.round?` (round ${n.round})`:""}`,"worker.completed":n=>`${Yr(n.actorType)} finished${n.round?` (round ${n.round})`:""}`,"worker.failed":n=>`${Yr(n.actorType)} failed${n.round?` (round ${n.round})`:""}`,"worker.deferred":n=>{var i;return((i=ys(n.payloadJson))==null?void 0:i.outcome)==="deck_unavailable"?`Waiting for Agent Deck${n.round?` (round ${n.round})`:""}`:`${Yr(n.actorType)} deferred${n.round?` (round ${n.round})`:""}`},"worktree.ready":()=>"Worktree ready","deck.connected":()=>"Deck connected","brief.resolved":()=>"Brief resolved","branch.pushed":()=>"Branch pushed","checks.started":()=>"Checks started","pull_request.opened":()=>"Developer opened the PR","pull_request.updated":()=>"Developer updated the PR","checks.completed":()=>"Checks completed","review.submitted":()=>"Reviewer submitted a review","repair.started":n=>`Repair round ${n.round??"?"} started`,"guidance.added":()=>"Guidance added","task_snapshot.refreshed":()=>"Task snapshot refreshed","human_action.requested":()=>"Human action requested","human_action.resolved":()=>"Human action resolved","final_review.requested":()=>"Final review requested","issue.completed":()=>"Issue completed","issue.closed":()=>"Issue closed"};function ys(n){if(!n)return null;try{return JSON.parse(n)}catch{return null}}const rS={approved:"text-cyber-teal",changes_requested:"text-amber-300",escalated:"text-red-300"};function uS({e:n}){var i;if(n.type==="pull_request.opened"||n.type==="pull_request.updated"){const s=ys(n.payloadJson);return n.artifactRef?c.jsxs("a",{href:n.artifactRef,target:"_blank",rel:"noreferrer",className:"text-sm text-cyber-teal hover:underline",children:["PR ",s!=null&&s.prNumber?`#${s.prNumber}`:""," ",s!=null&&s.branch?`(${s.branch})`:""]}):null}if(n.type==="review.submitted"){const s=ys(n.payloadJson);return s?c.jsxs("span",{className:"text-sm",children:[c.jsx("span",{className:rS[s.verdict]??"text-white/70",children:s.verdict.replace("_"," ")}),(i=s.findings)!=null&&i.length?` · ${s.findings.length} finding(s)`:""]}):null}if(n.type==="guidance.added"){const s=ys(n.payloadJson);return s!=null&&s.markdown?c.jsxs("span",{className:"text-sm text-white/55 italic",children:["— ",s.markdown]}):null}if(n.type==="worker.started"||n.type==="worker.completed"||n.type==="worker.failed"||n.type==="worker.deferred"||n.type==="worktree.ready"||n.type==="deck.connected"||n.type==="brief.resolved"||n.type==="branch.pushed"||n.type==="checks.started"||n.type==="checks.completed"){const s=ys(n.payloadJson);if(!s)return null;const u=[];return s.runtime&&u.push(s.runtime),s.model&&u.push(s.model),s.sessionId&&u.push(s.sessionId.slice(0,8)),s.worktreePath&&u.push(s.worktreePath),s.resolution&&u.push(s.resolution),s.branch&&u.push(s.branch),s.commitsAhead!=null&&u.push(`${s.commitsAhead} ahead`),s.snapshot&&u.push(s.snapshot),(n.type==="worker.deferred"||n.type==="worker.failed")&&(s.reason&&u.push(s.reason),n.type==="worker.deferred"&&s.until&&u.push(`until ${new Date(s.until).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`)),u.length===0?null:c.jsxs("span",{className:"text-xs text-white/40",children:["· ",u.join(" · ")]})}return null}function cS(n){var i;return((i=Io[n.type])==null?void 0:i.call(Io,n))??n.type}const Ex={human:"You",system:"System",developer:"Developer",reviewer:"Reviewer"},oS={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 dS(n){return n.actorRef?`${Ex[n.actorType]} · ${n.actorRef}`:Ex[n.actorType]}function fS({events:n}){return n.length===0?c.jsx("p",{className:"text-white/40 text-sm",children:"No activity yet."}):c.jsx("div",{className:"space-y-1",children:n.map(i=>c.jsxs("div",{className:"flex items-baseline gap-3 py-1.5 border-b border-white/5 last:border-0",children:[c.jsx("span",{className:"text-xs text-white/35 w-20 shrink-0 tabular-nums",children:new Date(i.ts).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),c.jsx("span",{className:`text-[11px] leading-none px-1.5 py-0.5 rounded shrink-0 ${oS[i.actorType]}`,children:dS(i)}),c.jsx("span",{className:"text-sm text-white/80",children:cS(i)}),c.jsx(uS,{e:i})]},i.id))})}function Ta(n){if(n==null||!Number.isFinite(n))return null;if(n<1e3)return"<1s";const i=Math.round(n/1e3);if(i<60)return`${i}s`;const s=Math.floor(i/60);if(s<60){const f=i%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 Cx(n){return n==null||!Number.isFinite(n)?null:`${Math.round(n).toLocaleString("en-US")} tokens`}function hS(n){return n==null||!Number.isFinite(n)?null:`$${n.toFixed(2)}`}const mS={queue_wait:"Queue / admission wait",coordinator_setup:"Setup",agent_process:"Agent process",coordinator_validation_publish:"Validation / publish",coordinator_work:"Coordinator work"},Tx={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"},yd={worktree:"worktree",commit:"commit",verification_receipt:"verification receipt",publish_only:"publish-only result"},pS=new Set(["failed","timed_out","error"]);function zd(n){return n.replace(/_/g," ")}function js(n,i){const s=`Evidence quality: ${n}`;return i.length>0?`${s} — ${i.join(", ")}`:s}function ma({quality:n,reasons:i}){return c.jsxs("span",{className:`text-[11px] tabular-nums ${n==="exact"?"text-white/60":n==="inferred"?"text-amber-300/90":"text-white/60 italic"}`,title:js(n,i),children:["· ",n,i.length>0&&c.jsxs("span",{className:"sr-only",children:[" (",i.join(", "),")"]})]})}function Vn({reasons:n}){const i=n.length>0?n.join(", "):"no reason recorded";return c.jsxs("span",{className:"text-white/45 italic",title:`Unavailable — ${i}`,children:["Unavailable",c.jsxs("span",{className:"text-[11px]",children:[" — ",i]})]})}function Zr({covered:n,format:i,unit:s}){if(n.value==null)return c.jsx(Vn,{reasons:n.reasons});const u=n.known<n.total;return c.jsxs("span",{title:`${js(n.quality,n.reasons)} · known ${n.known} of ${n.total} ${s}`,children:[i(n.value),c.jsx(ma,{quality:n.quality,reasons:n.reasons}),u&&c.jsxs("span",{className:"text-[11px] text-white/60",title:`Known for ${n.known} of ${n.total} ${s}`,children:[" ","(known ",n.known," of ",n.total,")"]})]})}function Rx({cause:n,primary:i}){return c.jsxs("div",{className:i?"p-2.5 rounded border border-red-400/30 bg-red-500/10 space-y-1":"p-2 rounded border border-white/10 bg-white/[0.02] space-y-1",children:[c.jsxs("p",{className:i?"text-sm font-medium text-red-200":"text-xs text-white/60",children:[i?"First failure: ":"Consequence: ",zd(n.code)]}),c.jsx("p",{className:i?"text-sm text-white/85 whitespace-pre-wrap break-words":"text-xs text-white/55 whitespace-pre-wrap break-words",children:n.rawReason}),c.jsxs("p",{className:"text-[11px] text-white/60",title:js(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 xS({interval:n}){const i=Tx[n.category??"unknown"]??Tx.unknown,s=Ta(n.durationMs),u=n.category==="host_suspended";return c.jsxs("li",{className:`flex flex-wrap items-baseline gap-x-2 gap-y-0.5 py-1 border-b border-white/5 last:border-0 ${u?"text-amber-200/90":"text-white/70"}`,children:[c.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded border shrink-0 ${u?"border-amber-400/40 bg-amber-500/10":"border-white/15 bg-white/5"}`,title:u?"Overlapping durable host-sleep evidence split this gap — the host was suspended, not the agent.":"Observational gap with no new structured activity — not a diagnosis of what the agent was doing.",children:i}),c.jsx("span",{className:"text-xs tabular-nums",children:s??c.jsx(Vn,{reasons:n.reasons})}),c.jsx(ma,{quality:n.quality,reasons:n.reasons})]})}function yS({attempt:n}){const i=n.reuseKinds;return i===void 0?c.jsx("span",{className:"ml-2 text-[11px] px-1.5 py-0.5 rounded border border-white/15 bg-white/5 text-white/60 italic",title:"Reuse unknown for this retry — no reuse evidence recorded.",children:"reuse unknown"}):i.length===0?c.jsx("span",{className:"ml-2 text-[11px] px-1.5 py-0.5 rounded border border-white/15 bg-white/5 text-white/60",title:"Cold retry — no prior worktree, commit, or verification was reused.",children:"cold retry"}):c.jsx(c.Fragment,{children:i.map(s=>c.jsxs("span",{className:"ml-2 text-[11px] px-1.5 py-0.5 rounded border border-cyber-teal/40 bg-cyber-teal/10 text-cyber-teal",title:`This retry preserved the prior ${yd[s]??s} instead of starting cold.`,children:["reused ",yd[s]??s]},s))})}function vS({attempt:n,isRetry:i}){const s=Ta(n.setup.durationMs),u=Ta(n.agentProcess.durationMs),d=Ta(n.validationPublish.durationMs),f=i&&n.role==="developer";return c.jsxs("li",{className:"py-1.5 border-b border-white/5 last:border-0 space-y-0.5",children:[c.jsxs("p",{className:"text-sm text-white/85",children:[c.jsx("span",{className:"capitalize",children:n.role}),c.jsxs("span",{className:"text-white/45",children:[n.runtime?` · ${n.runtime}`:"",n.model?` · ${n.model}`:"",` · round ${n.round} · ${n.status}`]}),n.publishOnly&&c.jsx("span",{className:"ml-2 text-[11px] px-1.5 py-0.5 rounded border border-cyber-violet/40 bg-cyber-violet/10 text-cyber-violet-light",title:"Publish-only attempt: no agent process ran — the coordinator published prior work.",children:"publish-only"}),f&&!n.publishOnly&&c.jsx(yS,{attempt:n})]}),c.jsxs("p",{className:"text-xs text-white/50 tabular-nums",children:[c.jsxs("span",{title:s?void 0:`Setup unavailable — ${n.setup.reasons.join(", ")||"no reason recorded"}`,children:["Setup ",s??c.jsxs("span",{className:"italic",children:["Unavailable — ",n.setup.reasons.join(", ")||"no reason recorded"]})]}),c.jsx(ma,{quality:n.setup.quality,reasons:n.setup.reasons})," · ",c.jsxs("span",{title:u?void 0:`Agent process unavailable — ${n.agentProcess.reasons.join(", ")||"no reason recorded"}`,children:["Agent ",u??c.jsxs("span",{className:"italic",children:["Unavailable — ",n.agentProcess.reasons.join(", ")||"no reason recorded"]})]}),c.jsx(ma,{quality:n.agentProcess.quality,reasons:n.agentProcess.reasons})," · ",c.jsxs("span",{title:d?void 0:`Validation/publish unavailable — ${n.validationPublish.reasons.join(", ")||"no reason recorded"}`,children:["Validation/publish ",d??c.jsxs("span",{className:"italic",children:["Unavailable — ",n.validationPublish.reasons.join(", ")||"no reason recorded"]})]}),c.jsx(ma,{quality:n.validationPublish.quality,reasons:n.validationPublish.reasons})]}),n.failureCauses.length>0&&c.jsxs("p",{className:"text-[11px] text-white/60",children:["Failures: ",n.failureCauses.map(m=>zd(m.code)).join(", ")]})]})}function gS({analysis:n}){const i=Ta(n.elapsed.durationMs),s=Ta(n.exclusiveTotalMs),u=Ta(n.firstCheckpoint.msSinceWorkflowStart),d=n.nested.filter(O=>O.kind!=="unexplained_silence"),f=n.attempts.flatMap(O=>O.silence),m=n.attempts.length>0&&n.attempts.every(O=>O.silence.length===0&&O.silenceQuality==="unavailable"),y=n.attempts.filter(O=>O.silence.length===0&&O.silenceQuality==="unavailable"),v=n.waste.failedAttempts>0||n.waste.publishOnlyAttempts>0||n.attempts.some(O=>O.failureCauses.length>0||pS.has(O.status)),g=Ta(n.humanWaitMs),b=n.retry.reuseRate==null?null:`${Math.round(n.retry.reuseRate*100)}% reused`,z=(n.retry.preservedKinds??[]).map(O=>yd[O]??O),K=n.waste.failedAttempts>0||n.waste.publishOnlyAttempts>0;return c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{children:[c.jsxs("p",{className:"text-sm text-white/85 tabular-nums",children:["Elapsed ",i??c.jsx(Vn,{reasons:n.elapsed.reasons}),c.jsx(ma,{quality:n.elapsed.quality,reasons:n.elapsed.reasons})]}),c.jsxs("p",{className:"text-xs text-white/45 tabular-nums",title:"Unioned top-level phases with overlaps removed (human wait excluded). Nested waits below explain phases — they are never added to this total.",children:["Exclusive phase total ",s??c.jsx(Vn,{reasons:n.exclusiveTotalReasons}),c.jsx(ma,{quality:n.exclusiveTotalQuality,reasons:n.exclusiveTotalReasons}),c.jsx("span",{children:" · overlaps unioned, not summed"})]})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Phase breakdown"}),c.jsx("ul",{children:n.unionedDurations.map(O=>{const $=Ta(O.durationMs);return c.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-2 py-0.5 text-sm",children:[c.jsx("span",{className:"text-white/70 w-36 shrink-0",children:mS[O.phase]??O.phase}),c.jsx("span",{className:"text-white/85 tabular-nums",children:$??c.jsx(Vn,{reasons:O.reasons})}),c.jsx(ma,{quality:O.quality,reasons:O.reasons}),O.known<O.total&&c.jsxs("span",{className:"text-[11px] text-white/60",children:["(known ",O.known," of ",O.total,")"]})]},O.phase)})}),c.jsxs("p",{className:"text-xs text-white/45 tabular-nums mt-1",children:["Human wait ",g??c.jsx(Vn,{reasons:n.humanWaitReasons}),c.jsx(ma,{quality:n.humanWaitQuality,reasons:n.humanWaitReasons}),c.jsx("span",{title:"Human wait is tracked separately — it never adds to the phase total.",children:" · never additive"})]}),d.length>0&&c.jsx("ul",{className:"mt-1",children:d.map((O,$)=>c.jsxs("li",{className:"text-xs text-white/50 tabular-nums",children:[c.jsxs("span",{title:"Nested drill-down: explains its parent phase, never adds to the total.",children:["↳ ",O.kind==="human_wait"?"Human wait":O.category??O.kind]})," ",Ta(O.durationMs)??c.jsx(Vn,{reasons:O.reasons}),c.jsx(ma,{quality:O.quality,reasons:O.reasons})]},$))})]}),c.jsxs("div",{children:[c.jsxs("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:["Attempts (",n.attempts.length,")"]}),n.attempts.length===0?c.jsx("p",{className:"text-xs text-white/45 italic",children:"No attempts recorded yet."}):c.jsx("ul",{children:n.attempts.map((O,$)=>c.jsx(vS,{attempt:O,isRetry:$>0},O.sessionId))})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Failure"}),n.primaryFailure?c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(Rx,{cause:n.primaryFailure,primary:!0}),n.consequenceCauses.length>0&&c.jsx("div",{className:"space-y-1 opacity-80",children:n.consequenceCauses.map((O,$)=>c.jsx(Rx,{cause:O,primary:!1},`${O.code}-${$}`))})]}):v?c.jsxs("p",{className:"text-sm text-white/60 italic",title:js("unavailable",n.primaryFailureReasons),children:["Unknown — ",n.primaryFailureReasons.join(", ")||"no failure evidence recorded"]}):c.jsx("p",{className:"text-sm text-white/45",children:"No failure recorded."})]}),c.jsxs("div",{children:[c.jsxs("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:["Retry waste (",n.waste.failedAttempts," failed attempt",n.waste.failedAttempts===1?"":"s",")"]}),K?c.jsxs("p",{className:"text-sm text-white/85 flex flex-wrap gap-x-3 gap-y-0.5 tabular-nums",children:[c.jsxs("span",{title:"Failed-attempt agent-process time over known values only",children:["Runtime ",c.jsx(Zr,{covered:n.waste.runtimeMs,format:O=>Ta(Math.round(O))??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt input tokens over known values only",children:["In ",c.jsx(Zr,{covered:n.waste.tokensIn,format:O=>Cx(O)??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt output tokens over known values only",children:["Out ",c.jsx(Zr,{covered:n.waste.tokensOut,format:O=>Cx(O)??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt known cost over known values only",children:["Cost ",c.jsx(Zr,{covered:n.waste.costUsd,format:O=>hS(O)??"?",unit:"attempts"})]})]}):c.jsx("p",{className:"text-sm text-white/45",children:"No failed attempts — no retry waste."})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"First checkpoint"}),n.firstCheckpoint.msSinceWorkflowStart==null&&n.firstCheckpoint.kind==null?c.jsxs("p",{className:"text-sm text-white/60 italic",title:js(n.firstCheckpoint.quality,n.firstCheckpoint.reasons),children:["Unavailable — ",n.firstCheckpoint.reasons.join(", ")||"no checkpoint recorded"]}):c.jsxs("p",{className:"text-sm text-white/85 tabular-nums",children:[n.firstCheckpoint.kind?zd(n.firstCheckpoint.kind):"Checkpoint",n.firstCheckpoint.observedSha?` · ${n.firstCheckpoint.observedSha.slice(0,12)}`:"",u?` · ${u} after workflow start`:"",c.jsx(ma,{quality:n.firstCheckpoint.quality,reasons:n.firstCheckpoint.reasons})]})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Retry reuse"}),c.jsxs("div",{className:"flex flex-wrap gap-1.5",role:"group","aria-label":"Retry reuse summary",children:[c.jsxs("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-cyber-teal/40 bg-cyber-teal/10 text-cyber-teal",title:"Retries that preserved prior work — a reused worktree, commit, or verification receipt.",children:["Reused ",n.retry.reused]}),c.jsxs("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-white/15 bg-white/5 text-white/60",title:"Retries that started cold — no prior worktree, commit, or verification was reused.",children:["Cold ",n.retry.cold]}),n.retry.unknown>0&&c.jsxs("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-white/15 bg-white/5 text-white/60 italic",title:`Unknown reuse for ${n.retry.unknown} retr${n.retry.unknown===1?"y":"ies"} — ${n.retry.reasons.join(", ")||"no reuse evidence"}.`,children:["Unknown ",n.retry.unknown]}),n.retry.publishOnly>0&&c.jsxs("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-cyber-violet/40 bg-cyber-violet/10 text-cyber-violet-light",title:"Publish-only retries ran no agent process — the coordinator published already-verified work.",children:["Publish-only ",n.retry.publishOnly]}),c.jsxs("span",{className:"text-[11px] text-white/60 tabular-nums self-center",children:[n.retry.retries===0?"No retries":b??c.jsx(Vn,{reasons:n.retry.reasons}),c.jsx(ma,{quality:n.retry.quality,reasons:n.retry.reasons})]})]}),c.jsx("p",{className:"text-[11px] text-white/60 mt-0.5",children:n.retry.retries===0?"No retries — nothing to preserve.":z.length>0?`Preserved: ${z.join(", ")}.`:n.retry.unknown>0?`Preservation unknown for ${n.retry.unknown} retr${n.retry.unknown===1?"y":"ies"} — no reuse evidence.`:"No prior work preserved — every retry started cold."})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Silence"}),c.jsx("p",{className:"text-[11px] text-white/60 mb-1",children:"Silence is observational — gaps with no new structured activity. It describes what was observed, never a diagnosis."}),f.length===0?m?c.jsx("p",{className:"text-sm text-white/60 italic",children:"Unknown — silence cannot be derived without agent-process bounds."}):c.jsx("p",{className:"text-sm text-white/45",children:"No silence observed."}):c.jsxs(c.Fragment,{children:[c.jsx("ul",{"aria-label":"Observed silence intervals",children:f.map((O,$)=>c.jsx(xS,{interval:O},$))}),y.length>0&&c.jsx("ul",{"aria-label":"Attempts with unknown silence",className:"mt-1",children:y.map(O=>c.jsxs("li",{className:"text-[11px] text-white/60 italic py-0.5",children:["Silence unknown for attempt ",O.sessionId.length>12?`${O.sessionId.slice(0,8)}…`:O.sessionId," —"," ",O.silenceReasons.join(", ")||"no silence evidence recorded"]},O.sessionId))})]})]})]})}function bS({issueId:n}){const[i,s]=S.useState(null),[u,d]=S.useState(null),[f,m]=S.useState(!0);return S.useEffect(()=>{s(null),d(null),m(!0);let y=!1;return Yw(n).then(v=>{y||(s(v),m(!1))}).catch(v=>{y||(/not found/i.test(String(v))?(s(null),d(null)):d(String(v).replace(/^Error:\s*/i,"")),m(!1))}),()=>{y=!0}},[n]),c.jsxs("section",{"aria-labelledby":"execution-analysis-heading",className:"mb-4 p-3 rounded border border-white/10 bg-white/[0.03]",children:[c.jsx("h3",{id:"execution-analysis-heading",className:"font-ui-display text-sm font-medium text-white/85 mb-2",children:"Execution analysis"}),f&&c.jsx("p",{className:"text-xs text-white/40",children:"Loading execution analysis…"}),!f&&u&&c.jsx("p",{className:"text-xs text-red-300",children:u}),!f&&!u&&!i&&c.jsx("p",{className:"text-xs text-white/45",children:"No execution analysis yet — start the workflow to see where time goes."}),!f&&!u&&i&&c.jsx(gS,{analysis:i})]})}const wS="web";function SS(n){try{const i=JSON.parse(n);return typeof i.text=="string"?i.text:JSON.stringify(i,null,2)}catch{return n}}function Fo(n){const i=Math.floor(n/6e4);return i<60?`${i}m`:`${Math.floor(i/60)}h ${i%60}m`}function jS(n){if(!n)return"no heartbeat yet";const i=Math.max(0,Math.floor((Date.now()-new Date(n).getTime())/1e3));return i<5?"just now":i<60?`${i}s ago`:`${Math.floor(i/60)}m ago`}function vs(n){if(!n)return null;const i=n.split(/[/\\]/).filter(Boolean);return i.length<=2?n:i.slice(-2).join("/")}function Wo(n){var i;return[n.branch,n.tipLabel,(i=n.worktree)!=null&&i.path?vs(n.worktree.path):null].filter(Boolean).join(" · ")}function Po(n){var i;return[n.restartRisk?"restart risk":null,(i=n.worktree)!=null&&i.preserved?"dirty worktree preserved":null].filter(Boolean).map(s=>` · ${s}`).join("")}function ed(n){var i;return!!(n.restartRisk||(i=n.worktree)!=null&&i.preserved)}function _S(n,i){return!n||!i?!1:n===i?!0:n.includes(i)}function NS({busy:n,onConfirm:i,onCancel:s}){return c.jsxs("div",{className:"mt-2 p-3 rounded border border-red-400/30 bg-red-500/10 space-y-2",children:[c.jsx("p",{className:"text-sm text-white/90 font-medium",children:"Close this issue?"}),c.jsx("p",{className:"text-sm text-white/70",children:"It will not execute. Any queue entry will be removed. History is retained and can be found as closed work — filter the Issues list by status closed or open this page directly."}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"px-4 py-1.5 text-sm rounded border border-red-400/50 text-red-200 hover:bg-red-500/20 disabled:opacity-50",disabled:n,onClick:i,children:"Close issue"}),c.jsx("button",{type:"button",className:"font-ui-display px-4 py-1.5 text-sm text-white/60 hover:text-white",onClick:s,children:"Keep issue"})]})]})}function AS(n){const i=n.humanActions.find(s=>s.status==="open");if(i)return i.question;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 ES({issueId:n,detail:i,agents:s,onHumanActionsChanged:u,refresh:d,onError:f}){var ja;const[m,y]=S.useState(null),[v,g]=S.useState({}),[b,N]=S.useState(""),[z,K]=S.useState(!1),[O,$]=S.useState(""),[M,Y]=S.useState(""),[J,ne]=S.useState(""),[pe,I]=S.useState(!1),[Ee,X]=S.useState(null),[be,$e]=S.useState(!1),[gt,xt]=S.useState(!1),[et,Ct]=S.useState(null),He=Z=>f(String(Z)),{issue:ie,timeline:L,humanActions:F,usageSummary:oe,readiness:_e,humanWaitMs:Me,interventionCount:j,latestWorkflowInstance:B,activeWorkerSession:G,liveProgress:P,latestSessionFailure:re,branchTipStatus:ce,queued:Ce,queueEntry:nt}=i,fe=s.find(Z=>Z.id===ie.developerAgentId),ot=fe&&!fe.healthy,ea=((ja=fe==null?void 0:fe.issues[0])==null?void 0:ja.message)??"Developer agent is unhealthy",lt=B?new Date(B.completedAt??Date.now()).getTime()-new Date(B.startedAt).getTime():0,ga=F.filter(Z=>Z.status==="open"),ba=_e.ok===!1||ga.some(Z=>Z.actionType==="product_scope_decision"),wa=B!=null&&B.completedAt===null,Dt=ie.status==="ready"&&!wa,Ya=ie.status==="ready"&&!wa,Sa=G&&G.status==="running"&&(ie.status==="developing"||ie.status==="reviewing"||ie.status==="repairing"),Rt=!!re&&!Sa,Fe=async()=>{b.trim()&&(await Ww(n,b),N(""),d())},mn=()=>{$(ie.title),Y(ie.description??""),ne(ie.acceptanceCriteria??""),K(!0)},vl=async()=>{I(!0),f(null);try{await pd(n,{title:O.trim()||void 0,description:M.trim()||null,acceptanceCriteria:J.trim()||null}),K(!1),d()}catch(Z){He(Z)}finally{I(!1)}},gl=async()=>{I(!0),f(null);try{const Z=await Ty(n);X(Z.state==="admitted"?null:`Queued at position ${Z.position}${Z.waitReason?` — ${Z.waitReason}`:""}`),d()}catch(Z){He(Z)}finally{I(!1)}},yt=async()=>{I(!0),f(null);try{await Jw(n),d()}catch(Z){He(Z)}finally{I(!1)}},St=async()=>{I(!0),f(null);try{await Ry(n),X(null),$e(!1),d()}catch(Z){He(Z),d()}finally{I(!1)}},bl=async(Z,we,Ue)=>{I(!0),f(null);try{await pd(n,{repo:Z,developerAgentId:we,reviewerAgentId:Ue}),$e(!1),d()}catch(Qn){$e(!1),He(Qn),d()}finally{I(!1)}},wl=async()=>{I(!0),f(null);try{await ky(n),d()}catch(Z){He(Z)}finally{I(!1)}},pn=async()=>{I(!0),f(null);try{await Kw(n),xt(!1),Ct("Issue closed — it will not execute. History is retained and can be found as closed work."),d()}catch(Z){He(Z)}finally{I(!1)}},yi=async()=>{if(confirm("Abort this workflow? The current worker will stop and the issue will close. History and evidence are kept.")){I(!0),f(null);try{await Xw(n),d()}catch(Z){He(Z)}finally{I(!1)}}},Gn=async(Z,we)=>{I(!0),f(null);try{await Oy(Z,wS,we),u(),d()}catch(Ue){He(Ue)}finally{I(!1)}},vi=()=>{m||Zw(n).then(y).catch(Z=>He(Z))},Sl=Z=>{v[Z]||(g(we=>({...we,[Z]:{content:"",loading:!0}})),Gw(n,Z).then(we=>g(Ue=>({...Ue,[Z]:{content:we.content,loading:!1}}))).catch(we=>g(Ue=>({...Ue,[Z]:{content:"",loading:!1,error:String(we)}}))))};return c.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-4",children:c.jsxs("div",{className:"max-w-3xl",children:[c.jsx(ya,{to:"/issues",className:"font-ui-display inline-block text-sm text-white/50 hover:text-white mb-3",children:"← Issues"}),c.jsxs("div",{className:"flex items-start justify-between gap-4 mb-4",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-lg font-semibold text-white/90",children:ie.title}),c.jsxs("p",{className:"text-xs text-white/45 mt-1",children:["Owner: ",c.jsx("span",{className:"capitalize",children:ie.currentOwner}),ie.currentIntent?` · ${ie.currentIntent}`:""]}),c.jsxs("div",{className:"flex flex-wrap gap-3 mt-2 text-xs text-white/40",children:[ie.prUrl&&c.jsxs("a",{href:ie.prUrl,target:"_blank",rel:"noreferrer",className:"text-cyber-teal hover:underline",children:["PR #",ie.prNumber]}),ie.externalUrl&&c.jsx("a",{href:ie.externalUrl,target:"_blank",rel:"noreferrer",className:"text-cyber-teal hover:underline",children:ie.externalLabel??"External link"}),c.jsxs("span",{children:["Round ",ie.currentRound,"/",ie.maxReviewRounds]}),c.jsxs("span",{children:["Infra attempts ",ie.infraAttempts,"/",ie.maxInfraAttempts]}),c.jsxs("span",{title:"Wall-clock time from workflow start to completion (or now)",children:[Fo(lt)," elapsed"]}),c.jsxs("span",{title:`${oe.totalTokensIn} in / ${oe.totalTokensOut} out tokens`,children:["$",oe.totalCostUsd.toFixed(2)]}),Me>0&&c.jsxs("span",{title:"Time spent waiting on a human, excluding autonomous processing",children:[Fo(Me)," human wait"]}),j>0&&c.jsxs("span",{children:[j," intervention",j===1?"":"s"]})]})]}),c.jsx(Ly,{status:ie.status})]}),et&&c.jsx("div",{className:"mb-4 p-3 rounded border border-white/15 bg-white/[0.04]",children:c.jsx("p",{className:"text-sm text-white/85",children:et})}),c.jsx(sS,{issue:ie,agents:s,canEdit:Ya,editing:be,busy:pe,onBeginEdit:()=>$e(!0),onSave:(Z,we,Ue)=>void bl(Z,we,Ue),onCancel:()=>$e(!1)}),c.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-panel-elevated/40 flex items-start justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-xs text-white/45",children:"Next"}),c.jsx("p",{className:"text-sm text-white/85",children:AS(i)})]}),wa&&c.jsx("button",{type:"button",className:"btn-ghost-danger px-3 py-1.5 text-xs shrink-0 disabled:cursor-not-allowed disabled:opacity-60",disabled:pe,onClick:yi,children:"Abort workflow"})]}),nt&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-cyber-teal/30 bg-cyber-teal/5",children:[c.jsxs("p",{className:"text-xs text-cyber-teal font-medium uppercase tracking-wide",children:["Queued · position ",nt.position]}),c.jsx("p",{className:"text-sm text-white/80 mt-0.5",children:nt.waitReason??"Next up — starts as soon as the coordinator ticks"})]}),Sa&&G&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-cyber-teal/35 bg-cyber-teal/5 space-y-1.5",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-cyber-teal animate-pulse","aria-hidden":!0}),c.jsx("p",{className:"text-xs text-cyber-teal font-medium uppercase tracking-wide",children:"Running now"})]}),c.jsxs("p",{className:"text-sm text-white/90",children:[c.jsx("span",{className:"capitalize",children:G.role}),G.runtime?` · ${G.runtime}`:"",G.model?` · ${G.model}`:"",` · round ${G.round}`]}),c.jsxs("p",{className:"text-sm text-[#C4B643] truncate",title:P??ie.currentIntent??"session started",children:["Last progress: ",P??ie.currentIntent??"session started"]}),ce&&c.jsxs("p",{className:`text-xs ${ed(ce)?"text-amber-300":"text-white/55"}`,title:Wo(ce),children:["Branch tip: ",ce.tipLabel,Po(ce)]}),P&&ie.currentIntent&&!/session running/i.test(ie.currentIntent)&&!_S(ie.currentIntent,P)&&c.jsx("p",{className:"text-xs text-white/45 truncate",title:ie.currentIntent,children:ie.currentIntent}),c.jsxs("p",{className:"text-xs text-white/45",children:["Heartbeat ",jS(G.heartbeatAt),vs(G.worktreePath)?` · ${vs(G.worktreePath)}`:""]}),G.logPath&&c.jsxs("p",{className:"text-xs text-white/40 font-mono break-all",title:G.logPath,children:["Log: ",vs(G.logPath)??G.logPath]})]}),Rt&&re&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-red-400/30 bg-red-500/10 space-y-1.5",children:[c.jsx("p",{className:"text-xs text-red-300 font-medium uppercase tracking-wide",children:"Latest session failure"}),c.jsx("p",{className:"text-sm text-white/90 whitespace-pre-wrap break-words",children:re.reason}),c.jsxs("p",{className:"text-xs text-white/45",children:[re.role?c.jsx("span",{className:"capitalize",children:re.role}):"Worker",re.outcome?` · ${re.outcome}`:"",` · ${new Date(re.when).toLocaleString()}`,` · infra ${re.infraAttempts}/${re.maxInfraAttempts}`]}),ce&&c.jsxs("p",{className:`text-xs ${ed(ce)?"text-amber-300":"text-white/55"}`,title:Wo(ce),children:["Branch tip: ",ce.tipLabel,Po(ce)]}),re.logPath&&c.jsxs("p",{className:"text-xs text-white/40 font-mono break-all",title:re.logPath,children:["Log: ",vs(re.logPath)??re.logPath]})]}),ce&&!Sa&&!Rt&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-white/[0.03] space-y-1",children:[c.jsx("p",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Branch tip"}),c.jsxs("p",{className:`text-sm ${ed(ce)?"text-amber-300":"text-white/80"}`,title:Wo(ce),children:[ce.tipLabel,Po(ce)]})]}),!_e.ok&&!ga.some(Z=>Z.actionType==="product_scope_decision")&&c.jsx("div",{className:"mb-4 p-3 rounded border border-amber-400/30 bg-amber-500/10",children:c.jsxs("p",{className:"text-xs text-amber-300 font-medium",children:["Not startable yet — missing: ",_e.missing.join(", ")]})}),ga.length>0&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-red-400/30 bg-red-500/10 space-y-2",children:[c.jsx("p",{className:"text-xs text-red-300 font-medium",children:"Human action needed"}),ga.map(Z=>{const we=Z.actionType==="product_scope_decision";return c.jsxs("div",{className:"space-y-1",children:[c.jsx("p",{className:"text-sm text-white/80",children:Z.question}),we?_e.ok&&c.jsx("button",{type:"button",className:"btn-gold px-3 py-1 text-xs",disabled:pe,onClick:()=>Gn(Z.id,"resume"),children:"Resume"}):c.jsx(qy,{options:By(Z),disabled:pe,onChoose:Ue=>Gn(Z.id,Ue)})]},Z.id)})]}),ba&&!z&&c.jsx("button",{type:"button",className:"font-ui-display mb-4 text-xs text-cyber-teal hover:underline",onClick:mn,children:"Edit title / description / acceptance criteria"}),z&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[c.jsx("input",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:O,onChange:Z=>$(Z.target.value),placeholder:"Title"}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",rows:2,value:M,onChange:Z=>Y(Z.target.value),placeholder:"Description"}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",rows:2,value:J,onChange:Z=>ne(Z.target.value),placeholder:"Acceptance criteria"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-1.5 text-sm",disabled:pe,onClick:vl,children:"Save"}),c.jsx("button",{type:"button",className:"font-ui-display px-4 py-1.5 text-sm text-white/60 hover:text-white",onClick:()=>K(!1),children:"Cancel"})]})]}),(ie.status==="ready"||ie.status==="needs_human"&&ga.length===0)&&c.jsxs("div",{className:"mb-4 space-y-2",children:[ot&&c.jsxs("p",{className:"text-sm text-amber-200/90",children:["Fix before Start: ",ea]}),Ee&&c.jsx("p",{className:"text-sm text-amber-200/90",children:Ee}),c.jsxs("div",{className:"flex flex-wrap gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-2 disabled:opacity-50",disabled:!_e.ok||pe||!!ot,title:ot?ea:"Run next — move to the front of the admission queue; runs now if a slot is free, otherwise waits first with a reason",onClick:gl,children:"Run next"}),c.jsx("button",{type:"button",className:"px-4 py-2 text-sm border border-cyber-teal/40 rounded text-cyber-teal hover:bg-cyber-teal/10 disabled:opacity-50",disabled:!_e.ok||pe||!!ot,title:ot?ea:"Execute now — start immediately, skipping queue order; refuses (changing nothing) when capacity, readiness, blockers, or agent health prevents it",onClick:St,children:"Execute now"}),Ce?c.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm border border-white/15 rounded text-white/60 hover:text-white disabled:opacity-50",disabled:pe,onClick:wl,children:"Remove from queue"}):c.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm border border-white/15 rounded text-white/80 hover:border-cyber-teal/50 hover:text-cyber-teal disabled:opacity-50",disabled:pe||wa,title:"Add to queue — append to the end of the admission queue; does not start anything now",onClick:yt,children:"Add to queue"})]}),Ce&&Ya&&!be&&c.jsx("p",{className:"text-xs text-white/40",children:"Queued — edit repository / agents from the Configuration section above; position is kept."})]}),c.jsx(bS,{issueId:n}),c.jsx("div",{className:"border-t border-white/10 pt-3",children:c.jsx(fS,{events:L})}),c.jsxs("div",{className:"mt-4 flex gap-2",children:[c.jsx("input",{className:"flex-1 bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"Guide this issue…",value:b,onChange:Z=>N(Z.target.value),onKeyDown:Z=>Z.key==="Enter"&&Fe()}),c.jsx("button",{type:"button",className:"btn-gold px-4",onClick:Fe,children:"Send"})]}),Dt&&c.jsxs("details",{className:"mt-6",children:[c.jsx("summary",{className:"text-xs text-white/45 cursor-pointer hover:text-white/70",children:"More actions"}),c.jsxs("div",{className:"mt-2 space-y-2",children:[c.jsx("p",{className:"text-xs text-white/45",children:"Remove from queue means do not run yet — the issue stays ready and can run later. Close issue means this work is no longer needed — it will never execute."}),gt?c.jsx(NS,{busy:pe,onConfirm:()=>void pn(),onCancel:()=>xt(!1)}):c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/50 hover:text-red-300 underline underline-offset-2 disabled:opacity-50",disabled:pe,title:"Retire this issue without running it — removes any queue entry, keeps history as closed work",onClick:()=>xt(!0),children:"Close issue"})]})]}),c.jsxs("details",{className:"mt-6",onToggle:Z=>Z.currentTarget.open&&vi(),children:[c.jsx("summary",{className:"text-xs text-white/45 cursor-pointer hover:text-white/70",children:"Evidence & raw trace"}),m?c.jsxs("div",{className:"mt-2 space-y-3 text-xs text-white/60",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-white/45 mb-1",children:"Worker sessions"}),m.workerSessions.map(Z=>{const we=m.usageEvents.filter(_a=>_a.workerSessionId===Z.id),Ue=we.reduce((_a,R)=>_a+(R.costUsd??0),0),Qn=we.reduce((_a,R)=>_a+(R.tokensIn??0),0),jl=we.reduce((_a,R)=>_a+(R.tokensOut??0),0);return c.jsxs("p",{children:[Z.role," round ",Z.round," · ",Z.status,Z.startedAt&&Z.completedAt?` · ${Fo(new Date(Z.completedAt).getTime()-new Date(Z.startedAt).getTime())}`:"",we.length>0?` · $${Ue.toFixed(3)} · ${Qn}→${jl} tok`:""]},Z.id)}),m.workerSessions.length===0&&c.jsx("p",{className:"text-white/35",children:"None yet."})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-white/45 mb-1",children:"Artifacts"}),m.artifacts.map(Z=>{const we=v[Z.id];return c.jsxs("details",{className:"mb-1.5",onToggle:Ue=>Ue.currentTarget.open&&Z.blobPath&&Sl(Z.id),children:[c.jsxs("summary",{className:"cursor-pointer hover:text-white/80",children:[Z.kind," · ",new Date(Z.createdAt).toLocaleString()]}),c.jsxs("div",{className:"mt-1 pl-3 border-l border-white/10 space-y-1",children:[Z.contentJson&&c.jsx("pre",{className:"whitespace-pre-wrap break-words text-white/55",children:SS(Z.contentJson)}),Z.blobPath&&c.jsxs("div",{children:[c.jsxs("p",{className:"text-white/40",children:["Raw trace: ",Z.blobPath]}),(we==null?void 0:we.loading)&&c.jsx("p",{className:"text-white/35",children:"Loading trace…"}),(we==null?void 0:we.error)&&c.jsx("p",{className:"text-red-300/80",children:we.error}),we&&!we.loading&&!we.error&&c.jsx("pre",{className:"mt-1 max-h-64 overflow-y-auto whitespace-pre-wrap break-words text-white/50 bg-black/20 rounded p-2",children:we.content||"(empty)"})]}),!Z.contentJson&&!Z.blobPath&&c.jsx("p",{className:"text-white/35",children:"No content recorded."})]})]},Z.id)}),m.artifacts.length===0&&c.jsx("p",{className:"text-white/35",children:"None yet."})]})]}):c.jsx("p",{className:"text-xs text-white/40 mt-2",children:"Loading…"})]})]})})}function CS({issueId:n,agents:i,onHumanActionsChanged:s}){const[u,d]=S.useState(null),[f,m]=S.useState(null),[y,v]=S.useState(!1),g=()=>Cy(n).then(b=>{d(b),m(null),v(!1)}).catch(b=>{const N=String(b).replace(/^Error:\s*/i,"").trim();/^not found$/i.test(N)?(v(!0),m(null),d(null)):(m(N),v(!1))});return S.useEffect(()=>{d(null),m(null),v(!1),g();const b=setInterval(g,4e3);return()=>clearInterval(b)},[n]),y?c.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-10",children:c.jsxs("div",{className:"max-w-md space-y-3",children:[c.jsx("h2",{className:"text-lg font-semibold text-white/90",children:"Issue not found"}),c.jsx("p",{className:"text-sm text-white/55",children:"No issue exists for this ID — it may have been deleted, or the link is wrong."}),c.jsx(ya,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]})}):f?c.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-6 space-y-3",children:[c.jsx("p",{className:"text-red-300 text-sm",children:f}),c.jsx(ya,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]}):u?c.jsx(ES,{issueId:n,detail:u,agents:i,onHumanActionsChanged:s,refresh:g,onError:b=>m(b)},n):c.jsx("div",{className:"p-6 text-white/50 text-sm",children:"Loading…"})}function TS(){return c.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-10",children:c.jsxs("div",{className:"max-w-md space-y-3",children:[c.jsx("h2",{className:"font-ui-display text-lg font-semibold text-white/90",children:"Page not found"}),c.jsx("p",{className:"text-sm text-white/55",children:"That URL is not a destination in Agent Dealer."}),c.jsx(ya,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]})})}function RS(){return c.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0 overflow-hidden","aria-hidden":!0,children:[c.jsx("div",{className:"absolute top-16 left-12",children:c.jsx("div",{className:"ambient-orb ambient-orb-a w-[26rem] h-[26rem] rounded-full bg-cyan-500/10 blur-3xl"})}),c.jsx("div",{className:"absolute bottom-20 right-12",children:c.jsx("div",{className:"ambient-orb ambient-orb-b w-[26rem] h-[26rem] rounded-full bg-pink-500/10 blur-3xl"})}),c.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",children:c.jsx("div",{className:"ambient-orb ambient-orb-c w-[22rem] h-[22rem] rounded-full bg-blue-500/[0.07] blur-3xl"})})]})}function kS({className:n="w-5 h-5"}){return c.jsxs("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:n,"aria-hidden":!0,children:[c.jsx("circle",{cx:"6.75",cy:"6.25",r:"3.25"}),c.jsx("circle",{cx:"13.5",cy:"6.75",r:"2.85",opacity:"0.85"}),c.jsx("path",{d:"M1.75 16v-1.1c0-2.35 1.928-4.25 4.3-4.25 1.16 0 2.21.456 3 1.2.79-.744 1.84-1.2 3-1.2 2.372 0 4.3 1.9 4.3 4.25V16H1.75z"})]})}const OS="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 MS({className:n="",size:i=36}){return c.jsx("img",{src:OS,alt:"",width:i,height:i,className:`shrink-0 object-contain ${n}`,"aria-hidden":!0,draggable:!1})}const Hy={unsupported:"not reported by provider",missing:"no data yet",expired:"expired",unparsable:"provider data unparsable",stale:"stale"};function kx(n){if(n.unavailableReason!==null||n.remainingPercent===null)return`${n.displayLabel}: N/A (${Hy[n.unavailableReason??"missing"]})`;const i=Math.round(n.remainingPercent),s=n.resetAt?`, resets ${new Date(n.resetAt).toLocaleString()}`:"";return`${n.displayLabel}: ${i}% available (${100-i}% used${s})`}function DS(n,i=Date.now()){return n.runtimes.map(s=>{var y;const u=pa(s.runtime),d=s.windows.filter(v=>lw(v,i));if(d.length>0){const v=Math.min(...d.map(g=>Math.round(g.remainingPercent??0)));return{runtime:u,kind:"known",remaining:v,detail:d.map(kx).join("; ")}}const f=s.unavailableReason??((y=s.windows.find(v=>v.unavailableReason!==null))==null?void 0:y.unavailableReason)??"missing",m=s.windows.length>0?s.windows.map(kx).join("; "):`N/A (${Hy[f]})`;return{runtime:u,kind:"unknown",reason:f,detail:m}})}function LS({state:n,nowMs:i}){if(n.status==="loading")return c.jsxs("span",{"data-testid":"topbar-capacity","data-status":"loading",title:"Agent capacity is loading",className:"inline-flex min-w-0 max-w-full flex-wrap items-center gap-x-2 gap-y-1 whitespace-nowrap text-xs text-white/40",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Capacity"}),c.jsx("span",{"aria-live":"polite",children:"loading…"})]});if(n.status==="unavailable")return c.jsxs("span",{"data-testid":"topbar-capacity","data-status":"unavailable",title:"Agent capacity is unavailable — the capacity read failed",className:"inline-flex min-w-0 max-w-full flex-wrap items-center gap-x-2 gap-y-1 whitespace-nowrap text-xs text-white/40",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Capacity"}),c.jsx("span",{children:"unavailable"})]});const s=DS(n.data,i),u=s.length===0||s.every(d=>d.kind==="unknown");return c.jsxs("span",{"data-testid":"topbar-capacity","data-status":u?"unknown":"ready",title:s.length===0?"Agent capacity: no runtime accounts reported":s.map(d=>`${d.runtime}: ${d.detail}`).join(" · "),className:"inline-flex min-w-0 max-w-full flex-wrap items-center gap-x-2 gap-y-1 text-xs",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Capacity"}),s.length===0?c.jsx("span",{className:"whitespace-nowrap text-white/35",children:"N/A"}):s.map(d=>c.jsxs("span",{"data-testid":`topbar-capacity-${d.runtime}`,"data-known":d.kind==="known"?"true":"false",title:d.kind==="known"?`${d.runtime}: ${d.detail}`:`${d.runtime}: ${d.detail}`,className:"inline-flex items-center gap-1 whitespace-nowrap",children:[c.jsx("span",{className:"text-white/40",children:d.runtime}),d.kind==="known"?c.jsxs("span",{className:"font-medium tabular-nums text-white/75",children:[d.remaining,"%"]}):c.jsx("span",{className:"text-white/35",children:"N/A"})]},d.runtime))]})}const Ox=5e3;function td({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 US({agents:n,onHumanActionsChanged:i}){const{issueId:s}=J0();return s?c.jsx(CS,{issueId:s,agents:n,onHumanActionsChanged:i},s):c.jsx(Fx,{to:"/issues",replace:!0})}function zS({openHumanActionCount:n,agentCount:i,agentIssueCount:s,capacity:u={status:"loading"}}){return c.jsxs("header",{className:"px-6 py-4 border-b border-white/10 flex flex-wrap gap-4 items-center justify-between glass-header shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-6",children:[c.jsxs(ya,{to:"/issues",className:"flex items-center gap-3 text-left rounded hover:opacity-90 transition-opacity focus-visible:outline focus-visible:outline-2 focus-visible:outline-cyber-teal/45","aria-label":"AgentDealer — go to Issues",title:"AgentDealer — go to Issues",children:[c.jsx(MS,{size:40}),c.jsxs("div",{children:[c.jsx("h1",{className:"font-mono text-xl font-bold sm:text-2xl",style:{background:"linear-gradient(to right, #C4B643, #D4C760)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:"AgentDealer"}),c.jsx("p",{className:"text-sm text-cyber-teal",children:"One issue, one durable coordination record"})]})]}),c.jsxs("nav",{className:"flex gap-1",children:[c.jsxs(Xr,{to:"/issues",className:td,children:["Issues",n>0&&c.jsxs("span",{className:"ml-1.5 inline-flex items-center gap-0.5 font-mono text-xs leading-none bg-red-500/20 text-red-300 px-1.5 py-0.5 rounded tabular-nums border border-red-400/30 align-middle",title:`${n} open human action${n===1?"":"s"}`,children:[c.jsx(ru,{className:"w-3 h-3 shrink-0"}),n]})]}),c.jsx(Xr,{to:"/reports/execution",className:td,children:"Reports"})]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 min-w-0",children:[c.jsx(LS,{state:u}),c.jsxs(Xr,{to:"/agents",className:({isActive:d})=>`${td({isActive:d})} inline-flex items-center gap-1.5 transition-colors`,"aria-label":"Agents",title:"Agents",children:[c.jsx(kS,{className:"w-6 h-6 shrink-0"}),c.jsx("span",{children:"Agents"}),i>0&&c.jsx("span",{className:"font-mono text-xs leading-none bg-white/10 text-white/55 px-1.5 py-0.5 rounded tabular-nums border border-white/10",title:`${i} configured agent${i===1?"":"s"}`,children:i}),s>0&&c.jsxs("span",{className:"inline-flex items-center gap-0.5 font-mono text-xs leading-none bg-red-500/20 text-red-300 px-1.5 py-0.5 rounded tabular-nums border border-red-400/30",title:`${s} need${s===1?"s":""} attention`,children:[c.jsx(ru,{className:"w-3 h-3 shrink-0"}),s]})]})]})]})}function BS(){const[n,i]=S.useState([]),[s,u]=S.useState(0),[d,f]=S.useState(!1),[m,y]=S.useState([]),[v,g]=S.useState({status:"loading"}),b=S.useCallback(()=>{Dw().then(({agents:O,issueCount:$})=>{i(O),u($)}).catch(console.error),Ey().then(O=>f(O.connected)).catch(()=>f(!1)),Ay().then(O=>g({status:"ready",data:O})).catch(()=>g({status:"unavailable"}))},[]),N=S.useCallback(()=>e2().then(y).catch(()=>{}),[]);S.useEffect(()=>{b();const O=setInterval(b,Ox);return()=>clearInterval(O)},[b]),S.useEffect(()=>{N();const O=setInterval(()=>void N(),Ox);return()=>clearInterval(O)},[N]);const z=m.length,K=n.length;return c.jsxs(c.Fragment,{children:[c.jsx(RS,{}),c.jsxs("div",{className:"relative z-10 min-h-screen flex flex-col",children:[c.jsx(zS,{openHumanActionCount:z,agentCount:K,agentIssueCount:s,capacity:v}),c.jsx("main",{className:"flex-1 flex overflow-hidden",children:c.jsxs(ob,{children:[c.jsx(ol,{path:"/",element:c.jsx(Fx,{to:"/issues",replace:!0})}),c.jsx(ol,{path:"/issues",element:c.jsx(X2,{agents:n,humanActions:m,onHumanActionsChanged:N})}),c.jsx(ol,{path:"/issues/:issueId",element:c.jsx(US,{agents:n,onHumanActionsChanged:N})}),c.jsx(ol,{path:"/agents",element:c.jsx(_2,{agents:n,agentDeckOnline:d,onRefresh:b})}),c.jsx(ol,{path:"/reports/execution",element:c.jsx(lS,{})}),c.jsx(ol,{path:"*",element:c.jsx(TS,{})})]})})]})]})}function qS(){return typeof document>"u"?Promise.resolve():document.fonts.load('13px "Monaco"').then(()=>{}).catch(()=>{})}qS();c0.createRoot(document.getElementById("root")).render(c.jsx(S.StrictMode,{children:c.jsx(Lb,{children:c.jsx(BS,{})})}));
|