hivemind-pipeline 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
(function(){const f=document.createElement("link").relList;if(f&&f.supports&&f.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))r(m);new MutationObserver(m=>{for(const x of m)if(x.type==="childList")for(const N of x.addedNodes)N.tagName==="LINK"&&N.rel==="modulepreload"&&r(N)}).observe(document,{childList:!0,subtree:!0});function d(m){const x={};return m.integrity&&(x.integrity=m.integrity),m.referrerPolicy&&(x.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?x.credentials="include":m.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function r(m){if(m.ep)return;m.ep=!0;const x=d(m);fetch(m.href,x)}})();var fr={exports:{}},cs={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Cm;function xp(){if(Cm)return cs;Cm=1;var u=Symbol.for("react.transitional.element"),f=Symbol.for("react.fragment");function d(r,m,x){var N=null;if(x!==void 0&&(N=""+x),m.key!==void 0&&(N=""+m.key),"key"in m){x={};for(var E in m)E!=="key"&&(x[E]=m[E])}else x=m;return m=x.ref,{$$typeof:u,type:r,key:N,ref:m!==void 0?m:null,props:x}}return cs.Fragment=f,cs.jsx=d,cs.jsxs=d,cs}var zm;function yp(){return zm||(zm=1,fr.exports=xp()),fr.exports}var i=yp(),dr={exports:{}},ce={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Am;function pp(){if(Am)return ce;Am=1;var u=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),N=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),w=Symbol.iterator;function O(g){return g===null||typeof g!="object"?null:(g=w&&g[w]||g["@@iterator"],typeof g=="function"?g:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Q=Object.assign,J={};function I(g,C,q){this.props=g,this.context=C,this.refs=J,this.updater=q||k}I.prototype.isReactComponent={},I.prototype.setState=function(g,C){if(typeof g!="object"&&typeof g!="function"&&g!=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,g,C,"setState")},I.prototype.forceUpdate=function(g){this.updater.enqueueForceUpdate(this,g,"forceUpdate")};function Y(){}Y.prototype=I.prototype;function te(g,C,q){this.props=g,this.context=C,this.refs=J,this.updater=q||k}var oe=te.prototype=new Y;oe.constructor=te,Q(oe,I.prototype),oe.isPureReactComponent=!0;var Z=Array.isArray;function L(){}var _={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function ne(g,C,q){var X=q.ref;return{$$typeof:u,type:g,key:C,ref:X!==void 0?X:null,props:q}}function de(g,C){return ne(g.type,C,g.props)}function Ce(g){return typeof g=="object"&&g!==null&&g.$$typeof===u}function De(g){var C={"=":"=0",":":"=2"};return"$"+g.replace(/[=:]/g,function(q){return C[q]})}var qe=/\/+/g;function se(g,C){return typeof g=="object"&&g!==null&&g.key!=null?De(""+g.key):C.toString(36)}function ie(g){switch(g.status){case"fulfilled":return g.value;case"rejected":throw g.reason;default:switch(typeof g.status=="string"?g.then(L,L):(g.status="pending",g.then(function(C){g.status==="pending"&&(g.status="fulfilled",g.value=C)},function(C){g.status==="pending"&&(g.status="rejected",g.reason=C)})),g.status){case"fulfilled":return g.value;case"rejected":throw g.reason}}throw g}function M(g,C,q,X,le){var ue=typeof g;(ue==="undefined"||ue==="boolean")&&(g=null);var be=!1;if(g===null)be=!0;else switch(ue){case"bigint":case"string":case"number":be=!0;break;case"object":switch(g.$$typeof){case u:case f:be=!0;break;case H:return be=g._init,M(be(g._payload),C,q,X,le)}}if(be)return le=le(g),be=X===""?"."+se(g,0):X,Z(le)?(q="",be!=null&&(q=be.replace(qe,"$&/")+"/"),M(le,C,q,"",function(Xl){return Xl})):le!=null&&(Ce(le)&&(le=de(le,q+(le.key==null||g&&g.key===le.key?"":(""+le.key).replace(qe,"$&/")+"/")+be)),C.push(le)),1;be=0;var $e=X===""?".":X+":";if(Z(g))for(var Ue=0;Ue<g.length;Ue++)X=g[Ue],ue=$e+se(X,Ue),be+=M(X,C,q,ue,le);else if(Ue=O(g),typeof Ue=="function")for(g=Ue.call(g),Ue=0;!(X=g.next()).done;)X=X.value,ue=$e+se(X,Ue++),be+=M(X,C,q,ue,le);else if(ue==="object"){if(typeof g.then=="function")return M(ie(g),C,q,X,le);throw C=String(g),Error("Objects are not valid as a React child (found: "+(C==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":C)+"). If you meant to render a collection of children, use an array instead.")}return be}function G(g,C,q){if(g==null)return g;var X=[],le=0;return M(g,X,"","",function(ue){return C.call(q,ue,le++)}),X}function $(g){if(g._status===-1){var C=g._result;C=C(),C.then(function(q){(g._status===0||g._status===-1)&&(g._status=1,g._result=q)},function(q){(g._status===0||g._status===-1)&&(g._status=2,g._result=q)}),g._status===-1&&(g._status=0,g._result=C)}if(g._status===1)return g._result.default;throw g._result}var ge=typeof reportError=="function"?reportError:function(g){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var C=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof g=="object"&&g!==null&&typeof g.message=="string"?String(g.message):String(g),error:g});if(!window.dispatchEvent(C))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",g);return}console.error(g)},he={map:G,forEach:function(g,C,q){G(g,function(){C.apply(this,arguments)},q)},count:function(g){var C=0;return G(g,function(){C++}),C},toArray:function(g){return G(g,function(C){return C})||[]},only:function(g){if(!Ce(g))throw Error("React.Children.only expected to receive a single React element child.");return g}};return ce.Activity=j,ce.Children=he,ce.Component=I,ce.Fragment=d,ce.Profiler=m,ce.PureComponent=te,ce.StrictMode=r,ce.Suspense=p,ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,ce.__COMPILER_RUNTIME={__proto__:null,c:function(g){return _.H.useMemoCache(g)}},ce.cache=function(g){return function(){return g.apply(null,arguments)}},ce.cacheSignal=function(){return null},ce.cloneElement=function(g,C,q){if(g==null)throw Error("The argument must be a React element, but you passed "+g+".");var X=Q({},g.props),le=g.key;if(C!=null)for(ue in C.key!==void 0&&(le=""+C.key),C)!V.call(C,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&C.ref===void 0||(X[ue]=C[ue]);var ue=arguments.length-2;if(ue===1)X.children=q;else if(1<ue){for(var be=Array(ue),$e=0;$e<ue;$e++)be[$e]=arguments[$e+2];X.children=be}return ne(g.type,le,X)},ce.createContext=function(g){return g={$$typeof:N,_currentValue:g,_currentValue2:g,_threadCount:0,Provider:null,Consumer:null},g.Provider=g,g.Consumer={$$typeof:x,_context:g},g},ce.createElement=function(g,C,q){var X,le={},ue=null;if(C!=null)for(X in C.key!==void 0&&(ue=""+C.key),C)V.call(C,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(le[X]=C[X]);var be=arguments.length-2;if(be===1)le.children=q;else if(1<be){for(var $e=Array(be),Ue=0;Ue<be;Ue++)$e[Ue]=arguments[Ue+2];le.children=$e}if(g&&g.defaultProps)for(X in be=g.defaultProps,be)le[X]===void 0&&(le[X]=be[X]);return ne(g,ue,le)},ce.createRef=function(){return{current:null}},ce.forwardRef=function(g){return{$$typeof:E,render:g}},ce.isValidElement=Ce,ce.lazy=function(g){return{$$typeof:H,_payload:{_status:-1,_result:g},_init:$}},ce.memo=function(g,C){return{$$typeof:h,type:g,compare:C===void 0?null:C}},ce.startTransition=function(g){var C=_.T,q={};_.T=q;try{var X=g(),le=_.S;le!==null&&le(q,X),typeof X=="object"&&X!==null&&typeof X.then=="function"&&X.then(L,ge)}catch(ue){ge(ue)}finally{C!==null&&q.types!==null&&(C.types=q.types),_.T=C}},ce.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},ce.use=function(g){return _.H.use(g)},ce.useActionState=function(g,C,q){return _.H.useActionState(g,C,q)},ce.useCallback=function(g,C){return _.H.useCallback(g,C)},ce.useContext=function(g){return _.H.useContext(g)},ce.useDebugValue=function(){},ce.useDeferredValue=function(g,C){return _.H.useDeferredValue(g,C)},ce.useEffect=function(g,C){return _.H.useEffect(g,C)},ce.useEffectEvent=function(g){return _.H.useEffectEvent(g)},ce.useId=function(){return _.H.useId()},ce.useImperativeHandle=function(g,C,q){return _.H.useImperativeHandle(g,C,q)},ce.useInsertionEffect=function(g,C){return _.H.useInsertionEffect(g,C)},ce.useLayoutEffect=function(g,C){return _.H.useLayoutEffect(g,C)},ce.useMemo=function(g,C){return _.H.useMemo(g,C)},ce.useOptimistic=function(g,C){return _.H.useOptimistic(g,C)},ce.useReducer=function(g,C,q){return _.H.useReducer(g,C,q)},ce.useRef=function(g){return _.H.useRef(g)},ce.useState=function(g){return _.H.useState(g)},ce.useSyncExternalStore=function(g,C,q){return _.H.useSyncExternalStore(g,C,q)},ce.useTransition=function(){return _.H.useTransition()},ce.version="19.2.4",ce}var Tm;function Ar(){return Tm||(Tm=1,dr.exports=pp()),dr.exports}var b=Ar(),mr={exports:{}},us={},xr={exports:{}},yr={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Em;function vp(){return Em||(Em=1,(function(u){function f(M,G){var $=M.length;M.push(G);e:for(;0<$;){var ge=$-1>>>1,he=M[ge];if(0<m(he,G))M[ge]=G,M[$]=he,$=ge;else break e}}function d(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var G=M[0],$=M.pop();if($!==G){M[0]=$;e:for(var ge=0,he=M.length,g=he>>>1;ge<g;){var C=2*(ge+1)-1,q=M[C],X=C+1,le=M[X];if(0>m(q,$))X<he&&0>m(le,q)?(M[ge]=le,M[X]=$,ge=X):(M[ge]=q,M[C]=$,ge=C);else if(X<he&&0>m(le,$))M[ge]=le,M[X]=$,ge=X;else break e}}return G}function m(M,G){var $=M.sortIndex-G.sortIndex;return $!==0?$:M.id-G.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var x=performance;u.unstable_now=function(){return x.now()}}else{var N=Date,E=N.now();u.unstable_now=function(){return N.now()-E}}var p=[],h=[],H=1,j=null,w=3,O=!1,k=!1,Q=!1,J=!1,I=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,te=typeof setImmediate<"u"?setImmediate:null;function oe(M){for(var G=d(h);G!==null;){if(G.callback===null)r(h);else if(G.startTime<=M)r(h),G.sortIndex=G.expirationTime,f(p,G);else break;G=d(h)}}function Z(M){if(Q=!1,oe(M),!k)if(d(p)!==null)k=!0,L||(L=!0,De());else{var G=d(h);G!==null&&ie(Z,G.startTime-M)}}var L=!1,_=-1,V=5,ne=-1;function de(){return J?!0:!(u.unstable_now()-ne<V)}function Ce(){if(J=!1,L){var M=u.unstable_now();ne=M;var G=!0;try{e:{k=!1,Q&&(Q=!1,Y(_),_=-1),O=!0;var $=w;try{t:{for(oe(M),j=d(p);j!==null&&!(j.expirationTime>M&&de());){var ge=j.callback;if(typeof ge=="function"){j.callback=null,w=j.priorityLevel;var he=ge(j.expirationTime<=M);if(M=u.unstable_now(),typeof he=="function"){j.callback=he,oe(M),G=!0;break t}j===d(p)&&r(p),oe(M)}else r(p);j=d(p)}if(j!==null)G=!0;else{var g=d(h);g!==null&&ie(Z,g.startTime-M),G=!1}}break e}finally{j=null,w=$,O=!1}G=void 0}}finally{G?De():L=!1}}}var De;if(typeof te=="function")De=function(){te(Ce)};else if(typeof MessageChannel<"u"){var qe=new MessageChannel,se=qe.port2;qe.port1.onmessage=Ce,De=function(){se.postMessage(null)}}else De=function(){I(Ce,0)};function ie(M,G){_=I(function(){M(u.unstable_now())},G)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(M){M.callback=null},u.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"):V=0<M?Math.floor(1e3/M):5},u.unstable_getCurrentPriorityLevel=function(){return w},u.unstable_next=function(M){switch(w){case 1:case 2:case 3:var G=3;break;default:G=w}var $=w;w=G;try{return M()}finally{w=$}},u.unstable_requestPaint=function(){J=!0},u.unstable_runWithPriority=function(M,G){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var $=w;w=M;try{return G()}finally{w=$}},u.unstable_scheduleCallback=function(M,G,$){var ge=u.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?ge+$:ge):$=ge,M){case 1:var he=-1;break;case 2:he=250;break;case 5:he=1073741823;break;case 4:he=1e4;break;default:he=5e3}return he=$+he,M={id:H++,callback:G,priorityLevel:M,startTime:$,expirationTime:he,sortIndex:-1},$>ge?(M.sortIndex=$,f(h,M),d(p)===null&&M===d(h)&&(Q?(Y(_),_=-1):Q=!0,ie(Z,$-ge))):(M.sortIndex=he,f(p,M),k||O||(k=!0,L||(L=!0,De()))),M},u.unstable_shouldYield=de,u.unstable_wrapCallback=function(M){var G=w;return function(){var $=w;w=G;try{return M.apply(this,arguments)}finally{w=$}}}})(yr)),yr}var Mm;function hp(){return Mm||(Mm=1,xr.exports=vp()),xr.exports}var pr={exports:{}},at={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var km;function gp(){if(km)return at;km=1;var u=Ar();function f(p){var h="https://react.dev/errors/"+p;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var H=2;H<arguments.length;H++)h+="&args[]="+encodeURIComponent(arguments[H])}return"Minified React error #"+p+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var r={d:{f:d,r:function(){throw Error(f(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},m=Symbol.for("react.portal");function x(p,h,H){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:j==null?null:""+j,children:p,containerInfo:h,implementation:H}}var N=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function E(p,h){if(p==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return at.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,at.createPortal=function(p,h){var H=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(f(299));return x(p,h,null,H)},at.flushSync=function(p){var h=N.T,H=r.p;try{if(N.T=null,r.p=2,p)return p()}finally{N.T=h,r.p=H,r.d.f()}},at.preconnect=function(p,h){typeof p=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(p,h))},at.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},at.preinit=function(p,h){if(typeof p=="string"&&h&&typeof h.as=="string"){var H=h.as,j=E(H,h.crossOrigin),w=typeof h.integrity=="string"?h.integrity:void 0,O=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;H==="style"?r.d.S(p,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:j,integrity:w,fetchPriority:O}):H==="script"&&r.d.X(p,{crossOrigin:j,integrity:w,fetchPriority:O,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},at.preinitModule=function(p,h){if(typeof p=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var H=E(h.as,h.crossOrigin);r.d.M(p,{crossOrigin:H,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(p)},at.preload=function(p,h){if(typeof p=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var H=h.as,j=E(H,h.crossOrigin);r.d.L(p,H,{crossOrigin:j,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},at.preloadModule=function(p,h){if(typeof p=="string")if(h){var H=E(h.as,h.crossOrigin);r.d.m(p,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:H,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(p)},at.requestFormReset=function(p){r.d.r(p)},at.unstable_batchedUpdates=function(p,h){return p(h)},at.useFormState=function(p,h,H){return N.H.useFormState(p,h,H)},at.useFormStatus=function(){return N.H.useHostTransitionStatus()},at.version="19.2.4",at}var wm;function bp(){if(wm)return pr.exports;wm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(f){console.error(f)}}return u(),pr.exports=gp(),pr.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Dm;function Sp(){if(Dm)return us;Dm=1;var u=hp(),f=Ar(),d=bp();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function x(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function N(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 E(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 p(e){if(x(e)!==e)throw Error(r(188))}function h(e){var t=e.alternate;if(!t){if(t=x(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,a=t;;){var n=l.return;if(n===null)break;var s=n.alternate;if(s===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===s.child){for(s=n.child;s;){if(s===l)return p(n),e;if(s===a)return p(n),t;s=s.sibling}throw Error(r(188))}if(l.return!==a.return)l=n,a=s;else{for(var c=!1,o=n.child;o;){if(o===l){c=!0,l=n,a=s;break}if(o===a){c=!0,a=n,l=s;break}o=o.sibling}if(!c){for(o=s.child;o;){if(o===l){c=!0,l=s,a=n;break}if(o===a){c=!0,a=s,l=n;break}o=o.sibling}if(!c)throw Error(r(189))}}if(l.alternate!==a)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function H(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=H(e),t!==null)return t;e=e.sibling}return null}var j=Object.assign,w=Symbol.for("react.element"),O=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),J=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),te=Symbol.for("react.context"),oe=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),de=Symbol.for("react.memo_cache_sentinel"),Ce=Symbol.iterator;function De(e){return e===null||typeof e!="object"?null:(e=Ce&&e[Ce]||e["@@iterator"],typeof e=="function"?e:null)}var qe=Symbol.for("react.client.reference");function se(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===qe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Q:return"Fragment";case I:return"Profiler";case J:return"StrictMode";case Z:return"Suspense";case L:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case te:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case oe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _:return t=e.displayName||null,t!==null?t:se(e.type)||"Memo";case V:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var ie=Array.isArray,M=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},ge=[],he=-1;function g(e){return{current:e}}function C(e){0>he||(e.current=ge[he],ge[he]=null,he--)}function q(e,t){he++,ge[he]=e.current,e.current=t}var X=g(null),le=g(null),ue=g(null),be=g(null);function $e(e,t){switch(q(ue,t),q(le,e),q(X,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kd(t),e=Jd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}C(X),q(X,e)}function Ue(){C(X),C(le),C(ue)}function Xl(e){e.memoizedState!==null&&q(be,e);var t=X.current,l=Jd(t,e.type);t!==l&&(q(le,e),q(X,l))}function ma(e){le.current===e&&(C(X),C(le)),be.current===e&&(C(be),as._currentValue=$)}var fn,bs;function Zt(e){if(fn===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);fn=t&&t[1]||"",bs=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+fn+e+bs}var dn=!1;function mn(e,t){if(!e||dn)return"";dn=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(D){var T=D}Reflect.construct(e,[],B)}else{try{B.call()}catch(D){T=D}e.call(B.prototype)}}else{try{throw Error()}catch(D){T=D}(B=e())&&typeof B.catch=="function"&&B.catch(function(){})}}catch(D){if(D&&T&&typeof D.stack=="string")return[D.stack,T.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=a.DetermineComponentFrameRoot(),c=s[0],o=s[1];if(c&&o){var y=c.split(`
|
|
44
|
+
`),A=o.split(`
|
|
45
|
+
`);for(n=a=0;a<y.length&&!y[a].includes("DetermineComponentFrameRoot");)a++;for(;n<A.length&&!A[n].includes("DetermineComponentFrameRoot");)n++;if(a===y.length||n===A.length)for(a=y.length-1,n=A.length-1;1<=a&&0<=n&&y[a]!==A[n];)n--;for(;1<=a&&0<=n;a--,n--)if(y[a]!==A[n]){if(a!==1||n!==1)do if(a--,n--,0>n||y[a]!==A[n]){var R=`
|
|
46
|
+
`+y[a].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),R}while(1<=a&&0<=n);break}}}finally{dn=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Zt(l):""}function Wi(e,t){switch(e.tag){case 26:case 27:case 5:return Zt(e.type);case 16:return Zt("Lazy");case 13:return e.child!==t&&t!==null?Zt("Suspense Fallback"):Zt("Suspense");case 19:return Zt("SuspenseList");case 0:case 15:return mn(e.type,!1);case 11:return mn(e.type.render,!1);case 1:return mn(e.type,!0);case 31:return Zt("Activity");default:return""}}function Ss(e){try{var t="",l=null;do t+=Wi(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}var xn=Object.prototype.hasOwnProperty,yn=u.unstable_scheduleCallback,pn=u.unstable_cancelCallback,Fi=u.unstable_shouldYield,$i=u.unstable_requestPaint,nt=u.unstable_now,Ii=u.unstable_getCurrentPriorityLevel,js=u.unstable_ImmediatePriority,Ns=u.unstable_UserBlockingPriority,xa=u.unstable_NormalPriority,Pi=u.unstable_LowPriority,Cs=u.unstable_IdlePriority,ec=u.log,tc=u.unstable_setDisableYieldValue,Ql=null,st=null;function qt(e){if(typeof ec=="function"&&tc(e),st&&typeof st.setStrictMode=="function")try{st.setStrictMode(Ql,e)}catch{}}var it=Math.clz32?Math.clz32:As,zs=Math.log,lc=Math.LN2;function As(e){return e>>>=0,e===0?32:31-(zs(e)/lc|0)|0}var ya=256,pa=262144,va=4194304;function Vt(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 ha(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,s=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var o=a&134217727;return o!==0?(a=o&~s,a!==0?n=Vt(a):(c&=o,c!==0?n=Vt(c):l||(l=o&~e,l!==0&&(n=Vt(l))))):(o=a&~s,o!==0?n=Vt(o):c!==0?n=Vt(c):l||(l=a&~e,l!==0&&(n=Vt(l)))),n===0?0:t!==0&&t!==n&&(t&s)===0&&(s=n&-n,l=t&-t,s>=l||s===32&&(l&4194048)!==0)?t:n}function Zl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function xl(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 yl(){var e=va;return va<<=1,(va&62914560)===0&&(va=4194304),e}function ga(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Dt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ba(e,t,l,a,n,s){var c=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var o=e.entanglements,y=e.expirationTimes,A=e.hiddenUpdates;for(l=c&~l;0<l;){var R=31-it(l),B=1<<R;o[R]=0,y[R]=-1;var T=A[R];if(T!==null)for(A[R]=null,R=0;R<T.length;R++){var D=T[R];D!==null&&(D.lane&=-536870913)}l&=~B}a!==0&&Vl(e,a,0),s!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=s&~(c&~t))}function Vl(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-it(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Sa(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-it(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function pl(e,t){var l=t&-t;return l=(l&42)!==0?1:vn(l),(l&(e.suspendedLanes|t))!==0?0:l}function vn(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 hn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ke(){var e=G.p;return e!==0?e:(e=window.event,e===void 0?32:vm(e.type))}function Kl(e,t){var l=G.p;try{return G.p=e,t()}finally{G.p=l}}var _t=Math.random().toString(36).slice(2),Ge="__reactFiber$"+_t,Ie="__reactProps$"+_t,Kt="__reactContainer$"+_t,K="__reactEvents$"+_t,Te="__reactListeners$"+_t,Jt="__reactHandles$"+_t,xt="__reactResources$"+_t,Rt="__reactMarker$"+_t;function ac(e){delete e[Ge],delete e[Ie],delete e[K],delete e[Te],delete e[Jt]}function ja(e){var t=e[Ge];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Kt]||l[Ge]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=tm(e);e!==null;){if(l=e[Ge])return l;e=tm(e)}return t}e=l,l=e.parentNode}return null}function Na(e){if(e=e[Ge]||e[Kt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function gn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Ca(e){var t=e[xt];return t||(t=e[xt]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function We(e){e[Rt]=!0}var _r=new Set,Rr={};function Jl(e,t){za(e,t),za(e+"Capture",t)}function za(e,t){for(Rr[e]=t,e=0;e<t.length;e++)_r.add(t[e])}var sx=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]*$"),Or={},Ur={};function ix(e){return xn.call(Ur,e)?!0:xn.call(Or,e)?!1:sx.test(e)?Ur[e]=!0:(Or[e]=!0,!1)}function Ts(e,t,l){if(ix(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Es(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Wt(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Br(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function cx(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,s=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(c){l=""+c,s.call(this,c)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(c){l=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nc(e){if(!e._valueTracker){var t=Br(e)?"checked":"value";e._valueTracker=cx(e,t,""+e[t])}}function Hr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Br(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Ms(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 ux=/[\n"\\]/g;function Nt(e){return e.replace(ux,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function sc(e,t,l,a,n,s,c,o){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?ic(e,c,jt(t)):l!=null?ic(e,c,jt(l)):a!=null&&e.removeAttribute("value"),n==null&&s!=null&&(e.defaultChecked=!!s),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+jt(o):e.removeAttribute("name")}function qr(e,t,l,a,n,s,c,o){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||l!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){nc(e);return}l=l!=null?""+jt(l):"",t=t!=null?""+jt(t):l,o||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=o?e.checked:!!a,e.defaultChecked=!!a,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),nc(e)}function ic(e,t,l){t==="number"&&Ms(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Aa(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n<l.length;n++)t["$"+l[n]]=!0;for(l=0;l<e.length;l++)n=t.hasOwnProperty("$"+e[l].value),e[l].selected!==n&&(e[l].selected=n),n&&a&&(e[l].defaultSelected=!0)}else{for(l=""+jt(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Yr(e,t,l){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+jt(l):""}function Lr(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(ie(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=jt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),nc(e)}function Ta(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var rx=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 Gr(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||rx.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Xr(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var n in t)a=t[n],t.hasOwnProperty(n)&&l[n]!==a&&Gr(e,n,a)}else for(var s in t)t.hasOwnProperty(s)&&Gr(e,s,t[s])}function cc(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 ox=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"]]),fx=/^[\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 ks(e){return fx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ft(){}var uc=null;function rc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ea=null,Ma=null;function Qr(e){var t=Na(e);if(t&&(e=t.stateNode)){var l=e[Ie]||null;e:switch(e=t.stateNode,t.type){case"input":if(sc(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Nt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[Ie]||null;if(!n)throw Error(r(90));sc(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Hr(a)}break e;case"textarea":Yr(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Aa(e,!!l.multiple,t,!1)}}}var oc=!1;function Zr(e,t,l){if(oc)return e(t,l);oc=!0;try{var a=e(t);return a}finally{if(oc=!1,(Ea!==null||Ma!==null)&&(vi(),Ea&&(t=Ea,e=Ma,Ma=Ea=null,Qr(t),e)))for(t=0;t<e.length;t++)Qr(e[t])}}function bn(e,t){var l=e.stateNode;if(l===null)return null;var a=l[Ie]||null;if(a===null)return null;l=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var $t=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fc=!1;if($t)try{var Sn={};Object.defineProperty(Sn,"passive",{get:function(){fc=!0}}),window.addEventListener("test",Sn,Sn),window.removeEventListener("test",Sn,Sn)}catch{fc=!1}var vl=null,dc=null,ws=null;function Vr(){if(ws)return ws;var e,t=dc,l=t.length,a,n="value"in vl?vl.value:vl.textContent,s=n.length;for(e=0;e<l&&t[e]===n[e];e++);var c=l-e;for(a=1;a<=c&&t[l-a]===n[s-a];a++);return ws=n.slice(e,1<a?1-a:void 0)}function Ds(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 _s(){return!0}function Kr(){return!1}function ut(e){function t(l,a,n,s,c){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=s,this.target=c,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(l=e[o],this[o]=l?l(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?_s:Kr,this.isPropagationStopped=Kr,this}return j(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=_s)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=_s)},persist:function(){},isPersistent:_s}),t}var Wl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rs=ut(Wl),jn=j({},Wl,{view:0,detail:0}),dx=ut(jn),mc,xc,Nn,Os=j({},jn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pc,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!==Nn&&(Nn&&e.type==="mousemove"?(mc=e.screenX-Nn.screenX,xc=e.screenY-Nn.screenY):xc=mc=0,Nn=e),mc)},movementY:function(e){return"movementY"in e?e.movementY:xc}}),Jr=ut(Os),mx=j({},Os,{dataTransfer:0}),xx=ut(mx),yx=j({},jn,{relatedTarget:0}),yc=ut(yx),px=j({},Wl,{animationName:0,elapsedTime:0,pseudoElement:0}),vx=ut(px),hx=j({},Wl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gx=ut(hx),bx=j({},Wl,{data:0}),Wr=ut(bx),Sx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jx={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"},Nx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Nx[e])?!!t[e]:!1}function pc(){return Cx}var zx=j({},jn,{key:function(e){if(e.key){var t=Sx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?jx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pc,charCode:function(e){return e.type==="keypress"?Ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ax=ut(zx),Tx=j({},Os,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fr=ut(Tx),Ex=j({},jn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pc}),Mx=ut(Ex),kx=j({},Wl,{propertyName:0,elapsedTime:0,pseudoElement:0}),wx=ut(kx),Dx=j({},Os,{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}),_x=ut(Dx),Rx=j({},Wl,{newState:0,oldState:0}),Ox=ut(Rx),Ux=[9,13,27,32],vc=$t&&"CompositionEvent"in window,Cn=null;$t&&"documentMode"in document&&(Cn=document.documentMode);var Bx=$t&&"TextEvent"in window&&!Cn,$r=$t&&(!vc||Cn&&8<Cn&&11>=Cn),Ir=" ",Pr=!1;function eo(e,t){switch(e){case"keyup":return Ux.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function to(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ka=!1;function Hx(e,t){switch(e){case"compositionend":return to(t);case"keypress":return t.which!==32?null:(Pr=!0,Ir);case"textInput":return e=t.data,e===Ir&&Pr?null:e;default:return null}}function qx(e,t){if(ka)return e==="compositionend"||!vc&&eo(e,t)?(e=Vr(),ws=dc=vl=null,ka=!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 $r&&t.locale!=="ko"?null:t.data;default:return null}}var Yx={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 lo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Yx[e.type]:t==="textarea"}function ao(e,t,l,a){Ea?Ma?Ma.push(a):Ma=[a]:Ea=a,t=Ci(t,"onChange"),0<t.length&&(l=new Rs("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var zn=null,An=null;function Lx(e){Ld(e,0)}function Us(e){var t=gn(e);if(Hr(t))return e}function no(e,t){if(e==="change")return t}var so=!1;if($t){var hc;if($t){var gc="oninput"in document;if(!gc){var io=document.createElement("div");io.setAttribute("oninput","return;"),gc=typeof io.oninput=="function"}hc=gc}else hc=!1;so=hc&&(!document.documentMode||9<document.documentMode)}function co(){zn&&(zn.detachEvent("onpropertychange",uo),An=zn=null)}function uo(e){if(e.propertyName==="value"&&Us(An)){var t=[];ao(t,An,e,rc(e)),Zr(Lx,t)}}function Gx(e,t,l){e==="focusin"?(co(),zn=t,An=l,zn.attachEvent("onpropertychange",uo)):e==="focusout"&&co()}function Xx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Us(An)}function Qx(e,t){if(e==="click")return Us(t)}function Zx(e,t){if(e==="input"||e==="change")return Us(t)}function Vx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:Vx;function Tn(e,t){if(yt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!xn.call(t,n)||!yt(e[n],t[n]))return!1}return!0}function ro(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function oo(e,t){var l=ro(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=ro(l)}}function fo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?fo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ms(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Ms(e.document)}return t}function bc(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 Kx=$t&&"documentMode"in document&&11>=document.documentMode,wa=null,Sc=null,En=null,jc=!1;function xo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;jc||wa==null||wa!==Ms(a)||(a=wa,"selectionStart"in a&&bc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),En&&Tn(En,a)||(En=a,a=Ci(Sc,"onSelect"),0<a.length&&(t=new Rs("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=wa)))}function Fl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Da={animationend:Fl("Animation","AnimationEnd"),animationiteration:Fl("Animation","AnimationIteration"),animationstart:Fl("Animation","AnimationStart"),transitionrun:Fl("Transition","TransitionRun"),transitionstart:Fl("Transition","TransitionStart"),transitioncancel:Fl("Transition","TransitionCancel"),transitionend:Fl("Transition","TransitionEnd")},Nc={},yo={};$t&&(yo=document.createElement("div").style,"AnimationEvent"in window||(delete Da.animationend.animation,delete Da.animationiteration.animation,delete Da.animationstart.animation),"TransitionEvent"in window||delete Da.transitionend.transition);function $l(e){if(Nc[e])return Nc[e];if(!Da[e])return e;var t=Da[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in yo)return Nc[e]=t[l];return e}var po=$l("animationend"),vo=$l("animationiteration"),ho=$l("animationstart"),Jx=$l("transitionrun"),Wx=$l("transitionstart"),Fx=$l("transitioncancel"),go=$l("transitionend"),bo=new Map,Cc="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(" ");Cc.push("scrollEnd");function Ot(e,t){bo.set(e,t),Jl(t,[e])}var Bs=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)},Ct=[],_a=0,zc=0;function Hs(){for(var e=_a,t=zc=_a=0;t<e;){var l=Ct[t];Ct[t++]=null;var a=Ct[t];Ct[t++]=null;var n=Ct[t];Ct[t++]=null;var s=Ct[t];if(Ct[t++]=null,a!==null&&n!==null){var c=a.pending;c===null?n.next=n:(n.next=c.next,c.next=n),a.pending=n}s!==0&&So(l,n,s)}}function qs(e,t,l,a){Ct[_a++]=e,Ct[_a++]=t,Ct[_a++]=l,Ct[_a++]=a,zc|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Ac(e,t,l,a){return qs(e,t,l,a),Ys(e)}function Il(e,t){return qs(e,null,null,t),Ys(e)}function So(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!1,s=e.return;s!==null;)s.childLanes|=l,a=s.alternate,a!==null&&(a.childLanes|=l),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(n=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,n&&t!==null&&(n=31-it(l),e=s.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),s):null}function Ys(e){if(50<Fn)throw Fn=0,Ou=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ra={};function $x(e,t,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pt(e,t,l,a){return new $x(e,t,l,a)}function Tc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function It(e,t){var l=e.alternate;return l===null?(l=pt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function jo(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ls(e,t,l,a,n,s){var c=0;if(a=e,typeof e=="function")Tc(e)&&(c=1);else if(typeof e=="string")c=lp(e,l,X.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=pt(31,l,t,n),e.elementType=ne,e.lanes=s,e;case Q:return Pl(l.children,n,s,t);case J:c=8,n|=24;break;case I:return e=pt(12,l,t,n|2),e.elementType=I,e.lanes=s,e;case Z:return e=pt(13,l,t,n),e.elementType=Z,e.lanes=s,e;case L:return e=pt(19,l,t,n),e.elementType=L,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case te:c=10;break e;case Y:c=9;break e;case oe:c=11;break e;case _:c=14;break e;case V:c=16,a=null;break e}c=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=pt(c,l,t,n),t.elementType=e,t.type=a,t.lanes=s,t}function Pl(e,t,l,a){return e=pt(7,e,a,t),e.lanes=l,e}function Ec(e,t,l){return e=pt(6,e,null,t),e.lanes=l,e}function No(e){var t=pt(18,null,null,0);return t.stateNode=e,t}function Mc(e,t,l){return t=pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Co=new WeakMap;function zt(e,t){if(typeof e=="object"&&e!==null){var l=Co.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Ss(t)},Co.set(e,t),t)}return{value:e,source:t,stack:Ss(t)}}var Oa=[],Ua=0,Gs=null,Mn=0,At=[],Tt=0,hl=null,Yt=1,Lt="";function Pt(e,t){Oa[Ua++]=Mn,Oa[Ua++]=Gs,Gs=e,Mn=t}function zo(e,t,l){At[Tt++]=Yt,At[Tt++]=Lt,At[Tt++]=hl,hl=e;var a=Yt;e=Lt;var n=32-it(a)-1;a&=~(1<<n),l+=1;var s=32-it(t)+n;if(30<s){var c=n-n%5;s=(a&(1<<c)-1).toString(32),a>>=c,n-=c,Yt=1<<32-it(t)+n|l<<n|a,Lt=s+e}else Yt=1<<s|l<<n|a,Lt=e}function kc(e){e.return!==null&&(Pt(e,1),zo(e,1,0))}function wc(e){for(;e===Gs;)Gs=Oa[--Ua],Oa[Ua]=null,Mn=Oa[--Ua],Oa[Ua]=null;for(;e===hl;)hl=At[--Tt],At[Tt]=null,Lt=At[--Tt],At[Tt]=null,Yt=At[--Tt],At[Tt]=null}function Ao(e,t){At[Tt++]=Yt,At[Tt++]=Lt,At[Tt++]=hl,Yt=t.id,Lt=t.overflow,hl=e}var Pe=null,_e=null,ve=!1,gl=null,Et=!1,Dc=Error(r(519));function bl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw kn(zt(t,e)),Dc}function To(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Ge]=e,t[Ie]=a,l){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(l=0;l<In.length;l++)xe(In[l],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),qr(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),Lr(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||Zd(t.textContent,l)?(a.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),a.onScroll!=null&&xe("scroll",t),a.onScrollEnd!=null&&xe("scrollend",t),a.onClick!=null&&(t.onclick=Ft),t=!0):t=!1,t||bl(e,!0)}function Eo(e){for(Pe=e.return;Pe;)switch(Pe.tag){case 5:case 31:case 13:Et=!1;return;case 27:case 3:Et=!0;return;default:Pe=Pe.return}}function Ba(e){if(e!==Pe)return!1;if(!ve)return Eo(e),ve=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Fu(e.type,e.memoizedProps)),l=!l),l&&_e&&bl(e),Eo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));_e=em(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));_e=em(e)}else t===27?(t=_e,Rl(e.type)?(e=tr,tr=null,_e=e):_e=t):_e=Pe?kt(e.stateNode.nextSibling):null;return!0}function ea(){_e=Pe=null,ve=!1}function _c(){var e=gl;return e!==null&&(dt===null?dt=e:dt.push.apply(dt,e),gl=null),e}function kn(e){gl===null?gl=[e]:gl.push(e)}var Rc=g(null),ta=null,el=null;function Sl(e,t,l){q(Rc,t._currentValue),t._currentValue=l}function tl(e){e._currentValue=Rc.current,C(Rc)}function Oc(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Uc(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var s=n.dependencies;if(s!==null){var c=n.child;s=s.firstContext;e:for(;s!==null;){var o=s;s=n;for(var y=0;y<t.length;y++)if(o.context===t[y]){s.lanes|=l,o=s.alternate,o!==null&&(o.lanes|=l),Oc(s.return,l,e),a||(c=null);break e}s=o.next}}else if(n.tag===18){if(c=n.return,c===null)throw Error(r(341));c.lanes|=l,s=c.alternate,s!==null&&(s.lanes|=l),Oc(c,l,e),c=null}else c=n.child;if(c!==null)c.return=n;else for(c=n;c!==null;){if(c===e){c=null;break}if(n=c.sibling,n!==null){n.return=c.return,c=n;break}c=c.return}n=c}}function Ha(e,t,l,a){e=null;for(var n=t,s=!1;n!==null;){if(!s){if((n.flags&524288)!==0)s=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var c=n.alternate;if(c===null)throw Error(r(387));if(c=c.memoizedProps,c!==null){var o=n.type;yt(n.pendingProps.value,c.value)||(e!==null?e.push(o):e=[o])}}else if(n===be.current){if(c=n.alternate,c===null)throw Error(r(387));c.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(as):e=[as])}n=n.return}e!==null&&Uc(t,e,l,a),t.flags|=262144}function Xs(e){for(e=e.firstContext;e!==null;){if(!yt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function la(e){ta=e,el=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function et(e){return Mo(ta,e)}function Qs(e,t){return ta===null&&la(e),Mo(e,t)}function Mo(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},el===null){if(e===null)throw Error(r(308));el=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else el=el.next=t;return l}var Ix=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Px=u.unstable_scheduleCallback,ey=u.unstable_NormalPriority,Xe={$$typeof:te,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bc(){return{controller:new Ix,data:new Map,refCount:0}}function wn(e){e.refCount--,e.refCount===0&&Px(ey,function(){e.controller.abort()})}var Dn=null,Hc=0,qa=0,Ya=null;function ty(e,t){if(Dn===null){var l=Dn=[];Hc=0,qa=Lu(),Ya={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Hc++,t.then(ko,ko),t}function ko(){if(--Hc===0&&Dn!==null){Ya!==null&&(Ya.status="fulfilled");var e=Dn;Dn=null,qa=0,Ya=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ly(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var wo=M.S;M.S=function(e,t){yd=nt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ty(e,t),wo!==null&&wo(e,t)};var aa=g(null);function qc(){var e=aa.current;return e!==null?e:we.pooledCache}function Zs(e,t){t===null?q(aa,aa.current):q(aa,t.pool)}function Do(){var e=qc();return e===null?null:{parent:Xe._currentValue,pool:e}}var La=Error(r(460)),Yc=Error(r(474)),Vs=Error(r(542)),Ks={then:function(){}};function _o(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ro(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Ft,Ft),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Uo(e),e;default:if(typeof t.status=="string")t.then(Ft,Ft);else{if(e=we,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=a}},function(a){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Uo(e),e}throw sa=t,La}}function na(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(sa=l,La):l}}var sa=null;function Oo(){if(sa===null)throw Error(r(459));var e=sa;return sa=null,e}function Uo(e){if(e===La||e===Vs)throw Error(r(483))}var Ga=null,_n=0;function Js(e){var t=_n;return _n+=1,Ga===null&&(Ga=[]),Ro(Ga,e,t)}function Rn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ws(e,t){throw t.$$typeof===w?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Bo(e){function t(S,v){if(e){var z=S.deletions;z===null?(S.deletions=[v],S.flags|=16):z.push(v)}}function l(S,v){if(!e)return null;for(;v!==null;)t(S,v),v=v.sibling;return null}function a(S){for(var v=new Map;S!==null;)S.key!==null?v.set(S.key,S):v.set(S.index,S),S=S.sibling;return v}function n(S,v){return S=It(S,v),S.index=0,S.sibling=null,S}function s(S,v,z){return S.index=z,e?(z=S.alternate,z!==null?(z=z.index,z<v?(S.flags|=67108866,v):z):(S.flags|=67108866,v)):(S.flags|=1048576,v)}function c(S){return e&&S.alternate===null&&(S.flags|=67108866),S}function o(S,v,z,U){return v===null||v.tag!==6?(v=Ec(z,S.mode,U),v.return=S,v):(v=n(v,z),v.return=S,v)}function y(S,v,z,U){var P=z.type;return P===Q?R(S,v,z.props.children,U,z.key):v!==null&&(v.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===V&&na(P)===v.type)?(v=n(v,z.props),Rn(v,z),v.return=S,v):(v=Ls(z.type,z.key,z.props,null,S.mode,U),Rn(v,z),v.return=S,v)}function A(S,v,z,U){return v===null||v.tag!==4||v.stateNode.containerInfo!==z.containerInfo||v.stateNode.implementation!==z.implementation?(v=Mc(z,S.mode,U),v.return=S,v):(v=n(v,z.children||[]),v.return=S,v)}function R(S,v,z,U,P){return v===null||v.tag!==7?(v=Pl(z,S.mode,U,P),v.return=S,v):(v=n(v,z),v.return=S,v)}function B(S,v,z){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return v=Ec(""+v,S.mode,z),v.return=S,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case O:return z=Ls(v.type,v.key,v.props,null,S.mode,z),Rn(z,v),z.return=S,z;case k:return v=Mc(v,S.mode,z),v.return=S,v;case V:return v=na(v),B(S,v,z)}if(ie(v)||De(v))return v=Pl(v,S.mode,z,null),v.return=S,v;if(typeof v.then=="function")return B(S,Js(v),z);if(v.$$typeof===te)return B(S,Qs(S,v),z);Ws(S,v)}return null}function T(S,v,z,U){var P=v!==null?v.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return P!==null?null:o(S,v,""+z,U);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case O:return z.key===P?y(S,v,z,U):null;case k:return z.key===P?A(S,v,z,U):null;case V:return z=na(z),T(S,v,z,U)}if(ie(z)||De(z))return P!==null?null:R(S,v,z,U,null);if(typeof z.then=="function")return T(S,v,Js(z),U);if(z.$$typeof===te)return T(S,v,Qs(S,z),U);Ws(S,z)}return null}function D(S,v,z,U,P){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return S=S.get(z)||null,o(v,S,""+U,P);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case O:return S=S.get(U.key===null?z:U.key)||null,y(v,S,U,P);case k:return S=S.get(U.key===null?z:U.key)||null,A(v,S,U,P);case V:return U=na(U),D(S,v,z,U,P)}if(ie(U)||De(U))return S=S.get(z)||null,R(v,S,U,P,null);if(typeof U.then=="function")return D(S,v,z,Js(U),P);if(U.$$typeof===te)return D(S,v,z,Qs(v,U),P);Ws(v,U)}return null}function W(S,v,z,U){for(var P=null,Se=null,F=v,fe=v=0,pe=null;F!==null&&fe<z.length;fe++){F.index>fe?(pe=F,F=null):pe=F.sibling;var je=T(S,F,z[fe],U);if(je===null){F===null&&(F=pe);break}e&&F&&je.alternate===null&&t(S,F),v=s(je,v,fe),Se===null?P=je:Se.sibling=je,Se=je,F=pe}if(fe===z.length)return l(S,F),ve&&Pt(S,fe),P;if(F===null){for(;fe<z.length;fe++)F=B(S,z[fe],U),F!==null&&(v=s(F,v,fe),Se===null?P=F:Se.sibling=F,Se=F);return ve&&Pt(S,fe),P}for(F=a(F);fe<z.length;fe++)pe=D(F,S,fe,z[fe],U),pe!==null&&(e&&pe.alternate!==null&&F.delete(pe.key===null?fe:pe.key),v=s(pe,v,fe),Se===null?P=pe:Se.sibling=pe,Se=pe);return e&&F.forEach(function(ql){return t(S,ql)}),ve&&Pt(S,fe),P}function ae(S,v,z,U){if(z==null)throw Error(r(151));for(var P=null,Se=null,F=v,fe=v=0,pe=null,je=z.next();F!==null&&!je.done;fe++,je=z.next()){F.index>fe?(pe=F,F=null):pe=F.sibling;var ql=T(S,F,je.value,U);if(ql===null){F===null&&(F=pe);break}e&&F&&ql.alternate===null&&t(S,F),v=s(ql,v,fe),Se===null?P=ql:Se.sibling=ql,Se=ql,F=pe}if(je.done)return l(S,F),ve&&Pt(S,fe),P;if(F===null){for(;!je.done;fe++,je=z.next())je=B(S,je.value,U),je!==null&&(v=s(je,v,fe),Se===null?P=je:Se.sibling=je,Se=je);return ve&&Pt(S,fe),P}for(F=a(F);!je.done;fe++,je=z.next())je=D(F,S,fe,je.value,U),je!==null&&(e&&je.alternate!==null&&F.delete(je.key===null?fe:je.key),v=s(je,v,fe),Se===null?P=je:Se.sibling=je,Se=je);return e&&F.forEach(function(mp){return t(S,mp)}),ve&&Pt(S,fe),P}function ke(S,v,z,U){if(typeof z=="object"&&z!==null&&z.type===Q&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case O:e:{for(var P=z.key;v!==null;){if(v.key===P){if(P=z.type,P===Q){if(v.tag===7){l(S,v.sibling),U=n(v,z.props.children),U.return=S,S=U;break e}}else if(v.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===V&&na(P)===v.type){l(S,v.sibling),U=n(v,z.props),Rn(U,z),U.return=S,S=U;break e}l(S,v);break}else t(S,v);v=v.sibling}z.type===Q?(U=Pl(z.props.children,S.mode,U,z.key),U.return=S,S=U):(U=Ls(z.type,z.key,z.props,null,S.mode,U),Rn(U,z),U.return=S,S=U)}return c(S);case k:e:{for(P=z.key;v!==null;){if(v.key===P)if(v.tag===4&&v.stateNode.containerInfo===z.containerInfo&&v.stateNode.implementation===z.implementation){l(S,v.sibling),U=n(v,z.children||[]),U.return=S,S=U;break e}else{l(S,v);break}else t(S,v);v=v.sibling}U=Mc(z,S.mode,U),U.return=S,S=U}return c(S);case V:return z=na(z),ke(S,v,z,U)}if(ie(z))return W(S,v,z,U);if(De(z)){if(P=De(z),typeof P!="function")throw Error(r(150));return z=P.call(z),ae(S,v,z,U)}if(typeof z.then=="function")return ke(S,v,Js(z),U);if(z.$$typeof===te)return ke(S,v,Qs(S,z),U);Ws(S,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,v!==null&&v.tag===6?(l(S,v.sibling),U=n(v,z),U.return=S,S=U):(l(S,v),U=Ec(z,S.mode,U),U.return=S,S=U),c(S)):l(S,v)}return function(S,v,z,U){try{_n=0;var P=ke(S,v,z,U);return Ga=null,P}catch(F){if(F===La||F===Vs)throw F;var Se=pt(29,F,null,S.mode);return Se.lanes=U,Se.return=S,Se}finally{}}}var ia=Bo(!0),Ho=Bo(!1),jl=!1;function Lc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Nl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Cl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Ne&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=Ys(e),So(e,null,l),t}return qs(e,a,t,l),Ys(e)}function On(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Sa(e,l)}}function Xc(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,s=null;if(l=l.firstBaseUpdate,l!==null){do{var c={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};s===null?n=s=c:s=s.next=c,l=l.next}while(l!==null);s===null?n=s=t:s=s.next=t}else n=s=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:s,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Qc=!1;function Un(){if(Qc){var e=Ya;if(e!==null)throw e}}function Bn(e,t,l,a){Qc=!1;var n=e.updateQueue;jl=!1;var s=n.firstBaseUpdate,c=n.lastBaseUpdate,o=n.shared.pending;if(o!==null){n.shared.pending=null;var y=o,A=y.next;y.next=null,c===null?s=A:c.next=A,c=y;var R=e.alternate;R!==null&&(R=R.updateQueue,o=R.lastBaseUpdate,o!==c&&(o===null?R.firstBaseUpdate=A:o.next=A,R.lastBaseUpdate=y))}if(s!==null){var B=n.baseState;c=0,R=A=y=null,o=s;do{var T=o.lane&-536870913,D=T!==o.lane;if(D?(ye&T)===T:(a&T)===T){T!==0&&T===qa&&(Qc=!0),R!==null&&(R=R.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var W=e,ae=o;T=t;var ke=l;switch(ae.tag){case 1:if(W=ae.payload,typeof W=="function"){B=W.call(ke,B,T);break e}B=W;break e;case 3:W.flags=W.flags&-65537|128;case 0:if(W=ae.payload,T=typeof W=="function"?W.call(ke,B,T):W,T==null)break e;B=j({},B,T);break e;case 2:jl=!0}}T=o.callback,T!==null&&(e.flags|=64,D&&(e.flags|=8192),D=n.callbacks,D===null?n.callbacks=[T]:D.push(T))}else D={lane:T,tag:o.tag,payload:o.payload,callback:o.callback,next:null},R===null?(A=R=D,y=B):R=R.next=D,c|=T;if(o=o.next,o===null){if(o=n.shared.pending,o===null)break;D=o,o=D.next,D.next=null,n.lastBaseUpdate=D,n.shared.pending=null}}while(!0);R===null&&(y=B),n.baseState=y,n.firstBaseUpdate=A,n.lastBaseUpdate=R,s===null&&(n.shared.lanes=0),Ml|=c,e.lanes=c,e.memoizedState=B}}function qo(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Yo(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)qo(l[e],t)}var Xa=g(null),Fs=g(0);function Lo(e,t){e=ol,q(Fs,e),q(Xa,t),ol=e|t.baseLanes}function Zc(){q(Fs,ol),q(Xa,Xa.current)}function Vc(){ol=Fs.current,C(Xa),C(Fs)}var vt=g(null),Mt=null;function zl(e){var t=e.alternate;q(Ye,Ye.current&1),q(vt,e),Mt===null&&(t===null||Xa.current!==null||t.memoizedState!==null)&&(Mt=e)}function Kc(e){q(Ye,Ye.current),q(vt,e),Mt===null&&(Mt=e)}function Go(e){e.tag===22?(q(Ye,Ye.current),q(vt,e),Mt===null&&(Mt=e)):Al()}function Al(){q(Ye,Ye.current),q(vt,vt.current)}function ht(e){C(vt),Mt===e&&(Mt=null),C(Ye)}var Ye=g(0);function $s(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Pu(l)||er(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ll=0,re=null,Ee=null,Qe=null,Is=!1,Qa=!1,ca=!1,Ps=0,Hn=0,Za=null,ay=0;function Be(){throw Error(r(321))}function Jc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!yt(e[l],t[l]))return!1;return!0}function Wc(e,t,l,a,n,s){return ll=s,re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Af:ou,ca=!1,s=l(a,n),ca=!1,Qa&&(s=Qo(t,l,a,n)),Xo(e),s}function Xo(e){M.H=Ln;var t=Ee!==null&&Ee.next!==null;if(ll=0,Qe=Ee=re=null,Is=!1,Hn=0,Za=null,t)throw Error(r(300));e===null||Ze||(e=e.dependencies,e!==null&&Xs(e)&&(Ze=!0))}function Qo(e,t,l,a){re=e;var n=0;do{if(Qa&&(Za=null),Hn=0,Qa=!1,25<=n)throw Error(r(301));if(n+=1,Qe=Ee=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}M.H=Tf,s=t(l,a)}while(Qa);return s}function ny(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?qn(t):t,e=e.useState()[0],(Ee!==null?Ee.memoizedState:null)!==e&&(re.flags|=1024),t}function Fc(){var e=Ps!==0;return Ps=0,e}function $c(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Ic(e){if(Is){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Is=!1}ll=0,Qe=Ee=re=null,Qa=!1,Hn=Ps=0,Za=null}function ct(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qe===null?re.memoizedState=Qe=e:Qe=Qe.next=e,Qe}function Le(){if(Ee===null){var e=re.alternate;e=e!==null?e.memoizedState:null}else e=Ee.next;var t=Qe===null?re.memoizedState:Qe.next;if(t!==null)Qe=t,Ee=e;else{if(e===null)throw re.alternate===null?Error(r(467)):Error(r(310));Ee=e,e={memoizedState:Ee.memoizedState,baseState:Ee.baseState,baseQueue:Ee.baseQueue,queue:Ee.queue,next:null},Qe===null?re.memoizedState=Qe=e:Qe=Qe.next=e}return Qe}function ei(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qn(e){var t=Hn;return Hn+=1,Za===null&&(Za=[]),e=Ro(Za,e,t),t=re,(Qe===null?t.memoizedState:Qe.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Af:ou),e}function ti(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return qn(e);if(e.$$typeof===te)return et(e)}throw Error(r(438,String(e)))}function Pc(e){var t=null,l=re.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=re.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=ei(),re.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=de;return t.index++,l}function al(e,t){return typeof t=="function"?t(e):t}function li(e){var t=Le();return eu(t,Ee,e)}function eu(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var n=e.baseQueue,s=a.pending;if(s!==null){if(n!==null){var c=n.next;n.next=s.next,s.next=c}t.baseQueue=n=s,a.pending=null}if(s=e.baseState,n===null)e.memoizedState=s;else{t=n.next;var o=c=null,y=null,A=t,R=!1;do{var B=A.lane&-536870913;if(B!==A.lane?(ye&B)===B:(ll&B)===B){var T=A.revertLane;if(T===0)y!==null&&(y=y.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),B===qa&&(R=!0);else if((ll&T)===T){A=A.next,T===qa&&(R=!0);continue}else B={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},y===null?(o=y=B,c=s):y=y.next=B,re.lanes|=T,Ml|=T;B=A.action,ca&&l(s,B),s=A.hasEagerState?A.eagerState:l(s,B)}else T={lane:B,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},y===null?(o=y=T,c=s):y=y.next=T,re.lanes|=B,Ml|=B;A=A.next}while(A!==null&&A!==t);if(y===null?c=s:y.next=o,!yt(s,e.memoizedState)&&(Ze=!0,R&&(l=Ya,l!==null)))throw l;e.memoizedState=s,e.baseState=c,e.baseQueue=y,a.lastRenderedState=s}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function tu(e){var t=Le(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,s=t.memoizedState;if(n!==null){l.pending=null;var c=n=n.next;do s=e(s,c.action),c=c.next;while(c!==n);yt(s,t.memoizedState)||(Ze=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),l.lastRenderedState=s}return[s,a]}function Zo(e,t,l){var a=re,n=Le(),s=ve;if(s){if(l===void 0)throw Error(r(407));l=l()}else l=t();var c=!yt((Ee||n).memoizedState,l);if(c&&(n.memoizedState=l,Ze=!0),n=n.queue,nu(Jo.bind(null,a,n,e),[e]),n.getSnapshot!==t||c||Qe!==null&&Qe.memoizedState.tag&1){if(a.flags|=2048,Va(9,{destroy:void 0},Ko.bind(null,a,n,l,t),null),we===null)throw Error(r(349));s||(ll&127)!==0||Vo(a,t,l)}return l}function Vo(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=re.updateQueue,t===null?(t=ei(),re.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Ko(e,t,l,a){t.value=l,t.getSnapshot=a,Wo(t)&&Fo(e)}function Jo(e,t,l){return l(function(){Wo(t)&&Fo(e)})}function Wo(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!yt(e,l)}catch{return!0}}function Fo(e){var t=Il(e,2);t!==null&&mt(t,e,2)}function lu(e){var t=ct();if(typeof e=="function"){var l=e;if(e=l(),ca){qt(!0);try{l()}finally{qt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:al,lastRenderedState:e},t}function $o(e,t,l,a){return e.baseState=l,eu(e,Ee,typeof a=="function"?a:al)}function sy(e,t,l,a,n){if(si(e))throw Error(r(485));if(e=t.action,e!==null){var s={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){s.listeners.push(c)}};M.T!==null?l(!0):s.isTransition=!1,a(s),l=t.pending,l===null?(s.next=t.pending=s,Io(t,s)):(s.next=l.next,t.pending=l.next=s)}}function Io(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var s=M.T,c={};M.T=c;try{var o=l(n,a),y=M.S;y!==null&&y(c,o),Po(e,t,o)}catch(A){au(e,t,A)}finally{s!==null&&c.types!==null&&(s.types=c.types),M.T=s}}else try{s=l(n,a),Po(e,t,s)}catch(A){au(e,t,A)}}function Po(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){ef(e,t,a)},function(a){return au(e,t,a)}):ef(e,t,l)}function ef(e,t,l){t.status="fulfilled",t.value=l,tf(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Io(e,l)))}function au(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,tf(t),t=t.next;while(t!==a)}e.action=null}function tf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function lf(e,t){return t}function af(e,t){if(ve){var l=we.formState;if(l!==null){e:{var a=re;if(ve){if(_e){t:{for(var n=_e,s=Et;n.nodeType!==8;){if(!s){n=null;break t}if(n=kt(n.nextSibling),n===null){n=null;break t}}s=n.data,n=s==="F!"||s==="F"?n:null}if(n){_e=kt(n.nextSibling),a=n.data==="F!";break e}}bl(a)}a=!1}a&&(t=l[0])}}return l=ct(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:lf,lastRenderedState:t},l.queue=a,l=Nf.bind(null,re,a),a.dispatch=l,a=lu(!1),s=ru.bind(null,re,!1,a.queue),a=ct(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=sy.bind(null,re,n,s,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function nf(e){var t=Le();return sf(t,Ee,e)}function sf(e,t,l){if(t=eu(e,t,lf)[0],e=li(al)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=qn(t)}catch(c){throw c===La?Vs:c}else a=t;t=Le();var n=t.queue,s=n.dispatch;return l!==t.memoizedState&&(re.flags|=2048,Va(9,{destroy:void 0},iy.bind(null,n,l),null)),[a,s,e]}function iy(e,t){e.action=t}function cf(e){var t=Le(),l=Ee;if(l!==null)return sf(t,l,e);Le(),t=t.memoizedState,l=Le();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Va(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=re.updateQueue,t===null&&(t=ei(),re.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function uf(){return Le().memoizedState}function ai(e,t,l,a){var n=ct();re.flags|=e,n.memoizedState=Va(1|t,{destroy:void 0},l,a===void 0?null:a)}function ni(e,t,l,a){var n=Le();a=a===void 0?null:a;var s=n.memoizedState.inst;Ee!==null&&a!==null&&Jc(a,Ee.memoizedState.deps)?n.memoizedState=Va(t,s,l,a):(re.flags|=e,n.memoizedState=Va(1|t,s,l,a))}function rf(e,t){ai(8390656,8,e,t)}function nu(e,t){ni(2048,8,e,t)}function cy(e){re.flags|=4;var t=re.updateQueue;if(t===null)t=ei(),re.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function of(e){var t=Le().memoizedState;return cy({ref:t,nextImpl:e}),function(){if((Ne&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function ff(e,t){return ni(4,2,e,t)}function df(e,t){return ni(4,4,e,t)}function mf(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function xf(e,t,l){l=l!=null?l.concat([e]):null,ni(4,4,mf.bind(null,t,e),l)}function su(){}function yf(e,t){var l=Le();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Jc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function pf(e,t){var l=Le();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Jc(t,a[1]))return a[0];if(a=e(),ca){qt(!0);try{e()}finally{qt(!1)}}return l.memoizedState=[a,t],a}function iu(e,t,l){return l===void 0||(ll&1073741824)!==0&&(ye&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=vd(),re.lanes|=e,Ml|=e,l)}function vf(e,t,l,a){return yt(l,t)?l:Xa.current!==null?(e=iu(e,l,a),yt(e,t)||(Ze=!0),e):(ll&42)===0||(ll&1073741824)!==0&&(ye&261930)===0?(Ze=!0,e.memoizedState=l):(e=vd(),re.lanes|=e,Ml|=e,t)}function hf(e,t,l,a,n){var s=G.p;G.p=s!==0&&8>s?s:8;var c=M.T,o={};M.T=o,ru(e,!1,t,l);try{var y=n(),A=M.S;if(A!==null&&A(o,y),y!==null&&typeof y=="object"&&typeof y.then=="function"){var R=ly(y,a);Yn(e,t,R,St(e))}else Yn(e,t,a,St(e))}catch(B){Yn(e,t,{then:function(){},status:"rejected",reason:B},St())}finally{G.p=s,c!==null&&o.types!==null&&(c.types=o.types),M.T=c}}function uy(){}function cu(e,t,l,a){if(e.tag!==5)throw Error(r(476));var n=gf(e).queue;hf(e,n,t,$,l===null?uy:function(){return bf(e),l(a)})}function gf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:al,lastRenderedState:$},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:al,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function bf(e){var t=gf(e);t.next===null&&(t=e.alternate.memoizedState),Yn(e,t.next.queue,{},St())}function uu(){return et(as)}function Sf(){return Le().memoizedState}function jf(){return Le().memoizedState}function ry(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=St();e=Nl(l);var a=Cl(t,e,l);a!==null&&(mt(a,t,l),On(a,t,l)),t={cache:Bc()},e.payload=t;return}t=t.return}}function oy(e,t,l){var a=St();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},si(e)?Cf(t,l):(l=Ac(e,t,l,a),l!==null&&(mt(l,e,a),zf(l,t,a)))}function Nf(e,t,l){var a=St();Yn(e,t,l,a)}function Yn(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(si(e))Cf(t,n);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var c=t.lastRenderedState,o=s(c,l);if(n.hasEagerState=!0,n.eagerState=o,yt(o,c))return qs(e,t,n,0),we===null&&Hs(),!1}catch{}finally{}if(l=Ac(e,t,n,a),l!==null)return mt(l,e,a),zf(l,t,a),!0}return!1}function ru(e,t,l,a){if(a={lane:2,revertLane:Lu(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},si(e)){if(t)throw Error(r(479))}else t=Ac(e,l,a,2),t!==null&&mt(t,e,2)}function si(e){var t=e.alternate;return e===re||t!==null&&t===re}function Cf(e,t){Qa=Is=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function zf(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Sa(e,l)}}var Ln={readContext:et,use:ti,useCallback:Be,useContext:Be,useEffect:Be,useImperativeHandle:Be,useLayoutEffect:Be,useInsertionEffect:Be,useMemo:Be,useReducer:Be,useRef:Be,useState:Be,useDebugValue:Be,useDeferredValue:Be,useTransition:Be,useSyncExternalStore:Be,useId:Be,useHostTransitionStatus:Be,useFormState:Be,useActionState:Be,useOptimistic:Be,useMemoCache:Be,useCacheRefresh:Be};Ln.useEffectEvent=Be;var Af={readContext:et,use:ti,useCallback:function(e,t){return ct().memoizedState=[e,t===void 0?null:t],e},useContext:et,useEffect:rf,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,ai(4194308,4,mf.bind(null,t,e),l)},useLayoutEffect:function(e,t){return ai(4194308,4,e,t)},useInsertionEffect:function(e,t){ai(4,2,e,t)},useMemo:function(e,t){var l=ct();t=t===void 0?null:t;var a=e();if(ca){qt(!0);try{e()}finally{qt(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=ct();if(l!==void 0){var n=l(t);if(ca){qt(!0);try{l(t)}finally{qt(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=oy.bind(null,re,e),[a.memoizedState,e]},useRef:function(e){var t=ct();return e={current:e},t.memoizedState=e},useState:function(e){e=lu(e);var t=e.queue,l=Nf.bind(null,re,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:su,useDeferredValue:function(e,t){var l=ct();return iu(l,e,t)},useTransition:function(){var e=lu(!1);return e=hf.bind(null,re,e.queue,!0,!1),ct().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=re,n=ct();if(ve){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),we===null)throw Error(r(349));(ye&127)!==0||Vo(a,t,l)}n.memoizedState=l;var s={value:l,getSnapshot:t};return n.queue=s,rf(Jo.bind(null,a,s,e),[e]),a.flags|=2048,Va(9,{destroy:void 0},Ko.bind(null,a,s,l,t),null),l},useId:function(){var e=ct(),t=we.identifierPrefix;if(ve){var l=Lt,a=Yt;l=(a&~(1<<32-it(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Ps++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=ay++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:uu,useFormState:af,useActionState:af,useOptimistic:function(e){var t=ct();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=ru.bind(null,re,!0,l),l.dispatch=t,[e,t]},useMemoCache:Pc,useCacheRefresh:function(){return ct().memoizedState=ry.bind(null,re)},useEffectEvent:function(e){var t=ct(),l={impl:e};return t.memoizedState=l,function(){if((Ne&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},ou={readContext:et,use:ti,useCallback:yf,useContext:et,useEffect:nu,useImperativeHandle:xf,useInsertionEffect:ff,useLayoutEffect:df,useMemo:pf,useReducer:li,useRef:uf,useState:function(){return li(al)},useDebugValue:su,useDeferredValue:function(e,t){var l=Le();return vf(l,Ee.memoizedState,e,t)},useTransition:function(){var e=li(al)[0],t=Le().memoizedState;return[typeof e=="boolean"?e:qn(e),t]},useSyncExternalStore:Zo,useId:Sf,useHostTransitionStatus:uu,useFormState:nf,useActionState:nf,useOptimistic:function(e,t){var l=Le();return $o(l,Ee,e,t)},useMemoCache:Pc,useCacheRefresh:jf};ou.useEffectEvent=of;var Tf={readContext:et,use:ti,useCallback:yf,useContext:et,useEffect:nu,useImperativeHandle:xf,useInsertionEffect:ff,useLayoutEffect:df,useMemo:pf,useReducer:tu,useRef:uf,useState:function(){return tu(al)},useDebugValue:su,useDeferredValue:function(e,t){var l=Le();return Ee===null?iu(l,e,t):vf(l,Ee.memoizedState,e,t)},useTransition:function(){var e=tu(al)[0],t=Le().memoizedState;return[typeof e=="boolean"?e:qn(e),t]},useSyncExternalStore:Zo,useId:Sf,useHostTransitionStatus:uu,useFormState:cf,useActionState:cf,useOptimistic:function(e,t){var l=Le();return Ee!==null?$o(l,Ee,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Pc,useCacheRefresh:jf};Tf.useEffectEvent=of;function fu(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:j({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var du={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=St(),n=Nl(a);n.payload=t,l!=null&&(n.callback=l),t=Cl(e,n,a),t!==null&&(mt(t,e,a),On(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=St(),n=Nl(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=Cl(e,n,a),t!==null&&(mt(t,e,a),On(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=St(),a=Nl(l);a.tag=2,t!=null&&(a.callback=t),t=Cl(e,a,l),t!==null&&(mt(t,e,l),On(t,e,l))}};function Ef(e,t,l,a,n,s,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,s,c):t.prototype&&t.prototype.isPureReactComponent?!Tn(l,a)||!Tn(n,s):!0}function Mf(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&du.enqueueReplaceState(t,t.state,null)}function ua(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=j({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function kf(e){Bs(e)}function wf(e){console.error(e)}function Df(e){Bs(e)}function ii(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function _f(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function mu(e,t,l){return l=Nl(l),l.tag=3,l.payload={element:null},l.callback=function(){ii(e,t)},l}function Rf(e){return e=Nl(e),e.tag=3,e}function Of(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var s=a.value;e.payload=function(){return n(s)},e.callback=function(){_f(t,l,a)}}var c=l.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){_f(t,l,a),typeof n!="function"&&(kl===null?kl=new Set([this]):kl.add(this));var o=a.stack;this.componentDidCatch(a.value,{componentStack:o!==null?o:""})})}function fy(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Ha(t,l,n,!0),l=vt.current,l!==null){switch(l.tag){case 31:case 13:return Mt===null?hi():l.alternate===null&&He===0&&(He=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===Ks?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Hu(e,a,n)),!1;case 22:return l.flags|=65536,a===Ks?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Hu(e,a,n)),!1}throw Error(r(435,l.tag))}return Hu(e,a,n),hi(),!1}if(ve)return t=vt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==Dc&&(e=Error(r(422),{cause:a}),kn(zt(e,l)))):(a!==Dc&&(t=Error(r(423),{cause:a}),kn(zt(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=zt(a,l),n=mu(e.stateNode,a,n),Xc(e,n),He!==4&&(He=2)),!1;var s=Error(r(520),{cause:a});if(s=zt(s,l),Wn===null?Wn=[s]:Wn.push(s),He!==4&&(He=2),t===null)return!0;a=zt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=mu(l.stateNode,a,e),Xc(l,e),!1;case 1:if(t=l.type,s=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(kl===null||!kl.has(s))))return l.flags|=65536,n&=-n,l.lanes|=n,n=Rf(n),Of(n,e,l,a),Xc(l,n),!1}l=l.return}while(l!==null);return!1}var xu=Error(r(461)),Ze=!1;function tt(e,t,l,a){t.child=e===null?Ho(t,null,l,a):ia(t,e.child,l,a)}function Uf(e,t,l,a,n){l=l.render;var s=t.ref;if("ref"in a){var c={};for(var o in a)o!=="ref"&&(c[o]=a[o])}else c=a;return la(t),a=Wc(e,t,l,c,s,n),o=Fc(),e!==null&&!Ze?($c(e,t,n),nl(e,t,n)):(ve&&o&&kc(t),t.flags|=1,tt(e,t,a,n),t.child)}function Bf(e,t,l,a,n){if(e===null){var s=l.type;return typeof s=="function"&&!Tc(s)&&s.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=s,Hf(e,t,s,a,n)):(e=Ls(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!ju(e,n)){var c=s.memoizedProps;if(l=l.compare,l=l!==null?l:Tn,l(c,a)&&e.ref===t.ref)return nl(e,t,n)}return t.flags|=1,e=It(s,a),e.ref=t.ref,e.return=t,t.child=e}function Hf(e,t,l,a,n){if(e!==null){var s=e.memoizedProps;if(Tn(s,a)&&e.ref===t.ref)if(Ze=!1,t.pendingProps=a=s,ju(e,n))(e.flags&131072)!==0&&(Ze=!0);else return t.lanes=e.lanes,nl(e,t,n)}return yu(e,t,l,a,n)}function qf(e,t,l,a){var n=a.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(s=s!==null?s.baseLanes|l:l,e!==null){for(a=t.child=e.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~s}else a=0,t.child=null;return Yf(e,t,s,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Zs(t,s!==null?s.cachePool:null),s!==null?Lo(t,s):Zc(),Go(t);else return a=t.lanes=536870912,Yf(e,t,s!==null?s.baseLanes|l:l,l,a)}else s!==null?(Zs(t,s.cachePool),Lo(t,s),Al(),t.memoizedState=null):(e!==null&&Zs(t,null),Zc(),Al());return tt(e,t,n,l),t.child}function Gn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Yf(e,t,l,a,n){var s=qc();return s=s===null?null:{parent:Xe._currentValue,pool:s},t.memoizedState={baseLanes:l,cachePool:s},e!==null&&Zs(t,null),Zc(),Go(t),e!==null&&Ha(e,t,a,!0),t.childLanes=n,null}function ci(e,t){return t=ri({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Lf(e,t,l){return ia(t,e.child,null,l),e=ci(t,t.pendingProps),e.flags|=2,ht(t),t.memoizedState=null,e}function dy(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ve){if(a.mode==="hidden")return e=ci(t,a),t.lanes=536870912,Gn(null,e);if(Kc(t),(e=_e)?(e=Pd(e,Et),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:hl!==null?{id:Yt,overflow:Lt}:null,retryLane:536870912,hydrationErrors:null},l=No(e),l.return=t,t.child=l,Pe=t,_e=null)):e=null,e===null)throw bl(t);return t.lanes=536870912,null}return ci(t,a)}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(Kc(t),n)if(t.flags&256)t.flags&=-257,t=Lf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(Ze||Ha(e,t,l,!1),n=(l&e.childLanes)!==0,Ze||n){if(a=we,a!==null&&(c=pl(a,l),c!==0&&c!==s.retryLane))throw s.retryLane=c,Il(e,c),mt(a,e,c),xu;hi(),t=Lf(e,t,l)}else e=s.treeContext,_e=kt(c.nextSibling),Pe=t,ve=!0,gl=null,Et=!1,e!==null&&Ao(t,e),t=ci(t,a),t.flags|=4096;return t}return e=It(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ui(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function yu(e,t,l,a,n){return la(t),l=Wc(e,t,l,a,void 0,n),a=Fc(),e!==null&&!Ze?($c(e,t,n),nl(e,t,n)):(ve&&a&&kc(t),t.flags|=1,tt(e,t,l,n),t.child)}function Gf(e,t,l,a,n,s){return la(t),t.updateQueue=null,l=Qo(t,a,l,n),Xo(e),a=Fc(),e!==null&&!Ze?($c(e,t,s),nl(e,t,s)):(ve&&a&&kc(t),t.flags|=1,tt(e,t,l,s),t.child)}function Xf(e,t,l,a,n){if(la(t),t.stateNode===null){var s=Ra,c=l.contextType;typeof c=="object"&&c!==null&&(s=et(c)),s=new l(a,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=du,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=a,s.state=t.memoizedState,s.refs={},Lc(t),c=l.contextType,s.context=typeof c=="object"&&c!==null?et(c):Ra,s.state=t.memoizedState,c=l.getDerivedStateFromProps,typeof c=="function"&&(fu(t,l,c,a),s.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(c=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),c!==s.state&&du.enqueueReplaceState(s,s.state,null),Bn(t,a,s,n),Un(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){s=t.stateNode;var o=t.memoizedProps,y=ua(l,o);s.props=y;var A=s.context,R=l.contextType;c=Ra,typeof R=="object"&&R!==null&&(c=et(R));var B=l.getDerivedStateFromProps;R=typeof B=="function"||typeof s.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,R||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o||A!==c)&&Mf(t,s,a,c),jl=!1;var T=t.memoizedState;s.state=T,Bn(t,a,s,n),Un(),A=t.memoizedState,o||T!==A||jl?(typeof B=="function"&&(fu(t,l,B,a),A=t.memoizedState),(y=jl||Ef(t,l,y,a,T,A,c))?(R||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=A),s.props=a,s.state=A,s.context=c,a=y):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{s=t.stateNode,Gc(e,t),c=t.memoizedProps,R=ua(l,c),s.props=R,B=t.pendingProps,T=s.context,A=l.contextType,y=Ra,typeof A=="object"&&A!==null&&(y=et(A)),o=l.getDerivedStateFromProps,(A=typeof o=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(c!==B||T!==y)&&Mf(t,s,a,y),jl=!1,T=t.memoizedState,s.state=T,Bn(t,a,s,n),Un();var D=t.memoizedState;c!==B||T!==D||jl||e!==null&&e.dependencies!==null&&Xs(e.dependencies)?(typeof o=="function"&&(fu(t,l,o,a),D=t.memoizedState),(R=jl||Ef(t,l,R,a,T,D,y)||e!==null&&e.dependencies!==null&&Xs(e.dependencies))?(A||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(a,D,y),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(a,D,y)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=D),s.props=a,s.state=D,s.context=y,a=R):(typeof s.componentDidUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),a=!1)}return s=a,ui(e,t),a=(t.flags&128)!==0,s||a?(s=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&a?(t.child=ia(t,e.child,null,n),t.child=ia(t,null,l,n)):tt(e,t,l,n),t.memoizedState=s.state,e=t.child):e=nl(e,t,n),e}function Qf(e,t,l,a){return ea(),t.flags|=256,tt(e,t,l,a),t.child}var pu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vu(e){return{baseLanes:e,cachePool:Do()}}function hu(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=bt),e}function Zf(e,t,l){var a=t.pendingProps,n=!1,s=(t.flags&128)!==0,c;if((c=s)||(c=e!==null&&e.memoizedState===null?!1:(Ye.current&2)!==0),c&&(n=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(ve){if(n?zl(t):Al(),(e=_e)?(e=Pd(e,Et),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:hl!==null?{id:Yt,overflow:Lt}:null,retryLane:536870912,hydrationErrors:null},l=No(e),l.return=t,t.child=l,Pe=t,_e=null)):e=null,e===null)throw bl(t);return er(e)?t.lanes=32:t.lanes=536870912,null}var o=a.children;return a=a.fallback,n?(Al(),n=t.mode,o=ri({mode:"hidden",children:o},n),a=Pl(a,n,l,null),o.return=t,a.return=t,o.sibling=a,t.child=o,a=t.child,a.memoizedState=vu(l),a.childLanes=hu(e,c,l),t.memoizedState=pu,Gn(null,a)):(zl(t),gu(t,o))}var y=e.memoizedState;if(y!==null&&(o=y.dehydrated,o!==null)){if(s)t.flags&256?(zl(t),t.flags&=-257,t=bu(e,t,l)):t.memoizedState!==null?(Al(),t.child=e.child,t.flags|=128,t=null):(Al(),o=a.fallback,n=t.mode,a=ri({mode:"visible",children:a.children},n),o=Pl(o,n,l,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,ia(t,e.child,null,l),a=t.child,a.memoizedState=vu(l),a.childLanes=hu(e,c,l),t.memoizedState=pu,t=Gn(null,a));else if(zl(t),er(o)){if(c=o.nextSibling&&o.nextSibling.dataset,c)var A=c.dgst;c=A,a=Error(r(419)),a.stack="",a.digest=c,kn({value:a,source:null,stack:null}),t=bu(e,t,l)}else if(Ze||Ha(e,t,l,!1),c=(l&e.childLanes)!==0,Ze||c){if(c=we,c!==null&&(a=pl(c,l),a!==0&&a!==y.retryLane))throw y.retryLane=a,Il(e,a),mt(c,e,a),xu;Pu(o)||hi(),t=bu(e,t,l)}else Pu(o)?(t.flags|=192,t.child=e.child,t=null):(e=y.treeContext,_e=kt(o.nextSibling),Pe=t,ve=!0,gl=null,Et=!1,e!==null&&Ao(t,e),t=gu(t,a.children),t.flags|=4096);return t}return n?(Al(),o=a.fallback,n=t.mode,y=e.child,A=y.sibling,a=It(y,{mode:"hidden",children:a.children}),a.subtreeFlags=y.subtreeFlags&65011712,A!==null?o=It(A,o):(o=Pl(o,n,l,null),o.flags|=2),o.return=t,a.return=t,a.sibling=o,t.child=a,Gn(null,a),a=t.child,o=e.child.memoizedState,o===null?o=vu(l):(n=o.cachePool,n!==null?(y=Xe._currentValue,n=n.parent!==y?{parent:y,pool:y}:n):n=Do(),o={baseLanes:o.baseLanes|l,cachePool:n}),a.memoizedState=o,a.childLanes=hu(e,c,l),t.memoizedState=pu,Gn(e.child,a)):(zl(t),l=e.child,e=l.sibling,l=It(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(c=t.deletions,c===null?(t.deletions=[e],t.flags|=16):c.push(e)),t.child=l,t.memoizedState=null,l)}function gu(e,t){return t=ri({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ri(e,t){return e=pt(22,e,null,t),e.lanes=0,e}function bu(e,t,l){return ia(t,e.child,null,l),e=gu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Vf(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Oc(e.return,t,l)}function Su(e,t,l,a,n,s){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:s}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=a,c.tail=l,c.tailMode=n,c.treeForkCount=s)}function Kf(e,t,l){var a=t.pendingProps,n=a.revealOrder,s=a.tail;a=a.children;var c=Ye.current,o=(c&2)!==0;if(o?(c=c&1|2,t.flags|=128):c&=1,q(Ye,c),tt(e,t,a,l),a=ve?Mn:0,!o&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Vf(e,l,t);else if(e.tag===19)Vf(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(n){case"forwards":for(l=t.child,n=null;l!==null;)e=l.alternate,e!==null&&$s(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),Su(t,!1,n,l,s,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&$s(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}Su(t,!0,l,null,s,a);break;case"together":Su(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function nl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Ml|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ha(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=It(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=It(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function ju(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Xs(e)))}function my(e,t,l){switch(t.tag){case 3:$e(t,t.stateNode.containerInfo),Sl(t,Xe,e.memoizedState.cache),ea();break;case 27:case 5:Xl(t);break;case 4:$e(t,t.stateNode.containerInfo);break;case 10:Sl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Kc(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(zl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Zf(e,t,l):(zl(t),e=nl(e,t,l),e!==null?e.sibling:null);zl(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(Ha(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return Kf(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),q(Ye,Ye.current),a)break;return null;case 22:return t.lanes=0,qf(e,t,l,t.pendingProps);case 24:Sl(t,Xe,e.memoizedState.cache)}return nl(e,t,l)}function Jf(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ze=!0;else{if(!ju(e,l)&&(t.flags&128)===0)return Ze=!1,my(e,t,l);Ze=(e.flags&131072)!==0}else Ze=!1,ve&&(t.flags&1048576)!==0&&zo(t,Mn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=na(t.elementType),t.type=e,typeof e=="function")Tc(e)?(a=ua(e,a),t.tag=1,t=Xf(null,t,e,a,l)):(t.tag=0,t=yu(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===oe){t.tag=11,t=Uf(null,t,e,a,l);break e}else if(n===_){t.tag=14,t=Bf(null,t,e,a,l);break e}}throw t=se(e)||e,Error(r(306,t,""))}}return t;case 0:return yu(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=ua(a,t.pendingProps),Xf(e,t,a,n,l);case 3:e:{if($e(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var s=t.memoizedState;n=s.element,Gc(e,t),Bn(t,a,null,l);var c=t.memoizedState;if(a=c.cache,Sl(t,Xe,a),a!==s.cache&&Uc(t,[Xe],l,!0),Un(),a=c.element,s.isDehydrated)if(s={element:a,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=Qf(e,t,a,l);break e}else if(a!==n){n=zt(Error(r(424)),t),kn(n),t=Qf(e,t,a,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(_e=kt(e.firstChild),Pe=t,ve=!0,gl=null,Et=!0,l=Ho(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ea(),a===n){t=nl(e,t,l);break e}tt(e,t,a,l)}t=t.child}return t;case 26:return ui(e,t),e===null?(l=sm(t.type,null,t.pendingProps,null))?t.memoizedState=l:ve||(l=t.type,e=t.pendingProps,a=zi(ue.current).createElement(l),a[Ge]=t,a[Ie]=e,lt(a,l,e),We(a),t.stateNode=a):t.memoizedState=sm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Xl(t),e===null&&ve&&(a=t.stateNode=lm(t.type,t.pendingProps,ue.current),Pe=t,Et=!0,n=_e,Rl(t.type)?(tr=n,_e=kt(a.firstChild)):_e=n),tt(e,t,t.pendingProps.children,l),ui(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ve&&((n=a=_e)&&(a=Xy(a,t.type,t.pendingProps,Et),a!==null?(t.stateNode=a,Pe=t,_e=kt(a.firstChild),Et=!1,n=!0):n=!1),n||bl(t)),Xl(t),n=t.type,s=t.pendingProps,c=e!==null?e.memoizedProps:null,a=s.children,Fu(n,s)?a=null:c!==null&&Fu(n,c)&&(t.flags|=32),t.memoizedState!==null&&(n=Wc(e,t,ny,null,null,l),as._currentValue=n),ui(e,t),tt(e,t,a,l),t.child;case 6:return e===null&&ve&&((e=l=_e)&&(l=Qy(l,t.pendingProps,Et),l!==null?(t.stateNode=l,Pe=t,_e=null,e=!0):e=!1),e||bl(t)),null;case 13:return Zf(e,t,l);case 4:return $e(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ia(t,null,a,l):tt(e,t,a,l),t.child;case 11:return Uf(e,t,t.type,t.pendingProps,l);case 7:return tt(e,t,t.pendingProps,l),t.child;case 8:return tt(e,t,t.pendingProps.children,l),t.child;case 12:return tt(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,Sl(t,t.type,a.value),tt(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,la(t),n=et(n),a=a(n),t.flags|=1,tt(e,t,a,l),t.child;case 14:return Bf(e,t,t.type,t.pendingProps,l);case 15:return Hf(e,t,t.type,t.pendingProps,l);case 19:return Kf(e,t,l);case 31:return dy(e,t,l);case 22:return qf(e,t,l,t.pendingProps);case 24:return la(t),a=et(Xe),e===null?(n=qc(),n===null&&(n=we,s=Bc(),n.pooledCache=s,s.refCount++,s!==null&&(n.pooledCacheLanes|=l),n=s),t.memoizedState={parent:a,cache:n},Lc(t),Sl(t,Xe,n)):((e.lanes&l)!==0&&(Gc(e,t),Bn(t,null,null,l),Un()),n=e.memoizedState,s=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),Sl(t,Xe,a)):(a=s.cache,Sl(t,Xe,a),a!==n.cache&&Uc(t,[Xe],l,!0))),tt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function sl(e){e.flags|=4}function Nu(e,t,l,a,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(Sd())e.flags|=8192;else throw sa=Ks,Yc}else e.flags&=-16777217}function Wf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!om(t))if(Sd())e.flags|=8192;else throw sa=Ks,Yc}function oi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?yl():536870912,e.lanes|=t,Fa|=t)}function Xn(e,t){if(!ve)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Re(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function xy(e,t,l){var a=t.pendingProps;switch(wc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return Re(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),tl(Xe),Ue(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ba(t)?sl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,_c())),Re(t),null;case 26:var n=t.type,s=t.memoizedState;return e===null?(sl(t),s!==null?(Re(t),Wf(t,s)):(Re(t),Nu(t,n,null,a,l))):s?s!==e.memoizedState?(sl(t),Re(t),Wf(t,s)):(Re(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&sl(t),Re(t),Nu(t,n,e,a,l)),null;case 27:if(ma(t),l=ue.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&sl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Re(t),null}e=X.current,Ba(t)?To(t):(e=lm(n,a,l),t.stateNode=e,sl(t))}return Re(t),null;case 5:if(ma(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&sl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Re(t),null}if(s=X.current,Ba(t))To(t);else{var c=zi(ue.current);switch(s){case 1:s=c.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:s=c.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":s=c.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":s=c.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":s=c.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof a.is=="string"?c.createElement("select",{is:a.is}):c.createElement("select"),a.multiple?s.multiple=!0:a.size&&(s.size=a.size);break;default:s=typeof a.is=="string"?c.createElement(n,{is:a.is}):c.createElement(n)}}s[Ge]=t,s[Ie]=a;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)s.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=s;e:switch(lt(s,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&sl(t)}}return Re(t),Nu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&sl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=ue.current,Ba(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=Pe,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[Ge]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||Zd(e.nodeValue,l)),e||bl(t,!0)}else e=zi(e).createTextNode(a),e[Ge]=t,t.stateNode=e}return Re(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ba(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ge]=t}else ea(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),e=!1}else l=_c(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(ht(t),t):(ht(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Re(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Ba(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(r(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));n[Ge]=t}else ea(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),n=!1}else n=_c(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(ht(t),t):(ht(t),null)}return ht(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),oi(t,t.updateQueue),Re(t),null);case 4:return Ue(),e===null&&Zu(t.stateNode.containerInfo),Re(t),null;case 10:return tl(t.type),Re(t),null;case 19:if(C(Ye),a=t.memoizedState,a===null)return Re(t),null;if(n=(t.flags&128)!==0,s=a.rendering,s===null)if(n)Xn(a,!1);else{if(He!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=$s(e),s!==null){for(t.flags|=128,Xn(a,!1),e=s.updateQueue,t.updateQueue=e,oi(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)jo(l,e),l=l.sibling;return q(Ye,Ye.current&1|2),ve&&Pt(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&nt()>yi&&(t.flags|=128,n=!0,Xn(a,!1),t.lanes=4194304)}else{if(!n)if(e=$s(s),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,oi(t,e),Xn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!ve)return Re(t),null}else 2*nt()-a.renderingStartTime>yi&&l!==536870912&&(t.flags|=128,n=!0,Xn(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(e=a.last,e!==null?e.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=nt(),e.sibling=null,l=Ye.current,q(Ye,n?l&1|2:l&1),ve&&Pt(t,a.treeForkCount),e):(Re(t),null);case 22:case 23:return ht(t),Vc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),l=t.updateQueue,l!==null&&oi(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&C(aa),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),tl(Xe),Re(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function yy(e,t){switch(wc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return tl(Xe),Ue(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ma(t),null;case 31:if(t.memoizedState!==null){if(ht(t),t.alternate===null)throw Error(r(340));ea()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ht(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ea()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return C(Ye),null;case 4:return Ue(),null;case 10:return tl(t.type),null;case 22:case 23:return ht(t),Vc(),e!==null&&C(aa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return tl(Xe),null;case 25:return null;default:return null}}function Ff(e,t){switch(wc(t),t.tag){case 3:tl(Xe),Ue();break;case 26:case 27:case 5:ma(t);break;case 4:Ue();break;case 31:t.memoizedState!==null&&ht(t);break;case 13:ht(t);break;case 19:C(Ye);break;case 10:tl(t.type);break;case 22:case 23:ht(t),Vc(),e!==null&&C(aa);break;case 24:tl(Xe)}}function Qn(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var s=l.create,c=l.inst;a=s(),c.destroy=a}l=l.next}while(l!==n)}}catch(o){Ae(t,t.return,o)}}function Tl(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var s=n.next;a=s;do{if((a.tag&e)===e){var c=a.inst,o=c.destroy;if(o!==void 0){c.destroy=void 0,n=t;var y=l,A=o;try{A()}catch(R){Ae(n,y,R)}}}a=a.next}while(a!==s)}}catch(R){Ae(t,t.return,R)}}function $f(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Yo(t,l)}catch(a){Ae(e,e.return,a)}}}function If(e,t,l){l.props=ua(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ae(e,t,a)}}function Zn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(n){Ae(e,t,n)}}function Gt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){Ae(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){Ae(e,t,n)}else l.current=null}function Pf(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){Ae(e,e.return,n)}}function Cu(e,t,l){try{var a=e.stateNode;By(a,e.type,l,t),a[Ie]=t}catch(n){Ae(e,e.return,n)}}function ed(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Rl(e.type)||e.tag===4}function zu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ed(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&&Rl(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 Au(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Ft));else if(a!==4&&(a===27&&Rl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Au(e,t,l),e=e.sibling;e!==null;)Au(e,t,l),e=e.sibling}function fi(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&Rl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(fi(e,t,l),e=e.sibling;e!==null;)fi(e,t,l),e=e.sibling}function td(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);lt(t,a,l),t[Ge]=e,t[Ie]=l}catch(s){Ae(e,e.return,s)}}var il=!1,Ve=!1,Tu=!1,ld=typeof WeakSet=="function"?WeakSet:Set,Fe=null;function py(e,t){if(e=e.containerInfo,Ju=Di,e=mo(e),bc(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,s=a.focusNode;a=a.focusOffset;try{l.nodeType,s.nodeType}catch{l=null;break e}var c=0,o=-1,y=-1,A=0,R=0,B=e,T=null;t:for(;;){for(var D;B!==l||n!==0&&B.nodeType!==3||(o=c+n),B!==s||a!==0&&B.nodeType!==3||(y=c+a),B.nodeType===3&&(c+=B.nodeValue.length),(D=B.firstChild)!==null;)T=B,B=D;for(;;){if(B===e)break t;if(T===l&&++A===n&&(o=c),T===s&&++R===a&&(y=c),(D=B.nextSibling)!==null)break;B=T,T=B.parentNode}B=D}l=o===-1||y===-1?null:{start:o,end:y}}else l=null}l=l||{start:0,end:0}}else l=null;for(Wu={focusedElem:e,selectionRange:l},Di=!1,Fe=t;Fe!==null;)if(t=Fe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Fe=e;else for(;Fe!==null;){switch(t=Fe,s=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)n=e[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,l=t,n=s.memoizedProps,s=s.memoizedState,a=l.stateNode;try{var W=ua(l.type,n);e=a.getSnapshotBeforeUpdate(W,s),a.__reactInternalSnapshotBeforeUpdate=e}catch(ae){Ae(l,l.return,ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Iu(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Iu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,Fe=e;break}Fe=t.return}}function ad(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:ul(e,l),a&4&&Qn(5,l);break;case 1:if(ul(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(c){Ae(l,l.return,c)}else{var n=ua(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){Ae(l,l.return,c)}}a&64&&$f(l),a&512&&Zn(l,l.return);break;case 3:if(ul(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Yo(e,t)}catch(c){Ae(l,l.return,c)}}break;case 27:t===null&&a&4&&td(l);case 26:case 5:ul(e,l),t===null&&a&4&&Pf(l),a&512&&Zn(l,l.return);break;case 12:ul(e,l);break;case 31:ul(e,l),a&4&&id(e,l);break;case 13:ul(e,l),a&4&&cd(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=zy.bind(null,l),Zy(e,l))));break;case 22:if(a=l.memoizedState!==null||il,!a){t=t!==null&&t.memoizedState!==null||Ve,n=il;var s=Ve;il=a,(Ve=t)&&!s?rl(e,l,(l.subtreeFlags&8772)!==0):ul(e,l),il=n,Ve=s}break;case 30:break;default:ul(e,l)}}function nd(e){var t=e.alternate;t!==null&&(e.alternate=null,nd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ac(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 Oe=null,rt=!1;function cl(e,t,l){for(l=l.child;l!==null;)sd(e,t,l),l=l.sibling}function sd(e,t,l){if(st&&typeof st.onCommitFiberUnmount=="function")try{st.onCommitFiberUnmount(Ql,l)}catch{}switch(l.tag){case 26:Ve||Gt(l,t),cl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ve||Gt(l,t);var a=Oe,n=rt;Rl(l.type)&&(Oe=l.stateNode,rt=!1),cl(e,t,l),es(l.stateNode),Oe=a,rt=n;break;case 5:Ve||Gt(l,t);case 6:if(a=Oe,n=rt,Oe=null,cl(e,t,l),Oe=a,rt=n,Oe!==null)if(rt)try{(Oe.nodeType===9?Oe.body:Oe.nodeName==="HTML"?Oe.ownerDocument.body:Oe).removeChild(l.stateNode)}catch(s){Ae(l,t,s)}else try{Oe.removeChild(l.stateNode)}catch(s){Ae(l,t,s)}break;case 18:Oe!==null&&(rt?(e=Oe,$d(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),nn(e)):$d(Oe,l.stateNode));break;case 4:a=Oe,n=rt,Oe=l.stateNode.containerInfo,rt=!0,cl(e,t,l),Oe=a,rt=n;break;case 0:case 11:case 14:case 15:Tl(2,l,t),Ve||Tl(4,l,t),cl(e,t,l);break;case 1:Ve||(Gt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&If(l,t,a)),cl(e,t,l);break;case 21:cl(e,t,l);break;case 22:Ve=(a=Ve)||l.memoizedState!==null,cl(e,t,l),Ve=a;break;default:cl(e,t,l)}}function id(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{nn(e)}catch(l){Ae(t,t.return,l)}}}function cd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{nn(e)}catch(l){Ae(t,t.return,l)}}function vy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ld),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ld),t;default:throw Error(r(435,e.tag))}}function di(e,t){var l=vy(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=Ay.bind(null,e,a);a.then(n,n)}})}function ot(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],s=e,c=t,o=c;e:for(;o!==null;){switch(o.tag){case 27:if(Rl(o.type)){Oe=o.stateNode,rt=!1;break e}break;case 5:Oe=o.stateNode,rt=!1;break e;case 3:case 4:Oe=o.stateNode.containerInfo,rt=!0;break e}o=o.return}if(Oe===null)throw Error(r(160));sd(s,c,n),Oe=null,rt=!1,s=n.alternate,s!==null&&(s.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ud(t,e),t=t.sibling}var Ut=null;function ud(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ot(t,e),ft(e),a&4&&(Tl(3,e,e.return),Qn(3,e),Tl(5,e,e.return));break;case 1:ot(t,e),ft(e),a&512&&(Ve||l===null||Gt(l,l.return)),a&64&&il&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var n=Ut;if(ot(t,e),ft(e),a&512&&(Ve||l===null||Gt(l,l.return)),a&4){var s=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,n=n.ownerDocument||n;t:switch(a){case"title":s=n.getElementsByTagName("title")[0],(!s||s[Rt]||s[Ge]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=n.createElement(a),n.head.insertBefore(s,n.querySelector("head > title"))),lt(s,a,l),s[Ge]=e,We(s),a=s;break e;case"link":var c=um("link","href",n).get(a+(l.href||""));if(c){for(var o=0;o<c.length;o++)if(s=c[o],s.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&s.getAttribute("rel")===(l.rel==null?null:l.rel)&&s.getAttribute("title")===(l.title==null?null:l.title)&&s.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){c.splice(o,1);break t}}s=n.createElement(a),lt(s,a,l),n.head.appendChild(s);break;case"meta":if(c=um("meta","content",n).get(a+(l.content||""))){for(o=0;o<c.length;o++)if(s=c[o],s.getAttribute("content")===(l.content==null?null:""+l.content)&&s.getAttribute("name")===(l.name==null?null:l.name)&&s.getAttribute("property")===(l.property==null?null:l.property)&&s.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&s.getAttribute("charset")===(l.charSet==null?null:l.charSet)){c.splice(o,1);break t}}s=n.createElement(a),lt(s,a,l),n.head.appendChild(s);break;default:throw Error(r(468,a))}s[Ge]=e,We(s),a=s}e.stateNode=a}else rm(n,e.type,e.stateNode);else e.stateNode=cm(n,a,e.memoizedProps);else s!==a?(s===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):s.count--,a===null?rm(n,e.type,e.stateNode):cm(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Cu(e,e.memoizedProps,l.memoizedProps)}break;case 27:ot(t,e),ft(e),a&512&&(Ve||l===null||Gt(l,l.return)),l!==null&&a&4&&Cu(e,e.memoizedProps,l.memoizedProps);break;case 5:if(ot(t,e),ft(e),a&512&&(Ve||l===null||Gt(l,l.return)),e.flags&32){n=e.stateNode;try{Ta(n,"")}catch(W){Ae(e,e.return,W)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,Cu(e,n,l!==null?l.memoizedProps:n)),a&1024&&(Tu=!0);break;case 6:if(ot(t,e),ft(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(W){Ae(e,e.return,W)}}break;case 3:if(Ei=null,n=Ut,Ut=Ai(t.containerInfo),ot(t,e),Ut=n,ft(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{nn(t.containerInfo)}catch(W){Ae(e,e.return,W)}Tu&&(Tu=!1,rd(e));break;case 4:a=Ut,Ut=Ai(e.stateNode.containerInfo),ot(t,e),ft(e),Ut=a;break;case 12:ot(t,e),ft(e);break;case 31:ot(t,e),ft(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,di(e,a)));break;case 13:ot(t,e),ft(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(xi=nt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,di(e,a)));break;case 22:n=e.memoizedState!==null;var y=l!==null&&l.memoizedState!==null,A=il,R=Ve;if(il=A||n,Ve=R||y,ot(t,e),Ve=R,il=A,ft(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||y||il||Ve||ra(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){y=l=t;try{if(s=y.stateNode,n)c=s.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{o=y.stateNode;var B=y.memoizedProps.style,T=B!=null&&B.hasOwnProperty("display")?B.display:null;o.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(W){Ae(y,y.return,W)}}}else if(t.tag===6){if(l===null){y=t;try{y.stateNode.nodeValue=n?"":y.memoizedProps}catch(W){Ae(y,y.return,W)}}}else if(t.tag===18){if(l===null){y=t;try{var D=y.stateNode;n?Id(D,!0):Id(y.stateNode,!1)}catch(W){Ae(y,y.return,W)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,di(e,l))));break;case 19:ot(t,e),ft(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,di(e,a)));break;case 30:break;case 21:break;default:ot(t,e),ft(e)}}function ft(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(ed(a)){l=a;break}a=a.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var n=l.stateNode,s=zu(e);fi(e,s,n);break;case 5:var c=l.stateNode;l.flags&32&&(Ta(c,""),l.flags&=-33);var o=zu(e);fi(e,o,c);break;case 3:case 4:var y=l.stateNode.containerInfo,A=zu(e);Au(e,A,y);break;default:throw Error(r(161))}}catch(R){Ae(e,e.return,R)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;rd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ul(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ad(e,t.alternate,t),t=t.sibling}function ra(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Tl(4,t,t.return),ra(t);break;case 1:Gt(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&If(t,t.return,l),ra(t);break;case 27:es(t.stateNode);case 26:case 5:Gt(t,t.return),ra(t);break;case 22:t.memoizedState===null&&ra(t);break;case 30:ra(t);break;default:ra(t)}e=e.sibling}}function rl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,s=t,c=s.flags;switch(s.tag){case 0:case 11:case 15:rl(n,s,l),Qn(4,s);break;case 1:if(rl(n,s,l),a=s,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(A){Ae(a,a.return,A)}if(a=s,n=a.updateQueue,n!==null){var o=a.stateNode;try{var y=n.shared.hiddenCallbacks;if(y!==null)for(n.shared.hiddenCallbacks=null,n=0;n<y.length;n++)qo(y[n],o)}catch(A){Ae(a,a.return,A)}}l&&c&64&&$f(s),Zn(s,s.return);break;case 27:td(s);case 26:case 5:rl(n,s,l),l&&a===null&&c&4&&Pf(s),Zn(s,s.return);break;case 12:rl(n,s,l);break;case 31:rl(n,s,l),l&&c&4&&id(n,s);break;case 13:rl(n,s,l),l&&c&4&&cd(n,s);break;case 22:s.memoizedState===null&&rl(n,s,l),Zn(s,s.return);break;case 30:break;default:rl(n,s,l)}t=t.sibling}}function Eu(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&wn(l))}function Mu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wn(e))}function Bt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)od(e,t,l,a),t=t.sibling}function od(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:Bt(e,t,l,a),n&2048&&Qn(9,t);break;case 1:Bt(e,t,l,a);break;case 3:Bt(e,t,l,a),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wn(e)));break;case 12:if(n&2048){Bt(e,t,l,a),e=t.stateNode;try{var s=t.memoizedProps,c=s.id,o=s.onPostCommit;typeof o=="function"&&o(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(y){Ae(t,t.return,y)}}else Bt(e,t,l,a);break;case 31:Bt(e,t,l,a);break;case 13:Bt(e,t,l,a);break;case 23:break;case 22:s=t.stateNode,c=t.alternate,t.memoizedState!==null?s._visibility&2?Bt(e,t,l,a):Vn(e,t):s._visibility&2?Bt(e,t,l,a):(s._visibility|=2,Ka(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Eu(c,t);break;case 24:Bt(e,t,l,a),n&2048&&Mu(t.alternate,t);break;default:Bt(e,t,l,a)}}function Ka(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,c=t,o=l,y=a,A=c.flags;switch(c.tag){case 0:case 11:case 15:Ka(s,c,o,y,n),Qn(8,c);break;case 23:break;case 22:var R=c.stateNode;c.memoizedState!==null?R._visibility&2?Ka(s,c,o,y,n):Vn(s,c):(R._visibility|=2,Ka(s,c,o,y,n)),n&&A&2048&&Eu(c.alternate,c);break;case 24:Ka(s,c,o,y,n),n&&A&2048&&Mu(c.alternate,c);break;default:Ka(s,c,o,y,n)}t=t.sibling}}function Vn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,n=a.flags;switch(a.tag){case 22:Vn(l,a),n&2048&&Eu(a.alternate,a);break;case 24:Vn(l,a),n&2048&&Mu(a.alternate,a);break;default:Vn(l,a)}t=t.sibling}}var Kn=8192;function Ja(e,t,l){if(e.subtreeFlags&Kn)for(e=e.child;e!==null;)fd(e,t,l),e=e.sibling}function fd(e,t,l){switch(e.tag){case 26:Ja(e,t,l),e.flags&Kn&&e.memoizedState!==null&&ap(l,Ut,e.memoizedState,e.memoizedProps);break;case 5:Ja(e,t,l);break;case 3:case 4:var a=Ut;Ut=Ai(e.stateNode.containerInfo),Ja(e,t,l),Ut=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Kn,Kn=16777216,Ja(e,t,l),Kn=a):Ja(e,t,l));break;default:Ja(e,t,l)}}function dd(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 Jn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Fe=a,xd(a,e)}dd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)md(e),e=e.sibling}function md(e){switch(e.tag){case 0:case 11:case 15:Jn(e),e.flags&2048&&Tl(9,e,e.return);break;case 3:Jn(e);break;case 12:Jn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,mi(e)):Jn(e);break;default:Jn(e)}}function mi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Fe=a,xd(a,e)}dd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Tl(8,t,t.return),mi(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,mi(t));break;default:mi(t)}e=e.sibling}}function xd(e,t){for(;Fe!==null;){var l=Fe;switch(l.tag){case 0:case 11:case 15:Tl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:wn(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Fe=a;else e:for(l=e;Fe!==null;){a=Fe;var n=a.sibling,s=a.return;if(nd(a),a===l){Fe=null;break e}if(n!==null){n.return=s,Fe=n;break e}Fe=s}}}var hy={getCacheForType:function(e){var t=et(Xe),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return et(Xe).controller.signal}},gy=typeof WeakMap=="function"?WeakMap:Map,Ne=0,we=null,me=null,ye=0,ze=0,gt=null,El=!1,Wa=!1,ku=!1,ol=0,He=0,Ml=0,oa=0,wu=0,bt=0,Fa=0,Wn=null,dt=null,Du=!1,xi=0,yd=0,yi=1/0,pi=null,kl=null,Je=0,wl=null,$a=null,fl=0,_u=0,Ru=null,pd=null,Fn=0,Ou=null;function St(){return(Ne&2)!==0&&ye!==0?ye&-ye:M.T!==null?Lu():Ke()}function vd(){if(bt===0)if((ye&536870912)===0||ve){var e=pa;pa<<=1,(pa&3932160)===0&&(pa=262144),bt=e}else bt=536870912;return e=vt.current,e!==null&&(e.flags|=32),bt}function mt(e,t,l){(e===we&&(ze===2||ze===9)||e.cancelPendingCommit!==null)&&(Ia(e,0),Dl(e,ye,bt,!1)),Dt(e,l),((Ne&2)===0||e!==we)&&(e===we&&((Ne&2)===0&&(oa|=l),He===4&&Dl(e,ye,bt,!1)),Xt(e))}function hd(e,t,l){if((Ne&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Zl(e,t),n=a?jy(e,t):Bu(e,t,!0),s=a;do{if(n===0){Wa&&!a&&Dl(e,t,0,!1);break}else{if(l=e.current.alternate,s&&!by(l)){n=Bu(e,t,!1),s=!1;continue}if(n===2){if(s=t,e.errorRecoveryDisabledLanes&s)var c=0;else c=e.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){t=c;e:{var o=e;n=Wn;var y=o.current.memoizedState.isDehydrated;if(y&&(Ia(o,c).flags|=256),c=Bu(o,c,!1),c!==2){if(ku&&!y){o.errorRecoveryDisabledLanes|=s,oa|=s,n=4;break e}s=dt,dt=n,s!==null&&(dt===null?dt=s:dt.push.apply(dt,s))}n=c}if(s=!1,n!==2)continue}}if(n===1){Ia(e,0),Dl(e,t,0,!0);break}e:{switch(a=e,s=n,s){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Dl(a,t,bt,!El);break e;case 2:dt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(n=xi+300-nt(),10<n)){if(Dl(a,t,bt,!El),ha(a,0,!0)!==0)break e;fl=t,a.timeoutHandle=Wd(gd.bind(null,a,l,dt,pi,Du,t,bt,oa,Fa,El,s,"Throttled",-0,0),n);break e}gd(a,l,dt,pi,Du,t,bt,oa,Fa,El,s,null,-0,0)}}break}while(!0);Xt(e)}function gd(e,t,l,a,n,s,c,o,y,A,R,B,T,D){if(e.timeoutHandle=-1,B=t.subtreeFlags,B&8192||(B&16785408)===16785408){B={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ft},fd(t,s,B);var W=(s&62914560)===s?xi-nt():(s&4194048)===s?yd-nt():0;if(W=np(B,W),W!==null){fl=s,e.cancelPendingCommit=W(Td.bind(null,e,t,s,l,a,n,c,o,y,R,B,null,T,D)),Dl(e,s,c,!A);return}}Td(e,t,s,l,a,n,c,o,y)}function by(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],s=n.getSnapshot;n=n.value;try{if(!yt(s(),n))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Dl(e,t,l,a){t&=~wu,t&=~oa,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var s=31-it(n),c=1<<s;a[s]=-1,n&=~c}l!==0&&Vl(e,l,t)}function vi(){return(Ne&6)===0?($n(0),!1):!0}function Uu(){if(me!==null){if(ze===0)var e=me.return;else e=me,el=ta=null,Ic(e),Ga=null,_n=0,e=me;for(;e!==null;)Ff(e.alternate,e),e=e.return;me=null}}function Ia(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Yy(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),fl=0,Uu(),we=e,me=l=It(e.current,null),ye=t,ze=0,gt=null,El=!1,Wa=Zl(e,t),ku=!1,Fa=bt=wu=oa=Ml=He=0,dt=Wn=null,Du=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var n=31-it(a),s=1<<n;t|=e[n],a&=~s}return ol=t,Hs(),l}function bd(e,t){re=null,M.H=Ln,t===La||t===Vs?(t=Oo(),ze=3):t===Yc?(t=Oo(),ze=4):ze=t===xu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,gt=t,me===null&&(He=1,ii(e,zt(t,e.current)))}function Sd(){var e=vt.current;return e===null?!0:(ye&4194048)===ye?Mt===null:(ye&62914560)===ye||(ye&536870912)!==0?e===Mt:!1}function jd(){var e=M.H;return M.H=Ln,e===null?Ln:e}function Nd(){var e=M.A;return M.A=hy,e}function hi(){He=4,El||(ye&4194048)!==ye&&vt.current!==null||(Wa=!0),(Ml&134217727)===0&&(oa&134217727)===0||we===null||Dl(we,ye,bt,!1)}function Bu(e,t,l){var a=Ne;Ne|=2;var n=jd(),s=Nd();(we!==e||ye!==t)&&(pi=null,Ia(e,t)),t=!1;var c=He;e:do try{if(ze!==0&&me!==null){var o=me,y=gt;switch(ze){case 8:Uu(),c=6;break e;case 3:case 2:case 9:case 6:vt.current===null&&(t=!0);var A=ze;if(ze=0,gt=null,Pa(e,o,y,A),l&&Wa){c=0;break e}break;default:A=ze,ze=0,gt=null,Pa(e,o,y,A)}}Sy(),c=He;break}catch(R){bd(e,R)}while(!0);return t&&e.shellSuspendCounter++,el=ta=null,Ne=a,M.H=n,M.A=s,me===null&&(we=null,ye=0,Hs()),c}function Sy(){for(;me!==null;)Cd(me)}function jy(e,t){var l=Ne;Ne|=2;var a=jd(),n=Nd();we!==e||ye!==t?(pi=null,yi=nt()+500,Ia(e,t)):Wa=Zl(e,t);e:do try{if(ze!==0&&me!==null){t=me;var s=gt;t:switch(ze){case 1:ze=0,gt=null,Pa(e,t,s,1);break;case 2:case 9:if(_o(s)){ze=0,gt=null,zd(t);break}t=function(){ze!==2&&ze!==9||we!==e||(ze=7),Xt(e)},s.then(t,t);break e;case 3:ze=7;break e;case 4:ze=5;break e;case 7:_o(s)?(ze=0,gt=null,zd(t)):(ze=0,gt=null,Pa(e,t,s,7));break;case 5:var c=null;switch(me.tag){case 26:c=me.memoizedState;case 5:case 27:var o=me;if(c?om(c):o.stateNode.complete){ze=0,gt=null;var y=o.sibling;if(y!==null)me=y;else{var A=o.return;A!==null?(me=A,gi(A)):me=null}break t}}ze=0,gt=null,Pa(e,t,s,5);break;case 6:ze=0,gt=null,Pa(e,t,s,6);break;case 8:Uu(),He=6;break e;default:throw Error(r(462))}}Ny();break}catch(R){bd(e,R)}while(!0);return el=ta=null,M.H=a,M.A=n,Ne=l,me!==null?0:(we=null,ye=0,Hs(),He)}function Ny(){for(;me!==null&&!Fi();)Cd(me)}function Cd(e){var t=Jf(e.alternate,e,ol);e.memoizedProps=e.pendingProps,t===null?gi(e):me=t}function zd(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Gf(l,t,t.pendingProps,t.type,void 0,ye);break;case 11:t=Gf(l,t,t.pendingProps,t.type.render,t.ref,ye);break;case 5:Ic(t);default:Ff(l,t),t=me=jo(t,ol),t=Jf(l,t,ol)}e.memoizedProps=e.pendingProps,t===null?gi(e):me=t}function Pa(e,t,l,a){el=ta=null,Ic(t),Ga=null,_n=0;var n=t.return;try{if(fy(e,n,t,l,ye)){He=1,ii(e,zt(l,e.current)),me=null;return}}catch(s){if(n!==null)throw me=n,s;He=1,ii(e,zt(l,e.current)),me=null;return}t.flags&32768?(ve||a===1?e=!0:Wa||(ye&536870912)!==0?e=!1:(El=e=!0,(a===2||a===9||a===3||a===6)&&(a=vt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Ad(t,e)):gi(t)}function gi(e){var t=e;do{if((t.flags&32768)!==0){Ad(t,El);return}e=t.return;var l=xy(t.alternate,t,ol);if(l!==null){me=l;return}if(t=t.sibling,t!==null){me=t;return}me=t=e}while(t!==null);He===0&&(He=5)}function Ad(e,t){do{var l=yy(e.alternate,e);if(l!==null){l.flags&=32767,me=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){me=e;return}me=e=l}while(e!==null);He=6,me=null}function Td(e,t,l,a,n,s,c,o,y){e.cancelPendingCommit=null;do bi();while(Je!==0);if((Ne&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(s=t.lanes|t.childLanes,s|=zc,ba(e,l,s,c,o,y),e===we&&(me=we=null,ye=0),$a=t,wl=e,fl=l,_u=s,Ru=n,pd=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ty(xa,function(){return Dd(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null,n=G.p,G.p=2,c=Ne,Ne|=4;try{py(e,t,l)}finally{Ne=c,G.p=n,M.T=a}}Je=1,Ed(),Md(),kd()}}function Ed(){if(Je===1){Je=0;var e=wl,t=$a,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=M.T,M.T=null;var a=G.p;G.p=2;var n=Ne;Ne|=4;try{ud(t,e);var s=Wu,c=mo(e.containerInfo),o=s.focusedElem,y=s.selectionRange;if(c!==o&&o&&o.ownerDocument&&fo(o.ownerDocument.documentElement,o)){if(y!==null&&bc(o)){var A=y.start,R=y.end;if(R===void 0&&(R=A),"selectionStart"in o)o.selectionStart=A,o.selectionEnd=Math.min(R,o.value.length);else{var B=o.ownerDocument||document,T=B&&B.defaultView||window;if(T.getSelection){var D=T.getSelection(),W=o.textContent.length,ae=Math.min(y.start,W),ke=y.end===void 0?ae:Math.min(y.end,W);!D.extend&&ae>ke&&(c=ke,ke=ae,ae=c);var S=oo(o,ae),v=oo(o,ke);if(S&&v&&(D.rangeCount!==1||D.anchorNode!==S.node||D.anchorOffset!==S.offset||D.focusNode!==v.node||D.focusOffset!==v.offset)){var z=B.createRange();z.setStart(S.node,S.offset),D.removeAllRanges(),ae>ke?(D.addRange(z),D.extend(v.node,v.offset)):(z.setEnd(v.node,v.offset),D.addRange(z))}}}}for(B=[],D=o;D=D.parentNode;)D.nodeType===1&&B.push({element:D,left:D.scrollLeft,top:D.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<B.length;o++){var U=B[o];U.element.scrollLeft=U.left,U.element.scrollTop=U.top}}Di=!!Ju,Wu=Ju=null}finally{Ne=n,G.p=a,M.T=l}}e.current=t,Je=2}}function Md(){if(Je===2){Je=0;var e=wl,t=$a,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=M.T,M.T=null;var a=G.p;G.p=2;var n=Ne;Ne|=4;try{ad(e,t.alternate,t)}finally{Ne=n,G.p=a,M.T=l}}Je=3}}function kd(){if(Je===4||Je===3){Je=0,$i();var e=wl,t=$a,l=fl,a=pd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Je=5:(Je=0,$a=wl=null,wd(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(kl=null),hn(l),t=t.stateNode,st&&typeof st.onCommitFiberRoot=="function")try{st.onCommitFiberRoot(Ql,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=M.T,n=G.p,G.p=2,M.T=null;try{for(var s=e.onRecoverableError,c=0;c<a.length;c++){var o=a[c];s(o.value,{componentStack:o.stack})}}finally{M.T=t,G.p=n}}(fl&3)!==0&&bi(),Xt(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===Ou?Fn++:(Fn=0,Ou=e):Fn=0,$n(0)}}function wd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,wn(t)))}function bi(){return Ed(),Md(),kd(),Dd()}function Dd(){if(Je!==5)return!1;var e=wl,t=_u;_u=0;var l=hn(fl),a=M.T,n=G.p;try{G.p=32>l?32:l,M.T=null,l=Ru,Ru=null;var s=wl,c=fl;if(Je=0,$a=wl=null,fl=0,(Ne&6)!==0)throw Error(r(331));var o=Ne;if(Ne|=4,md(s.current),od(s,s.current,c,l),Ne=o,$n(0,!1),st&&typeof st.onPostCommitFiberRoot=="function")try{st.onPostCommitFiberRoot(Ql,s)}catch{}return!0}finally{G.p=n,M.T=a,wd(e,t)}}function _d(e,t,l){t=zt(l,t),t=mu(e.stateNode,t,2),e=Cl(e,t,2),e!==null&&(Dt(e,2),Xt(e))}function Ae(e,t,l){if(e.tag===3)_d(e,e,l);else for(;t!==null;){if(t.tag===3){_d(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(kl===null||!kl.has(a))){e=zt(l,e),l=Rf(2),a=Cl(t,l,2),a!==null&&(Of(l,a,t,e),Dt(a,2),Xt(a));break}}t=t.return}}function Hu(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new gy;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(ku=!0,n.add(l),e=Cy.bind(null,e,t,l),t.then(e,e))}function Cy(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,we===e&&(ye&l)===l&&(He===4||He===3&&(ye&62914560)===ye&&300>nt()-xi?(Ne&2)===0&&Ia(e,0):wu|=l,Fa===ye&&(Fa=0)),Xt(e)}function Rd(e,t){t===0&&(t=yl()),e=Il(e,t),e!==null&&(Dt(e,t),Xt(e))}function zy(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Rd(e,l)}function Ay(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),Rd(e,l)}function Ty(e,t){return yn(e,t)}var Si=null,en=null,qu=!1,ji=!1,Yu=!1,_l=0;function Xt(e){e!==en&&e.next===null&&(en===null?Si=en=e:en=en.next=e),ji=!0,qu||(qu=!0,My())}function $n(e,t){if(!Yu&&ji){Yu=!0;do for(var l=!1,a=Si;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var s=0;else{var c=a.suspendedLanes,o=a.pingedLanes;s=(1<<31-it(42|e)+1)-1,s&=n&~(c&~o),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(l=!0,Hd(a,s))}else s=ye,s=ha(a,a===we?s:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(s&3)===0||Zl(a,s)||(l=!0,Hd(a,s));a=a.next}while(l);Yu=!1}}function Ey(){Od()}function Od(){ji=qu=!1;var e=0;_l!==0&&qy()&&(e=_l);for(var t=nt(),l=null,a=Si;a!==null;){var n=a.next,s=Ud(a,t);s===0?(a.next=null,l===null?Si=n:l.next=n,n===null&&(en=l)):(l=a,(e!==0||(s&3)!==0)&&(ji=!0)),a=n}Je!==0&&Je!==5||$n(e),_l!==0&&(_l=0)}function Ud(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var c=31-it(s),o=1<<c,y=n[c];y===-1?((o&l)===0||(o&a)!==0)&&(n[c]=xl(o,t)):y<=t&&(e.expiredLanes|=o),s&=~o}if(t=we,l=ye,l=ha(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(ze===2||ze===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&pn(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Zl(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&pn(a),hn(l)){case 2:case 8:l=Ns;break;case 32:l=xa;break;case 268435456:l=Cs;break;default:l=xa}return a=Bd.bind(null,e),l=yn(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&pn(a),e.callbackPriority=2,e.callbackNode=null,2}function Bd(e,t){if(Je!==0&&Je!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(bi()&&e.callbackNode!==l)return null;var a=ye;return a=ha(e,e===we?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(hd(e,a,t),Ud(e,nt()),e.callbackNode!=null&&e.callbackNode===l?Bd.bind(null,e):null)}function Hd(e,t){if(bi())return null;hd(e,t,!0)}function My(){Ly(function(){(Ne&6)!==0?yn(js,Ey):Od()})}function Lu(){if(_l===0){var e=qa;e===0&&(e=ya,ya<<=1,(ya&261888)===0&&(ya=256)),_l=e}return _l}function qd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ks(""+e)}function Yd(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function ky(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var s=qd((n[Ie]||null).action),c=a.submitter;c&&(t=(t=c[Ie]||null)?qd(t.formAction):c.getAttribute("formAction"),t!==null&&(s=t,c=null));var o=new Rs("action","action",null,a,n);e.push({event:o,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(_l!==0){var y=c?Yd(n,c):new FormData(n);cu(l,{pending:!0,data:y,method:n.method,action:s},null,y)}}else typeof s=="function"&&(o.preventDefault(),y=c?Yd(n,c):new FormData(n),cu(l,{pending:!0,data:y,method:n.method,action:s},s,y))},currentTarget:n}]})}}for(var Gu=0;Gu<Cc.length;Gu++){var Xu=Cc[Gu],wy=Xu.toLowerCase(),Dy=Xu[0].toUpperCase()+Xu.slice(1);Ot(wy,"on"+Dy)}Ot(po,"onAnimationEnd"),Ot(vo,"onAnimationIteration"),Ot(ho,"onAnimationStart"),Ot("dblclick","onDoubleClick"),Ot("focusin","onFocus"),Ot("focusout","onBlur"),Ot(Jx,"onTransitionRun"),Ot(Wx,"onTransitionStart"),Ot(Fx,"onTransitionCancel"),Ot(go,"onTransitionEnd"),za("onMouseEnter",["mouseout","mouseover"]),za("onMouseLeave",["mouseout","mouseover"]),za("onPointerEnter",["pointerout","pointerover"]),za("onPointerLeave",["pointerout","pointerover"]),Jl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var In="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(" "),_y=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(In));function Ld(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var s=void 0;if(t)for(var c=a.length-1;0<=c;c--){var o=a[c],y=o.instance,A=o.currentTarget;if(o=o.listener,y!==s&&n.isPropagationStopped())break e;s=o,n.currentTarget=A;try{s(n)}catch(R){Bs(R)}n.currentTarget=null,s=y}else for(c=0;c<a.length;c++){if(o=a[c],y=o.instance,A=o.currentTarget,o=o.listener,y!==s&&n.isPropagationStopped())break e;s=o,n.currentTarget=A;try{s(n)}catch(R){Bs(R)}n.currentTarget=null,s=y}}}}function xe(e,t){var l=t[K];l===void 0&&(l=t[K]=new Set);var a=e+"__bubble";l.has(a)||(Gd(t,e,2,!1),l.add(a))}function Qu(e,t,l){var a=0;t&&(a|=4),Gd(l,e,a,t)}var Ni="_reactListening"+Math.random().toString(36).slice(2);function Zu(e){if(!e[Ni]){e[Ni]=!0,_r.forEach(function(l){l!=="selectionchange"&&(_y.has(l)||Qu(l,!1,e),Qu(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ni]||(t[Ni]=!0,Qu("selectionchange",!1,t))}}function Gd(e,t,l,a){switch(vm(t)){case 2:var n=cp;break;case 8:n=up;break;default:n=ir}l=n.bind(null,t,l,e),n=void 0,!fc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(t,l,{capture:!0,passive:n}):e.addEventListener(t,l,!0):n!==void 0?e.addEventListener(t,l,{passive:n}):e.addEventListener(t,l,!1)}function Vu(e,t,l,a,n){var s=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var c=a.tag;if(c===3||c===4){var o=a.stateNode.containerInfo;if(o===n)break;if(c===4)for(c=a.return;c!==null;){var y=c.tag;if((y===3||y===4)&&c.stateNode.containerInfo===n)return;c=c.return}for(;o!==null;){if(c=ja(o),c===null)return;if(y=c.tag,y===5||y===6||y===26||y===27){a=s=c;continue e}o=o.parentNode}}a=a.return}Zr(function(){var A=s,R=rc(l),B=[];e:{var T=bo.get(e);if(T!==void 0){var D=Rs,W=e;switch(e){case"keypress":if(Ds(l)===0)break e;case"keydown":case"keyup":D=Ax;break;case"focusin":W="focus",D=yc;break;case"focusout":W="blur",D=yc;break;case"beforeblur":case"afterblur":D=yc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":D=Jr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":D=xx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":D=Mx;break;case po:case vo:case ho:D=vx;break;case go:D=wx;break;case"scroll":case"scrollend":D=dx;break;case"wheel":D=_x;break;case"copy":case"cut":case"paste":D=gx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":D=Fr;break;case"toggle":case"beforetoggle":D=Ox}var ae=(t&4)!==0,ke=!ae&&(e==="scroll"||e==="scrollend"),S=ae?T!==null?T+"Capture":null:T;ae=[];for(var v=A,z;v!==null;){var U=v;if(z=U.stateNode,U=U.tag,U!==5&&U!==26&&U!==27||z===null||S===null||(U=bn(v,S),U!=null&&ae.push(Pn(v,U,z))),ke)break;v=v.return}0<ae.length&&(T=new D(T,W,null,l,R),B.push({event:T,listeners:ae}))}}if((t&7)===0){e:{if(T=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",T&&l!==uc&&(W=l.relatedTarget||l.fromElement)&&(ja(W)||W[Kt]))break e;if((D||T)&&(T=R.window===R?R:(T=R.ownerDocument)?T.defaultView||T.parentWindow:window,D?(W=l.relatedTarget||l.toElement,D=A,W=W?ja(W):null,W!==null&&(ke=x(W),ae=W.tag,W!==ke||ae!==5&&ae!==27&&ae!==6)&&(W=null)):(D=null,W=A),D!==W)){if(ae=Jr,U="onMouseLeave",S="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(ae=Fr,U="onPointerLeave",S="onPointerEnter",v="pointer"),ke=D==null?T:gn(D),z=W==null?T:gn(W),T=new ae(U,v+"leave",D,l,R),T.target=ke,T.relatedTarget=z,U=null,ja(R)===A&&(ae=new ae(S,v+"enter",W,l,R),ae.target=z,ae.relatedTarget=ke,U=ae),ke=U,D&&W)t:{for(ae=Ry,S=D,v=W,z=0,U=S;U;U=ae(U))z++;U=0;for(var P=v;P;P=ae(P))U++;for(;0<z-U;)S=ae(S),z--;for(;0<U-z;)v=ae(v),U--;for(;z--;){if(S===v||v!==null&&S===v.alternate){ae=S;break t}S=ae(S),v=ae(v)}ae=null}else ae=null;D!==null&&Xd(B,T,D,ae,!1),W!==null&&ke!==null&&Xd(B,ke,W,ae,!0)}}e:{if(T=A?gn(A):window,D=T.nodeName&&T.nodeName.toLowerCase(),D==="select"||D==="input"&&T.type==="file")var Se=no;else if(lo(T))if(so)Se=Zx;else{Se=Xx;var F=Gx}else D=T.nodeName,!D||D.toLowerCase()!=="input"||T.type!=="checkbox"&&T.type!=="radio"?A&&cc(A.elementType)&&(Se=no):Se=Qx;if(Se&&(Se=Se(e,A))){ao(B,Se,l,R);break e}F&&F(e,T,A),e==="focusout"&&A&&T.type==="number"&&A.memoizedProps.value!=null&&ic(T,"number",T.value)}switch(F=A?gn(A):window,e){case"focusin":(lo(F)||F.contentEditable==="true")&&(wa=F,Sc=A,En=null);break;case"focusout":En=Sc=wa=null;break;case"mousedown":jc=!0;break;case"contextmenu":case"mouseup":case"dragend":jc=!1,xo(B,l,R);break;case"selectionchange":if(Kx)break;case"keydown":case"keyup":xo(B,l,R)}var fe;if(vc)e:{switch(e){case"compositionstart":var pe="onCompositionStart";break e;case"compositionend":pe="onCompositionEnd";break e;case"compositionupdate":pe="onCompositionUpdate";break e}pe=void 0}else ka?eo(e,l)&&(pe="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(pe="onCompositionStart");pe&&($r&&l.locale!=="ko"&&(ka||pe!=="onCompositionStart"?pe==="onCompositionEnd"&&ka&&(fe=Vr()):(vl=R,dc="value"in vl?vl.value:vl.textContent,ka=!0)),F=Ci(A,pe),0<F.length&&(pe=new Wr(pe,e,null,l,R),B.push({event:pe,listeners:F}),fe?pe.data=fe:(fe=to(l),fe!==null&&(pe.data=fe)))),(fe=Bx?Hx(e,l):qx(e,l))&&(pe=Ci(A,"onBeforeInput"),0<pe.length&&(F=new Wr("onBeforeInput","beforeinput",null,l,R),B.push({event:F,listeners:pe}),F.data=fe)),ky(B,e,A,l,R)}Ld(B,t)})}function Pn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Ci(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,s=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||s===null||(n=bn(e,l),n!=null&&a.unshift(Pn(e,n,s)),n=bn(e,t),n!=null&&a.push(Pn(e,n,s))),e.tag===3)return a;e=e.return}return[]}function Ry(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xd(e,t,l,a,n){for(var s=t._reactName,c=[];l!==null&&l!==a;){var o=l,y=o.alternate,A=o.stateNode;if(o=o.tag,y!==null&&y===a)break;o!==5&&o!==26&&o!==27||A===null||(y=A,n?(A=bn(l,s),A!=null&&c.unshift(Pn(l,A,y))):n||(A=bn(l,s),A!=null&&c.push(Pn(l,A,y)))),l=l.return}c.length!==0&&e.push({event:t,listeners:c})}var Oy=/\r\n?/g,Uy=/\u0000|\uFFFD/g;function Qd(e){return(typeof e=="string"?e:""+e).replace(Oy,`
|
|
49
|
+
`).replace(Uy,"")}function Zd(e,t){return t=Qd(t),Qd(e)===t}function Me(e,t,l,a,n,s){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ta(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ta(e,""+a);break;case"className":Es(e,"class",a);break;case"tabIndex":Es(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Es(e,l,a);break;case"style":Xr(e,a,s);break;case"data":if(t!=="object"){Es(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=ks(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof s=="function"&&(l==="formAction"?(t!=="input"&&Me(e,t,"name",n.name,n,null),Me(e,t,"formEncType",n.formEncType,n,null),Me(e,t,"formMethod",n.formMethod,n,null),Me(e,t,"formTarget",n.formTarget,n,null)):(Me(e,t,"encType",n.encType,n,null),Me(e,t,"method",n.method,n,null),Me(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=ks(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Ft);break;case"onScroll":a!=null&&xe("scroll",e);break;case"onScrollEnd":a!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=ks(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":xe("beforetoggle",e),xe("toggle",e),Ts(e,"popover",a);break;case"xlinkActuate":Wt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Wt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Wt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Wt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Wt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Wt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Ts(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=ox.get(l)||l,Ts(e,l,a))}}function Ku(e,t,l,a,n,s){switch(l){case"style":Xr(e,a,s);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof a=="string"?Ta(e,a):(typeof a=="number"||typeof a=="bigint")&&Ta(e,""+a);break;case"onScroll":a!=null&&xe("scroll",e);break;case"onScrollEnd":a!=null&&xe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Ft);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Rr.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),s=e[Ie]||null,s=s!=null?s[l]:null,typeof s=="function"&&e.removeEventListener(t,s,n),typeof a=="function")){typeof s!="function"&&s!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,n);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):Ts(e,l,a)}}}function lt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var a=!1,n=!1,s;for(s in l)if(l.hasOwnProperty(s)){var c=l[s];if(c!=null)switch(s){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Me(e,t,s,c,l,null)}}n&&Me(e,t,"srcSet",l.srcSet,l,null),a&&Me(e,t,"src",l.src,l,null);return;case"input":xe("invalid",e);var o=s=c=n=null,y=null,A=null;for(a in l)if(l.hasOwnProperty(a)){var R=l[a];if(R!=null)switch(a){case"name":n=R;break;case"type":c=R;break;case"checked":y=R;break;case"defaultChecked":A=R;break;case"value":s=R;break;case"defaultValue":o=R;break;case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(137,t));break;default:Me(e,t,a,R,l,null)}}qr(e,s,o,y,A,c,n,!1);return;case"select":xe("invalid",e),a=c=s=null;for(n in l)if(l.hasOwnProperty(n)&&(o=l[n],o!=null))switch(n){case"value":s=o;break;case"defaultValue":c=o;break;case"multiple":a=o;default:Me(e,t,n,o,l,null)}t=s,l=c,e.multiple=!!a,t!=null?Aa(e,!!a,t,!1):l!=null&&Aa(e,!!a,l,!0);return;case"textarea":xe("invalid",e),s=n=a=null;for(c in l)if(l.hasOwnProperty(c)&&(o=l[c],o!=null))switch(c){case"value":a=o;break;case"defaultValue":n=o;break;case"children":s=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:Me(e,t,c,o,l,null)}Lr(e,a,n,s);return;case"option":for(y in l)if(l.hasOwnProperty(y)&&(a=l[y],a!=null))switch(y){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Me(e,t,y,a,l,null)}return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(a=0;a<In.length;a++)xe(In[a],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("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 l)if(l.hasOwnProperty(A)&&(a=l[A],a!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Me(e,t,A,a,l,null)}return;default:if(cc(t)){for(R in l)l.hasOwnProperty(R)&&(a=l[R],a!==void 0&&Ku(e,t,R,a,l,void 0));return}}for(o in l)l.hasOwnProperty(o)&&(a=l[o],a!=null&&Me(e,t,o,a,l,null))}function By(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,s=null,c=null,o=null,y=null,A=null,R=null;for(D in l){var B=l[D];if(l.hasOwnProperty(D)&&B!=null)switch(D){case"checked":break;case"value":break;case"defaultValue":y=B;default:a.hasOwnProperty(D)||Me(e,t,D,null,a,B)}}for(var T in a){var D=a[T];if(B=l[T],a.hasOwnProperty(T)&&(D!=null||B!=null))switch(T){case"type":s=D;break;case"name":n=D;break;case"checked":A=D;break;case"defaultChecked":R=D;break;case"value":c=D;break;case"defaultValue":o=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(137,t));break;default:D!==B&&Me(e,t,T,D,a,B)}}sc(e,c,o,y,A,R,s,n);return;case"select":D=c=o=T=null;for(s in l)if(y=l[s],l.hasOwnProperty(s)&&y!=null)switch(s){case"value":break;case"multiple":D=y;default:a.hasOwnProperty(s)||Me(e,t,s,null,a,y)}for(n in a)if(s=a[n],y=l[n],a.hasOwnProperty(n)&&(s!=null||y!=null))switch(n){case"value":T=s;break;case"defaultValue":o=s;break;case"multiple":c=s;default:s!==y&&Me(e,t,n,s,a,y)}t=o,l=c,a=D,T!=null?Aa(e,!!l,T,!1):!!a!=!!l&&(t!=null?Aa(e,!!l,t,!0):Aa(e,!!l,l?[]:"",!1));return;case"textarea":D=T=null;for(o in l)if(n=l[o],l.hasOwnProperty(o)&&n!=null&&!a.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:Me(e,t,o,null,a,n)}for(c in a)if(n=a[c],s=l[c],a.hasOwnProperty(c)&&(n!=null||s!=null))switch(c){case"value":T=n;break;case"defaultValue":D=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(r(91));break;default:n!==s&&Me(e,t,c,n,a,s)}Yr(e,T,D);return;case"option":for(var W in l)if(T=l[W],l.hasOwnProperty(W)&&T!=null&&!a.hasOwnProperty(W))switch(W){case"selected":e.selected=!1;break;default:Me(e,t,W,null,a,T)}for(y in a)if(T=a[y],D=l[y],a.hasOwnProperty(y)&&T!==D&&(T!=null||D!=null))switch(y){case"selected":e.selected=T&&typeof T!="function"&&typeof T!="symbol";break;default:Me(e,t,y,T,a,D)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ae in l)T=l[ae],l.hasOwnProperty(ae)&&T!=null&&!a.hasOwnProperty(ae)&&Me(e,t,ae,null,a,T);for(A in a)if(T=a[A],D=l[A],a.hasOwnProperty(A)&&T!==D&&(T!=null||D!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(r(137,t));break;default:Me(e,t,A,T,a,D)}return;default:if(cc(t)){for(var ke in l)T=l[ke],l.hasOwnProperty(ke)&&T!==void 0&&!a.hasOwnProperty(ke)&&Ku(e,t,ke,void 0,a,T);for(R in a)T=a[R],D=l[R],!a.hasOwnProperty(R)||T===D||T===void 0&&D===void 0||Ku(e,t,R,T,a,D);return}}for(var S in l)T=l[S],l.hasOwnProperty(S)&&T!=null&&!a.hasOwnProperty(S)&&Me(e,t,S,null,a,T);for(B in a)T=a[B],D=l[B],!a.hasOwnProperty(B)||T===D||T==null&&D==null||Me(e,t,B,T,a,D)}function Vd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Hy(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],s=n.transferSize,c=n.initiatorType,o=n.duration;if(s&&o&&Vd(c)){for(c=0,o=n.responseEnd,a+=1;a<l.length;a++){var y=l[a],A=y.startTime;if(A>o)break;var R=y.transferSize,B=y.initiatorType;R&&Vd(B)&&(y=y.responseEnd,c+=R*(y<o?1:(o-A)/(y-A)))}if(--a,t+=8*(s+c)/(n.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 Ju=null,Wu=null;function zi(e){return e.nodeType===9?e:e.ownerDocument}function Kd(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 Jd(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 Fu(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 $u=null;function qy(){var e=window.event;return e&&e.type==="popstate"?e===$u?!1:($u=e,!0):($u=null,!1)}var Wd=typeof setTimeout=="function"?setTimeout:void 0,Yy=typeof clearTimeout=="function"?clearTimeout:void 0,Fd=typeof Promise=="function"?Promise:void 0,Ly=typeof queueMicrotask=="function"?queueMicrotask:typeof Fd<"u"?function(e){return Fd.resolve(null).then(e).catch(Gy)}:Wd;function Gy(e){setTimeout(function(){throw e})}function Rl(e){return e==="head"}function $d(e,t){var l=t,a=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(n),nn(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")es(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,es(l);for(var s=l.firstChild;s;){var c=s.nextSibling,o=s.nodeName;s[Rt]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&s.rel.toLowerCase()==="stylesheet"||l.removeChild(s),s=c}}else l==="body"&&es(e.ownerDocument.body);l=n}while(l);nn(t)}function Id(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function Iu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Iu(l),ac(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Xy(e,t,l,a){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Rt])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=kt(e.nextSibling),e===null)break}return null}function Qy(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=kt(e.nextSibling),e===null))return null;return e}function Pd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=kt(e.nextSibling),e===null))return null;return e}function Pu(e){return e.data==="$?"||e.data==="$~"}function er(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Zy(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function kt(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 tr=null;function em(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return kt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function tm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function lm(e,t,l){switch(t=zi(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function es(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ac(e)}var wt=new Map,am=new Set;function Ai(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var dl=G.d;G.d={f:Vy,r:Ky,D:Jy,C:Wy,L:Fy,m:$y,X:Py,S:Iy,M:ep};function Vy(){var e=dl.f(),t=vi();return e||t}function Ky(e){var t=Na(e);t!==null&&t.tag===5&&t.type==="form"?bf(t):dl.r(e)}var tn=typeof document>"u"?null:document;function nm(e,t,l){var a=tn;if(a&&typeof t=="string"&&t){var n=Nt(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),am.has(n)||(am.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),lt(t,"link",e),We(t),a.head.appendChild(t)))}}function Jy(e){dl.D(e),nm("dns-prefetch",e,null)}function Wy(e,t){dl.C(e,t),nm("preconnect",e,t)}function Fy(e,t,l){dl.L(e,t,l);var a=tn;if(a&&e&&t){var n='link[rel="preload"][as="'+Nt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+Nt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+Nt(l.imageSizes)+'"]')):n+='[href="'+Nt(e)+'"]';var s=n;switch(t){case"style":s=ln(e);break;case"script":s=an(e)}wt.has(s)||(e=j({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),wt.set(s,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(ts(s))||t==="script"&&a.querySelector(ls(s))||(t=a.createElement("link"),lt(t,"link",e),We(t),a.head.appendChild(t)))}}function $y(e,t){dl.m(e,t);var l=tn;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+Nt(a)+'"][href="'+Nt(e)+'"]',s=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=an(e)}if(!wt.has(s)&&(e=j({rel:"modulepreload",href:e},t),wt.set(s,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ls(s)))return}a=l.createElement("link"),lt(a,"link",e),We(a),l.head.appendChild(a)}}}function Iy(e,t,l){dl.S(e,t,l);var a=tn;if(a&&e){var n=Ca(a).hoistableStyles,s=ln(e);t=t||"default";var c=n.get(s);if(!c){var o={loading:0,preload:null};if(c=a.querySelector(ts(s)))o.loading=5;else{e=j({rel:"stylesheet",href:e,"data-precedence":t},l),(l=wt.get(s))&&lr(e,l);var y=c=a.createElement("link");We(y),lt(y,"link",e),y._p=new Promise(function(A,R){y.onload=A,y.onerror=R}),y.addEventListener("load",function(){o.loading|=1}),y.addEventListener("error",function(){o.loading|=2}),o.loading|=4,Ti(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:o},n.set(s,c)}}}function Py(e,t){dl.X(e,t);var l=tn;if(l&&e){var a=Ca(l).hoistableScripts,n=an(e),s=a.get(n);s||(s=l.querySelector(ls(n)),s||(e=j({src:e,async:!0},t),(t=wt.get(n))&&ar(e,t),s=l.createElement("script"),We(s),lt(s,"link",e),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(n,s))}}function ep(e,t){dl.M(e,t);var l=tn;if(l&&e){var a=Ca(l).hoistableScripts,n=an(e),s=a.get(n);s||(s=l.querySelector(ls(n)),s||(e=j({src:e,async:!0,type:"module"},t),(t=wt.get(n))&&ar(e,t),s=l.createElement("script"),We(s),lt(s,"link",e),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(n,s))}}function sm(e,t,l,a){var n=(n=ue.current)?Ai(n):null;if(!n)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=ln(l.href),l=Ca(n).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=ln(l.href);var s=Ca(n).hoistableStyles,c=s.get(e);if(c||(n=n.ownerDocument||n,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,c),(s=n.querySelector(ts(e)))&&!s._p&&(c.instance=s,c.state.loading=5),wt.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},wt.set(e,l),s||tp(n,e,l,c.state))),t&&a===null)throw Error(r(528,""));return c}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=an(l),l=Ca(n).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ln(e){return'href="'+Nt(e)+'"'}function ts(e){return'link[rel="stylesheet"]['+e+"]"}function im(e){return j({},e,{"data-precedence":e.precedence,precedence:null})}function tp(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),lt(t,"link",l),We(t),e.head.appendChild(t))}function an(e){return'[src="'+Nt(e)+'"]'}function ls(e){return"script[async]"+e}function cm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Nt(l.href)+'"]');if(a)return t.instance=a,We(a),a;var n=j({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),We(a),lt(a,"style",n),Ti(a,l.precedence,e),t.instance=a;case"stylesheet":n=ln(l.href);var s=e.querySelector(ts(n));if(s)return t.state.loading|=4,t.instance=s,We(s),s;a=im(l),(n=wt.get(n))&&lr(a,n),s=(e.ownerDocument||e).createElement("link"),We(s);var c=s;return c._p=new Promise(function(o,y){c.onload=o,c.onerror=y}),lt(s,"link",a),t.state.loading|=4,Ti(s,l.precedence,e),t.instance=s;case"script":return s=an(l.src),(n=e.querySelector(ls(s)))?(t.instance=n,We(n),n):(a=l,(n=wt.get(s))&&(a=j({},l),ar(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),We(n),lt(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Ti(a,l.precedence,e));return t.instance}function Ti(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,s=n,c=0;c<a.length;c++){var o=a[c];if(o.dataset.precedence===t)s=o;else if(s!==n)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function lr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ar(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ei=null;function um(e,t,l){if(Ei===null){var a=new Map,n=Ei=new Map;n.set(l,a)}else n=Ei,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var s=l[n];if(!(s[Rt]||s[Ge]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var c=s.getAttribute(t)||"";c=e+c;var o=a.get(c);o?o.push(s):a.set(c,[s])}}return a}function rm(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function lp(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function om(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ap(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=ln(a.href),s=t.querySelector(ts(n));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Mi.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=s,We(s);return}s=t.ownerDocument||t,a=im(a),(n=wt.get(n))&&lr(a,n),s=s.createElement("link"),We(s);var c=s;c._p=new Promise(function(o,y){c.onload=o,c.onerror=y}),lt(s,"link",a),l.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Mi.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var nr=0;function np(e,t){return e.stylesheets&&e.count===0&&wi(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&wi(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&nr===0&&(nr=62500*Hy());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&wi(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>nr?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Mi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)wi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ki=null;function wi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ki=new Map,t.forEach(sp,e),ki=null,Mi.call(e))}function sp(e,t){if(!(t.state.loading&4)){var l=ki.get(e);if(l)var a=l.get(null);else{l=new Map,ki.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<n.length;s++){var c=n[s];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(l.set(c.dataset.precedence,c),a=c)}a&&l.set(null,a)}n=t.instance,c=n.getAttribute("data-precedence"),s=l.get(c)||a,s===a&&l.set(null,n),l.set(c,n),this.count++,a=Mi.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),s?s.parentNode.insertBefore(n,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var as={$$typeof:te,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function ip(e,t,l,a,n,s,c,o,y){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=ga(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ga(0),this.hiddenUpdates=ga(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=s,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.incompleteTransitions=new Map}function fm(e,t,l,a,n,s,c,o,y,A,R,B){return e=new ip(e,t,l,c,y,A,R,B,o),t=1,s===!0&&(t|=24),s=pt(3,null,null,t),e.current=s,s.stateNode=e,t=Bc(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:a,isDehydrated:l,cache:t},Lc(s),e}function dm(e){return e?(e=Ra,e):Ra}function mm(e,t,l,a,n,s){n=dm(n),a.context===null?a.context=n:a.pendingContext=n,a=Nl(t),a.payload={element:l},s=s===void 0?null:s,s!==null&&(a.callback=s),l=Cl(e,a,t),l!==null&&(mt(l,e,t),On(l,e,t))}function xm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function sr(e,t){xm(e,t),(e=e.alternate)&&xm(e,t)}function ym(e){if(e.tag===13||e.tag===31){var t=Il(e,67108864);t!==null&&mt(t,e,67108864),sr(e,67108864)}}function pm(e){if(e.tag===13||e.tag===31){var t=St();t=vn(t);var l=Il(e,t);l!==null&&mt(l,e,t),sr(e,t)}}var Di=!0;function cp(e,t,l,a){var n=M.T;M.T=null;var s=G.p;try{G.p=2,ir(e,t,l,a)}finally{G.p=s,M.T=n}}function up(e,t,l,a){var n=M.T;M.T=null;var s=G.p;try{G.p=8,ir(e,t,l,a)}finally{G.p=s,M.T=n}}function ir(e,t,l,a){if(Di){var n=cr(a);if(n===null)Vu(e,t,a,_i,l),hm(e,a);else if(op(n,e,t,l,a))a.stopPropagation();else if(hm(e,a),t&4&&-1<rp.indexOf(e)){for(;n!==null;){var s=Na(n);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var c=Vt(s.pendingLanes);if(c!==0){var o=s;for(o.pendingLanes|=2,o.entangledLanes|=2;c;){var y=1<<31-it(c);o.entanglements[1]|=y,c&=~y}Xt(s),(Ne&6)===0&&(yi=nt()+500,$n(0))}}break;case 31:case 13:o=Il(s,2),o!==null&&mt(o,s,2),vi(),sr(s,2)}if(s=cr(a),s===null&&Vu(e,t,a,_i,l),s===n)break;n=s}n!==null&&a.stopPropagation()}else Vu(e,t,a,null,l)}}function cr(e){return e=rc(e),ur(e)}var _i=null;function ur(e){if(_i=null,e=ja(e),e!==null){var t=x(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=N(t),e!==null)return e;e=null}else if(l===31){if(e=E(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return _i=e,null}function vm(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(Ii()){case js:return 2;case Ns:return 8;case xa:case Pi:return 32;case Cs:return 268435456;default:return 32}default:return 32}}var rr=!1,Ol=null,Ul=null,Bl=null,ns=new Map,ss=new Map,Hl=[],rp="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 hm(e,t){switch(e){case"focusin":case"focusout":Ol=null;break;case"dragenter":case"dragleave":Ul=null;break;case"mouseover":case"mouseout":Bl=null;break;case"pointerover":case"pointerout":ns.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ss.delete(t.pointerId)}}function is(e,t,l,a,n,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:s,targetContainers:[n]},t!==null&&(t=Na(t),t!==null&&ym(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function op(e,t,l,a,n){switch(t){case"focusin":return Ol=is(Ol,e,t,l,a,n),!0;case"dragenter":return Ul=is(Ul,e,t,l,a,n),!0;case"mouseover":return Bl=is(Bl,e,t,l,a,n),!0;case"pointerover":var s=n.pointerId;return ns.set(s,is(ns.get(s)||null,e,t,l,a,n)),!0;case"gotpointercapture":return s=n.pointerId,ss.set(s,is(ss.get(s)||null,e,t,l,a,n)),!0}return!1}function gm(e){var t=ja(e.target);if(t!==null){var l=x(t);if(l!==null){if(t=l.tag,t===13){if(t=N(l),t!==null){e.blockedOn=t,Kl(e.priority,function(){pm(l)});return}}else if(t===31){if(t=E(l),t!==null){e.blockedOn=t,Kl(e.priority,function(){pm(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ri(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=cr(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);uc=a,l.target.dispatchEvent(a),uc=null}else return t=Na(l),t!==null&&ym(t),e.blockedOn=l,!1;t.shift()}return!0}function bm(e,t,l){Ri(e)&&l.delete(t)}function fp(){rr=!1,Ol!==null&&Ri(Ol)&&(Ol=null),Ul!==null&&Ri(Ul)&&(Ul=null),Bl!==null&&Ri(Bl)&&(Bl=null),ns.forEach(bm),ss.forEach(bm)}function Oi(e,t){e.blockedOn===t&&(e.blockedOn=null,rr||(rr=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,fp)))}var Ui=null;function Sm(e){Ui!==e&&(Ui=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){Ui===e&&(Ui=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],n=e[t+2];if(typeof a!="function"){if(ur(a||l)===null)continue;break}var s=Na(l);s!==null&&(e.splice(t,3),t-=3,cu(s,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function nn(e){function t(y){return Oi(y,e)}Ol!==null&&Oi(Ol,e),Ul!==null&&Oi(Ul,e),Bl!==null&&Oi(Bl,e),ns.forEach(t),ss.forEach(t);for(var l=0;l<Hl.length;l++){var a=Hl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Hl.length&&(l=Hl[0],l.blockedOn===null);)gm(l),l.blockedOn===null&&Hl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],s=l[a+1],c=n[Ie]||null;if(typeof s=="function")c||Sm(l);else if(c){var o=null;if(s&&s.hasAttribute("formAction")){if(n=s,c=s[Ie]||null)o=c.formAction;else if(ur(n)!==null)continue}else o=c.action;typeof o=="function"?l[a+1]=o:(l.splice(a,3),a-=3),Sm(l)}}}function jm(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(c){return n=c})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function or(e){this._internalRoot=e}Bi.prototype.render=or.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=St();mm(l,a,e,t,null,null)},Bi.prototype.unmount=or.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mm(e.current,2,null,e,null,null),vi(),t[Kt]=null}};function Bi(e){this._internalRoot=e}Bi.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ke();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Hl.length&&t!==0&&t<Hl[l].priority;l++);Hl.splice(l,0,e),l===0&&gm(e)}};var Nm=f.version;if(Nm!=="19.2.4")throw Error(r(527,Nm,"19.2.4"));G.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=h(t),e=e!==null?H(e):null,e=e===null?null:e.stateNode,e};var dp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hi.isDisabled&&Hi.supportsFiber)try{Ql=Hi.inject(dp),st=Hi}catch{}}return us.createRoot=function(e,t){if(!m(e))throw Error(r(299));var l=!1,a="",n=kf,s=wf,c=Df;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=fm(e,1,!1,null,null,l,a,null,n,s,c,jm),e[Kt]=t.current,Zu(e),new or(t)},us.hydrateRoot=function(e,t,l){if(!m(e))throw Error(r(299));var a=!1,n="",s=kf,c=wf,o=Df,y=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(s=l.onUncaughtError),l.onCaughtError!==void 0&&(c=l.onCaughtError),l.onRecoverableError!==void 0&&(o=l.onRecoverableError),l.formState!==void 0&&(y=l.formState)),t=fm(e,1,!0,t,l??null,a,n,y,s,c,o,jm),t.context=dm(null),l=t.current,a=St(),a=vn(a),n=Nl(a),n.callback=null,Cl(l,n,a),l=a,t.current.lanes=l,Dt(t,l),Xt(t),e[Kt]=t.current,Zu(e),new Bi(t)},us.version="19.2.4",us}var _m;function jp(){if(_m)return mr.exports;_m=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(f){console.error(f)}}return u(),mr.exports=Sp(),mr.exports}var Np=jp();/**
|
|
50
|
+
* @license lucide-react v0.468.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const Cp=u=>u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$m=(...u)=>u.filter((f,d,r)=>!!f&&f.trim()!==""&&r.indexOf(f)===d).join(" ").trim();/**
|
|
55
|
+
* @license lucide-react v0.468.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/var zp={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"};/**
|
|
60
|
+
* @license lucide-react v0.468.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const Ap=b.forwardRef(({color:u="currentColor",size:f=24,strokeWidth:d=2,absoluteStrokeWidth:r,className:m="",children:x,iconNode:N,...E},p)=>b.createElement("svg",{ref:p,...zp,width:f,height:f,stroke:u,strokeWidth:r?Number(d)*24/Number(f):d,className:$m("lucide",m),...E},[...N.map(([h,H])=>b.createElement(h,H)),...Array.isArray(x)?x:[x]]));/**
|
|
65
|
+
* @license lucide-react v0.468.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const ee=(u,f)=>{const d=b.forwardRef(({className:r,...m},x)=>b.createElement(Ap,{ref:x,iconNode:f,className:$m(`lucide-${Cp(u)}`,r),...m}));return d.displayName=`${u}`,d};/**
|
|
70
|
+
* @license lucide-react v0.468.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/const Tp=ee("ArrowDownRight",[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]);/**
|
|
75
|
+
* @license lucide-react v0.468.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const Ep=ee("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
80
|
+
* @license lucide-react v0.468.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/const Mp=ee("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
|
85
|
+
* @license lucide-react v0.468.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/const Im=ee("Blocks",[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]]);/**
|
|
90
|
+
* @license lucide-react v0.468.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const ds=ee("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
95
|
+
* @license lucide-react v0.468.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/const ms=ee("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|
100
|
+
* @license lucide-react v0.468.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const Tr=ee("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
105
|
+
* @license lucide-react v0.468.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const kp=ee("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
110
|
+
* @license lucide-react v0.468.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const Zi=ee("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
115
|
+
* @license lucide-react v0.468.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const xs=ee("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
120
|
+
* @license lucide-react v0.468.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const cn=ee("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
125
|
+
* @license lucide-react v0.468.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const un=ee("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
130
|
+
* @license lucide-react v0.468.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const ys=ee("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
135
|
+
* @license lucide-react v0.468.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const Pm=ee("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
|
|
140
|
+
* @license lucide-react v0.468.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const wp=ee("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
|
|
145
|
+
* @license lucide-react v0.468.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const Dp=ee("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
150
|
+
* @license lucide-react v0.468.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const _p=ee("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
|
155
|
+
* @license lucide-react v0.468.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const Ki=ee("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
|
|
160
|
+
* @license lucide-react v0.468.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const vs=ee("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
165
|
+
* @license lucide-react v0.468.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const Rp=ee("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
|
170
|
+
* @license lucide-react v0.468.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const Op=ee("FolderSearch",[["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"}]]);/**
|
|
175
|
+
* @license lucide-react v0.468.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const Gl=ee("GitPullRequest",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]]);/**
|
|
180
|
+
* @license lucide-react v0.468.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const Rm=ee("Globe",[["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"}]]);/**
|
|
185
|
+
* @license lucide-react v0.468.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const Up=ee("Image",[["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"}]]);/**
|
|
190
|
+
* @license lucide-react v0.468.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const Bp=ee("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
|
|
195
|
+
* @license lucide-react v0.468.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const ex=ee("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
200
|
+
* @license lucide-react v0.468.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const rn=ee("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
205
|
+
* @license lucide-react v0.468.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const Hp=ee("OctagonX",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 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-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
210
|
+
* @license lucide-react v0.468.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const qp=ee("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
|
|
215
|
+
* @license lucide-react v0.468.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const Yp=ee("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
220
|
+
* @license lucide-react v0.468.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const jr=ee("Pencil",[["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"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
225
|
+
* @license lucide-react v0.468.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*/const tx=ee("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
230
|
+
* @license lucide-react v0.468.0 - ISC
|
|
231
|
+
*
|
|
232
|
+
* This source code is licensed under the ISC license.
|
|
233
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
+
*/const Vi=ee("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
235
|
+
* @license lucide-react v0.468.0 - ISC
|
|
236
|
+
*
|
|
237
|
+
* This source code is licensed under the ISC license.
|
|
238
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
+
*/const da=ee("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
240
|
+
* @license lucide-react v0.468.0 - ISC
|
|
241
|
+
*
|
|
242
|
+
* This source code is licensed under the ISC license.
|
|
243
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
+
*/const Lp=ee("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
|
|
245
|
+
* @license lucide-react v0.468.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const Er=ee("RotateCcw",[["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"}]]);/**
|
|
250
|
+
* @license lucide-react v0.468.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/const Gp=ee("Save",[["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"}]]);/**
|
|
255
|
+
* @license lucide-react v0.468.0 - ISC
|
|
256
|
+
*
|
|
257
|
+
* This source code is licensed under the ISC license.
|
|
258
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
+
*/const Om=ee("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/**
|
|
260
|
+
* @license lucide-react v0.468.0 - ISC
|
|
261
|
+
*
|
|
262
|
+
* This source code is licensed under the ISC license.
|
|
263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
+
*/const Qt=ee("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
265
|
+
* @license lucide-react v0.468.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/const lx=ee("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
270
|
+
* @license lucide-react v0.468.0 - ISC
|
|
271
|
+
*
|
|
272
|
+
* This source code is licensed under the ISC license.
|
|
273
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
+
*/const Xp=ee("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
|
|
275
|
+
* @license lucide-react v0.468.0 - ISC
|
|
276
|
+
*
|
|
277
|
+
* This source code is licensed under the ISC license.
|
|
278
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
+
*/const hs=ee("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
280
|
+
* @license lucide-react v0.468.0 - ISC
|
|
281
|
+
*
|
|
282
|
+
* This source code is licensed under the ISC license.
|
|
283
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
+
*/const Qp=ee("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/**
|
|
285
|
+
* @license lucide-react v0.468.0 - ISC
|
|
286
|
+
*
|
|
287
|
+
* This source code is licensed under the ISC license.
|
|
288
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
+
*/const Nr=ee("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
290
|
+
* @license lucide-react v0.468.0 - ISC
|
|
291
|
+
*
|
|
292
|
+
* This source code is licensed under the ISC license.
|
|
293
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
294
|
+
*/const Zp=ee("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
|
|
295
|
+
* @license lucide-react v0.468.0 - ISC
|
|
296
|
+
*
|
|
297
|
+
* This source code is licensed under the ISC license.
|
|
298
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
299
|
+
*/const Um=ee("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
300
|
+
* @license lucide-react v0.468.0 - ISC
|
|
301
|
+
*
|
|
302
|
+
* This source code is licensed under the ISC license.
|
|
303
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
304
|
+
*/const Mr=ee("TestTubeDiagonal",[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]]);/**
|
|
305
|
+
* @license lucide-react v0.468.0 - ISC
|
|
306
|
+
*
|
|
307
|
+
* This source code is licensed under the ISC license.
|
|
308
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
309
|
+
*/const Vp=ee("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
310
|
+
* @license lucide-react v0.468.0 - ISC
|
|
311
|
+
*
|
|
312
|
+
* This source code is licensed under the ISC license.
|
|
313
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
+
*/const Kp=ee("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
|
|
315
|
+
* @license lucide-react v0.468.0 - ISC
|
|
316
|
+
*
|
|
317
|
+
* This source code is licensed under the ISC license.
|
|
318
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
319
|
+
*/const gs=ee("TriangleAlert",[["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"}]]);/**
|
|
320
|
+
* @license lucide-react v0.468.0 - ISC
|
|
321
|
+
*
|
|
322
|
+
* This source code is licensed under the ISC license.
|
|
323
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
324
|
+
*/const Jp=ee("WifiOff",[["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"}]]);/**
|
|
325
|
+
* @license lucide-react v0.468.0 - ISC
|
|
326
|
+
*
|
|
327
|
+
* This source code is licensed under the ISC license.
|
|
328
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
329
|
+
*/const Wp=ee("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
|
|
330
|
+
* @license lucide-react v0.468.0 - ISC
|
|
331
|
+
*
|
|
332
|
+
* This source code is licensed under the ISC license.
|
|
333
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
334
|
+
*/const on=ee("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
335
|
+
* @license lucide-react v0.468.0 - ISC
|
|
336
|
+
*
|
|
337
|
+
* This source code is licensed under the ISC license.
|
|
338
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
339
|
+
*/const ps=ee("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
340
|
+
* @license lucide-react v0.468.0 - ISC
|
|
341
|
+
*
|
|
342
|
+
* This source code is licensed under the ISC license.
|
|
343
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
344
|
+
*/const fa=ee("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Fp({projectName:u,totalCost:f,connected:d,onOpenPalette:r}){return i.jsxs("header",{className:"h-11 flex items-center justify-between px-4 border-b font-ui shrink-0",style:{backgroundColor:"var(--bg-surface)",borderColor:"var(--border-muted)"},children:[i.jsxs("div",{className:"flex items-center gap-2.5",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"w-5 h-5 rounded flex items-center justify-center text-[10px] font-bold",style:{backgroundColor:"var(--accent-muted)",color:"var(--accent)"},children:"H"}),i.jsx("span",{className:"text-sm font-semibold",style:{color:"var(--text-primary)"},children:"Hivemind"})]}),u&&i.jsxs(i.Fragment,{children:[i.jsx("span",{style:{color:"var(--text-disabled)"},children:"/"}),i.jsx("span",{className:"text-sm",style:{color:"var(--text-secondary)"},children:u})]})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("button",{onClick:r,className:"flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs transition-colors",style:{backgroundColor:"var(--bg-subtle)",color:"var(--text-tertiary)",border:"1px solid var(--border-muted)"},title:"Command palette (Cmd+K)",children:[i.jsx(wp,{size:11}),i.jsx("span",{children:"K"})]}),f!=null&&f>0&&i.jsxs("span",{className:"text-xs tabular-nums font-code",style:{color:"var(--text-secondary)"},children:["$",f.toFixed(2)]}),i.jsxs("div",{className:"flex items-center gap-1.5",title:d?"Connected":"Reconnecting...",children:[d?i.jsx(Wp,{size:12,style:{color:"var(--status-success)"}}):i.jsx(Jp,{size:12,style:{color:"var(--status-error)"}}),i.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:d?"var(--status-success)":"var(--status-error)"}})]})]})]})}const os="hivemind_selected";let Ll=(()=>{try{return localStorage.getItem(os)}catch{return null}})(),Qi=new Set,Cr=!1;const zr=new Set;function rs(){zr.forEach(u=>u())}function vr(u){return zr.add(u),()=>{zr.delete(u)}}function $p(){return Ll}function Ip(){return Qi}function Pp(){return Cr}let ml=[];function ev(u){ml=u}function kr(){const u=b.useSyncExternalStore(vr,$p);b.useSyncExternalStore(vr,Ip);const f=b.useSyncExternalStore(vr,Pp),d=b.useCallback(p=>{Ll=p;try{p?localStorage.setItem(os,p):localStorage.removeItem(os)}catch{}rs()},[]),r=b.useCallback(()=>{if(ml.length===0)return;const p=Ll?ml.indexOf(Ll):-1,h=ml[Math.min(p+1,ml.length-1)];if(h){Ll=h;try{localStorage.setItem(os,h)}catch{}rs()}},[]),m=b.useCallback(()=>{if(ml.length===0)return;const p=Ll?ml.indexOf(Ll):ml.length,h=ml[Math.max(p-1,0)];if(h){Ll=h;try{localStorage.setItem(os,h)}catch{}rs()}},[]),x=b.useCallback(p=>{const h=new Set(Qi);h.has(p)?h.delete(p):h.add(p),Qi=h,rs()},[]),N=b.useCallback(p=>Qi.has(p),[]),E=b.useCallback(()=>{Cr=!Cr,rs()},[]);return{selectedId:u,select:d,selectNext:r,selectPrev:m,toggleSection:x,isSectionCollapsed:N,sidebarCollapsed:f,toggleSidebar:E}}function qi({label:u,count:f,collapsed:d,onToggle:r,dotColor:m,children:x}){return i.jsxs("div",{className:"mb-1",children:[i.jsxs("button",{onClick:r,className:"flex items-center gap-1.5 w-full px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wider transition-colors hover:opacity-80",style:{color:"var(--text-tertiary)"},children:[i.jsx(xs,{size:10,className:"transition-transform",style:{transform:d?"rotate(0deg)":"rotate(90deg)"}}),m&&i.jsx("span",{className:"w-1.5 h-1.5 rounded-full animate-pulse",style:{backgroundColor:m}}),i.jsx("span",{children:u}),f!=null&&i.jsx("span",{style:{color:"var(--text-disabled)"},children:f})]}),!d&&i.jsx("div",{children:x})]})}const tv={pipeline:{icon:hs,color:"var(--activity-pipeline)",label:"Build"},fix:{icon:on,color:"var(--activity-fix)",label:"Fix"},review:{icon:Gl,color:"var(--activity-review)",label:"Review"},spike:{icon:Qt,color:"var(--activity-spike)",label:"Research"},refactor:{icon:da,color:"var(--activity-refactor)",label:"Refactor"},simplify:{icon:rn,color:"var(--activity-simplify)",label:"Clean Up"},"test-gen":{icon:Mr,color:"var(--status-success)",label:"Test"},conventions:{icon:ds,color:"var(--text-secondary)",label:"Conventions"},memory:{icon:ms,color:"var(--text-secondary)",label:"Memory"},stats:{icon:Tr,color:"var(--text-secondary)",label:"Stats"}};function lv({status:u,timestamp:f}){return u==="running"?i.jsx(av,{startedAt:f}):u==="done"||u==="success"?i.jsx(cn,{size:11,style:{color:"var(--status-success)"}}):u==="error"?i.jsx(un,{size:11,style:{color:"var(--status-error)"}}):i.jsx(ys,{size:11,style:{color:"var(--status-pending)"}})}function av({startedAt:u}){const[f,d]=b.useState(Date.now());if(b.useEffect(()=>{const E=setInterval(()=>d(Date.now()),1e3);return()=>clearInterval(E)},[]),!u)return i.jsx("span",{className:"w-1.5 h-1.5 rounded-full animate-pulse",style:{backgroundColor:"var(--status-running)"}});const r=Math.floor((f-u)/1e3),m=Math.floor(r/60),x=r%60,N=m>0?`${m}:${String(x).padStart(2,"0")}`:`${x}s`;return i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx("span",{className:"w-1.5 h-1.5 rounded-full animate-pulse",style:{backgroundColor:"var(--status-running)"}}),i.jsx("span",{className:"text-[10px] tabular-nums font-code",style:{color:"var(--status-running)"},children:N})]})}function Yi({item:u,selected:f,onSelect:d}){const r=u.icon||u.type,m=tv[r]||{icon:fa,color:"var(--text-secondary)"},x=m.icon;return i.jsxs("button",{onClick:d,className:"w-full flex items-center gap-2 px-3 py-1.5 text-left transition-colors group",style:{backgroundColor:f?"var(--bg-emphasis)":"transparent",borderLeft:f?"2px solid var(--accent)":"2px solid transparent"},onMouseEnter:N=>{f||(N.currentTarget.style.backgroundColor="var(--bg-subtle)")},onMouseLeave:N=>{f||(N.currentTarget.style.backgroundColor="transparent")},"data-feed-id":u.id,children:[i.jsx(x,{size:13,style:{color:m.color},className:"shrink-0"}),i.jsx("span",{className:"text-xs truncate flex-1",style:{color:f?"var(--text-primary)":"var(--text-secondary)"},children:u.label}),u.type!=="tool"&&i.jsx(lv,{status:u.status,timestamp:u.timestamp}),u.type!=="tool"&&u.status!=="running"&&u.cost!=null&&u.cost>0&&i.jsxs("span",{className:"text-[10px] tabular-nums font-code shrink-0",style:{color:"var(--text-tertiary)"},children:["$",u.cost.toFixed(2)]})]})}function Bm(u){const f=new Date(u),d=new Date;return f.getFullYear()===d.getFullYear()&&f.getMonth()===d.getMonth()&&f.getDate()===d.getDate()}const sn=["analyze","architect","plan","build","test"];function nv(u,f){return b.useMemo(()=>{var m,x,N,E,p,h,H,j;const d=[],r=new Set;if((m=u.mayday)!=null&&m.active){const w=u.mayday.currentStage==="complete"?"done":u.mayday.error?"error":"running";d.push({id:"mayday",type:"pipeline",label:((x=u.mayday.featureRequest)==null?void 0:x.slice(0,60))||"Building feature",status:w,group:w==="running"?"running":"today",cost:(N=u.totalCost)==null?void 0:N.totalUsd,timestamp:u.mayday.startedAt,agentIds:u.agents.map(O=>O.id)});for(const O of u.agents)r.add(O.id);for(const O of u.mayday.fixAgentIds||[])r.add(O)}else if(sn.some(O=>{var k,Q,J;return((k=u.stages[O])==null?void 0:k.status)==="running"||((Q=u.stages[O])==null?void 0:Q.status)==="done"||((J=u.stages[O])==null?void 0:J.status)==="error"})){const O=sn.some(I=>{var Y;return((Y=u.stages[I])==null?void 0:Y.status)==="running"}),k=sn.some(I=>{var Y;return((Y=u.stages[I])==null?void 0:Y.status)==="error"}),Q=O?"running":k?"error":"done";let J;for(const I of sn){const Y=u.stages[I];Y!=null&&Y.startedAt&&(!J||Y.startedAt<J)&&(J=Y.startedAt)}d.push({id:"pipeline",type:"pipeline",label:u.projectName||"Building feature",status:Q,group:Q==="running"?"running":"today",cost:(E=u.totalCost)==null?void 0:E.totalUsd,timestamp:J,agentIds:sn.flatMap(I=>{var Y;return((Y=u.stages[I])==null?void 0:Y.agentIds)??[]})});for(const I of sn)for(const Y of((p=u.stages[I])==null?void 0:p.agentIds)??[])r.add(Y)}for(const w of u.agents)w.status==="running"&&!r.has(w.id)&&(d.push({id:`agent:${w.id}`,type:Hm(w),label:w.name,status:"running",group:"running",cost:(h=w.cost)==null?void 0:h.totalUsd,timestamp:w.startedAt??void 0,agent:w}),r.add(w.id));for(const w of f){const O=Bm(w.timestamp)?"today":"earlier",k=w.activityStatus==="success"?"done":w.activityStatus==="error"?"error":"done";d.push({id:`history:${w.runId}`,type:w.activityType||"pipeline",label:w.summary||w.featureRequest||w.projectName,status:k,group:O,cost:(H=w.totalCost)==null?void 0:H.totalUsd,timestamp:w.timestamp,agentIds:w.agentIds,historyEntry:w});for(const Q of w.agentIds??[])r.add(Q)}for(const w of u.agents)if((w.status==="done"||w.status==="error")&&!r.has(w.id)){const O=w.finishedAt||w.startedAt||Date.now();d.push({id:`agent:${w.id}`,type:Hm(w),label:w.name,status:w.status==="done"?"done":"error",group:Bm(O)?"today":"earlier",cost:(j=w.cost)==null?void 0:j.totalUsd,timestamp:O,agent:w})}return d.sort((w,O)=>(O.timestamp??0)-(w.timestamp??0)),d},[u,f])}function Hm(u){const f=u.name.toLowerCase();return f.includes("fix")?"fix":f.includes("review")||f.includes("pr")?"review":f.includes("spike")?"spike":f.includes("refactor")?"refactor":f.includes("simplify")?"simplify":f.includes("test")?"test-gen":"pipeline"}const qm=[{id:"tool:build",label:"Build Feature",icon:"pipeline"},{id:"tool:pr-reviews",label:"PR Reviews",icon:"review"},{id:"tool:conventions",label:"Coding Conventions",icon:"conventions"},{id:"tool:memory",label:"Project Memory",icon:"memory"},{id:"tool:stats",label:"Usage & Costs",icon:"stats"}];function sv({state:u,historyEntries:f}){const{selectedId:d,select:r,toggleSection:m,isSectionCollapsed:x,sidebarCollapsed:N,toggleSidebar:E}=kr(),p=nv(u,f),h=p.filter(O=>O.status==="running"),H=p.filter(O=>O.status!=="running"&&O.group==="today"),j=p.filter(O=>O.status!=="running"&&O.group==="earlier"),w=b.useMemo(()=>{const O=[];return x("running")||h.forEach(k=>O.push(k.id)),x("today")||H.forEach(k=>O.push(k.id)),x("earlier")||j.forEach(k=>O.push(k.id)),x("tools")||qm.forEach(k=>O.push(k.id)),O},[h,H,j,x]);return b.useEffect(()=>{ev(w)},[w]),N?i.jsxs("div",{className:"w-10 shrink-0 flex flex-col items-center pt-2 border-r",style:{backgroundColor:"var(--bg-surface)",borderColor:"var(--border-muted)"},children:[i.jsx("button",{onClick:E,className:"p-1.5 rounded transition-colors",style:{color:"var(--text-tertiary)"},title:"Expand sidebar",children:i.jsx(Yp,{size:14})}),h.length>0&&i.jsx("div",{className:"mt-2",children:i.jsx("span",{className:"w-2 h-2 rounded-full block animate-pulse",style:{backgroundColor:"var(--status-running)"}})})]}):i.jsxs("div",{className:"w-[280px] shrink-0 flex flex-col border-r overflow-hidden",style:{backgroundColor:"var(--bg-surface)",borderColor:"var(--border-muted)"},children:[i.jsx("div",{className:"flex items-center justify-end px-2 py-1 shrink-0",children:i.jsx("button",{onClick:E,className:"p-1 rounded transition-colors",style:{color:"var(--text-disabled)"},title:"Collapse sidebar",children:i.jsx(qp,{size:13})})}),i.jsxs("div",{className:"flex-1 overflow-y-auto",children:[h.length>0&&i.jsx(qi,{label:"In Progress",count:h.length,collapsed:x("running"),onToggle:()=>m("running"),dotColor:"var(--status-running)",children:h.map(O=>i.jsx(Yi,{item:O,selected:d===O.id,onSelect:()=>r(O.id)},O.id))}),H.length>0&&i.jsx(qi,{label:"Today",count:H.length,collapsed:x("today"),onToggle:()=>m("today"),children:H.map(O=>i.jsx(Yi,{item:O,selected:d===O.id,onSelect:()=>r(O.id)},O.id))}),j.length>0&&i.jsx(qi,{label:"Earlier",count:j.length,collapsed:x("earlier"),onToggle:()=>m("earlier"),children:j.map(O=>i.jsx(Yi,{item:O,selected:d===O.id,onSelect:()=>r(O.id)},O.id))}),i.jsx(qi,{label:"Workspace",collapsed:x("tools"),onToggle:()=>m("tools"),children:qm.map(O=>i.jsx(Yi,{item:{id:O.id,type:"tool",label:O.label,icon:O.icon,status:"done",group:"tools"},selected:d===O.id||O.id==="tool:build"&&d===null,onSelect:()=>r(O.id)},O.id))})]})]})}const iv=[{id:"review",label:"Code Review",description:"Review uncommitted changes in your working directory",icon:Gl,color:"var(--activity-review)",action:"run-review"},{id:"simplify",label:"Clean Up",description:"Find dead code, reduce complexity, simplify your codebase",icon:rn,color:"var(--activity-simplify)",action:"run-simplify"}],Ym=[{icon:vs,label:"Understand",detail:"Gathers requirements",color:"var(--activity-pipeline)"},{icon:Im,label:"Design",detail:"Plans architecture",color:"var(--accent)"},{icon:ex,label:"Plan",detail:"Creates task breakdown",color:"var(--status-warning)"},{icon:Pm,label:"Code",detail:"Writes implementation",color:"var(--status-error)"},{icon:Mr,label:"Test",detail:"Validates with tests",color:"var(--status-success)"}],cv=[{id:"opus",label:"Opus",desc:"Most capable, highest quality",tier:"Premium"},{id:"sonnet",label:"Sonnet",desc:"Fast and capable, good balance",tier:"Standard"},{id:"haiku",label:"Haiku",desc:"Fastest and cheapest",tier:"Economy"}],uv=[{id:"full",label:"Full",desc:"All stages with best models"},{id:"lean",label:"Lean",desc:"Haiku for docs, default for code — saves ~60% on early stages"}];function Lm({sendCommand:u}){const[f,d]=b.useState(""),[r,m]=b.useState(!1),[x,N]=b.useState(""),[E,p]=b.useState(""),[h,H]=b.useState("full"),[j,w]=b.useState(""),O=()=>{if(!f.trim())return;const k={action:"run-mayday",prompt:f.trim(),...x&&{model:x},...E.trim()&&{figmaUrl:E.trim()},...h==="lean"&&{lean:!0},...j&&{maxFixBudgetUsd:parseFloat(j)}};u(k),d(""),p("")};return i.jsx("div",{className:"flex-1 flex items-center justify-center p-8 h-full overflow-y-auto",children:i.jsxs("div",{className:"max-w-2xl w-full space-y-8",children:[i.jsxs("div",{className:"text-center space-y-2",children:[i.jsx("h1",{className:"text-xl font-semibold",style:{color:"var(--text-primary)"},children:"What would you like to build?"}),i.jsx("p",{className:"text-sm leading-relaxed max-w-md mx-auto",style:{color:"var(--text-secondary)"},children:"Describe a feature in plain English. Hivemind will handle requirements, design, planning, coding, and testing automatically."})]}),i.jsxs("div",{className:"rounded-xl overflow-hidden shadow-lg",style:{border:"1px solid var(--border-default)",backgroundColor:"var(--bg-surface)"},children:[i.jsx("textarea",{value:f,onChange:k=>d(k.target.value),onKeyDown:k=>{k.key==="Enter"&&!k.shiftKey&&f.trim()&&(k.preventDefault(),O())},placeholder:'e.g. "Add dark mode with system preference detection and a toggle in settings"',rows:3,className:"w-full px-5 py-4 text-sm bg-transparent resize-none focus:outline-none leading-relaxed",style:{color:"var(--text-primary)"}}),i.jsx("div",{className:"px-5 py-2",style:{borderTop:"1px solid var(--border-muted)"},children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Up,{size:12,style:{color:"var(--text-disabled)"}}),i.jsx("input",{value:E,onChange:k=>p(k.target.value),placeholder:"Paste Figma URL for design reference (optional)",className:"flex-1 bg-transparent text-xs focus:outline-none",style:{color:"var(--text-primary)"}})]})}),i.jsx("div",{className:"px-5 py-2",style:{borderTop:"1px solid var(--border-muted)"},children:i.jsxs("button",{onClick:()=>m(!r),className:"flex items-center gap-1.5 text-[11px] font-medium transition-colors",style:{color:"var(--text-tertiary)"},children:[i.jsx(Xp,{size:11}),"Options",r?i.jsx(Zi,{size:10}):i.jsx(xs,{size:10})]})}),r&&i.jsxs("div",{className:"px-5 py-3 space-y-3",style:{borderTop:"1px solid var(--border-muted)",backgroundColor:"var(--bg-raised)"},children:[i.jsxs("div",{children:[i.jsx("label",{className:"text-[10px] uppercase tracking-wider font-semibold mb-1.5 block",style:{color:"var(--text-tertiary)"},children:"Model"}),i.jsx("div",{className:"flex gap-2",children:cv.map(k=>i.jsxs("button",{onClick:()=>N(x===k.id?"":k.id),className:"flex-1 px-3 py-2 rounded-md text-left transition-colors",style:{backgroundColor:x===k.id?"var(--accent-muted)":"var(--bg-overlay)",color:x===k.id?"var(--accent)":"var(--text-secondary)",border:x===k.id?"1px solid var(--border-active)":"1px solid var(--border-muted)"},children:[i.jsx("div",{className:"text-xs font-medium",children:k.label}),i.jsx("div",{className:"text-[10px] mt-0.5",style:{color:"var(--text-disabled)"},children:k.desc})]},k.id))}),!x&&i.jsx("p",{className:"text-[10px] mt-1",style:{color:"var(--text-disabled)"},children:"Default: uses project config or Opus"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-[10px] uppercase tracking-wider font-semibold mb-1.5 block",style:{color:"var(--text-tertiary)"},children:"Mode"}),i.jsx("div",{className:"flex gap-2",children:uv.map(k=>i.jsxs("button",{onClick:()=>H(k.id),className:"flex-1 px-3 py-2 rounded-md text-left transition-colors",style:{backgroundColor:h===k.id?"var(--accent-muted)":"var(--bg-overlay)",color:h===k.id?"var(--accent)":"var(--text-secondary)",border:h===k.id?"1px solid var(--border-active)":"1px solid var(--border-muted)"},children:[i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx(fa,{size:10}),i.jsx("span",{className:"text-xs font-medium",children:k.label})]}),i.jsx("div",{className:"text-[10px] mt-0.5",style:{color:"var(--text-disabled)"},children:k.desc})]},k.id))})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-[10px] uppercase tracking-wider font-semibold mb-1.5 block",style:{color:"var(--text-tertiary)"},children:"Budget limit"}),i.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-md",style:{backgroundColor:"var(--bg-overlay)",border:"1px solid var(--border-muted)"},children:[i.jsx(Ki,{size:11,style:{color:"var(--text-disabled)"}}),i.jsx("input",{type:"number",value:j,onChange:k=>w(k.target.value),placeholder:"No limit",min:"0",step:"1",className:"flex-1 bg-transparent text-xs font-code focus:outline-none",style:{color:"var(--text-primary)"}}),i.jsx("span",{className:"text-[10px]",style:{color:"var(--text-disabled)"},children:"USD max spend"})]}),i.jsx("p",{className:"text-[10px] mt-1",style:{color:"var(--text-disabled)"},children:"You'll be prompted to increase if the limit is reached — agents won't be killed automatically."})]})]}),i.jsxs("div",{className:"flex items-center justify-between px-5 py-3",style:{borderTop:"1px solid var(--border-muted)",backgroundColor:"var(--bg-raised)"},children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:"Enter to start"}),(x||h==="lean"||E)&&i.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{backgroundColor:"var(--bg-subtle)",color:"var(--text-disabled)"},children:[x&&x,h==="lean"&&"lean",E&&"figma"].filter(Boolean).join(" · ")})]}),i.jsxs("button",{onClick:O,disabled:!f.trim(),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-xs font-semibold transition-all disabled:opacity-30",style:{backgroundColor:"var(--accent-emphasis)",color:"#fff"},children:[i.jsx(hs,{size:13}),"Build Feature"]})]})]}),i.jsx("div",{className:"grid grid-cols-2 gap-3",children:iv.map(k=>{const Q=k.icon;return i.jsxs("button",{onClick:()=>u({action:k.action}),className:"flex items-center gap-3 px-4 py-3 rounded-lg text-left transition-all group",style:{backgroundColor:"var(--bg-surface)",border:"1px solid var(--border-muted)"},onMouseEnter:J=>{J.currentTarget.style.borderColor="var(--border-default)",J.currentTarget.style.backgroundColor="var(--bg-raised)"},onMouseLeave:J=>{J.currentTarget.style.borderColor="var(--border-muted)",J.currentTarget.style.backgroundColor="var(--bg-surface)"},children:[i.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:"var(--bg-subtle)"},children:i.jsx(Q,{size:15,style:{color:k.color}})}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("div",{className:"text-xs font-medium",style:{color:"var(--text-primary)"},children:k.label}),i.jsx("div",{className:"text-[10px] leading-snug mt-0.5",style:{color:"var(--text-tertiary)"},children:k.description})]}),i.jsx(Ep,{size:12,className:"shrink-0 ml-auto opacity-0 group-hover:opacity-100 transition-opacity",style:{color:"var(--text-disabled)"}})]},k.id)})}),i.jsxs("div",{children:[i.jsx("div",{className:"text-[10px] uppercase tracking-wider font-semibold mb-3 text-center",style:{color:"var(--text-tertiary)"},children:"How it works"}),i.jsx("div",{className:"flex items-start gap-0",children:Ym.map((k,Q)=>{const J=k.icon;return i.jsxs("div",{className:"flex items-center flex-1",children:[i.jsxs("div",{className:"flex flex-col items-center text-center px-1",children:[i.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center mb-1.5",style:{backgroundColor:"var(--bg-subtle)"},children:i.jsx(J,{size:13,style:{color:k.color}})}),i.jsx("span",{className:"text-[10px] font-medium",style:{color:k.color},children:k.label}),i.jsx("span",{className:"text-[9px] leading-tight mt-0.5 max-w-[100px]",style:{color:"var(--text-disabled)"},children:k.detail})]}),Q<Ym.length-1&&i.jsx("div",{className:"w-6 h-px mt-[-16px] shrink-0",style:{backgroundColor:"var(--border-default)"}})]},k.label)})})]})]})})}const Gm=[{name:"analyze",label:"Requirements",description:"Understanding what to build",icon:vs},{name:"architect",label:"Design",description:"Planning the architecture",icon:Im},{name:"plan",label:"Tasks",description:"Breaking into work items",icon:ex},{name:"build",label:"Code",description:"Writing the implementation",icon:Pm},{name:"test",label:"Test",description:"Validating with tests",icon:Mr}],Xm={running:{bg:"var(--status-running-bg)",color:"var(--status-running)",border:"var(--border-active)"},done:{bg:"var(--status-success-bg)",color:"var(--status-success)",border:"var(--border-muted)"},error:{bg:"var(--status-error-bg)",color:"var(--status-error)",border:"var(--border-muted)"},pending:{bg:"transparent",color:"var(--text-disabled)",border:"var(--border-muted)"},skipped:{bg:"transparent",color:"var(--text-disabled)",border:"var(--border-muted)"}};function rv({stages:u,activeStage:f,onSelectStage:d,mayday:r}){return i.jsxs("div",{className:"flex items-center gap-1 px-4 py-2 shrink-0 overflow-x-auto",style:{backgroundColor:"var(--bg-surface)",borderBottom:"1px solid var(--border-muted)"},children:[Gm.map((m,x)=>{const N=u[m.name],E=(N==null?void 0:N.status)??"pending",p=Xm[E]??Xm.pending,h=m.name===f,H=m.icon;return i.jsxs("div",{className:"flex items-center",children:[i.jsxs("button",{onClick:()=>d(m.name),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium transition-all",style:{backgroundColor:h?p.bg:"transparent",color:h?p.color:E==="pending"?"var(--text-disabled)":p.color,border:h?`1px solid ${p.border}`:"1px solid transparent"},title:m.description,children:[E==="running"?i.jsx("span",{className:"w-2 h-2 rounded-full animate-pulse",style:{backgroundColor:p.color}}):i.jsx(H,{size:11}),m.label,(N==null?void 0:N.stageCost)!=null&&N.stageCost>0&&i.jsxs("span",{className:"text-[10px] font-code tabular-nums opacity-60",children:["$",N.stageCost.toFixed(2)]})]}),x<Gm.length-1&&i.jsx("span",{className:"mx-0.5",style:{color:"var(--text-disabled)"},children:"›"})]},m.name)}),(r==null?void 0:r.currentStage)==="fix-loop"&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"mx-0.5",style:{color:"var(--text-disabled)"},children:"›"}),i.jsxs("span",{className:"flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-medium",style:{backgroundColor:"var(--status-warning-bg)",color:"var(--status-warning)",border:"1px solid var(--border-muted)"},children:[i.jsx(on,{size:11}),"Fixing #",r.fixIteration]})]})]})}function ov({agents:u,selectedId:f,onSelect:d}){return u.length<=1?null:i.jsx("div",{className:"flex items-center gap-1 px-4 py-1.5 overflow-x-auto shrink-0",style:{backgroundColor:"var(--bg-surface)",borderBottom:"1px solid var(--border-muted)"},children:u.map(r=>{var E;const m=r.id===f,x=r.status==="running",N=r.status==="error";return i.jsxs("button",{onClick:()=>d(r.id),className:"flex items-center gap-1.5 px-2.5 py-1 rounded text-xs transition-colors whitespace-nowrap",style:{backgroundColor:m?"var(--bg-emphasis)":"transparent",color:m?"var(--text-primary)":"var(--text-secondary)",border:m?"1px solid var(--border-default)":"1px solid transparent"},children:[x&&i.jsx("span",{className:"w-1.5 h-1.5 rounded-full animate-pulse",style:{backgroundColor:"var(--status-running)"}}),N&&i.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:"var(--status-error)"}}),i.jsx("span",{children:r.name}),((E=r.cost)==null?void 0:E.totalUsd)>0&&i.jsxs("span",{className:"text-[10px] font-code tabular-nums",style:{color:"var(--text-tertiary)"},children:["$",r.cost.totalUsd.toFixed(2)]})]},r.id)})})}function wr({content:u}){const f=b.useMemo(()=>fv(u),[u]);return i.jsx("div",{className:"markdown-output space-y-2",children:f.map((d,r)=>i.jsx(dv,{block:d},r))})}function fv(u){const f=u.split(`
|
|
345
|
+
`),d=[];let r=0;for(;r<f.length;){const m=f[r];if(m.trimStart().startsWith("```")){const E=m.trimStart().slice(3).trim(),p=[];for(r++;r<f.length&&!f[r].trimStart().startsWith("```");)p.push(f[r]),r++;r++,d.push({type:"code",lang:E,content:p.join(`
|
|
346
|
+
`)});continue}const x=m.match(/^(#{1,6})\s+(.+)/);if(x){d.push({type:"heading",level:x[1].length,text:x[2]}),r++;continue}if(/^(-{3,}|\*{3,}|_{3,})\s*$/.test(m.trim())){d.push({type:"hr"}),r++;continue}if(m.trimStart().startsWith("> ")){const E=[];for(;r<f.length&&f[r].trimStart().startsWith("> ");)E.push(f[r].trimStart().slice(2)),r++;d.push({type:"blockquote",text:E.join(`
|
|
347
|
+
`)});continue}if(/^\s*[-*+]\s/.test(m)){const E=[];for(;r<f.length&&/^\s*[-*+]\s/.test(f[r]);)E.push(f[r].replace(/^\s*[-*+]\s/,"")),r++;d.push({type:"list",ordered:!1,items:E});continue}if(/^\s*\d+[.)]\s/.test(m)){const E=[];for(;r<f.length&&/^\s*\d+[.)]\s/.test(f[r]);)E.push(f[r].replace(/^\s*\d+[.)]\s/,"")),r++;d.push({type:"list",ordered:!0,items:E});continue}if(m.trim()===""){r++;continue}const N=[];for(;r<f.length&&f[r].trim()!==""&&!f[r].trimStart().startsWith("#")&&!f[r].trimStart().startsWith("```")&&!f[r].trimStart().startsWith("> ")&&!/^\s*[-*+]\s/.test(f[r])&&!/^\s*\d+[.)]\s/.test(f[r])&&!/^(-{3,}|\*{3,}|_{3,})\s*$/.test(f[r].trim());)N.push(f[r]),r++;N.length>0&&d.push({type:"paragraph",text:N.join(`
|
|
348
|
+
`)})}return d}function dv({block:u}){switch(u.type){case"heading":return i.jsx(mv,{level:u.level,text:u.text});case"code":return i.jsx(xv,{lang:u.lang,content:u.content});case"paragraph":return i.jsx(yv,{text:u.text});case"list":return i.jsx(pv,{ordered:u.ordered,items:u.items});case"hr":return i.jsx("div",{className:"my-2",style:{borderTop:"1px solid var(--border-muted)"}});case"blockquote":return i.jsx(vv,{text:u.text})}}function mv({level:u,text:f}){const d={1:"text-base font-bold mt-3 mb-1",2:"text-sm font-bold mt-2.5 mb-1",3:"text-xs font-bold mt-2 mb-0.5",4:"text-xs font-semibold mt-1.5 mb-0.5",5:"text-xs font-medium mt-1",6:"text-xs font-medium mt-1"};return i.jsx("div",{className:d[u]||d[3],style:{color:"var(--text-primary)"},children:i.jsx(Ji,{text:f})})}function xv({lang:u,content:f}){return i.jsxs("div",{className:"rounded-md overflow-hidden text-[11px] font-code",style:{border:"1px solid var(--border-muted)"},children:[u&&i.jsx("div",{className:"px-3 py-1 text-[9px] uppercase tracking-wider",style:{backgroundColor:"var(--bg-overlay)",color:"var(--text-disabled)",borderBottom:"1px solid var(--border-muted)"},children:u}),i.jsx("pre",{className:"px-3 py-2 overflow-x-auto leading-relaxed whitespace-pre",style:{backgroundColor:"var(--bg-inset)",color:"var(--text-primary)"},children:f})]})}function yv({text:u}){return i.jsx("p",{className:"text-xs leading-relaxed",style:{color:"var(--text-primary)"},children:i.jsx(Ji,{text:u})})}function pv({ordered:u,items:f}){const d=u?"ol":"ul";return i.jsx(d,{className:`text-xs leading-relaxed pl-4 space-y-0.5 ${u?"list-decimal":"list-disc"}`,style:{color:"var(--text-primary)"},children:f.map((r,m)=>i.jsx("li",{children:i.jsx(Ji,{text:r})},m))})}function vv({text:u}){return i.jsx("div",{className:"text-xs leading-relaxed pl-3 py-1",style:{borderLeft:"2px solid var(--border-default)",color:"var(--text-secondary)"},children:i.jsx(Ji,{text:u})})}function Ji({text:u}){const f=b.useMemo(()=>hv(u),[u]);return i.jsx(i.Fragment,{children:f.map((d,r)=>i.jsx(gv,{part:d},r))})}function hv(u){const f=[],d=/(\*\*(.+?)\*\*)|(\*(.+?)\*)|(`([^`]+?)`)|(\[([^\]]+?)\]\(([^)]+?)\))/g;let r=0,m;for(;(m=d.exec(u))!==null;)m.index>r&&f.push({type:"text",content:u.slice(r,m.index)}),m[1]?f.push({type:"bold",content:m[2]}):m[3]?f.push({type:"italic",content:m[4]}):m[5]?f.push({type:"code",content:m[6]}):m[7]&&f.push({type:"link",text:m[8],href:m[9]}),r=m.index+m[0].length;return r<u.length&&f.push({type:"text",content:u.slice(r)}),f.length===0&&f.push({type:"text",content:u}),f}function gv({part:u}){switch(u.type){case"text":return i.jsx(i.Fragment,{children:u.content});case"bold":return i.jsx("strong",{style:{color:"var(--text-primary)"},children:u.content});case"italic":return i.jsx("em",{style:{color:"var(--text-secondary)"},children:u.content});case"code":return i.jsx("code",{className:"text-[11px] font-code px-1 py-0.5 rounded",style:{backgroundColor:"var(--bg-overlay)",color:"var(--accent)"},children:u.content});case"link":return i.jsx("span",{style:{color:"var(--text-link)"},className:"underline underline-offset-2",children:u.text})}}function bv(u){switch(u){case"Read":return{icon:vs,color:"var(--accent)",prefix:"READ"};case"Edit":return{icon:jr,color:"var(--status-warning)",prefix:"EDIT"};case"Write":return{icon:jr,color:"var(--status-warning)",prefix:"WRITE"};case"Bash":return{icon:Qp,color:"var(--status-success)",prefix:"BASH"};case"Grep":return{icon:Qt,color:"var(--activity-pipeline)",prefix:"GREP"};case"Glob":return{icon:Op,color:"var(--activity-pipeline)",prefix:"GLOB"};case"Agent":return{icon:fa,color:"var(--status-error)",prefix:"AGENT"};case"WebSearch":return{icon:Rm,color:"var(--activity-simplify)",prefix:"SEARCH"};case"WebFetch":return{icon:Rm,color:"var(--activity-simplify)",prefix:"FETCH"};default:return{icon:fa,color:"var(--text-tertiary)",prefix:(u==null?void 0:u.toUpperCase())??"TOOL"}}}function Sv(u){return u?/^#{1,6}\s/m.test(u)||/\*\*.+\*\*/m.test(u)||/^[-*+]\s/m.test(u)||/^\d+[.)]\s/m.test(u)||/^```/m.test(u)||/^>/m.test(u):!1}function jv({activity:u,index:f,isExpanded:d,onToggleExpanded:r,isLastText:m}){if(u.kind==="tool_result")return null;const x=u.content&&u.content.length>200,N=String(f+1).padStart(3," "),E=new Date(u.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}),p=d||m&&!!u.content;if(u.kind==="text"){const j=u.summary+(p&&u.content?`
|
|
349
|
+
`+u.content:""),w=Sv(j);return i.jsx("div",{className:"group transition-colors",onMouseEnter:O=>O.currentTarget.style.backgroundColor="var(--bg-subtle)",onMouseLeave:O=>O.currentTarget.style.backgroundColor="transparent",children:i.jsxs("div",{className:"flex items-start px-3 py-1.5",children:[i.jsx("span",{className:"text-[10px] w-7 shrink-0 text-right pr-2 pt-0.5 tabular-nums select-none font-code",style:{color:"var(--text-tertiary)"},children:N}),i.jsx("span",{className:"w-1 shrink-0 mr-2 pt-0.5",style:{color:"var(--text-disabled)"},children:"|"}),i.jsx("div",{className:"flex-1 min-w-0",children:w?i.jsx(wr,{content:j}):i.jsxs("pre",{className:"text-xs whitespace-pre-wrap break-words leading-relaxed font-ui",style:{color:"var(--text-primary)"},children:[u.summary,x&&!p&&i.jsx("span",{style:{color:"var(--text-tertiary)"},children:"..."}),p&&u.content&&i.jsxs("span",{style:{color:"var(--text-secondary)"},children:[`
|
|
350
|
+
`,u.content]})]})}),x&&i.jsx("button",{onClick:()=>r(u.id),className:"shrink-0 p-0.5 ml-1 mt-0.5",style:{color:"var(--text-tertiary)"},children:d?i.jsx(Zi,{size:10}):i.jsx(xs,{size:10})})]})})}const h=u.kind==="tool_use"?bv(u.tool):{icon:ms,color:"var(--activity-refactor)",prefix:"THINK"},H=h.icon;return i.jsxs("div",{className:"group transition-colors",onMouseEnter:j=>j.currentTarget.style.backgroundColor="var(--bg-subtle)",onMouseLeave:j=>j.currentTarget.style.backgroundColor="transparent",children:[i.jsxs("button",{onClick:()=>x&&r(u.id),"aria-expanded":x?d:void 0,className:`w-full flex items-start px-3 py-1 text-left ${x?"cursor-pointer":"cursor-default"}`,children:[i.jsx("span",{className:"text-[10px] w-7 shrink-0 text-right pr-2 pt-0.5 tabular-nums select-none font-code",style:{color:"var(--text-tertiary)"},children:N}),i.jsx("span",{className:"w-1 shrink-0 mr-2 pt-0.5",style:{color:"var(--text-disabled)"},children:"|"}),i.jsx(H,{size:11,className:"shrink-0 mt-0.5 mr-1.5",style:{color:h.color}}),i.jsx("span",{className:"text-xs font-semibold font-ui shrink-0 mr-2 mt-px tracking-wider",style:{color:h.color},children:h.prefix}),i.jsx("span",{className:"text-xs truncate flex-1",style:{color:"var(--text-primary)"},children:u.summary}),i.jsx("span",{className:"text-[10px] shrink-0 ml-2 tabular-nums font-code",style:{color:"var(--text-tertiary)"},children:E}),x&&i.jsx("span",{className:"shrink-0 ml-1",style:{color:"var(--text-tertiary)"},children:d?i.jsx(Zi,{size:10}):i.jsx(xs,{size:10})})]}),d&&u.content&&i.jsx("div",{className:"pl-12 pr-3 pb-1.5",children:i.jsx("pre",{className:"text-[11px] font-code whitespace-pre-wrap break-words max-h-48 overflow-auto rounded px-2 py-1.5 leading-relaxed",style:{backgroundColor:"var(--bg-inset)",color:"var(--text-tertiary)",border:"1px solid var(--border-muted)"},children:u.content})})]})}function Nv(u){return u?/^#{1,6}\s/m.test(u)||/\*\*.+\*\*/m.test(u)||/^[-*+]\s/m.test(u)||/^\d+[.)]\s/m.test(u)||/^```/m.test(u)||/^>/m.test(u):!1}function Cv({agent:u,liveOutput:f,localMessages:d,isRunning:r}){const m=u.output||"",x=f&&f!==m?f.startsWith(m)?f.slice(m.length):f:"",N=m+x,E=Nv(N);return i.jsx("div",{className:"p-4 text-xs leading-relaxed",children:N||d.length>0?i.jsxs(i.Fragment,{children:[N&&(E?i.jsx(wr,{content:N}):i.jsx("pre",{className:"whitespace-pre-wrap break-words font-ui",style:{color:"var(--text-primary)"},children:N})),d.map((p,h)=>i.jsxs("div",{className:"my-1.5 flex items-start gap-2",children:[i.jsx("span",{className:"font-bold shrink-0",style:{color:"var(--status-success)"},children:">"}),i.jsx("pre",{className:"whitespace-pre-wrap break-words",style:{color:"var(--status-success)",opacity:.8},children:p})]},h)),r&&d.length>0&&i.jsx("span",{className:"terminal-cursor",style:{color:"var(--status-running)"},children:"_"})]}):i.jsx("span",{className:"italic",style:{color:"var(--text-tertiary)"},children:r?"awaiting output...":"no output"})})}function zv(u){const f=u.match(/(?:^|\s)((?:\/|\.\/|[a-zA-Z])[^\s]+\.[a-zA-Z0-9]+)/);return f?f[1]:u}function Av(u){if(!u)return{};try{const f=JSON.parse(u);return{old_string:f.old_string,new_string:f.new_string}}catch{return{}}}function Tv(u){return b.useMemo(()=>{const f=new Map;for(const r of u){if(r.kind!=="tool_use"||r.tool!=="Edit"&&r.tool!=="Write")continue;const m=zv(r.summary);if(f.has(m)||f.set(m,[]),r.tool==="Edit"){const{old_string:x,new_string:N}=Av(r.content);f.get(m).push({type:"edit",oldString:x,newString:N,timestamp:r.timestamp})}else{let x=r.content||"";try{x=JSON.parse(x).content||x}catch{}f.get(m).push({type:"write",content:x,timestamp:r.timestamp})}}const d=[];for(const[r,m]of f){let x=0,N=0;for(const E of m)E.type==="write"?x+=(E.content||"").split(`
|
|
351
|
+
`).length:(N+=(E.oldString||"").split(`
|
|
352
|
+
`).filter(Boolean).length,x+=(E.newString||"").split(`
|
|
353
|
+
`).filter(Boolean).length);d.push({filePath:r,changes:m,additions:x,deletions:N})}return d},[u])}function Ev({files:u,selectedPath:f,onSelect:d}){return i.jsxs("div",{className:"w-56 shrink-0 overflow-y-auto",style:{backgroundColor:"var(--bg-inset)",borderRight:"1px solid var(--border-muted)"},children:[i.jsxs("div",{className:"px-3 py-2 text-[10px] font-ui font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)",borderBottom:"1px solid var(--border-muted)"},children:["Files changed (",u.length,")"]}),u.map(r=>{const m=r.filePath===f,x=r.filePath.split("/").pop()||r.filePath;return i.jsxs("button",{onClick:()=>d(r.filePath),className:"w-full text-left px-3 py-1.5 text-[11px] flex items-center gap-1.5 transition-colors truncate",style:{backgroundColor:m?"var(--bg-emphasis)":"transparent",color:m?"var(--text-primary)":"var(--text-secondary)"},onMouseEnter:N=>{m||(N.currentTarget.style.backgroundColor="var(--bg-subtle)")},onMouseLeave:N=>{m||(N.currentTarget.style.backgroundColor="transparent")},title:r.filePath,children:[i.jsx(vs,{size:10,className:"shrink-0",style:{color:"var(--text-disabled)"}}),i.jsx("span",{className:"truncate flex-1",children:x}),i.jsxs("span",{className:"shrink-0 flex gap-1.5 text-[10px] tabular-nums",children:[r.additions>0&&i.jsxs("span",{style:{color:"var(--diff-add-text)"},children:["+",r.additions]}),r.deletions>0&&i.jsxs("span",{style:{color:"var(--diff-del-text)"},children:["-",r.deletions]})]})]},r.filePath)})]})}function ax({change:u}){const f=new Date(u.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"});return i.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 text-[10px]",style:{backgroundColor:u.type==="write"?"var(--status-success-bg)":"var(--status-warning-bg)",borderBottom:"1px solid var(--border-muted)"},children:[u.type==="write"?i.jsx(Vi,{size:10,style:{color:"var(--diff-add-text)"}}):i.jsx(jr,{size:10,style:{color:"var(--status-warning)"}}),i.jsx("span",{style:{color:u.type==="write"?"var(--diff-add-text)":"var(--status-warning)"},children:u.type==="write"?"new file":"edit"}),i.jsx("span",{className:"ml-auto tabular-nums",style:{color:"var(--text-disabled)"},children:f})]})}function Mv({filePath:u,changes:f}){return i.jsx("div",{children:f.map((d,r)=>i.jsxs("div",{className:"mb-4",children:[i.jsx(ax,{filePath:u,change:d}),d.type==="write"?i.jsx(kv,{content:d.content||""}):i.jsx(wv,{oldString:d.oldString||"",newString:d.newString||""})]},r))})}function kv({content:u}){const f=u.split(`
|
|
354
|
+
`),d=f.slice(0,100);return i.jsxs("div",{className:"text-[11px] font-code leading-relaxed",children:[d.map((r,m)=>i.jsxs("div",{className:"flex",style:{backgroundColor:"var(--diff-add-bg)"},children:[i.jsx("span",{className:"w-12 shrink-0 text-right pr-2 select-none tabular-nums",style:{color:"var(--diff-line-num)",backgroundColor:"var(--diff-add-gutter)"},children:m+1}),i.jsx("span",{className:"px-2",style:{color:"var(--diff-add-text)"},children:"+"}),i.jsx("pre",{className:"whitespace-pre-wrap break-words flex-1",style:{color:"var(--diff-add-text)"},children:r})]},m)),f.length>100&&i.jsxs("div",{className:"px-3 py-1 text-[10px] italic",style:{color:"var(--text-disabled)"},children:["... ",f.length-100," more lines"]})]})}function wv({oldString:u,newString:f}){const d=u.split(`
|
|
355
|
+
`),r=f.split(`
|
|
356
|
+
`);return i.jsxs("div",{className:"text-[11px] font-code leading-relaxed",children:[i.jsx("div",{className:"flex px-2 py-0.5",style:{backgroundColor:"var(--diff-hunk-bg)"},children:i.jsxs("span",{className:"text-[10px]",style:{color:"var(--accent)"},children:["@@ -",d.length," +",r.length," @@"]})}),d.map((m,x)=>i.jsxs("div",{className:"flex",style:{backgroundColor:"var(--diff-del-bg)"},children:[i.jsx("span",{className:"w-12 shrink-0 text-right pr-2 select-none tabular-nums",style:{color:"var(--diff-line-num)",backgroundColor:"var(--diff-del-gutter)"},children:x+1}),i.jsx("span",{className:"w-6 shrink-0 text-center",style:{color:"var(--diff-del-text)"},children:"-"}),i.jsx("pre",{className:"whitespace-pre-wrap break-words flex-1",style:{color:"var(--diff-del-text)"},children:m})]},`del-${x}`)),r.map((m,x)=>i.jsxs("div",{className:"flex",style:{backgroundColor:"var(--diff-add-bg)"},children:[i.jsx("span",{className:"w-12 shrink-0 text-right pr-2 select-none tabular-nums",style:{color:"var(--diff-line-num)",backgroundColor:"var(--diff-add-gutter)"},children:x+1}),i.jsx("span",{className:"w-6 shrink-0 text-center",style:{color:"var(--diff-add-text)"},children:"+"}),i.jsx("pre",{className:"whitespace-pre-wrap break-words flex-1",style:{color:"var(--diff-add-text)"},children:m})]},`add-${x}`))]})}function Dv({filePath:u,changes:f}){return i.jsx("div",{children:f.map((d,r)=>i.jsxs("div",{className:"mb-4",children:[i.jsx(ax,{filePath:u,change:d}),d.type==="write"?i.jsx(_v,{content:d.content||""}):i.jsx(Rv,{oldString:d.oldString||"",newString:d.newString||""})]},r))})}function _v({content:u}){const f=u.split(`
|
|
357
|
+
`).slice(0,100);return i.jsxs("div",{className:"flex text-[11px] font-code leading-relaxed",children:[i.jsx("div",{className:"w-1/2",style:{borderRight:"1px solid var(--border-muted)"},children:f.map((d,r)=>i.jsxs("div",{className:"flex h-[20px]",style:{backgroundColor:"var(--bg-inset)"},children:[i.jsx("span",{className:"w-10 shrink-0 text-right pr-2 select-none tabular-nums",style:{color:"var(--text-disabled)"}}),i.jsx("pre",{className:"flex-1 px-1"})]},r))}),i.jsx("div",{className:"w-1/2",children:f.map((d,r)=>i.jsxs("div",{className:"flex h-[20px]",style:{backgroundColor:"var(--diff-add-bg)"},children:[i.jsx("span",{className:"w-10 shrink-0 text-right pr-2 select-none tabular-nums",style:{color:"var(--diff-line-num)",backgroundColor:"var(--diff-add-gutter)"},children:r+1}),i.jsx("span",{className:"w-4 shrink-0 text-center",style:{color:"var(--diff-add-text)"},children:"+"}),i.jsx("pre",{className:"whitespace-pre break-words flex-1 truncate",style:{color:"var(--diff-add-text)"},children:d})]},r))})]})}function Rv({oldString:u,newString:f}){const d=u.split(`
|
|
358
|
+
`),r=f.split(`
|
|
359
|
+
`),m=Math.max(d.length,r.length);return i.jsxs("div",{className:"text-[11px] font-code leading-relaxed",children:[i.jsx("div",{className:"flex px-2 py-0.5",style:{backgroundColor:"var(--diff-hunk-bg)"},children:i.jsxs("span",{className:"text-[10px]",style:{color:"var(--accent)"},children:["@@ -",d.length," +",r.length," @@"]})}),i.jsxs("div",{className:"flex",children:[i.jsx("div",{className:"w-1/2",style:{borderRight:"1px solid var(--border-muted)"},children:Array.from({length:m},(x,N)=>{const E=d[N],p=N<d.length;return i.jsxs("div",{className:"flex h-[20px]",style:{backgroundColor:p?"var(--diff-del-bg)":"var(--bg-inset)"},children:[i.jsx("span",{className:"w-10 shrink-0 text-right pr-2 select-none tabular-nums",style:{color:"var(--diff-line-num)",backgroundColor:p?"var(--diff-del-gutter)":"transparent"},children:p?N+1:""}),p&&i.jsx("span",{className:"w-4 shrink-0 text-center",style:{color:"var(--diff-del-text)"},children:"-"}),i.jsx("pre",{className:"whitespace-pre break-words flex-1 truncate",style:{color:"var(--diff-del-text)"},children:E??""})]},N)})}),i.jsx("div",{className:"w-1/2",children:Array.from({length:m},(x,N)=>{const E=r[N],p=N<r.length;return i.jsxs("div",{className:"flex h-[20px]",style:{backgroundColor:p?"var(--diff-add-bg)":"var(--bg-inset)"},children:[i.jsx("span",{className:"w-10 shrink-0 text-right pr-2 select-none tabular-nums",style:{color:"var(--diff-line-num)",backgroundColor:p?"var(--diff-add-gutter)":"transparent"},children:p?N+1:""}),p&&i.jsx("span",{className:"w-4 shrink-0 text-center",style:{color:"var(--diff-add-text)"},children:"+"}),i.jsx("pre",{className:"whitespace-pre break-words flex-1 truncate",style:{color:"var(--diff-add-text)"},children:E??""})]},N)})})]})]})}function Ov({activities:u}){var p;const f=Tv(u),[d,r]=b.useState(null),[m,x]=b.useState("unified"),N=d??((p=f[0])==null?void 0:p.filePath)??null,E=f.find(h=>h.filePath===N);return f.length===0?i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsxs("div",{className:"text-center",children:[i.jsx(vs,{size:28,className:"mx-auto mb-3 opacity-15",style:{color:"var(--text-tertiary)"}}),i.jsx("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"No file changes detected"})]})}):i.jsxs("div",{className:"flex h-full font-code",children:[i.jsx(Ev,{files:f,selectedPath:N,onSelect:r}),i.jsx("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:E&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 shrink-0 sticky top-0 z-10",style:{backgroundColor:"var(--bg-surface)",borderBottom:"1px solid var(--border-muted)"},children:[i.jsx("span",{className:"text-[11px] truncate",style:{color:"var(--text-primary)"},children:E.filePath}),i.jsxs("div",{className:"flex text-[10px] font-ui shrink-0 ml-2",children:[i.jsx("button",{onClick:()=>x("unified"),className:"px-2 py-0.5 transition-colors",style:{backgroundColor:m==="unified"?"var(--bg-emphasis)":"transparent",color:m==="unified"?"var(--text-primary)":"var(--text-tertiary)",border:"1px solid var(--border-muted)",borderRadius:"4px 0 0 4px"},children:"Unified"}),i.jsx("button",{onClick:()=>x("split"),className:"px-2 py-0.5 transition-colors",style:{backgroundColor:m==="split"?"var(--bg-emphasis)":"transparent",color:m==="split"?"var(--text-primary)":"var(--text-tertiary)",border:"1px solid var(--border-muted)",borderLeft:"none",borderRadius:"0 4px 4px 0"},children:"Split"})]})]}),i.jsx("div",{className:"flex-1 overflow-auto",style:{backgroundColor:"var(--bg-base)"},children:m==="unified"?i.jsx(Mv,{filePath:E.filePath,changes:E.changes}):i.jsx(Dv,{filePath:E.filePath,changes:E.changes})})]})})]})}function Uv(u,f){const[d,r]=b.useState(()=>{try{const x=localStorage.getItem(u);if(x!==null)return JSON.parse(x)}catch{}return f}),m=b.useCallback(x=>{r(N=>{const E=typeof x=="function"?x(N):x;try{localStorage.setItem(u,JSON.stringify(E))}catch{}return E})},[u]);return[d,m]}function Dr({agent:u,liveOutput:f,activities:d,onSendInput:r}){const m=b.useRef(null),x=b.useRef(null),[N,E]=b.useState(""),[p,h]=b.useState([]),[H,j]=Uv("swarm_output_view","activity"),[w,O]=b.useState(!0),[k,Q]=b.useState(!1),[J,I]=b.useState(""),[Y,te]=b.useState(null),[oe,Z]=b.useState(!1),[L,_]=b.useState(new Set),V=b.useRef(null),ne=b.useRef(new Map),de=b.useRef(null),Ce=b.useCallback(C=>{_(q=>{const X=new Set(q);return X.has(C)?X.delete(C):X.add(C),X})},[]);b.useEffect(()=>{if(de.current&&m.current&&ne.current.set(de.current,m.current.scrollTop),u!=null&&u.id&&m.current){const C=ne.current.get(u.id);C!==void 0&&requestAnimationFrame(()=>{m.current&&(m.current.scrollTop=C)})}de.current=(u==null?void 0:u.id)??null},[u==null?void 0:u.id]),b.useEffect(()=>{h([])},[u==null?void 0:u.id]),b.useEffect(()=>{w&&m.current&&(m.current.scrollTop=m.current.scrollHeight)},[f,u==null?void 0:u.output,p,d,w]);const De=()=>{if(!m.current)return;const{scrollTop:C,scrollHeight:q,clientHeight:X}=m.current;O(q-C-X<40),u!=null&&u.id&&ne.current.set(u.id,C)},qe=b.useCallback(()=>(u==null?void 0:u.output)||f||"",[u==null?void 0:u.output,f]),se=b.useCallback(async()=>{try{await navigator.clipboard.writeText(qe()),Q(!0),setTimeout(()=>Q(!1),2e3)}catch{}},[qe]),ie=C=>{var X;if(C.preventDefault(),!u||!N.trim())return;const q=N.trim();h(le=>[...le,q]),r(u.id,q),E(""),(X=x.current)==null||X.focus()};if(!u)return i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsxs("div",{className:"text-center",children:[i.jsx(Um,{size:32,className:"mx-auto mb-3 opacity-15",style:{color:"var(--text-tertiary)"}}),i.jsx("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Select an activity to view output"})]})});const M=u.output||"",G=u.status==="running",$=u.status==="done",ge=G||$,he=d.filter(C=>{var q,X,le;if(C.kind!=="tool_use"&&C.kind!=="thinking"&&C.kind!=="text"||Y&&C.kind==="tool_use"&&C.tool!==Y||Y&&C.kind!=="tool_use")return!1;if(J){const ue=J.toLowerCase();if(!((q=C.summary)!=null&&q.toLowerCase().includes(ue))&&!((X=C.content)!=null&&X.toLowerCase().includes(ue))&&!((le=C.tool)!=null&&le.toLowerCase().includes(ue)))return!1}return!0}),g=d.reduce((C,q)=>(q.kind==="tool_use"&&q.tool&&(C[q.tool]=(C[q.tool]||0)+1),C),{});return i.jsxs("div",{className:"flex flex-col h-full font-code",role:"log","aria-label":`Agent output: ${u.name}`,children:[i.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 shrink-0",style:{backgroundColor:"var(--bg-surface)",borderBottom:"1px solid var(--border-muted)"},children:[i.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[i.jsx(Um,{size:11,style:{color:"var(--text-tertiary)"}}),i.jsx("span",{style:{color:"var(--text-primary)"},children:u.name}),i.jsx("span",{style:{color:"var(--text-disabled)"},children:"::"}),i.jsx("span",{style:{color:"var(--text-tertiary)"},children:u.persona}),i.jsx("span",{style:{color:"var(--text-disabled)"},children:"/"}),i.jsx("span",{style:{color:"var(--text-tertiary)"},children:u.stack})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"flex text-[10px] font-medium font-ui",children:["activity","changes","raw"].map((C,q)=>i.jsx("button",{onClick:()=>j(C),className:"px-2 py-0.5 transition-colors",style:{backgroundColor:H===C?"var(--bg-emphasis)":"transparent",color:H===C?"var(--text-primary)":"var(--text-tertiary)",border:"1px solid var(--border-muted)",borderRadius:q===0?"4px 0 0 4px":q===2?"0 4px 4px 0":"0",borderLeft:q>0?"none":void 0},children:C==="activity"?"log":C},C))}),i.jsx("button",{onClick:se,className:"p-1 rounded transition-colors",style:{color:"var(--text-tertiary)"},title:"Copy",children:k?i.jsx(kp,{size:12,style:{color:"var(--status-success)"}}):i.jsx(Dp,{size:12})}),i.jsx("button",{onClick:()=>{Z(!oe),oe||setTimeout(()=>{var C;return(C=V.current)==null?void 0:C.focus()},50)},className:"p-1 rounded transition-colors",style:{color:oe?"var(--accent)":"var(--text-tertiary)"},title:"Search",children:i.jsx(Qt,{size:12})}),G&&i.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-ui",style:{color:"var(--status-error)"},children:[i.jsx("span",{className:"w-1.5 h-1.5 rounded-full animate-pulse",style:{backgroundColor:"var(--status-error)"}}),"live"]}),i.jsx("span",{className:"text-[10px] tabular-nums",style:{color:"var(--text-tertiary)"},children:u.id.slice(0,8)})]})]}),oe&&H==="activity"&&i.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5",style:{backgroundColor:"var(--bg-raised)",borderBottom:"1px solid var(--border-muted)"},children:[i.jsx(Qt,{size:11,style:{color:"var(--text-disabled)"}}),i.jsx("input",{ref:V,type:"text",value:J,onChange:C=>I(C.target.value),placeholder:"Search output...",className:"flex-1 bg-transparent text-xs focus:outline-none",style:{color:"var(--text-primary)"}}),J&&i.jsx("button",{onClick:()=>I(""),style:{color:"var(--text-tertiary)"},children:i.jsx(ps,{size:11})}),i.jsx("div",{className:"h-3 w-px",style:{backgroundColor:"var(--border-muted)"}}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(Rp,{size:10,style:{color:"var(--text-disabled)"}}),Object.entries(g).slice(0,6).map(([C,q])=>i.jsxs("button",{onClick:()=>te(Y===C?null:C),className:"flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-ui transition-colors",style:{backgroundColor:Y===C?"var(--bg-emphasis)":"transparent",color:Y===C?"var(--text-primary)":"var(--text-disabled)"},children:[C,i.jsx("span",{style:{color:"var(--text-disabled)"},children:q})]},C)),Y&&i.jsx("button",{onClick:()=>te(null),className:"text-[10px] font-ui",style:{color:"var(--text-tertiary)"},children:"clear"})]})]}),i.jsx("div",{ref:m,onScroll:De,className:"flex-1 overflow-auto",style:{backgroundColor:"var(--bg-base)"},children:H==="changes"?i.jsx(Ov,{activities:d}):H==="activity"?i.jsxs("div",{className:"min-h-full py-1",children:[he.length>0?he.map((C,q)=>{const X=C.kind==="text"&&!he.slice(q+1).some(le=>le.kind==="text");return i.jsx(jv,{activity:C,index:q,isExpanded:L.has(C.id),onToggleExpanded:Ce,isLastText:X},C.id)}):G?i.jsxs("div",{className:"flex items-center gap-2 px-3 py-4",children:[i.jsx("span",{className:"w-1.5 h-1.5 rounded-full animate-pulse",style:{backgroundColor:"var(--status-running)"}}),i.jsx("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"awaiting output..."}),i.jsx("span",{className:"terminal-cursor",style:{color:"var(--status-running)"},children:"_"})]}):M?i.jsx("div",{className:"p-4",children:i.jsx(wr,{content:M})}):i.jsx("div",{className:"px-3 py-4 text-xs italic",style:{color:"var(--text-tertiary)"},children:"no output"}),p.map((C,q)=>i.jsx("div",{className:"px-3 py-1.5",style:{backgroundColor:"var(--bg-subtle)"},children:i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("span",{className:"font-bold text-xs shrink-0",style:{color:"var(--status-success)"},children:">"}),i.jsx("pre",{className:"text-xs whitespace-pre-wrap break-words",style:{color:"var(--status-success)",opacity:.8},children:C})]})},`local-${q}`))]}):i.jsx(Cv,{agent:u,liveOutput:f,localMessages:p,isRunning:G})}),ge&&i.jsxs("form",{onSubmit:ie,className:"flex items-center gap-2 px-3 py-2 shrink-0",style:{backgroundColor:"var(--bg-surface)",borderTop:"1px solid var(--border-muted)"},children:[i.jsx("span",{className:"text-xs font-bold shrink-0",style:{color:"var(--status-success)"},children:">"}),i.jsx("input",{ref:x,type:"text",value:N,onChange:C=>E(C.target.value),placeholder:G?"send input...":"resume session...",className:"flex-1 bg-transparent text-xs focus:outline-none",style:{color:"var(--text-primary)"}}),i.jsx("button",{type:"submit",disabled:!N.trim(),className:"p-1 rounded transition-colors shrink-0 disabled:opacity-30",style:{color:"var(--text-tertiary)"},children:i.jsx(lx,{size:12})})]})]})}function Bv({violations:u}){if(u.length===0)return null;const f=u.filter(r=>r.severity==="error"),d=u.filter(r=>r.severity==="warning");return i.jsxs("div",{className:"px-4 py-3 font-mono",children:[i.jsxs("div",{className:"text-[10px] text-stone-500 mb-2 tracking-wider uppercase",children:["guardrails ",i.jsxs("span",{className:"text-stone-600",children:["(",f.length," err, ",d.length," warn)"]})]}),i.jsx("div",{className:"space-y-1 max-h-40 overflow-y-auto",children:u.map((r,m)=>i.jsxs("div",{className:`flex items-start gap-2 px-2.5 py-1.5 rounded text-xs ${r.severity==="error"?"bg-red-950/20 border border-red-900/20":"bg-amber-950/15 border border-amber-900/20"}`,children:[r.severity==="error"?i.jsx(Hp,{size:10,className:"text-red-500 mt-0.5 shrink-0"}):i.jsx(gs,{size:10,className:"text-amber-500 mt-0.5 shrink-0"}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("span",{className:r.severity==="error"?"text-red-400":"text-amber-400",children:r.message}),i.jsx("span",{className:"text-stone-600 ml-2 text-[10px]",children:r.file.split("/").pop()})]})]},m))})]})}const Ht=["analyze","architect","plan","build","test"];function Qm({state:u,agentOutputs:f,agentActivities:d,sendCommand:r}){var qe;const[m,x]=b.useState(null),[N,E]=b.useState(null),p=u.mayday,h=(p==null?void 0:p.active)&&p.currentStage!=="complete"&&!p.error,H=(p==null?void 0:p.currentStage)==="complete",j=(p==null?void 0:p.error)!=null,w=p==null?void 0:p.pendingApproval,O=Ht.some(se=>{var ie;return((ie=u.stages[se])==null?void 0:ie.status)==="error"}),k=!h&&!H&&!j&&(p&&!p.active&&p.currentStage!=="complete"||O),Q=!!(p!=null&&p.featureRequest)&&(k||j||H),J=((qe=u.totalCost)==null?void 0:qe.totalUsd)>0?u.totalCost.totalUsd:(()=>{const se=u.agents.reduce((ie,M)=>{var G;return ie+(((G=M.cost)==null?void 0:G.totalUsd)??0)},0);return se>0?se:Ht.reduce((ie,M)=>{var G;return ie+(((G=u.stages[M])==null?void 0:G.stageCost)??0)},0)})(),I=b.useMemo(()=>{var ie,M,G;if(m)return m;for(const $ of Ht)if(((ie=u.stages[$])==null?void 0:ie.status)==="running")return $;let se=null;for(const $ of Ht)(((M=u.stages[$])==null?void 0:M.status)==="done"||((G=u.stages[$])==null?void 0:G.status)==="error")&&(se=$);return se??"analyze"},[u.stages,m]),Y=b.useMemo(()=>{const se=u.stages[I];return se?se.agentIds.map(ie=>u.agents.find(M=>M.id===ie)).filter(Boolean):[]},[u,I]),te=b.useMemo(()=>p!=null&&p.fixAgentIds?p.fixAgentIds.map(se=>u.agents.find(ie=>ie.id===se)).filter(Boolean):[],[u,p]),oe=I==="build"?[...Y,...te]:Y,Z=b.useMemo(()=>N?oe.find(se=>se.id===N)??oe[0]:oe.find(se=>se.status==="running")??oe[0],[oe,N]),L=Z&&f.get(Z.id)||"",_=Z?d.get(Z.id)||[]:[],V=Ht.filter(se=>{var ie;return((ie=u.stages[se])==null?void 0:ie.status)==="done"}).length,ne=Ht.findIndex(se=>{var ie;return((ie=u.stages[se])==null?void 0:ie.status)==="running"}),de=ne>=0?ne+1:V,Ce={analyze:"Requirements",architect:"Design",plan:"Tasks",build:"Code",test:"Test"},De=ne>=0?Ce[Ht[ne]]:null;return i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("div",{className:"flex items-center justify-between px-4 py-2 shrink-0",style:{backgroundColor:"var(--bg-surface)",borderBottom:"1px solid var(--border-muted)"},children:[i.jsxs("div",{className:"flex items-center gap-2",children:[h&&i.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium",style:{color:"var(--status-running)"},children:[i.jsx("span",{className:"w-2 h-2 rounded-full animate-pulse",style:{backgroundColor:"var(--status-running)"}}),De?`${De}`:"Building",i.jsxs("span",{className:"font-normal",style:{color:"var(--text-tertiary)"},children:["step ",de," of ",Ht.length]})]}),H&&i.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium",style:{color:"var(--status-success)"},children:[i.jsx(cn,{size:12}),"Complete"]}),(j||k&&O)&&i.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium",style:{color:"var(--status-error)"},children:[i.jsx(un,{size:12}),"Failed",p!=null&&p.error?i.jsxs("span",{className:"font-normal",style:{color:"var(--text-tertiary)"},children:["— ",p.error.slice(0,80)]}):O?i.jsxs("span",{className:"font-normal",style:{color:"var(--text-tertiary)"},children:["— ",Ce[Ht.find(se=>{var ie;return((ie=u.stages[se])==null?void 0:ie.status)==="error"})||""]||"Stage"," step failed"]}):null]}),k&&!O&&i.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium",style:{color:"var(--status-warning)"},children:[i.jsx(Nr,{size:12}),"Stopped",i.jsxs("span",{className:"font-normal",style:{color:"var(--text-tertiary)"},children:["at ",Ce[p==null?void 0:p.currentStage]||(p==null?void 0:p.currentStage)||"unknown"," step"]})]}),!h&&!H&&!j&&!k&&i.jsx("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:u.projectName||"Build"}),J>0&&i.jsxs("span",{className:"text-xs font-code tabular-nums",style:{color:"var(--text-secondary)"},children:["$",J.toFixed(2)]}),V>0&&i.jsxs("span",{className:"text-[10px]",style:{color:"var(--text-disabled)"},children:[V,"/",Ht.length," steps done"]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[w&&i.jsxs(i.Fragment,{children:[i.jsxs("span",{className:"flex items-center gap-1 text-xs",style:{color:"var(--status-warning)"},children:[i.jsx(gs,{size:11}),"Waiting for approval"]}),i.jsxs("button",{onClick:()=>r({action:"mayday-approve",stage:w.stage}),className:"flex items-center gap-1 px-2.5 py-1 rounded text-xs font-medium transition-colors",style:{backgroundColor:"var(--status-success-bg)",color:"var(--status-success)",border:"1px solid var(--border-muted)"},children:[i.jsx(cn,{size:10}),"Approve"]}),i.jsxs("button",{onClick:()=>r({action:"mayday-reject",stage:w.stage}),className:"flex items-center gap-1 px-2.5 py-1 rounded text-xs font-medium transition-colors",style:{backgroundColor:"var(--status-error-bg)",color:"var(--status-error)",border:"1px solid var(--border-muted)"},children:[i.jsx(un,{size:10}),"Reject"]})]}),h&&i.jsxs("button",{onClick:()=>r({action:"mayday-stop"}),className:"flex items-center gap-1.5 px-3 py-1 rounded-md text-xs font-medium transition-colors",style:{backgroundColor:"var(--status-error-bg)",color:"var(--status-error)",border:"1px solid var(--border-muted)"},children:[i.jsx(Nr,{size:10}),"Stop"]}),Q&&i.jsxs("button",{onClick:()=>{let se;for(const ie of Ht){const M=u.stages[ie];if((M==null?void 0:M.status)==="error"){se=ie;break}if((M==null?void 0:M.status)==="pending"||(M==null?void 0:M.status)==="running"){se=ie;break}}r({action:"run-mayday",prompt:p.featureRequest,resume:!0,fromStage:se})},className:"flex items-center gap-1.5 px-3 py-1 rounded-md text-xs font-medium transition-colors",style:{backgroundColor:"var(--accent-muted)",color:"var(--accent)",border:"1px solid var(--border-muted)"},children:[i.jsx(Er,{size:10}),O||j?"Retry from Failed Step":H?"Run Again":"Resume"]})]})]}),i.jsx(rv,{stages:u.stages,activeStage:I,onSelectStage:se=>{x(se),E(null)},mayday:p}),u.violations.length>0&&i.jsx(Bv,{violations:u.violations}),oe.length>0&&i.jsx(ov,{agents:oe,selectedId:(Z==null?void 0:Z.id)??null,onSelect:E}),i.jsx("div",{className:"flex-1 min-h-0",children:i.jsx(Dr,{agent:Z??null,liveOutput:L,activities:_,onSendInput:(se,ie)=>{r({action:"send-input",agentId:se,text:ie})}})})]})}function Hv(u){const f=Math.floor(u/1e3);if(f<60)return`${f}s`;const d=Math.floor(f/60),r=f%60;return`${d}m ${r}s`}const qv={running:"In progress",done:"Completed",error:"Failed",killed:"Stopped",pending:"Waiting"};function Zm({agent:u,agentOutput:f,agentActivities:d,sendCommand:r}){var H;const m=u.status==="running",x=u.status==="done",N=u.status==="error",E=u.status==="killed",p=N||E,h=u.startedAt?(u.finishedAt??Date.now())-u.startedAt:0;return i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 shrink-0",style:{backgroundColor:"var(--bg-surface)",borderBottom:"1px solid var(--border-muted)"},children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("span",{className:"flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-medium",style:{backgroundColor:m?"var(--status-running-bg)":N||E?"var(--status-error-bg)":"var(--status-success-bg)",color:m?"var(--status-running)":N||E?"var(--status-error)":"var(--status-success)"},children:[m&&i.jsx("span",{className:"w-1.5 h-1.5 rounded-full animate-pulse",style:{backgroundColor:"var(--status-running)"}}),qv[u.status]||u.status]}),i.jsx("span",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:u.name}),i.jsx("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:u.model})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[((H=u.cost)==null?void 0:H.totalUsd)>0&&i.jsxs("span",{className:"text-xs font-code tabular-nums",style:{color:"var(--text-secondary)"},children:["$",u.cost.totalUsd.toFixed(2)]}),h>0&&i.jsx("span",{className:"text-xs font-code tabular-nums",style:{color:"var(--text-tertiary)"},children:Hv(h)}),m&&i.jsxs("button",{onClick:()=>r({action:"kill",agentId:u.id}),className:"flex items-center gap-1.5 px-3 py-1 rounded-md text-xs font-medium transition-colors",style:{backgroundColor:"var(--status-error-bg)",color:"var(--status-error)",border:"1px solid var(--border-muted)"},children:[i.jsx(Nr,{size:10}),"Stop"]}),x&&u.sessionId&&i.jsxs("button",{onClick:()=>{const j=prompt("Send a follow-up message to this agent:");j!=null&&j.trim()&&r({action:"send-input",agentId:u.id,text:j.trim()})},className:"flex items-center gap-1.5 px-3 py-1 rounded-md text-xs font-medium transition-colors",style:{backgroundColor:"var(--accent-muted)",color:"var(--accent)",border:"1px solid var(--border-muted)"},children:[i.jsx(tx,{size:10}),"Continue"]}),p&&i.jsxs("button",{onClick:()=>{r({action:"spawn",name:u.name,persona:u.persona,stack:u.stack,model:u.model,permissionMode:u.permissionMode==="default"?"auto":u.permissionMode})},className:"flex items-center gap-1.5 px-3 py-1 rounded-md text-xs font-medium transition-colors",style:{backgroundColor:"var(--status-warning-bg)",color:"var(--status-warning)",border:"1px solid var(--border-muted)"},children:[i.jsx(Er,{size:10}),"Retry"]})]})]}),N&&u.error&&i.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-xs",style:{backgroundColor:"var(--status-error-bg)",color:"var(--status-error)",borderBottom:"1px solid var(--border-muted)"},children:[i.jsx(gs,{size:11,className:"shrink-0"}),u.error]}),i.jsx("div",{className:"flex-1 min-h-0",children:i.jsx(Dr,{agent:u,liveOutput:f,activities:d,onSendInput:(j,w)=>{r({action:"send-input",agentId:j,text:w})}})})]})}const Vm={pipeline:{icon:hs,color:"var(--activity-pipeline)",label:"Build Feature"},fix:{icon:on,color:"var(--activity-fix)",label:"Bug Fix"},review:{icon:Gl,color:"var(--activity-review)",label:"Code Review"},spike:{icon:Qt,color:"var(--activity-spike)",label:"Research"},refactor:{icon:da,color:"var(--activity-refactor)",label:"Refactor"},simplify:{icon:rn,color:"var(--activity-simplify)",label:"Clean Up"}};function Yv(u){const f=Math.floor(u/1e3);if(f<60)return`${f}s`;const d=Math.floor(f/60),r=f%60;return`${d}m ${r}s`}function Lv({entry:u,agentOutputs:f,agentActivities:d,sendCommand:r}){var w,O;const m=(w=u.agentIds)==null?void 0:w[0];b.useEffect(()=>{m&&r({action:"get-agent-log",agentId:m})},[m,r]);const x=Vm[u.activityType||"pipeline"]||Vm.pipeline,N=x.icon,E=u.activityStatus==="success",p=u.activityStatus==="error",h=b.useMemo(()=>m?{id:m,name:u.summary||u.featureRequest||u.projectName,persona:"engineer",stack:u.stack,status:p?"error":"done",pid:null,sessionId:"",model:u.model||"unknown",permissionMode:"auto",startedAt:u.timestamp,finishedAt:u.timestamp+(u.durationMs??0),cost:u.totalCost,output:f.get(m)||"",error:null,parentId:null,childIds:[]}:null,[m,u,p,f]),H=m?d.get(m)||[]:[],j=m&&f.get(m)||"";return i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("div",{className:"px-4 py-3 shrink-0",style:{backgroundColor:"var(--bg-surface)",borderBottom:"1px solid var(--border-muted)"},children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("span",{className:"flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-medium uppercase tracking-wider",style:{backgroundColor:E?"var(--status-success-bg)":p?"var(--status-error-bg)":"var(--bg-subtle)",color:E?"var(--status-success)":p?"var(--status-error)":"var(--text-tertiary)"},children:[E?i.jsx(cn,{size:10}):p?i.jsx(un,{size:10}):i.jsx(ys,{size:10}),E?"Success":p?"Error":"Done"]}),i.jsxs("span",{className:"flex items-center gap-1 px-2 py-0.5 rounded text-[10px] font-medium",style:{backgroundColor:"var(--bg-subtle)",color:x.color},children:[i.jsx(N,{size:10}),x.label]}),i.jsx("span",{className:"text-sm font-medium truncate max-w-md",style:{color:"var(--text-primary)"},children:u.summary||u.featureRequest||u.projectName})]}),i.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[((O=u.totalCost)==null?void 0:O.totalUsd)>0&&i.jsxs("span",{className:"flex items-center gap-1 text-xs font-code tabular-nums",style:{color:"var(--text-secondary)"},children:[i.jsx(Ki,{size:10}),u.totalCost.totalUsd.toFixed(2)]}),u.durationMs!=null&&u.durationMs>0&&i.jsxs("span",{className:"flex items-center gap-1 text-xs font-code tabular-nums",style:{color:"var(--text-tertiary)"},children:[i.jsx(ys,{size:10}),Yv(u.durationMs)]}),i.jsx("span",{className:"text-[10px] tabular-nums font-code",style:{color:"var(--text-disabled)"},children:new Date(u.timestamp).toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}),u.featureRequest&&u.activityType==="pipeline"&&i.jsxs("button",{onClick:()=>r({action:"run-mayday",prompt:u.featureRequest}),className:"flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-medium transition-colors",style:{backgroundColor:"var(--accent-muted)",color:"var(--accent)",border:"1px solid var(--border-muted)"},children:[i.jsx(Er,{size:10}),"Run Again"]})]})]}),u.stageBreakdowns&&u.stageBreakdowns.length>0&&i.jsx("div",{className:"flex items-center gap-1 mt-2",children:u.stageBreakdowns.map(k=>i.jsxs("span",{className:"px-2 py-0.5 rounded text-[10px] capitalize",style:{backgroundColor:k.status==="done"?"var(--status-success-bg)":k.status==="error"?"var(--status-error-bg)":"var(--bg-subtle)",color:k.status==="done"?"var(--status-success)":k.status==="error"?"var(--status-error)":"var(--text-disabled)"},children:[k.name,k.cost>0&&i.jsxs("span",{className:"ml-1 opacity-60",children:["$",k.cost.toFixed(2)]})]},k.name))})]}),i.jsx("div",{className:"flex-1 min-h-0",children:h?i.jsx(Dr,{agent:h,liveOutput:j,activities:H,onSendInput:(k,Q)=>{r({action:"send-input",agentId:k,text:Q})}}):i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsxs("div",{className:"text-center space-y-2",children:[i.jsx(fa,{size:28,className:"mx-auto opacity-15",style:{color:"var(--text-tertiary)"}}),i.jsx("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"No agent output available for this entry"})]})})})]})}function Gv({conventions:u,loading:f,sendCommand:d}){const[r,m]=b.useState(!1),[x,N]=b.useState(u||"");return b.useEffect(()=>{u!=null&&N(u)},[u]),b.useEffect(()=>{d({action:"get-conventions"})},[d]),i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 shrink-0",style:{backgroundColor:"var(--bg-surface)",borderBottom:"1px solid var(--border-muted)"},children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(ds,{size:14,style:{color:"var(--text-secondary)"}}),i.jsx("span",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:"Coding Conventions"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("button",{onClick:()=>d({action:"run-learn"}),disabled:f,className:"flex items-center gap-1 px-2.5 py-1 rounded text-xs font-medium transition-colors disabled:opacity-40",style:{backgroundColor:"var(--accent-muted)",color:"var(--accent)"},title:"Scan codebase to generate conventions",children:[i.jsx(Om,{size:11,className:f?"animate-spin":""}),f?"Scanning...":"Scan"]}),i.jsx("button",{onClick:()=>d({action:"get-conventions"}),className:"p-1.5 rounded transition-colors",style:{color:"var(--text-tertiary)"},title:"Refresh",children:i.jsx(da,{size:12})}),r&&i.jsxs("button",{onClick:()=>{d({action:"save-conventions",content:x}),m(!1)},className:"flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors",style:{backgroundColor:"var(--status-success-bg)",color:"var(--status-success)"},children:[i.jsx(Gp,{size:10}),"Save"]})]})]}),i.jsx("div",{className:"flex-1 overflow-auto p-4",children:f&&!u?i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsxs("div",{className:"text-center space-y-2",children:[i.jsx("div",{className:"w-6 h-6 border-2 rounded-full animate-spin mx-auto",style:{borderColor:"var(--border-default)",borderTopColor:"var(--accent)"}}),i.jsx("span",{className:"text-sm",style:{color:"var(--text-tertiary)"},children:"Scanning codebase..."})]})}):!u&&!r?i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsxs("div",{className:"text-center space-y-3 max-w-sm",children:[i.jsx(ds,{size:32,className:"mx-auto opacity-20",style:{color:"var(--text-tertiary)"}}),i.jsx("p",{className:"text-sm",style:{color:"var(--text-secondary)"},children:"No conventions found"}),i.jsxs("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:["Click ",i.jsx("strong",{children:"Scan"})," to automatically learn your project's patterns and coding style. Hivemind will follow these when writing code."]}),i.jsxs("button",{onClick:()=>d({action:"run-learn"}),className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-md text-xs font-medium transition-colors",style:{backgroundColor:"var(--accent-emphasis)",color:"#fff"},children:[i.jsx(Om,{size:12}),"Scan Codebase"]})]})}):i.jsx("textarea",{value:x,onChange:E=>{N(E.target.value),m(!0)},className:"w-full h-full bg-transparent text-sm font-code resize-none focus:outline-none leading-relaxed",style:{color:"var(--text-primary)"},placeholder:"Write your project conventions here..."})})]})}const hr={fact:"var(--accent)",preference:"var(--activity-pipeline)",pattern:"var(--status-success)",context:"var(--status-warning)",manual:"var(--activity-refactor)"},Xv=["manual","fact","preference","pattern","context"];function Qv({memories:u,sendCommand:f}){const[d,r]=b.useState(""),[m,x]=b.useState(!1),[N,E]=b.useState(""),[p,h]=b.useState("manual"),[H,j]=b.useState(""),[w,O]=b.useState(null);b.useEffect(()=>{f({action:"get-memories"})},[f]);const k=u.filter(Y=>{if(w&&Y.kind!==w)return!1;if(d){const te=d.toLowerCase();return Y.content.toLowerCase().includes(te)||Y.kind.toLowerCase().includes(te)||Y.tags.some(oe=>oe.toLowerCase().includes(te))}return!0}),Q=u.reduce((Y,te)=>(Y[te.kind]=(Y[te.kind]||0)+1,Y),{}),J=()=>{if(!N.trim())return;const Y=H.split(",").map(te=>te.trim()).filter(Boolean);f({action:"add-memory",content:N.trim(),kind:p,tags:Y}),E(""),j(""),x(!1)},I=Y=>{f({action:"remove-memory",id:Y})};return i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 shrink-0",style:{backgroundColor:"var(--bg-surface)",borderBottom:"1px solid var(--border-muted)"},children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(ms,{size:14,style:{color:"var(--text-secondary)"}}),i.jsx("span",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:"Project Memory"}),i.jsxs("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:[u.length," entries"]})]}),i.jsxs("button",{onClick:()=>x(!m),className:"flex items-center gap-1 px-2.5 py-1 rounded text-xs font-medium transition-colors",style:{backgroundColor:m?"var(--status-error-bg)":"var(--accent-muted)",color:m?"var(--status-error)":"var(--accent)"},children:[m?i.jsx(ps,{size:11}):i.jsx(Vi,{size:11}),m?"Cancel":"Add Memory"]})]}),m&&i.jsxs("div",{className:"px-4 py-3 space-y-3",style:{backgroundColor:"var(--bg-raised)",borderBottom:"1px solid var(--border-muted)"},children:[i.jsx("textarea",{value:N,onChange:Y=>E(Y.target.value),placeholder:"What should Hivemind remember? e.g. 'Always use TypeScript strict mode in this project'",rows:3,className:"w-full px-3 py-2 rounded-md text-sm bg-transparent resize-none focus:outline-none",style:{color:"var(--text-primary)",border:"1px solid var(--border-default)",backgroundColor:"var(--bg-overlay)"},autoFocus:!0}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("span",{className:"text-[10px] uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:"Kind:"}),Xv.map(Y=>i.jsx("button",{onClick:()=>h(Y),className:"px-2 py-0.5 rounded text-[10px] font-medium capitalize transition-colors",style:{backgroundColor:p===Y?"var(--bg-emphasis)":"transparent",color:p===Y?hr[Y]||"var(--text-primary)":"var(--text-disabled)",border:p===Y?"1px solid var(--border-default)":"1px solid transparent"},children:Y},Y))]}),i.jsxs("div",{className:"flex items-center gap-1 flex-1",children:[i.jsx(Zp,{size:10,style:{color:"var(--text-disabled)"}}),i.jsx("input",{value:H,onChange:Y=>j(Y.target.value),placeholder:"tags (comma-separated)",className:"flex-1 bg-transparent text-xs focus:outline-none",style:{color:"var(--text-primary)"}})]}),i.jsx("button",{onClick:J,disabled:!N.trim(),className:"px-3 py-1.5 rounded-md text-xs font-medium transition-all disabled:opacity-30",style:{backgroundColor:"var(--accent-emphasis)",color:"#fff"},children:"Save"})]})]}),i.jsxs("div",{className:"flex items-center gap-2 px-4 py-2",style:{borderBottom:"1px solid var(--border-muted)"},children:[i.jsx(Qt,{size:12,style:{color:"var(--text-tertiary)"}}),i.jsx("input",{value:d,onChange:Y=>r(Y.target.value),placeholder:"Filter memories...",className:"flex-1 bg-transparent text-xs focus:outline-none",style:{color:"var(--text-primary)"}}),d&&i.jsx("button",{onClick:()=>r(""),style:{color:"var(--text-tertiary)"},children:i.jsx(ps,{size:11})})]}),Object.keys(Q).length>1&&i.jsxs("div",{className:"flex items-center gap-1 px-4 py-1.5 overflow-x-auto",style:{borderBottom:"1px solid var(--border-muted)"},children:[i.jsxs("button",{onClick:()=>O(null),className:"px-2 py-0.5 rounded text-[10px] font-medium transition-colors whitespace-nowrap",style:{backgroundColor:w?"transparent":"var(--bg-emphasis)",color:w?"var(--text-disabled)":"var(--text-primary)"},children:["All (",u.length,")"]}),Object.entries(Q).map(([Y,te])=>i.jsxs("button",{onClick:()=>O(w===Y?null:Y),className:"px-2 py-0.5 rounded text-[10px] font-medium capitalize transition-colors whitespace-nowrap",style:{backgroundColor:w===Y?"var(--bg-emphasis)":"transparent",color:w===Y?hr[Y]||"var(--text-primary)":"var(--text-disabled)"},children:[Y," (",te,")"]},Y))]}),i.jsx("div",{className:"flex-1 overflow-y-auto",children:k.length===0?i.jsx("div",{className:"flex items-center justify-center h-full p-6",children:i.jsxs("div",{className:"text-center space-y-4 max-w-sm",children:[i.jsx(ms,{size:32,className:"mx-auto opacity-15",style:{color:"var(--text-tertiary)"}}),i.jsx("p",{className:"text-sm font-medium",style:{color:"var(--text-secondary)"},children:u.length===0?"No memories yet":"No matching memories"}),u.length===0&&i.jsxs(i.Fragment,{children:[i.jsxs("p",{className:"text-xs leading-relaxed",style:{color:"var(--text-tertiary)"},children:["Memories help Hivemind learn from past runs and follow your preferences. They're created automatically when you run ",i.jsx("strong",{children:"Build Feature"})," (full pipeline), or you can add them manually."]}),i.jsxs("div",{className:"text-left space-y-1.5 px-4",children:[i.jsx("div",{className:"text-[10px] uppercase tracking-wider font-semibold",style:{color:"var(--text-disabled)"},children:"What to add"}),i.jsx("p",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:'"Always use TypeScript strict mode"'}),i.jsx("p",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:'"Our API uses snake_case, not camelCase"'}),i.jsx("p",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:'"Run pytest, not jest — this is a Python project"'})]}),i.jsxs("button",{onClick:()=>x(!0),className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-md text-xs font-medium transition-colors",style:{backgroundColor:"var(--accent-emphasis)",color:"#fff"},children:[i.jsx(Vi,{size:12}),"Add Your First Memory"]})]})]})}):i.jsx("div",{children:k.map(Y=>i.jsx("div",{className:"group px-4 py-3 transition-colors",style:{borderBottom:"1px solid var(--border-muted)"},onMouseEnter:te=>te.currentTarget.style.backgroundColor="var(--bg-subtle)",onMouseLeave:te=>te.currentTarget.style.backgroundColor="transparent",children:i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-medium uppercase tracking-wider",style:{backgroundColor:"var(--bg-subtle)",color:hr[Y.kind]||"var(--text-secondary)"},children:Y.kind}),Y.tags.map(te=>i.jsxs("span",{className:"text-[10px]",style:{color:"var(--text-disabled)"},children:["#",te]},te)),i.jsx("span",{className:"text-[10px] ml-auto",style:{color:"var(--text-disabled)"},children:Y.source})]}),i.jsx("p",{className:"text-xs leading-relaxed",style:{color:"var(--text-primary)"},children:Y.content}),i.jsxs("div",{className:"flex items-center gap-3 mt-1.5",children:[i.jsx("span",{className:"text-[10px]",style:{color:"var(--text-disabled)"},children:new Date(Y.createdAt).toLocaleDateString([],{month:"short",day:"numeric",year:"numeric"})}),i.jsxs("span",{className:"text-[10px]",style:{color:"var(--text-disabled)"},children:["confidence ",Math.round(Y.confidence),"%"]})]})]}),i.jsx("button",{onClick:()=>I(Y.id),className:"opacity-0 group-hover:opacity-100 p-1.5 rounded transition-all",style:{color:"var(--status-error)"},title:"Remove memory",children:i.jsx(Vp,{size:12})})]})},Y.id))})})]})}function Li({icon:u,label:f,value:d,sub:r,trend:m}){return i.jsxs("div",{className:"rounded-lg p-4",style:{backgroundColor:"var(--bg-surface)",border:"1px solid var(--border-muted)"},children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(u,{size:13,style:{color:"var(--text-tertiary)"}}),i.jsx("span",{className:"text-[10px] uppercase tracking-wider font-ui",style:{color:"var(--text-tertiary)"},children:f})]}),i.jsx("div",{className:"text-2xl font-semibold tabular-nums font-code",style:{color:"var(--text-primary)"},children:d}),i.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[r&&i.jsx("span",{className:"text-[10px]",style:{color:"var(--text-disabled)"},children:r}),m&&i.jsxs("span",{className:"flex items-center gap-0.5 text-[10px]",style:{color:m.direction==="up"?"var(--status-success)":m.direction==="down"?"var(--status-error)":"var(--text-disabled)"},children:[m.direction==="up"?i.jsx(Mp,{size:9}):m.direction==="down"?i.jsx(Tp,{size:9}):null,m.label]})]})]})}function Gi({value:u,max:f,color:d}){const r=f>0?Math.min(u/f*100,100):0;return i.jsx("div",{className:"h-2 rounded-full flex-1",style:{backgroundColor:"var(--bg-inset)"},children:i.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${r}%`,backgroundColor:d}})})}function Yl({title:u,children:f,defaultOpen:d=!0}){const[r,m]=b.useState(d);return i.jsxs("div",{className:"rounded-lg overflow-hidden",style:{border:"1px solid var(--border-muted)"},children:[i.jsxs("button",{onClick:()=>m(!r),className:"flex items-center gap-2 w-full px-4 py-2.5 text-left",style:{backgroundColor:"var(--bg-surface)"},children:[r?i.jsx(Zi,{size:12,style:{color:"var(--text-disabled)"}}):i.jsx(xs,{size:12,style:{color:"var(--text-disabled)"}}),i.jsx("span",{className:"text-[10px] uppercase tracking-wider font-semibold font-ui",style:{color:"var(--text-tertiary)"},children:u})]}),r&&i.jsx("div",{style:{backgroundColor:"var(--bg-surface)"},children:f})]})}const Zv={pipeline:{icon:Lp,color:"var(--activity-pipeline)",label:"Pipeline"},fix:{icon:on,color:"var(--activity-fix)",label:"Fix"},review:{icon:Gl,color:"var(--activity-review)",label:"Review"},spike:{icon:Qt,color:"var(--activity-spike)",label:"Spike"},refactor:{icon:da,color:"var(--activity-refactor)",label:"Refactor"},simplify:{icon:rn,color:"var(--activity-simplify)",label:"Simplify"}},gr=["analyze","architect","plan","build","test"];function Vv({stats:u,historyEntries:f,state:d}){const r=u??Jv(f,d),m=Kv(f);return i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 shrink-0",style:{backgroundColor:"var(--bg-surface)",borderBottom:"1px solid var(--border-muted)"},children:[i.jsx(Tr,{size:14,style:{color:"var(--text-secondary)"}}),i.jsx("span",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:"Usage & Costs"}),i.jsxs("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:[f.length," activities tracked"]})]}),i.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[i.jsx(Li,{icon:fa,label:"Total Runs",value:String(r.totalRuns),sub:`${r.passed} passed · ${r.failed} failed`}),i.jsx(Li,{icon:Kp,label:"Success Rate",value:`${Math.round(r.successRate)}%`,trend:m.successTrend}),i.jsx(Li,{icon:Ki,label:"Total Cost",value:`$${r.totalCost.toFixed(2)}`,sub:`$${r.avgCostPerRun.toFixed(2)} avg/run`,trend:m.costTrend}),i.jsx(Li,{icon:ys,label:"Avg Duration",value:fs(r.avgDurationMs),sub:m.totalDuration})]}),i.jsx(Yl,{title:"Token Usage",children:i.jsx("div",{className:"grid grid-cols-4 gap-px",style:{borderTop:"1px solid var(--border-muted)"},children:[{label:"Input",value:m.tokens.input,color:"var(--accent)"},{label:"Output",value:m.tokens.output,color:"var(--activity-pipeline)"},{label:"Cache Read",value:m.tokens.cacheRead,color:"var(--status-success)"},{label:"Cache Write",value:m.tokens.cacheWrite,color:"var(--status-warning)"}].map(x=>i.jsxs("div",{className:"px-4 py-3 text-center",style:{borderRight:"1px solid var(--border-muted)"},children:[i.jsx("div",{className:"text-[10px] uppercase tracking-wider mb-1",style:{color:"var(--text-tertiary)"},children:x.label}),i.jsx("div",{className:"text-sm font-semibold tabular-nums font-code",style:{color:x.color},children:Wv(x.value)})]},x.label))})}),i.jsx(Yl,{title:"Activity Breakdown",children:i.jsxs("div",{style:{borderTop:"1px solid var(--border-muted)"},children:[m.activityBreakdown.map(x=>{var p;const N=Zv[x.type]||{icon:fa,color:"var(--text-secondary)",label:x.type},E=N.icon;return i.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5",style:{borderBottom:"1px solid var(--border-muted)"},children:[i.jsx(E,{size:12,style:{color:N.color},className:"shrink-0"}),i.jsx("span",{className:"text-xs font-medium w-20 shrink-0",style:{color:"var(--text-primary)"},children:N.label}),i.jsx(Gi,{value:x.count,max:((p=m.activityBreakdown[0])==null?void 0:p.count)??1,color:N.color}),i.jsxs("div",{className:"flex items-center gap-3 shrink-0 text-xs tabular-nums font-code",children:[i.jsxs("span",{style:{color:"var(--text-secondary)"},children:[x.count," runs"]}),i.jsxs("span",{style:{color:x.successRate>=80?"var(--status-success)":x.successRate>=50?"var(--status-warning)":"var(--status-error)"},children:[Math.round(x.successRate),"%"]}),i.jsxs("span",{style:{color:"var(--text-primary)"},children:["$",x.totalCost.toFixed(2)]}),i.jsx("span",{style:{color:"var(--text-tertiary)"},children:fs(x.avgDuration)})]})]},x.type)}),m.activityBreakdown.length===0&&i.jsx("div",{className:"px-4 py-6 text-center text-xs",style:{color:"var(--text-disabled)"},children:"No activities yet"})]})}),r.stageCosts.length>0&&i.jsx(Yl,{title:"Cost by Pipeline Stage",children:i.jsx("div",{style:{borderTop:"1px solid var(--border-muted)"},children:r.stageCosts.map(x=>i.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5",style:{borderBottom:"1px solid var(--border-muted)"},children:[i.jsx("span",{className:"text-xs capitalize w-20 shrink-0",style:{color:"var(--text-primary)"},children:x.stage}),i.jsx(Gi,{value:x.totalCost,max:r.stageCosts.reduce((N,E)=>Math.max(N,E.totalCost),0),color:"var(--accent)"}),i.jsxs("div",{className:"flex items-center gap-4 shrink-0 text-xs tabular-nums font-code",children:[i.jsxs("span",{style:{color:"var(--text-secondary)"},children:[x.count," runs"]}),i.jsxs("span",{style:{color:"var(--text-primary)"},children:["$",x.totalCost.toFixed(2)]}),i.jsxs("span",{style:{color:"var(--text-tertiary)"},children:["$",x.avgCost.toFixed(2),"/run"]}),i.jsx("span",{style:{color:"var(--text-tertiary)"},children:fs(x.avgDurationMs)})]})]},x.stage))})}),m.weeklyData.length>0&&i.jsx(Yl,{title:"Weekly Spend",children:i.jsx("div",{style:{borderTop:"1px solid var(--border-muted)"},children:m.weeklyData.map(x=>i.jsxs("div",{className:"flex items-center gap-3 px-4 py-2",style:{borderBottom:"1px solid var(--border-muted)"},children:[i.jsx("span",{className:"text-xs w-20 shrink-0 tabular-nums font-code",style:{color:"var(--text-secondary)"},children:x.week}),i.jsx(Gi,{value:x.cost,max:m.weeklyData.reduce((N,E)=>Math.max(N,E.cost),0),color:"var(--accent)"}),i.jsxs("div",{className:"flex items-center gap-3 shrink-0 text-xs tabular-nums font-code",children:[i.jsxs("span",{style:{color:"var(--text-primary)"},children:["$",x.cost.toFixed(2)]}),i.jsxs("span",{style:{color:"var(--text-tertiary)"},children:[x.runs," runs"]})]})]},x.week))})}),m.fixLoopStats.totalFixes>0&&i.jsx(Yl,{title:"Fix Loop Analysis",children:i.jsxs("div",{className:"grid grid-cols-3 gap-px",style:{borderTop:"1px solid var(--border-muted)"},children:[i.jsxs("div",{className:"px-4 py-3 text-center",style:{borderRight:"1px solid var(--border-muted)"},children:[i.jsx("div",{className:"text-[10px] uppercase tracking-wider mb-1",style:{color:"var(--text-tertiary)"},children:"Fix Runs"}),i.jsx("div",{className:"text-lg font-semibold tabular-nums font-code",style:{color:"var(--activity-fix)"},children:m.fixLoopStats.totalFixes})]}),i.jsxs("div",{className:"px-4 py-3 text-center",style:{borderRight:"1px solid var(--border-muted)"},children:[i.jsx("div",{className:"text-[10px] uppercase tracking-wider mb-1",style:{color:"var(--text-tertiary)"},children:"Avg Iterations"}),i.jsx("div",{className:"text-lg font-semibold tabular-nums font-code",style:{color:"var(--text-primary)"},children:m.fixLoopStats.avgIterations.toFixed(1)})]}),i.jsxs("div",{className:"px-4 py-3 text-center",children:[i.jsx("div",{className:"text-[10px] uppercase tracking-wider mb-1",style:{color:"var(--text-tertiary)"},children:"Fix Cost"}),i.jsxs("div",{className:"text-lg font-semibold tabular-nums font-code",style:{color:"var(--text-primary)"},children:["$",m.fixLoopStats.totalFixCost.toFixed(2)]})]})]})}),i.jsx(Yl,{title:"Recent Activity",defaultOpen:!1,children:i.jsxs("div",{style:{borderTop:"1px solid var(--border-muted)"},children:[i.jsxs("div",{className:"flex items-center gap-2 px-4 py-1.5 text-[10px] uppercase tracking-wider font-ui",style:{color:"var(--text-disabled)",borderBottom:"1px solid var(--border-muted)"},children:[i.jsx("span",{className:"w-6",children:"St"}),i.jsx("span",{className:"flex-1",children:"Activity"}),i.jsx("span",{className:"w-14 text-right",children:"Cost"}),i.jsx("span",{className:"w-14 text-right",children:"Duration"}),i.jsx("span",{className:"w-20 text-right",children:"Date"})]}),f.slice(0,20).map(x=>{var p;const N=x.activityStatus==="success",E=x.activityStatus==="error";return i.jsxs("div",{className:"flex items-center gap-2 px-4 py-1.5 text-xs",style:{borderBottom:"1px solid var(--border-muted)"},children:[i.jsx("span",{className:"w-6 shrink-0",children:N?i.jsx(cn,{size:11,style:{color:"var(--status-success)"}}):E?i.jsx(un,{size:11,style:{color:"var(--status-error)"}}):i.jsx(ys,{size:11,style:{color:"var(--text-disabled)"}})}),i.jsx("span",{className:"flex-1 truncate",style:{color:"var(--text-primary)"},children:x.summary||x.featureRequest||x.projectName}),i.jsxs("span",{className:"w-14 text-right tabular-nums font-code shrink-0",style:{color:"var(--text-secondary)"},children:["$",(((p=x.totalCost)==null?void 0:p.totalUsd)??0).toFixed(2)]}),i.jsx("span",{className:"w-14 text-right tabular-nums font-code shrink-0",style:{color:"var(--text-tertiary)"},children:fs(x.durationMs??0)}),i.jsx("span",{className:"w-20 text-right tabular-nums font-code shrink-0",style:{color:"var(--text-disabled)"},children:new Date(x.timestamp).toLocaleDateString([],{month:"short",day:"numeric"})})]},x.runId)}),f.length===0&&i.jsx("div",{className:"px-4 py-6 text-center text-xs",style:{color:"var(--text-disabled)"},children:"No activity history"})]})}),r.recommendations.length>0&&i.jsx(Yl,{title:"Recommendations",children:i.jsx("div",{className:"p-4 space-y-2",style:{borderTop:"1px solid var(--border-muted)"},children:r.recommendations.map((x,N)=>i.jsx("p",{className:"text-xs leading-relaxed",style:{color:"var(--text-secondary)"},children:x},N))})}),m.modelBreakdown.length>0&&i.jsx(Yl,{title:"Model Usage",defaultOpen:!1,children:i.jsx("div",{style:{borderTop:"1px solid var(--border-muted)"},children:m.modelBreakdown.map(x=>{var N;return i.jsxs("div",{className:"flex items-center gap-3 px-4 py-2",style:{borderBottom:"1px solid var(--border-muted)"},children:[i.jsx(_p,{size:11,style:{color:"var(--text-tertiary)"},className:"shrink-0"}),i.jsx("span",{className:"text-xs w-28 shrink-0 truncate",style:{color:"var(--text-primary)"},children:x.model}),i.jsx(Gi,{value:x.count,max:((N=m.modelBreakdown[0])==null?void 0:N.count)??1,color:"var(--activity-pipeline)"}),i.jsxs("div",{className:"flex items-center gap-3 shrink-0 text-xs tabular-nums font-code",children:[i.jsxs("span",{style:{color:"var(--text-secondary)"},children:[x.count," runs"]}),i.jsxs("span",{style:{color:"var(--text-primary)"},children:["$",x.totalCost.toFixed(2)]})]})]},x.model)})})})]})]})}function Kv(u){return b.useMemo(()=>{var Y,te,oe;const f={input:0,output:0,cacheRead:0,cacheWrite:0};for(const Z of u)Z.totalCost&&(f.input+=Z.totalCost.inputTokens??0,f.output+=Z.totalCost.outputTokens??0,f.cacheRead+=Z.totalCost.cacheReadTokens??0,f.cacheWrite+=Z.totalCost.cacheWriteTokens??0);const d=new Map;for(const Z of u){const L=Z.activityType||"pipeline",_=d.get(L)||{count:0,passed:0,cost:0,duration:0};_.count++,Z.activityStatus==="success"&&_.passed++,_.cost+=((Y=Z.totalCost)==null?void 0:Y.totalUsd)??0,_.duration+=Z.durationMs??0,d.set(L,_)}const r=Array.from(d.entries()).map(([Z,L])=>({type:Z,count:L.count,successRate:L.count>0?L.passed/L.count*100:0,totalCost:L.cost,avgDuration:L.count>0?L.duration/L.count:0})).sort((Z,L)=>L.count-Z.count),m=new Map;for(const Z of u){const L=new Date(Z.timestamp),_=new Date(L);_.setDate(L.getDate()-(L.getDay()+6)%7);const V=`${_.getMonth()+1}/${_.getDate()}`,ne=m.get(V)||{cost:0,runs:0};ne.cost+=((te=Z.totalCost)==null?void 0:te.totalUsd)??0,ne.runs++,m.set(V,ne)}const x=Array.from(m.entries()).map(([Z,L])=>({week:Z,...L})).slice(-8),N=u.filter(Z=>Z.activityType==="fix"||Z.fixIterations!=null&&Z.fixIterations>0),E=N.reduce((Z,L)=>Z+(L.fixIterations??1),0),p={totalFixes:N.length,avgIterations:N.length>0?E/N.length:0,totalFixCost:N.reduce((Z,L)=>{var _;return Z+(((_=L.totalCost)==null?void 0:_.totalUsd)??0)},0)},h=new Map;for(const Z of u){const L=Z.model||"unknown",_=h.get(L)||{count:0,cost:0};_.count++,_.cost+=((oe=Z.totalCost)==null?void 0:oe.totalUsd)??0,h.set(L,_)}const H=Array.from(h.entries()).map(([Z,L])=>({model:Z,count:L.count,totalCost:L.cost})).sort((Z,L)=>L.count-Z.count),j=[...u].sort((Z,L)=>L.timestamp-Z.timestamp),w=j.slice(0,5),O=j.slice(5,10);let k,Q;if(w.length>=3&&O.length>=3){const Z=w.filter(Ce=>Ce.activityStatus==="success").length/w.length,L=O.filter(Ce=>Ce.activityStatus==="success").length/O.length,_=Z-L;Math.abs(_)>.1&&(k={direction:_>0?"up":"down",label:`${Math.abs(Math.round(_*100))}% vs prev`});const V=w.reduce((Ce,De)=>{var qe;return Ce+(((qe=De.totalCost)==null?void 0:qe.totalUsd)??0)},0)/w.length,ne=O.reduce((Ce,De)=>{var qe;return Ce+(((qe=De.totalCost)==null?void 0:qe.totalUsd)??0)},0)/O.length,de=ne>0?(V-ne)/ne:0;Math.abs(de)>.1&&(Q={direction:de>0?"up":"down",label:`${Math.abs(Math.round(de*100))}% vs prev`})}const J=u.reduce((Z,L)=>Z+(L.durationMs??0),0),I=`Total: ${fs(J)}`;return{tokens:f,activityBreakdown:r,weeklyData:x,fixLoopStats:p,modelBreakdown:H,successTrend:k,costTrend:Q,totalDuration:I}},[u])}function Jv(u,f){var h;const d=u.length||(f?1:0),r=u.filter(H=>H.activityStatus==="success").length,m=u.filter(H=>H.activityStatus==="error").length+(f&&!u.length&&gr.some(H=>{var j;return((j=f.stages[H])==null?void 0:j.status)==="error"})?1:0);let x=u.reduce((H,j)=>{var w;return H+(((w=j.totalCost)==null?void 0:w.totalUsd)??0)},0);const N=u.reduce((H,j)=>H+(j.durationMs??0),0);x===0&&f&&(x=((h=f.totalCost)==null?void 0:h.totalUsd)>0?f.totalCost.totalUsd:f.agents.reduce((H,j)=>{var w;return H+(((w=j.cost)==null?void 0:w.totalUsd)??0)},0)||gr.reduce((H,j)=>{var w;return H+(((w=f.stages[j])==null?void 0:w.stageCost)??0)},0));const E=new Map;for(const H of u)if(H.stageBreakdowns)for(const j of H.stageBreakdowns){const w=E.get(j.name)||{totalCost:0,count:0,totalDuration:0};w.totalCost+=j.cost??0,w.count++,w.totalDuration+=j.durationMs??0,E.set(j.name,w)}if(E.size===0&&f)for(const H of gr){const j=f.stages[H];if(j!=null&&j.stageCost&&j.stageCost>0){const w=j.finishedAt&&j.startedAt?j.finishedAt-j.startedAt:0;E.set(H,{totalCost:j.stageCost,count:1,totalDuration:w})}}const p=Array.from(E.entries()).map(([H,j])=>({stage:H,totalCost:j.totalCost,avgCost:j.count>0?j.totalCost/j.count:0,avgDurationMs:j.count>0?j.totalDuration/j.count:0,count:j.count}));return{totalRuns:d,passed:r,failed:m,successRate:d>0?r/d*100:0,totalCost:x,avgCostPerRun:d>0?x/d:0,avgDurationMs:d>0?N/d:0,avgFixIterations:0,stageCosts:p,weeklySpend:[],recommendations:[]}}function fs(u){const f=Math.floor(u/1e3);if(f<60)return`${f}s`;const d=Math.floor(f/60);return d<60?`${d}m ${f%60}s`:`${Math.floor(d/60)}h ${d%60}m`}function Wv(u){return u>=1e6?`${(u/1e6).toFixed(1)}M`:u>=1e3?`${(u/1e3).toFixed(0)}K`:String(u)}const Km={APPROVE:{color:"var(--status-success)",bg:"var(--status-success-bg)",icon:cn},REQUEST_CHANGES:{color:"var(--status-error)",bg:"var(--status-error-bg)",icon:un},COMMENT:{color:"var(--status-warning)",bg:"var(--status-warning-bg)",icon:gs}};function Fv({prReviews:u,sendCommand:f}){const[d,r]=b.useState(""),[m,x]=b.useState(""),[N,E]=b.useState(!1);b.useEffect(()=>{f({action:"get-pr-reviews"})},[f]);const p=()=>{E(!0),f({action:"run-babysit-prs",label:d.trim()||void 0}),setTimeout(()=>E(!1),5e3)},h=()=>{const j=m.trim();j&&(f({action:"run-review",target:j}),x(""))},H=u.reduce((j,w)=>j+(w.cost||0),0);return i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 shrink-0",style:{backgroundColor:"var(--bg-surface)",borderBottom:"1px solid var(--border-muted)"},children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Gl,{size:14,style:{color:"var(--activity-review)"}}),i.jsx("span",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:"PR Reviews"}),u.length>0&&i.jsxs("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:[u.length," reviewed"]})]}),H>0&&i.jsxs("span",{className:"text-xs font-code tabular-nums",style:{color:"var(--text-secondary)"},children:["$",H.toFixed(2)," total"]})]}),i.jsxs("div",{className:"px-4 py-3 space-y-3",style:{borderBottom:"1px solid var(--border-muted)"},children:[i.jsxs("div",{children:[i.jsx("div",{className:"text-[10px] uppercase tracking-wider font-semibold mb-1.5",style:{color:"var(--text-tertiary)"},children:"Review a PR"}),i.jsxs("div",{className:"flex items-center gap-2 rounded-md px-3 py-2",style:{backgroundColor:"var(--bg-raised)",border:"1px solid var(--border-default)"},children:[i.jsx(Bp,{size:12,style:{color:"var(--text-disabled)"}}),i.jsx("input",{value:m,onChange:j=>x(j.target.value),onKeyDown:j=>{j.key==="Enter"&&h()},placeholder:"Paste PR link, number, or #123",className:"flex-1 bg-transparent text-xs focus:outline-none",style:{color:"var(--text-primary)"}}),i.jsxs("button",{onClick:h,disabled:!m.trim(),className:"flex items-center gap-1 px-2.5 py-1 rounded text-[11px] font-medium transition-all disabled:opacity-30",style:{backgroundColor:"var(--accent-emphasis)",color:"#fff"},children:[i.jsx(lx,{size:10}),"Review"]})]}),i.jsx("p",{className:"text-[10px] mt-1",style:{color:"var(--text-disabled)"},children:"Accepts: https://github.com/.../pull/123, PR number, or #123"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"flex-1 h-px",style:{backgroundColor:"var(--border-muted)"}}),i.jsx("span",{className:"text-[10px] uppercase tracking-wider",style:{color:"var(--text-disabled)"},children:"or"}),i.jsx("div",{className:"flex-1 h-px",style:{backgroundColor:"var(--border-muted)"}})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("input",{value:d,onChange:j=>r(j.target.value),placeholder:"Filter by label (optional)",className:"flex-1 bg-transparent text-xs focus:outline-none rounded-md px-3 py-1.5",style:{color:"var(--text-primary)",border:"1px solid var(--border-muted)"}}),i.jsxs("button",{onClick:p,disabled:N,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-colors disabled:opacity-40 whitespace-nowrap",style:{backgroundColor:"var(--bg-emphasis)",color:"var(--text-primary)",border:"1px solid var(--border-default)"},children:[N?i.jsx(da,{size:11,className:"animate-spin"}):i.jsx(tx,{size:11}),N?"Scanning...":"Review All Open PRs"]})]})]}),i.jsx("div",{className:"flex-1 overflow-y-auto",children:u.length===0?i.jsx("div",{className:"flex items-center justify-center h-full p-6",children:i.jsxs("div",{className:"text-center space-y-2 max-w-xs",children:[i.jsx(Gl,{size:28,className:"mx-auto opacity-15",style:{color:"var(--text-tertiary)"}}),i.jsx("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Previous reviews will appear here"})]})}):i.jsxs("div",{children:[i.jsx("div",{className:"px-4 py-1.5 text-[10px] uppercase tracking-wider font-semibold",style:{color:"var(--text-disabled)",borderBottom:"1px solid var(--border-muted)"},children:"Review History"}),u.map((j,w)=>{const O=Km[j.verdict]||Km.COMMENT,k=O.icon;return i.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5 transition-colors",style:{borderBottom:"1px solid var(--border-muted)"},onMouseEnter:Q=>Q.currentTarget.style.backgroundColor="var(--bg-subtle)",onMouseLeave:Q=>Q.currentTarget.style.backgroundColor="transparent",children:[i.jsxs("span",{className:"flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-medium shrink-0",style:{backgroundColor:O.bg,color:O.color},children:[i.jsx(k,{size:10}),j.verdict]}),i.jsxs("span",{className:"text-xs font-medium",style:{color:"var(--text-primary)"},children:["PR #",j.number]}),i.jsx("span",{className:"text-[10px] font-code",style:{color:"var(--text-disabled)"},children:j.sha.slice(0,7)}),i.jsx("div",{className:"flex-1"}),j.cost>0&&i.jsxs("span",{className:"text-[10px] font-code tabular-nums",style:{color:"var(--text-tertiary)"},children:["$",j.cost.toFixed(2)]}),i.jsx("span",{className:"text-[10px] font-code",style:{color:"var(--text-disabled)"},children:new Date(j.reviewedAt).toLocaleDateString([],{month:"short",day:"numeric"})})]},`${j.number}-${j.sha}-${w}`)})]})})]})}function $v({state:u,ws:f,selectedId:d}){var r;if(d==="tool:build"||d===null)return i.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:i.jsx(Lm,{sendCommand:f.sendCommand})});if(d==="tool:pr-reviews")return i.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:i.jsx(Fv,{prReviews:f.prReviews,sendCommand:f.sendCommand})});if(d==="tool:conventions")return i.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:i.jsx(Gv,{conventions:f.conventions,loading:f.conventionsLoading,sendCommand:f.sendCommand})});if(d==="tool:memory")return i.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:i.jsx(Qv,{memories:f.memories,sendCommand:f.sendCommand})});if(d==="tool:stats")return i.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:i.jsx(Vv,{stats:f.stats,historyEntries:f.historyEntries,state:u})});if(d==="mayday"||d==="pipeline")return i.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:i.jsx(Qm,{state:u,agentOutputs:f.agentOutputs,agentActivities:f.agentActivities,sendCommand:f.sendCommand,artifactContent:f.artifactContent})});if(d!=null&&d.startsWith("agent:")){const m=d.replace("agent:",""),x=u.agents.find(N=>N.id===m);if(x)return i.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:i.jsx(Zm,{agent:x,agentOutput:f.agentOutputs.get(m)||"",agentActivities:f.agentActivities.get(m)||[],sendCommand:f.sendCommand})})}if(d!=null&&d.startsWith("history:")){const m=d.replace("history:",""),x=f.historyEntries.find(N=>N.runId===m);if(x){if(x.activityType==="pipeline"&&x.agentIds&&x.agentIds.length>1)return i.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:i.jsx(Qm,{state:u,agentOutputs:f.agentOutputs,agentActivities:f.agentActivities,sendCommand:f.sendCommand,artifactContent:f.artifactContent})});const E=(r=x.agentIds)==null?void 0:r[0],p=E?u.agents.find(h=>h.id===E):void 0;return p?i.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:i.jsx(Zm,{agent:p,agentOutput:f.agentOutputs.get(p.id)||"",agentActivities:f.agentActivities.get(p.id)||[],sendCommand:f.sendCommand})}):i.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:i.jsx(Lv,{entry:x,agentOutputs:f.agentOutputs,agentActivities:f.agentActivities,sendCommand:f.sendCommand})})}}return i.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:i.jsx(Lm,{sendCommand:f.sendCommand})})}const Xi=[{id:"build",label:"Build Feature",hint:"Full pipeline: requirements → design → code → test",icon:hs,color:"var(--activity-pipeline)",action:"run-mayday",requiresPrompt:!0,placeholder:"Describe a feature to build..."},{id:"fix",label:"Fix Bug",hint:"Describe a bug and an agent will fix it",icon:on,color:"var(--activity-fix)",action:"run-fix",requiresPrompt:!0,placeholder:"Describe the bug..."},{id:"review",label:"Code Review",hint:"Review local diff or paste a PR link",icon:Gl,color:"var(--activity-review)",action:"run-review",requiresPrompt:!1,placeholder:"Paste a PR link to review, or leave empty for local diff"},{id:"spike",label:"Research",hint:"Investigate a question about the codebase",icon:Qt,color:"var(--activity-spike)",action:"run-spike",requiresPrompt:!0,placeholder:"What do you want to investigate?"},{id:"refactor",label:"Refactor",hint:"Restructure code without changing behavior",icon:da,color:"var(--activity-refactor)",action:"run-refactor",requiresPrompt:!0,placeholder:"What should be refactored?"},{id:"simplify",label:"Clean Up",hint:"Remove dead code and reduce complexity",icon:rn,color:"var(--activity-simplify)",action:"run-simplify",requiresPrompt:!1,placeholder:"Analyzes your codebase automatically"}];function Iv({sendCommand:u}){const[f,d]=b.useState(""),[r,m]=b.useState(!1),[x,N]=b.useState("run-mayday"),E=b.useRef(null);b.useEffect(()=>{E.current&&(E.current.style.height="auto",E.current.style.height=Math.min(E.current.scrollHeight,120)+"px")},[f]);const p=Xi.find(k=>k.action===x)||Xi[0],h=!p.requiresPrompt||f.trim().length>0,H=()=>{if(!h)return;const k=f.trim();u(x==="run-review"?{action:"run-review",target:k||void 0}:{action:x,prompt:k||void 0}),d(""),m(!1),N("run-mayday")},j=k=>{var J;const Q=Xi.find(I=>I.action===k);if(Q){if(!Q.requiresPrompt){const I=f.trim();u(k==="run-review"?{action:"run-review",target:I||void 0}:{action:k,prompt:I||void 0}),d(""),m(!1);return}N(k),(J=E.current)==null||J.focus()}},w=k=>{var Q;k.key==="Enter"&&!k.shiftKey&&(k.preventDefault(),H()),k.key==="Escape"&&(m(!1),(Q=E.current)==null||Q.blur())},O=p.icon;return i.jsx("div",{className:"shrink-0 px-4 py-2",style:{backgroundColor:"var(--bg-surface)",borderTop:"1px solid var(--border-muted)"},children:i.jsxs("div",{className:"rounded-lg overflow-hidden",style:{backgroundColor:"var(--bg-raised)",border:"1px solid var(--border-default)"},children:[i.jsxs("div",{className:"flex items-end gap-2 px-3 py-2",children:[i.jsx("textarea",{ref:E,value:f,onChange:k=>d(k.target.value),onKeyDown:w,onFocus:()=>m(!0),placeholder:p.placeholder,rows:1,className:"flex-1 bg-transparent text-sm resize-none focus:outline-none min-h-[24px]",style:{color:"var(--text-primary)"}}),i.jsxs("button",{onClick:H,disabled:!h,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold transition-all disabled:opacity-30 shrink-0",style:{backgroundColor:"var(--accent-emphasis)",color:"#fff"},children:[i.jsx(O,{size:12}),p.label]})]}),r&&i.jsx("div",{className:"flex items-center gap-1 px-3 py-1.5 overflow-x-auto",style:{borderTop:"1px solid var(--border-muted)"},children:Xi.map(k=>{const Q=k.icon,J=k.action===x;return i.jsxs("button",{onClick:()=>j(k.action),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[11px] font-medium transition-colors whitespace-nowrap",style:{color:J?k.color:"var(--text-tertiary)",backgroundColor:J?"var(--bg-emphasis)":"transparent",border:J?"1px solid var(--border-default)":"1px solid transparent"},title:k.hint,children:[i.jsx(Q,{size:11}),k.label]},k.id)})})]})})}const br=[{id:"conventions",label:"Coding Conventions",category:"navigate",keywords:["conventions","patterns","style","learn","rules"],icon:ds,feedId:"tool:conventions"},{id:"memory",label:"Project Memory",category:"navigate",keywords:["memory","remember","knowledge","context"],icon:ms,feedId:"tool:memory"},{id:"stats",label:"Usage & Costs",category:"navigate",keywords:["stats","cost","spending","money","budget","usage"],icon:Tr,feedId:"tool:stats"},{id:"build",label:"Build Feature",category:"action",keywords:["build","feature","new","start","create","implement","launch"],icon:hs,wsAction:"run-mayday",needsPrompt:!0},{id:"fix",label:"Fix Bug",category:"action",keywords:["fix","bug","error","repair","broken","issue"],icon:on,wsAction:"run-fix",needsPrompt:!0},{id:"spike",label:"Research",category:"action",keywords:["research","spike","investigate","explore","question","how","why"],icon:Qt,wsAction:"run-spike",needsPrompt:!0},{id:"review",label:"Code Review",category:"action",keywords:["review","pr","pull request","code review","diff","check"],icon:Gl,wsAction:"run-review"},{id:"refactor",label:"Refactor Code",category:"action",keywords:["refactor","clean","restructure","rewrite","improve"],icon:da,wsAction:"run-refactor",needsPrompt:!0},{id:"simplify",label:"Clean Up Code",category:"action",keywords:["simplify","cleanup","reduce","dead code","complexity"],icon:rn,wsAction:"run-simplify"},{id:"learn",label:"Scan Conventions",category:"action",keywords:["scan","learn","conventions","generate","analyze"],icon:ds,wsAction:"run-learn"}];function Pv({open:u,onClose:f,sendCommand:d}){const{select:r}=kr(),[m,x]=b.useState(""),[N,E]=b.useState(0),[p,h]=b.useState(null),[H,j]=b.useState(""),w=b.useRef(null),O=b.useRef(null),k=b.useRef(null),[Q,J]=b.useState(()=>{try{return JSON.parse(localStorage.getItem("swarm_recent_palette")||"[]")}catch{return[]}}),I=b.useCallback(_=>{J(V=>{const ne=[_,...V.filter(de=>de!==_)].slice(0,8);return localStorage.setItem("swarm_recent_palette",JSON.stringify(ne)),ne})},[]),Y=b.useMemo(()=>{if(!m.trim())return{recent:Q.map(de=>br.find(Ce=>Ce.id===de)).filter(Boolean),results:[]};const _=m.toLowerCase(),V=br.filter(ne=>ne.label.toLowerCase().includes(_)||ne.keywords.some(de=>de.includes(_))).slice(0,15);return{recent:[],results:V}},[m,Q]),te=[...Y.recent,...Y.results];b.useEffect(()=>{u&&(x(""),E(0),h(null),j(""),setTimeout(()=>{var _;return(_=w.current)==null?void 0:_.focus()},50))},[u]);const oe=b.useCallback(_=>{if(I(_.id),_.feedId){r(_.feedId),f();return}if(_.wsAction&&d){if(_.needsPrompt){h(_),setTimeout(()=>{var V;return(V=O.current)==null?void 0:V.focus()},50);return}d({action:_.wsAction}),f();return}f()},[I,r,f,d]),Z=b.useCallback(()=>{if(!p||!d)return;const _=H.trim();["run-mayday","run-fix","run-spike","run-refactor"].includes(p.wsAction||"")&&!_||(d({action:p.wsAction,prompt:_||void 0}),h(null),j(""),f())},[p,H,d,f]),L=b.useCallback(_=>{if(p){_.key==="Enter"?(_.preventDefault(),Z()):_.key==="Escape"&&(_.preventDefault(),h(null),setTimeout(()=>{var V;return(V=w.current)==null?void 0:V.focus()},50));return}switch(_.key){case"ArrowDown":_.preventDefault(),E(V=>Math.min(V+1,te.length-1));break;case"ArrowUp":_.preventDefault(),E(V=>Math.max(V-1,0));break;case"Enter":_.preventDefault(),te[N]&&oe(te[N]);break;case"Escape":f();break}},[te,N,f,oe,p,Z]);return b.useEffect(()=>{var V;const _=(V=k.current)==null?void 0:V.children[N];_==null||_.scrollIntoView({block:"nearest"})},[N]),u?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"fixed inset-0 z-50",style:{backgroundColor:"rgba(0,0,0,0.5)"},onClick:f}),i.jsx("div",{className:"fixed top-[15%] left-1/2 -translate-x-1/2 w-full max-w-lg z-50",children:i.jsx("div",{className:"rounded-xl shadow-2xl overflow-hidden",style:{backgroundColor:"var(--bg-raised)",border:"1px solid var(--border-default)"},children:p?i.jsxs("div",{className:"p-4 space-y-3",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(p.icon,{size:14,style:{color:"var(--accent)"}}),i.jsx("span",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:p.label})]}),i.jsx("input",{ref:O,type:"text",value:H,onChange:_=>j(_.target.value),onKeyDown:L,placeholder:p.id==="build"?"Describe what to build...":p.id==="fix"?"Describe the bug to fix...":p.id==="spike"?"What do you want to investigate?":p.id==="refactor"?"What to refactor...":"Enter prompt...",className:"w-full px-3 py-2 rounded-md text-sm bg-transparent focus:outline-none",style:{color:"var(--text-primary)",border:"1px solid var(--border-default)",backgroundColor:"var(--bg-overlay)"},autoComplete:"off"}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("button",{onClick:()=>{h(null),setTimeout(()=>{var _;return(_=w.current)==null?void 0:_.focus()},50)},className:"text-xs px-2 py-1 rounded",style:{color:"var(--text-tertiary)"},children:"Back"}),i.jsx("button",{onClick:Z,disabled:["build","fix","spike","refactor"].includes(p.id)&&!H.trim(),className:"flex items-center gap-1 px-3 py-1.5 rounded-md text-xs font-medium transition-all disabled:opacity-30",style:{backgroundColor:"var(--accent-emphasis)",color:"#fff"},children:"Run"})]})]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex items-center gap-2 px-4 py-3",style:{borderBottom:"1px solid var(--border-muted)"},children:[i.jsx(Qt,{size:16,style:{color:"var(--text-disabled)"}}),i.jsx("input",{ref:w,type:"text",value:m,onChange:_=>{x(_.target.value),E(0)},onKeyDown:L,placeholder:"Type a command...",className:"flex-1 bg-transparent text-sm focus:outline-none",style:{color:"var(--text-primary)"},autoComplete:"off"}),i.jsx("kbd",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{backgroundColor:"var(--bg-overlay)",color:"var(--text-disabled)"},children:"esc"})]}),i.jsxs("div",{ref:k,className:"max-h-80 overflow-y-auto py-1",children:[Y.recent.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"px-4 py-1 text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-disabled)"},children:"Recent"}),Y.recent.map((_,V)=>i.jsx(Sr,{item:_,selected:N===V,onSelect:()=>oe(_),onHover:()=>E(V)},`recent-${_.id}`))]}),Y.results.length>0&&i.jsxs(i.Fragment,{children:[Y.recent.length>0&&i.jsx("div",{className:"my-1",style:{borderTop:"1px solid var(--border-muted)"}}),i.jsx("div",{className:"px-4 py-1 text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-disabled)"},children:"Results"}),Y.results.map((_,V)=>{const ne=Y.recent.length+V;return i.jsx(Sr,{item:_,selected:N===ne,onSelect:()=>oe(_),onHover:()=>E(ne)},_.id)})]}),m&&Y.results.length===0&&i.jsxs("div",{className:"px-4 py-6 text-center text-xs",style:{color:"var(--text-disabled)"},children:['No results for "',m,'"']}),!m&&Y.recent.length===0&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"px-4 py-1 text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-disabled)"},children:"Commands"}),br.map((_,V)=>i.jsx(Sr,{item:_,selected:N===V,onSelect:()=>oe(_),onHover:()=>E(V)},_.id))]})]}),i.jsxs("div",{className:"flex items-center justify-between px-4 py-2 text-[10px]",style:{borderTop:"1px solid var(--border-muted)",color:"var(--text-disabled)"},children:[i.jsx("span",{children:"Navigate with arrow keys"}),i.jsx("span",{children:"Cmd+K to toggle"})]})]})})})]}):null}function Sr({item:u,selected:f,onSelect:d,onHover:r}){const m=u.icon;return i.jsxs("button",{onClick:d,onMouseEnter:r,className:"flex items-center gap-3 w-full px-4 py-2 text-left transition-colors",style:{backgroundColor:f?"var(--bg-emphasis)":"transparent",color:f?"var(--text-primary)":"var(--text-secondary)"},children:[i.jsx(m,{size:14,style:{color:"var(--text-disabled)"}}),i.jsx("span",{className:"text-xs flex-1",children:u.label}),i.jsx("span",{className:"text-[10px]",style:{color:"var(--text-disabled)"},children:u.category==="action"?"Run":"Go"})]})}function eh(u=!0){const f=b.useRef(null),d=b.useRef(null);return b.useEffect(()=>{if(!u)return;d.current=document.activeElement;const r=f.current;if(!r)return;const m=()=>{const E=["a[href]","button:not([disabled])","input:not([disabled])","textarea:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'];return Array.from(r.querySelectorAll(E.join(", ")))},x=m();if(x.length>0){const E=r.querySelector("[autofocus]");E?E.focus():x[0].focus()}const N=E=>{if(E.key!=="Tab")return;const p=m();if(p.length===0)return;const h=p[0],H=p[p.length-1];E.shiftKey?document.activeElement===h&&(E.preventDefault(),H.focus()):document.activeElement===H&&(E.preventDefault(),h.focus())};return r.addEventListener("keydown",N),()=>{r.removeEventListener("keydown",N),d.current&&typeof d.current.focus=="function"&&d.current.focus()}},[u]),f}function th({agent:u,onConfirm:f,onCancel:d}){const r=eh();return b.useEffect(()=>{const m=x=>{x.key==="Escape"&&(x.preventDefault(),d())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[d]),i.jsx("div",{className:"fixed inset-0 bg-black/80 flex items-center justify-center z-50",onClick:d,role:"dialog","aria-modal":"true","aria-label":"Stop Agent",children:i.jsxs("div",{ref:r,className:"bg-[#0e0c0b] rounded border border-stone-800/60 w-full max-w-sm font-mono mx-4",onClick:m=>m.stopPropagation(),children:[i.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-stone-800/50",children:[i.jsx("span",{className:"text-xs text-red-400 font-medium",children:"Stop Agent"}),i.jsx("button",{onClick:d,className:"text-stone-600 hover:text-stone-400 transition-colors",children:i.jsx(ps,{size:14})})]}),i.jsxs("div",{className:"p-4",children:[i.jsxs("p",{className:"text-xs text-stone-400 mb-1",children:["Stop ",i.jsx("span",{className:"text-stone-200 font-medium",children:u.name}),"?"]}),i.jsx("p",{className:"text-[10px] text-stone-500 mb-5",children:"Any in-progress work from this agent will be cancelled."}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{onClick:d,className:"flex-1 py-1.5 bg-stone-900/40 hover:bg-stone-800/40 border border-stone-800/50 rounded text-xs text-stone-400 transition-colors",children:"Cancel"}),i.jsx("button",{onClick:f,className:"flex-1 py-1.5 bg-red-950/40 hover:bg-red-900/40 border border-red-900/40 rounded text-xs text-red-400 font-medium transition-colors",children:"Stop Agent"})]})]})]})})}const lh=[5,10,25,50];function ah({spent:u,budget:f,sendCommand:d,onDismiss:r}){const[m,x]=b.useState(""),N=p=>{d({action:"increase-budget",amount:p}),r()},E=()=>{d({action:"decline-budget"}),r()};return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"fixed inset-0 z-50",style:{backgroundColor:"rgba(0,0,0,0.6)"}}),i.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:i.jsxs("div",{className:"w-full max-w-md rounded-xl shadow-2xl overflow-hidden",style:{backgroundColor:"var(--bg-raised)",border:"1px solid var(--border-default)"},children:[i.jsxs("div",{className:"flex items-center gap-3 px-5 py-4",style:{backgroundColor:"var(--status-warning-bg)",borderBottom:"1px solid var(--border-muted)"},children:[i.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center shrink-0",style:{backgroundColor:"var(--bg-overlay)"},children:i.jsx(gs,{size:16,style:{color:"var(--status-warning)"}})}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-sm font-semibold",style:{color:"var(--text-primary)"},children:"Budget Limit Reached"}),i.jsx("p",{className:"text-xs mt-0.5",style:{color:"var(--text-secondary)"},children:"Agents are paused. Increase the budget to continue."})]})]}),i.jsxs("div",{className:"px-5 py-4 space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Ki,{size:14,style:{color:"var(--text-tertiary)"}}),i.jsx("span",{className:"text-xs",style:{color:"var(--text-secondary)"},children:"Spent"})]}),i.jsxs("span",{className:"text-sm font-semibold font-code tabular-nums",style:{color:"var(--status-error)"},children:["$",u.toFixed(2)]})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-xs",style:{color:"var(--text-secondary)"},children:"Budget limit"}),i.jsxs("span",{className:"text-sm font-code tabular-nums",style:{color:"var(--text-primary)"},children:["$",f.toFixed(2)]})]}),i.jsx("div",{className:"h-2 rounded-full",style:{backgroundColor:"var(--bg-inset)"},children:i.jsx("div",{className:"h-full rounded-full",style:{width:"100%",backgroundColor:"var(--status-error)"}})}),i.jsxs("div",{children:[i.jsx("div",{className:"text-[10px] uppercase tracking-wider font-semibold mb-2",style:{color:"var(--text-tertiary)"},children:"Add to budget"}),i.jsx("div",{className:"grid grid-cols-4 gap-2",children:lh.map(p=>i.jsxs("button",{onClick:()=>N(p),className:"flex items-center justify-center gap-1 py-2 rounded-md text-xs font-medium transition-colors",style:{backgroundColor:"var(--bg-overlay)",color:"var(--text-primary)",border:"1px solid var(--border-default)"},onMouseEnter:h=>{h.currentTarget.style.backgroundColor="var(--accent-muted)",h.currentTarget.style.color="var(--accent)"},onMouseLeave:h=>{h.currentTarget.style.backgroundColor="var(--bg-overlay)",h.currentTarget.style.color="var(--text-primary)"},children:[i.jsx(Vi,{size:10}),"$",p]},p))})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-xs shrink-0",style:{color:"var(--text-tertiary)"},children:"Custom:"}),i.jsxs("div",{className:"flex items-center gap-1 flex-1",children:[i.jsx("span",{className:"text-xs",style:{color:"var(--text-disabled)"},children:"$"}),i.jsx("input",{type:"number",value:m,onChange:p=>x(p.target.value),onKeyDown:p=>{p.key==="Enter"&&m&&N(parseFloat(m))},placeholder:"0.00",min:"0.01",step:"0.01",className:"flex-1 bg-transparent text-xs font-code focus:outline-none",style:{color:"var(--text-primary)"}})]}),i.jsx("button",{onClick:()=>m&&N(parseFloat(m)),disabled:!m||parseFloat(m)<=0,className:"px-3 py-1 rounded text-xs font-medium transition-colors disabled:opacity-30",style:{backgroundColor:"var(--accent-emphasis)",color:"#fff"},children:"Add"})]})]}),i.jsxs("div",{className:"flex items-center justify-between px-5 py-3",style:{borderTop:"1px solid var(--border-muted)"},children:[i.jsxs("button",{onClick:E,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-colors",style:{backgroundColor:"var(--status-error-bg)",color:"var(--status-error)",border:"1px solid var(--border-muted)"},children:[i.jsx(ps,{size:10}),"Stop All Agents"]}),i.jsx("span",{className:"text-[10px]",style:{color:"var(--text-disabled)"},children:"Agents are paused, not stopped"})]})]})})]})}const Jm=window.__SWARM_WS_PORT__??(parseInt(new URLSearchParams(window.location.search).get("wsPort")||"",10)||(window.location.port?parseInt(window.location.port,10)-1:3847)),Wm=window.__SWARM_WS_TOKEN__,nh=Wm?`ws://${window.location.hostname}:${Jm}?token=${Wm}`:`ws://${window.location.hostname}:${Jm}`,Fm=2e3,sh=3e4;function ih(){const[u,f]=b.useState(null),[d,r]=b.useState(!1),[m,x]=b.useState([]),[N,E]=b.useState([]),[p,h]=b.useState([]),[H,j]=b.useState("default"),[w,O]=b.useState(null),[k,Q]=b.useState(!1),[J,I]=b.useState([]),[Y,te]=b.useState([]),[oe,Z]=b.useState([]),[L,_]=b.useState(null),[V,ne]=b.useState([]),[de,Ce]=b.useState(null),[De,qe]=b.useState(null),[se,ie]=b.useState(null),[M,G]=b.useState(null),[$,ge]=b.useState(null),[he,g]=b.useState(null),[C,q]=b.useState(null),[X,le]=b.useState(null),[ue,be]=b.useState(null),[$e,Ue]=b.useState(null),[Xl,ma]=b.useState(null),[fn,bs]=b.useState(null),[Zt,dn]=b.useState(null),[mn,Wi]=b.useState(null),[Ss,xn]=b.useState(null),[yn,pn]=b.useState(null),[Fi,$i]=b.useState(null),[nt,Ii]=b.useState(null),[js,Ns]=b.useState(null),[xa,Pi]=b.useState(null),[Cs,ec]=b.useState(null),[tc,Ql]=b.useState(null),[st,qt]=b.useState(null),[it,zs]=b.useState(null),[lc,As]=b.useState(null),[ya,pa]=b.useState(null),[va,Vt]=b.useState(null),[ha,Zl]=b.useState(null),xl=b.useRef(new Map),yl=b.useRef(new Map),ga=b.useRef(new Map),[,Dt]=b.useState(0),ba=b.useRef(null),Vl=b.useRef(Fm),Sa=b.useCallback(()=>{const Ke=new WebSocket(nh);ba.current=Ke,Ke.onopen=()=>{r(!0),Vl.current=Fm,Ke.send(JSON.stringify({action:"list-pipelines"})),Ke.send(JSON.stringify({action:"get-history"}))},Ke.onclose=()=>{r(!1),setTimeout(()=>{Vl.current=Math.min(Vl.current*1.5,sh),Sa()},Vl.current)},Ke.onerror=()=>{Ke.close()},Ke.onmessage=Kl=>{var _t,Ge,Ie,Kt;try{const K=JSON.parse(Kl.data);switch(K.type){case"state":f(K.payload),K.payload.violations&&K.payload.violations.length>0&&x(K.payload.violations);break;case"agent-update":if(!((_t=K.payload)!=null&&_t.id))break;f(Te=>{if(!Te)return Te;const Jt=Te.agents.map(xt=>xt.id===K.payload.id?K.payload:xt);return Jt.find(xt=>xt.id===K.payload.id)||Jt.push(K.payload),{...Te,agents:Jt}}),(K.payload.status==="done"||K.payload.status==="error")&&Ke.send(JSON.stringify({action:"get-history"}));break;case"agent-output":xl.current.set(K.payload.agentId,(xl.current.get(K.payload.agentId)||"")+K.payload.chunk),Dt(Te=>Te+1);break;case"agent-activity":{const Te=K.payload.agentId,xt=[...yl.current.get(Te)||[],K.payload].slice(-1e3);yl.current.set(Te,xt),Dt(Rt=>Rt+1);break}case"agent-logs":{const{agentId:Te,output:Jt,activities:xt}=K.payload;Jt&&(xl.current.get(Te)||xl.current.set(Te,Jt)),xt&&xt.length>0&&(yl.current.get(Te)||[]).length===0&&yl.current.set(Te,xt.slice(-1e3)),Dt(Rt=>Rt+1);break}case"guardrail-alert":x(Te=>[...Te,K.payload]);break;case"cost-update":f(Te=>Te&&{...Te,totalCost:K.payload});break;case"history-list":E(K.payload);break;case"agent-log":(Ge=K.payload)!=null&&Ge.agentId&&((Ie=K.payload)!=null&&Ie.log)&&(xl.current.set(K.payload.agentId,K.payload.log),Dt(Te=>Te+1));break;case"artifact-content":K.payload.content&&(ga.current.set(K.payload.stage,K.payload.content),Dt(Te=>Te+1));break;case"pipeline-list":h(K.payload.pipelines),j(K.payload.active);break;case"conventions":O(K.payload.content),Q(K.payload.loading);break;case"memories":I(K.payload.entries);break;case"pr-reviews":te(K.payload.reviews);break;case"watch-result":Z(Te=>[...Te,K.payload]);break;case"deploy-result":_(K.payload);break;case"bus-messages":ne(K.payload.messages);break;case"stats":Ce(K.payload);break;case"autopilot-state":qe(K.payload);break;case"health-report":ie(K.payload);break;case"inbox-state":G(K.payload);break;case"standup-report":ge(K.payload);break;case"journal-data":g(K.payload);break;case"scope-analysis":q(K.payload);break;case"context-index":le(K.payload);break;case"pair-session":be(K.payload);break;case"delegate-state":Ue(K.payload);break;case"report-data":ma(K.payload);break;case"team-activity":bs(K.payload);break;case"retro-report":dn(K.payload);break;case"surfaces-state":Wi(K.payload);break;case"arch-review":xn(K.payload);break;case"onboard-data":pn(K.payload);break;case"roadmap-data":$i(K.payload);break;case"system-graph":Ii(K.payload);break;case"slo-data":Ns(K.payload);break;case"debt-data":Pi(K.payload);break;case"forecast-data":ec(K.payload);break;case"compliance-data":Ql(K.payload);break;case"plugin-registry":qt(K.payload);break;case"budget-exceeded":zs(K.payload);break;case"model-config":pa(K.payload);break;case"models-list":Vt(K.payload);break;case"providers-list":Zl(K.payload);break;case"error":As({message:((Kt=K.payload)==null?void 0:Kt.message)||"An unknown error occurred",timestamp:Date.now()});break}}catch{}}},[]);b.useEffect(()=>(Sa(),()=>{var Ke;(Ke=ba.current)==null||Ke.close()}),[Sa]);const pl=b.useCallback(Ke=>{var Kl;((Kl=ba.current)==null?void 0:Kl.readyState)===WebSocket.OPEN&&ba.current.send(JSON.stringify(Ke))},[]),vn=b.useCallback(Ke=>{pl({action:"switch-pipeline",namespace:Ke})},[pl]),hn=b.useCallback(()=>{pl({action:"list-pipelines"})},[pl]);return{state:u,connected:d,agentOutputs:xl.current,agentActivities:yl.current,violations:m,historyEntries:N,artifactContent:ga.current,pipelines:p,activePipeline:H,conventions:w,conventionsLoading:k,memories:J,prReviews:Y,watchResults:oe,deployResult:L,busMessages:V,stats:de,autopilotState:De,healthReport:se,inboxState:M,standupReport:$,journalData:he,scopeAnalysis:C,contextIndex:X,pairSession:ue,delegateState:$e,reportData:Xl,teamActivity:fn,retroReport:Zt,surfacesState:mn,archReview:Ss,onboardData:yn,roadmapData:Fi,systemGraph:nt,sloData:js,debtData:xa,forecastData:Cs,complianceData:tc,pluginRegistry:st,budgetExceeded:it,clearBudgetExceeded:b.useCallback(()=>zs(null),[]),lastError:lc,clearLastError:b.useCallback(()=>As(null),[]),modelConfig:ya,availableModels:va,providerStatus:ha,sendCommand:pl,switchPipeline:vn,listPipelines:hn}}const nx=b.createContext(null);function ch({children:u}){const f=ih();return i.jsx(nx.Provider,{value:f,children:u})}function uh(){const u=b.useContext(nx);if(!u)throw new Error("useWs must be used within WebSocketProvider");return u}const rh=b.createContext(null);function oh({children:u}){const[f,d]=b.useState([]),[r,m]=b.useState(()=>{try{const j=sessionStorage.getItem("swarm_recent_actions");return j?JSON.parse(j):[]}catch{return[]}}),x=b.useCallback(j=>{const w={...j,startedAt:Date.now()};d(O=>[...O,w])},[]),N=b.useCallback((j,w)=>{d(O=>O.map(k=>k.id===j?{...k,state:{...k.state,...w}}:k))},[]),E=b.useCallback((j,w)=>{d(O=>{const k=O.find(Q=>Q.id===j);if(k){const Q={...k,state:{...k.state,status:"success",result:w}};m(J=>{const I=[Q,...J].slice(0,20);try{sessionStorage.setItem("swarm_recent_actions",JSON.stringify(I))}catch{}return I})}return O.filter(Q=>Q.id!==j)})},[]),p=b.useCallback((j,w)=>{d(O=>{const k=O.find(Q=>Q.id===j);if(k){const Q={...k,state:{...k.state,status:"error",error:w}};m(J=>{const I=[Q,...J].slice(0,20);try{sessionStorage.setItem("swarm_recent_actions",JSON.stringify(I))}catch{}return I})}return O.filter(Q=>Q.id!==j)})},[]),h=b.useCallback(j=>{d(w=>w.filter(O=>O.id!==j))},[]),H=f.filter(j=>j.state.status==="running"||j.state.status==="pending").length;return i.jsx(rh.Provider,{value:{activeActions:f,recentActions:r,registerAction:x,updateAction:N,completeAction:E,failAction:p,removeAction:h,runningCount:H},children:u})}let fh=0;const dh={"run-mayday":"Building feature","run-fix":"Fixing bug","run-review":"Starting code review","run-spike":"Researching","run-refactor":"Refactoring code","run-simplify":"Cleaning up code","run-learn":"Scanning conventions","run-babysit-prs":"Reviewing open PRs"};function mh(){var oe,Z;const u=uh(),{connected:f,state:d,sendCommand:r}=u,{selectedId:m,select:x,selectNext:N,selectPrev:E}=kr(),[p,h]=b.useState(!1),[H,j]=b.useState([]),[w,O]=b.useState(null),k=b.useRef(f),Q=b.useRef(void 0),J=b.useCallback((L,_="info")=>{const V=++fh;j(de=>[...de.slice(-4),{id:V,message:L,type:_,timestamp:Date.now()}]),setTimeout(()=>j(de=>de.filter(Ce=>Ce.id!==V)),_==="error"?6e3:4e3)},[]),I=b.useCallback(L=>{r(L);const _=dh[L.action];_&&J(`${_}...`,"info")},[r,J]);b.useEffect(()=>{k.current&&!f?J("Connection lost — reconnecting...","warning"):!k.current&&f&&J("Connected","success"),k.current=f},[f,J]),b.useEffect(()=>{u.lastError&&(J(u.lastError.message,"error"),u.clearLastError())},[u.lastError,J,u.clearLastError]),b.useEffect(()=>{var V;const L=(V=d==null?void 0:d.mayday)==null?void 0:V.currentStage,_=Q.current;_&&_!==L&&(L==="complete"?(J("Build complete!","success"),"Notification"in window&&Notification.permission==="granted"&&!document.hasFocus()&&new Notification("Hivemind",{body:"Build complete!"})):L==="fix-loop"&&J("Starting fix iteration...","info")),Q.current=L},[(oe=d==null?void 0:d.mayday)==null?void 0:oe.currentStage,J]);const Y=b.useRef(new Set);b.useEffect(()=>{var V,ne;if(!d)return;const L=new Set(d.agents.filter(de=>de.status==="running").map(de=>de.id)),_=Y.current;for(const de of L)if(!_.has(de)){(V=d.mayday)!=null&&V.active?x("mayday"):x(`agent:${de}`);break}(ne=d.mayday)!=null&&ne.active&&_.size===0&&L.size>0&&x("mayday"),Y.current=L},[d,x]);const te=b.useRef(new Map);return b.useEffect(()=>{if(d)for(const L of d.agents){if(te.current.get(L.id)==="running"&&(L.status==="done"||L.status==="error")){const V=L.status==="done"?"success":"error";J(`${L.name} ${L.status==="done"?"completed":"failed"}`,V),"Notification"in window&&Notification.permission==="granted"&&!document.hasFocus()&&new Notification("Hivemind",{body:`${L.name} ${L.status==="done"?"completed":"failed"}`})}te.current.set(L.id,L.status)}},[d,J]),b.useEffect(()=>{"Notification"in window&&Notification.permission==="default"&&Notification.requestPermission()},[]),b.useEffect(()=>{document.title=d!=null&&d.projectName?`Hivemind — ${d.projectName}`:"Hivemind"},[d==null?void 0:d.projectName]),b.useEffect(()=>{const L=_=>{var ne;const V=(ne=_.target)==null?void 0:ne.tagName;if(!(V==="INPUT"||V==="TEXTAREA"||V==="SELECT")){if((_.metaKey||_.ctrlKey)&&_.key==="k"){_.preventDefault(),h(de=>!de);return}_.key==="ArrowDown"||_.key==="j"?(_.preventDefault(),N()):(_.key==="ArrowUp"||_.key==="k")&&(_.preventDefault(),E())}};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[N,E]),i.jsxs("div",{className:"h-screen flex flex-col font-ui",style:{backgroundColor:"var(--bg-base)"},children:[i.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:top-2 focus:left-2 focus:z-50 focus:px-3 focus:py-1.5 focus:bg-blue-600 focus:text-white focus:rounded-md focus:text-xs",children:"Skip to content"}),i.jsx(Fp,{projectName:d==null?void 0:d.projectName,totalCost:(Z=d==null?void 0:d.totalCost)==null?void 0:Z.totalUsd,connected:f,onOpenPalette:()=>h(!0)}),!f&&i.jsx("div",{className:"px-4 py-1.5 text-center text-xs",style:{backgroundColor:"var(--status-warning-bg)",borderBottom:"1px solid var(--border-muted)",color:"var(--status-warning)"},children:"Reconnecting to server..."}),i.jsx("div",{id:"main-content",className:"flex-1 flex min-h-0",children:d?i.jsxs(i.Fragment,{children:[i.jsx(sv,{state:d,historyEntries:u.historyEntries,agentOutputs:u.agentOutputs,onKillAgent:O}),i.jsx($v,{state:d,ws:u,selectedId:m})]}):i.jsx("div",{className:"flex-1 flex items-center justify-center",children:i.jsxs("div",{className:"text-center",style:{color:"var(--text-tertiary)"},children:[i.jsx("div",{className:"w-8 h-8 border-2 rounded-full animate-spin mx-auto mb-3",style:{borderColor:"var(--border-default)",borderTopColor:"var(--text-secondary)"}}),i.jsx("p",{className:"text-sm",children:"Connecting..."})]})})}),d&&i.jsx(Iv,{sendCommand:I,state:d}),H.length>0&&i.jsx("div",{className:"fixed bottom-16 right-4 space-y-2 z-50","aria-live":"assertive",children:H.map(L=>i.jsx("div",{role:"alert",className:"px-4 py-2 rounded-lg text-xs font-medium shadow-lg animate-fade-in",style:{backgroundColor:L.type==="success"?"var(--status-success-bg)":L.type==="error"?"var(--status-error-bg)":L.type==="warning"?"var(--status-warning-bg)":"var(--bg-raised)",color:L.type==="success"?"var(--status-success)":L.type==="error"?"var(--status-error)":L.type==="warning"?"var(--status-warning)":"var(--text-primary)",border:"1px solid var(--border-muted)"},children:L.message},L.id))}),i.jsx(Pv,{open:p,onClose:()=>h(!1),sendCommand:I}),w&&i.jsx(th,{agent:w,onConfirm:()=>{I({action:"kill",agentId:w.id}),O(null)},onCancel:()=>O(null)}),u.budgetExceeded&&i.jsx(ah,{spent:u.budgetExceeded.spent,budget:u.budgetExceeded.budget,message:u.budgetExceeded.message,sendCommand:I,onDismiss:()=>u.clearBudgetExceeded()})]})}function xh(){return i.jsx(ch,{children:i.jsx(oh,{children:i.jsx(mh,{})})})}class yh extends b.Component{constructor(f){super(f),this.state={hasError:!1,error:null}}static getDerivedStateFromError(f){return{hasError:!0,error:f}}componentDidCatch(f,d){console.error("[ErrorBoundary]",f,d.componentStack)}render(){var f;return this.state.hasError?i.jsx("div",{className:"h-screen flex items-center justify-center bg-[#0c0a09] text-stone-300",children:i.jsxs("div",{className:"text-center max-w-md px-6",children:[i.jsx("div",{className:"text-4xl mb-4 opacity-30",children:"!"}),i.jsx("h2",{className:"text-sm font-semibold mb-2",children:"Something went wrong"}),i.jsx("p",{className:"text-xs text-stone-500 mb-4",children:((f=this.state.error)==null?void 0:f.message)||"An unexpected error occurred"}),i.jsx("button",{onClick:()=>{this.setState({hasError:!1,error:null}),window.location.reload()},className:"px-4 py-2 text-xs font-medium bg-stone-800 hover:bg-stone-700 border border-stone-700 rounded-md transition-colors",children:"Reload"})]})}):this.props.children}}Np.createRoot(document.getElementById("root")).render(i.jsx(b.StrictMode,{children:i.jsx(yh,{children:i.jsx(xh,{})})}));
|