@amenophis1er/foreman 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,67 @@
1
+ (function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))o(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const g of h.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&o(g)}).observe(document,{childList:!0,subtree:!0});function c(f){const h={};return f.integrity&&(h.integrity=f.integrity),f.referrerPolicy&&(h.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?h.credentials="include":f.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(f){if(f.ep)return;f.ep=!0;const h=c(f);fetch(f.href,h)}})();function Pg(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var uu={exports:{}},gi={};var _h;function em(){if(_h)return gi;_h=1;var s=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function c(o,f,h){var g=null;if(h!==void 0&&(g=""+h),f.key!==void 0&&(g=""+f.key),"key"in f){h={};for(var j in f)j!=="key"&&(h[j]=f[j])}else h=f;return f=h.ref,{$$typeof:s,type:o,key:g,ref:f!==void 0?f:null,props:h}}return gi.Fragment=u,gi.jsx=c,gi.jsxs=c,gi}var Ch;function tm(){return Ch||(Ch=1,uu.exports=em()),uu.exports}var a=tm(),cu={exports:{}},me={};var Ah;function nm(){if(Ah)return me;Ah=1;var s=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),g=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),k=Symbol.iterator;function O(y){return y===null||typeof y!="object"?null:(y=k&&y[k]||y["@@iterator"],typeof y=="function"?y:null)}var Q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Z=Object.assign,_={};function R(y,B,P){this.props=y,this.context=B,this.refs=_,this.updater=P||Q}R.prototype.isReactComponent={},R.prototype.setState=function(y,B){if(typeof y!="object"&&typeof y!="function"&&y!=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,y,B,"setState")},R.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function W(){}W.prototype=R.prototype;function X(y,B,P){this.props=y,this.context=B,this.refs=_,this.updater=P||Q}var J=X.prototype=new W;J.constructor=X,Z(J,R.prototype),J.isPureReactComponent=!0;var le=Array.isArray;function T(){}var U={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function H(y,B,P){var ee=P.ref;return{$$typeof:s,type:y,key:B,ref:ee!==void 0?ee:null,props:P}}function ae(y,B){return H(y.type,B,y.props)}function F(y){return typeof y=="object"&&y!==null&&y.$$typeof===s}function de(y){var B={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(P){return B[P]})}var ye=/\/+/g;function je(y,B){return typeof y=="object"&&y!==null&&y.key!=null?de(""+y.key):B.toString(36)}function re(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(T,T):(y.status="pending",y.then(function(B){y.status==="pending"&&(y.status="fulfilled",y.value=B)},function(B){y.status==="pending"&&(y.status="rejected",y.reason=B)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function M(y,B,P,ee,se){var oe=typeof y;(oe==="undefined"||oe==="boolean")&&(y=null);var be=!1;if(y===null)be=!0;else switch(oe){case"bigint":case"string":case"number":be=!0;break;case"object":switch(y.$$typeof){case s:case u:be=!0;break;case w:return be=y._init,M(be(y._payload),B,P,ee,se)}}if(be)return se=se(y),be=ee===""?"."+je(y,0):ee,le(se)?(P="",be!=null&&(P=be.replace(ye,"$&/")+"/"),M(se,B,P,"",function(Xe){return Xe})):se!=null&&(F(se)&&(se=ae(se,P+(se.key==null||y&&y.key===se.key?"":(""+se.key).replace(ye,"$&/")+"/")+be)),B.push(se)),1;be=0;var Ge=ee===""?".":ee+":";if(le(y))for(var K=0;K<y.length;K++)ee=y[K],oe=Ge+je(ee,K),be+=M(ee,B,P,oe,se);else if(K=O(y),typeof K=="function")for(y=K.call(y),K=0;!(ee=y.next()).done;)ee=ee.value,oe=Ge+je(ee,K++),be+=M(ee,B,P,oe,se);else if(oe==="object"){if(typeof y.then=="function")return M(re(y),B,P,ee,se);throw B=String(y),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return be}function Y(y,B,P){if(y==null)return y;var ee=[],se=0;return M(y,ee,"","",function(oe){return B.call(P,oe,se++)}),ee}function I(y){if(y._status===-1){var B=y._result;B=B(),B.then(function(P){(y._status===0||y._status===-1)&&(y._status=1,y._result=P)},function(P){(y._status===0||y._status===-1)&&(y._status=2,y._result=P)}),y._status===-1&&(y._status=0,y._result=B)}if(y._status===1)return y._result.default;throw y._result}var ge=typeof reportError=="function"?reportError:function(y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof y=="object"&&y!==null&&typeof y.message=="string"?String(y.message):String(y),error:y});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",y);return}console.error(y)},V={map:Y,forEach:function(y,B,P){Y(y,function(){B.apply(this,arguments)},P)},count:function(y){var B=0;return Y(y,function(){B++}),B},toArray:function(y){return Y(y,function(B){return B})||[]},only:function(y){if(!F(y))throw Error("React.Children.only expected to receive a single React element child.");return y}};return me.Activity=S,me.Children=V,me.Component=R,me.Fragment=c,me.Profiler=f,me.PureComponent=X,me.StrictMode=o,me.Suspense=m,me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,me.__COMPILER_RUNTIME={__proto__:null,c:function(y){return U.H.useMemoCache(y)}},me.cache=function(y){return function(){return y.apply(null,arguments)}},me.cacheSignal=function(){return null},me.cloneElement=function(y,B,P){if(y==null)throw Error("The argument must be a React element, but you passed "+y+".");var ee=Z({},y.props),se=y.key;if(B!=null)for(oe in B.key!==void 0&&(se=""+B.key),B)!L.call(B,oe)||oe==="key"||oe==="__self"||oe==="__source"||oe==="ref"&&B.ref===void 0||(ee[oe]=B[oe]);var oe=arguments.length-2;if(oe===1)ee.children=P;else if(1<oe){for(var be=Array(oe),Ge=0;Ge<oe;Ge++)be[Ge]=arguments[Ge+2];ee.children=be}return H(y.type,se,ee)},me.createContext=function(y){return y={$$typeof:g,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null},y.Provider=y,y.Consumer={$$typeof:h,_context:y},y},me.createElement=function(y,B,P){var ee,se={},oe=null;if(B!=null)for(ee in B.key!==void 0&&(oe=""+B.key),B)L.call(B,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(se[ee]=B[ee]);var be=arguments.length-2;if(be===1)se.children=P;else if(1<be){for(var Ge=Array(be),K=0;K<be;K++)Ge[K]=arguments[K+2];se.children=Ge}if(y&&y.defaultProps)for(ee in be=y.defaultProps,be)se[ee]===void 0&&(se[ee]=be[ee]);return H(y,oe,se)},me.createRef=function(){return{current:null}},me.forwardRef=function(y){return{$$typeof:j,render:y}},me.isValidElement=F,me.lazy=function(y){return{$$typeof:w,_payload:{_status:-1,_result:y},_init:I}},me.memo=function(y,B){return{$$typeof:v,type:y,compare:B===void 0?null:B}},me.startTransition=function(y){var B=U.T,P={};U.T=P;try{var ee=y(),se=U.S;se!==null&&se(P,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(T,ge)}catch(oe){ge(oe)}finally{B!==null&&P.types!==null&&(B.types=P.types),U.T=B}},me.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},me.use=function(y){return U.H.use(y)},me.useActionState=function(y,B,P){return U.H.useActionState(y,B,P)},me.useCallback=function(y,B){return U.H.useCallback(y,B)},me.useContext=function(y){return U.H.useContext(y)},me.useDebugValue=function(){},me.useDeferredValue=function(y,B){return U.H.useDeferredValue(y,B)},me.useEffect=function(y,B){return U.H.useEffect(y,B)},me.useEffectEvent=function(y){return U.H.useEffectEvent(y)},me.useId=function(){return U.H.useId()},me.useImperativeHandle=function(y,B,P){return U.H.useImperativeHandle(y,B,P)},me.useInsertionEffect=function(y,B){return U.H.useInsertionEffect(y,B)},me.useLayoutEffect=function(y,B){return U.H.useLayoutEffect(y,B)},me.useMemo=function(y,B){return U.H.useMemo(y,B)},me.useOptimistic=function(y,B){return U.H.useOptimistic(y,B)},me.useReducer=function(y,B,P){return U.H.useReducer(y,B,P)},me.useRef=function(y){return U.H.useRef(y)},me.useState=function(y){return U.H.useState(y)},me.useSyncExternalStore=function(y,B,P){return U.H.useSyncExternalStore(y,B,P)},me.useTransition=function(){return U.H.useTransition()},me.version="19.2.8",me}var Dh;function Du(){return Dh||(Dh=1,cu.exports=nm()),cu.exports}var x=Du();const Cn=Pg(x);var du={exports:{}},mi={},fu={exports:{}},hu={};var Rh;function lm(){return Rh||(Rh=1,(function(s){function u(M,Y){var I=M.length;M.push(Y);e:for(;0<I;){var ge=I-1>>>1,V=M[ge];if(0<f(V,Y))M[ge]=Y,M[I]=V,I=ge;else break e}}function c(M){return M.length===0?null:M[0]}function o(M){if(M.length===0)return null;var Y=M[0],I=M.pop();if(I!==Y){M[0]=I;e:for(var ge=0,V=M.length,y=V>>>1;ge<y;){var B=2*(ge+1)-1,P=M[B],ee=B+1,se=M[ee];if(0>f(P,I))ee<V&&0>f(se,P)?(M[ge]=se,M[ee]=I,ge=ee):(M[ge]=P,M[B]=I,ge=B);else if(ee<V&&0>f(se,I))M[ge]=se,M[ee]=I,ge=ee;else break e}}return Y}function f(M,Y){var I=M.sortIndex-Y.sortIndex;return I!==0?I:M.id-Y.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;s.unstable_now=function(){return h.now()}}else{var g=Date,j=g.now();s.unstable_now=function(){return g.now()-j}}var m=[],v=[],w=1,S=null,k=3,O=!1,Q=!1,Z=!1,_=!1,R=typeof setTimeout=="function"?setTimeout:null,W=typeof clearTimeout=="function"?clearTimeout:null,X=typeof setImmediate<"u"?setImmediate:null;function J(M){for(var Y=c(v);Y!==null;){if(Y.callback===null)o(v);else if(Y.startTime<=M)o(v),Y.sortIndex=Y.expirationTime,u(m,Y);else break;Y=c(v)}}function le(M){if(Z=!1,J(M),!Q)if(c(m)!==null)Q=!0,T||(T=!0,de());else{var Y=c(v);Y!==null&&re(le,Y.startTime-M)}}var T=!1,U=-1,L=5,H=-1;function ae(){return _?!0:!(s.unstable_now()-H<L)}function F(){if(_=!1,T){var M=s.unstable_now();H=M;var Y=!0;try{e:{Q=!1,Z&&(Z=!1,W(U),U=-1),O=!0;var I=k;try{t:{for(J(M),S=c(m);S!==null&&!(S.expirationTime>M&&ae());){var ge=S.callback;if(typeof ge=="function"){S.callback=null,k=S.priorityLevel;var V=ge(S.expirationTime<=M);if(M=s.unstable_now(),typeof V=="function"){S.callback=V,J(M),Y=!0;break t}S===c(m)&&o(m),J(M)}else o(m);S=c(m)}if(S!==null)Y=!0;else{var y=c(v);y!==null&&re(le,y.startTime-M),Y=!1}}break e}finally{S=null,k=I,O=!1}Y=void 0}}finally{Y?de():T=!1}}}var de;if(typeof X=="function")de=function(){X(F)};else if(typeof MessageChannel<"u"){var ye=new MessageChannel,je=ye.port2;ye.port1.onmessage=F,de=function(){je.postMessage(null)}}else de=function(){R(F,0)};function re(M,Y){U=R(function(){M(s.unstable_now())},Y)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(M){M.callback=null},s.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<M?Math.floor(1e3/M):5},s.unstable_getCurrentPriorityLevel=function(){return k},s.unstable_next=function(M){switch(k){case 1:case 2:case 3:var Y=3;break;default:Y=k}var I=k;k=Y;try{return M()}finally{k=I}},s.unstable_requestPaint=function(){_=!0},s.unstable_runWithPriority=function(M,Y){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var I=k;k=M;try{return Y()}finally{k=I}},s.unstable_scheduleCallback=function(M,Y,I){var ge=s.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?ge+I:ge):I=ge,M){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=I+V,M={id:w++,callback:Y,priorityLevel:M,startTime:I,expirationTime:V,sortIndex:-1},I>ge?(M.sortIndex=I,u(v,M),c(m)===null&&M===c(v)&&(Z?(W(U),U=-1):Z=!0,re(le,I-ge))):(M.sortIndex=V,u(m,M),Q||O||(Q=!0,T||(T=!0,de()))),M},s.unstable_shouldYield=ae,s.unstable_wrapCallback=function(M){var Y=k;return function(){var I=k;k=Y;try{return M.apply(this,arguments)}finally{k=I}}}})(hu)),hu}var Oh;function am(){return Oh||(Oh=1,fu.exports=lm()),fu.exports}var pu={exports:{}},pt={};var Nh;function im(){if(Nh)return pt;Nh=1;var s=Du();function u(m){var v="https://react.dev/errors/"+m;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var w=2;w<arguments.length;w++)v+="&args[]="+encodeURIComponent(arguments[w])}return"Minified React error #"+m+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var o={d:{f:c,r:function(){throw Error(u(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},f=Symbol.for("react.portal");function h(m,v,w){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:S==null?null:""+S,children:m,containerInfo:v,implementation:w}}var g=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function j(m,v){if(m==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,pt.createPortal=function(m,v){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(u(299));return h(m,v,null,w)},pt.flushSync=function(m){var v=g.T,w=o.p;try{if(g.T=null,o.p=2,m)return m()}finally{g.T=v,o.p=w,o.d.f()}},pt.preconnect=function(m,v){typeof m=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,o.d.C(m,v))},pt.prefetchDNS=function(m){typeof m=="string"&&o.d.D(m)},pt.preinit=function(m,v){if(typeof m=="string"&&v&&typeof v.as=="string"){var w=v.as,S=j(w,v.crossOrigin),k=typeof v.integrity=="string"?v.integrity:void 0,O=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;w==="style"?o.d.S(m,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:S,integrity:k,fetchPriority:O}):w==="script"&&o.d.X(m,{crossOrigin:S,integrity:k,fetchPriority:O,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},pt.preinitModule=function(m,v){if(typeof m=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var w=j(v.as,v.crossOrigin);o.d.M(m,{crossOrigin:w,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&o.d.M(m)},pt.preload=function(m,v){if(typeof m=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var w=v.as,S=j(w,v.crossOrigin);o.d.L(m,w,{crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},pt.preloadModule=function(m,v){if(typeof m=="string")if(v){var w=j(v.as,v.crossOrigin);o.d.m(m,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:w,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else o.d.m(m)},pt.requestFormReset=function(m){o.d.r(m)},pt.unstable_batchedUpdates=function(m,v){return m(v)},pt.useFormState=function(m,v,w){return g.H.useFormState(m,v,w)},pt.useFormStatus=function(){return g.H.useHostTransitionStatus()},pt.version="19.2.8",pt}var Uh;function sm(){if(Uh)return pu.exports;Uh=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(u){console.error(u)}}return s(),pu.exports=im(),pu.exports}var Hh;function rm(){if(Hh)return mi;Hh=1;var s=am(),u=Du(),c=sm();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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 f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function g(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 j(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 m(e){if(h(e)!==e)throw Error(o(188))}function v(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(o(188));return t!==e?null:e}for(var n=e,l=t;;){var i=n.return;if(i===null)break;var r=i.alternate;if(r===null){if(l=i.return,l!==null){n=l;continue}break}if(i.child===r.child){for(r=i.child;r;){if(r===n)return m(i),e;if(r===l)return m(i),t;r=r.sibling}throw Error(o(188))}if(n.return!==l.return)n=i,l=r;else{for(var d=!1,p=i.child;p;){if(p===n){d=!0,n=i,l=r;break}if(p===l){d=!0,l=i,n=r;break}p=p.sibling}if(!d){for(p=r.child;p;){if(p===n){d=!0,n=r,l=i;break}if(p===l){d=!0,l=r,n=i;break}p=p.sibling}if(!d)throw Error(o(189))}}if(n.alternate!==l)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function w(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=w(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,k=Symbol.for("react.element"),O=Symbol.for("react.transitional.element"),Q=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),W=Symbol.for("react.consumer"),X=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),ae=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function de(e){return e===null||typeof e!="object"?null:(e=F&&e[F]||e["@@iterator"],typeof e=="function"?e:null)}var ye=Symbol.for("react.client.reference");function je(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ye?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Z:return"Fragment";case R:return"Profiler";case _:return"StrictMode";case le:return"Suspense";case T:return"SuspenseList";case H:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Q:return"Portal";case X:return e.displayName||"Context";case W:return(e._context.displayName||"Context")+".Consumer";case J:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U:return t=e.displayName||null,t!==null?t:je(e.type)||"Memo";case L:t=e._payload,e=e._init;try{return je(e(t))}catch{}}return null}var re=Array.isArray,M=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},ge=[],V=-1;function y(e){return{current:e}}function B(e){0>V||(e.current=ge[V],ge[V]=null,V--)}function P(e,t){V++,ge[V]=e.current,e.current=t}var ee=y(null),se=y(null),oe=y(null),be=y(null);function Ge(e,t){switch(P(oe,t),P(se,e),P(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?If(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=If(t),e=Pf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(ee),P(ee,e)}function K(){B(ee),B(se),B(oe)}function Xe(e){e.memoizedState!==null&&P(be,e);var t=ee.current,n=Pf(t,e.type);t!==n&&(P(se,e),P(ee,n))}function Be(e){se.current===e&&(B(ee),B(se)),be.current===e&&(B(be),fi._currentValue=I)}var te,Ae;function Le(e){if(te===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);te=t&&t[1]||"",Ae=-1<n.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+te+e+Ae}var vt=!1;function il(e,t){if(!e||vt)return"";vt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(N){var D=N}Reflect.construct(e,[],G)}else{try{G.call()}catch(N){D=N}e.call(G.prototype)}}else{try{throw Error()}catch(N){D=N}(G=e())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(N){if(N&&D&&typeof N.stack=="string")return[N.stack,D.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=l.DetermineComponentFrameRoot(),d=r[0],p=r[1];if(d&&p){var b=d.split(`
4
+ `),A=p.split(`
5
+ `);for(i=l=0;l<b.length&&!b[l].includes("DetermineComponentFrameRoot");)l++;for(;i<A.length&&!A[i].includes("DetermineComponentFrameRoot");)i++;if(l===b.length||i===A.length)for(l=b.length-1,i=A.length-1;1<=l&&0<=i&&b[l]!==A[i];)i--;for(;1<=l&&0<=i;l--,i--)if(b[l]!==A[i]){if(l!==1||i!==1)do if(l--,i--,0>i||b[l]!==A[i]){var q=`
6
+ `+b[l].replace(" at new "," at ");return e.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",e.displayName)),q}while(1<=l&&0<=i);break}}}finally{vt=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Le(n):""}function Ot(e,t){switch(e.tag){case 26:case 27:case 5:return Le(e.type);case 16:return Le("Lazy");case 13:return e.child!==t&&t!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return il(e.type,!1);case 11:return il(e.type.render,!1);case 1:return il(e.type,!0);case 31:return Le("Activity");default:return""}}function sl(e){try{var t="",n=null;do t+=Ot(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
7
+ Error generating stack: `+l.message+`
8
+ `+l.stack}}var Ml=Object.prototype.hasOwnProperty,An=s.unstable_scheduleCallback,El=s.unstable_cancelCallback,Si=s.unstable_shouldYield,Ks=s.unstable_requestPaint,ht=s.unstable_now,Sa=s.unstable_getCurrentPriorityLevel,ja=s.unstable_ImmediatePriority,_l=s.unstable_UserBlockingPriority,Cl=s.unstable_NormalPriority,Ws=s.unstable_LowPriority,ka=s.unstable_IdlePriority,sn=s.log,rn=s.unstable_setDisableYieldValue,on=null,st=null;function Vt(e){if(typeof sn=="function"&&rn(e),st&&typeof st.setStrictMode=="function")try{st.setStrictMode(on,e)}catch{}}var gt=Math.clz32?Math.clz32:ji,Js=Math.log,Fs=Math.LN2;function ji(e){return e>>>=0,e===0?32:31-(Js(e)/Fs|0)|0}var Al=256,Dl=262144,Rl=4194304;function un(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 cn(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var i=0,r=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var p=l&134217727;return p!==0?(l=p&~r,l!==0?i=un(l):(d&=p,d!==0?i=un(d):n||(n=p&~e,n!==0&&(i=un(n))))):(p=l&~r,p!==0?i=un(p):d!==0?i=un(d):n||(n=l&~e,n!==0&&(i=un(n)))),i===0?0:t!==0&&t!==i&&(t&r)===0&&(r=i&-i,n=t&-t,r>=n||r===32&&(n&4194048)!==0)?t:i}function Dn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ki(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 wa(){var e=Rl;return Rl<<=1,(Rl&62914560)===0&&(Rl=4194304),e}function Ol(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function rl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Is(e,t,n,l,i,r){var d=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var p=e.entanglements,b=e.expirationTimes,A=e.hiddenUpdates;for(n=d&~n;0<n;){var q=31-gt(n),G=1<<q;p[q]=0,b[q]=-1;var D=A[q];if(D!==null)for(A[q]=null,q=0;q<D.length;q++){var N=D[q];N!==null&&(N.lane&=-536870913)}n&=~G}l!==0&&za(e,l,0),r!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=r&~(d&~t))}function za(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-gt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function ne(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-gt(n),i=1<<l;i&t|e[l]&t&&(e[l]|=t),n&=~i}}function nt(e,t){var n=t&-t;return n=(n&42)!==0?1:Zt(n),(n&(e.suspendedLanes|t))!==0?0:n}function Zt(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 Rn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ta(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:jh(e.type))}function wi(e,t){var n=Y.p;try{return Y.p=e,t()}finally{Y.p=n}}var On=Math.random().toString(36).slice(2),rt="__reactFiber$"+On,yt="__reactProps$"+On,Nl="__reactContainer$"+On,Ps="__reactEvents$"+On,$p="__reactListeners$"+On,Gp="__reactHandles$"+On,Bu="__reactResources$"+On,Ma="__reactMarker$"+On;function er(e){delete e[rt],delete e[yt],delete e[Ps],delete e[$p],delete e[Gp]}function Ul(e){var t=e[rt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Nl]||n[rt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=sh(e);e!==null;){if(n=e[rt])return n;e=sh(e)}return t}e=n,n=e.parentNode}return null}function Hl(e){if(e=e[rt]||e[Nl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ea(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Bl(e){var t=e[Bu];return t||(t=e[Bu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function at(e){e[Ma]=!0}var qu=new Set,Lu={};function ol(e,t){ql(e,t),ql(e+"Capture",t)}function ql(e,t){for(Lu[e]=t,e=0;e<t.length;e++)qu.add(t[e])}var Xp=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]*$"),Yu={},$u={};function Qp(e){return Ml.call($u,e)?!0:Ml.call(Yu,e)?!1:Xp.test(e)?$u[e]=!0:(Yu[e]=!0,!1)}function zi(e,t,n){if(Qp(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){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,""+n)}}function Ti(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function dn(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function Nt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Gu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Vp(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var i=l.get,r=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(d){n=""+d,r.call(this,d)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(d){n=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function tr(e){if(!e._valueTracker){var t=Gu(e)?"checked":"value";e._valueTracker=Vp(e,t,""+e[t])}}function Xu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=Gu(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function Mi(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 Zp=/[\n"\\]/g;function Ut(e){return e.replace(Zp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function nr(e,t,n,l,i,r,d,p){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Nt(t)):e.value!==""+Nt(t)&&(e.value=""+Nt(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?lr(e,d,Nt(t)):n!=null?lr(e,d,Nt(n)):l!=null&&e.removeAttribute("value"),i==null&&r!=null&&(e.defaultChecked=!!r),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+Nt(p):e.removeAttribute("name")}function Qu(e,t,n,l,i,r,d,p){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||n!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){tr(e);return}n=n!=null?""+Nt(n):"",t=t!=null?""+Nt(t):n,p||t===e.value||(e.value=t),e.defaultValue=t}l=l??i,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=p?e.checked:!!l,e.defaultChecked=!!l,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),tr(e)}function lr(e,t,n){t==="number"&&Mi(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Ll(e,t,n,l){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&l&&(e[n].defaultSelected=!0)}else{for(n=""+Nt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,l&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Vu(e,t,n){if(t!=null&&(t=""+Nt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Nt(n):""}function Zu(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(o(92));if(re(l)){if(1<l.length)throw Error(o(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=Nt(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),tr(e)}function Yl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kp=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 Ku(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||Kp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Wu(e,t,n){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var i in t)l=t[i],t.hasOwnProperty(i)&&n[i]!==l&&Ku(e,i,l)}else for(var r in t)t.hasOwnProperty(r)&&Ku(e,r,t[r])}function ar(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 Wp=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"]]),Jp=/^[\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 Ei(e){return Jp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function fn(){}var ir=null;function sr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $l=null,Gl=null;function Ju(e){var t=Hl(e);if(t&&(e=t.stateNode)){var n=e[yt]||null;e:switch(e=t.stateNode,t.type){case"input":if(nr(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Ut(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var i=l[yt]||null;if(!i)throw Error(o(90));nr(l,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&Xu(l)}break e;case"textarea":Vu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ll(e,!!n.multiple,t,!1)}}}var rr=!1;function Fu(e,t,n){if(rr)return e(t,n);rr=!0;try{var l=e(t);return l}finally{if(rr=!1,($l!==null||Gl!==null)&&(vs(),$l&&(t=$l,e=Gl,Gl=$l=null,Ju(t),e)))for(t=0;t<e.length;t++)Ju(e[t])}}function _a(e,t){var n=e.stateNode;if(n===null)return null;var l=n[yt]||null;if(l===null)return null;n=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(n&&typeof n!="function")throw Error(o(231,t,typeof n));return n}var hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),or=!1;if(hn)try{var Ca={};Object.defineProperty(Ca,"passive",{get:function(){or=!0}}),window.addEventListener("test",Ca,Ca),window.removeEventListener("test",Ca,Ca)}catch{or=!1}var Nn=null,ur=null,_i=null;function Iu(){if(_i)return _i;var e,t=ur,n=t.length,l,i="value"in Nn?Nn.value:Nn.textContent,r=i.length;for(e=0;e<n&&t[e]===i[e];e++);var d=n-e;for(l=1;l<=d&&t[n-l]===i[r-l];l++);return _i=i.slice(e,1<l?1-l:void 0)}function Ci(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 Ai(){return!0}function Pu(){return!1}function xt(e){function t(n,l,i,r,d){this._reactName=n,this._targetInst=i,this.type=l,this.nativeEvent=r,this.target=d,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(n=e[p],this[p]=n?n(r):r[p]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Ai:Pu,this.isPropagationStopped=Pu,this}return S(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ai)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ai)},persist:function(){},isPersistent:Ai}),t}var ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Di=xt(ul),Aa=S({},ul,{view:0,detail:0}),Fp=xt(Aa),cr,dr,Da,Ri=S({},Aa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hr,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!==Da&&(Da&&e.type==="mousemove"?(cr=e.screenX-Da.screenX,dr=e.screenY-Da.screenY):dr=cr=0,Da=e),cr)},movementY:function(e){return"movementY"in e?e.movementY:dr}}),ec=xt(Ri),Ip=S({},Ri,{dataTransfer:0}),Pp=xt(Ip),ev=S({},Aa,{relatedTarget:0}),fr=xt(ev),tv=S({},ul,{animationName:0,elapsedTime:0,pseudoElement:0}),nv=xt(tv),lv=S({},ul,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),av=xt(lv),iv=S({},ul,{data:0}),tc=xt(iv),sv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rv={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ov={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ov[e])?!!t[e]:!1}function hr(){return uv}var cv=S({},Aa,{key:function(e){if(e.key){var t=sv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ci(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hr,charCode:function(e){return e.type==="keypress"?Ci(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ci(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),dv=xt(cv),fv=S({},Ri,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nc=xt(fv),hv=S({},Aa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hr}),pv=xt(hv),vv=S({},ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),gv=xt(vv),mv=S({},Ri,{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}),yv=xt(mv),xv=S({},ul,{newState:0,oldState:0}),bv=xt(xv),Sv=[9,13,27,32],pr=hn&&"CompositionEvent"in window,Ra=null;hn&&"documentMode"in document&&(Ra=document.documentMode);var jv=hn&&"TextEvent"in window&&!Ra,lc=hn&&(!pr||Ra&&8<Ra&&11>=Ra),ac=" ",ic=!1;function sc(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 rc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xl=!1;function kv(e,t){switch(e){case"compositionend":return rc(t);case"keypress":return t.which!==32?null:(ic=!0,ac);case"textInput":return e=t.data,e===ac&&ic?null:e;default:return null}}function wv(e,t){if(Xl)return e==="compositionend"||!pr&&sc(e,t)?(e=Iu(),_i=ur=Nn=null,Xl=!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 lc&&t.locale!=="ko"?null:t.data;default:return null}}var zv={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 oc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!zv[e.type]:t==="textarea"}function uc(e,t,n,l){$l?Gl?Gl.push(l):Gl=[l]:$l=l,t=js(t,"onChange"),0<t.length&&(n=new Di("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var Oa=null,Na=null;function Tv(e){Vf(e,0)}function Oi(e){var t=Ea(e);if(Xu(t))return e}function cc(e,t){if(e==="change")return t}var dc=!1;if(hn){var vr;if(hn){var gr="oninput"in document;if(!gr){var fc=document.createElement("div");fc.setAttribute("oninput","return;"),gr=typeof fc.oninput=="function"}vr=gr}else vr=!1;dc=vr&&(!document.documentMode||9<document.documentMode)}function hc(){Oa&&(Oa.detachEvent("onpropertychange",pc),Na=Oa=null)}function pc(e){if(e.propertyName==="value"&&Oi(Na)){var t=[];uc(t,Na,e,sr(e)),Fu(Tv,t)}}function Mv(e,t,n){e==="focusin"?(hc(),Oa=t,Na=n,Oa.attachEvent("onpropertychange",pc)):e==="focusout"&&hc()}function Ev(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Oi(Na)}function _v(e,t){if(e==="click")return Oi(t)}function Cv(e,t){if(e==="input"||e==="change")return Oi(t)}function Av(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zt=typeof Object.is=="function"?Object.is:Av;function Ua(e,t){if(zt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var i=n[l];if(!Ml.call(t,i)||!zt(e[i],t[i]))return!1}return!0}function vc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gc(e,t){var n=vc(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=vc(n)}}function mc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Mi(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mi(e.document)}return t}function mr(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 Dv=hn&&"documentMode"in document&&11>=document.documentMode,Ql=null,yr=null,Ha=null,xr=!1;function xc(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xr||Ql==null||Ql!==Mi(l)||(l=Ql,"selectionStart"in l&&mr(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}),Ha&&Ua(Ha,l)||(Ha=l,l=js(yr,"onSelect"),0<l.length&&(t=new Di("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=Ql)))}function cl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Vl={animationend:cl("Animation","AnimationEnd"),animationiteration:cl("Animation","AnimationIteration"),animationstart:cl("Animation","AnimationStart"),transitionrun:cl("Transition","TransitionRun"),transitionstart:cl("Transition","TransitionStart"),transitioncancel:cl("Transition","TransitionCancel"),transitionend:cl("Transition","TransitionEnd")},br={},bc={};hn&&(bc=document.createElement("div").style,"AnimationEvent"in window||(delete Vl.animationend.animation,delete Vl.animationiteration.animation,delete Vl.animationstart.animation),"TransitionEvent"in window||delete Vl.transitionend.transition);function dl(e){if(br[e])return br[e];if(!Vl[e])return e;var t=Vl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in bc)return br[e]=t[n];return e}var Sc=dl("animationend"),jc=dl("animationiteration"),kc=dl("animationstart"),Rv=dl("transitionrun"),Ov=dl("transitionstart"),Nv=dl("transitioncancel"),wc=dl("transitionend"),zc=new Map,Sr="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(" ");Sr.push("scrollEnd");function Kt(e,t){zc.set(e,t),ol(t,[e])}var Ni=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)},Ht=[],Zl=0,jr=0;function Ui(){for(var e=Zl,t=jr=Zl=0;t<e;){var n=Ht[t];Ht[t++]=null;var l=Ht[t];Ht[t++]=null;var i=Ht[t];Ht[t++]=null;var r=Ht[t];if(Ht[t++]=null,l!==null&&i!==null){var d=l.pending;d===null?i.next=i:(i.next=d.next,d.next=i),l.pending=i}r!==0&&Tc(n,i,r)}}function Hi(e,t,n,l){Ht[Zl++]=e,Ht[Zl++]=t,Ht[Zl++]=n,Ht[Zl++]=l,jr|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function kr(e,t,n,l){return Hi(e,t,n,l),Bi(e)}function fl(e,t){return Hi(e,null,null,t),Bi(e)}function Tc(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var i=!1,r=e.return;r!==null;)r.childLanes|=n,l=r.alternate,l!==null&&(l.childLanes|=n),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(i=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,i&&t!==null&&(i=31-gt(n),e=r.hiddenUpdates,l=e[i],l===null?e[i]=[t]:l.push(t),t.lane=n|536870912),r):null}function Bi(e){if(50<ii)throw ii=0,Ro=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Kl={};function Uv(e,t,n,l){this.tag=e,this.key=n,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 Tt(e,t,n,l){return new Uv(e,t,n,l)}function wr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pn(e,t){var n=e.alternate;return n===null?(n=Tt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Mc(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function qi(e,t,n,l,i,r){var d=0;if(l=e,typeof e=="function")wr(e)&&(d=1);else if(typeof e=="string")d=Yg(e,n,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case H:return e=Tt(31,n,t,i),e.elementType=H,e.lanes=r,e;case Z:return hl(n.children,i,r,t);case _:d=8,i|=24;break;case R:return e=Tt(12,n,t,i|2),e.elementType=R,e.lanes=r,e;case le:return e=Tt(13,n,t,i),e.elementType=le,e.lanes=r,e;case T:return e=Tt(19,n,t,i),e.elementType=T,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case X:d=10;break e;case W:d=9;break e;case J:d=11;break e;case U:d=14;break e;case L:d=16,l=null;break e}d=29,n=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=Tt(d,n,t,i),t.elementType=e,t.type=l,t.lanes=r,t}function hl(e,t,n,l){return e=Tt(7,e,l,t),e.lanes=n,e}function zr(e,t,n){return e=Tt(6,e,null,t),e.lanes=n,e}function Ec(e){var t=Tt(18,null,null,0);return t.stateNode=e,t}function Tr(e,t,n){return t=Tt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var _c=new WeakMap;function Bt(e,t){if(typeof e=="object"&&e!==null){var n=_c.get(e);return n!==void 0?n:(t={value:e,source:t,stack:sl(t)},_c.set(e,t),t)}return{value:e,source:t,stack:sl(t)}}var Wl=[],Jl=0,Li=null,Ba=0,qt=[],Lt=0,Un=null,Ft=1,It="";function vn(e,t){Wl[Jl++]=Ba,Wl[Jl++]=Li,Li=e,Ba=t}function Cc(e,t,n){qt[Lt++]=Ft,qt[Lt++]=It,qt[Lt++]=Un,Un=e;var l=Ft;e=It;var i=32-gt(l)-1;l&=~(1<<i),n+=1;var r=32-gt(t)+i;if(30<r){var d=i-i%5;r=(l&(1<<d)-1).toString(32),l>>=d,i-=d,Ft=1<<32-gt(t)+i|n<<i|l,It=r+e}else Ft=1<<r|n<<i|l,It=e}function Mr(e){e.return!==null&&(vn(e,1),Cc(e,1,0))}function Er(e){for(;e===Li;)Li=Wl[--Jl],Wl[Jl]=null,Ba=Wl[--Jl],Wl[Jl]=null;for(;e===Un;)Un=qt[--Lt],qt[Lt]=null,It=qt[--Lt],qt[Lt]=null,Ft=qt[--Lt],qt[Lt]=null}function Ac(e,t){qt[Lt++]=Ft,qt[Lt++]=It,qt[Lt++]=Un,Ft=t.id,It=t.overflow,Un=e}var ot=null,Ye=null,Me=!1,Hn=null,Yt=!1,_r=Error(o(519));function Bn(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw qa(Bt(t,e)),_r}function Dc(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[rt]=e,t[yt]=l,n){case"dialog":we("cancel",t),we("close",t);break;case"iframe":case"object":case"embed":we("load",t);break;case"video":case"audio":for(n=0;n<ri.length;n++)we(ri[n],t);break;case"source":we("error",t);break;case"img":case"image":case"link":we("error",t),we("load",t);break;case"details":we("toggle",t);break;case"input":we("invalid",t),Qu(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":we("invalid",t);break;case"textarea":we("invalid",t),Zu(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||Jf(t.textContent,n)?(l.popover!=null&&(we("beforetoggle",t),we("toggle",t)),l.onScroll!=null&&we("scroll",t),l.onScrollEnd!=null&&we("scrollend",t),l.onClick!=null&&(t.onclick=fn),t=!0):t=!1,t||Bn(e,!0)}function Rc(e){for(ot=e.return;ot;)switch(ot.tag){case 5:case 31:case 13:Yt=!1;return;case 27:case 3:Yt=!0;return;default:ot=ot.return}}function Fl(e){if(e!==ot)return!1;if(!Me)return Rc(e),Me=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Ko(e.type,e.memoizedProps)),n=!n),n&&Ye&&Bn(e),Rc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ye=ih(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ye=ih(e)}else t===27?(t=Ye,In(e.type)?(e=Po,Po=null,Ye=e):Ye=t):Ye=ot?Gt(e.stateNode.nextSibling):null;return!0}function pl(){Ye=ot=null,Me=!1}function Cr(){var e=Hn;return e!==null&&(kt===null?kt=e:kt.push.apply(kt,e),Hn=null),e}function qa(e){Hn===null?Hn=[e]:Hn.push(e)}var Ar=y(null),vl=null,gn=null;function qn(e,t,n){P(Ar,t._currentValue),t._currentValue=n}function mn(e){e._currentValue=Ar.current,B(Ar)}function Dr(e,t,n){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===n)break;e=e.return}}function Rr(e,t,n,l){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var r=i.dependencies;if(r!==null){var d=i.child;r=r.firstContext;e:for(;r!==null;){var p=r;r=i;for(var b=0;b<t.length;b++)if(p.context===t[b]){r.lanes|=n,p=r.alternate,p!==null&&(p.lanes|=n),Dr(r.return,n,e),l||(d=null);break e}r=p.next}}else if(i.tag===18){if(d=i.return,d===null)throw Error(o(341));d.lanes|=n,r=d.alternate,r!==null&&(r.lanes|=n),Dr(d,n,e),d=null}else d=i.child;if(d!==null)d.return=i;else for(d=i;d!==null;){if(d===e){d=null;break}if(i=d.sibling,i!==null){i.return=d.return,d=i;break}d=d.return}i=d}}function Il(e,t,n,l){e=null;for(var i=t,r=!1;i!==null;){if(!r){if((i.flags&524288)!==0)r=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var d=i.alternate;if(d===null)throw Error(o(387));if(d=d.memoizedProps,d!==null){var p=i.type;zt(i.pendingProps.value,d.value)||(e!==null?e.push(p):e=[p])}}else if(i===be.current){if(d=i.alternate,d===null)throw Error(o(387));d.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(fi):e=[fi])}i=i.return}e!==null&&Rr(t,e,n,l),t.flags|=262144}function Yi(e){for(e=e.firstContext;e!==null;){if(!zt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function gl(e){vl=e,gn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ut(e){return Oc(vl,e)}function $i(e,t){return vl===null&&gl(e),Oc(e,t)}function Oc(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},gn===null){if(e===null)throw Error(o(308));gn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else gn=gn.next=t;return n}var Hv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Bv=s.unstable_scheduleCallback,qv=s.unstable_NormalPriority,Ie={$$typeof:X,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Or(){return{controller:new Hv,data:new Map,refCount:0}}function La(e){e.refCount--,e.refCount===0&&Bv(qv,function(){e.controller.abort()})}var Ya=null,Nr=0,Pl=0,ea=null;function Lv(e,t){if(Ya===null){var n=Ya=[];Nr=0,Pl=qo(),ea={status:"pending",value:void 0,then:function(l){n.push(l)}}}return Nr++,t.then(Nc,Nc),t}function Nc(){if(--Nr===0&&Ya!==null){ea!==null&&(ea.status="fulfilled");var e=Ya;Ya=null,Pl=0,ea=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Yv(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(l.status="rejected",l.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),l}var Uc=M.S;M.S=function(e,t){bf=ht(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Lv(e,t),Uc!==null&&Uc(e,t)};var ml=y(null);function Ur(){var e=ml.current;return e!==null?e:He.pooledCache}function Gi(e,t){t===null?P(ml,ml.current):P(ml,t.pool)}function Hc(){var e=Ur();return e===null?null:{parent:Ie._currentValue,pool:e}}var ta=Error(o(460)),Hr=Error(o(474)),Xi=Error(o(542)),Qi={then:function(){}};function Bc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function qc(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(fn,fn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Yc(e),e;default:if(typeof t.status=="string")t.then(fn,fn);else{if(e=He,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=l}},function(l){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Yc(e),e}throw xl=t,ta}}function yl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(xl=n,ta):n}}var xl=null;function Lc(){if(xl===null)throw Error(o(459));var e=xl;return xl=null,e}function Yc(e){if(e===ta||e===Xi)throw Error(o(483))}var na=null,$a=0;function Vi(e){var t=$a;return $a+=1,na===null&&(na=[]),qc(na,e,t)}function Ga(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Zi(e,t){throw t.$$typeof===k?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function $c(e){function t(E,z){if(e){var C=E.deletions;C===null?(E.deletions=[z],E.flags|=16):C.push(z)}}function n(E,z){if(!e)return null;for(;z!==null;)t(E,z),z=z.sibling;return null}function l(E){for(var z=new Map;E!==null;)E.key!==null?z.set(E.key,E):z.set(E.index,E),E=E.sibling;return z}function i(E,z){return E=pn(E,z),E.index=0,E.sibling=null,E}function r(E,z,C){return E.index=C,e?(C=E.alternate,C!==null?(C=C.index,C<z?(E.flags|=67108866,z):C):(E.flags|=67108866,z)):(E.flags|=1048576,z)}function d(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function p(E,z,C,$){return z===null||z.tag!==6?(z=zr(C,E.mode,$),z.return=E,z):(z=i(z,C),z.return=E,z)}function b(E,z,C,$){var pe=C.type;return pe===Z?q(E,z,C.props.children,$,C.key):z!==null&&(z.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===L&&yl(pe)===z.type)?(z=i(z,C.props),Ga(z,C),z.return=E,z):(z=qi(C.type,C.key,C.props,null,E.mode,$),Ga(z,C),z.return=E,z)}function A(E,z,C,$){return z===null||z.tag!==4||z.stateNode.containerInfo!==C.containerInfo||z.stateNode.implementation!==C.implementation?(z=Tr(C,E.mode,$),z.return=E,z):(z=i(z,C.children||[]),z.return=E,z)}function q(E,z,C,$,pe){return z===null||z.tag!==7?(z=hl(C,E.mode,$,pe),z.return=E,z):(z=i(z,C),z.return=E,z)}function G(E,z,C){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=zr(""+z,E.mode,C),z.return=E,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case O:return C=qi(z.type,z.key,z.props,null,E.mode,C),Ga(C,z),C.return=E,C;case Q:return z=Tr(z,E.mode,C),z.return=E,z;case L:return z=yl(z),G(E,z,C)}if(re(z)||de(z))return z=hl(z,E.mode,C,null),z.return=E,z;if(typeof z.then=="function")return G(E,Vi(z),C);if(z.$$typeof===X)return G(E,$i(E,z),C);Zi(E,z)}return null}function D(E,z,C,$){var pe=z!==null?z.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return pe!==null?null:p(E,z,""+C,$);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case O:return C.key===pe?b(E,z,C,$):null;case Q:return C.key===pe?A(E,z,C,$):null;case L:return C=yl(C),D(E,z,C,$)}if(re(C)||de(C))return pe!==null?null:q(E,z,C,$,null);if(typeof C.then=="function")return D(E,z,Vi(C),$);if(C.$$typeof===X)return D(E,z,$i(E,C),$);Zi(E,C)}return null}function N(E,z,C,$,pe){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return E=E.get(C)||null,p(z,E,""+$,pe);if(typeof $=="object"&&$!==null){switch($.$$typeof){case O:return E=E.get($.key===null?C:$.key)||null,b(z,E,$,pe);case Q:return E=E.get($.key===null?C:$.key)||null,A(z,E,$,pe);case L:return $=yl($),N(E,z,C,$,pe)}if(re($)||de($))return E=E.get(C)||null,q(z,E,$,pe,null);if(typeof $.then=="function")return N(E,z,C,Vi($),pe);if($.$$typeof===X)return N(E,z,C,$i(z,$),pe);Zi(z,$)}return null}function ce(E,z,C,$){for(var pe=null,Ee=null,fe=z,Se=z=0,Te=null;fe!==null&&Se<C.length;Se++){fe.index>Se?(Te=fe,fe=null):Te=fe.sibling;var _e=D(E,fe,C[Se],$);if(_e===null){fe===null&&(fe=Te);break}e&&fe&&_e.alternate===null&&t(E,fe),z=r(_e,z,Se),Ee===null?pe=_e:Ee.sibling=_e,Ee=_e,fe=Te}if(Se===C.length)return n(E,fe),Me&&vn(E,Se),pe;if(fe===null){for(;Se<C.length;Se++)fe=G(E,C[Se],$),fe!==null&&(z=r(fe,z,Se),Ee===null?pe=fe:Ee.sibling=fe,Ee=fe);return Me&&vn(E,Se),pe}for(fe=l(fe);Se<C.length;Se++)Te=N(fe,E,Se,C[Se],$),Te!==null&&(e&&Te.alternate!==null&&fe.delete(Te.key===null?Se:Te.key),z=r(Te,z,Se),Ee===null?pe=Te:Ee.sibling=Te,Ee=Te);return e&&fe.forEach(function(ll){return t(E,ll)}),Me&&vn(E,Se),pe}function ve(E,z,C,$){if(C==null)throw Error(o(151));for(var pe=null,Ee=null,fe=z,Se=z=0,Te=null,_e=C.next();fe!==null&&!_e.done;Se++,_e=C.next()){fe.index>Se?(Te=fe,fe=null):Te=fe.sibling;var ll=D(E,fe,_e.value,$);if(ll===null){fe===null&&(fe=Te);break}e&&fe&&ll.alternate===null&&t(E,fe),z=r(ll,z,Se),Ee===null?pe=ll:Ee.sibling=ll,Ee=ll,fe=Te}if(_e.done)return n(E,fe),Me&&vn(E,Se),pe;if(fe===null){for(;!_e.done;Se++,_e=C.next())_e=G(E,_e.value,$),_e!==null&&(z=r(_e,z,Se),Ee===null?pe=_e:Ee.sibling=_e,Ee=_e);return Me&&vn(E,Se),pe}for(fe=l(fe);!_e.done;Se++,_e=C.next())_e=N(fe,E,Se,_e.value,$),_e!==null&&(e&&_e.alternate!==null&&fe.delete(_e.key===null?Se:_e.key),z=r(_e,z,Se),Ee===null?pe=_e:Ee.sibling=_e,Ee=_e);return e&&fe.forEach(function(Ig){return t(E,Ig)}),Me&&vn(E,Se),pe}function Ue(E,z,C,$){if(typeof C=="object"&&C!==null&&C.type===Z&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case O:e:{for(var pe=C.key;z!==null;){if(z.key===pe){if(pe=C.type,pe===Z){if(z.tag===7){n(E,z.sibling),$=i(z,C.props.children),$.return=E,E=$;break e}}else if(z.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===L&&yl(pe)===z.type){n(E,z.sibling),$=i(z,C.props),Ga($,C),$.return=E,E=$;break e}n(E,z);break}else t(E,z);z=z.sibling}C.type===Z?($=hl(C.props.children,E.mode,$,C.key),$.return=E,E=$):($=qi(C.type,C.key,C.props,null,E.mode,$),Ga($,C),$.return=E,E=$)}return d(E);case Q:e:{for(pe=C.key;z!==null;){if(z.key===pe)if(z.tag===4&&z.stateNode.containerInfo===C.containerInfo&&z.stateNode.implementation===C.implementation){n(E,z.sibling),$=i(z,C.children||[]),$.return=E,E=$;break e}else{n(E,z);break}else t(E,z);z=z.sibling}$=Tr(C,E.mode,$),$.return=E,E=$}return d(E);case L:return C=yl(C),Ue(E,z,C,$)}if(re(C))return ce(E,z,C,$);if(de(C)){if(pe=de(C),typeof pe!="function")throw Error(o(150));return C=pe.call(C),ve(E,z,C,$)}if(typeof C.then=="function")return Ue(E,z,Vi(C),$);if(C.$$typeof===X)return Ue(E,z,$i(E,C),$);Zi(E,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,z!==null&&z.tag===6?(n(E,z.sibling),$=i(z,C),$.return=E,E=$):(n(E,z),$=zr(C,E.mode,$),$.return=E,E=$),d(E)):n(E,z)}return function(E,z,C,$){try{$a=0;var pe=Ue(E,z,C,$);return na=null,pe}catch(fe){if(fe===ta||fe===Xi)throw fe;var Ee=Tt(29,fe,null,E.mode);return Ee.lanes=$,Ee.return=E,Ee}}}var bl=$c(!0),Gc=$c(!1),Ln=!1;function Br(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qr(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 Yn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function $n(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ce&2)!==0){var i=l.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),l.pending=t,t=Bi(e),Tc(e,null,n),t}return Hi(e,l,t,n),Bi(e)}function Xa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,ne(e,n)}}function Lr(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var i=null,r=null;if(n=n.firstBaseUpdate,n!==null){do{var d={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};r===null?i=r=d:r=r.next=d,n=n.next}while(n!==null);r===null?i=r=t:r=r.next=t}else i=r=t;n={baseState:l.baseState,firstBaseUpdate:i,lastBaseUpdate:r,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Yr=!1;function Qa(){if(Yr){var e=ea;if(e!==null)throw e}}function Va(e,t,n,l){Yr=!1;var i=e.updateQueue;Ln=!1;var r=i.firstBaseUpdate,d=i.lastBaseUpdate,p=i.shared.pending;if(p!==null){i.shared.pending=null;var b=p,A=b.next;b.next=null,d===null?r=A:d.next=A,d=b;var q=e.alternate;q!==null&&(q=q.updateQueue,p=q.lastBaseUpdate,p!==d&&(p===null?q.firstBaseUpdate=A:p.next=A,q.lastBaseUpdate=b))}if(r!==null){var G=i.baseState;d=0,q=A=b=null,p=r;do{var D=p.lane&-536870913,N=D!==p.lane;if(N?(ze&D)===D:(l&D)===D){D!==0&&D===Pl&&(Yr=!0),q!==null&&(q=q.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var ce=e,ve=p;D=t;var Ue=n;switch(ve.tag){case 1:if(ce=ve.payload,typeof ce=="function"){G=ce.call(Ue,G,D);break e}G=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=ve.payload,D=typeof ce=="function"?ce.call(Ue,G,D):ce,D==null)break e;G=S({},G,D);break e;case 2:Ln=!0}}D=p.callback,D!==null&&(e.flags|=64,N&&(e.flags|=8192),N=i.callbacks,N===null?i.callbacks=[D]:N.push(D))}else N={lane:D,tag:p.tag,payload:p.payload,callback:p.callback,next:null},q===null?(A=q=N,b=G):q=q.next=N,d|=D;if(p=p.next,p===null){if(p=i.shared.pending,p===null)break;N=p,p=N.next,N.next=null,i.lastBaseUpdate=N,i.shared.pending=null}}while(!0);q===null&&(b=G),i.baseState=b,i.firstBaseUpdate=A,i.lastBaseUpdate=q,r===null&&(i.shared.lanes=0),Zn|=d,e.lanes=d,e.memoizedState=G}}function Xc(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Qc(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Xc(n[e],t)}var la=y(null),Ki=y(0);function Vc(e,t){e=Tn,P(Ki,e),P(la,t),Tn=e|t.baseLanes}function $r(){P(Ki,Tn),P(la,la.current)}function Gr(){Tn=Ki.current,B(la),B(Ki)}var Mt=y(null),$t=null;function Gn(e){var t=e.alternate;P(Ke,Ke.current&1),P(Mt,e),$t===null&&(t===null||la.current!==null||t.memoizedState!==null)&&($t=e)}function Xr(e){P(Ke,Ke.current),P(Mt,e),$t===null&&($t=e)}function Zc(e){e.tag===22?(P(Ke,Ke.current),P(Mt,e),$t===null&&($t=e)):Xn()}function Xn(){P(Ke,Ke.current),P(Mt,Mt.current)}function Et(e){B(Mt),$t===e&&($t=null),B(Ke)}var Ke=y(0);function Wi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Fo(n)||Io(n)))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 yn=0,xe=null,Oe=null,Pe=null,Ji=!1,aa=!1,Sl=!1,Fi=0,Za=0,ia=null,$v=0;function Ve(){throw Error(o(321))}function Qr(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!zt(e[n],t[n]))return!1;return!0}function Vr(e,t,n,l,i,r){return yn=r,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Cd:ro,Sl=!1,r=n(l,i),Sl=!1,aa&&(r=Wc(t,n,l,i)),Kc(e),r}function Kc(e){M.H=Ja;var t=Oe!==null&&Oe.next!==null;if(yn=0,Pe=Oe=xe=null,Ji=!1,Za=0,ia=null,t)throw Error(o(300));e===null||et||(e=e.dependencies,e!==null&&Yi(e)&&(et=!0))}function Wc(e,t,n,l){xe=e;var i=0;do{if(aa&&(ia=null),Za=0,aa=!1,25<=i)throw Error(o(301));if(i+=1,Pe=Oe=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}M.H=Ad,r=t(n,l)}while(aa);return r}function Gv(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?Ka(t):t,e=e.useState()[0],(Oe!==null?Oe.memoizedState:null)!==e&&(xe.flags|=1024),t}function Zr(){var e=Fi!==0;return Fi=0,e}function Kr(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Wr(e){if(Ji){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ji=!1}yn=0,Pe=Oe=xe=null,aa=!1,Za=Fi=0,ia=null}function mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pe===null?xe.memoizedState=Pe=e:Pe=Pe.next=e,Pe}function We(){if(Oe===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=Pe===null?xe.memoizedState:Pe.next;if(t!==null)Pe=t,Oe=e;else{if(e===null)throw xe.alternate===null?Error(o(467)):Error(o(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},Pe===null?xe.memoizedState=Pe=e:Pe=Pe.next=e}return Pe}function Ii(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ka(e){var t=Za;return Za+=1,ia===null&&(ia=[]),e=qc(ia,e,t),t=xe,(Pe===null?t.memoizedState:Pe.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Cd:ro),e}function Pi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ka(e);if(e.$$typeof===X)return ut(e)}throw Error(o(438,String(e)))}function Jr(e){var t=null,n=xe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=xe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ii(),xe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=ae;return t.index++,n}function xn(e,t){return typeof t=="function"?t(e):t}function es(e){var t=We();return Fr(t,Oe,e)}function Fr(e,t,n){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=n;var i=e.baseQueue,r=l.pending;if(r!==null){if(i!==null){var d=i.next;i.next=r.next,r.next=d}t.baseQueue=i=r,l.pending=null}if(r=e.baseState,i===null)e.memoizedState=r;else{t=i.next;var p=d=null,b=null,A=t,q=!1;do{var G=A.lane&-536870913;if(G!==A.lane?(ze&G)===G:(yn&G)===G){var D=A.revertLane;if(D===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),G===Pl&&(q=!0);else if((yn&D)===D){A=A.next,D===Pl&&(q=!0);continue}else G={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},b===null?(p=b=G,d=r):b=b.next=G,xe.lanes|=D,Zn|=D;G=A.action,Sl&&n(r,G),r=A.hasEagerState?A.eagerState:n(r,G)}else D={lane:G,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},b===null?(p=b=D,d=r):b=b.next=D,xe.lanes|=G,Zn|=G;A=A.next}while(A!==null&&A!==t);if(b===null?d=r:b.next=p,!zt(r,e.memoizedState)&&(et=!0,q&&(n=ea,n!==null)))throw n;e.memoizedState=r,e.baseState=d,e.baseQueue=b,l.lastRenderedState=r}return i===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Ir(e){var t=We(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var l=n.dispatch,i=n.pending,r=t.memoizedState;if(i!==null){n.pending=null;var d=i=i.next;do r=e(r,d.action),d=d.next;while(d!==i);zt(r,t.memoizedState)||(et=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),n.lastRenderedState=r}return[r,l]}function Jc(e,t,n){var l=xe,i=We(),r=Me;if(r){if(n===void 0)throw Error(o(407));n=n()}else n=t();var d=!zt((Oe||i).memoizedState,n);if(d&&(i.memoizedState=n,et=!0),i=i.queue,to(Pc.bind(null,l,i,e),[e]),i.getSnapshot!==t||d||Pe!==null&&Pe.memoizedState.tag&1){if(l.flags|=2048,sa(9,{destroy:void 0},Ic.bind(null,l,i,n,t),null),He===null)throw Error(o(349));r||(yn&127)!==0||Fc(l,t,n)}return n}function Fc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=xe.updateQueue,t===null?(t=Ii(),xe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ic(e,t,n,l){t.value=n,t.getSnapshot=l,ed(t)&&td(e)}function Pc(e,t,n){return n(function(){ed(t)&&td(e)})}function ed(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!zt(e,n)}catch{return!0}}function td(e){var t=fl(e,2);t!==null&&wt(t,e,2)}function Pr(e){var t=mt();if(typeof e=="function"){var n=e;if(e=n(),Sl){Vt(!0);try{n()}finally{Vt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xn,lastRenderedState:e},t}function nd(e,t,n,l){return e.baseState=n,Fr(e,Oe,typeof l=="function"?l:xn)}function Xv(e,t,n,l,i){if(ls(e))throw Error(o(485));if(e=t.action,e!==null){var r={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){r.listeners.push(d)}};M.T!==null?n(!0):r.isTransition=!1,l(r),n=t.pending,n===null?(r.next=t.pending=r,ld(t,r)):(r.next=n.next,t.pending=n.next=r)}}function ld(e,t){var n=t.action,l=t.payload,i=e.state;if(t.isTransition){var r=M.T,d={};M.T=d;try{var p=n(i,l),b=M.S;b!==null&&b(d,p),ad(e,t,p)}catch(A){eo(e,t,A)}finally{r!==null&&d.types!==null&&(r.types=d.types),M.T=r}}else try{r=n(i,l),ad(e,t,r)}catch(A){eo(e,t,A)}}function ad(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){id(e,t,l)},function(l){return eo(e,t,l)}):id(e,t,n)}function id(e,t,n){t.status="fulfilled",t.value=n,sd(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ld(e,n)))}function eo(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,sd(t),t=t.next;while(t!==l)}e.action=null}function sd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rd(e,t){return t}function od(e,t){if(Me){var n=He.formState;if(n!==null){e:{var l=xe;if(Me){if(Ye){t:{for(var i=Ye,r=Yt;i.nodeType!==8;){if(!r){i=null;break t}if(i=Gt(i.nextSibling),i===null){i=null;break t}}r=i.data,i=r==="F!"||r==="F"?i:null}if(i){Ye=Gt(i.nextSibling),l=i.data==="F!";break e}}Bn(l)}l=!1}l&&(t=n[0])}}return n=mt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rd,lastRenderedState:t},n.queue=l,n=Md.bind(null,xe,l),l.dispatch=n,l=Pr(!1),r=so.bind(null,xe,!1,l.queue),l=mt(),i={state:t,dispatch:null,action:e,pending:null},l.queue=i,n=Xv.bind(null,xe,i,r,n),i.dispatch=n,l.memoizedState=e,[t,n,!1]}function ud(e){var t=We();return cd(t,Oe,e)}function cd(e,t,n){if(t=Fr(e,t,rd)[0],e=es(xn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Ka(t)}catch(d){throw d===ta?Xi:d}else l=t;t=We();var i=t.queue,r=i.dispatch;return n!==t.memoizedState&&(xe.flags|=2048,sa(9,{destroy:void 0},Qv.bind(null,i,n),null)),[l,r,e]}function Qv(e,t){e.action=t}function dd(e){var t=We(),n=Oe;if(n!==null)return cd(t,n,e);We(),t=t.memoizedState,n=We();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function sa(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=xe.updateQueue,t===null&&(t=Ii(),xe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function fd(){return We().memoizedState}function ts(e,t,n,l){var i=mt();xe.flags|=e,i.memoizedState=sa(1|t,{destroy:void 0},n,l===void 0?null:l)}function ns(e,t,n,l){var i=We();l=l===void 0?null:l;var r=i.memoizedState.inst;Oe!==null&&l!==null&&Qr(l,Oe.memoizedState.deps)?i.memoizedState=sa(t,r,n,l):(xe.flags|=e,i.memoizedState=sa(1|t,r,n,l))}function hd(e,t){ts(8390656,8,e,t)}function to(e,t){ns(2048,8,e,t)}function Vv(e){xe.flags|=4;var t=xe.updateQueue;if(t===null)t=Ii(),xe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function pd(e){var t=We().memoizedState;return Vv({ref:t,nextImpl:e}),function(){if((Ce&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function vd(e,t){return ns(4,2,e,t)}function gd(e,t){return ns(4,4,e,t)}function md(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function yd(e,t,n){n=n!=null?n.concat([e]):null,ns(4,4,md.bind(null,t,e),n)}function no(){}function xd(e,t){var n=We();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&Qr(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function bd(e,t){var n=We();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&Qr(t,l[1]))return l[0];if(l=e(),Sl){Vt(!0);try{e()}finally{Vt(!1)}}return n.memoizedState=[l,t],l}function lo(e,t,n){return n===void 0||(yn&1073741824)!==0&&(ze&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=jf(),xe.lanes|=e,Zn|=e,n)}function Sd(e,t,n,l){return zt(n,t)?n:la.current!==null?(e=lo(e,n,l),zt(e,t)||(et=!0),e):(yn&42)===0||(yn&1073741824)!==0&&(ze&261930)===0?(et=!0,e.memoizedState=n):(e=jf(),xe.lanes|=e,Zn|=e,t)}function jd(e,t,n,l,i){var r=Y.p;Y.p=r!==0&&8>r?r:8;var d=M.T,p={};M.T=p,so(e,!1,t,n);try{var b=i(),A=M.S;if(A!==null&&A(p,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var q=Yv(b,l);Wa(e,t,q,At(e))}else Wa(e,t,l,At(e))}catch(G){Wa(e,t,{then:function(){},status:"rejected",reason:G},At())}finally{Y.p=r,d!==null&&p.types!==null&&(d.types=p.types),M.T=d}}function Zv(){}function ao(e,t,n,l){if(e.tag!==5)throw Error(o(476));var i=kd(e).queue;jd(e,i,t,I,n===null?Zv:function(){return wd(e),n(l)})}function kd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xn,lastRenderedState:I},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function wd(e){var t=kd(e);t.next===null&&(t=e.alternate.memoizedState),Wa(e,t.next.queue,{},At())}function io(){return ut(fi)}function zd(){return We().memoizedState}function Td(){return We().memoizedState}function Kv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=At();e=Yn(n);var l=$n(t,e,n);l!==null&&(wt(l,t,n),Xa(l,t,n)),t={cache:Or()},e.payload=t;return}t=t.return}}function Wv(e,t,n){var l=At();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ls(e)?Ed(t,n):(n=kr(e,t,n,l),n!==null&&(wt(n,e,l),_d(n,t,l)))}function Md(e,t,n){var l=At();Wa(e,t,n,l)}function Wa(e,t,n,l){var i={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ls(e))Ed(t,i);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var d=t.lastRenderedState,p=r(d,n);if(i.hasEagerState=!0,i.eagerState=p,zt(p,d))return Hi(e,t,i,0),He===null&&Ui(),!1}catch{}if(n=kr(e,t,i,l),n!==null)return wt(n,e,l),_d(n,t,l),!0}return!1}function so(e,t,n,l){if(l={lane:2,revertLane:qo(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ls(e)){if(t)throw Error(o(479))}else t=kr(e,n,l,2),t!==null&&wt(t,e,2)}function ls(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Ed(e,t){aa=Ji=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function _d(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,ne(e,n)}}var Ja={readContext:ut,use:Pi,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useLayoutEffect:Ve,useInsertionEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useSyncExternalStore:Ve,useId:Ve,useHostTransitionStatus:Ve,useFormState:Ve,useActionState:Ve,useOptimistic:Ve,useMemoCache:Ve,useCacheRefresh:Ve};Ja.useEffectEvent=Ve;var Cd={readContext:ut,use:Pi,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:ut,useEffect:hd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ts(4194308,4,md.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){ts(4,2,e,t)},useMemo:function(e,t){var n=mt();t=t===void 0?null:t;var l=e();if(Sl){Vt(!0);try{e()}finally{Vt(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=mt();if(n!==void 0){var i=n(t);if(Sl){Vt(!0);try{n(t)}finally{Vt(!1)}}}else i=t;return l.memoizedState=l.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},l.queue=e,e=e.dispatch=Wv.bind(null,xe,e),[l.memoizedState,e]},useRef:function(e){var t=mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Pr(e);var t=e.queue,n=Md.bind(null,xe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:no,useDeferredValue:function(e,t){var n=mt();return lo(n,e,t)},useTransition:function(){var e=Pr(!1);return e=jd.bind(null,xe,e.queue,!0,!1),mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=xe,i=mt();if(Me){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),He===null)throw Error(o(349));(ze&127)!==0||Fc(l,t,n)}i.memoizedState=n;var r={value:n,getSnapshot:t};return i.queue=r,hd(Pc.bind(null,l,r,e),[e]),l.flags|=2048,sa(9,{destroy:void 0},Ic.bind(null,l,r,n,t),null),n},useId:function(){var e=mt(),t=He.identifierPrefix;if(Me){var n=It,l=Ft;n=(l&~(1<<32-gt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Fi++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=$v++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:io,useFormState:od,useActionState:od,useOptimistic:function(e){var t=mt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=so.bind(null,xe,!0,n),n.dispatch=t,[e,t]},useMemoCache:Jr,useCacheRefresh:function(){return mt().memoizedState=Kv.bind(null,xe)},useEffectEvent:function(e){var t=mt(),n={impl:e};return t.memoizedState=n,function(){if((Ce&2)!==0)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},ro={readContext:ut,use:Pi,useCallback:xd,useContext:ut,useEffect:to,useImperativeHandle:yd,useInsertionEffect:vd,useLayoutEffect:gd,useMemo:bd,useReducer:es,useRef:fd,useState:function(){return es(xn)},useDebugValue:no,useDeferredValue:function(e,t){var n=We();return Sd(n,Oe.memoizedState,e,t)},useTransition:function(){var e=es(xn)[0],t=We().memoizedState;return[typeof e=="boolean"?e:Ka(e),t]},useSyncExternalStore:Jc,useId:zd,useHostTransitionStatus:io,useFormState:ud,useActionState:ud,useOptimistic:function(e,t){var n=We();return nd(n,Oe,e,t)},useMemoCache:Jr,useCacheRefresh:Td};ro.useEffectEvent=pd;var Ad={readContext:ut,use:Pi,useCallback:xd,useContext:ut,useEffect:to,useImperativeHandle:yd,useInsertionEffect:vd,useLayoutEffect:gd,useMemo:bd,useReducer:Ir,useRef:fd,useState:function(){return Ir(xn)},useDebugValue:no,useDeferredValue:function(e,t){var n=We();return Oe===null?lo(n,e,t):Sd(n,Oe.memoizedState,e,t)},useTransition:function(){var e=Ir(xn)[0],t=We().memoizedState;return[typeof e=="boolean"?e:Ka(e),t]},useSyncExternalStore:Jc,useId:zd,useHostTransitionStatus:io,useFormState:dd,useActionState:dd,useOptimistic:function(e,t){var n=We();return Oe!==null?nd(n,Oe,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Jr,useCacheRefresh:Td};Ad.useEffectEvent=pd;function oo(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:S({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var uo={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=At(),i=Yn(l);i.payload=t,n!=null&&(i.callback=n),t=$n(e,i,l),t!==null&&(wt(t,e,l),Xa(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=At(),i=Yn(l);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=$n(e,i,l),t!==null&&(wt(t,e,l),Xa(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=At(),l=Yn(n);l.tag=2,t!=null&&(l.callback=t),t=$n(e,l,n),t!==null&&(wt(t,e,n),Xa(t,e,n))}};function Dd(e,t,n,l,i,r,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,r,d):t.prototype&&t.prototype.isPureReactComponent?!Ua(n,l)||!Ua(i,r):!0}function Rd(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&uo.enqueueReplaceState(t,t.state,null)}function jl(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=S({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function Od(e){Ni(e)}function Nd(e){console.error(e)}function Ud(e){Ni(e)}function as(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Hd(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function co(e,t,n){return n=Yn(n),n.tag=3,n.payload={element:null},n.callback=function(){as(e,t)},n}function Bd(e){return e=Yn(e),e.tag=3,e}function qd(e,t,n,l){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var r=l.value;e.payload=function(){return i(r)},e.callback=function(){Hd(t,n,l)}}var d=n.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Hd(t,n,l),typeof i!="function"&&(Kn===null?Kn=new Set([this]):Kn.add(this));var p=l.stack;this.componentDidCatch(l.value,{componentStack:p!==null?p:""})})}function Jv(e,t,n,l,i){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&Il(t,n,i,!0),n=Mt.current,n!==null){switch(n.tag){case 31:case 13:return $t===null?gs():n.alternate===null&&Ze===0&&(Ze=3),n.flags&=-257,n.flags|=65536,n.lanes=i,l===Qi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),Uo(e,l,i)),!1;case 22:return n.flags|=65536,l===Qi?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),Uo(e,l,i)),!1}throw Error(o(435,n.tag))}return Uo(e,l,i),gs(),!1}if(Me)return t=Mt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,l!==_r&&(e=Error(o(422),{cause:l}),qa(Bt(e,n)))):(l!==_r&&(t=Error(o(423),{cause:l}),qa(Bt(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,l=Bt(l,n),i=co(e.stateNode,l,i),Lr(e,i),Ze!==4&&(Ze=2)),!1;var r=Error(o(520),{cause:l});if(r=Bt(r,n),ai===null?ai=[r]:ai.push(r),Ze!==4&&(Ze=2),t===null)return!0;l=Bt(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=co(n.stateNode,l,e),Lr(n,e),!1;case 1:if(t=n.type,r=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(Kn===null||!Kn.has(r))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Bd(i),qd(i,e,n,l),Lr(n,i),!1}n=n.return}while(n!==null);return!1}var fo=Error(o(461)),et=!1;function ct(e,t,n,l){t.child=e===null?Gc(t,null,n,l):bl(t,e.child,n,l)}function Ld(e,t,n,l,i){n=n.render;var r=t.ref;if("ref"in l){var d={};for(var p in l)p!=="ref"&&(d[p]=l[p])}else d=l;return gl(t),l=Vr(e,t,n,d,r,i),p=Zr(),e!==null&&!et?(Kr(e,t,i),bn(e,t,i)):(Me&&p&&Mr(t),t.flags|=1,ct(e,t,l,i),t.child)}function Yd(e,t,n,l,i){if(e===null){var r=n.type;return typeof r=="function"&&!wr(r)&&r.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=r,$d(e,t,r,l,i)):(e=qi(n.type,null,l,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!bo(e,i)){var d=r.memoizedProps;if(n=n.compare,n=n!==null?n:Ua,n(d,l)&&e.ref===t.ref)return bn(e,t,i)}return t.flags|=1,e=pn(r,l),e.ref=t.ref,e.return=t,t.child=e}function $d(e,t,n,l,i){if(e!==null){var r=e.memoizedProps;if(Ua(r,l)&&e.ref===t.ref)if(et=!1,t.pendingProps=l=r,bo(e,i))(e.flags&131072)!==0&&(et=!0);else return t.lanes=e.lanes,bn(e,t,i)}return ho(e,t,n,l,i)}function Gd(e,t,n,l){var i=l.children,r=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(r=r!==null?r.baseLanes|n:n,e!==null){for(l=t.child=e.child,i=0;l!==null;)i=i|l.lanes|l.childLanes,l=l.sibling;l=i&~r}else l=0,t.child=null;return Xd(e,t,r,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Gi(t,r!==null?r.cachePool:null),r!==null?Vc(t,r):$r(),Zc(t);else return l=t.lanes=536870912,Xd(e,t,r!==null?r.baseLanes|n:n,n,l)}else r!==null?(Gi(t,r.cachePool),Vc(t,r),Xn(),t.memoizedState=null):(e!==null&&Gi(t,null),$r(),Xn());return ct(e,t,i,n),t.child}function Fa(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Xd(e,t,n,l,i){var r=Ur();return r=r===null?null:{parent:Ie._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},e!==null&&Gi(t,null),$r(),Zc(t),e!==null&&Il(e,t,l,!0),t.childLanes=i,null}function is(e,t){return t=rs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Qd(e,t,n){return bl(t,e.child,null,n),e=is(t,t.pendingProps),e.flags|=2,Et(t),t.memoizedState=null,e}function Fv(e,t,n){var l=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Me){if(l.mode==="hidden")return e=is(t,l),t.lanes=536870912,Fa(null,e);if(Xr(t),(e=Ye)?(e=ah(e,Yt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Un!==null?{id:Ft,overflow:It}:null,retryLane:536870912,hydrationErrors:null},n=Ec(e),n.return=t,t.child=n,ot=t,Ye=null)):e=null,e===null)throw Bn(t);return t.lanes=536870912,null}return is(t,l)}var r=e.memoizedState;if(r!==null){var d=r.dehydrated;if(Xr(t),i)if(t.flags&256)t.flags&=-257,t=Qd(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(et||Il(e,t,n,!1),i=(n&e.childLanes)!==0,et||i){if(l=He,l!==null&&(d=nt(l,n),d!==0&&d!==r.retryLane))throw r.retryLane=d,fl(e,d),wt(l,e,d),fo;gs(),t=Qd(e,t,n)}else e=r.treeContext,Ye=Gt(d.nextSibling),ot=t,Me=!0,Hn=null,Yt=!1,e!==null&&Ac(t,e),t=is(t,l),t.flags|=4096;return t}return e=pn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ss(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(o(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function ho(e,t,n,l,i){return gl(t),n=Vr(e,t,n,l,void 0,i),l=Zr(),e!==null&&!et?(Kr(e,t,i),bn(e,t,i)):(Me&&l&&Mr(t),t.flags|=1,ct(e,t,n,i),t.child)}function Vd(e,t,n,l,i,r){return gl(t),t.updateQueue=null,n=Wc(t,l,n,i),Kc(e),l=Zr(),e!==null&&!et?(Kr(e,t,r),bn(e,t,r)):(Me&&l&&Mr(t),t.flags|=1,ct(e,t,n,r),t.child)}function Zd(e,t,n,l,i){if(gl(t),t.stateNode===null){var r=Kl,d=n.contextType;typeof d=="object"&&d!==null&&(r=ut(d)),r=new n(l,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=uo,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=l,r.state=t.memoizedState,r.refs={},Br(t),d=n.contextType,r.context=typeof d=="object"&&d!==null?ut(d):Kl,r.state=t.memoizedState,d=n.getDerivedStateFromProps,typeof d=="function"&&(oo(t,n,d,l),r.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(d=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),d!==r.state&&uo.enqueueReplaceState(r,r.state,null),Va(t,l,r,i),Qa(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){r=t.stateNode;var p=t.memoizedProps,b=jl(n,p);r.props=b;var A=r.context,q=n.contextType;d=Kl,typeof q=="object"&&q!==null&&(d=ut(q));var G=n.getDerivedStateFromProps;q=typeof G=="function"||typeof r.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,q||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(p||A!==d)&&Rd(t,r,l,d),Ln=!1;var D=t.memoizedState;r.state=D,Va(t,l,r,i),Qa(),A=t.memoizedState,p||D!==A||Ln?(typeof G=="function"&&(oo(t,n,G,l),A=t.memoizedState),(b=Ln||Dd(t,n,b,l,D,A,d))?(q||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=A),r.props=l,r.state=A,r.context=d,l=b):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{r=t.stateNode,qr(e,t),d=t.memoizedProps,q=jl(n,d),r.props=q,G=t.pendingProps,D=r.context,A=n.contextType,b=Kl,typeof A=="object"&&A!==null&&(b=ut(A)),p=n.getDerivedStateFromProps,(A=typeof p=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(d!==G||D!==b)&&Rd(t,r,l,b),Ln=!1,D=t.memoizedState,r.state=D,Va(t,l,r,i),Qa();var N=t.memoizedState;d!==G||D!==N||Ln||e!==null&&e.dependencies!==null&&Yi(e.dependencies)?(typeof p=="function"&&(oo(t,n,p,l),N=t.memoizedState),(q=Ln||Dd(t,n,q,l,D,N,b)||e!==null&&e.dependencies!==null&&Yi(e.dependencies))?(A||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(l,N,b),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(l,N,b)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||d===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=N),r.props=l,r.state=N,r.context=b,l=q):(typeof r.componentDidUpdate!="function"||d===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),l=!1)}return r=l,ss(e,t),l=(t.flags&128)!==0,r||l?(r=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&l?(t.child=bl(t,e.child,null,i),t.child=bl(t,null,n,i)):ct(e,t,n,i),t.memoizedState=r.state,e=t.child):e=bn(e,t,i),e}function Kd(e,t,n,l){return pl(),t.flags|=256,ct(e,t,n,l),t.child}var po={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vo(e){return{baseLanes:e,cachePool:Hc()}}function go(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Ct),e}function Wd(e,t,n){var l=t.pendingProps,i=!1,r=(t.flags&128)!==0,d;if((d=r)||(d=e!==null&&e.memoizedState===null?!1:(Ke.current&2)!==0),d&&(i=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(Me){if(i?Gn(t):Xn(),(e=Ye)?(e=ah(e,Yt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Un!==null?{id:Ft,overflow:It}:null,retryLane:536870912,hydrationErrors:null},n=Ec(e),n.return=t,t.child=n,ot=t,Ye=null)):e=null,e===null)throw Bn(t);return Io(e)?t.lanes=32:t.lanes=536870912,null}var p=l.children;return l=l.fallback,i?(Xn(),i=t.mode,p=rs({mode:"hidden",children:p},i),l=hl(l,i,n,null),p.return=t,l.return=t,p.sibling=l,t.child=p,l=t.child,l.memoizedState=vo(n),l.childLanes=go(e,d,n),t.memoizedState=po,Fa(null,l)):(Gn(t),mo(t,p))}var b=e.memoizedState;if(b!==null&&(p=b.dehydrated,p!==null)){if(r)t.flags&256?(Gn(t),t.flags&=-257,t=yo(e,t,n)):t.memoizedState!==null?(Xn(),t.child=e.child,t.flags|=128,t=null):(Xn(),p=l.fallback,i=t.mode,l=rs({mode:"visible",children:l.children},i),p=hl(p,i,n,null),p.flags|=2,l.return=t,p.return=t,l.sibling=p,t.child=l,bl(t,e.child,null,n),l=t.child,l.memoizedState=vo(n),l.childLanes=go(e,d,n),t.memoizedState=po,t=Fa(null,l));else if(Gn(t),Io(p)){if(d=p.nextSibling&&p.nextSibling.dataset,d)var A=d.dgst;d=A,l=Error(o(419)),l.stack="",l.digest=d,qa({value:l,source:null,stack:null}),t=yo(e,t,n)}else if(et||Il(e,t,n,!1),d=(n&e.childLanes)!==0,et||d){if(d=He,d!==null&&(l=nt(d,n),l!==0&&l!==b.retryLane))throw b.retryLane=l,fl(e,l),wt(d,e,l),fo;Fo(p)||gs(),t=yo(e,t,n)}else Fo(p)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Ye=Gt(p.nextSibling),ot=t,Me=!0,Hn=null,Yt=!1,e!==null&&Ac(t,e),t=mo(t,l.children),t.flags|=4096);return t}return i?(Xn(),p=l.fallback,i=t.mode,b=e.child,A=b.sibling,l=pn(b,{mode:"hidden",children:l.children}),l.subtreeFlags=b.subtreeFlags&65011712,A!==null?p=pn(A,p):(p=hl(p,i,n,null),p.flags|=2),p.return=t,l.return=t,l.sibling=p,t.child=l,Fa(null,l),l=t.child,p=e.child.memoizedState,p===null?p=vo(n):(i=p.cachePool,i!==null?(b=Ie._currentValue,i=i.parent!==b?{parent:b,pool:b}:i):i=Hc(),p={baseLanes:p.baseLanes|n,cachePool:i}),l.memoizedState=p,l.childLanes=go(e,d,n),t.memoizedState=po,Fa(e.child,l)):(Gn(t),n=e.child,e=n.sibling,n=pn(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=n,t.memoizedState=null,n)}function mo(e,t){return t=rs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function rs(e,t){return e=Tt(22,e,null,t),e.lanes=0,e}function yo(e,t,n){return bl(t,e.child,null,n),e=mo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Jd(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Dr(e.return,t,n)}function xo(e,t,n,l,i,r){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:i,treeForkCount:r}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=l,d.tail=n,d.tailMode=i,d.treeForkCount=r)}function Fd(e,t,n){var l=t.pendingProps,i=l.revealOrder,r=l.tail;l=l.children;var d=Ke.current,p=(d&2)!==0;if(p?(d=d&1|2,t.flags|=128):d&=1,P(Ke,d),ct(e,t,l,n),l=Me?Ba:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Jd(e,n,t);else if(e.tag===19)Jd(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Wi(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),xo(t,!1,i,n,r,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Wi(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}xo(t,!0,n,null,r,l);break;case"together":xo(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function bn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Zn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Il(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,n=pn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=pn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function bo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Yi(e)))}function Iv(e,t,n){switch(t.tag){case 3:Ge(t,t.stateNode.containerInfo),qn(t,Ie,e.memoizedState.cache),pl();break;case 27:case 5:Xe(t);break;case 4:Ge(t,t.stateNode.containerInfo);break;case 10:qn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Xr(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Gn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Wd(e,t,n):(Gn(t),e=bn(e,t,n),e!==null?e.sibling:null);Gn(t);break;case 19:var i=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(Il(e,t,n,!1),l=(n&t.childLanes)!==0),i){if(l)return Fd(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),P(Ke,Ke.current),l)break;return null;case 22:return t.lanes=0,Gd(e,t,n,t.pendingProps);case 24:qn(t,Ie,e.memoizedState.cache)}return bn(e,t,n)}function Id(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)et=!0;else{if(!bo(e,n)&&(t.flags&128)===0)return et=!1,Iv(e,t,n);et=(e.flags&131072)!==0}else et=!1,Me&&(t.flags&1048576)!==0&&Cc(t,Ba,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=yl(t.elementType),t.type=e,typeof e=="function")wr(e)?(l=jl(e,l),t.tag=1,t=Zd(null,t,e,l,n)):(t.tag=0,t=ho(null,t,e,l,n));else{if(e!=null){var i=e.$$typeof;if(i===J){t.tag=11,t=Ld(null,t,e,l,n);break e}else if(i===U){t.tag=14,t=Yd(null,t,e,l,n);break e}}throw t=je(e)||e,Error(o(306,t,""))}}return t;case 0:return ho(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,i=jl(l,t.pendingProps),Zd(e,t,l,i,n);case 3:e:{if(Ge(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var r=t.memoizedState;i=r.element,qr(e,t),Va(t,l,null,n);var d=t.memoizedState;if(l=d.cache,qn(t,Ie,l),l!==r.cache&&Rr(t,[Ie],n,!0),Qa(),l=d.element,r.isDehydrated)if(r={element:l,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=Kd(e,t,l,n);break e}else if(l!==i){i=Bt(Error(o(424)),t),qa(i),t=Kd(e,t,l,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ye=Gt(e.firstChild),ot=t,Me=!0,Hn=null,Yt=!0,n=Gc(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(pl(),l===i){t=bn(e,t,n);break e}ct(e,t,l,n)}t=t.child}return t;case 26:return ss(e,t),e===null?(n=ch(t.type,null,t.pendingProps,null))?t.memoizedState=n:Me||(n=t.type,e=t.pendingProps,l=ks(oe.current).createElement(n),l[rt]=t,l[yt]=e,dt(l,n,e),at(l),t.stateNode=l):t.memoizedState=ch(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Xe(t),e===null&&Me&&(l=t.stateNode=rh(t.type,t.pendingProps,oe.current),ot=t,Yt=!0,i=Ye,In(t.type)?(Po=i,Ye=Gt(l.firstChild)):Ye=i),ct(e,t,t.pendingProps.children,n),ss(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Me&&((i=l=Ye)&&(l=Eg(l,t.type,t.pendingProps,Yt),l!==null?(t.stateNode=l,ot=t,Ye=Gt(l.firstChild),Yt=!1,i=!0):i=!1),i||Bn(t)),Xe(t),i=t.type,r=t.pendingProps,d=e!==null?e.memoizedProps:null,l=r.children,Ko(i,r)?l=null:d!==null&&Ko(i,d)&&(t.flags|=32),t.memoizedState!==null&&(i=Vr(e,t,Gv,null,null,n),fi._currentValue=i),ss(e,t),ct(e,t,l,n),t.child;case 6:return e===null&&Me&&((e=n=Ye)&&(n=_g(n,t.pendingProps,Yt),n!==null?(t.stateNode=n,ot=t,Ye=null,e=!0):e=!1),e||Bn(t)),null;case 13:return Wd(e,t,n);case 4:return Ge(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=bl(t,null,l,n):ct(e,t,l,n),t.child;case 11:return Ld(e,t,t.type,t.pendingProps,n);case 7:return ct(e,t,t.pendingProps,n),t.child;case 8:return ct(e,t,t.pendingProps.children,n),t.child;case 12:return ct(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,qn(t,t.type,l.value),ct(e,t,l.children,n),t.child;case 9:return i=t.type._context,l=t.pendingProps.children,gl(t),i=ut(i),l=l(i),t.flags|=1,ct(e,t,l,n),t.child;case 14:return Yd(e,t,t.type,t.pendingProps,n);case 15:return $d(e,t,t.type,t.pendingProps,n);case 19:return Fd(e,t,n);case 31:return Fv(e,t,n);case 22:return Gd(e,t,n,t.pendingProps);case 24:return gl(t),l=ut(Ie),e===null?(i=Ur(),i===null&&(i=He,r=Or(),i.pooledCache=r,r.refCount++,r!==null&&(i.pooledCacheLanes|=n),i=r),t.memoizedState={parent:l,cache:i},Br(t),qn(t,Ie,i)):((e.lanes&n)!==0&&(qr(e,t),Va(t,null,null,n),Qa()),i=e.memoizedState,r=t.memoizedState,i.parent!==l?(i={parent:l,cache:l},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),qn(t,Ie,l)):(l=r.cache,qn(t,Ie,l),l!==i.cache&&Rr(t,[Ie],n,!0))),ct(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Sn(e){e.flags|=4}function So(e,t,n,l,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Tf())e.flags|=8192;else throw xl=Qi,Hr}else e.flags&=-16777217}function Pd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!vh(t))if(Tf())e.flags|=8192;else throw xl=Qi,Hr}function os(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?wa():536870912,e.lanes|=t,ca|=t)}function Ia(e,t){if(!Me)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function $e(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags&65011712,l|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags,l|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function Pv(e,t,n){var l=t.pendingProps;switch(Er(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(t),null;case 1:return $e(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),mn(Ie),K(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Fl(t)?Sn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Cr())),$e(t),null;case 26:var i=t.type,r=t.memoizedState;return e===null?(Sn(t),r!==null?($e(t),Pd(t,r)):($e(t),So(t,i,null,l,n))):r?r!==e.memoizedState?(Sn(t),$e(t),Pd(t,r)):($e(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Sn(t),$e(t),So(t,i,e,l,n)),null;case 27:if(Be(t),n=oe.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Sn(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return $e(t),null}e=ee.current,Fl(t)?Dc(t):(e=rh(i,l,n),t.stateNode=e,Sn(t))}return $e(t),null;case 5:if(Be(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Sn(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return $e(t),null}if(r=ee.current,Fl(t))Dc(t);else{var d=ks(oe.current);switch(r){case 1:r=d.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:r=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":r=d.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":r=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":r=d.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof l.is=="string"?d.createElement("select",{is:l.is}):d.createElement("select"),l.multiple?r.multiple=!0:l.size&&(r.size=l.size);break;default:r=typeof l.is=="string"?d.createElement(i,{is:l.is}):d.createElement(i)}}r[rt]=t,r[yt]=l;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)r.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=r;e:switch(dt(r,i,l),i){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Sn(t)}}return $e(t),So(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Sn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=oe.current,Fl(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,i=ot,i!==null)switch(i.tag){case 27:case 5:l=i.memoizedProps}e[rt]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||Jf(e.nodeValue,n)),e||Bn(t,!0)}else e=ks(e).createTextNode(l),e[rt]=t,t.stateNode=e}return $e(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=Fl(t),n!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[rt]=t}else pl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),e=!1}else n=Cr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Et(t),t):(Et(t),null);if((t.flags&128)!==0)throw Error(o(558))}return $e(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Fl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(o(317));i[rt]=t}else pl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),i=!1}else i=Cr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Et(t),t):(Et(t),null)}return Et(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,i=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(i=l.alternate.memoizedState.cachePool.pool),r=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(r=l.memoizedState.cachePool.pool),r!==i&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),os(t,t.updateQueue),$e(t),null);case 4:return K(),e===null&&Go(t.stateNode.containerInfo),$e(t),null;case 10:return mn(t.type),$e(t),null;case 19:if(B(Ke),l=t.memoizedState,l===null)return $e(t),null;if(i=(t.flags&128)!==0,r=l.rendering,r===null)if(i)Ia(l,!1);else{if(Ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=Wi(e),r!==null){for(t.flags|=128,Ia(l,!1),e=r.updateQueue,t.updateQueue=e,os(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Mc(n,e),n=n.sibling;return P(Ke,Ke.current&1|2),Me&&vn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ht()>hs&&(t.flags|=128,i=!0,Ia(l,!1),t.lanes=4194304)}else{if(!i)if(e=Wi(r),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,os(t,e),Ia(l,!0),l.tail===null&&l.tailMode==="hidden"&&!r.alternate&&!Me)return $e(t),null}else 2*ht()-l.renderingStartTime>hs&&n!==536870912&&(t.flags|=128,i=!0,Ia(l,!1),t.lanes=4194304);l.isBackwards?(r.sibling=t.child,t.child=r):(e=l.last,e!==null?e.sibling=r:t.child=r,l.last=r)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=ht(),e.sibling=null,n=Ke.current,P(Ke,i?n&1|2:n&1),Me&&vn(t,l.treeForkCount),e):($e(t),null);case 22:case 23:return Et(t),Gr(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),n=t.updateQueue,n!==null&&os(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&B(ml),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),mn(Ie),$e(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function eg(e,t){switch(Er(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return mn(Ie),K(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Be(t),null;case 31:if(t.memoizedState!==null){if(Et(t),t.alternate===null)throw Error(o(340));pl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Et(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));pl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(Ke),null;case 4:return K(),null;case 10:return mn(t.type),null;case 22:case 23:return Et(t),Gr(),e!==null&&B(ml),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return mn(Ie),null;case 25:return null;default:return null}}function ef(e,t){switch(Er(t),t.tag){case 3:mn(Ie),K();break;case 26:case 27:case 5:Be(t);break;case 4:K();break;case 31:t.memoizedState!==null&&Et(t);break;case 13:Et(t);break;case 19:B(Ke);break;case 10:mn(t.type);break;case 22:case 23:Et(t),Gr(),e!==null&&B(ml);break;case 24:mn(Ie)}}function Pa(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var i=l.next;n=i;do{if((n.tag&e)===e){l=void 0;var r=n.create,d=n.inst;l=r(),d.destroy=l}n=n.next}while(n!==i)}}catch(p){Re(t,t.return,p)}}function Qn(e,t,n){try{var l=t.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var r=i.next;l=r;do{if((l.tag&e)===e){var d=l.inst,p=d.destroy;if(p!==void 0){d.destroy=void 0,i=t;var b=n,A=p;try{A()}catch(q){Re(i,b,q)}}}l=l.next}while(l!==r)}}catch(q){Re(t,t.return,q)}}function tf(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Qc(t,n)}catch(l){Re(e,e.return,l)}}}function nf(e,t,n){n.props=jl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Re(e,t,l)}}function ei(e,t){try{var n=e.ref;if(n!==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 n=="function"?e.refCleanup=n(l):n.current=l}}catch(i){Re(e,t,i)}}function Pt(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(i){Re(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Re(e,t,i)}else n.current=null}function lf(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(i){Re(e,e.return,i)}}function jo(e,t,n){try{var l=e.stateNode;jg(l,e.type,n,t),l[yt]=t}catch(i){Re(e,e.return,i)}}function af(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&In(e.type)||e.tag===4}function ko(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||af(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&&In(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 wo(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=fn));else if(l!==4&&(l===27&&In(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(wo(e,t,n),e=e.sibling;e!==null;)wo(e,t,n),e=e.sibling}function us(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&In(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(us(e,t,n),e=e.sibling;e!==null;)us(e,t,n),e=e.sibling}function sf(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);dt(t,l,n),t[rt]=e,t[yt]=n}catch(r){Re(e,e.return,r)}}var jn=!1,tt=!1,zo=!1,rf=typeof WeakSet=="function"?WeakSet:Set,it=null;function tg(e,t){if(e=e.containerInfo,Vo=Cs,e=yc(e),mr(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var i=l.anchorOffset,r=l.focusNode;l=l.focusOffset;try{n.nodeType,r.nodeType}catch{n=null;break e}var d=0,p=-1,b=-1,A=0,q=0,G=e,D=null;t:for(;;){for(var N;G!==n||i!==0&&G.nodeType!==3||(p=d+i),G!==r||l!==0&&G.nodeType!==3||(b=d+l),G.nodeType===3&&(d+=G.nodeValue.length),(N=G.firstChild)!==null;)D=G,G=N;for(;;){if(G===e)break t;if(D===n&&++A===i&&(p=d),D===r&&++q===l&&(b=d),(N=G.nextSibling)!==null)break;G=D,D=G.parentNode}G=N}n=p===-1||b===-1?null:{start:p,end:b}}else n=null}n=n||{start:0,end:0}}else n=null;for(Zo={focusedElem:e,selectionRange:n},Cs=!1,it=t;it!==null;)if(t=it,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,it=e;else for(;it!==null;){switch(t=it,r=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(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&r!==null){e=void 0,n=t,i=r.memoizedProps,r=r.memoizedState,l=n.stateNode;try{var ce=jl(n.type,i);e=l.getSnapshotBeforeUpdate(ce,r),l.__reactInternalSnapshotBeforeUpdate=e}catch(ve){Re(n,n.return,ve)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Jo(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Jo(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,it=e;break}it=t.return}}function of(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:wn(e,n),l&4&&Pa(5,n);break;case 1:if(wn(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(d){Re(n,n.return,d)}else{var i=jl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){Re(n,n.return,d)}}l&64&&tf(n),l&512&&ei(n,n.return);break;case 3:if(wn(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Qc(e,t)}catch(d){Re(n,n.return,d)}}break;case 27:t===null&&l&4&&sf(n);case 26:case 5:wn(e,n),t===null&&l&4&&lf(n),l&512&&ei(n,n.return);break;case 12:wn(e,n);break;case 31:wn(e,n),l&4&&df(e,n);break;case 13:wn(e,n),l&4&&ff(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=cg.bind(null,n),Cg(e,n))));break;case 22:if(l=n.memoizedState!==null||jn,!l){t=t!==null&&t.memoizedState!==null||tt,i=jn;var r=tt;jn=l,(tt=t)&&!r?zn(e,n,(n.subtreeFlags&8772)!==0):wn(e,n),jn=i,tt=r}break;case 30:break;default:wn(e,n)}}function uf(e){var t=e.alternate;t!==null&&(e.alternate=null,uf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&er(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 Qe=null,bt=!1;function kn(e,t,n){for(n=n.child;n!==null;)cf(e,t,n),n=n.sibling}function cf(e,t,n){if(st&&typeof st.onCommitFiberUnmount=="function")try{st.onCommitFiberUnmount(on,n)}catch{}switch(n.tag){case 26:tt||Pt(n,t),kn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:tt||Pt(n,t);var l=Qe,i=bt;In(n.type)&&(Qe=n.stateNode,bt=!1),kn(e,t,n),ui(n.stateNode),Qe=l,bt=i;break;case 5:tt||Pt(n,t);case 6:if(l=Qe,i=bt,Qe=null,kn(e,t,n),Qe=l,bt=i,Qe!==null)if(bt)try{(Qe.nodeType===9?Qe.body:Qe.nodeName==="HTML"?Qe.ownerDocument.body:Qe).removeChild(n.stateNode)}catch(r){Re(n,t,r)}else try{Qe.removeChild(n.stateNode)}catch(r){Re(n,t,r)}break;case 18:Qe!==null&&(bt?(e=Qe,nh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ya(e)):nh(Qe,n.stateNode));break;case 4:l=Qe,i=bt,Qe=n.stateNode.containerInfo,bt=!0,kn(e,t,n),Qe=l,bt=i;break;case 0:case 11:case 14:case 15:Qn(2,n,t),tt||Qn(4,n,t),kn(e,t,n);break;case 1:tt||(Pt(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&nf(n,t,l)),kn(e,t,n);break;case 21:kn(e,t,n);break;case 22:tt=(l=tt)||n.memoizedState!==null,kn(e,t,n),tt=l;break;default:kn(e,t,n)}}function df(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ya(e)}catch(n){Re(t,t.return,n)}}}function ff(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ya(e)}catch(n){Re(t,t.return,n)}}function ng(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new rf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new rf),t;default:throw Error(o(435,e.tag))}}function cs(e,t){var n=ng(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var i=dg.bind(null,e,l);l.then(i,i)}})}function St(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var i=n[l],r=e,d=t,p=d;e:for(;p!==null;){switch(p.tag){case 27:if(In(p.type)){Qe=p.stateNode,bt=!1;break e}break;case 5:Qe=p.stateNode,bt=!1;break e;case 3:case 4:Qe=p.stateNode.containerInfo,bt=!0;break e}p=p.return}if(Qe===null)throw Error(o(160));cf(r,d,i),Qe=null,bt=!1,r=i.alternate,r!==null&&(r.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)hf(t,e),t=t.sibling}var Wt=null;function hf(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:St(t,e),jt(e),l&4&&(Qn(3,e,e.return),Pa(3,e),Qn(5,e,e.return));break;case 1:St(t,e),jt(e),l&512&&(tt||n===null||Pt(n,n.return)),l&64&&jn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var i=Wt;if(St(t,e),jt(e),l&512&&(tt||n===null||Pt(n,n.return)),l&4){var r=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(l){case"title":r=i.getElementsByTagName("title")[0],(!r||r[Ma]||r[rt]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=i.createElement(l),i.head.insertBefore(r,i.querySelector("head > title"))),dt(r,l,n),r[rt]=e,at(r),l=r;break e;case"link":var d=hh("link","href",i).get(l+(n.href||""));if(d){for(var p=0;p<d.length;p++)if(r=d[p],r.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&r.getAttribute("rel")===(n.rel==null?null:n.rel)&&r.getAttribute("title")===(n.title==null?null:n.title)&&r.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){d.splice(p,1);break t}}r=i.createElement(l),dt(r,l,n),i.head.appendChild(r);break;case"meta":if(d=hh("meta","content",i).get(l+(n.content||""))){for(p=0;p<d.length;p++)if(r=d[p],r.getAttribute("content")===(n.content==null?null:""+n.content)&&r.getAttribute("name")===(n.name==null?null:n.name)&&r.getAttribute("property")===(n.property==null?null:n.property)&&r.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute("charset")===(n.charSet==null?null:n.charSet)){d.splice(p,1);break t}}r=i.createElement(l),dt(r,l,n),i.head.appendChild(r);break;default:throw Error(o(468,l))}r[rt]=e,at(r),l=r}e.stateNode=l}else ph(i,e.type,e.stateNode);else e.stateNode=fh(i,l,e.memoizedProps);else r!==l?(r===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):r.count--,l===null?ph(i,e.type,e.stateNode):fh(i,l,e.memoizedProps)):l===null&&e.stateNode!==null&&jo(e,e.memoizedProps,n.memoizedProps)}break;case 27:St(t,e),jt(e),l&512&&(tt||n===null||Pt(n,n.return)),n!==null&&l&4&&jo(e,e.memoizedProps,n.memoizedProps);break;case 5:if(St(t,e),jt(e),l&512&&(tt||n===null||Pt(n,n.return)),e.flags&32){i=e.stateNode;try{Yl(i,"")}catch(ce){Re(e,e.return,ce)}}l&4&&e.stateNode!=null&&(i=e.memoizedProps,jo(e,i,n!==null?n.memoizedProps:i)),l&1024&&(zo=!0);break;case 6:if(St(t,e),jt(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(ce){Re(e,e.return,ce)}}break;case 3:if(Ts=null,i=Wt,Wt=ws(t.containerInfo),St(t,e),Wt=i,jt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{ya(t.containerInfo)}catch(ce){Re(e,e.return,ce)}zo&&(zo=!1,pf(e));break;case 4:l=Wt,Wt=ws(e.stateNode.containerInfo),St(t,e),jt(e),Wt=l;break;case 12:St(t,e),jt(e);break;case 31:St(t,e),jt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,cs(e,l)));break;case 13:St(t,e),jt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(fs=ht()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,cs(e,l)));break;case 22:i=e.memoizedState!==null;var b=n!==null&&n.memoizedState!==null,A=jn,q=tt;if(jn=A||i,tt=q||b,St(t,e),tt=q,jn=A,jt(e),l&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||b||jn||tt||kl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){b=n=t;try{if(r=b.stateNode,i)d=r.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{p=b.stateNode;var G=b.memoizedProps.style,D=G!=null&&G.hasOwnProperty("display")?G.display:null;p.style.display=D==null||typeof D=="boolean"?"":(""+D).trim()}}catch(ce){Re(b,b.return,ce)}}}else if(t.tag===6){if(n===null){b=t;try{b.stateNode.nodeValue=i?"":b.memoizedProps}catch(ce){Re(b,b.return,ce)}}}else if(t.tag===18){if(n===null){b=t;try{var N=b.stateNode;i?lh(N,!0):lh(b.stateNode,!1)}catch(ce){Re(b,b.return,ce)}}}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;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,cs(e,n))));break;case 19:St(t,e),jt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,cs(e,l)));break;case 30:break;case 21:break;default:St(t,e),jt(e)}}function jt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(af(l)){n=l;break}l=l.return}if(n==null)throw Error(o(160));switch(n.tag){case 27:var i=n.stateNode,r=ko(e);us(e,r,i);break;case 5:var d=n.stateNode;n.flags&32&&(Yl(d,""),n.flags&=-33);var p=ko(e);us(e,p,d);break;case 3:case 4:var b=n.stateNode.containerInfo,A=ko(e);wo(e,A,b);break;default:throw Error(o(161))}}catch(q){Re(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function pf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;pf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)of(e,t.alternate,t),t=t.sibling}function kl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Qn(4,t,t.return),kl(t);break;case 1:Pt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&nf(t,t.return,n),kl(t);break;case 27:ui(t.stateNode);case 26:case 5:Pt(t,t.return),kl(t);break;case 22:t.memoizedState===null&&kl(t);break;case 30:kl(t);break;default:kl(t)}e=e.sibling}}function zn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,i=e,r=t,d=r.flags;switch(r.tag){case 0:case 11:case 15:zn(i,r,n),Pa(4,r);break;case 1:if(zn(i,r,n),l=r,i=l.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(A){Re(l,l.return,A)}if(l=r,i=l.updateQueue,i!==null){var p=l.stateNode;try{var b=i.shared.hiddenCallbacks;if(b!==null)for(i.shared.hiddenCallbacks=null,i=0;i<b.length;i++)Xc(b[i],p)}catch(A){Re(l,l.return,A)}}n&&d&64&&tf(r),ei(r,r.return);break;case 27:sf(r);case 26:case 5:zn(i,r,n),n&&l===null&&d&4&&lf(r),ei(r,r.return);break;case 12:zn(i,r,n);break;case 31:zn(i,r,n),n&&d&4&&df(i,r);break;case 13:zn(i,r,n),n&&d&4&&ff(i,r);break;case 22:r.memoizedState===null&&zn(i,r,n),ei(r,r.return);break;case 30:break;default:zn(i,r,n)}t=t.sibling}}function To(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&La(n))}function Mo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&La(e))}function Jt(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)vf(e,t,n,l),t=t.sibling}function vf(e,t,n,l){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Jt(e,t,n,l),i&2048&&Pa(9,t);break;case 1:Jt(e,t,n,l);break;case 3:Jt(e,t,n,l),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&La(e)));break;case 12:if(i&2048){Jt(e,t,n,l),e=t.stateNode;try{var r=t.memoizedProps,d=r.id,p=r.onPostCommit;typeof p=="function"&&p(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){Re(t,t.return,b)}}else Jt(e,t,n,l);break;case 31:Jt(e,t,n,l);break;case 13:Jt(e,t,n,l);break;case 23:break;case 22:r=t.stateNode,d=t.alternate,t.memoizedState!==null?r._visibility&2?Jt(e,t,n,l):ti(e,t):r._visibility&2?Jt(e,t,n,l):(r._visibility|=2,ra(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),i&2048&&To(d,t);break;case 24:Jt(e,t,n,l),i&2048&&Mo(t.alternate,t);break;default:Jt(e,t,n,l)}}function ra(e,t,n,l,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var r=e,d=t,p=n,b=l,A=d.flags;switch(d.tag){case 0:case 11:case 15:ra(r,d,p,b,i),Pa(8,d);break;case 23:break;case 22:var q=d.stateNode;d.memoizedState!==null?q._visibility&2?ra(r,d,p,b,i):ti(r,d):(q._visibility|=2,ra(r,d,p,b,i)),i&&A&2048&&To(d.alternate,d);break;case 24:ra(r,d,p,b,i),i&&A&2048&&Mo(d.alternate,d);break;default:ra(r,d,p,b,i)}t=t.sibling}}function ti(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,i=l.flags;switch(l.tag){case 22:ti(n,l),i&2048&&To(l.alternate,l);break;case 24:ti(n,l),i&2048&&Mo(l.alternate,l);break;default:ti(n,l)}t=t.sibling}}var ni=8192;function oa(e,t,n){if(e.subtreeFlags&ni)for(e=e.child;e!==null;)gf(e,t,n),e=e.sibling}function gf(e,t,n){switch(e.tag){case 26:oa(e,t,n),e.flags&ni&&e.memoizedState!==null&&$g(n,Wt,e.memoizedState,e.memoizedProps);break;case 5:oa(e,t,n);break;case 3:case 4:var l=Wt;Wt=ws(e.stateNode.containerInfo),oa(e,t,n),Wt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=ni,ni=16777216,oa(e,t,n),ni=l):oa(e,t,n));break;default:oa(e,t,n)}}function mf(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 li(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];it=l,xf(l,e)}mf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)yf(e),e=e.sibling}function yf(e){switch(e.tag){case 0:case 11:case 15:li(e),e.flags&2048&&Qn(9,e,e.return);break;case 3:li(e);break;case 12:li(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ds(e)):li(e);break;default:li(e)}}function ds(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];it=l,xf(l,e)}mf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Qn(8,t,t.return),ds(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ds(t));break;default:ds(t)}e=e.sibling}}function xf(e,t){for(;it!==null;){var n=it;switch(n.tag){case 0:case 11:case 15:Qn(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:La(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,it=l;else e:for(n=e;it!==null;){l=it;var i=l.sibling,r=l.return;if(uf(l),l===n){it=null;break e}if(i!==null){i.return=r,it=i;break e}it=r}}}var lg={getCacheForType:function(e){var t=ut(Ie),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ut(Ie).controller.signal}},ag=typeof WeakMap=="function"?WeakMap:Map,Ce=0,He=null,ke=null,ze=0,De=0,_t=null,Vn=!1,ua=!1,Eo=!1,Tn=0,Ze=0,Zn=0,wl=0,_o=0,Ct=0,ca=0,ai=null,kt=null,Co=!1,fs=0,bf=0,hs=1/0,ps=null,Kn=null,lt=0,Wn=null,da=null,Mn=0,Ao=0,Do=null,Sf=null,ii=0,Ro=null;function At(){return(Ce&2)!==0&&ze!==0?ze&-ze:M.T!==null?qo():Ta()}function jf(){if(Ct===0)if((ze&536870912)===0||Me){var e=Dl;Dl<<=1,(Dl&3932160)===0&&(Dl=262144),Ct=e}else Ct=536870912;return e=Mt.current,e!==null&&(e.flags|=32),Ct}function wt(e,t,n){(e===He&&(De===2||De===9)||e.cancelPendingCommit!==null)&&(fa(e,0),Jn(e,ze,Ct,!1)),rl(e,n),((Ce&2)===0||e!==He)&&(e===He&&((Ce&2)===0&&(wl|=n),Ze===4&&Jn(e,ze,Ct,!1)),en(e))}function kf(e,t,n){if((Ce&6)!==0)throw Error(o(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Dn(e,t),i=l?rg(e,t):No(e,t,!0),r=l;do{if(i===0){ua&&!l&&Jn(e,t,0,!1);break}else{if(n=e.current.alternate,r&&!ig(n)){i=No(e,t,!1),r=!1;continue}if(i===2){if(r=t,e.errorRecoveryDisabledLanes&r)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var p=e;i=ai;var b=p.current.memoizedState.isDehydrated;if(b&&(fa(p,d).flags|=256),d=No(p,d,!1),d!==2){if(Eo&&!b){p.errorRecoveryDisabledLanes|=r,wl|=r,i=4;break e}r=kt,kt=i,r!==null&&(kt===null?kt=r:kt.push.apply(kt,r))}i=d}if(r=!1,i!==2)continue}}if(i===1){fa(e,0),Jn(e,t,0,!0);break}e:{switch(l=e,r=i,r){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Jn(l,t,Ct,!Vn);break e;case 2:kt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=fs+300-ht(),10<i)){if(Jn(l,t,Ct,!Vn),cn(l,0,!0)!==0)break e;Mn=t,l.timeoutHandle=eh(wf.bind(null,l,n,kt,ps,Co,t,Ct,wl,ca,Vn,r,"Throttled",-0,0),i);break e}wf(l,n,kt,ps,Co,t,Ct,wl,ca,Vn,r,null,-0,0)}}break}while(!0);en(e)}function wf(e,t,n,l,i,r,d,p,b,A,q,G,D,N){if(e.timeoutHandle=-1,G=t.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:fn},gf(t,r,G);var ce=(r&62914560)===r?fs-ht():(r&4194048)===r?bf-ht():0;if(ce=Gg(G,ce),ce!==null){Mn=r,e.cancelPendingCommit=ce(Df.bind(null,e,t,r,n,l,i,d,p,b,q,G,null,D,N)),Jn(e,r,d,!A);return}}Df(e,t,r,n,l,i,d,p,b)}function ig(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var i=n[l],r=i.getSnapshot;i=i.value;try{if(!zt(r(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 Jn(e,t,n,l){t&=~_o,t&=~wl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var i=t;0<i;){var r=31-gt(i),d=1<<r;l[r]=-1,i&=~d}n!==0&&za(e,n,t)}function vs(){return(Ce&6)===0?(si(0),!1):!0}function Oo(){if(ke!==null){if(De===0)var e=ke.return;else e=ke,gn=vl=null,Wr(e),na=null,$a=0,e=ke;for(;e!==null;)ef(e.alternate,e),e=e.return;ke=null}}function fa(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,zg(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Mn=0,Oo(),He=e,ke=n=pn(e.current,null),ze=t,De=0,_t=null,Vn=!1,ua=Dn(e,t),Eo=!1,ca=Ct=_o=wl=Zn=Ze=0,kt=ai=null,Co=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var i=31-gt(l),r=1<<i;t|=e[i],l&=~r}return Tn=t,Ui(),n}function zf(e,t){xe=null,M.H=Ja,t===ta||t===Xi?(t=Lc(),De=3):t===Hr?(t=Lc(),De=4):De=t===fo?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,_t=t,ke===null&&(Ze=1,as(e,Bt(t,e.current)))}function Tf(){var e=Mt.current;return e===null?!0:(ze&4194048)===ze?$t===null:(ze&62914560)===ze||(ze&536870912)!==0?e===$t:!1}function Mf(){var e=M.H;return M.H=Ja,e===null?Ja:e}function Ef(){var e=M.A;return M.A=lg,e}function gs(){Ze=4,Vn||(ze&4194048)!==ze&&Mt.current!==null||(ua=!0),(Zn&134217727)===0&&(wl&134217727)===0||He===null||Jn(He,ze,Ct,!1)}function No(e,t,n){var l=Ce;Ce|=2;var i=Mf(),r=Ef();(He!==e||ze!==t)&&(ps=null,fa(e,t)),t=!1;var d=Ze;e:do try{if(De!==0&&ke!==null){var p=ke,b=_t;switch(De){case 8:Oo(),d=6;break e;case 3:case 2:case 9:case 6:Mt.current===null&&(t=!0);var A=De;if(De=0,_t=null,ha(e,p,b,A),n&&ua){d=0;break e}break;default:A=De,De=0,_t=null,ha(e,p,b,A)}}sg(),d=Ze;break}catch(q){zf(e,q)}while(!0);return t&&e.shellSuspendCounter++,gn=vl=null,Ce=l,M.H=i,M.A=r,ke===null&&(He=null,ze=0,Ui()),d}function sg(){for(;ke!==null;)_f(ke)}function rg(e,t){var n=Ce;Ce|=2;var l=Mf(),i=Ef();He!==e||ze!==t?(ps=null,hs=ht()+500,fa(e,t)):ua=Dn(e,t);e:do try{if(De!==0&&ke!==null){t=ke;var r=_t;t:switch(De){case 1:De=0,_t=null,ha(e,t,r,1);break;case 2:case 9:if(Bc(r)){De=0,_t=null,Cf(t);break}t=function(){De!==2&&De!==9||He!==e||(De=7),en(e)},r.then(t,t);break e;case 3:De=7;break e;case 4:De=5;break e;case 7:Bc(r)?(De=0,_t=null,Cf(t)):(De=0,_t=null,ha(e,t,r,7));break;case 5:var d=null;switch(ke.tag){case 26:d=ke.memoizedState;case 5:case 27:var p=ke;if(d?vh(d):p.stateNode.complete){De=0,_t=null;var b=p.sibling;if(b!==null)ke=b;else{var A=p.return;A!==null?(ke=A,ms(A)):ke=null}break t}}De=0,_t=null,ha(e,t,r,5);break;case 6:De=0,_t=null,ha(e,t,r,6);break;case 8:Oo(),Ze=6;break e;default:throw Error(o(462))}}og();break}catch(q){zf(e,q)}while(!0);return gn=vl=null,M.H=l,M.A=i,Ce=n,ke!==null?0:(He=null,ze=0,Ui(),Ze)}function og(){for(;ke!==null&&!Si();)_f(ke)}function _f(e){var t=Id(e.alternate,e,Tn);e.memoizedProps=e.pendingProps,t===null?ms(e):ke=t}function Cf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Vd(n,t,t.pendingProps,t.type,void 0,ze);break;case 11:t=Vd(n,t,t.pendingProps,t.type.render,t.ref,ze);break;case 5:Wr(t);default:ef(n,t),t=ke=Mc(t,Tn),t=Id(n,t,Tn)}e.memoizedProps=e.pendingProps,t===null?ms(e):ke=t}function ha(e,t,n,l){gn=vl=null,Wr(t),na=null,$a=0;var i=t.return;try{if(Jv(e,i,t,n,ze)){Ze=1,as(e,Bt(n,e.current)),ke=null;return}}catch(r){if(i!==null)throw ke=i,r;Ze=1,as(e,Bt(n,e.current)),ke=null;return}t.flags&32768?(Me||l===1?e=!0:ua||(ze&536870912)!==0?e=!1:(Vn=e=!0,(l===2||l===9||l===3||l===6)&&(l=Mt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Af(t,e)):ms(t)}function ms(e){var t=e;do{if((t.flags&32768)!==0){Af(t,Vn);return}e=t.return;var n=Pv(t.alternate,t,Tn);if(n!==null){ke=n;return}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);Ze===0&&(Ze=5)}function Af(e,t){do{var n=eg(e.alternate,e);if(n!==null){n.flags&=32767,ke=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ke=e;return}ke=e=n}while(e!==null);Ze=6,ke=null}function Df(e,t,n,l,i,r,d,p,b){e.cancelPendingCommit=null;do ys();while(lt!==0);if((Ce&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(r=t.lanes|t.childLanes,r|=jr,Is(e,n,r,d,p,b),e===He&&(ke=He=null,ze=0),da=t,Wn=e,Mn=n,Ao=r,Do=i,Sf=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,fg(Cl,function(){return Hf(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=M.T,M.T=null,i=Y.p,Y.p=2,d=Ce,Ce|=4;try{tg(e,t,n)}finally{Ce=d,Y.p=i,M.T=l}}lt=1,Rf(),Of(),Nf()}}function Rf(){if(lt===1){lt=0;var e=Wn,t=da,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=M.T,M.T=null;var l=Y.p;Y.p=2;var i=Ce;Ce|=4;try{hf(t,e);var r=Zo,d=yc(e.containerInfo),p=r.focusedElem,b=r.selectionRange;if(d!==p&&p&&p.ownerDocument&&mc(p.ownerDocument.documentElement,p)){if(b!==null&&mr(p)){var A=b.start,q=b.end;if(q===void 0&&(q=A),"selectionStart"in p)p.selectionStart=A,p.selectionEnd=Math.min(q,p.value.length);else{var G=p.ownerDocument||document,D=G&&G.defaultView||window;if(D.getSelection){var N=D.getSelection(),ce=p.textContent.length,ve=Math.min(b.start,ce),Ue=b.end===void 0?ve:Math.min(b.end,ce);!N.extend&&ve>Ue&&(d=Ue,Ue=ve,ve=d);var E=gc(p,ve),z=gc(p,Ue);if(E&&z&&(N.rangeCount!==1||N.anchorNode!==E.node||N.anchorOffset!==E.offset||N.focusNode!==z.node||N.focusOffset!==z.offset)){var C=G.createRange();C.setStart(E.node,E.offset),N.removeAllRanges(),ve>Ue?(N.addRange(C),N.extend(z.node,z.offset)):(C.setEnd(z.node,z.offset),N.addRange(C))}}}}for(G=[],N=p;N=N.parentNode;)N.nodeType===1&&G.push({element:N,left:N.scrollLeft,top:N.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<G.length;p++){var $=G[p];$.element.scrollLeft=$.left,$.element.scrollTop=$.top}}Cs=!!Vo,Zo=Vo=null}finally{Ce=i,Y.p=l,M.T=n}}e.current=t,lt=2}}function Of(){if(lt===2){lt=0;var e=Wn,t=da,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=M.T,M.T=null;var l=Y.p;Y.p=2;var i=Ce;Ce|=4;try{of(e,t.alternate,t)}finally{Ce=i,Y.p=l,M.T=n}}lt=3}}function Nf(){if(lt===4||lt===3){lt=0,Ks();var e=Wn,t=da,n=Mn,l=Sf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?lt=5:(lt=0,da=Wn=null,Uf(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Kn=null),Rn(n),t=t.stateNode,st&&typeof st.onCommitFiberRoot=="function")try{st.onCommitFiberRoot(on,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=M.T,i=Y.p,Y.p=2,M.T=null;try{for(var r=e.onRecoverableError,d=0;d<l.length;d++){var p=l[d];r(p.value,{componentStack:p.stack})}}finally{M.T=t,Y.p=i}}(Mn&3)!==0&&ys(),en(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===Ro?ii++:(ii=0,Ro=e):ii=0,si(0)}}function Uf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,La(t)))}function ys(){return Rf(),Of(),Nf(),Hf()}function Hf(){if(lt!==5)return!1;var e=Wn,t=Ao;Ao=0;var n=Rn(Mn),l=M.T,i=Y.p;try{Y.p=32>n?32:n,M.T=null,n=Do,Do=null;var r=Wn,d=Mn;if(lt=0,da=Wn=null,Mn=0,(Ce&6)!==0)throw Error(o(331));var p=Ce;if(Ce|=4,yf(r.current),vf(r,r.current,d,n),Ce=p,si(0,!1),st&&typeof st.onPostCommitFiberRoot=="function")try{st.onPostCommitFiberRoot(on,r)}catch{}return!0}finally{Y.p=i,M.T=l,Uf(e,t)}}function Bf(e,t,n){t=Bt(n,t),t=co(e.stateNode,t,2),e=$n(e,t,2),e!==null&&(rl(e,2),en(e))}function Re(e,t,n){if(e.tag===3)Bf(e,e,n);else for(;t!==null;){if(t.tag===3){Bf(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Kn===null||!Kn.has(l))){e=Bt(n,e),n=Bd(2),l=$n(t,n,2),l!==null&&(qd(n,l,t,e),rl(l,2),en(l));break}}t=t.return}}function Uo(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new ag;var i=new Set;l.set(t,i)}else i=l.get(t),i===void 0&&(i=new Set,l.set(t,i));i.has(n)||(Eo=!0,i.add(n),e=ug.bind(null,e,t,n),t.then(e,e))}function ug(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,He===e&&(ze&n)===n&&(Ze===4||Ze===3&&(ze&62914560)===ze&&300>ht()-fs?(Ce&2)===0&&fa(e,0):_o|=n,ca===ze&&(ca=0)),en(e)}function qf(e,t){t===0&&(t=wa()),e=fl(e,t),e!==null&&(rl(e,t),en(e))}function cg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qf(e,n)}function dg(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),qf(e,n)}function fg(e,t){return An(e,t)}var xs=null,pa=null,Ho=!1,bs=!1,Bo=!1,Fn=0;function en(e){e!==pa&&e.next===null&&(pa===null?xs=pa=e:pa=pa.next=e),bs=!0,Ho||(Ho=!0,pg())}function si(e,t){if(!Bo&&bs){Bo=!0;do for(var n=!1,l=xs;l!==null;){if(e!==0){var i=l.pendingLanes;if(i===0)var r=0;else{var d=l.suspendedLanes,p=l.pingedLanes;r=(1<<31-gt(42|e)+1)-1,r&=i&~(d&~p),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(n=!0,Gf(l,r))}else r=ze,r=cn(l,l===He?r:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(r&3)===0||Dn(l,r)||(n=!0,Gf(l,r));l=l.next}while(n);Bo=!1}}function hg(){Lf()}function Lf(){bs=Ho=!1;var e=0;Fn!==0&&wg()&&(e=Fn);for(var t=ht(),n=null,l=xs;l!==null;){var i=l.next,r=Yf(l,t);r===0?(l.next=null,n===null?xs=i:n.next=i,i===null&&(pa=n)):(n=l,(e!==0||(r&3)!==0)&&(bs=!0)),l=i}lt!==0&&lt!==5||si(e),Fn!==0&&(Fn=0)}function Yf(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,i=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var d=31-gt(r),p=1<<d,b=i[d];b===-1?((p&n)===0||(p&l)!==0)&&(i[d]=ki(p,t)):b<=t&&(e.expiredLanes|=p),r&=~p}if(t=He,n=ze,n=cn(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(De===2||De===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&El(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Dn(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&El(l),Rn(n)){case 2:case 8:n=_l;break;case 32:n=Cl;break;case 268435456:n=ka;break;default:n=Cl}return l=$f.bind(null,e),n=An(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&El(l),e.callbackPriority=2,e.callbackNode=null,2}function $f(e,t){if(lt!==0&&lt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ys()&&e.callbackNode!==n)return null;var l=ze;return l=cn(e,e===He?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(kf(e,l,t),Yf(e,ht()),e.callbackNode!=null&&e.callbackNode===n?$f.bind(null,e):null)}function Gf(e,t){if(ys())return null;kf(e,t,!0)}function pg(){Tg(function(){(Ce&6)!==0?An(ja,hg):Lf()})}function qo(){if(Fn===0){var e=Pl;e===0&&(e=Al,Al<<=1,(Al&261888)===0&&(Al=256)),Fn=e}return Fn}function Xf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ei(""+e)}function Qf(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function vg(e,t,n,l,i){if(t==="submit"&&n&&n.stateNode===i){var r=Xf((i[yt]||null).action),d=l.submitter;d&&(t=(t=d[yt]||null)?Xf(t.formAction):d.getAttribute("formAction"),t!==null&&(r=t,d=null));var p=new Di("action","action",null,l,i);e.push({event:p,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Fn!==0){var b=d?Qf(i,d):new FormData(i);ao(n,{pending:!0,data:b,method:i.method,action:r},null,b)}}else typeof r=="function"&&(p.preventDefault(),b=d?Qf(i,d):new FormData(i),ao(n,{pending:!0,data:b,method:i.method,action:r},r,b))},currentTarget:i}]})}}for(var Lo=0;Lo<Sr.length;Lo++){var Yo=Sr[Lo],gg=Yo.toLowerCase(),mg=Yo[0].toUpperCase()+Yo.slice(1);Kt(gg,"on"+mg)}Kt(Sc,"onAnimationEnd"),Kt(jc,"onAnimationIteration"),Kt(kc,"onAnimationStart"),Kt("dblclick","onDoubleClick"),Kt("focusin","onFocus"),Kt("focusout","onBlur"),Kt(Rv,"onTransitionRun"),Kt(Ov,"onTransitionStart"),Kt(Nv,"onTransitionCancel"),Kt(wc,"onTransitionEnd"),ql("onMouseEnter",["mouseout","mouseover"]),ql("onMouseLeave",["mouseout","mouseover"]),ql("onPointerEnter",["pointerout","pointerover"]),ql("onPointerLeave",["pointerout","pointerover"]),ol("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ol("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ol("onBeforeInput",["compositionend","keypress","textInput","paste"]),ol("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ol("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ol("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ri="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(" "),yg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ri));function Vf(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],i=l.event;l=l.listeners;e:{var r=void 0;if(t)for(var d=l.length-1;0<=d;d--){var p=l[d],b=p.instance,A=p.currentTarget;if(p=p.listener,b!==r&&i.isPropagationStopped())break e;r=p,i.currentTarget=A;try{r(i)}catch(q){Ni(q)}i.currentTarget=null,r=b}else for(d=0;d<l.length;d++){if(p=l[d],b=p.instance,A=p.currentTarget,p=p.listener,b!==r&&i.isPropagationStopped())break e;r=p,i.currentTarget=A;try{r(i)}catch(q){Ni(q)}i.currentTarget=null,r=b}}}}function we(e,t){var n=t[Ps];n===void 0&&(n=t[Ps]=new Set);var l=e+"__bubble";n.has(l)||(Zf(t,e,2,!1),n.add(l))}function $o(e,t,n){var l=0;t&&(l|=4),Zf(n,e,l,t)}var Ss="_reactListening"+Math.random().toString(36).slice(2);function Go(e){if(!e[Ss]){e[Ss]=!0,qu.forEach(function(n){n!=="selectionchange"&&(yg.has(n)||$o(n,!1,e),$o(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ss]||(t[Ss]=!0,$o("selectionchange",!1,t))}}function Zf(e,t,n,l){switch(jh(t)){case 2:var i=Vg;break;case 8:i=Zg;break;default:i=au}n=i.bind(null,t,n,e),i=void 0,!or||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),l?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Xo(e,t,n,l,i){var r=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var d=l.tag;if(d===3||d===4){var p=l.stateNode.containerInfo;if(p===i)break;if(d===4)for(d=l.return;d!==null;){var b=d.tag;if((b===3||b===4)&&d.stateNode.containerInfo===i)return;d=d.return}for(;p!==null;){if(d=Ul(p),d===null)return;if(b=d.tag,b===5||b===6||b===26||b===27){l=r=d;continue e}p=p.parentNode}}l=l.return}Fu(function(){var A=r,q=sr(n),G=[];e:{var D=zc.get(e);if(D!==void 0){var N=Di,ce=e;switch(e){case"keypress":if(Ci(n)===0)break e;case"keydown":case"keyup":N=dv;break;case"focusin":ce="focus",N=fr;break;case"focusout":ce="blur",N=fr;break;case"beforeblur":case"afterblur":N=fr;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":N=ec;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":N=Pp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":N=pv;break;case Sc:case jc:case kc:N=nv;break;case wc:N=gv;break;case"scroll":case"scrollend":N=Fp;break;case"wheel":N=yv;break;case"copy":case"cut":case"paste":N=av;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":N=nc;break;case"toggle":case"beforetoggle":N=bv}var ve=(t&4)!==0,Ue=!ve&&(e==="scroll"||e==="scrollend"),E=ve?D!==null?D+"Capture":null:D;ve=[];for(var z=A,C;z!==null;){var $=z;if(C=$.stateNode,$=$.tag,$!==5&&$!==26&&$!==27||C===null||E===null||($=_a(z,E),$!=null&&ve.push(oi(z,$,C))),Ue)break;z=z.return}0<ve.length&&(D=new N(D,ce,null,n,q),G.push({event:D,listeners:ve}))}}if((t&7)===0){e:{if(D=e==="mouseover"||e==="pointerover",N=e==="mouseout"||e==="pointerout",D&&n!==ir&&(ce=n.relatedTarget||n.fromElement)&&(Ul(ce)||ce[Nl]))break e;if((N||D)&&(D=q.window===q?q:(D=q.ownerDocument)?D.defaultView||D.parentWindow:window,N?(ce=n.relatedTarget||n.toElement,N=A,ce=ce?Ul(ce):null,ce!==null&&(Ue=h(ce),ve=ce.tag,ce!==Ue||ve!==5&&ve!==27&&ve!==6)&&(ce=null)):(N=null,ce=A),N!==ce)){if(ve=ec,$="onMouseLeave",E="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(ve=nc,$="onPointerLeave",E="onPointerEnter",z="pointer"),Ue=N==null?D:Ea(N),C=ce==null?D:Ea(ce),D=new ve($,z+"leave",N,n,q),D.target=Ue,D.relatedTarget=C,$=null,Ul(q)===A&&(ve=new ve(E,z+"enter",ce,n,q),ve.target=C,ve.relatedTarget=Ue,$=ve),Ue=$,N&&ce)t:{for(ve=xg,E=N,z=ce,C=0,$=E;$;$=ve($))C++;$=0;for(var pe=z;pe;pe=ve(pe))$++;for(;0<C-$;)E=ve(E),C--;for(;0<$-C;)z=ve(z),$--;for(;C--;){if(E===z||z!==null&&E===z.alternate){ve=E;break t}E=ve(E),z=ve(z)}ve=null}else ve=null;N!==null&&Kf(G,D,N,ve,!1),ce!==null&&Ue!==null&&Kf(G,Ue,ce,ve,!0)}}e:{if(D=A?Ea(A):window,N=D.nodeName&&D.nodeName.toLowerCase(),N==="select"||N==="input"&&D.type==="file")var Ee=cc;else if(oc(D))if(dc)Ee=Cv;else{Ee=Ev;var fe=Mv}else N=D.nodeName,!N||N.toLowerCase()!=="input"||D.type!=="checkbox"&&D.type!=="radio"?A&&ar(A.elementType)&&(Ee=cc):Ee=_v;if(Ee&&(Ee=Ee(e,A))){uc(G,Ee,n,q);break e}fe&&fe(e,D,A),e==="focusout"&&A&&D.type==="number"&&A.memoizedProps.value!=null&&lr(D,"number",D.value)}switch(fe=A?Ea(A):window,e){case"focusin":(oc(fe)||fe.contentEditable==="true")&&(Ql=fe,yr=A,Ha=null);break;case"focusout":Ha=yr=Ql=null;break;case"mousedown":xr=!0;break;case"contextmenu":case"mouseup":case"dragend":xr=!1,xc(G,n,q);break;case"selectionchange":if(Dv)break;case"keydown":case"keyup":xc(G,n,q)}var Se;if(pr)e:{switch(e){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else Xl?sc(e,n)&&(Te="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Te="onCompositionStart");Te&&(lc&&n.locale!=="ko"&&(Xl||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&Xl&&(Se=Iu()):(Nn=q,ur="value"in Nn?Nn.value:Nn.textContent,Xl=!0)),fe=js(A,Te),0<fe.length&&(Te=new tc(Te,e,null,n,q),G.push({event:Te,listeners:fe}),Se?Te.data=Se:(Se=rc(n),Se!==null&&(Te.data=Se)))),(Se=jv?kv(e,n):wv(e,n))&&(Te=js(A,"onBeforeInput"),0<Te.length&&(fe=new tc("onBeforeInput","beforeinput",null,n,q),G.push({event:fe,listeners:Te}),fe.data=Se)),vg(G,e,A,n,q)}Vf(G,t)})}function oi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function js(e,t){for(var n=t+"Capture",l=[];e!==null;){var i=e,r=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||r===null||(i=_a(e,n),i!=null&&l.unshift(oi(e,i,r)),i=_a(e,t),i!=null&&l.push(oi(e,i,r))),e.tag===3)return l;e=e.return}return[]}function xg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Kf(e,t,n,l,i){for(var r=t._reactName,d=[];n!==null&&n!==l;){var p=n,b=p.alternate,A=p.stateNode;if(p=p.tag,b!==null&&b===l)break;p!==5&&p!==26&&p!==27||A===null||(b=A,i?(A=_a(n,r),A!=null&&d.unshift(oi(n,A,b))):i||(A=_a(n,r),A!=null&&d.push(oi(n,A,b)))),n=n.return}d.length!==0&&e.push({event:t,listeners:d})}var bg=/\r\n?/g,Sg=/\u0000|\uFFFD/g;function Wf(e){return(typeof e=="string"?e:""+e).replace(bg,`
9
+ `).replace(Sg,"")}function Jf(e,t){return t=Wf(t),Wf(e)===t}function Ne(e,t,n,l,i,r){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Yl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Yl(e,""+l);break;case"className":Ti(e,"class",l);break;case"tabIndex":Ti(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ti(e,n,l);break;case"style":Wu(e,l,r);break;case"data":if(t!=="object"){Ti(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=Ei(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"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 r=="function"&&(n==="formAction"?(t!=="input"&&Ne(e,t,"name",i.name,i,null),Ne(e,t,"formEncType",i.formEncType,i,null),Ne(e,t,"formMethod",i.formMethod,i,null),Ne(e,t,"formTarget",i.formTarget,i,null)):(Ne(e,t,"encType",i.encType,i,null),Ne(e,t,"method",i.method,i,null),Ne(e,t,"target",i.target,i,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=Ei(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=fn);break;case"onScroll":l!=null&&we("scroll",e);break;case"onScrollEnd":l!=null&&we("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(n=l.__html,n!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=n}}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}n=Ei(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);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(n,""+l):e.removeAttribute(n);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(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":we("beforetoggle",e),we("toggle",e),zi(e,"popover",l);break;case"xlinkActuate":dn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":dn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":dn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":dn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":dn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":dn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":dn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":dn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":dn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":zi(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Wp.get(n)||n,zi(e,n,l))}}function Qo(e,t,n,l,i,r){switch(n){case"style":Wu(e,l,r);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(n=l.__html,n!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=n}}break;case"children":typeof l=="string"?Yl(e,l):(typeof l=="number"||typeof l=="bigint")&&Yl(e,""+l);break;case"onScroll":l!=null&&we("scroll",e);break;case"onScrollEnd":l!=null&&we("scrollend",e);break;case"onClick":l!=null&&(e.onclick=fn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Lu.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),r=e[yt]||null,r=r!=null?r[n]:null,typeof r=="function"&&e.removeEventListener(t,r,i),typeof l=="function")){typeof r!="function"&&r!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,i);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):zi(e,n,l)}}}function dt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":we("error",e),we("load",e);var l=!1,i=!1,r;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case"src":l=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ne(e,t,r,d,n,null)}}i&&Ne(e,t,"srcSet",n.srcSet,n,null),l&&Ne(e,t,"src",n.src,n,null);return;case"input":we("invalid",e);var p=r=d=i=null,b=null,A=null;for(l in n)if(n.hasOwnProperty(l)){var q=n[l];if(q!=null)switch(l){case"name":i=q;break;case"type":d=q;break;case"checked":b=q;break;case"defaultChecked":A=q;break;case"value":r=q;break;case"defaultValue":p=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(o(137,t));break;default:Ne(e,t,l,q,n,null)}}Qu(e,r,p,b,A,d,i,!1);return;case"select":we("invalid",e),l=d=r=null;for(i in n)if(n.hasOwnProperty(i)&&(p=n[i],p!=null))switch(i){case"value":r=p;break;case"defaultValue":d=p;break;case"multiple":l=p;default:Ne(e,t,i,p,n,null)}t=r,n=d,e.multiple=!!l,t!=null?Ll(e,!!l,t,!1):n!=null&&Ll(e,!!l,n,!0);return;case"textarea":we("invalid",e),r=i=l=null;for(d in n)if(n.hasOwnProperty(d)&&(p=n[d],p!=null))switch(d){case"value":l=p;break;case"defaultValue":i=p;break;case"children":r=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(o(91));break;default:Ne(e,t,d,p,n,null)}Zu(e,l,i,r);return;case"option":for(b in n)n.hasOwnProperty(b)&&(l=n[b],l!=null)&&(b==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Ne(e,t,b,l,n,null));return;case"dialog":we("beforetoggle",e),we("toggle",e),we("cancel",e),we("close",e);break;case"iframe":case"object":we("load",e);break;case"video":case"audio":for(l=0;l<ri.length;l++)we(ri[l],e);break;case"image":we("error",e),we("load",e);break;case"details":we("toggle",e);break;case"embed":case"source":case"link":we("error",e),we("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(A in n)if(n.hasOwnProperty(A)&&(l=n[A],l!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ne(e,t,A,l,n,null)}return;default:if(ar(t)){for(q in n)n.hasOwnProperty(q)&&(l=n[q],l!==void 0&&Qo(e,t,q,l,n,void 0));return}}for(p in n)n.hasOwnProperty(p)&&(l=n[p],l!=null&&Ne(e,t,p,l,n,null))}function jg(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,r=null,d=null,p=null,b=null,A=null,q=null;for(N in n){var G=n[N];if(n.hasOwnProperty(N)&&G!=null)switch(N){case"checked":break;case"value":break;case"defaultValue":b=G;default:l.hasOwnProperty(N)||Ne(e,t,N,null,l,G)}}for(var D in l){var N=l[D];if(G=n[D],l.hasOwnProperty(D)&&(N!=null||G!=null))switch(D){case"type":r=N;break;case"name":i=N;break;case"checked":A=N;break;case"defaultChecked":q=N;break;case"value":d=N;break;case"defaultValue":p=N;break;case"children":case"dangerouslySetInnerHTML":if(N!=null)throw Error(o(137,t));break;default:N!==G&&Ne(e,t,D,N,l,G)}}nr(e,d,p,b,A,q,r,i);return;case"select":N=d=p=D=null;for(r in n)if(b=n[r],n.hasOwnProperty(r)&&b!=null)switch(r){case"value":break;case"multiple":N=b;default:l.hasOwnProperty(r)||Ne(e,t,r,null,l,b)}for(i in l)if(r=l[i],b=n[i],l.hasOwnProperty(i)&&(r!=null||b!=null))switch(i){case"value":D=r;break;case"defaultValue":p=r;break;case"multiple":d=r;default:r!==b&&Ne(e,t,i,r,l,b)}t=p,n=d,l=N,D!=null?Ll(e,!!n,D,!1):!!l!=!!n&&(t!=null?Ll(e,!!n,t,!0):Ll(e,!!n,n?[]:"",!1));return;case"textarea":N=D=null;for(p in n)if(i=n[p],n.hasOwnProperty(p)&&i!=null&&!l.hasOwnProperty(p))switch(p){case"value":break;case"children":break;default:Ne(e,t,p,null,l,i)}for(d in l)if(i=l[d],r=n[d],l.hasOwnProperty(d)&&(i!=null||r!=null))switch(d){case"value":D=i;break;case"defaultValue":N=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==r&&Ne(e,t,d,i,l,r)}Vu(e,D,N);return;case"option":for(var ce in n)D=n[ce],n.hasOwnProperty(ce)&&D!=null&&!l.hasOwnProperty(ce)&&(ce==="selected"?e.selected=!1:Ne(e,t,ce,null,l,D));for(b in l)D=l[b],N=n[b],l.hasOwnProperty(b)&&D!==N&&(D!=null||N!=null)&&(b==="selected"?e.selected=D&&typeof D!="function"&&typeof D!="symbol":Ne(e,t,b,D,l,N));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ve in n)D=n[ve],n.hasOwnProperty(ve)&&D!=null&&!l.hasOwnProperty(ve)&&Ne(e,t,ve,null,l,D);for(A in l)if(D=l[A],N=n[A],l.hasOwnProperty(A)&&D!==N&&(D!=null||N!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(o(137,t));break;default:Ne(e,t,A,D,l,N)}return;default:if(ar(t)){for(var Ue in n)D=n[Ue],n.hasOwnProperty(Ue)&&D!==void 0&&!l.hasOwnProperty(Ue)&&Qo(e,t,Ue,void 0,l,D);for(q in l)D=l[q],N=n[q],!l.hasOwnProperty(q)||D===N||D===void 0&&N===void 0||Qo(e,t,q,D,l,N);return}}for(var E in n)D=n[E],n.hasOwnProperty(E)&&D!=null&&!l.hasOwnProperty(E)&&Ne(e,t,E,null,l,D);for(G in l)D=l[G],N=n[G],!l.hasOwnProperty(G)||D===N||D==null&&N==null||Ne(e,t,G,D,l,N)}function Ff(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function kg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var i=n[l],r=i.transferSize,d=i.initiatorType,p=i.duration;if(r&&p&&Ff(d)){for(d=0,p=i.responseEnd,l+=1;l<n.length;l++){var b=n[l],A=b.startTime;if(A>p)break;var q=b.transferSize,G=b.initiatorType;q&&Ff(G)&&(b=b.responseEnd,d+=q*(b<p?1:(p-A)/(b-A)))}if(--l,t+=8*(r+d)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Vo=null,Zo=null;function ks(e){return e.nodeType===9?e:e.ownerDocument}function If(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 Pf(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Ko(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wo=null;function wg(){var e=window.event;return e&&e.type==="popstate"?e===Wo?!1:(Wo=e,!0):(Wo=null,!1)}var eh=typeof setTimeout=="function"?setTimeout:void 0,zg=typeof clearTimeout=="function"?clearTimeout:void 0,th=typeof Promise=="function"?Promise:void 0,Tg=typeof queueMicrotask=="function"?queueMicrotask:typeof th<"u"?function(e){return th.resolve(null).then(e).catch(Mg)}:eh;function Mg(e){setTimeout(function(){throw e})}function In(e){return e==="head"}function nh(e,t){var n=t,l=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(i),ya(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")ui(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,ui(n);for(var r=n.firstChild;r;){var d=r.nextSibling,p=r.nodeName;r[Ma]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&r.rel.toLowerCase()==="stylesheet"||n.removeChild(r),r=d}}else n==="body"&&ui(e.ownerDocument.body);n=i}while(n);ya(t)}function lh(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function Jo(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Jo(n),er(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Eg(e,t,n,l){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Ma])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(r=e.getAttribute("src"),(r!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=Gt(e.nextSibling),e===null)break}return null}function _g(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Gt(e.nextSibling),e===null))return null;return e}function ah(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Gt(e.nextSibling),e===null))return null;return e}function Fo(e){return e.data==="$?"||e.data==="$~"}function Io(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Cg(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Gt(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 Po=null;function ih(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Gt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function sh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function rh(e,t,n){switch(t=ks(n),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function ui(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);er(e)}var Xt=new Map,oh=new Set;function ws(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var En=Y.d;Y.d={f:Ag,r:Dg,D:Rg,C:Og,L:Ng,m:Ug,X:Bg,S:Hg,M:qg};function Ag(){var e=En.f(),t=vs();return e||t}function Dg(e){var t=Hl(e);t!==null&&t.tag===5&&t.type==="form"?wd(t):En.r(e)}var va=typeof document>"u"?null:document;function uh(e,t,n){var l=va;if(l&&typeof t=="string"&&t){var i=Ut(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),oh.has(i)||(oh.add(i),e={rel:e,crossOrigin:n,href:t},l.querySelector(i)===null&&(t=l.createElement("link"),dt(t,"link",e),at(t),l.head.appendChild(t)))}}function Rg(e){En.D(e),uh("dns-prefetch",e,null)}function Og(e,t){En.C(e,t),uh("preconnect",e,t)}function Ng(e,t,n){En.L(e,t,n);var l=va;if(l&&e&&t){var i='link[rel="preload"][as="'+Ut(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Ut(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Ut(n.imageSizes)+'"]')):i+='[href="'+Ut(e)+'"]';var r=i;switch(t){case"style":r=ga(e);break;case"script":r=ma(e)}Xt.has(r)||(e=S({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Xt.set(r,e),l.querySelector(i)!==null||t==="style"&&l.querySelector(ci(r))||t==="script"&&l.querySelector(di(r))||(t=l.createElement("link"),dt(t,"link",e),at(t),l.head.appendChild(t)))}}function Ug(e,t){En.m(e,t);var n=va;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Ut(l)+'"][href="'+Ut(e)+'"]',r=i;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=ma(e)}if(!Xt.has(r)&&(e=S({rel:"modulepreload",href:e},t),Xt.set(r,e),n.querySelector(i)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(di(r)))return}l=n.createElement("link"),dt(l,"link",e),at(l),n.head.appendChild(l)}}}function Hg(e,t,n){En.S(e,t,n);var l=va;if(l&&e){var i=Bl(l).hoistableStyles,r=ga(e);t=t||"default";var d=i.get(r);if(!d){var p={loading:0,preload:null};if(d=l.querySelector(ci(r)))p.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Xt.get(r))&&eu(e,n);var b=d=l.createElement("link");at(b),dt(b,"link",e),b._p=new Promise(function(A,q){b.onload=A,b.onerror=q}),b.addEventListener("load",function(){p.loading|=1}),b.addEventListener("error",function(){p.loading|=2}),p.loading|=4,zs(d,t,l)}d={type:"stylesheet",instance:d,count:1,state:p},i.set(r,d)}}}function Bg(e,t){En.X(e,t);var n=va;if(n&&e){var l=Bl(n).hoistableScripts,i=ma(e),r=l.get(i);r||(r=n.querySelector(di(i)),r||(e=S({src:e,async:!0},t),(t=Xt.get(i))&&tu(e,t),r=n.createElement("script"),at(r),dt(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(i,r))}}function qg(e,t){En.M(e,t);var n=va;if(n&&e){var l=Bl(n).hoistableScripts,i=ma(e),r=l.get(i);r||(r=n.querySelector(di(i)),r||(e=S({src:e,async:!0,type:"module"},t),(t=Xt.get(i))&&tu(e,t),r=n.createElement("script"),at(r),dt(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(i,r))}}function ch(e,t,n,l){var i=(i=oe.current)?ws(i):null;if(!i)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=ga(n.href),n=Bl(i).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=ga(n.href);var r=Bl(i).hoistableStyles,d=r.get(e);if(d||(i=i.ownerDocument||i,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,d),(r=i.querySelector(ci(e)))&&!r._p&&(d.instance=r,d.state.loading=5),Xt.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Xt.set(e,n),r||Lg(i,e,n,d.state))),t&&l===null)throw Error(o(528,""));return d}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ma(n),n=Bl(i).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function ga(e){return'href="'+Ut(e)+'"'}function ci(e){return'link[rel="stylesheet"]['+e+"]"}function dh(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function Lg(e,t,n,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}),dt(t,"link",n),at(t),e.head.appendChild(t))}function ma(e){return'[src="'+Ut(e)+'"]'}function di(e){return"script[async]"+e}function fh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Ut(n.href)+'"]');if(l)return t.instance=l,at(l),l;var i=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),at(l),dt(l,"style",i),zs(l,n.precedence,e),t.instance=l;case"stylesheet":i=ga(n.href);var r=e.querySelector(ci(i));if(r)return t.state.loading|=4,t.instance=r,at(r),r;l=dh(n),(i=Xt.get(i))&&eu(l,i),r=(e.ownerDocument||e).createElement("link"),at(r);var d=r;return d._p=new Promise(function(p,b){d.onload=p,d.onerror=b}),dt(r,"link",l),t.state.loading|=4,zs(r,n.precedence,e),t.instance=r;case"script":return r=ma(n.src),(i=e.querySelector(di(r)))?(t.instance=i,at(i),i):(l=n,(i=Xt.get(r))&&(l=S({},n),tu(l,i)),e=e.ownerDocument||e,i=e.createElement("script"),at(i),dt(i,"link",l),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,zs(l,n.precedence,e));return t.instance}function zs(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=l.length?l[l.length-1]:null,r=i,d=0;d<l.length;d++){var p=l[d];if(p.dataset.precedence===t)r=p;else if(r!==i)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function eu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function tu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ts=null;function hh(e,t,n){if(Ts===null){var l=new Map,i=Ts=new Map;i.set(n,l)}else i=Ts,l=i.get(n),l||(l=new Map,i.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var r=n[i];if(!(r[Ma]||r[rt]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var d=r.getAttribute(t)||"";d=e+d;var p=l.get(d);p?p.push(r):l.set(d,[r])}}return l}function ph(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Yg(e,t,n){if(n===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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 vh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function $g(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=ga(l.href),r=t.querySelector(ci(i));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ms.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=r,at(r);return}r=t.ownerDocument||t,l=dh(l),(i=Xt.get(i))&&eu(l,i),r=r.createElement("link"),at(r);var d=r;d._p=new Promise(function(p,b){d.onload=p,d.onerror=b}),dt(r,"link",l),n.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Ms.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var nu=0;function Gg(e,t){return e.stylesheets&&e.count===0&&_s(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&_s(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4+t);0<e.imgBytes&&nu===0&&(nu=62500*kg());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&_s(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>nu?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(i)}}:null}function Ms(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_s(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Es=null;function _s(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Es=new Map,t.forEach(Xg,e),Es=null,Ms.call(e))}function Xg(e,t){if(!(t.state.loading&4)){var n=Es.get(e);if(n)var l=n.get(null);else{n=new Map,Es.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<i.length;r++){var d=i[r];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(n.set(d.dataset.precedence,d),l=d)}l&&n.set(null,l)}i=t.instance,d=i.getAttribute("data-precedence"),r=n.get(d)||l,r===l&&n.set(null,i),n.set(d,i),this.count++,l=Ms.bind(this),i.addEventListener("load",l),i.addEventListener("error",l),r?r.parentNode.insertBefore(i,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var fi={$$typeof:X,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function Qg(e,t,n,l,i,r,d,p,b){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=Ol(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ol(0),this.hiddenUpdates=Ol(null),this.identifierPrefix=l,this.onUncaughtError=i,this.onCaughtError=r,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function gh(e,t,n,l,i,r,d,p,b,A,q,G){return e=new Qg(e,t,n,d,b,A,q,G,p),t=1,r===!0&&(t|=24),r=Tt(3,null,null,t),e.current=r,r.stateNode=e,t=Or(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:l,isDehydrated:n,cache:t},Br(r),e}function mh(e){return e?(e=Kl,e):Kl}function yh(e,t,n,l,i,r){i=mh(i),l.context===null?l.context=i:l.pendingContext=i,l=Yn(t),l.payload={element:n},r=r===void 0?null:r,r!==null&&(l.callback=r),n=$n(e,l,t),n!==null&&(wt(n,e,t),Xa(n,e,t))}function xh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lu(e,t){xh(e,t),(e=e.alternate)&&xh(e,t)}function bh(e){if(e.tag===13||e.tag===31){var t=fl(e,67108864);t!==null&&wt(t,e,67108864),lu(e,67108864)}}function Sh(e){if(e.tag===13||e.tag===31){var t=At();t=Zt(t);var n=fl(e,t);n!==null&&wt(n,e,t),lu(e,t)}}var Cs=!0;function Vg(e,t,n,l){var i=M.T;M.T=null;var r=Y.p;try{Y.p=2,au(e,t,n,l)}finally{Y.p=r,M.T=i}}function Zg(e,t,n,l){var i=M.T;M.T=null;var r=Y.p;try{Y.p=8,au(e,t,n,l)}finally{Y.p=r,M.T=i}}function au(e,t,n,l){if(Cs){var i=iu(l);if(i===null)Xo(e,t,l,As,n),kh(e,l);else if(Wg(i,e,t,n,l))l.stopPropagation();else if(kh(e,l),t&4&&-1<Kg.indexOf(e)){for(;i!==null;){var r=Hl(i);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var d=un(r.pendingLanes);if(d!==0){var p=r;for(p.pendingLanes|=2,p.entangledLanes|=2;d;){var b=1<<31-gt(d);p.entanglements[1]|=b,d&=~b}en(r),(Ce&6)===0&&(hs=ht()+500,si(0))}}break;case 31:case 13:p=fl(r,2),p!==null&&wt(p,r,2),vs(),lu(r,2)}if(r=iu(l),r===null&&Xo(e,t,l,As,n),r===i)break;i=r}i!==null&&l.stopPropagation()}else Xo(e,t,l,null,n)}}function iu(e){return e=sr(e),su(e)}var As=null;function su(e){if(As=null,e=Ul(e),e!==null){var t=h(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=g(t),e!==null)return e;e=null}else if(n===31){if(e=j(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return As=e,null}function jh(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(Sa()){case ja:return 2;case _l:return 8;case Cl:case Ws:return 32;case ka:return 268435456;default:return 32}default:return 32}}var ru=!1,Pn=null,el=null,tl=null,hi=new Map,pi=new Map,nl=[],Kg="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 kh(e,t){switch(e){case"focusin":case"focusout":Pn=null;break;case"dragenter":case"dragleave":el=null;break;case"mouseover":case"mouseout":tl=null;break;case"pointerover":case"pointerout":hi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":pi.delete(t.pointerId)}}function vi(e,t,n,l,i,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:r,targetContainers:[i]},t!==null&&(t=Hl(t),t!==null&&bh(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Wg(e,t,n,l,i){switch(t){case"focusin":return Pn=vi(Pn,e,t,n,l,i),!0;case"dragenter":return el=vi(el,e,t,n,l,i),!0;case"mouseover":return tl=vi(tl,e,t,n,l,i),!0;case"pointerover":var r=i.pointerId;return hi.set(r,vi(hi.get(r)||null,e,t,n,l,i)),!0;case"gotpointercapture":return r=i.pointerId,pi.set(r,vi(pi.get(r)||null,e,t,n,l,i)),!0}return!1}function wh(e){var t=Ul(e.target);if(t!==null){var n=h(t);if(n!==null){if(t=n.tag,t===13){if(t=g(n),t!==null){e.blockedOn=t,wi(e.priority,function(){Sh(n)});return}}else if(t===31){if(t=j(n),t!==null){e.blockedOn=t,wi(e.priority,function(){Sh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ds(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=iu(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);ir=l,n.target.dispatchEvent(l),ir=null}else return t=Hl(n),t!==null&&bh(t),e.blockedOn=n,!1;t.shift()}return!0}function zh(e,t,n){Ds(e)&&n.delete(t)}function Jg(){ru=!1,Pn!==null&&Ds(Pn)&&(Pn=null),el!==null&&Ds(el)&&(el=null),tl!==null&&Ds(tl)&&(tl=null),hi.forEach(zh),pi.forEach(zh)}function Rs(e,t){e.blockedOn===t&&(e.blockedOn=null,ru||(ru=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Jg)))}var Os=null;function Th(e){Os!==e&&(Os=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){Os===e&&(Os=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],i=e[t+2];if(typeof l!="function"){if(su(l||n)===null)continue;break}var r=Hl(n);r!==null&&(e.splice(t,3),t-=3,ao(r,{pending:!0,data:i,method:n.method,action:l},l,i))}}))}function ya(e){function t(b){return Rs(b,e)}Pn!==null&&Rs(Pn,e),el!==null&&Rs(el,e),tl!==null&&Rs(tl,e),hi.forEach(t),pi.forEach(t);for(var n=0;n<nl.length;n++){var l=nl[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<nl.length&&(n=nl[0],n.blockedOn===null);)wh(n),n.blockedOn===null&&nl.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var i=n[l],r=n[l+1],d=i[yt]||null;if(typeof r=="function")d||Th(n);else if(d){var p=null;if(r&&r.hasAttribute("formAction")){if(i=r,d=r[yt]||null)p=d.formAction;else if(su(i)!==null)continue}else p=d.action;typeof p=="function"?n[l+1]=p:(n.splice(l,3),l-=3),Th(n)}}}function Mh(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(d){return i=d})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function ou(e){this._internalRoot=e}Ns.prototype.render=ou.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var n=t.current,l=At();yh(n,l,e,t,null,null)},Ns.prototype.unmount=ou.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;yh(e.current,2,null,e,null,null),vs(),t[Nl]=null}};function Ns(e){this._internalRoot=e}Ns.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ta();e={blockedOn:null,target:e,priority:t};for(var n=0;n<nl.length&&t!==0&&t<nl[n].priority;n++);nl.splice(n,0,e),n===0&&wh(e)}};var Eh=u.version;if(Eh!=="19.2.8")throw Error(o(527,Eh,"19.2.8"));Y.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=v(t),e=e!==null?w(e):null,e=e===null?null:e.stateNode,e};var Fg={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Us=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Us.isDisabled&&Us.supportsFiber)try{on=Us.inject(Fg),st=Us}catch{}}return mi.createRoot=function(e,t){if(!f(e))throw Error(o(299));var n=!1,l="",i=Od,r=Nd,d=Ud;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=gh(e,1,!1,null,null,n,l,null,i,r,d,Mh),e[Nl]=t.current,Go(e),new ou(t)},mi.hydrateRoot=function(e,t,n){if(!f(e))throw Error(o(299));var l=!1,i="",r=Od,d=Nd,p=Ud,b=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(r=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError),n.formState!==void 0&&(b=n.formState)),t=gh(e,1,!0,t,n??null,l,i,b,r,d,p,Mh),t.context=mh(null),n=t.current,l=At(),l=Zt(l),i=Yn(l),i.callback=null,$n(n,i,l),n=l,t.current.lanes=n,rl(t,n),en(t),e[Nl]=t.current,Go(e),new Ns(t)},mi.version="19.2.8",mi}var Bh;function om(){if(Bh)return du.exports;Bh=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(u){console.error(u)}}return s(),du.exports=rm(),du.exports}var um=om();const cm=["run_started","run_resumed","run_finished","run_error","run_titled","cost","budget_alert","budget_stop","usage_limit","mission_incomplete","settings_changed","message","steer","worker_started","worker_progress","worker_finished","worker_stalled","worker_looping","director_looping","service_exposed","auto_allowed","auto_denied","root_allowed","permission_request","permission_resolved","permission_timeout","question","question_answered","question_timeout","chat_message","chat_turn","chat_cost","chat_error","chat_cleared","chat_proposal_dismissed","chat_question","chat_answered","chat_question_timeout","mission_proposed","mission_started","models_changed"],Eu=new Set,$s=new Set;let yi=null;function Sp(){if(!yi){yi=new EventSource("/events"),yi.onopen=()=>$s.forEach(s=>s(!0)),yi.onerror=()=>$s.forEach(s=>s(!1));for(const s of cm)yi.addEventListener(s,u=>{const c=JSON.parse(u.data);Eu.forEach(o=>o(s,c))})}}function Xs(s){return Sp(),Eu.add(s),()=>Eu.delete(s)}function dm(s){return Sp(),$s.add(s),()=>$s.delete(s)}function zl(s){return s.costBasis==="priced"||s.costBasis==="free"||s.costBasis==="unpriced"?s.costBasis:s.metered===!1?"unpriced":"priced"}function jp(s){if(s)switch(s.kind){case"claude-code":return s.configDir;case"codex":return s.codexHome??"~/.codex";case"openai-compatible":return s.baseUrl;case"anthropic-api":return`$${s.apiKeyEnv}`}}const Ru={runStatus:"idle",mission:"",title:"",costBasis:"priced",usage:null,costUsd:0,budgetUsd:5,agents:[],entries:[],approvals:[],questions:[],missionDoc:null,services:[]};let qe=0;function kp(s,u,c){const o=[],f=(h,g,j)=>o.push({id:++qe,ts:c,agent:s,kind:h,title:g,body:j});if(u.type==="system"&&u.subtype==="init")f("system","init",`model: ${u.model??"?"}`);else if(u.type==="assistant"){for(const h of u.message?.content??[])if(h.type==="text"&&h.text?.trim())f("text",s,h.text);else if(h.type==="tool_use"){const g=String(h.name).replace("mcp__foreman__","").replace("mcp__playwright__","");f("tool",g,JSON.stringify(h.input).slice(0,4e3))}}else if(u.type==="user"&&Array.isArray(u.message?.content)){for(const h of u.message.content)if(h.type==="tool_result"){const g=typeof h.content=="string"?h.content:(h.content??[]).map(j=>j.text??"").join("");f("result","result",String(g).slice(0,700))}}else u.type==="result"&&f(u.is_error?"error":"system",`result · ${u.subtype??""}`,String(u.result??"").slice(0,2500));return o}const qh=s=>String(s??"").replace(/\s+/g," ").trim();function fm(s,u){if(s.kind==="system"&&s.title.startsWith("result ·")&&s.body){for(let c=u.length-1;c>=0&&c>=u.length-40;c--){const o=u[c];if(o.agent===s.agent&&o.kind==="text"){const f=qh(o.body),h=qh(s.body);return f.length>=40&&h.length>=40&&(f.startsWith(h)||h.startsWith(f))?{...s,body:""}:s}}return s}if(s.kind==="result"){const c=/^\[(worker-\d+) (finished|failed|done|started|resumed|stalled|interrupted)\]\s*/.exec(s.body);if(c){const o=s.body.slice(c[0].length).split(`
10
+ `).find(f=>f.trim())??"";return{...s,title:`${c[1]} ${c[2]}`,body:o.length>160?`${o.slice(0,159).trimEnd()}…`:o}}}return s}function hm(s,u){const c=u.ts??Date.now(),o=u.data;switch(u.event){case"run_started":return{...Ru,missionDoc:s.missionDoc,runStatus:"running",mission:o.mission,budgetUsd:o.budgetUsd,costBasis:zl(o),usage:o.usage??null,agents:[{id:"director",status:"running"}]};case"run_resumed":{const f=s.agents.filter(h=>h.id!=="director").map(h=>h.status==="running"?{...h,status:"interrupted"}:h);return{...s,runStatus:"running",mission:o.mission??s.mission,budgetUsd:o.budgetUsd??s.budgetUsd,costUsd:o.costUsd??s.costUsd,costBasis:o.costBasis||o.metered!==void 0?zl(o):s.costBasis,usage:o.usage??s.usage,agents:[{id:"director",status:"running"},...f],entries:[...s.entries,{id:++qe,ts:c,agent:"system",kind:"system",title:"mission resumed",body:"Director session restored; re-verifying state against MISSION.md."}]}}case"run_finished":return{...s,runStatus:o.status||"done",costUsd:o.costUsd??s.costUsd,approvals:[],questions:[],agents:s.agents.map(f=>f.id==="director"?{...f,status:o.status||"done"}:f)};case"mission_incomplete":return{...s,entries:[...s.entries,{id:++qe,ts:c,agent:"system",kind:"error",title:"not done",body:[o.text,"",...(o.unmet??[]).map(f=>`▢ ${f}`)].join(`
11
+ `)}]};case"run_error":return{...s,entries:[...s.entries,{id:++qe,ts:c,agent:"system",kind:"error",title:"error",body:o.error}]};case"worker_stalled":return{...s,entries:[...s.entries,{id:++qe,ts:c,agent:String(o.id??"worker"),kind:"error",title:"worker stalled",body:String(o.text??"Worker produced no output and was stopped.")}]};case"worker_looping":return{...s,entries:[...s.entries,{id:++qe,ts:c,agent:String(o.id??"worker"),kind:"error",title:"worker looping",body:String(o.text??`Worker repeated the identical ${String(o.toolName??"tool")} call ${String(o.count??"?")} times and was stopped.`)}]};case"director_looping":return{...s,entries:[...s.entries,{id:++qe,ts:c,agent:"director",kind:"error",title:"director looping",body:String(o.text??`Director issued the identical ${String(o.toolName??"tool")} call ${String(o.count??"?")} times in a row — notified.`)}]};case"settings_changed":return{...s,budgetUsd:typeof o.budgetUsd=="number"?o.budgetUsd:s.budgetUsd,entries:[...s.entries,{id:++qe,ts:c,agent:"system",kind:"steer",title:"settings changed",body:(o.changes??[]).join(`
12
+ `)}]};case"run_titled":return{...s,title:String(o.title??"")};case"cost":return{...s,costUsd:o.costUsd,budgetUsd:o.budgetUsd,usage:o.usage??s.usage,costBasis:zl(o)};case"message":{const f=o.agent==="director"&&o.msg?.session_id?{directorSessionId:o.msg.session_id}:{},h=kp(o.agent,o.msg,c).map(g=>fm(g,s.entries));return h.length||f.directorSessionId?{...s,...f,entries:[...s.entries.slice(-1499),...h]}:s}case"steer":return{...s,entries:[...s.entries,{id:++qe,ts:c,agent:"you",kind:"steer",title:"steer",body:o.text,to:o.to,timing:o.timing}]};case"usage_limit":return{...s,entries:[...s.entries,{id:++qe,ts:c,agent:"system",kind:"error",title:"usage limit",body:o.text}]};case"models_changed":return{...s,entries:[...s.entries,{id:++qe,ts:c,agent:"system",kind:"system",title:"models changed",body:o.text}]};case"budget_alert":return{...s,entries:[...s.entries,{id:++qe,ts:c,agent:"system",kind:o.level==="exceeded"?"error":"system",title:"budget",body:o.text}]};case"service_exposed":return{...s,services:[...s.services.filter(f=>f.port!==o.port),{port:o.port,label:o.label,path:o.path,url:o.url,since:c}]};case"worker_started":{const f=s.agents.filter(g=>g.id!==o.id),h=s.agents.find(g=>g.id===o.id);return{...s,agents:[...f,{id:o.id,status:"running",task:o.task??h?.task}],entries:[...s.entries,{id:++qe,ts:c,agent:o.id,kind:"system",title:o.resumed?"resumed":"spawned",body:o.task??""}]}}case"worker_progress":{const f=String(o.status??""),h=[f,...Array.isArray(o.done)&&o.done.length?[`done: ${o.done.join(", ")}`]:[],...o.next?[`next: ${String(o.next)}`]:[],...o.blocked?[`BLOCKED: ${String(o.blocked)}`]:[]].join(`
13
+ `);return{...s,agents:s.agents.map(g=>g.id===o.id?{...g,task:f||g.task}:g),entries:[...s.entries,{id:++qe,ts:c,agent:String(o.id??"worker"),kind:"system",title:o.blocked?"progress · blocked":"progress",body:h}]}}case"worker_finished":return{...s,agents:s.agents.map(f=>f.id===o.id?{...f,status:o.status}:f)};case"permission_request":return s.approvals.some(f=>f.id===o.id)?s:{...s,approvals:[...s.approvals,{...o,since:c}],entries:[...s.entries,{id:++qe,ts:c,agent:String(o.agent??"director"),kind:"system",title:"waiting on you",body:`${String(o.toolName??"tool")}: ${String(o.description??o.decisionReason??o.title??"needs your approval")}`}]};case"permission_resolved":{const f=s.approvals.find(h=>h.id===o.id);return f?{...s,approvals:s.approvals.filter(h=>h.id!==o.id),entries:[...s.entries,{id:++qe,ts:c,agent:String(f.agent??"director"),kind:"system",title:"resolved",body:String(o.behavior??"resolved")}]}:s}case"question":return s.questions.some(f=>f.id===o.id)?s:{...s,questions:[...s.questions,{...o,since:c}],entries:[...s.entries,{id:++qe,ts:c,agent:"director",kind:"system",title:"waiting on you",body:`question: ${String(o.question??"")}`}]};case"question_answered":return s.questions.find(h=>h.id===o.id)?{...s,questions:s.questions.filter(h=>h.id!==o.id),entries:[...s.entries,{id:++qe,ts:c,agent:"director",kind:"system",title:"resolved",body:"answered"}]}:s;case"root_allowed":return{...s,entries:[...s.entries,{id:++qe,ts:c,agent:String(o.agent??"director"),kind:"system",title:"path allowed for run",body:String(o.path??"")}]};case"auto_denied":return{...s,entries:[...s.entries,{id:++qe,ts:c,agent:String(o.agent??"director"),kind:"system",title:"redirected to workspace",body:String(o.reason??"")}]};case"permission_timeout":case"question_timeout":{const f=u.event==="permission_timeout";if(!(f?s.approvals.find(j=>j.id===o.id):s.questions.find(j=>j.id===o.id)))return s;const g=Math.max(1,Math.round(Number(o.afterMs??0)/6e4));return{...s,approvals:f?s.approvals.filter(j=>j.id!==o.id):s.approvals,questions:f?s.questions:s.questions.filter(j=>j.id!==o.id),entries:[...s.entries,{id:++qe,ts:c,agent:String(o.agent??"director"),kind:"error",title:f?"auto-denied (unattended)":"auto-answered (unattended)",body:f?`${String(o.toolName??"tool")} waited ${g} min with no answer and was denied; the agent was told to redo the work inside .foreman/work/.`:`The director's question waited ${g} min with no answer; it was told to decide itself and record the decision in MISSION.md.`}]}}default:return s}}function pm(s,u){switch(u.t){case"reset":return Ru;case"wire":return hm(s,u.e);case"missiondoc":return{...s,missionDoc:u.doc}}}function vm(s,u){const[c,o]=x.useReducer(pm,Ru),f=x.useRef(null);return x.useEffect(()=>{if(o({t:"reset"}),!s)return;let h=!1;f.current=[];const g=u?Xs((v,w)=>{if(w.runId!==s)return;const S={event:v,data:w.data};f.current?f.current.push(S):o({t:"wire",e:S})}):null;(async()=>{try{const v=await fetch(`/runs/${encodeURIComponent(s)}/events`).catch(()=>null);if(h||!v?.ok)return;const{events:w}=await v.json();if(h)return;for(const S of w)o({t:"wire",e:S})}finally{if(!h){for(const v of f.current??[])o({t:"wire",e:v});f.current=null}}})();const j=async()=>{const v=await fetch(`/missiondoc?run=${encodeURIComponent(s)}`).catch(()=>null);v?.ok&&!h&&o({t:"missiondoc",doc:(await v.json()).doc})};j();const m=u?setInterval(j,5e3):null;return()=>{h=!0,g?.(),m&&clearInterval(m)}},[s,u]),c}function gm(s,u){if(s==="message"){const c=u.msg;if(c?.type==="assistant")for(const o of c.message?.content??[]){if(o.type==="text"&&o.text?.trim())return`${u.agent}: ${o.text.trim()}`;if(o.type==="tool_use"){const f=String(o.name||"").replace(/^mcp__(foreman|playwright)__/,"");return`${u.agent} · ${f}`}}return null}return s==="worker_started"?`${u.id} ${u.resumed?"resumed":"spawned"}`:s==="worker_finished"?`${u.id} ${u.status}`:s==="worker_progress"?`${u.id}: ${u.blocked?`BLOCKED — ${u.blocked}`:u.status}`:s==="steer"?`you → ${u.to}: ${u.text}`:s==="budget_alert"?u.text:s==="question"?`director asks: ${u.question}`:null}function mm(){const[s,u]=x.useState([]),[c,o]=x.useState(!1),[f,h]=x.useState({mode:"none",source:""}),[g,j]=x.useState({}),[m,v]=x.useState(null),[w,S]=x.useState(""),k=x.useCallback(async()=>{const O=await fetch("/projects").catch(()=>null);if(!O?.ok)return;const Q=await O.json();u(Q.projects),h({mode:Q.authMode??"none",source:Q.authSource??"",account:Q.authAccount??void 0}),v(Q.update?.latest?{latest:String(Q.update.latest),current:String(Q.version??"")}:null),S(String(Q.version??""))},[]);return x.useEffect(()=>{k();const O=setInterval(k,3e3),Q=Xs((_,R)=>{if(!R.chat&&(["run_started","run_resumed","run_finished","permission_request","permission_resolved","permission_timeout","question","question_answered","question_timeout"].includes(_)&&k(),R.projectId))if(_==="run_finished")j(W=>{const{[R.projectId]:X,...J}=W;return J});else{const W=gm(_,R.data);W&&j(X=>({...X,[R.projectId]:W.slice(0,160)}))}}),Z=dm(_=>{o(_),_&&k()});return()=>{clearInterval(O),Q(),Z()}},[k]),{projects:s,connected:c,auth:f,refresh:k,activity:g,update:m,version:w}}function ym(s){const[u,c]=x.useState([]),o=x.useCallback(async()=>{const f=await fetch(`/runs?projectId=${encodeURIComponent(s)}`).catch(()=>null);f?.ok&&c((await f.json()).runs)},[s]);return x.useEffect(()=>(o(),Xs((h,g)=>{g.projectId===s&&(h==="run_started"||h==="run_resumed"||h==="run_finished")&&o()})),[s,o]),u}const _u={entries:[],costUsd:0,proposal:null,thinking:!1,question:null,who:null};function xm(s,u){return s.map(c=>`${c.question.replace(/[?:]\s*$/,"")} → ${u[c.question]||"(no answer)"}`).join(`
14
+ `)}function wp(s,u){const c=u.ts??Date.now(),o=u.data;switch(u.event){case"chat_cleared":return zp(s,{t:"reset"});case"chat_proposal_dismissed":return{...s,proposal:null};case"chat_message":return{...s,entries:[...s.entries,{id:++qe,ts:c,agent:"you",kind:"steer",title:"you",body:o.text}]};case"message":{const f=kp("foreman",o.msg,c).filter(h=>h.kind==="text"||h.kind==="tool"&&!/ask_user/.test(h.title));return f.length?{...s,entries:[...s.entries,...f]}:s}case"mission_proposed":return{...s,proposal:o};case"mission_started":return{...s,proposal:null,entries:[...s.entries,{id:++qe,ts:c,agent:"system",kind:"system",title:"mission started",body:o.mission}]};case"chat_cost":return{...s,costUsd:o.costUsd??s.costUsd};case"chat_turn":return{...s,thinking:o.state==="thinking",who:typeof o.model=="string"&&typeof o.provider=="string"?{model:o.model,provider:o.provider,costBasis:zl(o)}:s.who};case"chat_question":return Array.isArray(o.questions)&&o.questions.length?{...s,question:{id:String(o.id),questions:o.questions,askedAt:c}}:s;case"chat_answered":{const f=s.question,h=f&&f.id===o.id?f.questions:[],g=h.length?xm(h,o.answers??{}):Object.entries(o.answers??{}).map(([j,m])=>`${j} → ${m}`).join(`
15
+ `);return{...s,question:s.question?.id===o.id?null:s.question,entries:g?[...s.entries,{id:++qe,ts:c,agent:"you",kind:"steer",title:o.source?`you chose · via ${o.source}`:"you chose",body:g}]:s.entries}}case"chat_question_timeout":return{...s,question:s.question?.id===o.id?null:s.question,entries:[...s.entries,{id:++qe,ts:c,agent:"system",kind:"error",title:"no answer (unattended)",body:`No answer after ${Math.round((o.afterMs??0)/6e4)} minutes — the planner is proceeding on its recommended options and will state the assumptions.`}]};case"chat_error":return{...s,entries:[...s.entries,{id:++qe,ts:c,agent:"system",kind:"error",title:"planner",body:o.error}]};default:return s}}function zp(s,u){switch(u.t){case"reset":return _u;case"load":return u.view;case"dismiss":return{...s,proposal:null};case"wire":return wp(s,u.e)}}function bm(s){const[u,c]=x.useReducer(zp,_u),o=x.useRef(null),f=x.useCallback(async w=>{const S=await fetch(`/chat?projectId=${encodeURIComponent(w)}`).catch(()=>null);return S?.ok?await S.json():null},[]);x.useEffect(()=>{if(c({t:"reset"}),!s)return;let w=!1;o.current=[];const S=Xs((k,O)=>{if(!O.chat||O.projectId!==s)return;const Q={event:k,data:O.data};o.current?o.current.push(Q):c({t:"wire",e:Q})});return(async()=>{const k=await f(s);if(!w){if(k){let O={..._u,costUsd:k.costUsd,proposal:k.proposal,thinking:k.thinking};for(const Q of k.events)O=wp(O,Q);O={...O,question:k.question??null,who:k.who??O.who,thinking:k.thinking},c({t:"load",view:O})}for(const O of o.current??[])c({t:"wire",e:O});o.current=null}})(),()=>{w=!0,S()}},[s,f]);const h=x.useCallback(async w=>{if(!s)return"no project";const S=await Dt("/chat",{projectId:s,text:w});return S.ok?null:(await S.json().catch(()=>({}))).error??"could not reach the planner"},[s]),g=x.useCallback(async()=>{s&&await Dt("/chat/stop",{projectId:s}).catch(()=>{})},[s]),j=x.useCallback(async()=>{s&&(await fetch(`/chat?projectId=${encodeURIComponent(s)}`,{method:"DELETE"}).catch(()=>{}),c({t:"reset"}))},[s]),m=x.useCallback(async(w,S)=>{if(!s)return"no project";const k=await Dt("/chat/answer",{projectId:s,id:w,answers:S});return k.ok?null:(await k.json().catch(()=>({}))).error??"could not deliver the answer"},[s]),v=x.useCallback(()=>c({t:"dismiss"}),[]);return{...u,send:h,answer:m,clear:j,stop:g,dismissProposal:v}}function Sm(){const[s,u]=x.useState(null),[c,o]=x.useState(!1),[f,h]=x.useState(""),g=x.useCallback(async()=>{const v=await fetch("/notify").catch(()=>null);v?.ok&&u(await v.json())},[]);x.useEffect(()=>{g()},[g]),x.useEffect(()=>{if(!s?.telegram.linking)return;const v=setInterval(()=>{g()},3e3);return()=>clearInterval(v)},[s?.telegram.linking,g]);const j=x.useCallback(async v=>{o(!0),h("");try{const w=await v();w.ok||h((await w.json().catch(()=>({}))).error??`HTTP ${w.status}`)}catch(w){h(w instanceof Error?w.message:String(w))}finally{o(!1),await g()}},[g]),m=(v,w,S)=>fetch(w,{method:v,headers:S?{"content-type":"application/json"}:void 0,body:S?JSON.stringify(S):void 0});return{status:s,busy:c,error:f,refresh:g,onSaveToken:v=>{j(()=>m("PUT","/notify/telegram/token",{token:v}))},onClearToken:()=>{j(()=>m("DELETE","/notify/telegram/token"))},onLink:()=>{j(()=>m("POST","/notify/telegram/link"))},onUnlink:()=>{j(()=>m("DELETE","/notify/telegram/link"))},onTest:()=>{j(()=>m("POST","/notify/test"))},onSavePublicUrl:v=>{j(()=>m("PATCH","/notify/settings",{publicUrl:v}))}}}function jm(){const s=()=>{const h=window.location.hash.match(/^#\/p\/([^/]+)(?:\/r\/([^/]+)(?:\/(files|runs))?)?/);return{projectId:h?decodeURIComponent(h[1]):null,runId:h?.[2]?decodeURIComponent(h[2]):null,tab:h?.[3]==="files"||h?.[3]==="runs"?h[3]:"mission"}},[u,c]=x.useState(s);x.useEffect(()=>{const h=()=>c(s());return window.addEventListener("hashchange",h),()=>window.removeEventListener("hashchange",h)},[]);const o=x.useCallback(h=>{window.location.hash=h?`#/p/${encodeURIComponent(h)}`:"#/"},[]),f=x.useCallback((h,g,j="mission")=>{window.location.hash=g?`#/p/${encodeURIComponent(h)}/r/${encodeURIComponent(g)}${j==="mission"?"":`/${j}`}`:`#/p/${encodeURIComponent(h)}`},[]);return{...u,go:o,goRun:f}}const Dt=(s,u)=>fetch(s,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(u)}),Fe={linkProject:(s,u,c)=>Dt("/projects",{folder:s,name:u,provider:c}),instances:()=>fetch("/instances"),updateProject:(s,u)=>fetch(`/projects/${encodeURIComponent(s)}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(u)}),unlinkProject:s=>fetch(`/projects/${encodeURIComponent(s)}`,{method:"DELETE"}),run:(s,u,c,o={})=>Dt("/run",{projectId:s,mission:u,budgetUsd:c,directorModel:o.directorModel||void 0,workerModel:o.workerModel||void 0,directorProviderId:o.directorProviderId||void 0,workerProviderId:o.workerProviderId||void 0,browserTools:o.browserTools||void 0}),resume:(s,u={})=>Dt(`/runs/${encodeURIComponent(s)}/resume`,u),permission:(s,u,c)=>Dt("/permission",{id:s,behavior:u,message:c}),answer:(s,u)=>Dt("/answer",{id:s,text:u}),attach:async(s,u)=>{const c=await Promise.all(u.map(async o=>({name:o.name,type:o.type,data:await new Promise((f,h)=>{const g=new FileReader;g.onload=()=>f(String(g.result).split(",")[1]??""),g.onerror=()=>h(g.error),g.readAsDataURL(o)})})));return Dt("/attachments",{projectId:s,files:c})},forkPlan:(s,u)=>Dt("/chat/fork",{projectId:s,runId:u}),steer:(s,u)=>Dt("/steer",{runId:s,text:u}),interrupt:s=>Dt("/interrupt",{runId:s}),updateRun:(s,u)=>fetch("/run",{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({runId:s,...u})}).then(async c=>{if(!c.ok)throw new Error((await c.json().catch(()=>({}))).error||`HTTP ${c.status}`);return c.json()}),setProviderKey:(s,u)=>fetch(`/providers/${encodeURIComponent(s)}/key`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({key:u})}),clearProviderKey:s=>fetch(`/providers/${encodeURIComponent(s)}/key`,{method:"DELETE"}),browse:s=>fetch("/browse"+(s?`?path=${encodeURIComponent(s)}`:"")),mkdir:(s,u)=>Dt("/mkdir",{parent:s,name:u}),locate:s=>fetch(`/locate?name=${encodeURIComponent(s)}`)};async function Tp(s,u,c){if(!c.length)return u;const o=await Fe.attach(s,c),f=await o.json().catch(()=>({}));if(!o.ok)throw new Error(f.error||"could not save the attachments");const h=(f.files??[]).map(g=>g.path);return`${u}
16
+
17
+ Attached files (in the project folder — read them):
18
+ ${h.map(g=>`- ${g}`).join(`
19
+ `)}`}const Mp=(...s)=>s.filter((u,c,o)=>!!u&&u.trim()!==""&&o.indexOf(u)===c).join(" ").trim();const km=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const wm=s=>s.replace(/^([A-Z])|[\s-_]+(\w)/g,(u,c,o)=>o?o.toUpperCase():c.toLowerCase());const Lh=s=>{const u=wm(s);return u.charAt(0).toUpperCase()+u.slice(1)};var vu={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const zm=s=>{for(const u in s)if(u.startsWith("aria-")||u==="role"||u==="title")return!0;return!1},Tm=x.createContext({}),Mm=()=>x.useContext(Tm),Em=x.forwardRef(({color:s,size:u,strokeWidth:c,absoluteStrokeWidth:o,className:f="",children:h,iconNode:g,...j},m)=>{const{size:v=24,strokeWidth:w=2,absoluteStrokeWidth:S=!1,color:k="currentColor",className:O=""}=Mm()??{},Q=o??S?Number(c??w)*24/Number(u??v):c??w;return x.createElement("svg",{ref:m,...vu,width:u??v??vu.width,height:u??v??vu.height,stroke:s??k,strokeWidth:Q,className:Mp("lucide",O,f),...!h&&!zm(j)&&{"aria-hidden":"true"},...j},[...g.map(([Z,_])=>x.createElement(Z,_)),...Array.isArray(h)?h:[h]])});const ue=(s,u)=>{const c=x.forwardRef(({className:o,...f},h)=>x.createElement(Em,{ref:h,iconNode:u,className:Mp(`lucide-${km(Lh(s))}`,`lucide-${s}`,o),...f}));return c.displayName=Lh(s),c};const _m=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Cm=ue("activity",_m);const Am=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Dm=ue("arrow-left",Am);const Rm=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],Om=ue("arrow-up-down",Rm);const Nm=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Um=ue("bell",Nm);const Hm=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Bm=ue("bot",Hm);const qm=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],Lm=ue("braces",qm);const Ym=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],$m=ue("bug",Ym);const Gm=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Xm=ue("check",Gm);const Qm=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Vm=ue("chevron-down",Qm);const Zm=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Km=ue("chevron-left",Zm);const Wm=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Jm=ue("chevron-right",Wm);const Fm=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Im=ue("circle",Fm);const Pm=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],ey=ue("clock",Pm);const ty=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],ny=ue("code",ty);const ly=[["path",{d:"M13.744 17.736a6 6 0 1 1-7.48-7.48",key:"bq4yh3"}],["path",{d:"M15 6h1v4",key:"11y1tn"}],["path",{d:"m6.134 14.768.866-.5 2 3.464",key:"17snzx"}],["circle",{cx:"16",cy:"8",r:"6",key:"14bfc9"}]],ay=ue("coins",ly);const iy=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],sy=ue("corner-down-left",iy);const ry=[["path",{d:"M14 9 9 4 4 9",key:"1af5af"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]],oy=ue("corner-left-up",ry);const uy=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],cy=ue("cpu",uy);const dy=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],fy=ue("eye",dy);const hy=[["path",{d:"M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z",key:"ukzhwg"}],["path",{d:"M14.487 7.858A1 1 0 0 1 14 7V2",key:"1klhew"}],["path",{d:"M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516",key:"rxaxab"}],["path",{d:"M8 18h1",key:"13wk12"}]],py=ue("file-pen-line",hy);const vy=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],gy=ue("file-pen",vy);const my=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],yy=ue("file-text",my);const xy=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],by=ue("file",xy);const Sy=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],jy=ue("folder-open",Sy);const ky=[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]],wy=ue("folder-search",ky);const zy=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Ty=ue("folder",zy);const My=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Ey=ue("funnel",My);const _y=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Cy=ue("globe",_y);const Ay=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Dy=ue("image",Ay);const Ry=[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]],Oy=ue("layout-template",Ry);const Ny=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],Uy=ue("list-checks",Ny);const Hy=[["path",{d:"M16 5H3",key:"m91uny"}],["path",{d:"M16 12H3",key:"1a2rj7"}],["path",{d:"M9 19H3",key:"s61nz1"}],["path",{d:"m16 16-3 3 3 3",key:"117b85"}],["path",{d:"M21 5v12a2 2 0 0 1-2 2h-6",key:"hey24a"}]],By=ue("list-end",Hy);const qy=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ly=ue("loader-circle",qy);const Yy=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],$y=ue("message-circle-question-mark",Yy);const Gy=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]],Xy=ue("message-square-plus",Gy);const Qy=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Vy=ue("message-square",Qy);const Zy=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Ky=ue("moon",Zy);const Wy=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],Jy=ue("octagon-alert",Wy);const Fy=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Iy=ue("paperclip",Fy);const Py=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],e0=ue("pause",Py);const t0=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],n0=ue("pen-line",t0);const l0=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],a0=ue("plus",l0);const i0=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],s0=ue("power",i0);const r0=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],o0=ue("quote",r0);const u0=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],c0=ue("rotate-ccw-clock",u0);const d0=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],f0=ue("rotate-cw",d0);const h0=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],p0=ue("save",h0);const v0=[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],g0=ue("search-check",v0);const m0=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],y0=ue("search",m0);const x0=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],b0=ue("send-horizontal",x0);const S0=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],j0=ue("server",S0);const k0=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],w0=ue("settings",k0);const z0=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],T0=ue("shield-check",z0);const M0=[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]],E0=ue("shuffle",M0);const _0=[["path",{d:"m10 9-3 3 3 3",key:"1oro0q"}],["path",{d:"m14 15 3-3-3-3",key:"bz13h7"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]],C0=ue("square-code",_0);const A0=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],D0=ue("sun",A0);const R0=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],O0=ue("terminal",R0);const N0=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],U0=ue("text-align-start",N0);const H0=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],B0=ue("triangle-alert",H0);const q0=[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]],L0=ue("unlink",q0);const Y0=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],$0=ue("user-plus",Y0);const G0=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],X0=ue("user",G0);const Q0=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],V0=ue("users",Q0);const Z0=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],K0=ue("wifi-off",Z0);const W0=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],J0=ue("wrench",W0);const F0=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],I0=ue("x",F0);const P0=[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]],ex=ue("zap",P0),Yh={Circle:Im,Activity:Cm,Check:Xm,X:I0,Pause:e0,WifiOff:K0,History:c0,TriangleAlert:B0,OctagonAlert:Jy,RotateCw:f0,Bot:Bm,Plus:a0,CornerLeftUp:oy,ArrowLeft:Dm,Folder:Ty,Bell:Um,Unlink:L0,Sun:D0,Moon:Ky,Clock:ey,AlignLeft:U0,Users:V0,ChevronDown:Vm,ChevronRight:Jm,ChevronLeft:Km,Braces:Lm,MessageCircleQuestion:$y,ShieldCheck:T0,Coins:ay,LayoutTemplate:Oy,Save:p0,Filter:Ey,Settings:w0,Paperclip:Iy,File:by,Image:Dy,Code:ny,SquareCode:C0,Quote:o0,PenLine:n0,Eye:fy,Cpu:cy,LoaderCircle:Ly,MessageSquarePlus:Xy,SendHorizontal:b0,User:X0,Zap:ex,ListEnd:By,FilePen:gy,FilePenLine:py,FileText:yy,Terminal:O0,Search:y0,FolderSearch:wy,FolderOpen:jy,Globe:Cy,ListChecks:Uy,UserPlus:$0,MessageSquare:Vy,CornerDownLeft:sy,Power:s0,Wrench:J0,Bug:$m,Shuffle:E0,SearchCheck:g0,ArrowUpDown:Om,Server:j0},$h={idle:"Circle",running:"Activity",done:"Check",error:"X",interrupted:"Pause",disconnected:"WifiOff",readonly:"History",warning:"TriangleAlert",critical:"OctagonAlert",caution:"TriangleAlert",resume:"RotateCw",orchestration:"Bot",add:"Plus",parent:"CornerLeftUp",back:"ArrowLeft",folder:"Folder",needsYou:"Bell",unlink:"Unlink",sun:"Sun",moon:"Moon",provider:"Server",search:"Search",sort:"ArrowUpDown",timeline:"Clock",transcript:"AlignLeft",crew:"Users",chevronDown:"ChevronDown",chevronRight:"ChevronRight",chevronLeft:"ChevronLeft",raw:"Braces",question:"MessageCircleQuestion",approval:"ShieldCheck",check:"Check",close:"X",budget:"Coins",template:"LayoutTemplate",draft:"Save",filter:"Filter",settings:"Settings",attach:"Paperclip",file:"File",image:"Image",code:"Code",codeBlock:"SquareCode",quote:"Quote",write:"PenLine",preview:"Eye",model:"Cpu",loading:"LoaderCircle",steer:"MessageSquarePlus",send:"SendHorizontal",you:"User",now:"Zap",nextTurn:"ListEnd",Write:"FilePen",Edit:"FilePenLine",MultiEdit:"FilePenLine",Read:"FileText",Bash:"Terminal",Grep:"Search",Glob:"FolderSearch",LS:"FolderOpen",WebFetch:"Globe",WebSearch:"Globe",Task:"ListChecks",TodoWrite:"ListChecks",spawn_worker:"UserPlus",message_worker:"MessageSquare",ask_human:"MessageCircleQuestion",result:"CornerDownLeft",init:"Power",tool:"Wrench",Bug:"Bug",Shuffle:"Shuffle",SearchCheck:"SearchCheck"};function ie({name:s,size:u=16,strokeWidth:c=1.75,color:o,label:f,style:h}){const g=$h[s]||s,j=Yh[g]||Yh[$h.tool];return a.jsx(j,{width:u,height:u,strokeWidth:c,color:o||"currentColor","aria-hidden":f?void 0:!0,"aria-label":f,role:f?"img":void 0,style:{flex:"0 0 auto",display:"block",...h}})}function xa({icon:s,label:u,onClick:c,active:o,size:f="md",disabled:h,style:g}){const[j,m]=x.useState(!1),v=f==="sm"?26:32;return a.jsx("button",{type:"button",title:u,"aria-label":u,"aria-pressed":o,disabled:h,onClick:c,onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),style:{width:v,height:v,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,borderRadius:"var(--r-sm)",cursor:h?"default":"pointer",background:o?"var(--bg-card)":j?"var(--bg-hover)":"transparent",border:`1px solid ${o?"var(--line-strong)":"transparent"}`,color:o||j?"var(--ink-0)":"var(--ink-1)",opacity:h?.5:1,transition:"background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease)",...g},children:a.jsx(ie,{name:s,size:f==="sm"?14:16})})}function Qs(s){if(!s)return"";let u=String(s).replace(/^\/(Users|home)\/[^/]+/,"~");const c=u.split("/");return c.length>4&&(u=[c[0],c[1],"…",...c.slice(-2)].join("/")),u}function Ep({size:s=24,mono:u,style:c}){const o=u?"currentColor":"var(--brand)",f=u?"currentColor":"var(--agent-worker)";return a.jsxs("svg",{viewBox:"0 0 32 32",width:s,height:s,"aria-hidden":!0,style:{flex:"0 0 auto",display:"block",...c},children:[a.jsx("rect",{x:"5",y:"4",width:"6",height:"24",rx:"3",fill:o}),a.jsx("rect",{x:"5",y:"4",width:"22",height:"6",rx:"3",fill:o}),a.jsx("rect",{x:"5",y:"13",width:"15",height:"6",rx:"3",fill:f,opacity:u?.55:1})]})}function tx({size:s=22,tagline:u,mono:c,style:o}){return a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:Math.round(s*.4),...o},children:[a.jsx(Ep,{size:s,mono:c}),a.jsx("span",{style:{fontSize:Math.round(s*.82),fontWeight:"var(--fw-semibold)",letterSpacing:"-0.01em",color:c?"currentColor":"var(--ink-0)",lineHeight:1},children:"Foreman"}),u&&a.jsx("span",{style:{color:"var(--ink-2)",fontSize:"var(--fs-sm)",marginLeft:4},children:u})]})}function nx({folder:s}){const[u,c]=Cn.useState(!1),[o,f]=Cn.useState(!1),h=()=>{navigator.clipboard&&navigator.clipboard.writeText(s).catch(()=>{}),c(!0),setTimeout(()=>c(!1),1200)};return a.jsxs("button",{type:"button",onClick:h,title:u?"Copied":s,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),style:{display:"inline-flex",alignItems:"center",gap:6,minWidth:0,maxWidth:420,padding:"3px 8px",borderRadius:999,border:"1px solid transparent",background:o?"var(--bg-inset, rgba(255,255,255,.06))":"transparent",color:u?"var(--ink-1)":"var(--ink-2)",cursor:"pointer",font:"inherit"},children:[a.jsx(ie,{name:"folder",size:13}),a.jsx("span",{style:{fontSize:"var(--fs-xs)",fontFamily:"var(--font-mono)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u?"copied":Qs(s)})]})}function _p({mode:s="fleet",title:u,subtitle:c="mission control",folder:o,onBack:f,theme:h,onToggleTheme:g,onSettings:j,version:m,children:v,style:w}){const S=s==="fleet";return a.jsxs("header",{style:{display:"flex",alignItems:"center",gap:"var(--sp-3)",padding:S?"var(--sp-3) var(--sp-5)":"var(--sp-2) var(--sp-3)",background:"var(--bg-panel)",borderBottom:"1px solid var(--line)",flex:"0 0 auto",minHeight:48,...w},children:[S?a.jsx(tx,{size:22,tagline:c}):a.jsxs("nav",{"aria-label":"Breadcrumb",style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",minWidth:0},children:[a.jsx("button",{type:"button",onClick:f,title:"Back to the fleet","aria-label":"Back to the fleet",style:{background:"none",border:0,padding:0,cursor:"pointer",display:"inline-flex",alignItems:"center"},children:a.jsx(Ep,{size:22})}),a.jsx("button",{type:"button",onClick:f,style:{background:"none",border:0,padding:0,font:"inherit",color:"var(--ink-2)",cursor:"pointer"},children:"Fleet"}),a.jsx(ie,{name:"chevronRight",size:14,color:"var(--ink-3, var(--ink-2))"}),a.jsx("span",{style:{fontWeight:"var(--fw-semibold)",whiteSpace:"nowrap"},children:u}),o&&a.jsx(nx,{folder:o})]}),a.jsxs("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:"var(--sp-3)",flexWrap:"wrap",justifyContent:"flex-end"},children:[v,g&&a.jsx(xa,{icon:h==="light"?"moon":"sun",label:h==="light"?"Switch to dark theme":"Switch to light theme",onClick:g}),j&&a.jsx(xa,{icon:"settings",label:"Settings",onClick:j}),m&&a.jsxs("a",{href:"https://github.com/amenophis1er/foreman/releases",target:"_blank",rel:"noopener noreferrer",title:`Foreman ${m} — release notes`,style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-xs)",color:"var(--ink-2)",textDecoration:"none",whiteSpace:"nowrap"},children:["v",m]})]})]})}const Gh={"api-key":{color:"var(--status-warning)",icon:"budget",label:"API key billing",hint:"Missions bill a metered API key, not a Claude subscription. Usage is charged per token."},subscription:{color:"var(--ink-2)",icon:"budget",label:"subscription",hint:"Missions run on the signed-in Claude subscription."},cloud:{color:"var(--ink-2)",icon:"budget",label:"cloud provider",hint:"Missions bill a cloud provider (Bedrock/Vertex)."},local:{color:"var(--ink-2)",icon:"model",label:"local model",hint:"Missions run on a model served from this machine. No per-token cost, so budgets are capped by turns and time."},provider:{color:"var(--status-warning)",icon:"budget",label:"external provider",hint:"Missions bill an endpoint Foreman does not price. Spend is real but its dollar figure is not shown."},none:{color:"var(--status-critical)",icon:"error",label:"no credentials",hint:"No credentials found — missions cannot run."}};function Cu({mode:s,source:u,account:c,compact:o,style:f}){const h=Gh[s]??Gh.none,g=c?.email,j=h.label,m=[h.hint,g&&c.org?`Account: ${g} (${c.org})`:g&&`Account: ${g}`,u&&`Source: ${u}`].filter(Boolean).join(`
20
+ `),v=s==="api-key"||s==="none"||s==="provider";return a.jsxs("span",{title:m,style:{display:"inline-flex",alignItems:"center",gap:5,fontSize:o?"var(--fs-xs)":"var(--fs-sm)",color:"var(--ink-1)",padding:o?"1px 6px 1px 5px":"2px 8px 2px 6px",borderRadius:"var(--r-pill)",background:"var(--bg-inset)",border:`1px solid ${v?h.color:"var(--line)"}`,whiteSpace:"nowrap",lineHeight:"16px",...f},children:[a.jsx(ie,{name:h.icon,size:12,strokeWidth:2.25,color:h.color}),o?j:`billing: ${j}`]})}const lx={default:{background:"var(--bg-card)",border:"1px solid var(--line-strong)",color:"var(--ink-0)"},primary:{background:"var(--brand)",border:"1px solid var(--brand)",color:"var(--brand-ink)",fontWeight:"var(--fw-semibold)"},good:{background:"transparent",border:"1px solid var(--status-good)",color:"var(--ink-0)"},danger:{background:"transparent",border:"1px solid var(--status-critical)",color:"var(--ink-0)"},ghost:{background:"none",border:"1px solid transparent",color:"var(--ink-1)"}},ax={default:{borderColor:"var(--ink-2)"},primary:{filter:"brightness(1.08)"},good:{background:"color-mix(in srgb, var(--status-good) 14%, transparent)"},danger:{background:"color-mix(in srgb, var(--status-critical) 14%, transparent)"},ghost:{color:"var(--ink-0)",background:"var(--bg-hover)"}},ix={default:{background:"var(--bg-inset)"},primary:{filter:"brightness(0.94)"},good:{background:"color-mix(in srgb, var(--status-good) 22%, transparent)"},danger:{background:"color-mix(in srgb, var(--status-critical) 22%, transparent)"},ghost:{background:"var(--bg-inset)"}},Xh={sm:{padding:"3px 8px",fontSize:"var(--fs-sm)",gap:5,icon:13},md:{padding:"6px 12px",fontSize:"var(--fs-md)",gap:6,icon:15}};function he({children:s,onClick:u,variant:c="default",size:o="md",icon:f,disabled:h,title:g,type:j="button",style:m}){const[v,w]=x.useState(!1),[S,k]=x.useState(!1),O=Xh[o]||Xh.md;return a.jsxs("button",{type:j,title:g,disabled:h,onClick:u,onMouseEnter:()=>w(!0),onMouseLeave:()=>{w(!1),k(!1)},onMouseDown:()=>k(!0),onMouseUp:()=>k(!1),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:O.gap,padding:O.padding,borderRadius:"var(--r-sm)",fontSize:O.fontSize,lineHeight:"var(--lh)",whiteSpace:"nowrap",cursor:h?"default":"pointer",transition:"background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease)",...lx[c],...h?{opacity:.5}:v?ax[c]:null,...!h&&S?ix[c]:null,...m},children:[f&&a.jsx(ie,{name:f,size:O.icon}),s]})}function ft({children:s}){return a.jsx("div",{style:{color:"var(--ink-2)",fontSize:"var(--fs-sm)"},children:s})}function tn({children:s,style:u}){return a.jsx("h2",{style:{margin:"0 0 var(--sp-2)",fontSize:"var(--fs-xs)",fontWeight:"var(--fw-semibold)",textTransform:"uppercase",letterSpacing:"var(--ls-caps)",color:"var(--ink-2)",...u},children:s})}const Qh={readonly:{icon:"readonly",color:"var(--status-warning)"},disconnected:{icon:"disconnected",color:"var(--status-serious)"},error:{icon:"error",color:"var(--status-critical)"},caution:{icon:"caution",color:"var(--status-serious)"}};function ln({tone:s="readonly",children:u,inline:c,style:o}){const f=Qh[s]??Qh.readonly;return c?a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5,color:f.color,fontSize:"var(--fs-sm)",...o},children:[a.jsx(ie,{name:f.icon,size:13,strokeWidth:2}),u]}):a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"var(--sp-1) var(--sp-3)",background:"var(--bg-inset)",borderBottom:"1px solid var(--line)",fontSize:"var(--fs-sm)",color:"var(--ink-1)",...o},children:[a.jsx(ie,{name:f.icon,size:14,color:f.color}),u]})}function Cp(s,u=Date.now()){const c=Math.max(0,Math.round((u-s)/1e3));if(c<60)return`${c}s`;const o=Math.floor(c/60);if(o<60)return`${o}m`;const f=Math.floor(o/60);return f<24?o%60?`${f}h ${o%60}m`:`${f}h`:`${Math.floor(f/24)}d`}const sx={permission:"approval",question:"director asks",planner:"the planner is asking",summary:"needs you"};function Vh(s,u){return`${s} ${u}${s>1?"s":""}`}function rx({item:s,onPermission:u,onAnswer:c,onPlanner:o,onOpen:f}){const[h,g]=x.useState(!1),[j,m]=x.useState(""),[v,w]=x.useState(!1),[S,k]=x.useState("");x.useEffect(()=>{g(!1),m(""),w(!1),k("")},[s.id]);const O=async X=>{if(!h){g(!0),m("");try{const J=await X();J&&(m(J),g(!1))}catch(J){m(J instanceof Error?J.message:String(J)),g(!1)}}},Q=X=>s.kind==="planner"?O(()=>o(s,X)):O(()=>c(s,X)),Z=()=>{const X=S.trim();X&&Q(X)},_=Array.isArray(s.options)&&s.options.length>0,R=s.kind==="question"||s.kind==="planner",W=R&&(v||!_);return a.jsxs("div",{className:h?void 0:"pulse",style:{display:"flex",flexDirection:"column",gap:"var(--sp-2)",padding:"var(--sp-3) var(--sp-4)",background:"var(--brand-wash-strong)",border:"1px solid var(--status-warning)",borderLeft:"var(--accent-w) solid var(--status-warning)",borderRadius:"var(--r-md)",opacity:h?.7:1,transition:"opacity var(--dur-fast) var(--ease)"},children:[a.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:"var(--sp-2)",minWidth:0,fontSize:"var(--fs-sm)"},children:[a.jsx(ie,{name:s.kind==="permission"?"approval":s.kind==="summary"?"needsYou":"question",size:14,strokeWidth:2,color:"var(--status-warning)",style:{alignSelf:"center",flex:"0 0 auto"}}),a.jsx("span",{style:{fontWeight:"var(--fw-semibold)",color:"var(--ink-0)",flex:"0 0 auto"},children:s.projectName}),a.jsx("span",{style:{color:"var(--status-warning)",fontWeight:"var(--fw-medium)",flex:"0 0 auto"},children:sx[s.kind]??s.kind}),a.jsx("span",{title:s.text,style:{color:"var(--ink-0)",minWidth:0,flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.text}),typeof s.since=="number"&&a.jsxs("span",{style:{color:"var(--ink-2)",fontSize:"var(--fs-xs)",fontVariantNumeric:"tabular-nums",flex:"0 0 auto"},children:["waiting ",Cp(s.since)]})]}),a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[s.kind==="permission"&&a.jsxs(a.Fragment,{children:[a.jsx(he,{size:"sm",variant:"good",disabled:h,onClick:()=>{O(()=>u(s,"allow"))},children:"Allow"}),a.jsx(he,{size:"sm",variant:"danger",disabled:h,onClick:()=>{O(()=>u(s,"deny"))},children:"Deny"})]}),R&&_&&s.options.map((X,J)=>a.jsxs("button",{type:"button",disabled:h,onClick:()=>{Q(X)},title:J===0?"Recommended":void 0,style:{display:"inline-flex",alignItems:"center",gap:5,padding:"4px 10px",borderRadius:"var(--r-sm)",cursor:h?"default":"pointer",font:"inherit",fontSize:"var(--fs-sm)",textAlign:"left",maxWidth:360,background:"var(--bg-card)",border:"1px solid var(--line-strong)",color:"var(--ink-0)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[J===0&&a.jsx("span",{style:{color:"var(--status-warning)",fontSize:"var(--fs-xs)"},children:"★"}),X]},X)),R&&_&&!v&&a.jsx(he,{size:"sm",variant:"ghost",disabled:h,onClick:()=>w(!0),children:"type…"}),W&&a.jsxs("form",{onSubmit:X=>{X.preventDefault(),Z()},style:{display:"flex",alignItems:"center",gap:6,flex:"1 1 16rem",minWidth:0},children:[a.jsx("input",{autoFocus:v,value:S,disabled:h,placeholder:s.kind==="planner"?"Answer the planner…":"Answer the director…",onChange:X=>k(X.target.value),onKeyDown:X=>{X.key==="Escape"&&_&&(w(!1),k(""))},style:{flex:"1 1 auto",minWidth:0,font:"inherit",fontSize:"var(--fs-sm)",padding:"4px 8px",borderRadius:"var(--r-sm)",background:"var(--bg-card)",border:"1px solid var(--line-strong)",color:"var(--ink-0)",outline:"none"}}),a.jsx(he,{size:"sm",type:"submit",icon:"send",disabled:h||!S.trim(),children:"Send"})]}),a.jsx("span",{style:{marginLeft:"auto",flex:"0 0 auto"},children:a.jsx(he,{size:"sm",variant:"ghost",onClick:()=>f?.(s.projectId),title:"Open the project for the full context",children:"open"})})]}),j&&a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5,fontSize:"var(--fs-xs)",color:"var(--text-danger)"},children:[a.jsx(ie,{name:"caution",size:12,strokeWidth:2}),j]})]})}function ox({items:s=[],onPermission:u,onAnswer:c,onPlanner:o,onOpen:f,style:h}){return s.length?a.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-2)",...h},children:s.map(g=>a.jsx(rx,{item:g,onPermission:u,onAnswer:c,onPlanner:o,onOpen:f},`${g.projectId}:${g.kind}:${g.id??""}`))}):null}function ux({approvals:s=0,questions:u=0,planner:c=!1}){const o=[];s>0&&o.push(Vh(s,"approval"));const f=c?u-1:u;return f>0&&o.push(Vh(f,"question")),c&&o.push("the planner is asking"),o.join(", ")}function cx(s){const u=Math.max(0,Math.round(Number(s)||0)/1e3);if(u<60)return`${Math.round(u)}s`;const c=Math.round(u/60);return c<60?`${c}m`:`${Math.floor(c/60)}h ${String(c%60).padStart(2,"0")}m`}function Tl(s){return s>=1e6?`${(s/1e6).toFixed(1)}m`:s>=1e3?`${(s/1e3).toFixed(1)}k`:String(s)}const dx=s=>s?s.inputTokens+s.outputTokens+s.cacheReadTokens+s.cacheWriteTokens:0,fx="repeating-linear-gradient(-45deg, var(--line-strong) 0 3px, transparent 3px 7px)";function Ap({spent:s,budget:u,costBasis:c="priced",usage:o=null,turns:f,elapsedMs:h,detail:g=!1,style:j}){const m=typeof h=="number"&&h>0?` · ${cx(h)}`:"";if(s=Number(s)||0,u=Number(u)||0,c!=="priced"){const k=c==="unpriced",O=dx(o);return a.jsxs("div",{title:k?"Real spend, on an account Foreman cannot price — no table for this endpoint, or a plan being drawn down. Check the provider for the bill; turns and tokens are all that is known here.":"Runs on hardware you already own, so nothing is billed per token. Turns and tokens are the only real units.",style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",minWidth:170,...j},children:[a.jsx("div",{style:{flex:1,height:"var(--meter-h)",background:"var(--bg-inset)",borderRadius:2,overflow:"hidden",backgroundImage:k?fx:void 0}}),a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,fontSize:"var(--fs-sm)",color:"var(--ink-1)",fontVariantNumeric:"tabular-nums",whiteSpace:"nowrap"},children:[g?`${Tl(o?.inputTokens??0)} in · ${Tl(o?.outputTokens??0)} out`:`${Tl(O)} tok`,typeof f=="number"?` · ${f} turn${f===1?"":"s"}`:"",m]})]})}const v=u>0?Math.min(s/u,1):0,w=v>=.9?"critical":v>=.7?"warning":"ok",S=w==="critical"?"var(--status-critical)":w==="warning"?"var(--status-warning)":"var(--brand)";return a.jsxs("div",{title:`$${s.toFixed(2)} spent of $${u.toFixed(2)} budget`,style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",minWidth:170,...j},children:[a.jsx("div",{style:{flex:1,height:"var(--meter-h)",background:"var(--bg-inset)",borderRadius:2,overflow:"hidden"},children:a.jsx("div",{style:{width:`${v*100}%`,height:"100%",background:S,transition:"width var(--dur-meter)"}})}),a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,fontSize:"var(--fs-sm)",color:"var(--ink-1)",fontVariantNumeric:"tabular-nums",whiteSpace:"nowrap"},children:[w!=="ok"&&a.jsx(ie,{name:w,size:12,strokeWidth:2.25,color:S}),"$",s.toFixed(2)," / $",u.toFixed(0),m]})]})}function hx({name:s,folder:u,title:c,mission:o,activity:f,costUsd:h,budgetUsd:g,costBasis:j,usage:m,turns:v,directorModel:w,workerModel:S,createdAt:k,onOpen:O,style:Q}){const[Z,_]=x.useState(!1),R=[w,S].filter(Boolean);return a.jsxs("div",{role:"button",tabIndex:0,onClick:O,onKeyDown:W=>{(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),O?.())},onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),style:{display:"grid",gridTemplateColumns:"minmax(9rem, 12rem) minmax(0, 1fr) minmax(11rem, 15rem) auto",gap:"var(--sp-4)",alignItems:"center",padding:"var(--sp-3) var(--sp-4)",cursor:"pointer",background:Z?"var(--bg-hover)":"transparent",borderLeft:`var(--accent-w) solid ${Z?"var(--brand)":"transparent"}`,transition:"background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease)",...Q},children:[a.jsxs("div",{style:{minWidth:0},children:[a.jsx("div",{style:{fontSize:"var(--fs-md)",fontWeight:"var(--fw-semibold)",color:"var(--ink-0)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s}),a.jsx("div",{title:u,style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontFamily:"var(--font-mono)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Qs(u)})]}),a.jsxs("div",{style:{minWidth:0},children:[a.jsx("div",{title:o,style:{fontSize:"var(--fs-md)",color:"var(--ink-0)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c||o}),f&&a.jsx("div",{className:"ticker",title:f,style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontFamily:"var(--font-mono)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f},f)]}),a.jsx(Ap,{spent:h,budget:g,costBasis:j,usage:m,turns:v}),a.jsxs("div",{style:{textAlign:"right",fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontFamily:"var(--font-mono)",fontVariantNumeric:"tabular-nums",whiteSpace:"nowrap"},children:[R.length>0&&a.jsx("div",{title:"director · worker",style:{maxWidth:"16rem",overflow:"hidden",textOverflow:"ellipsis"},children:R.join(" · ")}),typeof k=="number"&&a.jsx("div",{children:Cp(k)})]})]})}const Zh={idle:{color:"var(--ink-2)",icon:"idle",label:"idle"},running:{color:"var(--status-good)",icon:"running",label:"running"},done:{color:"var(--status-good)",icon:"done",label:"done"},error:{color:"var(--status-critical)",icon:"error",label:"error"},interrupted:{color:"var(--status-serious)",icon:"interrupted",label:"interrupted"},"needs-you":{color:"var(--status-warning)",icon:"needsYou",label:"needs you"}};function ba({status:s,style:u}){const c=Zh[s]??Zh.idle;return a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5,fontSize:"var(--fs-sm)",color:"var(--ink-1)",padding:"2px 8px 2px 6px",borderRadius:"var(--r-pill)",background:"var(--bg-inset)",border:"1px solid var(--line)",whiteSpace:"nowrap",lineHeight:"16px",...u},children:[a.jsx(ie,{name:c.icon,size:12,strokeWidth:2.25,color:c.color}),c.label]})}function px(s){return new Date(s).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function gu(){return a.jsx("span",{style:{color:"var(--ink-2)",opacity:.6},children:"·"})}function vx({name:s,folder:u,lastRun:c,onOpen:o,onUnlink:f,style:h}){const[g,j]=x.useState(!1),[m,v]=x.useState(!1),w=c?.usage?c.usage.inputTokens+c.usage.outputTokens:null;return a.jsxs("article",{role:"button",tabIndex:0,onClick:o,onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),o?.())},onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),style:{background:"var(--bg-card)",borderRadius:"var(--r-md)",cursor:"pointer",border:`1px solid ${g?"var(--line-strong)":"var(--line)"}`,padding:"var(--sp-3) var(--sp-4)",display:"flex",flexDirection:"column",gap:6,minWidth:0,transition:"border-color var(--dur-fast) var(--ease)",...h},children:[a.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:"var(--sp-2)",minWidth:0},children:[a.jsx("span",{style:{fontSize:"var(--fs-md)",fontWeight:"var(--fw-semibold)",color:"var(--ink-0)",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s}),a.jsx("span",{title:u,style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontFamily:"var(--font-mono)",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginLeft:"auto"},children:Qs(u)})]}),c?a.jsxs(a.Fragment,{children:[a.jsx("div",{title:c.mission,style:{fontSize:"var(--fs-sm)",color:"var(--ink-1)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c.title||c.mission}),a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap",fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontVariantNumeric:"tabular-nums"},children:[a.jsx(ba,{status:c.status}),c.createdAt&&a.jsxs(a.Fragment,{children:[a.jsx(gu,{}),px(c.createdAt)]}),c.costBasis==="priced"?a.jsxs(a.Fragment,{children:[a.jsx(gu,{}),"$",(Number(c.costUsd)||0).toFixed(2)]}):w!==null?a.jsxs(a.Fragment,{children:[a.jsx(gu,{}),Tl(w)," tok"]}):null]})]}):a.jsx("div",{style:{fontSize:"var(--fs-sm)",color:"var(--ink-2)"},children:"No missions yet — open to compose one."}),a.jsx("div",{style:{display:"flex",justifyContent:"flex-end",height:14,marginTop:-2},children:a.jsxs("button",{type:"button",tabIndex:g?0:-1,onClick:S=>{S.stopPropagation(),f?.()},onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),title:"Unlink project (run history is kept)",style:{display:"inline-flex",alignItems:"center",gap:4,background:"none",border:"none",cursor:"pointer",padding:0,font:"inherit",fontSize:"var(--fs-xs)",color:m?"var(--ink-0)":"var(--ink-2)",opacity:g?1:0,pointerEvents:g?"auto":"none",transition:"opacity var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease)"},children:[a.jsx(ie,{name:"unlink",size:11}),"Unlink"]})})]})}function gx({onClick:s,style:u}){const[c,o]=x.useState(!1);return a.jsxs("div",{role:"button",onClick:s,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),style:{border:`1px dashed ${c?"var(--ink-2)":"var(--line-strong)"}`,borderRadius:"var(--r-md)",minHeight:"var(--card-min-h)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--sp-2)",cursor:"pointer",color:c?"var(--ink-0)":"var(--ink-1)",background:c?"var(--bg-hover)":"transparent",transition:"border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease)",...u},children:[a.jsx(ie,{name:"add",size:22,strokeWidth:1.5}),a.jsx("span",{style:{fontSize:"var(--fs-sm)"},children:"Link a project"}),a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:"or drop a folder anywhere"})]})}function mx({value:s,onChange:u,count:c,total:o,style:f}){const h=x.useRef(null),[g,j]=x.useState(!1),m=s.trim().length>0;return x.useEffect(()=>{const v=w=>{const S=document.activeElement,k=S&&(S.tagName==="INPUT"||S.tagName==="TEXTAREA"||S.isContentEditable);w.key==="/"&&!k&&!w.metaKey&&!w.ctrlKey&&!w.altKey&&(w.preventDefault(),h.current?.focus())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[]),a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-3)",maxWidth:"var(--fleet-max)",margin:"0 auto",width:"100%",padding:"var(--sp-4) var(--sp-5) 0",boxSizing:"border-box",...f},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",flex:"1 1 auto",maxWidth:"22rem",background:"var(--bg-card)",borderRadius:"var(--r-sm)",border:`1px solid ${g?"var(--brand)":"var(--line)"}`,padding:"5px var(--sp-2)",transition:"border-color var(--dur-fast) var(--ease)"},children:[a.jsx(ie,{name:"search",size:14,color:"var(--ink-2)"}),a.jsx("input",{ref:h,value:s,type:"text",placeholder:"Filter projects…","aria-label":"Filter projects by name, path or mission",onChange:v=>u?.(v.target.value),onFocus:()=>j(!0),onBlur:()=>j(!1),onKeyDown:v=>{v.key==="Escape"&&(s?u?.(""):v.currentTarget.blur())},style:{flex:1,minWidth:0,border:"none",outline:"none",background:"transparent",color:"var(--ink-0)",font:"inherit",fontSize:"var(--fs-sm)",padding:0,boxShadow:"none"}}),m?a.jsx("button",{type:"button",onClick:()=>{u?.(""),h.current?.focus()},title:"Clear filter (Esc)","aria-label":"Clear filter",style:{display:"inline-flex",background:"none",border:"none",padding:0,cursor:"pointer",color:"var(--ink-2)"},children:a.jsx(ie,{name:"close",size:13})}):a.jsx("kbd",{style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-xs)",color:"var(--ink-2)",border:"1px solid var(--line)",borderRadius:3,padding:"0 4px",lineHeight:"15px"},children:"/"})]}),m&&a.jsxs("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontVariantNumeric:"tabular-nums"},children:[c," of ",o]})]})}function Vs({width:s=480,children:u,onClose:c,dismissible:o=!0,style:f}){return a.jsx("div",{onClick:h=>{o&&h.target===h.currentTarget&&c?.()},style:{position:"fixed",inset:0,background:"var(--scrim)",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center"},children:a.jsx("div",{style:{width:s,maxHeight:"70vh",display:"flex",flexDirection:"column",background:"var(--bg-panel)",border:"1px solid var(--line-strong)",borderRadius:"var(--r-md)",overflow:"hidden",...f},children:u})})}function Ou({children:s,style:u}){return a.jsx("div",{style:{padding:"var(--sp-3)",borderBottom:"1px solid var(--line)",wordBreak:"break-all",...u},children:s})}function Zs({children:s,style:u}){return a.jsx("div",{style:{display:"flex",gap:"var(--sp-2)",alignItems:"center",padding:"var(--sp-3)",borderTop:"1px solid var(--line)",...u},children:s})}function Je({value:s,onChange:u,placeholder:c,type:o="text",min:f,max:h,step:g,width:j,mono:m,prefix:v,autoFocus:w,onKeyDown:S,style:k}){const O=a.jsx("input",{type:o,min:f,max:h,step:g,value:s,autoFocus:w,placeholder:c,onKeyDown:S,onChange:Q=>u?.(o==="number"?Number(Q.target.value):Q.target.value),style:{width:v?"100%":j??"100%",background:v?"transparent":"var(--bg-card)",border:v?"none":"1px solid var(--line-strong)",borderRadius:"var(--r-sm)",padding:v?"6px 9px 6px 0":"6px 9px",color:"var(--ink-0)",outline:v?"none":void 0,fontFamily:m?"var(--font-mono)":"var(--font-ui)",...v?null:k}});return v?a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",width:j??"100%",boxSizing:"border-box",background:"var(--bg-card)",border:"1px solid var(--line-strong)",borderRadius:"var(--r-sm)",paddingLeft:9,...k},children:[a.jsx("span",{style:{color:"var(--ink-2)",marginRight:4,userSelect:"none"},children:v}),O]}):O}function Kh({children:s,icon:u,onClick:c}){const[o,f]=x.useState(!1);return a.jsxs("div",{role:"button",onClick:c,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),style:{display:"flex",alignItems:"center",gap:8,padding:"7px 12px",cursor:"pointer",fontSize:"var(--fs-md)",background:o?"var(--bg-card)":"transparent",transition:"background var(--dur-fast) var(--ease)"},children:[a.jsx(ie,{name:u,size:15,color:"var(--ink-1)"}),s]})}function yx({path:s="…",parent:u,dirs:c=[],error:o,onNavigate:f,onCreate:h,onPick:g,onClose:j}){const[m,v]=x.useState(!1),[w,S]=x.useState("");return a.jsxs(Vs,{width:480,onClose:j,children:[a.jsx(Ou,{style:{font:"var(--fs-sm) var(--font-mono)",color:"var(--brand)"},children:s}),a.jsxs("div",{style:{overflowY:"auto",flex:1},children:[u&&a.jsx(Kh,{icon:"parent",onClick:()=>f?.(u),children:".."}),c.map(k=>a.jsx(Kh,{icon:"folder",onClick:()=>f?.(`${s}${s.endsWith("/")?"":"/"}${k}`),children:k},k)),c.length===0&&a.jsx("div",{style:{padding:"var(--sp-3)",color:"var(--ink-2)",fontSize:"var(--fs-sm)"},children:"No subfolders."})]}),m&&a.jsxs("div",{style:{display:"flex",gap:"var(--sp-2)",alignItems:"center",padding:"var(--sp-2) var(--sp-3)",borderTop:"1px solid var(--line)"},children:[a.jsx(Je,{autoFocus:!0,placeholder:"New folder name",value:w,onChange:S,onKeyDown:k=>{k.key==="Enter"&&h?.(w)},style:{flex:1}}),a.jsx(he,{variant:"good",onClick:()=>h?.(w),children:"Create"})]}),o&&a.jsx("div",{style:{padding:"4px var(--sp-3)"},children:a.jsx(ln,{tone:"error",inline:!0,style:{fontSize:"var(--fs-xs)"},children:o})}),a.jsxs(Zs,{children:[a.jsx(he,{icon:"add",onClick:()=>v(!m),title:"Create a subfolder here",children:"New folder"}),a.jsx("span",{style:{flex:1}}),a.jsx(he,{onClick:j,children:"Cancel"}),a.jsx(he,{variant:"primary",onClick:()=>g?.(s),children:"Select this folder"})]})]})}function xx({name:s,matches:u,onPick:c,onClose:o}){const[f,h]=x.useState(null);return a.jsxs(Vs,{width:520,onClose:o,style:{maxHeight:"60vh"},children:[a.jsxs(Ou,{children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontWeight:"var(--fw-semibold)"},children:[a.jsx(ie,{name:"folder",size:16,color:"var(--ink-1)"}),s]}),a.jsx("div",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",marginTop:2},children:"Browsers hide dropped folders' full paths — pick the matching location."})]}),a.jsxs("div",{style:{overflowY:"auto",flex:1},children:[u==null&&a.jsx("div",{style:{padding:"var(--sp-3)",color:"var(--ink-2)",fontSize:"var(--fs-sm)"},children:"Searching your home folder…"}),u?.map(g=>a.jsx("div",{role:"button",onClick:()=>c?.(g),onMouseEnter:()=>h(g),onMouseLeave:()=>h(null),style:{padding:"8px 12px",cursor:"pointer",fontFamily:"var(--font-mono)",fontSize:"var(--fs-sm)",background:f===g?"var(--bg-card)":"transparent",transition:"background var(--dur-fast) var(--ease)"},children:g},g)),u?.length===0&&a.jsxs("div",{style:{padding:"var(--sp-3)",color:"var(--ink-2)",fontSize:"var(--fs-sm)"},children:["No folder named “",s,"” found under your home directory — use the folder picker instead."]})]}),a.jsx(Zs,{style:{justifyContent:"flex-end"},children:a.jsx(he,{onClick:o,children:"Cancel"})})]})}function bx({children:s="Drop a folder to link it"}){return a.jsxs("div",{style:{position:"absolute",inset:8,zIndex:5,pointerEvents:"none",border:"2px dashed var(--brand)",borderRadius:"var(--r-md)",background:"var(--brand-wash)",display:"flex",alignItems:"center",gap:10,justifyContent:"center",color:"var(--brand)",fontSize:"var(--fs-lg)"},children:[a.jsx(ie,{name:"folder",size:20}),s]})}function Sx({title:s,body:u,confirmLabel:c="Confirm",tone:o="danger",icon:f,onConfirm:h,onCancel:g}){return a.jsxs(Vs,{width:420,onClose:g,children:[a.jsx(Ou,{children:a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontWeight:"var(--fw-semibold)"},children:[f&&a.jsx(ie,{name:f,size:16,color:o==="danger"?"var(--status-critical)":"var(--ink-1)"}),s]})}),a.jsx("div",{style:{padding:"var(--sp-3)",fontSize:"var(--fs-md)",color:"var(--ink-1)",lineHeight:"var(--lh-prose)"},children:u}),a.jsxs(Zs,{style:{justifyContent:"flex-end"},children:[a.jsx(he,{onClick:g,children:"Cancel"}),a.jsx(he,{variant:o,onClick:h,children:c})]})]})}function jx(s,u){const c=s.activeRun??s.lastRun;return[s.name,s.folder,c?.title,c?.mission].some(o=>o?.toLowerCase().includes(u))}function kx(s){const u=[];for(const c of s){if(Array.isArray(c.needs)){const h=[...c.needs].sort((g,j)=>(g.since??0)-(j.since??0));for(const g of h)u.push({...g,projectId:c.id,projectName:c.name});continue}const o=c.pendingPermissions||0,f=c.pendingQuestions||0;o+f!==0&&u.push({projectId:c.id,projectName:c.name,kind:"summary",text:ux({approvals:o,questions:f,planner:!!c.plannerQuestion})})}return u}async function wx(s){return s.ok?null:(await s.json().catch(()=>({}))).error??(s.status===404?"already answered or timed out":`HTTP ${s.status}`)}function zx(s){const[u,c]=x.useState(!1),[o,f]=x.useState(null),[h,g]=x.useState(""),j=async v=>{g("");const w=await Fe.browse(v);w.ok&&f(await w.json())},m=async v=>{if(!o)return;g("");const w=await Fe.mkdir(o.path,v);w.ok?await j((await w.json().catch(()=>null))?.path??o.path):g((await w.json()).error)};return{open:u,show:()=>{c(!0),j()},close:()=>{c(!1),f(null)},props:o&&{path:o.path,parent:o.parent,dirs:o.dirs,error:h,onNavigate:v=>{j(v)},onCreate:v=>{m(v)},onPick:v=>{c(!1),f(null),s(v)}}}}const mu={display:"flex",flexDirection:"column",gap:"var(--sp-2)"};function Tx({projects:s,connected:u,activity:c,update:o,auth:f,onOpen:h,onOpenRun:g,refresh:j,theme:m,onToggleTheme:v,onSettings:w,version:S}){const[k,O]=x.useState(""),[Q,Z]=x.useState(!1),[_,R]=x.useState(null),[W,X]=x.useState(null),J=async V=>{const y=await Fe.linkProject(V);y.ok&&(j(),h((await y.json()).project.id))},le=zx(V=>{J(V)}),T=k.trim().toLowerCase(),U=T?s.filter(V=>jx(V,T)):s,L=kx(U),H=U.filter(V=>V.activeRun).sort((V,y)=>(y.lastActivityAt??0)-(V.lastActivityAt??0)),ae=U.filter(V=>!V.activeRun),F=s.filter(V=>V.activeRun).length,de=s.reduce((V,y)=>V+(Array.isArray(y.needs)?y.needs.length:(y.pendingPermissions||0)+(y.pendingQuestions||0)),0),ye=F===0&&de===0,je=ye&&s.length>0?"all quiet":[F>0?`${F} running`:null,de>0?`${de} needs you`:null].filter(Boolean).join(" · "),re=async V=>{V.preventDefault(),Z(!1);const y=V.dataTransfer.items[0]?.webkitGetAsEntry?.();if(!y?.isDirectory)return;R({name:y.name,matches:null});const B=await Fe.locate(y.name);R({name:y.name,matches:B.ok?(await B.json()).matches:[]})},M=async V=>{const y=await wx(await V);return j(),y},Y=(V,y)=>M(Fe.permission(V.id,y)),I=(V,y)=>M(Fe.answer(V.id,y)),ge=(V,y)=>M(fetch("/chat/answer",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({projectId:V.projectId,id:V.id,answers:{[V.text]:y}})}));return a.jsxs("div",{style:{height:"100%",overflowY:"auto",position:"relative",display:"flex",flexDirection:"column"},onDragOver:V=>{V.preventDefault(),Z(!0)},onDragLeave:V=>{V.target===V.currentTarget&&Z(!1)},onDrop:V=>{re(V)},children:[Q&&a.jsx(bx,{}),a.jsxs(_p,{mode:"fleet",subtitle:"mission control",theme:m,onToggleTheme:v,onSettings:w,version:S,children:[!u&&a.jsx(ln,{tone:"disconnected",inline:!0,children:"disconnected"}),o&&a.jsxs("span",{title:`You run ${o.current}. In a terminal: foreman update — it refuses while a mission is live.`,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"2px 10px",borderRadius:"var(--r-pill)",border:"1px solid var(--line)",fontSize:"var(--fs-xs)",color:"var(--ink-2)",whiteSpace:"nowrap"},children:[o.latest," available · ",a.jsx("span",{style:{fontFamily:"var(--font-mono)"},children:"foreman update"})]}),je&&a.jsx("span",{style:{display:"inline-flex",alignItems:"center",gap:6,padding:"2px 10px",borderRadius:"var(--r-pill)",border:`1px solid ${de>0?"var(--status-warning)":ye?"var(--line)":"var(--line-strong)"}`,background:de>0?"var(--brand-wash)":"transparent",fontSize:"var(--fs-xs)",color:ye?"var(--ink-3)":"var(--ink-1)",fontVariantNumeric:"tabular-nums",whiteSpace:"nowrap"},children:je}),(f.mode==="api-key"||f.mode==="none")&&a.jsx(Cu,{mode:f.mode,source:f.source}),s.length>0&&a.jsx(he,{variant:"primary",icon:"add",onClick:le.show,title:"Link a folder as a project (or drop one anywhere on this page)",children:"Link project"})]}),s.length>1&&a.jsx(mx,{value:k,onChange:O,count:U.length,total:s.length}),s.length===0?a.jsxs("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--sp-3)",padding:"var(--sp-5)",textAlign:"center"},children:[a.jsx("div",{style:{width:"20rem",maxWidth:"100%"},children:a.jsx(gx,{onClick:le.show})}),a.jsx(ft,{children:"No projects linked yet — link a folder to give the director a job site."})]}):a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-5)",padding:"var(--sp-5)",maxWidth:"var(--fleet-max)",margin:"0 auto",width:"100%",boxSizing:"border-box"},children:[U.length===0&&a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)"},children:[a.jsxs(ft,{children:["Nothing matches “",k.trim(),"”."]}),a.jsx(he,{variant:"ghost",size:"sm",onClick:()=>O(""),children:"Clear filter"})]}),L.length===0&&H.length===0&&U.length>0&&a.jsx(ft,{children:"All quiet — nothing running, nothing waiting on you. Open a project to plan its next mission."}),L.length>0&&a.jsxs("section",{style:mu,children:[a.jsxs(tn,{children:["Needs you · ",L.length]}),a.jsx(ox,{items:L,onPermission:Y,onAnswer:I,onPlanner:ge,onOpen:h})]}),H.length>0&&a.jsxs("section",{style:mu,children:[a.jsxs(tn,{children:["Running · ",H.length]}),a.jsx("div",{style:{background:"var(--bg-card)",border:"1px solid var(--line)",borderRadius:"var(--r-md)",overflow:"hidden"},children:H.map((V,y)=>{const B=V.activeRun;return a.jsx(hx,{name:V.name,folder:V.folder,title:B.title,mission:B.mission,activity:c[V.id],costUsd:B.costUsd,budgetUsd:B.budgetUsd,costBasis:zl(B),usage:B.usage,turns:B.turns,directorModel:B.directorModel,workerModel:B.workerModel,createdAt:B.createdAt,onOpen:()=>h(V.id),style:y>0?{borderTop:"1px solid var(--line)"}:void 0},V.id)})})]}),ae.length>0&&a.jsxs("section",{style:mu,children:[a.jsxs(tn,{children:["Recent · ",ae.length]}),a.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))",gap:"var(--sp-3)"},children:ae.map(V=>a.jsx(vx,{name:V.name,folder:V.folder,lastRun:V.lastRun&&V.lastRun.status!=="idle"&&V.lastRun.status!=="running"?V.lastRun:null,onOpen:()=>{const y=V.lastRun;y?.id&&g&&(y.status==="error"||y.status==="interrupted")?g(V.id,y.id):h(V.id)},onUnlink:()=>X(V)},V.id))})]})]}),le.open&&le.props&&a.jsx(yx,{...le.props,onClose:le.close}),_&&a.jsx(xx,{name:_.name,matches:_.matches,onPick:V=>{R(null),J(V)},onClose:()=>R(null)}),W&&a.jsx(Sx,{title:`Unlink ${W.name}?`,body:"Foreman stops tracking this folder. Run history and its .foreman/ files stay on disk; you can link it again later.",confirmLabel:"Unlink",tone:"danger",icon:"unlink",onConfirm:()=>{const V=W.id;X(null),Fe.unlinkProject(V).then(j)},onCancel:()=>X(null)})]})}const Mx=15e3;function Ex(s,u){const[c,o]=x.useState(null),[f,h]=x.useState(!1),[g,j]=x.useState(null),[m,v]=x.useState(!1),[w,S]=x.useState(0),k=x.useCallback(()=>S(O=>O+1),[]);return x.useEffect(()=>{if(o(null),j(null),v(!1),!s){h(!1);return}let O=!1;h(!0);const Q=async()=>{const _=await fetch(`/runs/${encodeURIComponent(s)}/deck`).catch(()=>null);if(O)return;if(!_){j("Could not reach the server."),h(!1);return}if(_.status===404){v(!0),j(null),h(!1);return}if(!_.ok){const W=await _.json().catch(()=>({}));j(W.error||`HTTP ${_.status}`),h(!1);return}const R=await _.json().catch(()=>null);O||(R&&(o(R),v(!1),j(null)),h(!1))};Q();const Z=u?setInterval(()=>{Q()},Mx):null;return()=>{O=!0,Z&&clearInterval(Z)}},[s,u,w]),{deck:c,loading:f,error:g,missing:m,refresh:k}}function Gs(s){if(s==="director")return"var(--brand)";if(s==="you")return"var(--ink-0)";const u=/(\d+)/.exec(String(s||""));return`var(--agent-worker-${u?(parseInt(u[1],10)-1)%6+1:1})`}function an({agent:s,size:u="md",style:c}){const o=u==="sm"?"var(--dot-sm)":"var(--dot)";return a.jsx("span",{"aria-hidden":!0,style:{width:o,height:o,borderRadius:"var(--r-pill)",background:Gs(s),flex:"0 0 auto",...c}})}function Hs(s){return new Date(s).toLocaleTimeString(void 0,{hour12:!1})}const yu=[1,5,15,30,60,120,300,600,900,1800,3600,7200,21600].map(s=>s*1e3);function _x(s,u){const c=u-s,o=yu.find(h=>c/h<=6)??yu[yu.length-1],f=[];for(let h=Math.ceil(s/o)*o;h<u;h+=o)f.push(h);return{marks:f,step:o}}function Cx({agents:s=[],entries:u=[],live:c,selected:o,onSelect:f,onTick:h,height:g=22,style:j}){if(!u.length)return null;const m=Math.min(...u.map(_=>_.ts)),v=Math.max(...u.map(_=>_.ts)),w=c?Math.min(Math.max(Date.now(),v),v+6e4):v,S=Math.max(w-m,1e3),k=_=>`${(_-m)/S*100}%`,O=_=>(_-m)/S*100,{marks:Q}=_x(m,m+S),Z=s.length?s.map(_=>_.id??_):[...new Set(u.map(_=>_.agent))];return a.jsxs("div",{style:{display:"grid",gridTemplateColumns:"84px 1fr",rowGap:4,columnGap:10,fontSize:"var(--fs-xs)",color:"var(--ink-2)",...j},children:[Z.map(_=>{const R=u.filter(T=>T.agent===_);if(!R.length)return null;const W=Math.min(...R.map(T=>T.ts)),X=s.find(T=>(T.id??T)===_)?.status,J=X==="running"&&c?w:Math.max(...R.map(T=>T.ts)),le=o&&o!==_;return a.jsxs(Cn.Fragment,{children:[a.jsxs("button",{type:"button",onClick:()=>f?.(_),title:`Filter transcript to ${_}`,style:{display:"flex",alignItems:"center",gap:6,background:"none",border:"none",padding:0,cursor:f?"pointer":"default",color:le?"var(--ink-2)":"var(--ink-1)",font:"inherit",textAlign:"left",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[a.jsx(an,{agent:_,size:"sm"}),_]}),a.jsxs("div",{style:{position:"relative",height:g,background:"var(--bg-inset)",borderRadius:4,opacity:le?.45:1,overflow:"hidden"},children:[Q.map(T=>a.jsx("span",{"aria-hidden":"true",style:{position:"absolute",left:k(T),top:0,bottom:0,width:1,background:"var(--line)",opacity:.9}},T)),a.jsx("div",{style:{position:"absolute",left:k(W),width:`calc(${k(J)} - ${k(W)})`,top:6,bottom:6,minWidth:3,background:Gs(_),opacity:.15,borderRadius:3}}),R.map(T=>{const U=a.jsx("span",{style:{display:"block",width:T.kind==="text"?3:2,height:T.kind==="text"?g-6:g-14,borderRadius:1,background:T.kind==="error"?"var(--status-critical)":T.kind==="tool"?"var(--ink-0)":Gs(_),boxShadow:"0 0 0 1px var(--bg-inset)"}}),L=`${Hs(T.ts)} · ${T.title||T.kind}`;return h?a.jsx("button",{type:"button",title:L,"aria-label":`Jump to ${L}`,onClick:()=>h(T),style:{position:"absolute",left:k(T.ts),top:0,bottom:0,width:9,marginLeft:-4,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",padding:0,cursor:"pointer"},children:U},T.id??T.ts):a.jsx("span",{title:L,style:{position:"absolute",left:k(T.ts),top:T.kind==="text"?3:7,marginLeft:-1},children:U},T.id??T.ts)}),c&&X==="running"&&a.jsx("span",{className:"pulse",style:{position:"absolute",right:0,top:0,bottom:0,width:2,background:"var(--status-good)"}})]})]},_)}),a.jsx("span",{}),a.jsxs("div",{style:{position:"relative",height:16,fontVariantNumeric:"tabular-nums"},children:[a.jsx("span",{style:{position:"absolute",left:0,top:0},children:Hs(m)}),Q.map(_=>{const R=O(_);return R<12||R>88?null:a.jsx("span",{style:{position:"absolute",left:`${R}%`,top:0,transform:"translateX(-50%)",color:"var(--ink-3, var(--ink-2))"},children:Hs(_)},_)}),a.jsx("span",{style:{position:"absolute",right:0,top:0},children:c?"now":Hs(w)})]})]})}function Nu({children:s,accent:u,tone:c="card",style:o,onClick:f,title:h}){const g=c==="panel"?"var(--bg-panel)":c==="inset"?"var(--bg-inset)":"var(--bg-card)";return a.jsx("div",{onClick:f,title:h,role:f?"button":void 0,style:{background:g,border:"1px solid var(--line)",borderLeft:u?`var(--accent-w) solid ${u}`:"1px solid var(--line)",borderRadius:"var(--r-sm)",padding:"var(--sp-3)",cursor:f?"pointer":void 0,...o},children:s})}function Dp(s){if(s==null)return null;if(typeof s=="object")return s;try{return JSON.parse(s)}catch{return null}}function Wh(s){if(!s)return"";const u=String(s).split("/");return u.length>3?"…/"+u.slice(-3).join("/"):s}function Rp(s,u){if(!u)return"";switch(s){case"Write":case"Edit":case"MultiEdit":case"Read":return Wh(u.file_path||u.path);case"Bash":return u.command||"";case"Grep":return`${u.pattern??""}${u.path?" in "+Wh(u.path):""}`;case"Glob":return u.pattern||"";case"WebFetch":case"WebSearch":return u.url||u.query||"";case"spawn_worker":return`${u.id??"worker"} — ${(u.task||"").slice(0,80)}`;case"message_worker":return`${u.id??"worker"} — ${(u.message||"").slice(0,80)}`;case"ask_human":return u.question||"";default:{const c=Object.keys(u)[0];return c?`${c}: ${String(u[c]).slice(0,80)}`:""}}}function xu({text:s,tone:u,max:c=12}){const o=String(s??"").split(`
21
+ `),f=o.slice(0,c),h=u==="add"?"var(--diff-add-bg)":u==="del"?"var(--diff-del-bg)":"transparent",g=u==="add"?"+":u==="del"?"−":" ";return a.jsxs("div",{style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-xs)",lineHeight:1.5},children:[f.map((j,m)=>a.jsxs("div",{style:{display:"flex",background:h,padding:"0 8px"},children:[a.jsx("span",{style:{width:14,flex:"0 0 auto",color:u==="add"?"var(--status-good)":u==="del"?"var(--status-critical)":"var(--ink-2)"},children:g}),a.jsx("span",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word",color:"var(--ink-0)"},children:j})]},m)),o.length>c&&a.jsxs("div",{style:{padding:"2px 8px",color:"var(--ink-2)"},children:["… ",o.length-c," more lines"]})]})}function Ax({tool:s,input:u}){if(!u)return null;if(s==="Write")return a.jsx(xu,{text:u.content,tone:"add"});const c=s==="MultiEdit"?u.edits||[]:[u];return a.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:c.map((o,f)=>a.jsxs("div",{children:[a.jsx(xu,{text:o.old_string,tone:"del",max:8}),a.jsx(xu,{text:o.new_string,tone:"add",max:8})]},f))})}const Dx=new Set(["spawn_worker","message_worker","ask_human"]);function Op({tool:s="tool",input:u,body:c,defaultOpen:o=!1,style:f}){const h=u??Dp(c),[g,j]=x.useState(o),[m,v]=x.useState(!1),w=Dx.has(s),S=h&&(s==="Write"||s==="Edit"||s==="MultiEdit"),k=Rp(s,h)||(typeof c=="string"?c.slice(0,120):"");return a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6,...f},children:[a.jsxs("button",{type:"button",onClick:()=>j(!g),title:g?"Collapse":"Expand",style:{display:"flex",alignItems:"center",gap:8,padding:0,background:"none",border:"none",cursor:"pointer",color:"var(--ink-0)",textAlign:"left",width:"100%",font:"inherit"},children:[a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5,padding:"2px 8px 2px 6px",borderRadius:"var(--r-pill)",background:w?"var(--brand-wash-strong)":"var(--bg-inset)",border:`1px solid ${w?"var(--brand)":"var(--line)"}`,color:w?"var(--brand)":"var(--ink-1)",fontSize:"var(--fs-xs)",fontWeight:"var(--fw-semibold)",fontFamily:"var(--font-mono)",whiteSpace:"nowrap",lineHeight:"16px"},children:[a.jsx(ie,{name:s,size:12,strokeWidth:2}),s]}),a.jsx("span",{style:{flex:1,minWidth:0,fontFamily:"var(--font-mono)",fontSize:"var(--fs-sm)",color:"var(--ink-1)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:k}),a.jsx(ie,{name:g?"chevronDown":"chevronRight",size:14,color:"var(--ink-2)"})]}),g&&a.jsxs("div",{style:{background:"var(--bg-inset)",border:"1px solid var(--line)",borderRadius:"var(--r-sm)",overflow:"hidden"},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 8px",borderBottom:"1px solid var(--line)",fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:[a.jsx("span",{children:S&&!m?"changes":"payload"}),a.jsx("span",{style:{flex:1}}),S&&a.jsxs("button",{type:"button",onClick:()=>v(!m),style:{display:"inline-flex",alignItems:"center",gap:4,background:"none",border:"none",color:"var(--ink-2)",cursor:"pointer",font:"inherit",padding:0},children:[a.jsx(ie,{name:"raw",size:12}),m?"diff":"raw"]})]}),a.jsx("div",{style:{padding:"6px 0",maxHeight:260,overflow:"auto"},children:S&&!m?a.jsx(Ax,{tool:s,input:h}):a.jsx("pre",{style:{margin:0,padding:"0 8px",fontFamily:"var(--font-mono)",fontSize:"var(--fs-xs)",whiteSpace:"pre-wrap",wordBreak:"break-word",color:"var(--ink-0)"},children:h?JSON.stringify(h,null,2):String(c??"")})})]})]})}const Rx=/(`[^`\n]+`|\*\*[^*\n]+\*\*|<[^<>\n]{1,80}>)/g;function Bs(s,u){return s.split(Rx).filter(Boolean).map((c,o)=>c.startsWith("`")&&c.endsWith("`")&&c.length>2?a.jsx("code",{style:{fontFamily:"var(--font-mono)",fontSize:"0.92em",background:"var(--bg-inset)",border:"1px solid var(--line)",borderRadius:4,padding:"0 5px"},children:c.slice(1,-1)},o):c.startsWith("**")&&c.endsWith("**")&&c.length>4?a.jsx("strong",{style:{fontWeight:"var(--fw-semibold)",color:"var(--ink-0)"},children:c.slice(2,-2)},o):u&&c.startsWith("<")&&c.endsWith(">")?a.jsx("span",{style:{background:"var(--brand-wash-strong)",border:"1px dashed var(--brand)",borderRadius:4,padding:"0 5px",color:"var(--ink-0)"},children:c.slice(1,-1)},o):c)}function Ox(s){const u=String(s||"").replace(/\r\n?/g,`
22
+ `).split(`
23
+ `),c=[];let o=0;for(;o<u.length;){const f=u[o];if(/^```/.test(f)){const j=f.slice(3).trim(),m=[];for(o++;o<u.length&&!/^```/.test(u[o]);)m.push(u[o++]);o++,c.push({t:"code",lang:j,body:m.join(`
24
+ `)});continue}if(/^>\s?/.test(f)){const j=[];for(;o<u.length&&/^>\s?/.test(u[o]);)j.push(u[o++].replace(/^>\s?/,""));c.push({t:"quote",body:j});continue}if(/^\s*[-*]\s+/.test(f)){const j=[];for(;o<u.length&&/^\s*[-*]\s+/.test(u[o]);)j.push(u[o++].replace(/^\s*[-*]\s+/,""));c.push({t:"list",items:j});continue}const h=/^(#{1,3})\s+(.*)$/.exec(f);if(h){c.push({t:"h",level:h[1].length,body:h[2]}),o++;continue}if(!f.trim()){o++;continue}const g=[];for(;o<u.length&&u[o].trim()&&!/^(```|>|\s*[-*]\s|#{1,3}\s)/.test(u[o]);)g.push(u[o++]);c.push({t:"p",body:g})}return c}function Uu({text:s,slots:u=!0,style:c}){const o=Ox(s);return a.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10,lineHeight:"var(--lh-prose)",color:"var(--ink-prose, var(--ink-0))",...c},children:o.map((f,h)=>f.t==="code"?a.jsxs("pre",{style:{margin:0,padding:"var(--sp-2) var(--sp-3)",background:"var(--bg-inset)",border:"1px solid var(--line)",borderRadius:"var(--r-sm)",fontFamily:"var(--font-mono)",fontSize:"var(--fs-sm)",lineHeight:"var(--lh)",overflowX:"auto",whiteSpace:"pre",position:"relative"},children:[f.lang&&a.jsx("span",{style:{position:"absolute",top:4,right:8,fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:f.lang}),f.body]},h):f.t==="quote"?a.jsx("blockquote",{style:{margin:0,padding:"2px 0 2px 12px",borderLeft:"2px solid var(--agent-worker)",color:"var(--ink-1)"},children:f.body.map((g,j)=>a.jsx("div",{children:Bs(g,u)},j))},h):f.t==="list"?a.jsx("ul",{style:{margin:0,paddingLeft:20},children:f.items.map((g,j)=>a.jsx("li",{children:Bs(g,u)},j))},h):f.t==="h"?a.jsx("div",{style:{fontWeight:"var(--fw-semibold)",fontSize:f.level===1?"var(--fs-lg)":"var(--fs-md)",color:"var(--ink-0)",marginTop:h?4:0},children:Bs(f.body,u)},h):a.jsx("p",{style:{margin:0},children:f.body.map((g,j)=>a.jsxs(Cn.Fragment,{children:[j>0&&a.jsx("br",{}),Bs(g,u)]},j))},h))})}const Np=new Set(["spawn_worker","message_worker","ask_human"]);function Up({agent:s,title:u,kind:c="text",body:o,ts:f,to:h,timing:g,dense:j=!1,style:m}){const v=c==="tool";if(v&&j)return a.jsx(Hx,{agent:s,title:u,body:o,ts:f,style:m});if(c==="system"&&!o&&typeof u=="string"&&u.startsWith("result ·"))return a.jsx(Ux,{agent:s,title:u,ts:f,style:m});const w=c==="steer",S=c==="result",k=c==="error"?"var(--status-critical)":w?"var(--ink-0)":c==="text"?Gs(s):void 0,O=f?new Date(f).toLocaleTimeString(void 0,{hour12:!1}):null,Q=v?String(u||"tool").replace(/^[^\w]+/,""):null,Z=v?null:u;return a.jsxs(Nu,{accent:k,style:{padding:"var(--sp-2) var(--sp-3)",...S?{fontFamily:"var(--font-mono)",fontSize:"var(--fs-sm)"}:null,...c==="system"?{color:"var(--ink-1)",fontSize:"var(--fs-sm)"}:null,...m},children:[a.jsxs("div",{style:{fontSize:"var(--fs-xs)",color:c==="error"?"var(--status-critical)":"var(--ink-2)",marginBottom:4,display:"flex",alignItems:"center",gap:6,fontFamily:"var(--font-ui)"},children:[a.jsx(an,{agent:s,size:"sm"}),a.jsx("span",{children:s}),w&&h&&a.jsxs(a.Fragment,{children:[a.jsx(ie,{name:"chevronRight",size:11}),a.jsx(an,{agent:h,size:"sm"}),a.jsx("span",{children:h})]}),w&&g&&a.jsxs(a.Fragment,{children:[a.jsx("span",{children:"·"}),a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[a.jsx(ie,{name:g==="now"?"now":"nextTurn",size:11}),g==="now"?"now":"next turn"]})]}),Z&&Z!==s&&a.jsxs(a.Fragment,{children:[a.jsx("span",{children:"·"}),a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[c==="error"&&a.jsx(ie,{name:"error",size:11,strokeWidth:2.25}),Z]})]}),v&&Np.has(Q)&&a.jsxs(a.Fragment,{children:[a.jsx("span",{children:"·"}),a.jsx("span",{style:{color:"var(--brand)"},children:"orchestration"})]}),O&&a.jsx("span",{style:{marginLeft:"auto",fontVariantNumeric:"tabular-nums"},children:O})]}),v?a.jsx(Op,{tool:Q,body:o}):c==="text"&&typeof o=="string"?a.jsx(Uu,{text:o}):a.jsx(Nx,{body:o})]})}const Jh=12;function Nx({body:s}){const[u,c]=x.useState(!1),o=typeof s=="string"?s:null,f=o?o.split(`
25
+ `):[];if(!(o!==null&&(f.length>Jh+4||o.length>1600)))return a.jsx("div",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:s});const g=u?o:f.slice(0,Jh).join(`
26
+ `).slice(0,1600);return a.jsxs("div",{children:[a.jsxs("div",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:[g,!u&&`
27
+ …`]}),a.jsx("button",{type:"button",onClick:()=>c(!u),style:{marginTop:4,padding:0,background:"none",border:"none",cursor:"pointer",font:"inherit",fontFamily:"var(--font-ui)",fontSize:"var(--fs-xs)",color:"var(--brand)"},children:u?"Show less":`Show all · ${f.length} lines`})]})}function Ux({agent:s,title:u,ts:c,style:o}){const f=c?new Date(c).toLocaleTimeString(void 0,{hour12:!1}):null;return a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"1px var(--sp-2)",fontSize:"var(--fs-xs)",color:"var(--ink-2)",whiteSpace:"nowrap",overflow:"hidden",...o},children:[a.jsx(an,{agent:s,size:"sm"}),a.jsx("span",{children:s}),a.jsx("span",{children:"·"}),a.jsx("span",{children:u.replace(/^result · /,"turn ended · ")}),f&&a.jsx("span",{style:{marginLeft:"auto",fontVariantNumeric:"tabular-nums"},children:f})]})}function Hx({agent:s,title:u,body:c,ts:o,style:f}){const h=String(u||"tool").replace(/^[^\w]+/,""),g=Rp(h,Dp(c))||(typeof c=="string"?c:""),j=String(g).replace(/\s+/g," ").slice(0,90),m=o?new Date(o).toLocaleTimeString(void 0,{hour12:!1}):null;return a.jsxs("div",{title:typeof c=="string"?c.slice(0,2e3):void 0,style:{display:"flex",alignItems:"center",gap:6,padding:"1px var(--sp-2)",fontFamily:"var(--font-mono)",fontSize:"var(--fs-xs)",color:"var(--ink-2)",whiteSpace:"nowrap",overflow:"hidden",minWidth:0,...f},children:[a.jsx(an,{agent:s,size:"sm"}),a.jsx(ie,{name:h,size:12}),a.jsx("span",{style:{color:Np.has(h)?"var(--brand)":"var(--ink-1)",flex:"0 0 auto"},children:h}),a.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",minWidth:0},children:j}),m&&a.jsx("span",{style:{marginLeft:"auto",fontVariantNumeric:"tabular-nums",flex:"0 0 auto"},children:m})]})}function Bx(s){const u=[];let c=!1;for(const o of String(s||"").split(`
28
+ `)){const f=/^#{1,6}\s+(.*)$/.exec(o.trim());if(f){c=/^DONE\s*WHEN/i.test(f[1]);continue}if(c)continue;const h=/^\s*[-*]\s*\[([ xX])\]\s*(.+)$/.exec(o);h&&u.push({done:h[1]!==" ",text:h[2].trim()})}return u}function qx({doc:s,style:u}){const[c,o]=x.useState(!1),f=s?Bx(s):[],h=f.filter(g=>g.done).length;return a.jsxs("section",{style:u,children:[a.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:"var(--sp-2)"},children:[a.jsx(tn,{children:"Plan"}),f.length>0&&a.jsxs("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontVariantNumeric:"tabular-nums"},children:[h,"/",f.length]}),s&&a.jsxs("button",{type:"button",onClick:()=>o(!c),style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:4,background:"none",border:"none",cursor:"pointer",color:"var(--ink-2)",fontSize:"var(--fs-xs)",padding:0,font:"inherit"},children:[a.jsx(ie,{name:"raw",size:12}),c?"board":"raw doc"]})]}),f.length>0&&!c&&a.jsx("div",{style:{height:3,background:"var(--bg-inset)",borderRadius:2,marginBottom:6,overflow:"hidden"},children:a.jsx("div",{style:{width:`${h/f.length*100}%`,height:"100%",background:"var(--status-good)",transition:"width var(--dur-meter)"}})}),!s&&a.jsx(ft,{children:"MISSION.md not written yet."}),s&&!c&&f.map((g,j)=>a.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"var(--sp-2)",padding:"4px 0",fontSize:"var(--fs-sm)",color:g.done?"var(--ink-2)":"var(--ink-0)"},children:[a.jsx(ie,{name:g.done?"done":"idle",size:14,strokeWidth:2,color:g.done?"var(--status-good)":"var(--ink-2)",style:{marginTop:2}}),a.jsx("span",{style:{textDecoration:g.done?"line-through":"none"},children:g.text})]},j)),s&&c&&a.jsx("pre",{style:{fontSize:"var(--fs-xs)",whiteSpace:"pre-wrap",color:"var(--ink-1)",background:"var(--bg-inset)",borderRadius:"var(--r-sm)",padding:"var(--sp-2)",maxHeight:320,overflowY:"auto",fontFamily:"var(--font-mono)",margin:0},children:s})]})}function al({label:s,hint:u,layout:c="inline",children:o,style:f}){return c==="stacked"?a.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:5,...f},children:[a.jsx("span",{style:{fontSize:"var(--fs-xs)",fontWeight:"var(--fw-semibold)",letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--ink-2)"},children:s}),o,u&&a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:u})]}):a.jsxs("label",{title:u,style:{display:"flex",alignItems:"center",gap:6,color:"var(--ink-1)",fontSize:"var(--fs-sm)",...f},children:[s,o]})}const Lx=/(`[^`\n]+`|<[^<>\n]{1,80}>)/g;function Yx(s){const u=[];let c=!1;for(const o of s.split(`
29
+ `)){if(/^```/.test(o)){u.push({text:o,kind:"fence",open:!c}),c=!c;continue}if(c){u.push({text:o,kind:"code"});continue}/^>\s?/.test(o)?u.push({text:o,kind:"quote"}):/^\s*[-*]\s+/.test(o)?u.push({text:o,kind:"list"}):/^#{1,3}\s/.test(o)?u.push({text:o,kind:"heading"}):u.push({text:o,kind:"text"})}return u}function qs(s){return s.split(Lx).filter(Boolean).map((u,c)=>u.length>2&&u.startsWith("`")&&u.endsWith("`")?a.jsxs("span",{style:{background:"var(--bg-inset)",boxShadow:"0 0 0 1px var(--line)",borderRadius:3,color:"var(--agent-worker)"},children:[a.jsx("span",{style:{color:"var(--ink-2)"},children:"`"}),u.slice(1,-1),a.jsx("span",{style:{color:"var(--ink-2)"},children:"`"})]},c):u.startsWith("<")&&u.endsWith(">")?a.jsx("span",{style:{background:"var(--brand-wash-strong)",boxShadow:"0 0 0 1px var(--brand)",borderRadius:3},children:u},c):u)}const xi="var(--sp-3)",$x=x.forwardRef(function({value:u,onChange:c,placeholder:o,minHeight:f=200,maxHeight:h=460,onKeyDown:g,onPaste:j,onFocus:m,onBlur:v,style:w},S){const k=x.useRef(null),O=x.useRef(null);x.useImperativeHandle(S,()=>k.current),x.useEffect(()=>{const R=k.current;R&&(R.style.height="0px",R.style.height=`${Math.max(R.scrollHeight,f)}px`,O.current!=null&&(R.setSelectionRange(O.current,O.current),O.current=null))},[u,f]);const Q=R=>{const W=R.target;let X=W.value,J=W.selectionStart;const le=R.nativeEvent?.inputType==="insertText"&&R.nativeEvent?.data==="`",T=X.slice(0,J),U=X.slice(J),L=T.lastIndexOf(`
30
+ `)+1;if(le&&T.slice(L)==="```"&&(U===""||U.startsWith(`
31
+ `))){const H=(T.match(/^```/gm)||[]).length%2===1;H&&(U.match(/^```/gm)||[]).length%2===0?(X=`${T}
32
+
33
+ \`\`\`
34
+ ${U.replace(/^\n/,"")}`,J+=1):H||(X=U.startsWith(`
35
+ `)?X:`${T}
36
+ ${U}`,J+=1),O.current=J}c?.(X)},Z=Yx(u||""),_={margin:0,padding:xi,boxSizing:"border-box",width:"100%",font:"inherit",fontSize:"inherit",lineHeight:"var(--lh-prose)",whiteSpace:"pre-wrap",overflowWrap:"break-word",wordBreak:"break-word",tabSize:4};return a.jsxs("div",{style:{position:"relative",overflowY:"auto",maxHeight:h,...w},children:[a.jsxs("div",{"aria-hidden":!0,style:{..._,position:"absolute",inset:0,height:"auto",color:"var(--ink-0)",pointerEvents:"none"},children:[!u&&o&&a.jsx("div",{style:{color:"var(--ink-2)"},children:o}),u&&Z.map((R,W)=>{const X=R.kind==="code"||R.kind==="fence";return a.jsx("div",{style:{...X?{background:"var(--bg-inset)",margin:`0 calc(-0.5 * ${xi})`,padding:`0 calc(0.5 * ${xi})`}:null,...R.kind==="fence"?{borderRadius:R.open?"6px 6px 0 0":"0 0 6px 6px"}:null,...R.kind==="quote"?{color:"var(--ink-1)",boxShadow:"inset 2px 0 0 var(--agent-worker)",margin:`0 calc(-1 * ${xi})`,padding:`0 ${xi}`}:null,...R.kind==="fence"?{color:"var(--ink-2)"}:null,...R.kind==="code"?{color:"var(--ink-1)"}:null},children:R.text===""?"​":R.kind==="fence"?a.jsxs(a.Fragment,{children:[a.jsx("span",{style:{color:"transparent"},children:"```"}),R.text.slice(3)]}):R.kind==="code"?R.text:R.kind==="list"?a.jsxs(a.Fragment,{children:[a.jsx("span",{style:{color:"var(--brand)"},children:/^\s*[-*]\s+/.exec(R.text)[0]}),qs(R.text.replace(/^\s*[-*]\s+/,""))]}):R.kind==="heading"?a.jsxs(a.Fragment,{children:[a.jsx("span",{style:{color:"var(--brand)"},children:/^#{1,3}\s/.exec(R.text)[0]}),qs(R.text.replace(/^#{1,3}\s/,""))]}):R.kind==="quote"?a.jsxs(a.Fragment,{children:[a.jsx("span",{style:{color:"var(--ink-2)"},children:/^>\s?/.exec(R.text)[0]}),qs(R.text.replace(/^>\s?/,""))]}):qs(R.text)},W)})]}),a.jsx("textarea",{ref:k,value:u,onChange:Q,spellCheck:!1,onKeyDown:g,onPaste:j,onFocus:m,onBlur:v,style:{..._,position:"relative",display:"block",minHeight:f,resize:"none",overflow:"hidden",background:"transparent",border:"none",outline:"none",color:"transparent",caretColor:"var(--ink-0)"}})]})}),Gx=[{id:"fable",label:"Fable",model:"claude-fable-5",cost:4,note:"Frontier. Long-horizon planning and verification."},{id:"opus",label:"Opus",model:"claude-opus-5",cost:3,note:"Deep reasoning for hard refactors."},{id:"sonnet",label:"Sonnet",model:"claude-sonnet-5",cost:2,note:"Balanced. The usual worker."},{id:"haiku",label:"Haiku",model:"claude-haiku-4-5",cost:1,note:"Fast and cheap for reads and mechanical edits."}],Fh={id:"",label:"Default",model:"inherits your Claude Code default",cost:0};function Xx(s){const[u,c]=x.useState({models:null,loading:!!s,error:null});return x.useEffect(()=>{if(!s)return;let o=!0;return c(h=>({...h,loading:!0})),(typeof s=="string"?fetch(s).then(h=>{if(!h.ok)throw new Error(`${h.status} from ${s}`);return h.json()}).then(h=>h.models||h):Promise.resolve().then(s)).then(h=>o&&c({models:h,loading:!1,error:null})).catch(h=>o&&c({models:null,loading:!1,error:String(h&&h.message||h)})),()=>{o=!1}},[s]),u}function Qx({cost:s}){return s?a.jsx("span",{"aria-label":`cost ${s} of 4`,style:{display:"inline-flex",gap:2},children:[1,2,3,4].map(u=>a.jsx("span",{style:{width:4,height:10,borderRadius:1,background:u<=s?"var(--ink-1)":"var(--line-strong)"}},u))}):a.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:"—"})}function Hp(s){return s&&s.providerLabel||"Anthropic"}function Vx(s){const u=[];for(const c of s){const o=Hp(c);let f=u.find(h=>h.label===o);f||(f={label:o,items:[]},u.push(f)),f.items.push(c)}return u}function nn({align:s="left",block:u=!1,value:c="",onChange:o,models:f,loading:h,note:g,inheritNote:j,allowDefault:m=!0,disabled:v,style:w}){const[S,k]=x.useState(!1),[O,Q]=x.useState(null),[Z,_]=x.useState(""),R=x.useRef(null),W=x.useRef(null),X=x.useRef(null),J=j?{...Fh,model:j}:Fh,le=f||Gx,T=[...m?[J]:[],...le],U=T.find(Y=>Y.id===c)||(c?{id:c,label:c,model:c}:J),L=le.length>6,H=Z.trim().toLowerCase(),ae=Y=>!H||[Y.label,Y.model,Y.id,Y.providerLabel,Y.note].some(I=>String(I??"").toLowerCase().includes(H)),F=L&&H?le.filter(ae):le,de=Vx(F),ye=de.length>1;x.useEffect(()=>{if(!S)return;const Y=ge=>{R.current&&!R.current.contains(ge.target)&&k(!1)},I=ge=>{ge.key==="Escape"&&k(!1)};return document.addEventListener("mousedown",Y),document.addEventListener("keydown",I),()=>{document.removeEventListener("mousedown",Y),document.removeEventListener("keydown",I)}},[S]),x.useEffect(()=>{if(!S||!W.current)return;const Y=W.current.querySelector('[data-selected="true"]');Y&&Y.scrollIntoView({block:"nearest"})},[S]),x.useEffect(()=>{if(!S){_("");return}X.current?.focus()},[S]);const je=()=>{const Y=de[0]?.items[0];Y&&(o?.(Y.id,Y),k(!1))},re=Hp(U),M=U.id&&re!=="Anthropic";return a.jsxs("div",{ref:R,style:{position:"relative",display:u?"block":"inline-block",...u?{width:"100%"}:{},...w},children:[a.jsxs("button",{type:"button",disabled:v||h,onClick:()=>k(Y=>!Y),"aria-haspopup":"listbox","aria-expanded":S,style:{display:u?"flex":"inline-flex",alignItems:"center",gap:8,minWidth:150,padding:"6px 8px 6px 10px",...u?{width:"100%",boxSizing:"border-box"}:{},background:"var(--bg-card)",border:`1px solid ${S?"var(--ink-2)":"var(--line-strong)"}`,borderRadius:"var(--r-sm)",color:h?"var(--ink-2)":"var(--ink-0)",cursor:v||h?"default":"pointer",textAlign:"left",transition:"border-color var(--dur-fast) var(--ease)"},children:[a.jsx(ie,{name:h?"loading":"model",size:14,color:"var(--ink-2)"}),a.jsxs("span",{style:{flex:1,display:"inline-flex",alignItems:"center",gap:6,minWidth:0},children:[a.jsx("span",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:h?"Fetching models…":U.label}),M&&a.jsx("span",{style:{flex:"0 0 auto",fontSize:"var(--fs-xs)",lineHeight:1,padding:"2px 5px",borderRadius:"var(--r-xs, 3px)",background:"var(--bg-hover)",color:"var(--ink-2)",border:"1px solid var(--line)"},children:re})]}),a.jsx(ie,{name:"chevronDown",size:14,color:"var(--ink-2)"})]}),S&&a.jsxs("div",{role:"listbox",style:{position:"absolute",top:"calc(100% + 4px)",zIndex:20,minWidth:300,...u?{left:0,right:0}:s==="right"?{right:0}:{left:0},background:"var(--bg-panel)",border:"1px solid var(--line-strong)",borderRadius:"var(--r-sm)",boxShadow:"0 8px 24px rgba(0,0,0,0.28)",padding:4,display:"flex",flexDirection:"column"},children:[g&&a.jsx("div",{style:{padding:"6px 10px",fontSize:"var(--fs-xs)",color:"var(--ink-2)",borderBottom:T.length?"1px solid var(--line)":"none"},children:g}),L&&a.jsx("div",{style:{padding:6,borderBottom:"1px solid var(--line)"},children:a.jsx("input",{ref:X,value:Z,onChange:Y=>_(Y.target.value),placeholder:`Filter ${le.length} models…`,"aria-label":"Filter models",onKeyDown:Y=>{Y.key==="Enter"&&(Y.preventDefault(),je())},style:{width:"100%",boxSizing:"border-box",padding:"5px 8px",font:"inherit",fontSize:"var(--fs-sm)",color:"var(--ink-0)",background:"var(--bg-inset)",border:"1px solid var(--line)",borderRadius:"var(--r-sm)",outline:"none"}})}),a.jsxs("div",{ref:W,style:{maxHeight:360,overflowY:"auto",display:"flex",flexDirection:"column"},children:[L&&H&&F.length===0&&a.jsxs("div",{style:{padding:"10px",fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:["No model matches “",Z.trim(),"”."]}),m&&!H&&a.jsx(Ih,{m:J,selected:U.id===J.id,hover:O===J.id,onHover:Q,onClick:()=>{o?.(J.id,J),k(!1)}},J.id),de.map(Y=>a.jsxs(Cn.Fragment,{children:[ye&&a.jsxs("div",{style:{padding:"6px 8px 4px",marginTop:2,fontSize:"var(--fs-xs)",fontWeight:"var(--fw-semibold)",color:"var(--ink-2)",textTransform:"uppercase",letterSpacing:"0.04em",display:"flex",justifyContent:"space-between",position:"sticky",top:0,background:"var(--bg-panel)",zIndex:1},children:[a.jsx("span",{children:Y.label}),a.jsx("span",{children:Y.items.length})]}),Y.items.map(I=>a.jsx(Ih,{m:I,selected:U.id===I.id,hover:O===I.id,onHover:Q,onClick:()=>{o?.(I.id,I),k(!1)}},I.id))]},Y.label))]})]})]})}function Ih({m:s,selected:u,hover:c,onHover:o,onClick:f}){return a.jsxs("button",{type:"button",role:"option","aria-selected":u,"data-selected":u||void 0,onMouseEnter:()=>o(s.id),onMouseLeave:()=>o(null),onClick:f,style:{display:"grid",gridTemplateColumns:"14px 1fr auto",columnGap:10,alignItems:"start",textAlign:"left",padding:"7px 8px",border:"none",borderRadius:4,cursor:"pointer",color:"var(--ink-0)",background:c?"var(--bg-hover)":"transparent",width:"100%"},children:[a.jsx("span",{style:{paddingTop:2},children:u&&a.jsx(ie,{name:"check",size:14,color:"var(--brand)"})}),a.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[a.jsxs("span",{style:{display:"flex",alignItems:"baseline",gap:8},children:[a.jsx("span",{style:{fontWeight:u?"var(--fw-semibold)":"inherit"},children:s.label}),a.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-xs)",color:"var(--ink-2)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.model})]}),s.note&&a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:s.note})]}),a.jsx("span",{style:{paddingTop:3},children:a.jsx(Qx,{cost:s.cost})})]})}nn.useModels=Xx;function Rt({checked:s=!1,onChange:u,disabled:c,label:o,size:f="md",style:h}){const[g,j]=x.useState(!1),m=f==="sm"?28:34,v=f==="sm"?16:20,w=v-4;return a.jsx("button",{type:"button",role:"switch","aria-checked":s,"aria-label":o,disabled:c,onClick:()=>u?.(!s),onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),style:{position:"relative",width:m,height:v,flex:"0 0 auto",padding:0,borderRadius:"var(--r-pill)",border:`1px solid ${s?"var(--brand)":g?"var(--ink-2)":"var(--line-strong)"}`,background:s?"var(--brand)":"var(--bg-inset)",cursor:c?"default":"pointer",opacity:c?.5:1,transition:"background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease)",...h},children:a.jsx("span",{"aria-hidden":!0,style:{position:"absolute",top:1,left:s?m-w-3:1,width:w,height:w,borderRadius:"var(--r-pill)",background:s?"var(--brand-ink)":"var(--ink-1)",transition:"left var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease)"}})})}const Zx=/\.(png|jpe?g|gif|webp|svg|heic)$/i,Kx=/\.(js|jsx|ts|tsx|py|rb|go|rs|java|kt|swift|c|cc|cpp|h|css|html|json|ya?ml|toml|sh|sql|md)$/i;function Wx(s){return s==null?"":s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(s<10240?1:0)} KB`:`${(s/1048576).toFixed(1)} MB`}function Bp({name:s,size:u,onRemove:c,style:o}){const[f,h]=x.useState(!1),g=Zx.test(s)?"image":Kx.test(s)?"code":"file";return a.jsxs("span",{onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),style:{display:"inline-flex",alignItems:"center",gap:6,maxWidth:260,height:24,padding:"0 4px 0 8px",background:"var(--bg-inset)",border:`1px solid ${f?"var(--line-strong)":"var(--line)"}`,borderRadius:"var(--r-sm)",fontSize:"var(--fs-sm)",color:"var(--ink-0)",...o},children:[a.jsx(ie,{name:g,size:13,color:"var(--ink-2)"}),a.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-xs)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s}),u!=null&&a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",whiteSpace:"nowrap"},children:Wx(u)}),c&&a.jsx("button",{type:"button",onClick:c,"aria-label":`Remove ${s}`,style:{display:"inline-flex",width:18,height:18,alignItems:"center",justifyContent:"center",background:"none",border:"none",borderRadius:3,padding:0,cursor:"pointer",color:"var(--ink-2)"},children:a.jsx(ie,{name:"close",size:12})})]})}const Jx=`Describe the mission…
37
+
38
+ Say what "done" looks like, name constraints, and flag any decision the director should ask you about before implementing.`,Fx=[{id:"bugfix",label:"Bug fix",icon:"Bug",budget:3,director:"",worker:"sonnet",brief:`Fix: <describe the bug and how to reproduce it>
39
+
40
+ Done when: the reproduction no longer fails and a regression test covers it.
41
+ Constraints: no unrelated refactors; keep the public API unchanged.
42
+ Ask me before: changing behaviour that other code depends on.`},{id:"tests",label:"Add tests",icon:"ListChecks",budget:4,director:"",worker:"haiku",brief:`Add tests for: <module or feature>
43
+
44
+ Done when: each public function has at least one happy-path and one edge-case test, and the suite passes.
45
+ Constraints: use the existing test runner and conventions; no new dependencies.
46
+ Ask me before: changing production code to make it testable.`},{id:"refactor",label:"Refactor",icon:"Shuffle",budget:6,director:"fable",worker:"sonnet",brief:`Refactor: <what, and why>
47
+
48
+ Done when: behaviour is unchanged (existing tests pass), the code is <goal, e.g. split into pure functions>, and nothing outside <scope> is touched.
49
+ Constraints: one concern per commit-sized step; keep diffs reviewable.
50
+ Ask me before: renaming anything exported.`},{id:"audit",label:"Audit",icon:"SearchCheck",budget:2,director:"",worker:"haiku",brief:`Audit: <area, e.g. error handling / security / accessibility>
51
+
52
+ Done when: a written report in .foreman/AUDIT.md lists findings ranked by severity with file:line references — no code changes.
53
+ Constraints: read-only; do not modify source files.
54
+ Ask me before: nothing — this mission only reads.`}];function Ix(s){if(!s)return"";let u=s.replace(/^\/(Users|home)\/[^/]+/,"~");const c=u.split("/");return c.length>4&&(u=[c[0],c[1],"…",...c.slice(-2)].join("/")),u}function bu(s){return`foreman:draft:${s||"default"}`}const Su=s=>`${s.name}:${s.size}`;function Ph({children:s}){return a.jsx("kbd",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:18,height:18,padding:"0 4px",boxSizing:"border-box",background:"var(--bg-inset)",border:"1px solid var(--line-strong)",borderRadius:4,color:"var(--ink-1)",fontFamily:"var(--font-mono)",fontSize:"var(--fs-xs)",lineHeight:1},children:s})}function ju({icon:s,label:u,active:c,onClick:o}){const[f,h]=x.useState(!1);return a.jsx("button",{type:"button",title:u,"aria-label":u,"aria-pressed":c,onClick:o,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:26,height:24,padding:0,background:c?"var(--bg-inset)":f?"var(--bg-hover)":"transparent",border:"none",borderRadius:4,color:c||f?"var(--ink-0)":"var(--ink-2)",cursor:"pointer"},children:a.jsx(ie,{name:s,size:14})})}function ep({icon:s,label:u,active:c,onClick:o}){return a.jsxs("button",{type:"button",onClick:o,"aria-selected":c,role:"tab",style:{display:"inline-flex",alignItems:"center",gap:5,padding:"0 10px",height:32,background:"none",border:"none",borderBottom:`2px solid ${c?"var(--brand)":"transparent"}`,marginBottom:-1,color:c?"var(--ink-0)":"var(--ink-2)",fontSize:"var(--fs-sm)",fontWeight:c?"var(--fw-semibold)":"inherit",cursor:"pointer"},children:[a.jsx(ie,{name:s,size:13}),u]})}function Px({folder:s,defaultBudgetUsd:u=5,error:c,busy:o,templates:f=Fx,models:h,modelsLoading:g,modelsNote:j,modelsInheritNote:m,onStart:v,style:w}){const S=x.useMemo(()=>{try{return JSON.parse(localStorage.getItem(bu(s))||"null")}catch{return null}},[s]),[k,O]=x.useState(S?.mission??""),[Q,Z]=x.useState(S?.budget??u),[_,R]=x.useState(S?.directorModel??""),[W,X]=x.useState(S?.workerModel??""),[J,le]=x.useState(S?.directorProviderId),[T,U]=x.useState(S?.workerProviderId),[L,H]=x.useState(S?.browserTools??!1),[ae,F]=x.useState(S?"restored":null),[de,ye]=x.useState("write"),[je,re]=x.useState([]),[M,Y]=x.useState(!1),[I,ge]=x.useState(!1),V=x.useRef(null),y=x.useRef(null);x.useEffect(()=>{const K=setTimeout(()=>{try{(k.trim()||S)&&(localStorage.setItem(bu(s),JSON.stringify({mission:k,budget:Q,directorModel:_,workerModel:W,browserTools:L})),k.trim()&&F("saved"))}catch{}},400);return()=>clearTimeout(K)},[k,Q,_,W,L,s]);const B=K=>{O(K.brief),Z(K.budget),R(K.director),X(K.worker),ye("write")},P=()=>{O(""),re([]),F(null);try{localStorage.removeItem(bu(s))}catch{}},ee=K=>{const Xe=Array.from(K||[]);Xe.length&&re(Be=>{const te=new Set(Be.map(Su));return[...Be,...Xe.filter(Ae=>!te.has(Su(Ae)))]})},se=!o&&k.trim().length>0,oe=()=>{se&&v?.({mission:k.trim(),budget:Q,directorModel:_,workerModel:W,directorProviderId:J,workerProviderId:T,browserTools:L,attachments:je})},be=K=>{const Xe=V.current;if(!Xe){ye("write");return}const Be=Xe.selectionStart??k.length,te=Xe.selectionEnd??Be,Ae=k.slice(Be,te);let Le,vt;if(K==="code")Le=`\`${Ae||"code"}\``,vt=Ae?Be+Le.length:Be+1;else if(K==="quote")Le=(Ae||"quoted text").split(`
55
+ `).map(sl=>`> ${sl}`).join(`
56
+ `),vt=Ae?Be+Le.length:Be+2;else{const Ot=Be>0&&k[Be-1]!==`
57
+ `?`
58
+ `:"";Le=`${Ot}\`\`\`
59
+ ${Ae||""}
60
+ \`\`\`
61
+ `,vt=Be+Ot.length+4}const il=k.slice(0,Be)+Le+k.slice(te);O(il),ye("write"),requestAnimationFrame(()=>{Xe.focus();const Ot=Ae?vt:vt+(K==="code"?4:K==="quote"?11:0);Xe.setSelectionRange(vt,Ot)})},Ge=M?"var(--brand)":I?"var(--ink-2)":"var(--line-strong)";return a.jsxs("div",{style:{maxWidth:"var(--composer-max)",margin:"var(--sp-5) auto",padding:"0 var(--sp-4)",display:"flex",flexDirection:"column",gap:"var(--sp-3)",...w},children:[a.jsxs("div",{style:{minWidth:0},children:[a.jsx("h2",{style:{margin:0,fontSize:"var(--fs-lg)"},children:"New mission"}),a.jsx("div",{title:s,style:{color:"var(--ink-2)",fontSize:"var(--fs-xs)",fontFamily:"var(--font-mono)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:Ix(s)})]}),a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,fontSize:"var(--fs-xs)",color:"var(--ink-2)",marginRight:2},children:[a.jsx(ie,{name:"template",size:12}),"Start from"]}),f.map(K=>a.jsx(he,{size:"sm",icon:K.icon,title:`Budget $${K.budget} · director ${K.director||"default"} · workers ${K.worker||"default"}`,onClick:()=>B(K),children:K.label},K.id))]}),a.jsxs("div",{onDragOver:K=>{K.preventDefault(),M||Y(!0)},onDragLeave:K=>{K.currentTarget.contains(K.relatedTarget)||Y(!1)},onDrop:K=>{K.preventDefault(),Y(!1),ee(K.dataTransfer.files)},style:{background:"var(--bg-card)",border:`1px solid ${Ge}`,borderRadius:"var(--r-md)",overflow:"hidden",boxShadow:M?"0 0 0 3px var(--brand-wash-strong)":"none",transition:"border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease)"},children:[a.jsxs("div",{role:"tablist",style:{display:"flex",alignItems:"center",gap:2,padding:"0 6px",borderBottom:"1px solid var(--line)",background:"var(--bg-panel)"},children:[a.jsx(ep,{icon:"write",label:"Write",active:de==="write",onClick:()=>ye("write")}),a.jsx(ep,{icon:"preview",label:"Preview",active:de==="preview",onClick:()=>ye("preview")}),a.jsx("span",{style:{flex:1}}),a.jsx(ju,{icon:"quote",label:"Quote (> )",onClick:()=>be("quote")}),a.jsx(ju,{icon:"code",label:"Inline code (`)",onClick:()=>be("code")}),a.jsx(ju,{icon:"codeBlock",label:"Code block (```)",onClick:()=>be("block")})]}),de==="write"?a.jsx($x,{ref:V,value:k,onChange:O,placeholder:Jx,minHeight:200,maxHeight:440,onKeyDown:K=>{(K.metaKey||K.ctrlKey)&&K.key==="Enter"&&(K.preventDefault(),oe())},onPaste:K=>{K.clipboardData?.files?.length&&(K.preventDefault(),ee(K.clipboardData.files))},onFocus:()=>ge(!0),onBlur:()=>ge(!1)}):a.jsx("div",{style:{minHeight:200,maxHeight:440,overflowY:"auto",padding:"var(--sp-3)",boxSizing:"border-box"},children:k.trim()?a.jsx(Uu,{text:k}):a.jsx("span",{style:{color:"var(--ink-2)"},children:"Nothing to preview yet."})}),a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap",padding:"6px 8px",borderTop:"1px solid var(--line)",minHeight:36,boxSizing:"border-box"},children:[a.jsx("input",{ref:y,type:"file",multiple:!0,style:{display:"none"},onChange:K=>{ee(K.target.files),K.target.value=""}}),a.jsx(he,{size:"sm",variant:"ghost",icon:"attach",title:"Attach files — or drop them on the editor, or paste an image",onClick:()=>y.current?.click(),children:"Attach"}),je.map((K,Xe)=>a.jsx(Bp,{name:K.name,size:K.size,onRemove:()=>re(Be=>Be.filter((te,Ae)=>Ae!==Xe))},Su(K))),a.jsx("span",{style:{flex:1}}),a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8,fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:[ae&&a.jsxs(a.Fragment,{children:[a.jsx(ie,{name:"draft",size:11}),ae==="restored"?"Draft restored":"Draft saved"]}),(k||je.length>0)&&a.jsx("button",{type:"button",onClick:P,style:{background:"none",border:"none",padding:0,color:"var(--ink-2)",cursor:"pointer",font:"inherit",textDecoration:"underline"},children:"Clear"})]})]})]}),a.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"var(--sp-4)",flexWrap:"wrap"},children:[a.jsx(al,{layout:"stacked",label:"Budget cap",hint:"Hard stop; the run halts here.",children:a.jsx(Je,{type:"number",min:1,step:1,width:96,prefix:"$",value:Q,onChange:Z})}),a.jsx(al,{layout:"stacked",label:"Director",hint:"Plans, delegates, verifies.",children:a.jsx(nn,{value:_,models:h,loading:g,note:j,inheritNote:m,onChange:(K,Xe)=>{R(K),le(Xe?.providerId)}})}),a.jsx(al,{layout:"stacked",label:"Workers",hint:"Implement. Cheaper models cut cost.",children:a.jsx(nn,{value:W,models:h,loading:g,note:j,inheritNote:m,onChange:(K,Xe)=>{X(K),U(Xe?.providerId)}})}),a.jsx(al,{label:"Browser",hint:"Headless Playwright for the agents — navigate, click, screenshot. Non-local URLs still ask you.",children:a.jsx(Rt,{checked:L,onChange:H,label:L?"on":"off"})})]}),a.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"var(--sp-3)",flexWrap:"wrap"},children:[c&&a.jsx(ln,{tone:"error",inline:!0,style:{marginRight:"auto"},children:c}),a.jsxs("span",{title:"Start the mission with Cmd+Enter from the editor",style:{display:"inline-flex",alignItems:"center",gap:4,fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:[a.jsx(Ph,{children:"⌘"}),a.jsx(Ph,{children:"↵"})]}),a.jsx(he,{variant:"primary",disabled:!se,onClick:oe,children:"Start mission"})]})]})}const ku=s=>`${s.name}:${s.size}`,Hu=22,tp=Hu*3,np=Hu*10;function lp({value:s,onChange:u,onSend:c,onStop:o,busy:f,disabled:h,disabledReason:g,placeholder:j,who:m,onChangeModel:v,autoFocus:w,style:S}){const[k,O]=x.useState(""),[Q,Z]=x.useState(!1),[_,R]=x.useState([]),[W,X]=x.useState(!1),J=x.useRef(null),le=x.useRef(null),T=F=>{const de=Array.from(F||[]);de.length&&R(ye=>{const je=new Set(ye.map(ku));return[...ye,...de.filter(re=>!je.has(ku(re)))]})},U=s??k,L=u??O,H=!h&&!f&&(U.trim().length>0||_.length>0);x.useEffect(()=>{const F=J.current;F&&(F.style.height="auto",F.style.height=Math.max(tp,Math.min(F.scrollHeight,np))+"px")},[U]);const ae=()=>{H&&(c?.(U.trim()||(_.length?"See the attached files.":""),_),L(""),R([]))};return a.jsxs("div",{style:{flex:"0 0 auto",background:W?"var(--brand-wash)":"var(--bg-card)",border:`1px solid ${Q||W?"var(--brand)":"var(--line-strong)"}`,borderRadius:"var(--r-md)",padding:"var(--sp-2) var(--sp-3)",display:"flex",flexDirection:"column",gap:"var(--sp-2)",opacity:h?.6:1,transition:"border-color var(--dur-fast) var(--ease)",...S},onDragOver:F=>{h||(F.preventDefault(),X(!0))},onDragLeave:F=>{F.target===F.currentTarget&&X(!1)},onDrop:F=>{F.preventDefault(),X(!1),h||T(F.dataTransfer.files)},children:[a.jsxs("div",{style:{display:"flex",gap:"var(--sp-2)",alignItems:"flex-start"},children:[a.jsx("span",{className:f?"pulse":void 0,style:{marginTop:3,flex:"0 0 auto",display:"inline-flex"},children:a.jsx(ie,{name:f?"loading":"steer",size:15,color:"var(--brand)"})}),a.jsx("textarea",{ref:J,rows:3,value:U,disabled:h,autoFocus:w,placeholder:h?g||"Not available right now.":j||"Ask, think out loud, or describe what you want built…",onChange:F=>L(F.target.value),onPaste:F=>{F.clipboardData?.files?.length&&(F.preventDefault(),T(F.clipboardData.files))},onFocus:()=>Z(!0),onBlur:()=>Z(!1),onKeyDown:F=>{(F.metaKey||F.ctrlKey)&&F.key==="Enter"&&(F.preventDefault(),ae())},style:{flex:1,minWidth:0,resize:"none",border:"none",outline:"none",boxShadow:"none",background:"transparent",borderRadius:"var(--r-sm)",color:"var(--ink-0)",font:"inherit",lineHeight:`${Hu}px`,padding:"2px 0",minHeight:tp,maxHeight:np}})]}),_.length>0&&a.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:_.map((F,de)=>a.jsx(Bp,{name:F.name,size:F.size,onRemove:()=>R(ye=>ye.filter((je,re)=>re!==de))},ku(F)))}),a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)"},children:[a.jsxs("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:m?`${m.model} via ${m.provider}`:void 0,children:[m&&a.jsxs("span",{style:{fontFamily:"var(--font-mono)",color:"var(--ink-1)"},role:v?"button":void 0,onClick:v,title:v?"Change the planner model in Settings → Models":void 0,...v?{style:{fontFamily:"var(--font-mono)",color:"var(--ink-1)",cursor:"pointer",textDecoration:"underline dotted",textUnderlineOffset:3}}:{},children:[m.model," · ",m.provider.split(" · ")[0],m.costBasis==="free"?" · free":m.costBasis==="unpriced"?" · unpriced":""," — "]}),f?"The foreman is looking…":"Reads the project, never changes it."]}),a.jsx("input",{ref:le,type:"file",multiple:!0,style:{display:"none"},onChange:F=>{T(F.target.files),F.target.value=""}}),a.jsx(he,{size:"sm",variant:"ghost",icon:"attach",disabled:h,title:"Attach files — or drop them here, or paste an image",onClick:()=>le.current?.click(),style:{marginLeft:"auto"},children:"Attach"}),f&&o?a.jsx(he,{size:"sm",variant:"danger",icon:"close",onClick:o,title:"Stop the planner and discard the rest of this reply",children:"Stop"}):a.jsx(he,{size:"sm",icon:"send",onClick:ae,disabled:!H,title:"⌘↵",children:"Send"})]})]})}function e1({questions:s=[],askedAt:u,who:c,onAnswer:o,onFreeText:f,style:h}){const[g,j]=x.useState({}),[m,v]=x.useState(""),[w,S]=x.useState(0),[k,O]=x.useState(!1),Q=x.useRef(null),Z=s.length===1&&!s[0]?.multi,_=s.every(U=>{const L=g[U.question];return Array.isArray(L)?L.length>0:!!L});x.useEffect(()=>{j({}),v(""),S(0),O(!1)},[s]);const R=x.useMemo(()=>{const U={};for(const L of s){const H=g[L.question];Array.isArray(H)?U[L.question]=H.join(", "):H&&(U[L.question]=H)}return U},[g,s]),W=U=>{k||(O(!0),o?.(U))},X=(U,L)=>{if(k)return;if(U.multi){j(ae=>{const F=Array.isArray(ae[U.question])?ae[U.question]:[],de=F.includes(L)?F.filter(ye=>ye!==L):[...F,L];return{...ae,[U.question]:de}});return}const H={...g,[U.question]:L};j(H),Z&&W({[U.question]:L})},J=()=>{const U=m.trim();if(!U||k)return;const L=s[Math.min(w,s.length-1)],H={...R,[L.question]:U};if(s.length===1){O(!0),o?.(H);return}O(!0),o?.(H)},le=U=>{if(U.target.tagName==="TEXTAREA"){(U.metaKey||U.ctrlKey)&&U.key==="Enter"&&(U.preventDefault(),J());return}const L=s[w];if(L)if(/^[1-9]$/.test(U.key)){const H=L.options[Number(U.key)-1];H&&(U.preventDefault(),X(L,H.label))}else U.key==="ArrowDown"?(U.preventDefault(),S(H=>Math.min(s.length-1,H+1))):U.key==="ArrowUp"?(U.preventDefault(),S(H=>Math.max(0,H-1))):U.key==="Enter"&&!Z&&_&&(U.preventDefault(),W(R))},T=u?Math.max(0,Math.round((Date.now()-u)/6e4)):0;return a.jsxs("div",{ref:Q,tabIndex:0,onKeyDown:le,style:{flex:"0 0 auto",outline:"none",background:"var(--bg-card)",border:"1px solid var(--brand)",borderRadius:"var(--r-md)",overflow:"hidden",opacity:k?.6:1,transition:"opacity var(--dur-fast) var(--ease)",...h},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"var(--sp-2) var(--sp-3)",borderBottom:"1px solid var(--line)",fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:[a.jsx(ie,{name:"question",size:14,color:"var(--brand)"}),a.jsx("span",{style:{color:"var(--ink-1)",fontWeight:"var(--fw-semibold)"},children:"The foreman asks"}),a.jsx("span",{children:"· pick an answer, or type one"}),T>=1&&a.jsxs("span",{style:{marginLeft:"auto"},children:["waiting ",T,"m"]})]}),s.map((U,L)=>{const H=g[U.question],ae=Array.isArray(H)?H.length>0:!!H,F=L===w;return a.jsxs("div",{onMouseEnter:()=>S(L),style:{padding:"var(--sp-2) var(--sp-3)",borderBottom:"1px solid var(--line)",background:F&&s.length>1?"var(--bg-inset)":"transparent"},children:[a.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:6,marginBottom:6,fontSize:"var(--fs-md)",color:"var(--ink-0)"},children:[s.length>1&&a.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-xs)",color:ae?"var(--status-ok, var(--brand))":"var(--ink-2)"},children:ae?"✓":`${L+1}.`}),a.jsx("span",{children:U.question}),U.multi&&a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:"choose any"})]}),a.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:U.options.map((de,ye)=>{const je=Array.isArray(H)?H.includes(de.label):H===de.label;return a.jsxs("button",{type:"button",disabled:k,onClick:()=>X(U,de.label),title:de.hint||(ye===0?"Recommended":void 0),style:{display:"inline-flex",flexDirection:"column",alignItems:"flex-start",gap:2,padding:"6px 10px",borderRadius:"var(--r-sm)",cursor:k?"default":"pointer",font:"inherit",textAlign:"left",maxWidth:360,background:je?"color-mix(in srgb, var(--brand) 16%, transparent)":"var(--bg-inset)",border:`1px solid ${je?"var(--brand)":"var(--line-strong)"}`,color:je?"var(--brand)":"var(--ink-0)",transition:"border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease)"},children:[a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:"var(--fs-sm)"},children:[a.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-xs)",minWidth:14,color:je?"var(--brand)":"var(--ink-2)"},children:ye+1}),de.label,ye===0&&a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontWeight:"var(--fw-normal)"},children:"· recommended"})]}),de.hint&&a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",lineHeight:"var(--lh)"},children:de.hint})]},de.label)})})]},U.question)}),a.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:"var(--sp-2)",padding:"var(--sp-2) var(--sp-3)"},children:[a.jsx("textarea",{rows:1,value:m,disabled:k,placeholder:s.length>1?`Something else for question ${w+1}…`:"Something else…",onChange:U=>v(U.target.value),onFocus:()=>{},style:{flex:1,minWidth:0,resize:"none",border:"none",outline:"none",background:"transparent",color:"var(--ink-0)",font:"inherit",lineHeight:"var(--lh)",padding:"4px 0"}}),m.trim()?a.jsx(he,{size:"sm",icon:"send",onClick:J,disabled:k,title:"⌘↵",children:"Send"}):Z?null:a.jsx(he,{size:"sm",variant:"primary",onClick:()=>W(R),disabled:k||!_,title:_?"Enter":"Answer every question first",children:"Send answers"})]}),c&&a.jsxs("div",{style:{padding:"0 var(--sp-3) var(--sp-2)",fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontFamily:"var(--font-mono)"},children:[c.model," · ",String(c.provider).split(" · ")[0]]})]})}function t1({mission:s,doneWhen:u=[],budgetUsd:c=5,rationale:o,browser:f=!1,directorModel:h="",workerModel:g="",directorProviderId:j,workerProviderId:m,modelRationale:v,models:w,modelsLoading:S,modelsNote:k,modelsInheritNote:O,busy:Q,error:Z,onStart:_,onDismiss:R,style:W}){const[X,J]=x.useState(s),[le,T]=x.useState(c),[U,L]=x.useState(!!f),[H,ae]=x.useState(h||""),[F,de]=x.useState(g||""),[ye,je]=x.useState(j),[re,M]=x.useState(m),Y=X!==s||Number(le)!==Number(c);return a.jsxs("section",{style:{background:"var(--bg-card)",border:"1px solid var(--brand)",borderRadius:"var(--r-md)",padding:"var(--sp-4)",display:"flex",flexDirection:"column",gap:"var(--sp-3)",...W},children:[a.jsxs("header",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)"},children:[a.jsx(ie,{name:"orchestration",size:16,color:"var(--brand)"}),a.jsx("span",{style:{fontSize:"var(--fs-lg)",fontWeight:"var(--fw-semibold)"},children:"Proposed mission"}),Y&&a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:"edited"})]}),o&&a.jsx("p",{style:{margin:0,fontSize:"var(--fs-sm)",color:"var(--ink-1)"},children:o}),a.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:6},children:[a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",textTransform:"uppercase",letterSpacing:"var(--ls-caps)"},children:"Brief"}),a.jsx("textarea",{value:X,onChange:I=>J(I.target.value),rows:6,style:{resize:"vertical",minHeight:"6rem",background:"var(--bg-inset)",border:"1px solid var(--line)",borderRadius:"var(--r-sm)",padding:"var(--sp-2) var(--sp-3)",color:"var(--ink-0)",font:"inherit",lineHeight:"var(--lh-prose)",outline:"none"}})]}),u.length>0&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",textTransform:"uppercase",letterSpacing:"var(--ls-caps)"},children:"Done when"}),u.map((I,ge)=>a.jsxs("div",{style:{display:"flex",gap:8,alignItems:"flex-start",fontSize:"var(--fs-sm)",color:"var(--ink-1)"},children:[a.jsx("span",{style:{color:"var(--ink-2)",fontFamily:"var(--font-mono)",flex:"0 0 auto"},children:"▢"}),a.jsx("span",{children:I})]},ge))]}),v&&(h||g)&&a.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:6,fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:[a.jsx(ie,{name:"model",size:12}),a.jsxs("span",{children:[a.jsx("span",{style:{color:"var(--ink-1)"},children:"Suggested models —"})," ",v]})]}),a.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"var(--sp-4)",flexWrap:"wrap"},children:[a.jsx(al,{layout:"stacked",label:"Budget cap",hint:"Hard stop; the run halts here.",children:a.jsx(Je,{type:"number",prefix:"$",min:0,step:1,width:96,value:le,onChange:T})}),a.jsx(al,{layout:"stacked",label:"Director",hint:"Plans, delegates, verifies.",children:a.jsx(nn,{value:H,models:w,loading:S,note:k,inheritNote:O,onChange:(I,ge)=>{ae(I),je(ge?.providerId)}})}),a.jsx(al,{layout:"stacked",label:"Workers",hint:"Implement. Cheaper models cut cost.",children:a.jsx(nn,{value:F,models:w,loading:S,note:k,inheritNote:O,onChange:(I,ge)=>{de(I),M(ge?.providerId)}})}),a.jsx(al,{label:"Browser",hint:f?"The planner judged the criteria need a browser, so it starts on.":"Headless Playwright for the agents — navigate, click, screenshot. Non-local URLs still ask you.",children:a.jsx(Rt,{checked:U,onChange:L,label:U?"on":"off"})})]}),Z&&a.jsx(ln,{tone:"error",inline:!0,children:Z}),a.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"var(--sp-2)"},children:[a.jsx(he,{variant:"ghost",onClick:R,disabled:Q,children:"Not this one"}),a.jsx(he,{variant:"primary",icon:"orchestration",disabled:Q||!X.trim(),title:"Starts the mission: a director plans it and workers do the work",onClick:()=>_?.({mission:X.trim(),budget:Number(le)||c,directorModel:H,workerModel:F,directorProviderId:ye,workerProviderId:re,browserTools:U}),children:Q?"Starting…":"Start mission"})]})]})}function _n({tabs:s,value:u,onChange:c,size:o="md",style:f}){return a.jsx("div",{role:"tablist",style:{display:"inline-flex",gap:2,padding:2,background:"var(--bg-inset)",border:"1px solid var(--line)",borderRadius:"var(--r-sm)",...f},children:s.map(h=>a.jsx(n1,{tab:h,selected:h.value===u,size:o,onSelect:()=>c?.(h.value)},h.value))})}function n1({tab:s,selected:u,size:c,onSelect:o}){const[f,h]=x.useState(!1);return a.jsxs("button",{type:"button",role:"tab","aria-selected":u,onClick:o,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),style:{display:"inline-flex",alignItems:"center",gap:6,padding:c==="sm"?"3px 8px":"5px 10px",borderRadius:4,border:"none",cursor:"pointer",fontSize:c==="sm"?"var(--fs-xs)":"var(--fs-sm)",fontWeight:u?"var(--fw-semibold)":"var(--fw-regular)",background:u?"var(--bg-card)":f?"var(--bg-hover)":"transparent",color:u?"var(--ink-0)":"var(--ink-1)",whiteSpace:"nowrap",boxShadow:u?"inset 0 0 0 1px var(--line-strong)":"none",transition:"background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease)"},children:[s.icon&&a.jsx(ie,{name:s.icon,size:c==="sm"?12:14}),s.label,s.count>0&&a.jsx("span",{style:{fontSize:"var(--fs-xs)",padding:"0 5px",borderRadius:"var(--r-pill)",lineHeight:"16px",background:s.attention?"var(--status-warning)":"var(--line-strong)",color:s.attention?"var(--brand-ink)":"var(--ink-0)",fontWeight:"var(--fw-semibold)"},children:s.count})]})}const l1=[{value:"next",label:"Next turn",icon:"nextTurn"},{value:"now",label:"Now",icon:"now"}];function a1({agents:s=[],to:u,onTo:c,value:o,onChange:f,timing:h,onTiming:g,onSend:j,disabled:m,disabledReason:v,style:w}){const[S,k]=x.useState(""),[O,Q]=x.useState("director"),[Z,_]=x.useState("next"),[R,W]=x.useState(!1),[X,J]=x.useState(!1),le=x.useRef(null),T=x.useRef(null),U=o??S,L=f??k,H=u??O,ae=c??Q,F=h??Z,de=g??_,ye=s.filter(M=>M.status==="running"||M.id==="director"),je=!m&&U.trim().length>0;x.useEffect(()=>{const M=le.current;M&&(M.style.height="auto",M.style.height=Math.min(M.scrollHeight,132)+"px")},[U]),x.useEffect(()=>{if(!R)return;const M=Y=>{T.current&&!T.current.contains(Y.target)&&W(!1)};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[R]);const re=()=>{je&&(j?.(U.trim(),{to:H,timing:F}),L(""))};return a.jsxs("div",{ref:T,style:{position:"relative",flex:"0 0 auto",background:"var(--bg-card)",border:`1px solid ${X?"var(--brand)":"var(--line-strong)"}`,borderRadius:"var(--r-md)",padding:"var(--sp-2) var(--sp-3)",display:"flex",flexDirection:"column",gap:"var(--sp-2)",opacity:m?.6:1,transition:"border-color var(--dur-fast) var(--ease)",...w},children:[a.jsxs("div",{style:{display:"flex",gap:"var(--sp-2)",alignItems:"flex-start"},children:[a.jsx(ie,{name:"steer",size:15,color:"var(--brand)",style:{marginTop:3,flex:"0 0 auto"}}),a.jsx("textarea",{ref:le,rows:1,value:U,disabled:m,placeholder:m?v||"Nothing is running.":`Steer ${H}… a constraint, a correction, a hint. Not a question reply.`,onChange:M=>L(M.target.value),onFocus:()=>J(!0),onBlur:()=>J(!1),onKeyDown:M=>{(M.metaKey||M.ctrlKey)&&M.key==="Enter"&&(M.preventDefault(),re())},style:{flex:1,minWidth:0,resize:"none",border:"none",outline:"none",background:"transparent",color:"var(--ink-0)",font:"inherit",lineHeight:"var(--lh)",padding:"2px 0",maxHeight:132}})]}),a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",flexWrap:"wrap"},children:[a.jsx(i1,{agent:H,open:R,onClick:()=>!m&&W(M=>!M),disabled:m}),a.jsx(_n,{size:"sm",tabs:l1,value:F,onChange:de}),a.jsx("span",{style:{marginLeft:"auto",fontSize:"var(--fs-xs)",color:"var(--ink-2)",whiteSpace:"nowrap"},children:F==="now"?"Interrupts the current tool call":"Delivered before the next tool call"}),a.jsx(he,{size:"sm",icon:"send",onClick:re,disabled:!je,title:"⌘↵",children:"Send"})]}),R&&a.jsx("div",{role:"listbox",style:{position:"absolute",left:"var(--sp-3)",bottom:"calc(100% - 4px)",zIndex:10,minWidth:220,background:"var(--bg-panel)",border:"1px solid var(--line-strong)",borderRadius:"var(--r-sm)",boxShadow:"var(--shadow-pop, 0 8px 24px rgba(0,0,0,.35))",padding:4},children:ye.map(M=>a.jsx(s1,{agent:M,selected:M.id===H,onSelect:()=>{ae(M.id),W(!1),le.current?.focus()}},M.id))})]})}function i1({agent:s,open:u,onClick:c,disabled:o}){const[f,h]=x.useState(!1);return a.jsxs("button",{type:"button",onClick:c,disabled:o,"aria-haspopup":"listbox","aria-expanded":u,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),style:{display:"inline-flex",alignItems:"center",gap:6,padding:"3px 8px 3px 6px",borderRadius:"var(--r-pill)",border:"1px solid var(--line)",cursor:o?"default":"pointer",background:u||f?"var(--bg-hover)":"var(--bg-inset)",color:"var(--ink-0)",font:"inherit",fontSize:"var(--fs-xs)"},children:[a.jsx("span",{style:{color:"var(--ink-2)"},children:"to"}),a.jsx(an,{agent:s,size:"sm"}),a.jsx("span",{style:{fontFamily:"var(--font-mono)"},children:s}),a.jsx(ie,{name:"chevronDown",size:12,color:"var(--ink-2)"})]})}function s1({agent:s,selected:u,onSelect:c}){const[o,f]=x.useState(!1);return a.jsxs("button",{type:"button",role:"option","aria-selected":u,onClick:c,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),style:{display:"flex",alignItems:"center",gap:8,width:"100%",textAlign:"left",padding:"6px 8px",borderRadius:4,border:"none",cursor:"pointer",font:"inherit",background:o?"var(--bg-hover)":"transparent",color:"var(--ink-0)"},children:[a.jsx("span",{style:{width:12,display:"inline-flex",color:"var(--brand)"},children:u&&a.jsx(ie,{name:"check",size:12,strokeWidth:2.5})}),a.jsx(an,{agent:s.id,size:"sm"}),a.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-sm)"},children:s.id}),s.task&&a.jsx("span",{style:{marginLeft:"auto",fontSize:"var(--fs-xs)",color:"var(--ink-2)",maxWidth:140,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.task})]})}function r1({agents:s=[],filter:u,onFilter:c,style:o}){return a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap",...o},children:[a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,fontSize:"var(--fs-xs)",color:"var(--ink-2)",marginRight:2},children:[a.jsx(ie,{name:"crew",size:12}),"Crew"]}),s.map(f=>{const h=u===f.id;return a.jsxs("button",{type:"button",onClick:()=>c?.(f.id),title:f.task||f.id,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"2px 8px 2px 6px",borderRadius:"var(--r-pill)",background:h?"var(--bg-card)":"var(--bg-inset)",border:`1px solid ${h?"var(--line-strong)":"var(--line)"}`,color:h?"var(--ink-0)":"var(--ink-1)",fontSize:"var(--fs-xs)",cursor:"pointer",font:"inherit",lineHeight:"16px"},children:[a.jsx(an,{agent:f.id,size:"sm"}),f.id,a.jsx(ie,{name:f.status||"running",size:11,strokeWidth:2.25,color:f.status==="error"?"var(--status-critical)":f.status==="interrupted"?"var(--status-serious)":f.status==="idle"?"var(--ink-2)":"var(--status-good)"})]},f.id)})]})}function o1({mission:s,title:u,createdAt:c,costUsd:o=0,costBasis:f="priced",usage:h,status:g="done",selected:j,current:m,onSelect:v,style:w}){const[S,k]=x.useState(!1),O=Number(o)||0,Q=h?(h.inputTokens||0)+(h.outputTokens||0)+(h.cacheReadTokens||0)+(h.cacheWriteTokens||0):0,Z=f==="priced"?`$${O.toFixed(2)}`:f==="unpriced"&&Q>0?`${Tl(Q)} tok`:null,_=c?new Date(c).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):null;return a.jsxs("div",{role:"button",title:s,onClick:v,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),style:{padding:"6px 10px",borderRadius:"var(--r-sm)",cursor:v?"pointer":"default",background:j?"var(--bg-card)":S&&v?"var(--bg-hover)":"transparent",border:j?"1px solid var(--line-strong)":"1px solid transparent",marginBottom:2,transition:"background var(--dur-fast) var(--ease)",...w},children:[a.jsx("div",{style:{fontSize:"var(--fs-sm)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",color:"var(--ink-0)",fontWeight:m?"var(--fw-semibold)":"var(--fw-regular)"},children:u||s}),a.jsxs("div",{style:{display:"flex",gap:"var(--sp-2)",alignItems:"center",marginTop:2,fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontVariantNumeric:"tabular-nums"},children:[_&&a.jsx("span",{children:_}),Z&&a.jsx("span",{title:f==="unpriced"?"This provider publishes no prices; tokens are what is known.":void 0,children:Z}),a.jsx(ba,{status:g})]})]})}function u1({agent:s,title:u,toolName:c,decisionReason:o,input:f,escapedPath:h,onAllow:g,onAlways:j,onDeny:m,style:v}){const w=c||(u||"").replace(/^Wants to use\s+/i,"")||"tool",S=h?{label:"Allow this path (run)",hint:`Allow ${h} for the rest of the run; other paths outside the folder will still ask`}:{label:"Always (run)",hint:"Allow this tool for the rest of the run"};return a.jsxs(Nu,{accent:"var(--brand)",style:{marginBottom:"var(--sp-2)",...v},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontWeight:"var(--fw-semibold)",color:"var(--brand)",fontSize:"var(--fs-sm)"},children:[a.jsx(ie,{name:"approval",size:14,strokeWidth:2}),a.jsxs("span",{children:[s," wants to use ",w]})]}),o&&a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5,color:"var(--status-serious)",fontSize:"var(--fs-xs)",marginTop:4},children:[a.jsx(ie,{name:"caution",size:12,strokeWidth:2}),o]}),a.jsx(Op,{tool:w,input:typeof f=="string"?void 0:f,body:typeof f=="string"?f:void 0,defaultOpen:!0,style:{margin:"var(--sp-2) 0"}}),a.jsxs("div",{style:{display:"flex",gap:"var(--sp-2)",flexWrap:"wrap",justifyContent:"flex-end"},children:[a.jsx(he,{variant:"good",onClick:g,children:"Allow"}),a.jsx(he,{variant:"good",onClick:j,title:S.hint,children:S.label}),a.jsx(he,{variant:"danger",onClick:m,children:"Deny"})]})]})}const c1=x.forwardRef(function({value:u,onChange:c,placeholder:o,size:f="mission",bare:h,onKeyDown:g,onPaste:j,onFocus:m,onBlur:v,style:w},S){const k=f==="mission";return a.jsx("textarea",{ref:S,value:u,placeholder:o,onKeyDown:g,onPaste:j,onFocus:m,onBlur:v,onChange:O=>c?.(O.target.value),style:{width:"100%",boxSizing:"border-box",display:"block",minHeight:k?180:void 0,height:k?void 0:56,resize:"vertical",background:h?"transparent":k?"var(--bg-card)":"var(--bg-inset)",border:h?"none":"1px solid var(--line-strong)",outline:h?"none":void 0,borderRadius:h?0:k?"var(--r-md)":"var(--r-sm)",padding:k?"var(--sp-3)":"var(--sp-2)",color:"var(--ink-0)",lineHeight:k?"var(--lh-prose)":"var(--lh)",...w}})});function d1({question:s,options:u=[],value:c,onChange:o,onAnswer:f,style:h}){const[g,j]=x.useState(""),m=c??g,v=o??j;return a.jsxs(Nu,{accent:"var(--brand)",style:{marginBottom:"var(--sp-2)",...h},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontWeight:"var(--fw-semibold)",color:"var(--brand)",fontSize:"var(--fs-sm)",marginBottom:4},children:[a.jsx(ie,{name:"question",size:14,strokeWidth:2}),"Director asks:"]}),a.jsx("div",{style:{whiteSpace:"pre-wrap",fontSize:"var(--fs-md)"},children:s}),u.length>0&&a.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,margin:"var(--sp-2) 0 0"},children:u.map((w,S)=>a.jsxs("button",{type:"button",onClick:()=>f?.(w),title:S===0?"Recommended":void 0,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 10px",borderRadius:"var(--r-sm)",cursor:"pointer",font:"inherit",fontSize:"var(--fs-sm)",background:"var(--bg-inset)",border:"1px solid var(--line-strong)",color:"var(--ink-0)"},children:[a.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:S+1}),w,S===0&&a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:"· recommended"})]},w))}),a.jsx("div",{style:{margin:"var(--sp-2) 0"},children:a.jsx(c1,{size:"answer",value:m,onChange:v})}),a.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:a.jsx(he,{variant:"primary",onClick:()=>f?.(m),disabled:!String(m).trim(),children:"Answer"})})]})}function f1(s,u){if(!s)return"";const c=Math.max(0,Math.round((u-s)/1e3));return c<60?`${c}s`:c<3600?`${Math.floor(c/60)}m`:`${Math.floor(c/3600)}h ${Math.floor(c%3600/60)}m`}function ap({since:s,now:u}){const c=f1(s,u);return c?a.jsxs("div",{style:{fontSize:"var(--fs-xs)",color:"var(--status-warning)",fontWeight:"var(--fw-semibold)",marginBottom:4},children:["waiting ",c]}):null}function h1({approvals:s=[],questions:u=[],now:c=Date.now(),running:o=!1,activity:f,onAllow:h,onAlways:g,onDeny:j,onAnswer:m,style:v}){const w=s.length+u.length;if(w===0&&!o||w===0&&!f)return null;const S={flex:"0 0 auto",padding:"var(--sp-2) var(--sp-3)",borderBottom:"1px solid var(--line)",...v};return w===0?a.jsxs("div",{role:"status",style:{...S,display:"flex",alignItems:"center",gap:"var(--sp-2)",background:"var(--bg-panel)",fontSize:"var(--fs-sm)",minWidth:0},children:[a.jsx(ie,{name:"running",size:14,color:"var(--status-good)",strokeWidth:2}),f.agent&&a.jsx(an,{agent:f.agent,size:"sm"}),a.jsx("span",{style:{color:"var(--ink-0)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},title:f.line,children:f.line}),f.crew&&a.jsx("span",{style:{marginLeft:"auto",flex:"0 0 auto",fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:f.crew})]}):a.jsxs("div",{role:"region","aria-label":"Needs you",style:{...S,background:"var(--brand-wash-strong)",borderTop:"2px solid var(--status-warning)",display:"flex",flexDirection:"column",gap:"var(--sp-2)",maxHeight:"55vh",overflowY:"auto"},children:[a.jsxs("div",{className:"pulse",style:{display:"flex",alignItems:"center",gap:6,fontSize:"var(--fs-xs)",color:"var(--status-warning)",fontWeight:"var(--fw-semibold)",textTransform:"uppercase",letterSpacing:"var(--ls-caps)"},children:[a.jsx(ie,{name:"needsYou",size:13,strokeWidth:2.25}),"Needs you — ",[s.length?`${s.length} approval${s.length===1?"":"s"}`:null,u.length?`${u.length} question${u.length===1?"":"s"}`:null].filter(Boolean).join(", ")]}),s.map(k=>a.jsxs("div",{children:[a.jsx(ap,{since:k.since,now:c}),a.jsx(u1,{agent:k.agent,title:k.title,toolName:k.toolName,decisionReason:k.decisionReason,input:k.input,escapedPath:k.escapedPath,onAllow:()=>h?.(k.id),onAlways:()=>g?.(k.id),onDeny:()=>j?.(k.id)})]},k.id)),u.map(k=>a.jsxs("div",{children:[a.jsx(ap,{since:k.since,now:c}),a.jsx(d1,{question:k.question,options:k.options,onAnswer:O=>m?.(k.id,O)})]},k.id))]})}function qp(s){if(!s)return null;const u=String(s).split(`
62
+ `),c=u.findIndex(f=>/^#{1,6}\s*DONE\s*WHEN/i.test(f.trim()));if(c===-1)return null;const o=[];for(const f of u.slice(c+1)){if(/^#{1,6}\s/.test(f))break;const h=f.match(/^\s*[-*]\s*\[( |x|X)\]\s*(.*)$/);if(!h)continue;const g=h[2].trim().replace(/\*\*(.+?)\*\*/g,"$1").replace(/`([^`]*)`/g,"$1");o.push({text:g,done:h[1]!==" "})}return o.length?o:null}function p1(s){return s?`Done when · ${s.filter(u=>u.done).length} / ${s.length}`:"Done when"}function v1({doc:s,style:u}){const c=qp(s),o=c?c.filter(f=>f.done).length:0;return a.jsxs("section",{style:u,children:[a.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:"var(--sp-2)",marginBottom:"var(--sp-2)",fontSize:"var(--fs-xs)",fontWeight:"var(--fw-semibold)",textTransform:"uppercase",letterSpacing:"var(--ls-caps)",color:"var(--ink-2)"},children:[a.jsx("span",{children:"Done when"}),c&&a.jsxs("span",{style:{fontVariantNumeric:"tabular-nums",textTransform:"none",letterSpacing:0,color:o===c.length?"var(--status-good)":"var(--ink-1)"},children:[o," / ",c.length]})]}),!s&&a.jsx(ft,{children:"MISSION.md not written yet."}),s&&!c&&a.jsx(ft,{children:"No DONE WHEN section in the mission doc."}),c&&c.map((f,h)=>a.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"var(--sp-2)",padding:"3px 0",fontSize:"var(--fs-sm)",lineHeight:"var(--lh)",color:f.done?"var(--ink-2)":"var(--ink-0)"},children:[a.jsx(ie,{name:f.done?"done":"idle",size:14,strokeWidth:2,color:f.done?"var(--status-good)":"var(--ink-2)",style:{marginTop:2}}),a.jsx("span",{style:{textDecoration:f.done?"line-through":"none"},children:f.text})]},h))]})}function g1({text:s,truncated:u,style:c}){const o=String(s||"").split(`
63
+ `);return a.jsxs("div",{style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-xs)",lineHeight:"var(--lh)",background:"var(--bg-inset)",overflowX:"auto",...c},children:[o.map((f,h)=>{const g=f.startsWith("@@")||f.startsWith("diff ")||f.startsWith("index ")||f.startsWith("--- ")||f.startsWith("+++ "),j=!g&&f.startsWith("+"),m=!g&&f.startsWith("-");return a.jsx("div",{style:{padding:"0 var(--sp-2)",whiteSpace:"pre",background:j?"var(--diff-add-bg)":m?"var(--diff-del-bg)":"transparent",color:g?"var(--ink-2)":"var(--ink-0)"},children:f||" "},h)}),u&&a.jsx("div",{style:{padding:"2px var(--sp-2)",color:"var(--ink-2)",fontFamily:"var(--font-ui)"},children:"first 400 lines — the rest is in your working tree"})]})}const wu=512*1024;function m1({artifact:s,url:u,previewUrl:c,onClose:o,index:f,count:h,onStep:g}){const j=/\.html?$/i.test(s?.path??""),[m,v]=x.useState("rendered"),w=typeof g=="function"&&typeof h=="number"&&h>1,S=w&&f>0?()=>g(f-1):null,k=w&&f<h-1?()=>g(f+1):null,[O,Q]=x.useState(null),[Z,_]=x.useState(null),R=s?.kind,W=R==="diff",X=s?.path?.split("/").pop()??"",J=/\.md$/i.test(X);if(x.useEffect(()=>{const L=H=>{H.key==="Escape"?o():H.key==="ArrowLeft"&&S?(H.preventDefault(),S()):H.key==="ArrowRight"&&k&&(H.preventDefault(),k())};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[o,S,k]),x.useEffect(()=>{if(Q(null),_(null),R!=="text"||!u)return;let L=!0;return fetch(u).then(async H=>{if(!H.ok)throw new Error(`HTTP ${H.status}`);const ae=await H.text();L&&Q(ae.length>wu?`${ae.slice(0,wu)}
64
+
65
+ [… ${ae.length-wu} more characters — open in a new tab for the whole file]`:ae)}).catch(H=>{L&&_(String(H.message||H))}),()=>{L=!1}},[u,R]),!s)return null;const le=typeof s.size!="number"?null:s.size>=1024*1024?`${(s.size/1024/1024).toFixed(1)} MB`:s.size>=1024?`${(s.size/1024).toFixed(1)} KB`:`${s.size} B`;let T;return W&&s.binary&&u&&/\.(png|jpe?g|webp|gif|svg)$/i.test(X)?T=a.jsx("img",{src:u,alt:s.path,style:{maxWidth:"100%",maxHeight:"100%",objectFit:"contain",display:"block",margin:"auto",background:"var(--bg-inset)"}}):W?T=s.binary?a.jsx("div",{style:{margin:"auto",color:"var(--ink-2)"},children:"Binary file — no diff to show."}):s.diff?a.jsx(g1,{text:s.diff,truncated:s.truncated,style:{minHeight:"100%"}}):a.jsx("div",{style:{margin:"auto",color:"var(--ink-2)"},children:"No diff recorded for this file."}):j&&c&&m==="rendered"?T=a.jsx("iframe",{title:s.path,src:c,sandbox:"allow-scripts",style:{width:"100%",height:"100%",border:"none",background:"#fff"}}):R==="image"?T=a.jsx("img",{src:u,alt:s.path,style:{maxWidth:"100%",maxHeight:"100%",objectFit:"contain",display:"block",margin:"auto",background:"var(--bg-inset)"}}):R==="pdf"?T=a.jsx("iframe",{title:s.path,src:u,style:{width:"100%",height:"100%",border:"none",background:"var(--bg-inset)"}}):R==="text"?T=Z?a.jsxs("div",{style:{padding:"var(--sp-3)",color:"var(--status-critical)"},children:["Could not load it: ",Z]}):O===null?a.jsx("div",{style:{padding:"var(--sp-3)",color:"var(--ink-2)"},children:"Loading…"}):J?a.jsx("div",{style:{padding:"var(--sp-3) var(--sp-4)",maxWidth:"72ch",margin:"0 auto"},children:a.jsx(Uu,{text:O,slots:!1})}):a.jsx("pre",{style:{margin:0,padding:"var(--sp-3) var(--sp-4)",fontFamily:"var(--font-mono)",fontSize:"var(--fs-sm)",lineHeight:1.5,whiteSpace:"pre-wrap",wordBreak:"break-word",color:"var(--ink-0)",tabSize:2},children:O}):T=a.jsxs("div",{style:{margin:"auto",textAlign:"center",color:"var(--ink-2)",display:"flex",flexDirection:"column",gap:"var(--sp-2)",alignItems:"center"},children:[a.jsx(ie,{name:"file",size:28,color:"var(--ink-3)"}),a.jsx("span",{children:"No preview for this kind of file."}),a.jsxs("a",{href:u,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--brand)"},children:["Download ",X]})]}),a.jsx("div",{role:"dialog","aria-modal":"true","aria-label":s.path,onClick:o,style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.55)",display:"flex",alignItems:"center",justifyContent:"center",padding:"var(--sp-4)"},children:a.jsxs("div",{onClick:L=>L.stopPropagation(),style:{width:"min(1200px, 100%)",height:"min(900px, 100%)",display:"flex",flexDirection:"column",background:"var(--bg-card)",border:"1px solid var(--line-strong)",borderRadius:"var(--r-md)",boxShadow:"0 24px 64px rgba(0,0,0,0.35)",overflow:"hidden"},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"6px var(--sp-2) 6px var(--sp-3)",borderBottom:"1px solid var(--line)",background:"var(--bg-panel)",flex:"0 0 auto",minWidth:0},children:[a.jsx(ie,{name:R==="image"?"Image":R==="text"?"transcript":"file",size:14,color:"var(--ink-2)"}),W&&s.status&&a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",flex:"0 0 auto"},children:s.status}),a.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-sm)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1},title:s.path,children:s.path}),W?a.jsxs("span",{style:{fontSize:"var(--fs-xs)",fontFamily:"var(--font-mono)",fontVariantNumeric:"tabular-nums",flex:"0 0 auto"},children:[a.jsxs("span",{style:{color:"var(--status-good)"},children:["+",s.additions??0]})," ",a.jsxs("span",{style:{color:"var(--status-critical)"},children:["−",s.deletions??0]})]}):le&&a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontVariantNumeric:"tabular-nums",flex:"0 0 auto"},children:le}),j&&c&&a.jsx(_n,{size:"sm",value:m,onChange:v,tabs:[{value:"rendered",label:"Rendered"},{value:"source",label:"Source"}]}),w&&a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:2,flex:"0 0 auto",marginLeft:"var(--sp-1)"},children:[a.jsx(xa,{icon:"chevronLeft",label:"Previous (←)",onClick:S??void 0,disabled:!S,size:"sm"}),a.jsxs("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontVariantNumeric:"tabular-nums",minWidth:"4.5ch",textAlign:"center"},children:[f+1," / ",h]}),a.jsx(xa,{icon:"chevronRight",label:"Next (→)",onClick:k??void 0,disabled:!k,size:"sm"})]}),u&&!W&&a.jsx("a",{href:u,target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"none",flex:"0 0 auto"},children:a.jsx(he,{variant:"ghost",size:"sm",children:"Open in a new tab"})}),a.jsx(xa,{icon:"close",label:"Close (Esc)",onClick:o,size:"sm"})]}),a.jsx("div",{style:{flex:1,minHeight:0,overflow:"auto",display:"flex",flexDirection:"column",background:R==="image"?"var(--bg-inset)":"var(--bg-card)"},children:T})]})})}const y1={added:"added",modified:"modified",deleted:"deleted",renamed:"renamed"},ip={added:"var(--status-good)",deleted:"var(--status-critical)",modified:"var(--ink-1)",renamed:"var(--ink-1)"};function zu(s){return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(s<10*1024?1:0)} KB`:`${(s/1024/1024).toFixed(1)} MB`}function sp(s,u){const c=Math.max(0,Math.round((u-s)/1e3));return c<60?`${c}s ago`:c<3600?`${Math.floor(c/60)}m ago`:c<86400?`${Math.floor(c/3600)}h ago`:`${Math.floor(c/86400)}d ago`}function x1(s,u){return`/runs/${encodeURIComponent(s)}/preview/${u.split("/").map(encodeURIComponent).join("/")}`}function rp(s,u){return`/runs/${encodeURIComponent(s)}/artifact?path=${encodeURIComponent(u)}`}function op({path:s,muted:u,strike:c}){const o=s.lastIndexOf("/"),f=o>=0?s.slice(0,o+1):"",h=o>=0?s.slice(o+1):s;return a.jsxs("span",{title:s,style:{fontFamily:"var(--font-mono)",display:"flex",minWidth:0,flex:1,color:u?"var(--ink-2)":"var(--ink-0)",textDecoration:c?"line-through":"none"},children:[f&&a.jsx("span",{style:{color:"var(--ink-2)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:"0 1 auto"},children:f}),a.jsx("span",{style:{whiteSpace:"nowrap",flex:"0 0 auto"},children:h})]})}const Lp={display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"4px 6px",width:"100%",fontSize:"var(--fs-sm)",color:"inherit",minWidth:0,background:"none",border:"none",borderRadius:"var(--r-sm)",cursor:"pointer",font:"inherit",textAlign:"left"};function up({onClick:s,title:u,children:c}){const[o,f]=x.useState(!1);return a.jsx("button",{type:"button",onClick:s,title:u,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),style:{...Lp,background:o?"var(--bg-hover)":"none"},children:c})}function b1({runId:s,deck:u,loading:c,error:o,missing:f,services:h=[],style:g}){const j=Date.now(),[m,v]=x.useState(null),w={display:"flex",flexDirection:"column",gap:"var(--sp-3)",...g};if(o)return a.jsx("div",{style:w,children:a.jsxs(ft,{children:["Could not read the working tree: ",o]})});if(f||!u&&!c)return a.jsx("div",{style:w,children:a.jsx(ft,{children:"No file record for this run — the server has no baseline for it."})});if(!u)return a.jsx("div",{style:w,children:a.jsx(ft,{children:"Reading the working tree…"})});const{files:S,artifacts:k,totals:O}=u,Q=k.filter(T=>T.kind==="image"),Z=k.filter(T=>T.kind!=="image"),_=[...S.map(T=>({...T,kind:"diff"})),...Q,...Z],R=T=>v(T),W=T=>v(S.length+T),X=T=>v(S.length+Q.length+T),J=m===null?null:_[m]??null,le=u.baseline.kind==="git"&&u.baseline.head?`against ${String(u.baseline.head).slice(0,8)}`:u.baseline.kind==="snapshot"?"against a snapshot at run start":"no baseline";return a.jsxs("div",{style:w,children:[a.jsxs("div",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontVariantNumeric:"tabular-nums",lineHeight:"var(--lh)"},children:[a.jsxs("span",{style:{color:"var(--ink-0)"},children:[O.files," changed · ",a.jsxs("span",{style:{color:"var(--status-good)"},children:["+",O.additions]})," ",a.jsxs("span",{style:{color:"var(--status-critical)"},children:["−",O.deletions]})," · ",k.length," artifact",k.length===1?"":"s"]})," ",a.jsx("span",{children:le}),u.note&&a.jsx("div",{style:{color:"var(--status-serious)"},children:u.note})]}),h.length>0&&a.jsxs("section",{children:[a.jsx(tn,{children:"Services"}),a.jsx("div",{style:{display:"flex",flexDirection:"column"},children:h.map(T=>a.jsxs("a",{href:T.path,target:"_blank",rel:"noopener noreferrer",title:`${T.label} — 127.0.0.1:${T.port} through Foreman`,style:{...Lp,textDecoration:"none"},children:[a.jsx(ie,{name:"provider",size:12,color:"var(--status-good)"}),a.jsx("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"var(--ink-0)"},children:T.label}),a.jsxs("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontFamily:"var(--font-mono)",flex:"0 0 auto"},children:[":",T.port]})]},T.port))})]}),a.jsxs("section",{children:[a.jsx(tn,{children:"Changed files"}),S.length===0&&a.jsx(ft,{children:"Nothing changed in the folder yet."}),a.jsx("div",{style:{display:"flex",flexDirection:"column"},children:S.map((T,U)=>a.jsxs(up,{onClick:()=>R(U),title:T.binary?`${T.path} — binary, no diff`:T.preexisting?`${T.path} — also dirty before the run`:`${T.path} — open the diff`,children:[a.jsx(ie,{name:"file",size:12,color:"var(--ink-2)"}),a.jsx(op,{path:T.path,muted:T.status==="deleted",strike:T.status==="deleted"}),a.jsx("span",{style:{fontSize:"var(--fs-xs)",padding:"0 5px",borderRadius:"var(--r-pill)",lineHeight:"15px",border:`1px solid ${ip[T.status]||"var(--line-strong)"}`,color:ip[T.status]||"var(--ink-1)",flex:"0 0 auto"},children:T.binary?"binary":y1[T.status]||T.status}),a.jsxs("span",{style:{fontVariantNumeric:"tabular-nums",fontSize:"var(--fs-xs)",fontFamily:"var(--font-mono)",flex:"0 0 auto"},children:[a.jsxs("span",{style:{color:"var(--status-good)"},children:["+",T.additions]})," ",a.jsxs("span",{style:{color:"var(--status-critical)"},children:["−",T.deletions]})]})]},`${T.status}:${T.path}`))})]}),a.jsxs("section",{children:[a.jsx(tn,{children:"Artifacts"}),k.length===0&&a.jsx(ft,{children:"No screenshots or work files yet."}),Q.length>0&&a.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(88px, 1fr))",gap:6,marginBottom:Z.length?"var(--sp-2)":0},children:Q.map((T,U)=>a.jsxs("button",{type:"button",onClick:()=>W(U),title:`${T.path} · ${zu(T.size)} · ${sp(T.mtimeMs,j)}`,style:{display:"block",padding:0,width:"100%",cursor:"pointer",font:"inherit",border:"1px solid var(--line)",borderRadius:"var(--r-sm)",overflow:"hidden",background:"var(--bg-inset)",color:"inherit",textAlign:"left"},children:[a.jsx("img",{src:rp(s,T.path),alt:T.path,loading:"lazy",style:{display:"block",width:"100%",aspectRatio:"4 / 3",objectFit:"cover"}}),a.jsx("div",{style:{padding:"2px 5px",fontSize:"var(--fs-xs)",fontFamily:"var(--font-mono)",color:"var(--ink-1)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:T.path.split("/").pop()})]},T.path))}),a.jsx("div",{style:{display:"flex",flexDirection:"column"},children:Z.map((T,U)=>a.jsxs(up,{onClick:()=>X(U),title:`${T.path} · ${zu(T.size)} · ${sp(T.mtimeMs,j)}`,children:[a.jsx(ie,{name:T.kind==="text"?"transcript":"file",size:12,color:"var(--ink-2)"}),a.jsx(op,{path:T.path}),a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontVariantNumeric:"tabular-nums",flex:"0 0 auto"},children:zu(T.size)})]},T.path))})]}),J&&a.jsx(m1,{artifact:J,url:J.kind==="diff"&&!J.binary?void 0:rp(s,J.path),previewUrl:J.kind==="diff"?void 0:x1(s,J.path),onClose:()=>v(null),index:m,count:_.length,onStep:v})]})}function S1({effective:s={},overrides:u=[],onOpen:c,style:o}){const f=new Set(u),h=m=>typeof m=="number"?`${m}%`:"—",g=m=>typeof m=="number"?`$${m}`:"—",j=[["director",s.directorModel||"default","directorModel"],["workers",s.workerModel||"default","workerModel"],["planner",s.plannerModel||"sonnet","plannerModel"],["cap per run",g(s.budgetCap),"budgetCap"],["warn at",h(s.budgetWarnAt),"budgetWarnAt"],["at the cap",s.budgetHardStop===!1?"pause and ask":"hard stop","budgetHardStop"],["read-only tools",s.autoAllowReadOnly===!1?"ask":"auto-allow","autoAllowReadOnly"]];return a.jsxs("section",{style:{minWidth:0,...o},children:[a.jsx(tn,{children:"Settings"}),a.jsx("div",{style:{display:"grid",gridTemplateColumns:"auto 1fr auto",columnGap:10,rowGap:2,fontSize:"var(--fs-xs)",alignItems:"baseline"},children:j.map(([m,v,w])=>a.jsxs(Cn.Fragment,{children:[a.jsx("span",{style:{color:"var(--ink-2)"},children:m}),a.jsx("span",{style:{fontFamily:"var(--font-mono)",color:"var(--ink-1)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},title:String(v),children:v}),a.jsx("span",{style:{color:"var(--brand)",fontSize:"var(--fs-xs)"},title:f.has(w)?"Set on this project; the rest inherit Global":void 0,children:f.has(w)?"override":""})]},w))}),c&&a.jsx(he,{variant:"ghost",size:"sm",icon:"settings",onClick:c,style:{marginTop:6},title:"Open this project's settings",children:"Change…"})]})}const j1=[{value:"default",label:"Server default"},{value:"claude-code",label:"Claude Code",icon:"model"},{value:"anthropic-api",label:"Anthropic API",icon:"budget"},{value:"codex",label:"Codex",icon:"Bash"},{value:"openai-compatible",label:"Custom endpoint",icon:"WebFetch"}];function k1(s){const u=`pr-${Math.random().toString(16).slice(2,10)}`;switch(s){case"claude-code":return{kind:s};case"anthropic-api":return{kind:s,id:u,apiKeyEnv:""};case"codex":return{kind:s,id:u};case"openai-compatible":return{kind:s,id:u,baseUrl:""};default:return null}}function cp(){return a.jsx("div",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",marginTop:4},children:"Names an environment variable on the server. A stored key below takes precedence; leave both empty and this endpoint needs no credential."})}function dp({providerId:s,hasKey:u,busy:c,error:o,onStore:f,onClear:h}){const[g,j]=x.useState(""),[m,v]=x.useState(!1);return!f||!s?null:a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",flexWrap:"wrap"},children:[a.jsx("span",{style:{fontSize:"var(--fs-sm)",color:"var(--ink-1)"},children:u?"A key is stored for this provider.":"No key stored."}),u&&a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:"It cannot be shown — only replaced or removed."}),a.jsxs("span",{style:{marginLeft:"auto",display:"inline-flex",gap:"var(--sp-2)"},children:[a.jsx(he,{size:"sm",variant:"ghost",onClick:()=>v(w=>!w),children:m?"Cancel":u?"Replace":"Add a key"}),u&&a.jsx(he,{size:"sm",variant:"danger",disabled:c,onClick:()=>h?.(s),children:"Remove"})]})]}),m&&a.jsxs("div",{style:{display:"flex",gap:"var(--sp-2)",alignItems:"center"},children:[a.jsx(Je,{mono:!0,type:"password",placeholder:"paste the key",value:g,onChange:j,autoFocus:!0,onKeyDown:w=>{w.key==="Enter"&&g.trim()&&(f(s,g.trim()),j(""),v(!1))}}),a.jsx(he,{size:"sm",variant:"good",disabled:c||!g.trim(),onClick:()=>{f(s,g.trim()),j(""),v(!1)},children:c?"Saving…":"Save key"})]}),o&&a.jsx(ln,{tone:"error",inline:!0,children:o})]})}function Qt({label:s,children:u}){return a.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:4},children:[a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:s}),u]})}function w1({inst:s,selected:u,onClick:c}){const[o,f]=x.useState(!1);return a.jsxs("button",{type:"button",onClick:c,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),style:{display:"flex",alignItems:"center",gap:8,textAlign:"left",width:"100%",padding:"6px 8px",borderRadius:"var(--r-sm)",cursor:"pointer",font:"inherit",background:u?"var(--brand-wash-strong)":o?"var(--bg-hover)":"transparent",border:`1px solid ${u?"var(--brand)":"var(--line)"}`},children:[a.jsx(ie,{name:"model",size:13,color:u?"var(--brand)":"var(--ink-2)"}),a.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-sm)",flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:s.configDir,children:Qs(s.configDir)}),a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:s.origin}),s.hasStoredLogin&&a.jsx("span",{title:"Has a stored login",style:{width:6,height:6,borderRadius:"var(--r-pill)",background:"var(--status-good)",flex:"0 0 auto"}})]})}function z1({value:s,onChange:u,instances:c,ollama:o,hasKey:f,keyBusy:h,keyError:g,onStoreKey:j,onClearKey:m,style:v}){const[w,S]=x.useState(!1),k=s?.kind??"default",O=_=>u({...s,..._}),Q=_=>u(k1(_)),Z=k==="openai-compatible"&&o&&s.baseUrl===o.host;return a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-3)",...v},children:[a.jsx(_n,{size:"sm",value:k,onChange:Q,tabs:j1}),k==="default"&&a.jsx("div",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:"Runs on whatever the server itself authenticates as."}),k==="claude-code"&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-2)"},children:[c?.length>0&&a.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4},children:c.map(_=>a.jsx(w1,{inst:_,selected:(s.configDir??"")===_.configDir,onClick:()=>O({configDir:_.configDir})},_.configDir))}),a.jsx(Qt,{label:"Config dir (blank inherits the server's own install)",children:a.jsx(Je,{mono:!0,placeholder:"~/.claude-work",value:s.configDir??"",onChange:_=>O({configDir:_||void 0})})}),w?a.jsx(Qt,{label:"Executable (blank uses the SDK's bundled one)",children:a.jsx(Je,{mono:!0,placeholder:"/usr/local/bin/claude",value:s.executable??"",onChange:_=>O({executable:_||void 0})})}):a.jsx("button",{type:"button",onClick:()=>S(!0),style:{alignSelf:"flex-start",background:"none",border:0,padding:0,font:"inherit",fontSize:"var(--fs-xs)",color:"var(--ink-2)",cursor:"pointer",textDecoration:"underline",textUnderlineOffset:2},children:"Pin an executable too"}),a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[a.jsx(Rt,{checked:!!s.ownLogin,onChange:_=>O({ownLogin:_||void 0})}),a.jsx("span",{style:{fontSize:"var(--fs-sm)"},children:"Own login"})]}),a.jsx("div",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:"Strips any inherited API key from this project's agents so this install's own stored subscription pays, instead of whatever the server process authenticates as."})]}),k==="anthropic-api"&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-2)"},children:[a.jsx(dp,{providerId:s.id,hasKey:f,busy:h,error:g,onStore:j,onClear:m}),a.jsx(Qt,{label:"Environment variable (optional fallback)",children:a.jsx(Je,{mono:!0,placeholder:"ANTHROPIC_API_KEY_ALPHA",value:s.apiKeyEnv??"",onChange:_=>O({apiKeyEnv:_})})}),a.jsx(cp,{}),a.jsx(Qt,{label:"Model (blank uses the provider's default)",children:a.jsx(Je,{mono:!0,placeholder:"claude-sonnet-4-5",value:s.model??"",onChange:_=>O({model:_||void 0})})})]}),k==="codex"&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-2)"},children:[a.jsx("div",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:"Reads the login `codex login` already stored — Foreman never mints its own token."}),a.jsx(Qt,{label:"Codex home (blank is ~/.codex)",children:a.jsx(Je,{mono:!0,placeholder:"~/.codex",value:s.codexHome??"",onChange:_=>O({codexHome:_||void 0})})}),w?a.jsx(Qt,{label:"Upstream URL (blank is the public ChatGPT backend)",children:a.jsx(Je,{mono:!0,placeholder:"https://chatgpt.com/backend-api/codex",value:s.upstreamUrl??"",onChange:_=>O({upstreamUrl:_||void 0})})}):a.jsx("button",{type:"button",onClick:()=>S(!0),style:{alignSelf:"flex-start",background:"none",border:0,padding:0,font:"inherit",fontSize:"var(--fs-xs)",color:"var(--ink-2)",cursor:"pointer",textDecoration:"underline",textUnderlineOffset:2},children:"Point at a different upstream"}),a.jsx(Qt,{label:"Model (blank uses Codex's own default)",children:a.jsx(Je,{mono:!0,placeholder:"gpt-5-codex",value:s.model??"",onChange:_=>O({model:_||void 0})})})]}),k==="openai-compatible"&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-2)"},children:[o&&a.jsxs("button",{type:"button",onClick:()=>O({baseUrl:o.host,label:"Ollama"}),style:{display:"flex",alignItems:"center",gap:8,textAlign:"left",width:"100%",padding:"6px 8px",borderRadius:"var(--r-sm)",cursor:"pointer",font:"inherit",background:Z?"var(--brand-wash-strong)":"transparent",border:`1px solid ${Z?"var(--brand)":"var(--line)"}`},children:[a.jsx(ie,{name:"Bash",size:13,color:Z?"var(--brand)":"var(--ink-2)"}),a.jsx("span",{style:{fontSize:"var(--fs-sm)",flex:1},children:"Use local Ollama"}),a.jsxs("span",{style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:[o.host," · ",o.models.length," model",o.models.length===1?"":"s"]})]}),a.jsx(Qt,{label:"Base URL",children:a.jsx(Je,{mono:!0,placeholder:"http://127.0.0.1:11434",value:s.baseUrl??"",onChange:_=>O({baseUrl:_})})}),Z&&o.models.length>0?a.jsx(Qt,{label:"Model (blank lets the run pick)",children:a.jsxs("select",{value:s.model??"",onChange:_=>O({model:_.target.value||void 0}),style:{font:"inherit",fontFamily:"var(--font-mono)",fontSize:"var(--fs-sm)",padding:"6px 8px",borderRadius:"var(--r-sm)",border:"1px solid var(--line-strong)",background:"var(--bg-card)",color:"var(--ink-0)"},children:[a.jsx("option",{value:"",children:"— server picks —"}),o.models.map(_=>a.jsxs("option",{value:_.id,children:[_.id,_.remote?" (cloud)":""]},_.id))]})}):a.jsx(Qt,{label:"Model (blank lets the run pick)",children:a.jsx(Je,{mono:!0,placeholder:"llama3.1",value:s.model??"",onChange:_=>O({model:_||void 0})})}),a.jsx(Qt,{label:"Label (shown in place of the raw URL)",children:a.jsx(Je,{placeholder:"OpenRouter",value:s.label??"",onChange:_=>O({label:_||void 0})})}),a.jsx(Qt,{label:"Environment variable (blank when the endpoint needs no key)",children:a.jsx(Je,{mono:!0,placeholder:"OPENROUTER_API_KEY",value:s.apiKeyEnv??"",onChange:_=>O({apiKeyEnv:_||void 0})})}),!!s.apiKeyEnv&&a.jsx(cp,{}),a.jsx(dp,{providerId:s.id,hasKey:f,busy:h,error:g,onStore:j,onClear:m}),a.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",fontSize:"var(--fs-sm)"},children:[a.jsx(Rt,{checked:s.needsKey===!0,onChange:_=>O({needsKey:_||void 0})}),"This endpoint requires a credential"]})]})]})}function T1({status:s,busy:u,error:c,onSaveToken:o,onClearToken:f,onLink:h,onUnlink:g,onTest:j,onSavePublicUrl:m,style:v}){const[w,S]=x.useState(""),[k,O]=x.useState(!1),[Q,Z]=x.useState(null),_=s?.telegram,R=!!_?.hasToken,W=!!_?.chatId,X=_?.linking,J=Q??s?.publicUrl??"",le=Q!==null&&Q!==(s?.publicUrl??""),T=(U,L,H)=>a.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"var(--sp-3)",padding:"var(--sp-2) 0",borderTop:"1px solid var(--line)"},children:[a.jsxs("div",{style:{flex:"0 0 180px"},children:[a.jsx("div",{style:{fontSize:"var(--fs-sm)",color:"var(--ink-0)"},children:U}),L&&a.jsx("div",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",lineHeight:"var(--lh)"},children:L})]}),a.jsx("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:6},children:H})]});return a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-2)",marginTop:"var(--sp-3)",...v},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:"var(--fs-sm)",fontWeight:"var(--fw-semibold)"},children:[a.jsx(ie,{name:"send",size:13,color:"var(--brand)"})," Telegram",a.jsxs("span",{style:{marginLeft:"auto",fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontWeight:"var(--fw-normal)"},children:[W?`linked · ${_.chatLabel||_.chatId}`:R?"token stored · not linked":"not set up",s?.delivered?` · ${s.delivered} sent`:"",s?.failures?` · ${s.failures} failed`:""]})]}),a.jsx("div",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",lineHeight:"var(--lh-prose)"},children:"Approvals, questions, stalls and finished missions arrive in a chat with your own bot, using the toggles above. Every ask still has its unattended default — this makes it less likely to be needed."}),c&&a.jsx(ln,{tone:"error",inline:!0,children:c}),T("Bot token",a.jsxs(a.Fragment,{children:["Create a bot with ",a.jsx("span",{style:{fontFamily:"var(--font-mono)"},children:"@BotFather"})," and paste its token. Stored write-only; Foreman can replace it but never show it."]}),R&&!k?a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",fontSize:"var(--fs-sm)"},children:[a.jsx("span",{style:{fontFamily:"var(--font-mono)",color:"var(--ink-1)"},children:_?.bot||"token stored"}),a.jsx(he,{size:"sm",variant:"ghost",onClick:()=>O(!0),disabled:u,children:"Replace"}),a.jsx(he,{size:"sm",variant:"ghost",onClick:f,disabled:u,children:"Remove"})]}):a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)"},children:[a.jsx(Je,{mono:!0,type:"password",width:320,placeholder:"123456789:AA…",value:w,onChange:S}),a.jsx(he,{size:"sm",variant:"primary",disabled:u||!w.trim(),onClick:()=>{o?.(w.trim()),S(""),O(!1)},children:u?"Checking…":"Save"}),R&&a.jsx(he,{size:"sm",variant:"ghost",onClick:()=>O(!1),children:"Cancel"})]})),T("Linked chat","Send the one-time command to your bot from the chat that should receive messages. Only that chat is ever written to.",W?a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",fontSize:"var(--fs-sm)"},children:[a.jsx(ie,{name:"check",size:13,color:"var(--status-ok, var(--brand))"}),a.jsxs("span",{children:[_.chatLabel||"linked"," ",a.jsx("span",{style:{color:"var(--ink-2)",fontFamily:"var(--font-mono)"},children:_.chatId})]}),a.jsx(he,{size:"sm",variant:"ghost",onClick:j,disabled:u,children:"Send test"}),a.jsx(he,{size:"sm",variant:"ghost",onClick:g,disabled:u,children:"Unlink"})]}):X?a.jsxs("div",{style:{display:"flex",gap:"var(--sp-3)",alignItems:"flex-start"},children:[X.deepLink&&a.jsx("a",{href:X.deepLink,target:"_blank",rel:"noreferrer",title:"Open in Telegram",style:{flex:"0 0 auto",display:"block",padding:6,background:"#fff",borderRadius:"var(--r-sm)",border:"1px solid var(--line-strong)",lineHeight:0},children:a.jsx("img",{src:`/notify/telegram/qr.svg?c=${encodeURIComponent(X.code)}`,alt:`QR: ${X.deepLink}`,width:132,height:132,style:{display:"block"}})}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6,fontSize:"var(--fs-sm)",minWidth:0},children:[a.jsx("div",{children:"Scan with your phone, or send this to your bot:"}),a.jsxs("code",{style:{alignSelf:"flex-start",fontFamily:"var(--font-mono)",fontSize:"var(--fs-lg)",padding:"4px 10px",background:"var(--bg-inset)",border:"1px solid var(--line-strong)",borderRadius:"var(--r-sm)"},children:["/start ",X.code]}),X.deepLink&&a.jsx("a",{href:X.deepLink,target:"_blank",rel:"noreferrer",style:{fontSize:"var(--fs-xs)",color:"var(--brand)",textDecoration:"none"},children:"Open in Telegram on this computer →"}),a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:"var(--fs-xs)",color:"var(--ink-2)",flexWrap:"wrap"},children:[a.jsx("span",{className:"pulse",style:{display:"inline-flex"},children:a.jsx(ie,{name:"loading",size:12})}),"waiting… the code expires in 10 minutes",a.jsx(he,{size:"sm",variant:"ghost",onClick:h,disabled:u,children:"New code"})]})]})]}):a.jsx("div",{children:a.jsx(he,{size:"sm",variant:"primary",onClick:h,disabled:u||!R,title:R?"Shows a one-time code to send to your bot":"Store a bot token first",children:"Link a chat"})})),T("Foreman URL","Where links in messages point. A phone cannot open localhost — use a LAN or Tailscale address if you have one.",a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)"},children:[a.jsx(Je,{mono:!0,width:320,value:J,onChange:Z,placeholder:"http://localhost:4177"}),a.jsx(he,{size:"sm",disabled:u||!le,onClick:()=>{m?.(J),Z(null)},children:"Save"})]}))]})}const Tu=[{id:"provider",label:"Provider",icon:"provider"},{id:"models",label:"Models",icon:"model"},{id:"budget",label:"Budget",icon:"budget"},{id:"approvals",label:"Approvals",icon:"approval"},{id:"appearance",label:"Appearance",icon:"sun"},{id:"notifications",label:"Notifications",icon:"needsYou"},{id:"projects",label:"Projects",icon:"folder"}],Au={directorModel:"opus",workerModel:"sonnet",plannerModel:"sonnet",budgetCap:5,budgetWarnAt:80,budgetHardStop:!0,autoAllowReadOnly:!0,alwaysSurvivesResume:!0,toolPolicy:{Bash:"allow",Write:"allow",Edit:"allow",WebFetch:"allow",spawn_worker:"allow"},theme:"light",textSize:"default",density:"comfortable",showTimestamps:!0,notifyNeedsYou:!0,notifyDone:!0,notifyBudget:!0,sound:!1,projectsRoot:"~/Projects",missionDir:".foreman",showHidden:!1},M1=[{value:"allow",label:"Allow"},{value:"ask",label:"Ask"},{value:"deny",label:"Deny"}],E1=["Bash","Write","Edit","WebFetch","spawn_worker"];function _1({instances:s=[],ollama:u,codex:c}){const o=[...s.map(f=>({icon:"orchestration",name:"Claude Code",detail:f.configDir,note:f.hasStoredLogin?"signed in":"no stored login"})),...u?[{icon:"model",name:"Ollama",detail:u.host,note:`${u.models.length} model${u.models.length===1?"":"s"}`}]:[],...c?[{icon:"provider",name:"Codex",detail:c.home,note:c.signedIn?"signed in":"not signed in"}]:[]];return a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-3)"},children:[a.jsxs("div",{style:{fontSize:"var(--fs-sm)",color:"var(--ink-1)",lineHeight:"var(--lh-prose)"},children:["A provider is chosen per project — open one and its tab appears beside",a.jsx("b",{style:{color:"var(--ink-0)"},children:" Global"})," above. These are what this machine can offer."]}),o.length===0&&a.jsx(ft,{children:"Nothing detected. An Anthropic API key or any OpenAI-compatible endpoint still works."}),o.map((f,h)=>a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"var(--sp-2) var(--sp-3)",background:"var(--bg-inset)",border:"1px solid var(--line)",borderRadius:"var(--r-sm)"},children:[a.jsx(ie,{name:f.icon,size:14,color:"var(--ink-2)"}),a.jsx("span",{style:{fontSize:"var(--fs-sm)",fontWeight:"var(--fw-medium)"},children:f.name}),a.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-xs)",color:"var(--ink-2)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.detail}),a.jsx("span",{style:{marginLeft:"auto",fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:f.note})]},h))]})}function C1({global:s,project:u,projectName:c,models:o,modelsLoading:f,modelsNote:h,provider:g,providerInstances:j,providerOllama:m,providerCodex:v,providerHasKey:w,providerKeyBusy:S,providerKeyError:k,onStoreProviderKey:O,onClearProviderKey:Q,notify:Z,scope:_,onScope:R,section:W,onSection:X,onSave:J,onClose:le,onUnlink:T,style:U}){const[L,H]=x.useState(_??"global"),[ae,F]=x.useState(W??"models"),de=R?_:L,ye=R??H,je=X?W:ae,re=X??F,[M,Y]=x.useState({...Au,...s}),[I,ge]=x.useState({...u}),[V,y]=x.useState(g??null),B=JSON.stringify(V)!==JSON.stringify(g??null),P=JSON.stringify(M)!==JSON.stringify({...Au,...s})||JSON.stringify(I)!==JSON.stringify({...u})||B,ee=de==="project",se=te=>ee&&te in I?I[te]:M[te],oe=(te,Ae)=>ee?ge(Le=>({...Le,[te]:Ae})):Y(Le=>({...Le,[te]:Ae})),be=te=>ee&&te in I,Ge=te=>ge(Ae=>{const Le={...Ae};return delete Le[te],Le}),K=(te,Ae,Le,vt)=>a.jsx(Ls,{label:Ae,hint:Le,overridden:be(te),inherits:ee&&!be(te),onReset:()=>Ge(te),children:vt}),Xe={models:a.jsxs(a.Fragment,{children:[K("directorModel","Director","Plans, delegates, verifies. Opus by default; Fable for long-horizon work.",a.jsx(nn,{align:"right",allowDefault:!1,models:o,loading:f,note:h,value:se("directorModel"),onChange:(te,Ae)=>{oe("directorModel",te),oe("directorProviderId",Ae?.providerId)}})),K("workerModel","Workers","Implement scoped tasks. Cheaper models cut cost sharply.",a.jsx(nn,{align:"right",allowDefault:!1,models:o,loading:f,note:h,value:se("workerModel"),onChange:(te,Ae)=>{oe("workerModel",te),oe("workerProviderId",Ae?.providerId)}})),K("plannerModel","Planner","Talks the next mission through with you and reads the project. Conversation, not deep reasoning; Sonnet by default.",a.jsx(nn,{align:"right",allowDefault:!1,models:o,loading:f,note:h,value:se("plannerModel"),onChange:te=>oe("plannerModel",te)}))]}),budget:a.jsxs(a.Fragment,{children:[K("budgetCap","Default cap per run","The composer starts here; you can change it per mission.",a.jsx(Je,{type:"number",prefix:"$",min:0,step:1,width:110,value:se("budgetCap"),onChange:te=>oe("budgetCap",te)})),K("budgetWarnAt","Warn at","Meter turns amber and, if enabled, you get a notification.",a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6},children:[a.jsx(Je,{type:"number",min:10,max:100,step:5,width:80,value:se("budgetWarnAt"),onChange:te=>oe("budgetWarnAt",te)}),a.jsx("span",{style:{color:"var(--ink-2)"},children:"%"})]})),K("budgetHardStop","Hard stop at cap","Off: the run pauses and asks instead of stopping.",a.jsx(Rt,{checked:se("budgetHardStop"),onChange:te=>oe("budgetHardStop",te)}))]}),approvals:a.jsxs(a.Fragment,{children:[K("autoAllowReadOnly","Auto-allow read-only tools","Read, Grep, Glob, LS never prompt.",a.jsx(Rt,{checked:se("autoAllowReadOnly"),onChange:te=>oe("autoAllowReadOnly",te)})),K("alwaysSurvivesResume","“Always (run)” survives resume","Grants made during a run carry into a resumed run.",a.jsx(Rt,{checked:se("alwaysSurvivesResume"),onChange:te=>oe("alwaysSurvivesResume",te)})),a.jsx(Ls,{label:"Guarded tools",hint:"Policy per tool. “Ask” escalates to an approval card; writes outside the project folder always ask.",overridden:be("toolPolicy"),inherits:ee&&!be("toolPolicy"),onReset:()=>Ge("toolPolicy"),stacked:!0,children:a.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:E1.map(te=>a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[a.jsx(ie,{name:te,size:14,color:"var(--ink-2)"}),a.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:"var(--fs-sm)",flex:1},children:te}),a.jsx(_n,{size:"sm",tabs:M1,value:se("toolPolicy")[te]||"ask",onChange:Ae=>oe("toolPolicy",{...se("toolPolicy"),[te]:Ae})})]},te))})})]}),appearance:a.jsxs(a.Fragment,{children:[K("theme","Theme",null,a.jsx(_n,{size:"sm",value:se("theme"),onChange:te=>oe("theme",te),tabs:[{value:"system",label:"System"},{value:"dark",label:"Dark",icon:"moon"},{value:"light",label:"Light",icon:"sun"}]})),K("textSize","Text size","Scales the whole interface. Anything but Default overrides your browser’s own font size.",a.jsx(_n,{size:"sm",value:se("textSize"),onChange:te=>oe("textSize",te),tabs:[{value:"small",label:"Small"},{value:"default",label:"Default"},{value:"large",label:"Large"},{value:"larger",label:"Larger"}]})),K("density","Density","Compact tightens transcript rows and rail padding.",a.jsx(_n,{size:"sm",value:se("density"),onChange:te=>oe("density",te),tabs:[{value:"comfortable",label:"Comfortable"},{value:"compact",label:"Compact"}]})),K("showTimestamps","Timestamps in transcript",null,a.jsx(Rt,{checked:se("showTimestamps"),onChange:te=>oe("showTimestamps",te)}))]}),notifications:a.jsxs(a.Fragment,{children:[K("notifyNeedsYou","Needs you","An approval or question is waiting.",a.jsx(Rt,{checked:se("notifyNeedsYou"),onChange:te=>oe("notifyNeedsYou",te)})),K("notifyDone","Run finished","Done, errored or interrupted.",a.jsx(Rt,{checked:se("notifyDone"),onChange:te=>oe("notifyDone",te)})),K("notifyBudget","Budget warning","When spend crosses the warn threshold.",a.jsx(Rt,{checked:se("notifyBudget"),onChange:te=>oe("notifyBudget",te)})),K("sound","Sound",null,a.jsx(Rt,{checked:se("sound"),onChange:te=>oe("sound",te)})),!ee&&Z&&a.jsx(T1,{...Z})]}),provider:ee?a.jsx(Ls,{label:"Provider",hint:"Which engine runs this project's agents, who pays, and where requests go. Clearing it returns to the server default.",stacked:!0,children:a.jsx(z1,{value:V,onChange:y,instances:j,ollama:m,hasKey:w,keyBusy:S,keyError:k,onStoreKey:O,onClearKey:Q})}):a.jsx(_1,{instances:j,ollama:m,codex:v}),projects:a.jsxs(a.Fragment,{children:[!ee&&K("projectsRoot","Projects root","Where the folder picker opens.",a.jsx(Je,{mono:!0,width:260,value:se("projectsRoot"),onChange:te=>oe("projectsRoot",te)})),K("missionDir","Mission folder","Relative to the project. Holds MISSION.md and run history.",a.jsx(Je,{mono:!0,width:160,value:se("missionDir"),onChange:te=>oe("missionDir",te)})),!ee&&K("showHidden","Show hidden folders in picker",null,a.jsx(Rt,{checked:se("showHidden"),onChange:te=>oe("showHidden",te)})),ee&&a.jsx(Ls,{label:"Unlink this project",hint:"Removes it from the fleet. Files on disk are untouched.",danger:!0,children:a.jsx(he,{variant:"danger",size:"sm",icon:"unlink",onClick:T,children:"Unlink"})})]})},Be=Tu.find(te=>te.id===je)||Tu[0];return a.jsxs(Vs,{width:"51.25rem",onClose:le,dismissible:!1,style:{maxHeight:"82vh",height:"37.5rem",...U},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-3)",padding:"var(--sp-2) var(--sp-3)",borderBottom:"1px solid var(--line)"},children:[a.jsx("span",{style:{fontSize:"var(--fs-lg)",fontWeight:"var(--fw-semibold)"},children:"Settings"}),a.jsx(_n,{size:"sm",value:de,onChange:ye,tabs:[...c?[{value:"project",label:c,icon:"folder"}]:[],{value:"global",label:"Global"}]}),a.jsx(xa,{icon:"close",label:"Close",onClick:le,style:{marginLeft:"auto"}})]}),a.jsxs("div",{style:{flex:1,minHeight:0,display:"grid",gridTemplateColumns:"11.25rem 1fr"},children:[a.jsx("nav",{style:{background:"var(--bg-inset)",borderRight:"1px solid var(--line)",padding:"var(--sp-2)",display:"flex",flexDirection:"column",gap:2},children:Tu.map(te=>a.jsx(R1,{s:te,selected:te.id===je,dot:ee&&(D1(te.id,I)||te.id==="provider"&&!!V),onClick:()=>re(te.id)},te.id))}),a.jsxs("div",{style:{minHeight:0,overflowY:"auto",padding:"var(--sp-3) var(--sp-5)"},children:[a.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:"var(--sp-2)",marginBottom:"var(--sp-2)"},children:[a.jsx("span",{style:{fontSize:"var(--fs-lg)",fontWeight:"var(--fw-semibold)"},children:Be.label}),ee&&a.jsxs("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:["Overrides for ",a.jsx("span",{style:{fontFamily:"var(--font-mono)"},children:c}),". Rows without a change inherit global."]})]}),Xe[Be.id]]})]}),a.jsxs(Zs,{children:[a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:P?"var(--status-warning)":"var(--ink-2)"},children:P?"Unsaved changes":"Nothing to save"}),a.jsxs("span",{style:{marginLeft:"auto",display:"flex",gap:"var(--sp-2)"},children:[a.jsx(he,{onClick:le,children:"Cancel"}),a.jsx(he,{variant:"primary",disabled:!P,onClick:()=>J?.({global:M,project:I,provider:B?V:void 0}),children:"Save"})]})]})]})}const A1={models:["directorModel","workerModel","plannerModel","directorProviderId","workerProviderId"],budget:["budgetCap","budgetWarnAt","budgetHardStop"],approvals:["autoAllowReadOnly","alwaysSurvivesResume","toolPolicy"],appearance:["theme","density","showTimestamps"],notifications:["notifyNeedsYou","notifyDone","notifyBudget","sound"],projects:["missionDir"]};function D1(s,u){return(A1[s]||[]).some(c=>c in u)}function R1({s,selected:u,dot:c,onClick:o}){const[f,h]=x.useState(!1);return a.jsxs("button",{type:"button",onClick:o,"aria-current":u||void 0,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),style:{display:"flex",alignItems:"center",gap:8,padding:"6px 8px",borderRadius:"var(--r-sm)",border:"none",textAlign:"left",cursor:"pointer",font:"inherit",color:u?"var(--ink-0)":"var(--ink-1)",fontWeight:u?"var(--fw-semibold)":"var(--fw-regular)",background:u?"var(--bg-card)":f?"var(--bg-hover)":"transparent",boxShadow:u?"inset 0 0 0 1px var(--line-strong)":"none"},children:[a.jsx(ie,{name:s.icon,size:14,color:u?"var(--brand)":"var(--ink-2)"}),a.jsx("span",{style:{flex:1},children:s.label}),c&&a.jsx("span",{title:"Has project overrides",style:{width:6,height:6,borderRadius:"var(--r-pill)",background:"var(--brand)"}})]})}function Ls({label:s,hint:u,children:c,overridden:o,inherits:f,onReset:h,stacked:g,danger:j}){return a.jsxs("div",{style:{display:"grid",gridTemplateColumns:g?"1fr":"1fr auto",gap:g?10:"var(--sp-4)",alignItems:"center",padding:"var(--sp-3) 0",borderBottom:"1px solid var(--line)"},children:[a.jsxs("div",{style:{minWidth:0},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,color:j?"var(--status-critical)":"var(--ink-0)"},children:[a.jsx("span",{children:s}),f&&a.jsx(fp,{children:"global"}),o&&a.jsxs(a.Fragment,{children:[a.jsx(fp,{brand:!0,children:"override"}),a.jsx("button",{type:"button",onClick:h,style:{background:"none",border:0,padding:0,font:"inherit",fontSize:"var(--fs-xs)",color:"var(--ink-2)",cursor:"pointer",textDecoration:"underline",textUnderlineOffset:2},children:"reset to global"})]})]}),u&&a.jsx("div",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",marginTop:2},children:u})]}),a.jsx("div",{style:{display:"flex",justifyContent:g?"stretch":"flex-end",minWidth:0},children:c})]})}function fp({children:s,brand:u}){return a.jsx("span",{style:{fontSize:"var(--fs-xs)",letterSpacing:"0.06em",textTransform:"uppercase",padding:"1px 6px",borderRadius:"var(--r-pill)",background:u?"var(--brand-wash-strong)":"var(--bg-inset)",color:u?"var(--brand)":"var(--ink-2)",border:`1px solid ${u?"transparent":"var(--line)"}`},children:s})}function hp({agent:s,status:u="running",task:c,selected:o,indent:f,last:h,onSelect:g,style:j}){const[m,v]=x.useState(!1);return a.jsxs("div",{style:{position:"relative",marginLeft:f?14:0},children:[f&&a.jsx("span",{"aria-hidden":!0,style:{position:"absolute",left:-8,top:0,bottom:h?"50%":0,borderLeft:"1px solid var(--line-strong)"}}),f&&a.jsx("span",{"aria-hidden":!0,style:{position:"absolute",left:-8,top:"50%",width:8,borderTop:"1px solid var(--line-strong)"}}),a.jsxs("div",{role:"button",title:c,onClick:()=>g?.(s),onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"6px 8px",borderRadius:"var(--r-sm)",cursor:"pointer",background:o?"var(--bg-card)":m?"var(--bg-hover)":"transparent",border:o?"1px solid var(--line-strong)":"1px solid transparent",transition:"background var(--dur-fast) var(--ease)",...j},children:[a.jsx(an,{agent:s}),a.jsx("span",{style:{flex:1,minWidth:0,fontSize:"var(--fs-md)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s}),a.jsx(ba,{status:u})]})]})}function O1({agents:s=[],filter:u,onFilter:c,sessionId:o,details:f,style:h}){const g=s.find(v=>v.id==="director"),j=s.filter(v=>v.id!=="director"),m={margin:"0 0 6px 0",fontSize:"var(--fs-xs)",color:"var(--ink-1)",lineHeight:"var(--lh)",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"};return a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-3)",...h},children:[a.jsxs("section",{style:{minWidth:0},children:[a.jsx(tn,{children:"Crew"}),s.length===0&&a.jsx(ft,{children:"No agents yet."}),g&&a.jsx(hp,{agent:"director",status:g.status,selected:u==="director",onSelect:c}),j.map((v,w)=>a.jsxs(Cn.Fragment,{children:[a.jsx(hp,{agent:v.id,status:v.status,task:v.task,indent:!0,last:w===j.length-1,selected:u===v.id,onSelect:c}),v.task&&a.jsx("div",{title:v.task,style:{...m,marginLeft:34},children:v.task})]},v.id)),u&&a.jsxs("div",{style:{marginTop:4,fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:["Transcript shows only ",a.jsx("b",{style:{color:"var(--ink-1)"},children:u})," — click again to clear."]})]}),a.jsxs("section",{style:{minWidth:0},children:[a.jsx(tn,{children:"Run"}),f??a.jsx(ft,{children:"No run details."}),o&&a.jsxs("div",{style:{marginTop:6,fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontFamily:"var(--font-mono)"},children:["director session ",String(o).slice(0,8)]})]})]})}function N1({director:s,worker:u,models:c,loading:o,note:f,busy:h,onResume:g,style:j}){const[m,v]=x.useState(!1),[w,S]=x.useState({id:s||"",providerId:void 0}),[k,O]=x.useState({id:u||"",providerId:void 0}),Q=x.useRef(null);x.useEffect(()=>{S({id:s||"",providerId:void 0}),O({id:u||"",providerId:void 0})},[s,u,m]),x.useEffect(()=>{if(!m)return;const W=J=>{Q.current&&!Q.current.contains(J.target)&&v(!1)},X=J=>{J.key==="Escape"&&v(!1)};return document.addEventListener("mousedown",W),document.addEventListener("keydown",X),()=>{document.removeEventListener("mousedown",W),document.removeEventListener("keydown",X)}},[m]);const Z=w.id&&w.id!==s||k.id&&k.id!==u,_=()=>{g?.({...w.id&&w.id!==s?{directorModel:w.id,directorProviderId:w.providerId}:{},...k.id&&k.id!==u?{workerModel:k.id,workerProviderId:k.providerId}:{}}),v(!1)},R={fontSize:"var(--fs-xs)",color:"var(--ink-2)",textTransform:"uppercase",letterSpacing:"var(--ls-caps)",marginBottom:4};return a.jsxs("div",{ref:Q,style:{position:"relative",display:"inline-flex",...j},children:[a.jsx(he,{variant:"good",icon:"resume",disabled:h,title:"Restore the director's session and continue this mission",onClick:()=>g?.({}),style:{borderTopRightRadius:0,borderBottomRightRadius:0},children:h?"Resuming…":"Resume"}),a.jsx(he,{variant:"good",disabled:h,"aria-label":"Resume on other models",title:"Resume on other models…",onClick:()=>v(!m),style:{borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeft:"1px solid rgba(255,255,255,0.35)",paddingLeft:6,paddingRight:6},children:a.jsx(ie,{name:"chevronDown",size:14})}),m&&a.jsxs("div",{role:"dialog","aria-label":"Resume on other models",style:{position:"absolute",top:"calc(100% + 6px)",right:0,zIndex:50,width:340,background:"var(--bg-card)",border:"1px solid var(--line-strong)",borderRadius:"var(--r-md)",boxShadow:"0 12px 32px rgba(0,0,0,0.25)",padding:"var(--sp-3)",display:"flex",flexDirection:"column",gap:"var(--sp-3)"},children:[a.jsx("div",{style:{fontSize:"var(--fs-sm)",color:"var(--ink-1)",lineHeight:"var(--lh)"},children:"Same mission, other models. A new director starts a fresh session and reads the mission doc; workers change for the next spawns."}),a.jsxs("div",{children:[a.jsx("div",{style:R,children:"Director"}),a.jsx(nn,{block:!0,allowDefault:!1,models:c,loading:o,note:f,value:w.id,onChange:(W,X)=>S({id:W,providerId:X?.providerId})})]}),a.jsxs("div",{children:[a.jsx("div",{style:R,children:"Workers"}),a.jsx(nn,{block:!0,allowDefault:!1,models:c,loading:o,note:f,value:k.id,onChange:(W,X)=>O({id:W,providerId:X?.providerId})})]}),a.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--sp-2)"},children:[a.jsx(he,{variant:"ghost",size:"sm",onClick:()=>v(!1),children:"Cancel"}),a.jsx(he,{variant:"good",size:"sm",icon:"resume",disabled:h||!Z,onClick:_,title:Z?"Resume with these models":"Pick a different model first — or use Resume as is",children:"Resume"})]})]})]})}function pp(s,u){const c=jp(s.provider);return!s.provider||!c?u:s.provider.kind==="claude-code"?s.provider.ownLogin?`${c} (this project's own login)`:c:`${s.provider.kind} · ${c}`}function U1(s){const u=`(min-width: ${s}px)`,[c,o]=x.useState(()=>typeof window<"u"&&window.matchMedia(u).matches);return x.useEffect(()=>{const f=window.matchMedia(u),h=()=>o(f.matches);return h(),f.addEventListener("change",h),()=>f.removeEventListener("change",h)},[u]),c}const H1=1100;function B1(s){const u=s.agents.filter(j=>j.status==="running"),c=u.filter(j=>j.id!=="director").length,o=u.length===0?"":[u.some(j=>j.id==="director")?"director":null,c?`${c} worker${c===1?"":"s"}`:null].filter(Boolean).join(" · ");let f=null;for(let j=s.entries.length-1;j>=0&&j>=s.entries.length-40;j--){const m=s.entries[j],v=m.kind==="system"&&m.title.startsWith("progress"),w=m.kind==="text"&&m.agent==="director";if(v||w){f=m;break}}if(!f){const j=u.find(m=>m.id!=="director"&&m.task);return j?{line:`${j.id}: ${j.task}`,agent:j.id,crew:o}:o?{line:"Crew is starting up",crew:o}:null}const h=f.body.split(`
66
+ `).find(j=>j.trim())??"";return{line:`${f.agent}: ${h.replace(/[*_`#>]/g,"").trim().slice(0,160)}`,agent:f.agent,crew:o}}function bi({label:s,open:u,onToggle:c,children:o}){return a.jsxs("div",{style:{border:"1px solid var(--line)",borderRadius:"var(--r-sm)",background:"var(--bg-panel)"},children:[a.jsxs("button",{type:"button",onClick:c,style:{display:"flex",alignItems:"center",gap:6,width:"100%",padding:"6px 10px",background:"none",border:"none",cursor:"pointer",font:"inherit",textAlign:"left",fontSize:"var(--fs-xs)",color:"var(--ink-2)",textTransform:"uppercase",letterSpacing:"var(--ls-caps)"},children:[a.jsx(ie,{name:u?"chevronDown":"chevronRight",size:12}),s]}),u&&a.jsx("div",{style:{padding:"0 10px 10px"},children:o})]})}const Yp={width:"100%",maxWidth:"var(--spine-max)",margin:"0 auto",display:"flex",flexDirection:"column",gap:"var(--sp-2)",boxSizing:"border-box"},vp="foreman.transcriptOrder",gp="foreman.timeline",Ys=s=>new Date(s).toLocaleDateString(void 0,{month:"short",day:"numeric"}),mp="foreman.railWidth",Mu=280,yp=340;function q1(){const[s,u]=x.useState(()=>{try{return localStorage.getItem(vp)==="oldest"?"oldest":"newest"}catch{return"newest"}});return[s,c=>{u(c);try{localStorage.setItem(vp,c)}catch{}}]}function xp(s,u){return u==="newest"?0:s.scrollHeight}function L1({run:s,filter:u,jump:c,order:o,header:f}){const h=x.useRef(null),g=x.useRef(!0),[j,m]=x.useState(null),v=u?s.entries.filter(S=>S.agent===u):s.entries,w=o==="newest"?[...v].reverse():v;return x.useEffect(()=>{const S=h.current;S&&g.current&&(S.scrollTop=xp(S,o))},[w.length,o]),x.useEffect(()=>{g.current=!0;const S=h.current;S&&(S.scrollTop=xp(S,o))},[o]),x.useEffect(()=>{if(!c)return;g.current=!1;const S=requestAnimationFrame(()=>{document.getElementById(`entry-${c.id}`)?.scrollIntoView({behavior:"smooth",block:"center"}),m(c.id)}),k=setTimeout(()=>m(null),1600);return()=>{cancelAnimationFrame(S),clearTimeout(k)}},[c]),a.jsx("div",{ref:h,onScroll:S=>{const k=S.currentTarget;g.current=o==="newest"?k.scrollTop<60:k.scrollHeight-k.scrollTop-k.clientHeight<60},style:{overflowY:"auto",padding:"var(--sp-3)",minHeight:0,flex:1,display:"flex",flexDirection:"column",gap:"var(--sp-2)"},children:a.jsxs("div",{style:Yp,children:[f,w.length===0&&a.jsx(ft,{children:"Transcript will appear here."}),w.map(S=>a.jsx("div",{id:`entry-${S.id}`,style:{scrollMarginTop:8,borderRadius:"var(--r-sm)",outline:j===S.id?"2px solid var(--brand)":"none",transition:"outline-color var(--dur-fast) var(--ease)"},children:a.jsx(Up,{agent:S.agent,title:S.title,dense:!0,kind:S.kind,body:S.body,ts:S.ts,to:S.to,timing:S.timing})},S.id))]})})}function Y1({chat:s,folder:u,starting:c,error:o,models:f,modelsLoading:h,modelsNote:g,modelsInheritNote:j,onStart:m,onCompose:v,hasRuns:w,projectId:S,onSettings:k}){const[O,Q]=x.useState(""),[Z,_]=x.useState(""),[R,W]=x.useState(0),X=L=>{_(L),W(H=>H+1)},J=async(L,H=[])=>{Q("");try{await s.send(await Tp(S,L,H))}catch(ae){Q(ae.message)}},le=x.useRef(null),T=x.useRef(!0);return x.useEffect(()=>{const L=le.current;L&&T.current&&(L.scrollTop=L.scrollHeight)},[s.entries.length,s.proposal,s.thinking]),s.entries.length===0&&!s.thinking&&!s.question&&!s.proposal?a.jsx("div",{style:{flex:1,minHeight:0,overflowY:"auto",display:"flex",flexDirection:"column"},children:a.jsxs("div",{style:{margin:"auto",width:"100%",maxWidth:"var(--composer-max)",padding:"var(--sp-4) var(--sp-3)",boxSizing:"border-box",display:"flex",flexDirection:"column",gap:"var(--sp-4)"},children:[a.jsxs("div",{style:{textAlign:"center",display:"flex",flexDirection:"column",gap:"var(--sp-1)"},children:[a.jsx("span",{style:{fontSize:"var(--fs-lg)",fontWeight:"var(--fw-semibold)"},children:"What should this project do next?"}),a.jsx("span",{style:{fontSize:"var(--fs-sm)",color:"var(--ink-2)"},children:"Describe it, paste a spec or a screenshot, or pick a starter and edit it before sending."})]}),a.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"var(--sp-2)"},children:[w?{t:"Review the last run",q:"Look at what the last mission built and verify it still holds. What would you fix or finish next?"}:{t:"Survey the project",q:"Read this project and tell me what it is, how it is built, and what state it is in."},{t:"Find risks worth a mission",q:"Audit this project for bugs, security holes and missing tests. Rank what you find and propose the one mission most worth running first."},{t:"Scope a feature",q:"I have a feature in mind. Ask me what you need to know to scope it, then draft the mission."},{t:"Plan a refactor",q:"Where is this codebase hardest to change? Propose one contained refactor with clear DONE WHEN criteria."}].map(L=>a.jsxs("button",{type:"button",onClick:()=>X(L.q),disabled:s.thinking,style:{textAlign:"left",padding:"8px 10px",background:"var(--bg-card)",border:"1px solid var(--line)",borderRadius:"var(--r-sm)",cursor:"pointer",font:"inherit",color:"inherit",display:"flex",flexDirection:"column",gap:2},children:[a.jsx("span",{style:{fontSize:"var(--fs-sm)",fontWeight:"var(--fw-semibold)",color:"var(--ink-0)"},children:L.t}),a.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",lineHeight:"var(--lh)"},children:L.q})]},L.t))}),a.jsx(lp,{value:Z,onChange:_,busy:s.thinking,who:s.who,onSend:(L,H)=>{J(L,H)},onStop:()=>{s.stop()},onChangeModel:k,autoFocus:!0},R),O&&a.jsx(ln,{tone:"error",inline:!0,children:O}),a.jsxs("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",textAlign:"center"},children:["Planning reads the project and never changes it — a mission does that.",w&&a.jsxs(a.Fragment,{children:[" To build on a finished run, open it and choose ",a.jsx("b",{style:{color:"var(--ink-1)"},children:"Plan the next step"}),"."]})]}),a.jsxs("button",{type:"button",onClick:v,style:{display:"flex",alignItems:"center",gap:6,padding:"6px 10px",width:"100%",boxSizing:"border-box",background:"none",border:"1px dashed var(--line-strong)",borderRadius:"var(--r-sm)",cursor:"pointer",font:"inherit",fontSize:"var(--fs-xs)",color:"var(--ink-2)",textAlign:"left"},children:[a.jsx(ie,{name:"write",size:12}),"Or skip the talk: describe the mission and start it",a.jsx(ie,{name:"chevronRight",size:12,style:{marginLeft:"auto"}})]})]})}):a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:le,onScroll:L=>{const H=L.currentTarget;T.current=H.scrollHeight-H.scrollTop-H.clientHeight<60},style:{flex:1,minHeight:0,overflowY:"auto",padding:"var(--sp-3)",display:"flex",flexDirection:"column",gap:"var(--sp-2)"},children:a.jsxs("div",{style:Yp,children:[s.entries.map((L,H)=>{const ae=Ys(L.ts),F=H>0?Ys(s.entries[H-1].ts):null;return a.jsxs(Cn.Fragment,{children:[ae!==F&&(H>0||ae!==Ys(Date.now()))&&a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",fontSize:"var(--fs-xs)",color:"var(--ink-2)",margin:"4px 0"},children:[a.jsx("span",{style:{flex:1,borderTop:"1px solid var(--line)"}}),a.jsx("span",{children:ae===Ys(Date.now())?"today":ae}),a.jsx("span",{style:{flex:1,borderTop:"1px solid var(--line)"}})]}),a.jsx(Up,{agent:L.agent,title:L.title,kind:L.kind,body:L.body,ts:L.ts})]},L.id)}),s.proposal&&a.jsx(t1,{mission:s.proposal.mission,doneWhen:s.proposal.doneWhen,budgetUsd:s.proposal.budgetUsd,rationale:s.proposal.rationale,browser:s.proposal.browser,directorModel:s.proposal.directorModel,workerModel:s.proposal.workerModel,directorProviderId:s.proposal.directorProviderId,workerProviderId:s.proposal.workerProviderId,modelRationale:s.proposal.modelRationale,models:f,modelsLoading:h,modelsNote:g,modelsInheritNote:j,busy:c,error:o,onStart:L=>m(L),onDismiss:s.dismissProposal})]})}),a.jsxs("div",{style:{padding:"var(--sp-2) var(--sp-3) var(--sp-3)",flex:"0 0 auto",width:"100%",maxWidth:"var(--spine-max)",margin:"0 auto",boxSizing:"border-box"},children:[s.question?a.jsx(e1,{questions:s.question.questions,askedAt:s.question.askedAt,who:s.who,onAnswer:L=>{s.answer(s.question.id,L)},onFreeText:L=>{J(L)}}):a.jsx(lp,{busy:s.thinking,who:s.who,onSend:(L,H)=>{J(L,H)},onStop:()=>{s.stop()},onChangeModel:k}),O&&a.jsx(ln,{tone:"error",inline:!0,style:{marginTop:4},children:O}),(s.costUsd>0||s.entries.length>0)&&a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"4px 2px 0",fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:[s.costUsd>0&&a.jsxs("span",{title:"What this conversation has cost so far. Planning is not charged to any mission budget.",style:{fontVariantNumeric:"tabular-nums"},children:["conversation $",s.costUsd.toFixed(3)]}),a.jsx("span",{style:{flex:1}}),s.thinking&&a.jsx(he,{variant:"ghost",size:"sm",icon:"close",title:"Stop the planner and discard the rest of this reply",onClick:()=>{s.stop()},children:"Stop"}),s.entries.length>0&&a.jsx(he,{variant:"ghost",size:"sm",icon:"close",disabled:s.thinking,title:s.thinking?"The planner is replying — clear once it has answered.":"Forget this conversation and start a new one",onClick:()=>{s.clear()},children:s.thinking?"Clear (after this reply)":"Clear conversation"})]})]}),a.jsxs("button",{type:"button",onClick:v,style:{flex:"0 0 auto",display:"flex",alignItems:"center",gap:6,margin:"0 auto var(--sp-3)",padding:"6px 10px",width:"calc(100% - 2 * var(--sp-3))",maxWidth:"calc(var(--spine-max) - 2 * var(--sp-3))",boxSizing:"border-box",background:"none",border:"1px dashed var(--line-strong)",borderRadius:"var(--r-sm)",cursor:"pointer",font:"inherit",fontSize:"var(--fs-xs)",color:"var(--ink-2)",textAlign:"left"},children:[a.jsx(ie,{name:"write",size:12}),"Or skip the talk: describe the mission and start it",a.jsx(ie,{name:"chevronRight",size:12,style:{marginLeft:"auto"}})]})]})}function $1({r:s,live:u,liveCost:c,liveBasis:o,liveUsage:f,liveTurns:h,onChanged:g}){const[j,m]=x.useState(!1),[v,w]=x.useState(""),S=!!u&&s.status==="running",k=async W=>{m(!0),w("");try{await Fe.updateRun(s.id,W),g?.()}catch(X){w(X instanceof Error?X.message:String(X))}finally{m(!1)}},O=o??zl(s),Q=f??s.usage??null,Z=h??s.turns,_=[["director",s.directorModel||"default"],["workers",s.workerModel||"default"],["budget",O==="priced"?`$${((c??s.costUsd)||0).toFixed(2)} / $${s.budgetUsd.toFixed(2)}`:`${Tl(Q?.inputTokens??0)} in · ${Tl(Q?.outputTokens??0)} out${typeof Z=="number"?` · ${Z} turn${Z===1?"":"s"}`:""}`+(O==="unpriced"?" · cost not tracked":" · no per-token cost")]],R={color:"var(--ink-1)",fontFamily:"var(--font-mono)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};return a.jsxs("div",{style:{marginTop:8,fontSize:"var(--fs-xs)"},children:[a.jsxs("div",{style:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:10,rowGap:2},children:[_.map(([W,X])=>a.jsxs(Cn.Fragment,{children:[a.jsx("span",{style:{color:"var(--ink-2)"},children:W}),a.jsx("span",{style:R,children:X})]},W)),a.jsx("span",{style:{color:"var(--ink-2)"},children:"browser"}),S?a.jsx("button",{type:"button",disabled:j,onClick:()=>{k({browserTools:!s.browserTools})},title:s.browserTools?"Turn off. No worker spawned after this gets a browser.":"Turn on. Workers spawned after this get a headless browser; the director itself gains it when the run is resumed.",style:{...R,justifySelf:"start",background:"none",padding:0,border:"none",borderBottom:"1px dashed var(--line-strong)",cursor:j?"wait":"pointer",font:"inherit",fontFamily:"var(--font-mono)",color:"var(--ink-1)"},children:s.browserTools?"on":"off"}):a.jsx("span",{style:R,children:s.browserTools?"on":"off"}),s.resumes?a.jsxs(a.Fragment,{children:[a.jsx("span",{style:{color:"var(--ink-2)"},children:"resumes"}),a.jsx("span",{style:R,children:s.resumes})]}):null]}),v&&a.jsx("div",{style:{marginTop:4,color:"var(--status-critical)"},children:v})]})}function G1({p:s,models:u,modelsLoading:c,modelsNote:o,modelsInheritNote:f,routeRunId:h,onSelectRun:g,routeTab:j,onSelectTab:m,onBack:v,refreshFleet:w,auth:S,theme:k,onToggleTheme:O,onSettings:Q,settings:Z,version:_}){const R=ym(s.id),W={...Au,...Z.global,...Z.project??{}},X=Object.keys(Z.project??{}),J=a.jsx(S1,{effective:W,overrides:X,onOpen:Q}),le=s.activeRun?.id??null,T=h,U=g;x.useEffect(()=>{le&&g(le)},[le]);const L=T!==null&&T===le,H=vm(T,L),ae=R.find(ne=>ne.id===T),F=L&&H.runStatus==="running",[de,ye]=x.useState(null),[je,re]=x.useState(null),M=j,Y=m,[I,ge]=x.useState(()=>{try{const ne=Number(localStorage.getItem(mp));return ne>=Mu?ne:yp}catch{return yp}}),V=ne=>{const nt=Math.max(Mu,Math.floor(window.innerWidth*.5)),Zt=Math.min(nt,Math.max(Mu,Math.round(ne)));ge(Zt);try{localStorage.setItem(mp,String(Zt))}catch{}},y=ne=>{ne.preventDefault();const nt=ne.clientX,Zt=I,Rn=wi=>V(Zt+(nt-wi.clientX)),Ta=()=>{window.removeEventListener("pointermove",Rn),window.removeEventListener("pointerup",Ta),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",Rn),window.addEventListener("pointerup",Ta)},B=ne=>{typeof ne.id=="number"&&(de&&de!==ne.agent&&ye(null),re({id:ne.id,n:Date.now()}))},P=ne=>ye(de===ne?null:ne),[ee,se]=x.useState(!1),[oe,be]=q1(),[Ge,K]=x.useState(()=>{try{return localStorage.getItem(gp)!=="closed"}catch{return!0}}),Xe=ne=>{K(ne);try{localStorage.setItem(gp,ne?"open":"closed")}catch{}},[Be,te]=x.useState(!1),[Ae,Le]=x.useState(!1),[vt,il]=x.useState(!1),[Ot,sl]=x.useState(!1),[Ml,An]=x.useState(""),[El,Si]=x.useState(!1),Ks=async ne=>{An(""),Si(!0);try{const nt=await Fe.forkPlan(s.id,ne);if(!nt.ok){An((await nt.json()).error);return}U(null)}finally{Si(!1)}},[ht,Sa]=x.useState(""),[ja,_l]=x.useState(!1),Cl=bm(le?null:s.id),[Ws,ka]=x.useState(!1),sn=U1(H1),rn=Ex(T,F),on=H.approvals.length+H.questions.length,[st,Vt]=x.useState(()=>Date.now());x.useEffect(()=>{if(on===0&&!F)return;Vt(Date.now());const ne=setInterval(()=>Vt(Date.now()),1e4);return()=>clearInterval(ne)},[on,F]),x.useEffect(()=>{ye(null)},[T]);const gt=x.useMemo(()=>F?B1(H):null,[F,H]),Js=x.useMemo(()=>qp(H.missionDoc),[H.missionDoc]),Fs=async(ne={})=>{if(!T)return;An(""),se(!0);const nt=await Fe.resume(T,ne).finally(()=>se(!1));nt.ok?w():An((await nt.json()).error)},ji=async ne=>{Sa(""),_l(!0);let nt=ne.mission;try{nt=await Tp(s.id,ne.mission,ne.attachments??[])}catch(Rn){Sa(Rn.message),_l(!1);return}const Zt=await Fe.run(s.id,nt,ne.budget,{directorModel:ne.directorModel,workerModel:ne.workerModel,directorProviderId:ne.directorProviderId,workerProviderId:ne.workerProviderId,browserTools:ne.browserTools}).finally(()=>_l(!1));Zt.ok?w():Sa((await Zt.json()).error)},Al=!le&&T===null,Dl=!le&&T&&(ae?.status==="interrupted"||ae?.status==="error")&&ae?.directorSessionId,Rl=sn&&ae&&(ae.directorModel||ae.workerModel)?a.jsxs("span",{title:`director: ${ae.directorModel||"default"} · workers: ${ae.workerModel||"default"}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:"var(--r-pill)",border:"1px solid var(--line)",background:"var(--bg-inset)",fontSize:"var(--fs-xs)",fontFamily:"var(--font-mono)",color:"var(--ink-1)",maxWidth:260,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[a.jsx(ie,{name:"model",size:11}),ae.directorModel||"default"," · ",ae.workerModel||"default"]}):null,un=ae&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[a.jsx("div",{style:{fontSize:"var(--fs-sm)",fontWeight:"var(--fw-semibold)",color:"var(--ink-0)",lineHeight:"var(--lh)"},title:ae.mission,children:ae.title||ae.mission.split(`
67
+ `).find(ne=>ne.trim())||"Untitled run"}),a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",fontSize:"var(--fs-xs)",color:"var(--ink-2)",fontVariantNumeric:"tabular-nums",flexWrap:"wrap"},children:[a.jsx("span",{children:new Date(ae.createdAt).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}),a.jsx(ba,{status:L?H.runStatus:ae.status}),!L&&a.jsx("span",{children:"read-only"})]})]}),cn=a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[R.length===0&&a.jsx(ft,{children:"No runs yet."}),R.map(ne=>a.jsx(o1,{mission:ne.mission,title:ne.title,createdAt:ne.createdAt,costUsd:ne.costUsd,costBasis:zl(ne),usage:ne.usage,status:ne.status,selected:ne.id===T,current:ne.id===le,onSelect:ne.id===T?void 0:()=>U(ne.id)},ne.id))]}),Dn=(ne,nt)=>a.jsxs("aside",{style:{position:"relative",borderLeft:"1px solid var(--line)",background:"var(--bg-panel)",minHeight:0,minWidth:0,display:"flex",flexDirection:"column"},children:[a.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize the rail",title:"Drag to resize",onPointerDown:y,style:{position:"absolute",left:-4,top:0,bottom:0,width:8,cursor:"col-resize",zIndex:2}}),ne&&a.jsx("div",{style:{padding:"var(--sp-2) var(--sp-3) 0",flex:"0 0 auto"},children:ne}),a.jsx("div",{style:{minHeight:0,overflowY:"auto",padding:"var(--sp-3)"},children:nt})]}),ki=a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-3)"},children:[un,a.jsx(v1,{doc:H.missionDoc}),a.jsx(bi,{label:"Mission doc",open:Be,onToggle:()=>te(!Be),children:a.jsx(qx,{doc:H.missionDoc??void 0})}),a.jsx(O1,{agents:H.agents,filter:de,onFilter:P,sessionId:H.directorSessionId,details:ae&&a.jsx($1,{r:ae,live:L,liveCost:H.costUsd,liveBasis:H.costBasis,liveUsage:H.usage,liveTurns:ae.turns,onChanged:w})}),J]}),wa=T?a.jsx(b1,{runId:T,deck:rn.deck,loading:rn.loading,error:rn.error,missing:rn.missing,services:H.services}):null,Ol=rn.deck?rn.deck.totals.files+rn.deck.artifacts.length:0,rl=a.jsx(_n,{size:"sm",value:M,onChange:ne=>Y(ne),tabs:[{value:"mission",label:"Mission"},{value:"files",label:"Files",count:Ol},{value:"runs",label:"Runs",count:R.length}]}),Is=a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flex:"0 0 auto",flexWrap:"wrap",padding:"6px var(--sp-3) 0",fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:[H.agents.length>1&&a.jsx(r1,{agents:H.agents,filter:de,onFilter:P}),a.jsx("span",{style:{flex:1}}),H.entries.length>0&&a.jsxs(a.Fragment,{children:[a.jsx(he,{variant:"ghost",size:"sm",icon:"timeline",title:Ge?"Hide the timeline":"Show the swimlane timeline — click a tick to jump to its entry",onClick:()=>Xe(!Ge),children:"Timeline"}),a.jsx(he,{variant:"ghost",size:"sm",icon:"sort",title:oe==="newest"?"Newest first — click to read oldest first":"Oldest first — click to read newest first",onClick:()=>be(oe==="newest"?"oldest":"newest"),children:oe==="newest"?"Newest first":"Oldest first"})]})]}),za=a.jsxs("div",{style:{minHeight:0,minWidth:0,display:"flex",flexDirection:"column"},children:[Is,Ge&&H.entries.length>0&&a.jsx("div",{style:{padding:"6px var(--sp-3) 0",flex:"0 0 auto"},children:a.jsx("div",{style:{background:"var(--bg-panel)",border:"1px solid var(--line)",borderRadius:"var(--r-sm)",padding:"8px 10px"},children:a.jsx(Cx,{agents:H.agents,entries:H.entries,live:F,selected:de,onSelect:P,onTick:B})})}),!sn&&a.jsxs("div",{style:{padding:"6px var(--sp-3) 0",flex:"0 0 auto",display:"flex",flexDirection:"column",gap:6},children:[a.jsx(bi,{label:p1(Js),open:Ae,onToggle:()=>Le(!Ae),children:ki}),a.jsx(bi,{label:`Files · ${Ol}`,open:vt,onToggle:()=>il(!vt),children:wa}),a.jsx(bi,{label:`Runs · ${R.length}`,open:Ot,onToggle:()=>sl(!Ot),children:cn})]}),a.jsx(L1,{run:H,filter:de,jump:je,order:oe})]});return a.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[a.jsxs(_p,{mode:"project",title:s.name,folder:s.folder,onBack:v,theme:k,onToggleTheme:O,onSettings:Q,version:_,children:[Ml&&a.jsx(ln,{tone:"error",inline:!0,children:Ml}),(()=>{const ne=s.billingMode??S.mode;return(ne==="api-key"||ne==="none")&&a.jsx(Cu,{mode:ne,compact:!0,account:S.account,source:pp(s,S.source)})})(),T&&(H.runStatus==="running"&&on>0?a.jsx("span",{title:`Waiting on you: ${H.approvals.length} approval(s), ${H.questions.length} question(s)`,children:a.jsx(ba,{status:"needs-you"})}):a.jsx(ba,{status:H.runStatus})),T&&a.jsx(Ap,{spent:H.costUsd,budget:H.budgetUsd,detail:!0,costBasis:H.costBasis,usage:H.usage,turns:ae?.turns,elapsedMs:ae?.createdAt?(F?st:ae.endedAt??st)-ae.createdAt:void 0}),Rl,F&&a.jsx(he,{variant:"danger",onClick:()=>{Fe.interrupt(T)},children:"Interrupt"}),Dl&&a.jsx(N1,{director:ae?.directorModel,worker:ae?.workerModel,models:u,loading:c,note:o,busy:ee,onResume:ne=>{Fs(ne)}}),!le&&T&&ae&&ae.status!=="running"&&a.jsx(he,{variant:"good",icon:"write",disabled:El,title:"Start a new planning conversation that builds on what this mission did",onClick:()=>{Ks(T)},children:El?"Opening…":"Plan the next step"}),!le&&T&&a.jsx(he,{variant:"primary",onClick:()=>U(null),children:"New mission"})]}),T&&a.jsx(h1,{approvals:H.approvals,questions:H.questions,now:st,running:F,activity:gt,onAllow:ne=>{Fe.permission(ne,"allow")},onAlways:ne=>{Fe.permission(ne,"allow_always")},onDeny:ne=>{Fe.permission(ne,"deny")},onAnswer:(ne,nt)=>{Fe.answer(ne,nt)}}),T&&!L&&a.jsxs(ln,{tone:"readonly",children:["Viewing a past run (read-only).",a.jsx(he,{variant:"ghost",size:"sm",icon:"back",style:{marginLeft:"var(--sp-2)"},onClick:()=>U(le??null),children:le?"Back to the live run":"Back to planning"})]}),Al?a.jsxs("div",{style:{flex:1,minHeight:0,minWidth:0,display:sn?"grid":"flex",flexDirection:"column",gridTemplateColumns:sn?`minmax(0, 1fr) ${I}px`:void 0},children:[a.jsxs("div",{style:{minHeight:0,minWidth:0,display:"flex",flexDirection:"column"},children:[!sn&&R.length>0&&a.jsx("div",{style:{padding:"6px var(--sp-3) 0",flex:"0 0 auto"},children:a.jsx(bi,{label:`Runs · ${R.length}`,open:Ot,onToggle:()=>sl(!Ot),children:cn})}),Ws?a.jsxs("div",{style:{flex:1,minHeight:0,overflowY:"auto",display:"flex",flexDirection:"column"},children:[a.jsx("div",{style:{padding:"var(--sp-2) var(--sp-3) 0",flex:"0 0 auto"},children:a.jsx(he,{variant:"ghost",size:"sm",icon:"back",onClick:()=>ka(!1),children:"Back to the conversation"})}),a.jsxs("div",{style:{margin:"auto",width:"100%",padding:"var(--sp-4) 0 var(--sp-5)"},children:[a.jsx(Px,{folder:s.folder,defaultBudgetUsd:s.defaultBudgetUsd,error:ht,busy:ja,models:u,modelsLoading:c,modelsNote:o,modelsInheritNote:f,onStart:ne=>{ji(ne)},style:{background:"var(--bg-panel)",border:"1px solid var(--line)",borderRadius:"var(--r-md)",padding:"var(--sp-5)",margin:"0 auto",boxSizing:"border-box"}}),a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",flexWrap:"wrap",margin:"var(--sp-3) auto 0",maxWidth:"var(--composer-max)",fontSize:"var(--fs-xs)",color:"var(--ink-2)"},children:[a.jsx(Cu,{mode:s.billingMode??S.mode,compact:!0,account:S.account,source:pp(s,S.source)}),a.jsxs("span",{style:{fontFamily:"var(--font-mono)"},children:["runs on ",jp(s.provider)??"the server default instance"]})]})]})]}):a.jsx(a.Fragment,{children:a.jsx(Y1,{chat:Cl,folder:s.folder,starting:ja,error:ht,models:u,modelsLoading:c,modelsNote:o,modelsInheritNote:f,onStart:ne=>{ji(ne)},onCompose:()=>ka(!0),hasRuns:R.length>0,projectId:s.id,onSettings:Q})})]}),sn&&Dn(null,a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-4)"},children:[J,a.jsxs("section",{children:[a.jsxs("div",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-2)",textTransform:"uppercase",letterSpacing:"var(--ls-caps)",padding:"0 0 6px"},children:["Runs · ",R.length]}),R.length>0?cn:a.jsx(ft,{children:"No runs yet — the first mission you start here will be the first."})]})]}))]}):a.jsxs("main",{style:{flex:1,minHeight:0,minWidth:0,display:"flex",flexDirection:"column"},children:[sn?a.jsxs("div",{style:{flex:1,minHeight:0,display:"grid",gridTemplateColumns:`minmax(0, 1fr) ${I}px`},children:[za,Dn(rl,M==="mission"?ki:M==="files"?wa:cn)]}):a.jsx("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:za}),L&&a.jsx("div",{style:{padding:"var(--sp-2) var(--sp-3) var(--sp-3)",flex:"0 0 auto"},children:a.jsx(a1,{agents:[{id:"director",status:H.runStatus==="running"?"running":"done"}],to:"director",onTo:()=>{},timing:"next",onTiming:()=>{},disabled:H.runStatus!=="running",disabledReason:"Run finished — start a new mission.",onSend:ne=>{Fe.steer(T,ne)}})})]})]})}const bp={small:.88,default:1,large:1.15,larger:1.3};function X1(){const s=x.useCallback(u=>{const c=bp[u]??1;document.documentElement.style.setProperty("--ui-scale",String(c));try{localStorage.setItem("foreman:textSize",u)}catch{}},[]);return x.useEffect(()=>{let u=null;try{u=localStorage.getItem("foreman:textSize")}catch{}u&&u in bp&&s(u)},[s]),s}function Q1(){const[s,u]=x.useState(()=>localStorage.getItem("foreman:theme")||"light");x.useEffect(()=>{document.documentElement.dataset.theme=s,localStorage.setItem("foreman:theme",s)},[s]);const c=x.useCallback(o=>{u(o==="system"?window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark":o)},[]);return[s,()=>u(o=>o==="dark"?"light":"dark"),c]}function V1(s){const[u,c]=x.useState({models:null,loading:!0});return x.useEffect(()=>{let o=!0;c(h=>({...h,loading:!0}));const f=s?`/models?projectId=${encodeURIComponent(s)}`:"/models";return fetch(f).then(h=>h.ok?h.json():null).then(h=>{if(o){if(!h)return c({models:null,loading:!1});c({models:h.models,loading:!1,note:h.reachable===!1?`Cannot reach ${h.endpoint??"this project’s endpoint"}.`:h.models?.length===0?"This endpoint has no models installed.":void 0,inheritNote:h.provider&&h.provider!=="claude-code"?"inherits this project’s provider default":void 0})}}).catch(()=>o&&c({models:null,loading:!1})),()=>{o=!1}},[s]),u}function Z1(s){const[u,c]=x.useState({instances:[],ollama:null,codex:null});return x.useEffect(()=>{if(!s)return;let o=!0;return fetch("/instances").then(f=>f.ok?f.json():null).then(f=>{o&&f&&c({instances:f.instances??[],ollama:f.ollama??null,codex:f.codex??null})}).catch(()=>{}),()=>{o=!1}},[s]),u}function K1(){const{projects:s,connected:u,auth:c,refresh:o,activity:f,update:h,version:g}=mm(),{projectId:j,runId:m,tab:v,go:w,goRun:S}=jm(),[k,O,Q]=Q1(),Z=X1(),_=V1(j),[R,W]=x.useState({global:{},projects:{}}),[X,J]=x.useState(!1),le=Z1(X);x.useEffect(()=>{fetch("/settings").then(re=>re.ok?re.json():null).then(re=>re&&W(re)).catch(()=>{})},[]);const T=j?s.find(re=>re.id===j):null,[U,L]=x.useState(!1),[H,ae]=x.useState(""),F=async(re,M)=>{ae(""),L(!0);const Y=await(M===null?Fe.clearProviderKey(re):Fe.setProviderKey(re,M)).finally(()=>L(!1));Y.ok?o():ae((await Y.json().catch(()=>({}))).error??"could not save the key")},de=async re=>{const M={global:re.global,projects:{...R.projects}};T&&(Object.keys(re.project).length?M.projects[T.id]=re.project:delete M.projects[T.id]),W(M),J(!1),re.global.theme&&Q(re.global.theme),re.global.textSize&&Z(re.global.textSize),await fetch("/settings",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({global:re.global,projectId:T?.id,project:T?M.projects[T.id]??{}:void 0})}).catch(()=>{}),T&&re.provider!==void 0&&(await Fe.updateProject(T.id,{provider:re.provider}).catch(()=>{}),o())},ye={theme:k,onToggleTheme:O,onSettings:()=>J(!0),auth:c,version:g},je=Sm();return a.jsxs("div",{style:{height:"100%"},children:[T?a.jsx(G1,{p:T,models:_.models,modelsLoading:_.loading,modelsNote:_.note,modelsInheritNote:_.inheritNote,routeRunId:m,onSelectRun:re=>S(T.id,re),routeTab:v,onSelectTab:re=>m&&S(T.id,m,re),onBack:()=>w(null),refreshFleet:o,settings:{global:R.global,project:R.projects[T.id]},...ye}):a.jsx(Tx,{projects:s,connected:u,activity:f,update:h,onOpen:re=>w(re),onOpenRun:(re,M)=>S(re,M),refresh:o,...ye}),X&&a.jsx(C1,{scope:T?"project":"global",global:R.global,project:T?R.projects[T.id]:void 0,projectName:T?.name,models:_.models,modelsLoading:_.loading,modelsNote:_.note,provider:T?.provider??null,providerInstances:le.instances,providerOllama:le.ollama,providerCodex:le.codex,providerHasKey:T?.providerHasKey,providerKeyBusy:U,providerKeyError:H,onStoreProviderKey:(re,M)=>{F(re,M)},onClearProviderKey:re=>{F(re,null)},notify:je,onSave:re=>{de(re)},onClose:()=>J(!1)})]})}um.createRoot(document.getElementById("root")).render(a.jsx(x.StrictMode,{children:a.jsx(K1,{})}));