specweave 1.0.270 → 1.0.271
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +27 -25
- package/dist/dashboard/assets/{index-Cs4qs_Lj.css → index-DNnisM2Y.css} +1 -1
- package/dist/dashboard/assets/index-ldLuSpfZ.js +11 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/src/dashboard/server/dashboard-server.js +1 -1
- package/dist/src/dashboard/server/dashboard-server.js.map +1 -1
- package/dist/src/dashboard/server/data/claude-log-parser.d.ts +8 -0
- package/dist/src/dashboard/server/data/claude-log-parser.d.ts.map +1 -1
- package/dist/src/dashboard/server/data/claude-log-parser.js +36 -6
- package/dist/src/dashboard/server/data/claude-log-parser.js.map +1 -1
- package/dist/src/dashboard/server/data/cost-aggregator.d.ts.map +1 -1
- package/dist/src/dashboard/server/data/cost-aggregator.js +16 -12
- package/dist/src/dashboard/server/data/cost-aggregator.js.map +1 -1
- package/package.json +3 -1
- package/src/templates/AGENTS.md.template +12 -0
- package/src/templates/CLAUDE.md.template +2 -0
- package/dist/dashboard/assets/index-BfGjfPqR.js +0 -11
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
(function(){const f=document.createElement("link").relList;if(f&&f.supports&&f.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const x of d)if(x.type==="childList")for(const g of x.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&c(g)}).observe(document,{childList:!0,subtree:!0});function u(d){const x={};return d.integrity&&(x.integrity=d.integrity),d.referrerPolicy&&(x.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?x.credentials="include":d.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function c(d){if(d.ep)return;d.ep=!0;const x=u(d);fetch(d.href,x)}})();var Qc={exports:{}},Qn={};var y0;function qh(){if(y0)return Qn;y0=1;var r=Symbol.for("react.transitional.element"),f=Symbol.for("react.fragment");function u(c,d,x){var g=null;if(x!==void 0&&(g=""+x),d.key!==void 0&&(g=""+d.key),"key"in d){x={};for(var j in d)j!=="key"&&(x[j]=d[j])}else x=d;return d=x.ref,{$$typeof:r,type:c,key:g,ref:d!==void 0?d:null,props:x}}return Qn.Fragment=f,Qn.jsx=u,Qn.jsxs=u,Qn}var p0;function Yh(){return p0||(p0=1,Qc.exports=qh()),Qc.exports}var n=Yh(),Vc={exports:{}},re={};var v0;function Gh(){if(v0)return re;v0=1;var r=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),g=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),C=Symbol.iterator;function L(E){return E===null||typeof E!="object"?null:(E=C&&E[C]||E["@@iterator"],typeof E=="function"?E:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X=Object.assign,w={};function G(E,Y,$){this.props=E,this.context=Y,this.refs=w,this.updater=$||D}G.prototype.isReactComponent={},G.prototype.setState=function(E,Y){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,Y,"setState")},G.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function M(){}M.prototype=G.prototype;function Q(E,Y,$){this.props=E,this.context=Y,this.refs=w,this.updater=$||D}var se=Q.prototype=new M;se.constructor=Q,X(se,G.prototype),se.isPureReactComponent=!0;var te=Array.isArray;function K(){}var Z={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function B(E,Y,$){var W=$.ref;return{$$typeof:r,type:E,key:Y,ref:W!==void 0?W:null,props:$}}function I(E,Y){return B(E.type,Y,E.props)}function ae(E){return typeof E=="object"&&E!==null&&E.$$typeof===r}function De(E){var Y={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function($){return Y[$]})}var dt=/\/+/g;function Ze(E,Y){return typeof E=="object"&&E!==null&&E.key!=null?De(""+E.key):Y.toString(36)}function Je(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(K,K):(E.status="pending",E.then(function(Y){E.status==="pending"&&(E.status="fulfilled",E.value=Y)},function(Y){E.status==="pending"&&(E.status="rejected",E.reason=Y)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function O(E,Y,$,W,ie){var fe=typeof E;(fe==="undefined"||fe==="boolean")&&(E=null);var F=!1;if(E===null)F=!0;else switch(fe){case"bigint":case"string":case"number":F=!0;break;case"object":switch(E.$$typeof){case r:case f:F=!0;break;case p:return F=E._init,O(F(E._payload),Y,$,W,ie)}}if(F)return ie=ie(E),F=W===""?"."+Ze(E,0):W,te(ie)?($="",F!=null&&($=F.replace(dt,"$&/")+"/"),O(ie,Y,$,"",function(Jl){return Jl})):ie!=null&&(ae(ie)&&(ie=I(ie,$+(ie.key==null||E&&E.key===ie.key?"":(""+ie.key).replace(dt,"$&/")+"/")+F)),Y.push(ie)),1;F=0;var Ve=W===""?".":W+":";if(te(E))for(var He=0;He<E.length;He++)W=E[He],fe=Ve+Ze(W,He),F+=O(W,Y,$,fe,ie);else if(He=L(E),typeof He=="function")for(E=He.call(E),He=0;!(W=E.next()).done;)W=W.value,fe=Ve+Ze(W,He++),F+=O(W,Y,$,fe,ie);else if(fe==="object"){if(typeof E.then=="function")return O(Je(E),Y,$,W,ie);throw Y=String(E),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return F}function V(E,Y,$){if(E==null)return E;var W=[],ie=0;return O(E,W,"","",function(fe){return Y.call($,fe,ie++)}),W}function ne(E){if(E._status===-1){var Y=E._result;Y=Y(),Y.then(function($){(E._status===0||E._status===-1)&&(E._status=1,E._result=$)},function($){(E._status===0||E._status===-1)&&(E._status=2,E._result=$)}),E._status===-1&&(E._status=0,E._result=Y)}if(E._status===1)return E._result.default;throw E._result}var je=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=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(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},Ne={map:V,forEach:function(E,Y,$){V(E,function(){Y.apply(this,arguments)},$)},count:function(E){var Y=0;return V(E,function(){Y++}),Y},toArray:function(E){return V(E,function(Y){return Y})||[]},only:function(E){if(!ae(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return re.Activity=y,re.Children=Ne,re.Component=G,re.Fragment=u,re.Profiler=d,re.PureComponent=Q,re.StrictMode=c,re.Suspense=v,re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,re.__COMPILER_RUNTIME={__proto__:null,c:function(E){return Z.H.useMemoCache(E)}},re.cache=function(E){return function(){return E.apply(null,arguments)}},re.cacheSignal=function(){return null},re.cloneElement=function(E,Y,$){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var W=X({},E.props),ie=E.key;if(Y!=null)for(fe in Y.key!==void 0&&(ie=""+Y.key),Y)!k.call(Y,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&Y.ref===void 0||(W[fe]=Y[fe]);var fe=arguments.length-2;if(fe===1)W.children=$;else if(1<fe){for(var F=Array(fe),Ve=0;Ve<fe;Ve++)F[Ve]=arguments[Ve+2];W.children=F}return B(E.type,ie,W)},re.createContext=function(E){return E={$$typeof:g,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:x,_context:E},E},re.createElement=function(E,Y,$){var W,ie={},fe=null;if(Y!=null)for(W in Y.key!==void 0&&(fe=""+Y.key),Y)k.call(Y,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ie[W]=Y[W]);var F=arguments.length-2;if(F===1)ie.children=$;else if(1<F){for(var Ve=Array(F),He=0;He<F;He++)Ve[He]=arguments[He+2];ie.children=Ve}if(E&&E.defaultProps)for(W in F=E.defaultProps,F)ie[W]===void 0&&(ie[W]=F[W]);return B(E,fe,ie)},re.createRef=function(){return{current:null}},re.forwardRef=function(E){return{$$typeof:j,render:E}},re.isValidElement=ae,re.lazy=function(E){return{$$typeof:p,_payload:{_status:-1,_result:E},_init:ne}},re.memo=function(E,Y){return{$$typeof:m,type:E,compare:Y===void 0?null:Y}},re.startTransition=function(E){var Y=Z.T,$={};Z.T=$;try{var W=E(),ie=Z.S;ie!==null&&ie($,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(K,je)}catch(fe){je(fe)}finally{Y!==null&&$.types!==null&&(Y.types=$.types),Z.T=Y}},re.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},re.use=function(E){return Z.H.use(E)},re.useActionState=function(E,Y,$){return Z.H.useActionState(E,Y,$)},re.useCallback=function(E,Y){return Z.H.useCallback(E,Y)},re.useContext=function(E){return Z.H.useContext(E)},re.useDebugValue=function(){},re.useDeferredValue=function(E,Y){return Z.H.useDeferredValue(E,Y)},re.useEffect=function(E,Y){return Z.H.useEffect(E,Y)},re.useEffectEvent=function(E){return Z.H.useEffectEvent(E)},re.useId=function(){return Z.H.useId()},re.useImperativeHandle=function(E,Y,$){return Z.H.useImperativeHandle(E,Y,$)},re.useInsertionEffect=function(E,Y){return Z.H.useInsertionEffect(E,Y)},re.useLayoutEffect=function(E,Y){return Z.H.useLayoutEffect(E,Y)},re.useMemo=function(E,Y){return Z.H.useMemo(E,Y)},re.useOptimistic=function(E,Y){return Z.H.useOptimistic(E,Y)},re.useReducer=function(E,Y,$){return Z.H.useReducer(E,Y,$)},re.useRef=function(E){return Z.H.useRef(E)},re.useState=function(E){return Z.H.useState(E)},re.useSyncExternalStore=function(E,Y,$){return Z.H.useSyncExternalStore(E,Y,$)},re.useTransition=function(){return Z.H.useTransition()},re.version="19.2.4",re}var b0;function lu(){return b0||(b0=1,Vc.exports=Gh()),Vc.exports}var N=lu(),$c={exports:{}},Vn={},Zc={exports:{}},kc={};var j0;function Xh(){return j0||(j0=1,(function(r){function f(O,V){var ne=O.length;O.push(V);e:for(;0<ne;){var je=ne-1>>>1,Ne=O[je];if(0<d(Ne,V))O[je]=V,O[ne]=Ne,ne=je;else break e}}function u(O){return O.length===0?null:O[0]}function c(O){if(O.length===0)return null;var V=O[0],ne=O.pop();if(ne!==V){O[0]=ne;e:for(var je=0,Ne=O.length,E=Ne>>>1;je<E;){var Y=2*(je+1)-1,$=O[Y],W=Y+1,ie=O[W];if(0>d($,ne))W<Ne&&0>d(ie,$)?(O[je]=ie,O[W]=ne,je=W):(O[je]=$,O[Y]=ne,je=Y);else if(W<Ne&&0>d(ie,ne))O[je]=ie,O[W]=ne,je=W;else break e}}return V}function d(O,V){var ne=O.sortIndex-V.sortIndex;return ne!==0?ne:O.id-V.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var x=performance;r.unstable_now=function(){return x.now()}}else{var g=Date,j=g.now();r.unstable_now=function(){return g.now()-j}}var v=[],m=[],p=1,y=null,C=3,L=!1,D=!1,X=!1,w=!1,G=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function se(O){for(var V=u(m);V!==null;){if(V.callback===null)c(m);else if(V.startTime<=O)c(m),V.sortIndex=V.expirationTime,f(v,V);else break;V=u(m)}}function te(O){if(X=!1,se(O),!D)if(u(v)!==null)D=!0,K||(K=!0,De());else{var V=u(m);V!==null&&Je(te,V.startTime-O)}}var K=!1,Z=-1,k=5,B=-1;function I(){return w?!0:!(r.unstable_now()-B<k)}function ae(){if(w=!1,K){var O=r.unstable_now();B=O;var V=!0;try{e:{D=!1,X&&(X=!1,M(Z),Z=-1),L=!0;var ne=C;try{t:{for(se(O),y=u(v);y!==null&&!(y.expirationTime>O&&I());){var je=y.callback;if(typeof je=="function"){y.callback=null,C=y.priorityLevel;var Ne=je(y.expirationTime<=O);if(O=r.unstable_now(),typeof Ne=="function"){y.callback=Ne,se(O),V=!0;break t}y===u(v)&&c(v),se(O)}else c(v);y=u(v)}if(y!==null)V=!0;else{var E=u(m);E!==null&&Je(te,E.startTime-O),V=!1}}break e}finally{y=null,C=ne,L=!1}V=void 0}}finally{V?De():K=!1}}}var De;if(typeof Q=="function")De=function(){Q(ae)};else if(typeof MessageChannel<"u"){var dt=new MessageChannel,Ze=dt.port2;dt.port1.onmessage=ae,De=function(){Ze.postMessage(null)}}else De=function(){G(ae,0)};function Je(O,V){Z=G(function(){O(r.unstable_now())},V)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(O){O.callback=null},r.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<O?Math.floor(1e3/O):5},r.unstable_getCurrentPriorityLevel=function(){return C},r.unstable_next=function(O){switch(C){case 1:case 2:case 3:var V=3;break;default:V=C}var ne=C;C=V;try{return O()}finally{C=ne}},r.unstable_requestPaint=function(){w=!0},r.unstable_runWithPriority=function(O,V){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var ne=C;C=O;try{return V()}finally{C=ne}},r.unstable_scheduleCallback=function(O,V,ne){var je=r.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?je+ne:je):ne=je,O){case 1:var Ne=-1;break;case 2:Ne=250;break;case 5:Ne=1073741823;break;case 4:Ne=1e4;break;default:Ne=5e3}return Ne=ne+Ne,O={id:p++,callback:V,priorityLevel:O,startTime:ne,expirationTime:Ne,sortIndex:-1},ne>je?(O.sortIndex=ne,f(m,O),u(v)===null&&O===u(m)&&(X?(M(Z),Z=-1):X=!0,Je(te,ne-je))):(O.sortIndex=Ne,f(v,O),D||L||(D=!0,K||(K=!0,De()))),O},r.unstable_shouldYield=I,r.unstable_wrapCallback=function(O){var V=C;return function(){var ne=C;C=V;try{return O.apply(this,arguments)}finally{C=ne}}}})(kc)),kc}var N0;function Qh(){return N0||(N0=1,Zc.exports=Xh()),Zc.exports}var Kc={exports:{}},tt={};var S0;function Vh(){if(S0)return tt;S0=1;var r=lu();function f(v){var m="https://react.dev/errors/"+v;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)m+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+v+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(){}var c={d:{f:u,r:function(){throw Error(f(522))},D:u,C:u,L:u,m:u,X:u,S:u,M:u},p:0,findDOMNode:null},d=Symbol.for("react.portal");function x(v,m,p){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:y==null?null:""+y,children:v,containerInfo:m,implementation:p}}var g=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function j(v,m){if(v==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return tt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,tt.createPortal=function(v,m){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(f(299));return x(v,m,null,p)},tt.flushSync=function(v){var m=g.T,p=c.p;try{if(g.T=null,c.p=2,v)return v()}finally{g.T=m,c.p=p,c.d.f()}},tt.preconnect=function(v,m){typeof v=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,c.d.C(v,m))},tt.prefetchDNS=function(v){typeof v=="string"&&c.d.D(v)},tt.preinit=function(v,m){if(typeof v=="string"&&m&&typeof m.as=="string"){var p=m.as,y=j(p,m.crossOrigin),C=typeof m.integrity=="string"?m.integrity:void 0,L=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;p==="style"?c.d.S(v,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:C,fetchPriority:L}):p==="script"&&c.d.X(v,{crossOrigin:y,integrity:C,fetchPriority:L,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},tt.preinitModule=function(v,m){if(typeof v=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var p=j(m.as,m.crossOrigin);c.d.M(v,{crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&c.d.M(v)},tt.preload=function(v,m){if(typeof v=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var p=m.as,y=j(p,m.crossOrigin);c.d.L(v,p,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},tt.preloadModule=function(v,m){if(typeof v=="string")if(m){var p=j(m.as,m.crossOrigin);c.d.m(v,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else c.d.m(v)},tt.requestFormReset=function(v){c.d.r(v)},tt.unstable_batchedUpdates=function(v,m){return v(m)},tt.useFormState=function(v,m,p){return g.H.useFormState(v,m,p)},tt.useFormStatus=function(){return g.H.useHostTransitionStatus()},tt.version="19.2.4",tt}var E0;function $h(){if(E0)return Kc.exports;E0=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(f){console.error(f)}}return r(),Kc.exports=Vh(),Kc.exports}var T0;function Zh(){if(T0)return Vn;T0=1;var r=Qh(),f=lu(),u=$h();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function x(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function g(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function j(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(x(e)!==e)throw Error(c(188))}function m(e){var t=e.alternate;if(!t){if(t=x(e),t===null)throw Error(c(188));return t!==e?null:e}for(var a=e,l=t;;){var s=a.return;if(s===null)break;var i=s.alternate;if(i===null){if(l=s.return,l!==null){a=l;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===a)return v(s),e;if(i===l)return v(s),t;i=i.sibling}throw Error(c(188))}if(a.return!==l.return)a=s,l=i;else{for(var o=!1,h=s.child;h;){if(h===a){o=!0,a=s,l=i;break}if(h===l){o=!0,l=s,a=i;break}h=h.sibling}if(!o){for(h=i.child;h;){if(h===a){o=!0,a=i,l=s;break}if(h===l){o=!0,l=i,a=s;break}h=h.sibling}if(!o)throw Error(c(189))}}if(a.alternate!==l)throw Error(c(190))}if(a.tag!==3)throw Error(c(188));return a.stateNode.current===a?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,C=Symbol.for("react.element"),L=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),se=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function De(e){return e===null||typeof e!="object"?null:(e=ae&&e[ae]||e["@@iterator"],typeof e=="function"?e:null)}var dt=Symbol.for("react.client.reference");function Ze(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===dt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case X:return"Fragment";case G:return"Profiler";case w:return"StrictMode";case te:return"Suspense";case K:return"SuspenseList";case B:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case D:return"Portal";case Q:return e.displayName||"Context";case M:return(e._context.displayName||"Context")+".Consumer";case se:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return t=e.displayName||null,t!==null?t:Ze(e.type)||"Memo";case k:t=e._payload,e=e._init;try{return Ze(e(t))}catch{}}return null}var Je=Array.isArray,O=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},je=[],Ne=-1;function E(e){return{current:e}}function Y(e){0>Ne||(e.current=je[Ne],je[Ne]=null,Ne--)}function $(e,t){Ne++,je[Ne]=e.current,e.current=t}var W=E(null),ie=E(null),fe=E(null),F=E(null);function Ve(e,t){switch($(fe,t),$(ie,e),$(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Yd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Yd(t),e=Gd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(W),$(W,e)}function He(){Y(W),Y(ie),Y(fe)}function Jl(e){e.memoizedState!==null&&$(F,e);var t=W.current,a=Gd(t,e.type);t!==a&&($(ie,e),$(W,a))}function Pn(e){ie.current===e&&(Y(W),Y(ie)),F.current===e&&(Y(F),qn._currentValue=ne)}var Ti,xu;function Ya(e){if(Ti===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ti=t&&t[1]||"",xu=-1<a.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+Ti+e+xu}var Ci=!1;function Ai(e,t){if(!e||Ci)return"";Ci=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(_){var z=_}Reflect.construct(e,[],q)}else{try{q.call()}catch(_){z=_}e.call(q.prototype)}}else{try{throw Error()}catch(_){z=_}(q=e())&&typeof q.catch=="function"&&q.catch(function(){})}}catch(_){if(_&&z&&typeof _.stack=="string")return[_.stack,z.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),o=i[0],h=i[1];if(o&&h){var b=o.split(`
|
|
4
|
+
`),R=h.split(`
|
|
5
|
+
`);for(s=l=0;l<b.length&&!b[l].includes("DetermineComponentFrameRoot");)l++;for(;s<R.length&&!R[s].includes("DetermineComponentFrameRoot");)s++;if(l===b.length||s===R.length)for(l=b.length-1,s=R.length-1;1<=l&&0<=s&&b[l]!==R[s];)s--;for(;1<=l&&0<=s;l--,s--)if(b[l]!==R[s]){if(l!==1||s!==1)do if(l--,s--,0>s||b[l]!==R[s]){var U=`
|
|
6
|
+
`+b[l].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),U}while(1<=l&&0<=s);break}}}finally{Ci=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ya(a):""}function gm(e,t){switch(e.tag){case 26:case 27:case 5:return Ya(e.type);case 16:return Ya("Lazy");case 13:return e.child!==t&&t!==null?Ya("Suspense Fallback"):Ya("Suspense");case 19:return Ya("SuspenseList");case 0:case 15:return Ai(e.type,!1);case 11:return Ai(e.type.render,!1);case 1:return Ai(e.type,!0);case 31:return Ya("Activity");default:return""}}function hu(e){try{var t="",a=null;do t+=gm(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
7
|
+
Error generating stack: `+l.message+`
|
|
8
|
+
`+l.stack}}var Mi=Object.prototype.hasOwnProperty,Ri=r.unstable_scheduleCallback,zi=r.unstable_cancelCallback,ym=r.unstable_shouldYield,pm=r.unstable_requestPaint,mt=r.unstable_now,vm=r.unstable_getCurrentPriorityLevel,gu=r.unstable_ImmediatePriority,yu=r.unstable_UserBlockingPriority,In=r.unstable_NormalPriority,bm=r.unstable_LowPriority,pu=r.unstable_IdlePriority,jm=r.log,Nm=r.unstable_setDisableYieldValue,Wl=null,xt=null;function da(e){if(typeof jm=="function"&&Nm(e),xt&&typeof xt.setStrictMode=="function")try{xt.setStrictMode(Wl,e)}catch{}}var ht=Math.clz32?Math.clz32:Tm,Sm=Math.log,Em=Math.LN2;function Tm(e){return e>>>=0,e===0?32:31-(Sm(e)/Em|0)|0}var es=256,ts=262144,as=4194304;function Ga(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 ls(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var s=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var h=l&134217727;return h!==0?(l=h&~i,l!==0?s=Ga(l):(o&=h,o!==0?s=Ga(o):a||(a=h&~e,a!==0&&(s=Ga(a))))):(h=l&~i,h!==0?s=Ga(h):o!==0?s=Ga(o):a||(a=l&~e,a!==0&&(s=Ga(a)))),s===0?0:t!==0&&t!==s&&(t&i)===0&&(i=s&-s,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:s}function Fl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Cm(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 vu(){var e=as;return as<<=1,(as&62914560)===0&&(as=4194304),e}function wi(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Pl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Am(e,t,a,l,s,i){var o=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var h=e.entanglements,b=e.expirationTimes,R=e.hiddenUpdates;for(a=o&~a;0<a;){var U=31-ht(a),q=1<<U;h[U]=0,b[U]=-1;var z=R[U];if(z!==null)for(R[U]=null,U=0;U<z.length;U++){var _=z[U];_!==null&&(_.lane&=-536870913)}a&=~q}l!==0&&bu(e,l,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function bu(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-ht(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function ju(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-ht(a),s=1<<l;s&t|e[l]&t&&(e[l]|=t),a&=~s}}function Nu(e,t){var a=t&-t;return a=(a&42)!==0?1:_i(a),(a&(e.suspendedLanes|t))!==0?0:a}function _i(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 Di(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Su(){var e=V.p;return e!==0?e:(e=window.event,e===void 0?32:o0(e.type))}function Eu(e,t){var a=V.p;try{return V.p=e,t()}finally{V.p=a}}var ma=Math.random().toString(36).slice(2),We="__reactFiber$"+ma,nt="__reactProps$"+ma,sl="__reactContainer$"+ma,Oi="__reactEvents$"+ma,Mm="__reactListeners$"+ma,Rm="__reactHandles$"+ma,Tu="__reactResources$"+ma,Il="__reactMarker$"+ma;function Ui(e){delete e[We],delete e[nt],delete e[Oi],delete e[Mm],delete e[Rm]}function il(e){var t=e[We];if(t)return t;for(var a=e.parentNode;a;){if(t=a[sl]||a[We]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Kd(e);e!==null;){if(a=e[We])return a;e=Kd(e)}return t}e=a,a=e.parentNode}return null}function rl(e){if(e=e[We]||e[sl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function en(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function cl(e){var t=e[Tu];return t||(t=e[Tu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ke(e){e[Il]=!0}var Cu=new Set,Au={};function Xa(e,t){ul(e,t),ul(e+"Capture",t)}function ul(e,t){for(Au[e]=t,e=0;e<t.length;e++)Cu.add(t[e])}var zm=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]*$"),Mu={},Ru={};function wm(e){return Mi.call(Ru,e)?!0:Mi.call(Mu,e)?!1:zm.test(e)?Ru[e]=!0:(Mu[e]=!0,!1)}function ns(e,t,a){if(wm(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ss(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function $t(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function Tt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _m(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var s=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){a=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(o){a=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Li(e){if(!e._valueTracker){var t=zu(e)?"checked":"value";e._valueTracker=_m(e,t,""+e[t])}}function wu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=zu(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function is(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 Dm=/[\n"\\]/g;function Ct(e){return e.replace(Dm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Hi(e,t,a,l,s,i,o,h){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Tt(t)):e.value!==""+Tt(t)&&(e.value=""+Tt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?Bi(e,o,Tt(t)):a!=null?Bi(e,o,Tt(a)):l!=null&&e.removeAttribute("value"),s==null&&i!=null&&(e.defaultChecked=!!i),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+Tt(h):e.removeAttribute("name")}function _u(e,t,a,l,s,i,o,h){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Li(e);return}a=a!=null?""+Tt(a):"",t=t!=null?""+Tt(t):a,h||t===e.value||(e.value=t),e.defaultValue=t}l=l??s,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=h?e.checked:!!l,e.defaultChecked=!!l,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),Li(e)}function Bi(e,t,a){t==="number"&&is(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ol(e,t,a,l){if(e=e.options,t){t={};for(var s=0;s<a.length;s++)t["$"+a[s]]=!0;for(a=0;a<e.length;a++)s=t.hasOwnProperty("$"+e[a].value),e[a].selected!==s&&(e[a].selected=s),s&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Tt(a),t=null,s=0;s<e.length;s++){if(e[s].value===a){e[s].selected=!0,l&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Du(e,t,a){if(t!=null&&(t=""+Tt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Tt(a):""}function Ou(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(c(92));if(Je(l)){if(1<l.length)throw Error(c(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Tt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Li(e)}function fl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Om=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 Uu(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||Om.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Lu(e,t,a){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var s in t)l=t[s],t.hasOwnProperty(s)&&a[s]!==l&&Uu(e,s,l)}else for(var i in t)t.hasOwnProperty(i)&&Uu(e,i,t[i])}function qi(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 Um=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"]]),Lm=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function rs(e){return Lm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zt(){}var Yi=null;function Gi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dl=null,ml=null;function Hu(e){var t=rl(e);if(t&&(e=t.stateNode)){var a=e[nt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Hi(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Ct(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var s=l[nt]||null;if(!s)throw Error(c(90));Hi(l,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&wu(l)}break e;case"textarea":Du(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&ol(e,!!a.multiple,t,!1)}}}var Xi=!1;function Bu(e,t,a){if(Xi)return e(t,a);Xi=!0;try{var l=e(t);return l}finally{if(Xi=!1,(dl!==null||ml!==null)&&(Ks(),dl&&(t=dl,e=ml,ml=dl=null,Hu(t),e)))for(t=0;t<e.length;t++)Hu(e[t])}}function tn(e,t){var a=e.stateNode;if(a===null)return null;var l=a[nt]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(c(231,t,typeof a));return a}var kt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qi=!1;if(kt)try{var an={};Object.defineProperty(an,"passive",{get:function(){Qi=!0}}),window.addEventListener("test",an,an),window.removeEventListener("test",an,an)}catch{Qi=!1}var xa=null,Vi=null,cs=null;function qu(){if(cs)return cs;var e,t=Vi,a=t.length,l,s="value"in xa?xa.value:xa.textContent,i=s.length;for(e=0;e<a&&t[e]===s[e];e++);var o=a-e;for(l=1;l<=o&&t[a-l]===s[i-l];l++);return cs=s.slice(e,1<l?1-l:void 0)}function us(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 os(){return!0}function Yu(){return!1}function st(e){function t(a,l,s,i,o){this._reactName=a,this._targetInst=s,this.type=l,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(a=e[h],this[h]=a?a(i):i[h]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?os:Yu,this.isPropagationStopped=Yu,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=os)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=os)},persist:function(){},isPersistent:os}),t}var Qa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fs=st(Qa),ln=y({},Qa,{view:0,detail:0}),Hm=st(ln),$i,Zi,nn,ds=y({},ln,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ki,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"?($i=e.screenX-nn.screenX,Zi=e.screenY-nn.screenY):Zi=$i=0,nn=e),$i)},movementY:function(e){return"movementY"in e?e.movementY:Zi}}),Gu=st(ds),Bm=y({},ds,{dataTransfer:0}),qm=st(Bm),Ym=y({},ln,{relatedTarget:0}),ki=st(Ym),Gm=y({},Qa,{animationName:0,elapsedTime:0,pseudoElement:0}),Xm=st(Gm),Qm=y({},Qa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Vm=st(Qm),$m=y({},Qa,{data:0}),Xu=st($m),Zm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},km={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"},Km={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Jm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Km[e])?!!t[e]:!1}function Ki(){return Jm}var Wm=y({},ln,{key:function(e){if(e.key){var t=Zm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=us(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?km[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ki,charCode:function(e){return e.type==="keypress"?us(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?us(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Fm=st(Wm),Pm=y({},ds,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qu=st(Pm),Im=y({},ln,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ki}),ex=st(Im),tx=y({},Qa,{propertyName:0,elapsedTime:0,pseudoElement:0}),ax=st(tx),lx=y({},ds,{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}),nx=st(lx),sx=y({},Qa,{newState:0,oldState:0}),ix=st(sx),rx=[9,13,27,32],Ji=kt&&"CompositionEvent"in window,sn=null;kt&&"documentMode"in document&&(sn=document.documentMode);var cx=kt&&"TextEvent"in window&&!sn,Vu=kt&&(!Ji||sn&&8<sn&&11>=sn),$u=" ",Zu=!1;function ku(e,t){switch(e){case"keyup":return rx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ku(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xl=!1;function ux(e,t){switch(e){case"compositionend":return Ku(t);case"keypress":return t.which!==32?null:(Zu=!0,$u);case"textInput":return e=t.data,e===$u&&Zu?null:e;default:return null}}function ox(e,t){if(xl)return e==="compositionend"||!Ji&&ku(e,t)?(e=qu(),cs=Vi=xa=null,xl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Vu&&t.locale!=="ko"?null:t.data;default:return null}}var fx={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 Ju(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fx[e.type]:t==="textarea"}function Wu(e,t,a,l){dl?ml?ml.push(l):ml=[l]:dl=l,t=ti(t,"onChange"),0<t.length&&(a=new fs("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var rn=null,cn=null;function dx(e){Od(e,0)}function ms(e){var t=en(e);if(wu(t))return e}function Fu(e,t){if(e==="change")return t}var Pu=!1;if(kt){var Wi;if(kt){var Fi="oninput"in document;if(!Fi){var Iu=document.createElement("div");Iu.setAttribute("oninput","return;"),Fi=typeof Iu.oninput=="function"}Wi=Fi}else Wi=!1;Pu=Wi&&(!document.documentMode||9<document.documentMode)}function eo(){rn&&(rn.detachEvent("onpropertychange",to),cn=rn=null)}function to(e){if(e.propertyName==="value"&&ms(cn)){var t=[];Wu(t,cn,e,Gi(e)),Bu(dx,t)}}function mx(e,t,a){e==="focusin"?(eo(),rn=t,cn=a,rn.attachEvent("onpropertychange",to)):e==="focusout"&&eo()}function xx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ms(cn)}function hx(e,t){if(e==="click")return ms(t)}function gx(e,t){if(e==="input"||e==="change")return ms(t)}function yx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gt=typeof Object.is=="function"?Object.is:yx;function un(e,t){if(gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var s=a[l];if(!Mi.call(t,s)||!gt(e[s],t[s]))return!1}return!0}function ao(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lo(e,t){var a=ao(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=ao(a)}}function no(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?no(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function so(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=is(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=is(e.document)}return t}function Pi(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 px=kt&&"documentMode"in document&&11>=document.documentMode,hl=null,Ii=null,on=null,er=!1;function io(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;er||hl==null||hl!==is(l)||(l=hl,"selectionStart"in l&&Pi(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),on&&un(on,l)||(on=l,l=ti(Ii,"onSelect"),0<l.length&&(t=new fs("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=hl)))}function Va(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var gl={animationend:Va("Animation","AnimationEnd"),animationiteration:Va("Animation","AnimationIteration"),animationstart:Va("Animation","AnimationStart"),transitionrun:Va("Transition","TransitionRun"),transitionstart:Va("Transition","TransitionStart"),transitioncancel:Va("Transition","TransitionCancel"),transitionend:Va("Transition","TransitionEnd")},tr={},ro={};kt&&(ro=document.createElement("div").style,"AnimationEvent"in window||(delete gl.animationend.animation,delete gl.animationiteration.animation,delete gl.animationstart.animation),"TransitionEvent"in window||delete gl.transitionend.transition);function $a(e){if(tr[e])return tr[e];if(!gl[e])return e;var t=gl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in ro)return tr[e]=t[a];return e}var co=$a("animationend"),uo=$a("animationiteration"),oo=$a("animationstart"),vx=$a("transitionrun"),bx=$a("transitionstart"),jx=$a("transitioncancel"),fo=$a("transitionend"),mo=new Map,ar="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(" ");ar.push("scrollEnd");function Lt(e,t){mo.set(e,t),Xa(t,[e])}var xs=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},At=[],yl=0,lr=0;function hs(){for(var e=yl,t=lr=yl=0;t<e;){var a=At[t];At[t++]=null;var l=At[t];At[t++]=null;var s=At[t];At[t++]=null;var i=At[t];if(At[t++]=null,l!==null&&s!==null){var o=l.pending;o===null?s.next=s:(s.next=o.next,o.next=s),l.pending=s}i!==0&&xo(a,s,i)}}function gs(e,t,a,l){At[yl++]=e,At[yl++]=t,At[yl++]=a,At[yl++]=l,lr|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function nr(e,t,a,l){return gs(e,t,a,l),ys(e)}function Za(e,t){return gs(e,null,null,t),ys(e)}function xo(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var s=!1,i=e.return;i!==null;)i.childLanes|=a,l=i.alternate,l!==null&&(l.childLanes|=a),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(s=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,s&&t!==null&&(s=31-ht(a),e=i.hiddenUpdates,l=e[s],l===null?e[s]=[t]:l.push(t),t.lane=a|536870912),i):null}function ys(e){if(50<_n)throw _n=0,mc=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pl={};function Nx(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,t,a,l){return new Nx(e,t,a,l)}function sr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kt(e,t){var a=e.alternate;return a===null?(a=yt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function ho(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ps(e,t,a,l,s,i){var o=0;if(l=e,typeof e=="function")sr(e)&&(o=1);else if(typeof e=="string")o=Ah(e,a,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case B:return e=yt(31,a,t,s),e.elementType=B,e.lanes=i,e;case X:return ka(a.children,s,i,t);case w:o=8,s|=24;break;case G:return e=yt(12,a,t,s|2),e.elementType=G,e.lanes=i,e;case te:return e=yt(13,a,t,s),e.elementType=te,e.lanes=i,e;case K:return e=yt(19,a,t,s),e.elementType=K,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:o=10;break e;case M:o=9;break e;case se:o=11;break e;case Z:o=14;break e;case k:o=16,l=null;break e}o=29,a=Error(c(130,e===null?"null":typeof e,"")),l=null}return t=yt(o,a,t,s),t.elementType=e,t.type=l,t.lanes=i,t}function ka(e,t,a,l){return e=yt(7,e,l,t),e.lanes=a,e}function ir(e,t,a){return e=yt(6,e,null,t),e.lanes=a,e}function go(e){var t=yt(18,null,null,0);return t.stateNode=e,t}function rr(e,t,a){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var yo=new WeakMap;function Mt(e,t){if(typeof e=="object"&&e!==null){var a=yo.get(e);return a!==void 0?a:(t={value:e,source:t,stack:hu(t)},yo.set(e,t),t)}return{value:e,source:t,stack:hu(t)}}var vl=[],bl=0,vs=null,fn=0,Rt=[],zt=0,ha=null,Yt=1,Gt="";function Jt(e,t){vl[bl++]=fn,vl[bl++]=vs,vs=e,fn=t}function po(e,t,a){Rt[zt++]=Yt,Rt[zt++]=Gt,Rt[zt++]=ha,ha=e;var l=Yt;e=Gt;var s=32-ht(l)-1;l&=~(1<<s),a+=1;var i=32-ht(t)+s;if(30<i){var o=s-s%5;i=(l&(1<<o)-1).toString(32),l>>=o,s-=o,Yt=1<<32-ht(t)+s|a<<s|l,Gt=i+e}else Yt=1<<i|a<<s|l,Gt=e}function cr(e){e.return!==null&&(Jt(e,1),po(e,1,0))}function ur(e){for(;e===vs;)vs=vl[--bl],vl[bl]=null,fn=vl[--bl],vl[bl]=null;for(;e===ha;)ha=Rt[--zt],Rt[zt]=null,Gt=Rt[--zt],Rt[zt]=null,Yt=Rt[--zt],Rt[zt]=null}function vo(e,t){Rt[zt++]=Yt,Rt[zt++]=Gt,Rt[zt++]=ha,Yt=t.id,Gt=t.overflow,ha=e}var Fe=null,Re=null,ye=!1,ga=null,wt=!1,or=Error(c(519));function ya(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw dn(Mt(t,e)),or}function bo(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[We]=e,t[nt]=l,a){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(a=0;a<On.length;a++)xe(On[a],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),_u(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),Ou(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Bd(t.textContent,a)?(l.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),l.onScroll!=null&&xe("scroll",t),l.onScrollEnd!=null&&xe("scrollend",t),l.onClick!=null&&(t.onclick=Zt),t=!0):t=!1,t||ya(e,!0)}function jo(e){for(Fe=e.return;Fe;)switch(Fe.tag){case 5:case 31:case 13:wt=!1;return;case 27:case 3:wt=!0;return;default:Fe=Fe.return}}function jl(e){if(e!==Fe)return!1;if(!ye)return jo(e),ye=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Mc(e.type,e.memoizedProps)),a=!a),a&&Re&&ya(e),jo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Re=kd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Re=kd(e)}else t===27?(t=Re,wa(e.type)?(e=Dc,Dc=null,Re=e):Re=t):Re=Fe?Dt(e.stateNode.nextSibling):null;return!0}function Ka(){Re=Fe=null,ye=!1}function fr(){var e=ga;return e!==null&&(ut===null?ut=e:ut.push.apply(ut,e),ga=null),e}function dn(e){ga===null?ga=[e]:ga.push(e)}var dr=E(null),Ja=null,Wt=null;function pa(e,t,a){$(dr,t._currentValue),t._currentValue=a}function Ft(e){e._currentValue=dr.current,Y(dr)}function mr(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function xr(e,t,a,l){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var i=s.dependencies;if(i!==null){var o=s.child;i=i.firstContext;e:for(;i!==null;){var h=i;i=s;for(var b=0;b<t.length;b++)if(h.context===t[b]){i.lanes|=a,h=i.alternate,h!==null&&(h.lanes|=a),mr(i.return,a,e),l||(o=null);break e}i=h.next}}else if(s.tag===18){if(o=s.return,o===null)throw Error(c(341));o.lanes|=a,i=o.alternate,i!==null&&(i.lanes|=a),mr(o,a,e),o=null}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}}function Nl(e,t,a,l){e=null;for(var s=t,i=!1;s!==null;){if(!i){if((s.flags&524288)!==0)i=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var o=s.alternate;if(o===null)throw Error(c(387));if(o=o.memoizedProps,o!==null){var h=s.type;gt(s.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(s===F.current){if(o=s.alternate,o===null)throw Error(c(387));o.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(qn):e=[qn])}s=s.return}e!==null&&xr(t,e,a,l),t.flags|=262144}function bs(e){for(e=e.firstContext;e!==null;){if(!gt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Wa(e){Ja=e,Wt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Pe(e){return No(Ja,e)}function js(e,t){return Ja===null&&Wa(e),No(e,t)}function No(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Wt===null){if(e===null)throw Error(c(308));Wt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wt=Wt.next=t;return a}var Sx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Ex=r.unstable_scheduleCallback,Tx=r.unstable_NormalPriority,Ye={$$typeof:Q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function hr(){return{controller:new Sx,data:new Map,refCount:0}}function mn(e){e.refCount--,e.refCount===0&&Ex(Tx,function(){e.controller.abort()})}var xn=null,gr=0,Sl=0,El=null;function Cx(e,t){if(xn===null){var a=xn=[];gr=0,Sl=vc(),El={status:"pending",value:void 0,then:function(l){a.push(l)}}}return gr++,t.then(So,So),t}function So(){if(--gr===0&&xn!==null){El!==null&&(El.status="fulfilled");var e=xn;xn=null,Sl=0,El=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ax(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(s){a.push(s)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var s=0;s<a.length;s++)(0,a[s])(t)},function(s){for(l.status="rejected",l.reason=s,s=0;s<a.length;s++)(0,a[s])(void 0)}),l}var Eo=O.S;O.S=function(e,t){cd=mt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Cx(e,t),Eo!==null&&Eo(e,t)};var Fa=E(null);function yr(){var e=Fa.current;return e!==null?e:Me.pooledCache}function Ns(e,t){t===null?$(Fa,Fa.current):$(Fa,t.pool)}function To(){var e=yr();return e===null?null:{parent:Ye._currentValue,pool:e}}var Tl=Error(c(460)),pr=Error(c(474)),Ss=Error(c(542)),Es={then:function(){}};function Co(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ao(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Zt,Zt),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ro(e),e;default:if(typeof t.status=="string")t.then(Zt,Zt);else{if(e=Me,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=l}},function(l){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ro(e),e}throw Ia=t,Tl}}function Pa(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ia=a,Tl):a}}var Ia=null;function Mo(){if(Ia===null)throw Error(c(459));var e=Ia;return Ia=null,e}function Ro(e){if(e===Tl||e===Ss)throw Error(c(483))}var Cl=null,hn=0;function Ts(e){var t=hn;return hn+=1,Cl===null&&(Cl=[]),Ao(Cl,e,t)}function gn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Cs(e,t){throw t.$$typeof===C?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function zo(e){function t(T,S){if(e){var A=T.deletions;A===null?(T.deletions=[S],T.flags|=16):A.push(S)}}function a(T,S){if(!e)return null;for(;S!==null;)t(T,S),S=S.sibling;return null}function l(T){for(var S=new Map;T!==null;)T.key!==null?S.set(T.key,T):S.set(T.index,T),T=T.sibling;return S}function s(T,S){return T=Kt(T,S),T.index=0,T.sibling=null,T}function i(T,S,A){return T.index=A,e?(A=T.alternate,A!==null?(A=A.index,A<S?(T.flags|=67108866,S):A):(T.flags|=67108866,S)):(T.flags|=1048576,S)}function o(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function h(T,S,A,H){return S===null||S.tag!==6?(S=ir(A,T.mode,H),S.return=T,S):(S=s(S,A),S.return=T,S)}function b(T,S,A,H){var ee=A.type;return ee===X?U(T,S,A.props.children,H,A.key):S!==null&&(S.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===k&&Pa(ee)===S.type)?(S=s(S,A.props),gn(S,A),S.return=T,S):(S=ps(A.type,A.key,A.props,null,T.mode,H),gn(S,A),S.return=T,S)}function R(T,S,A,H){return S===null||S.tag!==4||S.stateNode.containerInfo!==A.containerInfo||S.stateNode.implementation!==A.implementation?(S=rr(A,T.mode,H),S.return=T,S):(S=s(S,A.children||[]),S.return=T,S)}function U(T,S,A,H,ee){return S===null||S.tag!==7?(S=ka(A,T.mode,H,ee),S.return=T,S):(S=s(S,A),S.return=T,S)}function q(T,S,A){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=ir(""+S,T.mode,A),S.return=T,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case L:return A=ps(S.type,S.key,S.props,null,T.mode,A),gn(A,S),A.return=T,A;case D:return S=rr(S,T.mode,A),S.return=T,S;case k:return S=Pa(S),q(T,S,A)}if(Je(S)||De(S))return S=ka(S,T.mode,A,null),S.return=T,S;if(typeof S.then=="function")return q(T,Ts(S),A);if(S.$$typeof===Q)return q(T,js(T,S),A);Cs(T,S)}return null}function z(T,S,A,H){var ee=S!==null?S.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ee!==null?null:h(T,S,""+A,H);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case L:return A.key===ee?b(T,S,A,H):null;case D:return A.key===ee?R(T,S,A,H):null;case k:return A=Pa(A),z(T,S,A,H)}if(Je(A)||De(A))return ee!==null?null:U(T,S,A,H,null);if(typeof A.then=="function")return z(T,S,Ts(A),H);if(A.$$typeof===Q)return z(T,S,js(T,A),H);Cs(T,A)}return null}function _(T,S,A,H,ee){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return T=T.get(A)||null,h(S,T,""+H,ee);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case L:return T=T.get(H.key===null?A:H.key)||null,b(S,T,H,ee);case D:return T=T.get(H.key===null?A:H.key)||null,R(S,T,H,ee);case k:return H=Pa(H),_(T,S,A,H,ee)}if(Je(H)||De(H))return T=T.get(A)||null,U(S,T,H,ee,null);if(typeof H.then=="function")return _(T,S,A,Ts(H),ee);if(H.$$typeof===Q)return _(T,S,A,js(S,H),ee);Cs(S,H)}return null}function J(T,S,A,H){for(var ee=null,pe=null,P=S,oe=S=0,ge=null;P!==null&&oe<A.length;oe++){P.index>oe?(ge=P,P=null):ge=P.sibling;var ve=z(T,P,A[oe],H);if(ve===null){P===null&&(P=ge);break}e&&P&&ve.alternate===null&&t(T,P),S=i(ve,S,oe),pe===null?ee=ve:pe.sibling=ve,pe=ve,P=ge}if(oe===A.length)return a(T,P),ye&&Jt(T,oe),ee;if(P===null){for(;oe<A.length;oe++)P=q(T,A[oe],H),P!==null&&(S=i(P,S,oe),pe===null?ee=P:pe.sibling=P,pe=P);return ye&&Jt(T,oe),ee}for(P=l(P);oe<A.length;oe++)ge=_(P,T,oe,A[oe],H),ge!==null&&(e&&ge.alternate!==null&&P.delete(ge.key===null?oe:ge.key),S=i(ge,S,oe),pe===null?ee=ge:pe.sibling=ge,pe=ge);return e&&P.forEach(function(La){return t(T,La)}),ye&&Jt(T,oe),ee}function le(T,S,A,H){if(A==null)throw Error(c(151));for(var ee=null,pe=null,P=S,oe=S=0,ge=null,ve=A.next();P!==null&&!ve.done;oe++,ve=A.next()){P.index>oe?(ge=P,P=null):ge=P.sibling;var La=z(T,P,ve.value,H);if(La===null){P===null&&(P=ge);break}e&&P&&La.alternate===null&&t(T,P),S=i(La,S,oe),pe===null?ee=La:pe.sibling=La,pe=La,P=ge}if(ve.done)return a(T,P),ye&&Jt(T,oe),ee;if(P===null){for(;!ve.done;oe++,ve=A.next())ve=q(T,ve.value,H),ve!==null&&(S=i(ve,S,oe),pe===null?ee=ve:pe.sibling=ve,pe=ve);return ye&&Jt(T,oe),ee}for(P=l(P);!ve.done;oe++,ve=A.next())ve=_(P,T,oe,ve.value,H),ve!==null&&(e&&ve.alternate!==null&&P.delete(ve.key===null?oe:ve.key),S=i(ve,S,oe),pe===null?ee=ve:pe.sibling=ve,pe=ve);return e&&P.forEach(function(Bh){return t(T,Bh)}),ye&&Jt(T,oe),ee}function Ae(T,S,A,H){if(typeof A=="object"&&A!==null&&A.type===X&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case L:e:{for(var ee=A.key;S!==null;){if(S.key===ee){if(ee=A.type,ee===X){if(S.tag===7){a(T,S.sibling),H=s(S,A.props.children),H.return=T,T=H;break e}}else if(S.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===k&&Pa(ee)===S.type){a(T,S.sibling),H=s(S,A.props),gn(H,A),H.return=T,T=H;break e}a(T,S);break}else t(T,S);S=S.sibling}A.type===X?(H=ka(A.props.children,T.mode,H,A.key),H.return=T,T=H):(H=ps(A.type,A.key,A.props,null,T.mode,H),gn(H,A),H.return=T,T=H)}return o(T);case D:e:{for(ee=A.key;S!==null;){if(S.key===ee)if(S.tag===4&&S.stateNode.containerInfo===A.containerInfo&&S.stateNode.implementation===A.implementation){a(T,S.sibling),H=s(S,A.children||[]),H.return=T,T=H;break e}else{a(T,S);break}else t(T,S);S=S.sibling}H=rr(A,T.mode,H),H.return=T,T=H}return o(T);case k:return A=Pa(A),Ae(T,S,A,H)}if(Je(A))return J(T,S,A,H);if(De(A)){if(ee=De(A),typeof ee!="function")throw Error(c(150));return A=ee.call(A),le(T,S,A,H)}if(typeof A.then=="function")return Ae(T,S,Ts(A),H);if(A.$$typeof===Q)return Ae(T,S,js(T,A),H);Cs(T,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,S!==null&&S.tag===6?(a(T,S.sibling),H=s(S,A),H.return=T,T=H):(a(T,S),H=ir(A,T.mode,H),H.return=T,T=H),o(T)):a(T,S)}return function(T,S,A,H){try{hn=0;var ee=Ae(T,S,A,H);return Cl=null,ee}catch(P){if(P===Tl||P===Ss)throw P;var pe=yt(29,P,null,T.mode);return pe.lanes=H,pe.return=T,pe}}}var el=zo(!0),wo=zo(!1),va=!1;function vr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function br(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 ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ja(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(be&2)!==0){var s=l.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),l.pending=t,t=ys(e),xo(e,null,a),t}return gs(e,l,t,a),ys(e)}function yn(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,ju(e,a)}}function jr(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var s=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var o={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?s=i=o:i=i.next=o,a=a.next}while(a!==null);i===null?s=i=t:i=i.next=t}else s=i=t;a={baseState:l.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Nr=!1;function pn(){if(Nr){var e=El;if(e!==null)throw e}}function vn(e,t,a,l){Nr=!1;var s=e.updateQueue;va=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,h=s.shared.pending;if(h!==null){s.shared.pending=null;var b=h,R=b.next;b.next=null,o===null?i=R:o.next=R,o=b;var U=e.alternate;U!==null&&(U=U.updateQueue,h=U.lastBaseUpdate,h!==o&&(h===null?U.firstBaseUpdate=R:h.next=R,U.lastBaseUpdate=b))}if(i!==null){var q=s.baseState;o=0,U=R=b=null,h=i;do{var z=h.lane&-536870913,_=z!==h.lane;if(_?(he&z)===z:(l&z)===z){z!==0&&z===Sl&&(Nr=!0),U!==null&&(U=U.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var J=e,le=h;z=t;var Ae=a;switch(le.tag){case 1:if(J=le.payload,typeof J=="function"){q=J.call(Ae,q,z);break e}q=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=le.payload,z=typeof J=="function"?J.call(Ae,q,z):J,z==null)break e;q=y({},q,z);break e;case 2:va=!0}}z=h.callback,z!==null&&(e.flags|=64,_&&(e.flags|=8192),_=s.callbacks,_===null?s.callbacks=[z]:_.push(z))}else _={lane:z,tag:h.tag,payload:h.payload,callback:h.callback,next:null},U===null?(R=U=_,b=q):U=U.next=_,o|=z;if(h=h.next,h===null){if(h=s.shared.pending,h===null)break;_=h,h=_.next,_.next=null,s.lastBaseUpdate=_,s.shared.pending=null}}while(!0);U===null&&(b=q),s.baseState=b,s.firstBaseUpdate=R,s.lastBaseUpdate=U,i===null&&(s.shared.lanes=0),Ca|=o,e.lanes=o,e.memoizedState=q}}function _o(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Do(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)_o(a[e],t)}var Al=E(null),As=E(0);function Oo(e,t){e=ia,$(As,e),$(Al,t),ia=e|t.baseLanes}function Sr(){$(As,ia),$(Al,Al.current)}function Er(){ia=As.current,Y(Al),Y(As)}var pt=E(null),_t=null;function Na(e){var t=e.alternate;$(Be,Be.current&1),$(pt,e),_t===null&&(t===null||Al.current!==null||t.memoizedState!==null)&&(_t=e)}function Tr(e){$(Be,Be.current),$(pt,e),_t===null&&(_t=e)}function Uo(e){e.tag===22?($(Be,Be.current),$(pt,e),_t===null&&(_t=e)):Sa()}function Sa(){$(Be,Be.current),$(pt,pt.current)}function vt(e){Y(pt),_t===e&&(_t=null),Y(Be)}var Be=E(0);function Ms(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||wc(a)||_c(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Pt=0,ue=null,Te=null,Ge=null,Rs=!1,Ml=!1,tl=!1,zs=0,bn=0,Rl=null,Mx=0;function Oe(){throw Error(c(321))}function Cr(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!gt(e[a],t[a]))return!1;return!0}function Ar(e,t,a,l,s,i){return Pt=i,ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?vf:Xr,tl=!1,i=a(l,s),tl=!1,Ml&&(i=Ho(t,a,l,s)),Lo(e),i}function Lo(e){O.H=Sn;var t=Te!==null&&Te.next!==null;if(Pt=0,Ge=Te=ue=null,Rs=!1,bn=0,Rl=null,t)throw Error(c(300));e===null||Xe||(e=e.dependencies,e!==null&&bs(e)&&(Xe=!0))}function Ho(e,t,a,l){ue=e;var s=0;do{if(Ml&&(Rl=null),bn=0,Ml=!1,25<=s)throw Error(c(301));if(s+=1,Ge=Te=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}O.H=bf,i=t(a,l)}while(Ml);return i}function Rx(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?jn(t):t,e=e.useState()[0],(Te!==null?Te.memoizedState:null)!==e&&(ue.flags|=1024),t}function Mr(){var e=zs!==0;return zs=0,e}function Rr(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function zr(e){if(Rs){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Rs=!1}Pt=0,Ge=Te=ue=null,Ml=!1,bn=zs=0,Rl=null}function at(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?ue.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function qe(){if(Te===null){var e=ue.alternate;e=e!==null?e.memoizedState:null}else e=Te.next;var t=Ge===null?ue.memoizedState:Ge.next;if(t!==null)Ge=t,Te=e;else{if(e===null)throw ue.alternate===null?Error(c(467)):Error(c(310));Te=e,e={memoizedState:Te.memoizedState,baseState:Te.baseState,baseQueue:Te.baseQueue,queue:Te.queue,next:null},Ge===null?ue.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function ws(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function jn(e){var t=bn;return bn+=1,Rl===null&&(Rl=[]),e=Ao(Rl,e,t),t=ue,(Ge===null?t.memoizedState:Ge.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?vf:Xr),e}function _s(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return jn(e);if(e.$$typeof===Q)return Pe(e)}throw Error(c(438,String(e)))}function wr(e){var t=null,a=ue.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=ue.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=ws(),ue.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=I;return t.index++,a}function It(e,t){return typeof t=="function"?t(e):t}function Ds(e){var t=qe();return _r(t,Te,e)}function _r(e,t,a){var l=e.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=a;var s=e.baseQueue,i=l.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}t.baseQueue=s=i,l.pending=null}if(i=e.baseState,s===null)e.memoizedState=i;else{t=s.next;var h=o=null,b=null,R=t,U=!1;do{var q=R.lane&-536870913;if(q!==R.lane?(he&q)===q:(Pt&q)===q){var z=R.revertLane;if(z===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),q===Sl&&(U=!0);else if((Pt&z)===z){R=R.next,z===Sl&&(U=!0);continue}else q={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},b===null?(h=b=q,o=i):b=b.next=q,ue.lanes|=z,Ca|=z;q=R.action,tl&&a(i,q),i=R.hasEagerState?R.eagerState:a(i,q)}else z={lane:q,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},b===null?(h=b=z,o=i):b=b.next=z,ue.lanes|=q,Ca|=q;R=R.next}while(R!==null&&R!==t);if(b===null?o=i:b.next=h,!gt(i,e.memoizedState)&&(Xe=!0,U&&(a=El,a!==null)))throw a;e.memoizedState=i,e.baseState=o,e.baseQueue=b,l.lastRenderedState=i}return s===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Dr(e){var t=qe(),a=t.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=e;var l=a.dispatch,s=a.pending,i=t.memoizedState;if(s!==null){a.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);gt(i,t.memoizedState)||(Xe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),a.lastRenderedState=i}return[i,l]}function Bo(e,t,a){var l=ue,s=qe(),i=ye;if(i){if(a===void 0)throw Error(c(407));a=a()}else a=t();var o=!gt((Te||s).memoizedState,a);if(o&&(s.memoizedState=a,Xe=!0),s=s.queue,Lr(Go.bind(null,l,s,e),[e]),s.getSnapshot!==t||o||Ge!==null&&Ge.memoizedState.tag&1){if(l.flags|=2048,zl(9,{destroy:void 0},Yo.bind(null,l,s,a,t),null),Me===null)throw Error(c(349));i||(Pt&127)!==0||qo(l,t,a)}return a}function qo(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ue.updateQueue,t===null?(t=ws(),ue.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Yo(e,t,a,l){t.value=a,t.getSnapshot=l,Xo(t)&&Qo(e)}function Go(e,t,a){return a(function(){Xo(t)&&Qo(e)})}function Xo(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!gt(e,a)}catch{return!0}}function Qo(e){var t=Za(e,2);t!==null&&ot(t,e,2)}function Or(e){var t=at();if(typeof e=="function"){var a=e;if(e=a(),tl){da(!0);try{a()}finally{da(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:It,lastRenderedState:e},t}function Vo(e,t,a,l){return e.baseState=a,_r(e,Te,typeof l=="function"?l:It)}function zx(e,t,a,l,s){if(Ls(e))throw Error(c(485));if(e=t.action,e!==null){var i={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};O.T!==null?a(!0):i.isTransition=!1,l(i),a=t.pending,a===null?(i.next=t.pending=i,$o(t,i)):(i.next=a.next,t.pending=a.next=i)}}function $o(e,t){var a=t.action,l=t.payload,s=e.state;if(t.isTransition){var i=O.T,o={};O.T=o;try{var h=a(s,l),b=O.S;b!==null&&b(o,h),Zo(e,t,h)}catch(R){Ur(e,t,R)}finally{i!==null&&o.types!==null&&(i.types=o.types),O.T=i}}else try{i=a(s,l),Zo(e,t,i)}catch(R){Ur(e,t,R)}}function Zo(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){ko(e,t,l)},function(l){return Ur(e,t,l)}):ko(e,t,a)}function ko(e,t,a){t.status="fulfilled",t.value=a,Ko(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,$o(e,a)))}function Ur(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Ko(t),t=t.next;while(t!==l)}e.action=null}function Ko(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Jo(e,t){return t}function Wo(e,t){if(ye){var a=Me.formState;if(a!==null){e:{var l=ue;if(ye){if(Re){t:{for(var s=Re,i=wt;s.nodeType!==8;){if(!i){s=null;break t}if(s=Dt(s.nextSibling),s===null){s=null;break t}}i=s.data,s=i==="F!"||i==="F"?s:null}if(s){Re=Dt(s.nextSibling),l=s.data==="F!";break e}}ya(l)}l=!1}l&&(t=a[0])}}return a=at(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jo,lastRenderedState:t},a.queue=l,a=gf.bind(null,ue,l),l.dispatch=a,l=Or(!1),i=Gr.bind(null,ue,!1,l.queue),l=at(),s={state:t,dispatch:null,action:e,pending:null},l.queue=s,a=zx.bind(null,ue,s,i,a),s.dispatch=a,l.memoizedState=e,[t,a,!1]}function Fo(e){var t=qe();return Po(t,Te,e)}function Po(e,t,a){if(t=_r(e,t,Jo)[0],e=Ds(It)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=jn(t)}catch(o){throw o===Tl?Ss:o}else l=t;t=qe();var s=t.queue,i=s.dispatch;return a!==t.memoizedState&&(ue.flags|=2048,zl(9,{destroy:void 0},wx.bind(null,s,a),null)),[l,i,e]}function wx(e,t){e.action=t}function Io(e){var t=qe(),a=Te;if(a!==null)return Po(t,a,e);qe(),t=t.memoizedState,a=qe();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function zl(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=ue.updateQueue,t===null&&(t=ws(),ue.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function ef(){return qe().memoizedState}function Os(e,t,a,l){var s=at();ue.flags|=e,s.memoizedState=zl(1|t,{destroy:void 0},a,l===void 0?null:l)}function Us(e,t,a,l){var s=qe();l=l===void 0?null:l;var i=s.memoizedState.inst;Te!==null&&l!==null&&Cr(l,Te.memoizedState.deps)?s.memoizedState=zl(t,i,a,l):(ue.flags|=e,s.memoizedState=zl(1|t,i,a,l))}function tf(e,t){Os(8390656,8,e,t)}function Lr(e,t){Us(2048,8,e,t)}function _x(e){ue.flags|=4;var t=ue.updateQueue;if(t===null)t=ws(),ue.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function af(e){var t=qe().memoizedState;return _x({ref:t,nextImpl:e}),function(){if((be&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function lf(e,t){return Us(4,2,e,t)}function nf(e,t){return Us(4,4,e,t)}function sf(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function rf(e,t,a){a=a!=null?a.concat([e]):null,Us(4,4,sf.bind(null,t,e),a)}function Hr(){}function cf(e,t){var a=qe();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Cr(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function uf(e,t){var a=qe();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Cr(t,l[1]))return l[0];if(l=e(),tl){da(!0);try{e()}finally{da(!1)}}return a.memoizedState=[l,t],l}function Br(e,t,a){return a===void 0||(Pt&1073741824)!==0&&(he&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=od(),ue.lanes|=e,Ca|=e,a)}function of(e,t,a,l){return gt(a,t)?a:Al.current!==null?(e=Br(e,a,l),gt(e,t)||(Xe=!0),e):(Pt&42)===0||(Pt&1073741824)!==0&&(he&261930)===0?(Xe=!0,e.memoizedState=a):(e=od(),ue.lanes|=e,Ca|=e,t)}function ff(e,t,a,l,s){var i=V.p;V.p=i!==0&&8>i?i:8;var o=O.T,h={};O.T=h,Gr(e,!1,t,a);try{var b=s(),R=O.S;if(R!==null&&R(h,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var U=Ax(b,l);Nn(e,t,U,Nt(e))}else Nn(e,t,l,Nt(e))}catch(q){Nn(e,t,{then:function(){},status:"rejected",reason:q},Nt())}finally{V.p=i,o!==null&&h.types!==null&&(o.types=h.types),O.T=o}}function Dx(){}function qr(e,t,a,l){if(e.tag!==5)throw Error(c(476));var s=df(e).queue;ff(e,s,t,ne,a===null?Dx:function(){return mf(e),a(l)})}function df(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:It,lastRenderedState:ne},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:It,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function mf(e){var t=df(e);t.next===null&&(t=e.alternate.memoizedState),Nn(e,t.next.queue,{},Nt())}function Yr(){return Pe(qn)}function xf(){return qe().memoizedState}function hf(){return qe().memoizedState}function Ox(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Nt();e=ba(a);var l=ja(t,e,a);l!==null&&(ot(l,t,a),yn(l,t,a)),t={cache:hr()},e.payload=t;return}t=t.return}}function Ux(e,t,a){var l=Nt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ls(e)?yf(t,a):(a=nr(e,t,a,l),a!==null&&(ot(a,e,l),pf(a,t,l)))}function gf(e,t,a){var l=Nt();Nn(e,t,a,l)}function Nn(e,t,a,l){var s={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ls(e))yf(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,h=i(o,a);if(s.hasEagerState=!0,s.eagerState=h,gt(h,o))return gs(e,t,s,0),Me===null&&hs(),!1}catch{}if(a=nr(e,t,s,l),a!==null)return ot(a,e,l),pf(a,t,l),!0}return!1}function Gr(e,t,a,l){if(l={lane:2,revertLane:vc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ls(e)){if(t)throw Error(c(479))}else t=nr(e,a,l,2),t!==null&&ot(t,e,2)}function Ls(e){var t=e.alternate;return e===ue||t!==null&&t===ue}function yf(e,t){Ml=Rs=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function pf(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,ju(e,a)}}var Sn={readContext:Pe,use:_s,useCallback:Oe,useContext:Oe,useEffect:Oe,useImperativeHandle:Oe,useLayoutEffect:Oe,useInsertionEffect:Oe,useMemo:Oe,useReducer:Oe,useRef:Oe,useState:Oe,useDebugValue:Oe,useDeferredValue:Oe,useTransition:Oe,useSyncExternalStore:Oe,useId:Oe,useHostTransitionStatus:Oe,useFormState:Oe,useActionState:Oe,useOptimistic:Oe,useMemoCache:Oe,useCacheRefresh:Oe};Sn.useEffectEvent=Oe;var vf={readContext:Pe,use:_s,useCallback:function(e,t){return at().memoizedState=[e,t===void 0?null:t],e},useContext:Pe,useEffect:tf,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Os(4194308,4,sf.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Os(4194308,4,e,t)},useInsertionEffect:function(e,t){Os(4,2,e,t)},useMemo:function(e,t){var a=at();t=t===void 0?null:t;var l=e();if(tl){da(!0);try{e()}finally{da(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=at();if(a!==void 0){var s=a(t);if(tl){da(!0);try{a(t)}finally{da(!1)}}}else s=t;return l.memoizedState=l.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},l.queue=e,e=e.dispatch=Ux.bind(null,ue,e),[l.memoizedState,e]},useRef:function(e){var t=at();return e={current:e},t.memoizedState=e},useState:function(e){e=Or(e);var t=e.queue,a=gf.bind(null,ue,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Hr,useDeferredValue:function(e,t){var a=at();return Br(a,e,t)},useTransition:function(){var e=Or(!1);return e=ff.bind(null,ue,e.queue,!0,!1),at().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ue,s=at();if(ye){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),Me===null)throw Error(c(349));(he&127)!==0||qo(l,t,a)}s.memoizedState=a;var i={value:a,getSnapshot:t};return s.queue=i,tf(Go.bind(null,l,i,e),[e]),l.flags|=2048,zl(9,{destroy:void 0},Yo.bind(null,l,i,a,t),null),a},useId:function(){var e=at(),t=Me.identifierPrefix;if(ye){var a=Gt,l=Yt;a=(l&~(1<<32-ht(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=zs++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Mx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Yr,useFormState:Wo,useActionState:Wo,useOptimistic:function(e){var t=at();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Gr.bind(null,ue,!0,a),a.dispatch=t,[e,t]},useMemoCache:wr,useCacheRefresh:function(){return at().memoizedState=Ox.bind(null,ue)},useEffectEvent:function(e){var t=at(),a={impl:e};return t.memoizedState=a,function(){if((be&2)!==0)throw Error(c(440));return a.impl.apply(void 0,arguments)}}},Xr={readContext:Pe,use:_s,useCallback:cf,useContext:Pe,useEffect:Lr,useImperativeHandle:rf,useInsertionEffect:lf,useLayoutEffect:nf,useMemo:uf,useReducer:Ds,useRef:ef,useState:function(){return Ds(It)},useDebugValue:Hr,useDeferredValue:function(e,t){var a=qe();return of(a,Te.memoizedState,e,t)},useTransition:function(){var e=Ds(It)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:jn(e),t]},useSyncExternalStore:Bo,useId:xf,useHostTransitionStatus:Yr,useFormState:Fo,useActionState:Fo,useOptimistic:function(e,t){var a=qe();return Vo(a,Te,e,t)},useMemoCache:wr,useCacheRefresh:hf};Xr.useEffectEvent=af;var bf={readContext:Pe,use:_s,useCallback:cf,useContext:Pe,useEffect:Lr,useImperativeHandle:rf,useInsertionEffect:lf,useLayoutEffect:nf,useMemo:uf,useReducer:Dr,useRef:ef,useState:function(){return Dr(It)},useDebugValue:Hr,useDeferredValue:function(e,t){var a=qe();return Te===null?Br(a,e,t):of(a,Te.memoizedState,e,t)},useTransition:function(){var e=Dr(It)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:jn(e),t]},useSyncExternalStore:Bo,useId:xf,useHostTransitionStatus:Yr,useFormState:Io,useActionState:Io,useOptimistic:function(e,t){var a=qe();return Te!==null?Vo(a,Te,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:wr,useCacheRefresh:hf};bf.useEffectEvent=af;function Qr(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:y({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Vr={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Nt(),s=ba(l);s.payload=t,a!=null&&(s.callback=a),t=ja(e,s,l),t!==null&&(ot(t,e,l),yn(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Nt(),s=ba(l);s.tag=1,s.payload=t,a!=null&&(s.callback=a),t=ja(e,s,l),t!==null&&(ot(t,e,l),yn(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Nt(),l=ba(a);l.tag=2,t!=null&&(l.callback=t),t=ja(e,l,a),t!==null&&(ot(t,e,a),yn(t,e,a))}};function jf(e,t,a,l,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,o):t.prototype&&t.prototype.isPureReactComponent?!un(a,l)||!un(s,i):!0}function Nf(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Vr.enqueueReplaceState(t,t.state,null)}function al(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=y({},a));for(var s in e)a[s]===void 0&&(a[s]=e[s])}return a}function Sf(e){xs(e)}function Ef(e){console.error(e)}function Tf(e){xs(e)}function Hs(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Cf(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function $r(e,t,a){return a=ba(a),a.tag=3,a.payload={element:null},a.callback=function(){Hs(e,t)},a}function Af(e){return e=ba(e),e.tag=3,e}function Mf(e,t,a,l){var s=a.type.getDerivedStateFromError;if(typeof s=="function"){var i=l.value;e.payload=function(){return s(i)},e.callback=function(){Cf(t,a,l)}}var o=a.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Cf(t,a,l),typeof s!="function"&&(Aa===null?Aa=new Set([this]):Aa.add(this));var h=l.stack;this.componentDidCatch(l.value,{componentStack:h!==null?h:""})})}function Lx(e,t,a,l,s){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Nl(t,a,s,!0),a=pt.current,a!==null){switch(a.tag){case 31:case 13:return _t===null?Js():a.alternate===null&&Ue===0&&(Ue=3),a.flags&=-257,a.flags|=65536,a.lanes=s,l===Es?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),gc(e,l,s)),!1;case 22:return a.flags|=65536,l===Es?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),gc(e,l,s)),!1}throw Error(c(435,a.tag))}return gc(e,l,s),Js(),!1}if(ye)return t=pt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,l!==or&&(e=Error(c(422),{cause:l}),dn(Mt(e,a)))):(l!==or&&(t=Error(c(423),{cause:l}),dn(Mt(t,a))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,l=Mt(l,a),s=$r(e.stateNode,l,s),jr(e,s),Ue!==4&&(Ue=2)),!1;var i=Error(c(520),{cause:l});if(i=Mt(i,a),wn===null?wn=[i]:wn.push(i),Ue!==4&&(Ue=2),t===null)return!0;l=Mt(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=s&-s,a.lanes|=e,e=$r(a.stateNode,l,e),jr(a,e),!1;case 1:if(t=a.type,i=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Aa===null||!Aa.has(i))))return a.flags|=65536,s&=-s,a.lanes|=s,s=Af(s),Mf(s,e,a,l),jr(a,s),!1}a=a.return}while(a!==null);return!1}var Zr=Error(c(461)),Xe=!1;function Ie(e,t,a,l){t.child=e===null?wo(t,null,a,l):el(t,e.child,a,l)}function Rf(e,t,a,l,s){a=a.render;var i=t.ref;if("ref"in l){var o={};for(var h in l)h!=="ref"&&(o[h]=l[h])}else o=l;return Wa(t),l=Ar(e,t,a,o,i,s),h=Mr(),e!==null&&!Xe?(Rr(e,t,s),ea(e,t,s)):(ye&&h&&cr(t),t.flags|=1,Ie(e,t,l,s),t.child)}function zf(e,t,a,l,s){if(e===null){var i=a.type;return typeof i=="function"&&!sr(i)&&i.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=i,wf(e,t,i,l,s)):(e=ps(a.type,null,l,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!ec(e,s)){var o=i.memoizedProps;if(a=a.compare,a=a!==null?a:un,a(o,l)&&e.ref===t.ref)return ea(e,t,s)}return t.flags|=1,e=Kt(i,l),e.ref=t.ref,e.return=t,t.child=e}function wf(e,t,a,l,s){if(e!==null){var i=e.memoizedProps;if(un(i,l)&&e.ref===t.ref)if(Xe=!1,t.pendingProps=l=i,ec(e,s))(e.flags&131072)!==0&&(Xe=!0);else return t.lanes=e.lanes,ea(e,t,s)}return kr(e,t,a,l,s)}function _f(e,t,a,l){var s=l.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|a:a,e!==null){for(l=t.child=e.child,s=0;l!==null;)s=s|l.lanes|l.childLanes,l=l.sibling;l=s&~i}else l=0,t.child=null;return Df(e,t,i,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ns(t,i!==null?i.cachePool:null),i!==null?Oo(t,i):Sr(),Uo(t);else return l=t.lanes=536870912,Df(e,t,i!==null?i.baseLanes|a:a,a,l)}else i!==null?(Ns(t,i.cachePool),Oo(t,i),Sa(),t.memoizedState=null):(e!==null&&Ns(t,null),Sr(),Sa());return Ie(e,t,s,a),t.child}function En(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Df(e,t,a,l,s){var i=yr();return i=i===null?null:{parent:Ye._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&Ns(t,null),Sr(),Uo(t),e!==null&&Nl(e,t,l,!0),t.childLanes=s,null}function Bs(e,t){return t=Ys({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Of(e,t,a){return el(t,e.child,null,a),e=Bs(t,t.pendingProps),e.flags|=2,vt(t),t.memoizedState=null,e}function Hx(e,t,a){var l=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ye){if(l.mode==="hidden")return e=Bs(t,l),t.lanes=536870912,En(null,e);if(Tr(t),(e=Re)?(e=Zd(e,wt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ha!==null?{id:Yt,overflow:Gt}:null,retryLane:536870912,hydrationErrors:null},a=go(e),a.return=t,t.child=a,Fe=t,Re=null)):e=null,e===null)throw ya(t);return t.lanes=536870912,null}return Bs(t,l)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(Tr(t),s)if(t.flags&256)t.flags&=-257,t=Of(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(Xe||Nl(e,t,a,!1),s=(a&e.childLanes)!==0,Xe||s){if(l=Me,l!==null&&(o=Nu(l,a),o!==0&&o!==i.retryLane))throw i.retryLane=o,Za(e,o),ot(l,e,o),Zr;Js(),t=Of(e,t,a)}else e=i.treeContext,Re=Dt(o.nextSibling),Fe=t,ye=!0,ga=null,wt=!1,e!==null&&vo(t,e),t=Bs(t,l),t.flags|=4096;return t}return e=Kt(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function qs(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(c(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function kr(e,t,a,l,s){return Wa(t),a=Ar(e,t,a,l,void 0,s),l=Mr(),e!==null&&!Xe?(Rr(e,t,s),ea(e,t,s)):(ye&&l&&cr(t),t.flags|=1,Ie(e,t,a,s),t.child)}function Uf(e,t,a,l,s,i){return Wa(t),t.updateQueue=null,a=Ho(t,l,a,s),Lo(e),l=Mr(),e!==null&&!Xe?(Rr(e,t,i),ea(e,t,i)):(ye&&l&&cr(t),t.flags|=1,Ie(e,t,a,i),t.child)}function Lf(e,t,a,l,s){if(Wa(t),t.stateNode===null){var i=pl,o=a.contextType;typeof o=="object"&&o!==null&&(i=Pe(o)),i=new a(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Vr,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},vr(t),o=a.contextType,i.context=typeof o=="object"&&o!==null?Pe(o):pl,i.state=t.memoizedState,o=a.getDerivedStateFromProps,typeof o=="function"&&(Qr(t,a,o,l),i.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&Vr.enqueueReplaceState(i,i.state,null),vn(t,l,i,s),pn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var h=t.memoizedProps,b=al(a,h);i.props=b;var R=i.context,U=a.contextType;o=pl,typeof U=="object"&&U!==null&&(o=Pe(U));var q=a.getDerivedStateFromProps;U=typeof q=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,U||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||R!==o)&&Nf(t,i,l,o),va=!1;var z=t.memoizedState;i.state=z,vn(t,l,i,s),pn(),R=t.memoizedState,h||z!==R||va?(typeof q=="function"&&(Qr(t,a,q,l),R=t.memoizedState),(b=va||jf(t,a,b,l,z,R,o))?(U||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=R),i.props=l,i.state=R,i.context=o,l=b):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,br(e,t),o=t.memoizedProps,U=al(a,o),i.props=U,q=t.pendingProps,z=i.context,R=a.contextType,b=pl,typeof R=="object"&&R!==null&&(b=Pe(R)),h=a.getDerivedStateFromProps,(R=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==q||z!==b)&&Nf(t,i,l,b),va=!1,z=t.memoizedState,i.state=z,vn(t,l,i,s),pn();var _=t.memoizedState;o!==q||z!==_||va||e!==null&&e.dependencies!==null&&bs(e.dependencies)?(typeof h=="function"&&(Qr(t,a,h,l),_=t.memoizedState),(U=va||jf(t,a,U,l,z,_,b)||e!==null&&e.dependencies!==null&&bs(e.dependencies))?(R||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,_,b),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,_,b)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=_),i.props=l,i.state=_,i.context=b,l=U):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,qs(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=el(t,e.child,null,s),t.child=el(t,null,a,s)):Ie(e,t,a,s),t.memoizedState=i.state,e=t.child):e=ea(e,t,s),e}function Hf(e,t,a,l){return Ka(),t.flags|=256,Ie(e,t,a,l),t.child}var Kr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jr(e){return{baseLanes:e,cachePool:To()}}function Wr(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=jt),e}function Bf(e,t,a){var l=t.pendingProps,s=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(Be.current&2)!==0),o&&(s=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(ye){if(s?Na(t):Sa(),(e=Re)?(e=Zd(e,wt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ha!==null?{id:Yt,overflow:Gt}:null,retryLane:536870912,hydrationErrors:null},a=go(e),a.return=t,t.child=a,Fe=t,Re=null)):e=null,e===null)throw ya(t);return _c(e)?t.lanes=32:t.lanes=536870912,null}var h=l.children;return l=l.fallback,s?(Sa(),s=t.mode,h=Ys({mode:"hidden",children:h},s),l=ka(l,s,a,null),h.return=t,l.return=t,h.sibling=l,t.child=h,l=t.child,l.memoizedState=Jr(a),l.childLanes=Wr(e,o,a),t.memoizedState=Kr,En(null,l)):(Na(t),Fr(t,h))}var b=e.memoizedState;if(b!==null&&(h=b.dehydrated,h!==null)){if(i)t.flags&256?(Na(t),t.flags&=-257,t=Pr(e,t,a)):t.memoizedState!==null?(Sa(),t.child=e.child,t.flags|=128,t=null):(Sa(),h=l.fallback,s=t.mode,l=Ys({mode:"visible",children:l.children},s),h=ka(h,s,a,null),h.flags|=2,l.return=t,h.return=t,l.sibling=h,t.child=l,el(t,e.child,null,a),l=t.child,l.memoizedState=Jr(a),l.childLanes=Wr(e,o,a),t.memoizedState=Kr,t=En(null,l));else if(Na(t),_c(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var R=o.dgst;o=R,l=Error(c(419)),l.stack="",l.digest=o,dn({value:l,source:null,stack:null}),t=Pr(e,t,a)}else if(Xe||Nl(e,t,a,!1),o=(a&e.childLanes)!==0,Xe||o){if(o=Me,o!==null&&(l=Nu(o,a),l!==0&&l!==b.retryLane))throw b.retryLane=l,Za(e,l),ot(o,e,l),Zr;wc(h)||Js(),t=Pr(e,t,a)}else wc(h)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Re=Dt(h.nextSibling),Fe=t,ye=!0,ga=null,wt=!1,e!==null&&vo(t,e),t=Fr(t,l.children),t.flags|=4096);return t}return s?(Sa(),h=l.fallback,s=t.mode,b=e.child,R=b.sibling,l=Kt(b,{mode:"hidden",children:l.children}),l.subtreeFlags=b.subtreeFlags&65011712,R!==null?h=Kt(R,h):(h=ka(h,s,a,null),h.flags|=2),h.return=t,l.return=t,l.sibling=h,t.child=l,En(null,l),l=t.child,h=e.child.memoizedState,h===null?h=Jr(a):(s=h.cachePool,s!==null?(b=Ye._currentValue,s=s.parent!==b?{parent:b,pool:b}:s):s=To(),h={baseLanes:h.baseLanes|a,cachePool:s}),l.memoizedState=h,l.childLanes=Wr(e,o,a),t.memoizedState=Kr,En(e.child,l)):(Na(t),a=e.child,e=a.sibling,a=Kt(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=a,t.memoizedState=null,a)}function Fr(e,t){return t=Ys({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ys(e,t){return e=yt(22,e,null,t),e.lanes=0,e}function Pr(e,t,a){return el(t,e.child,null,a),e=Fr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function qf(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),mr(e.return,t,a)}function Ir(e,t,a,l,s,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:s,treeForkCount:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=l,o.tail=a,o.tailMode=s,o.treeForkCount=i)}function Yf(e,t,a){var l=t.pendingProps,s=l.revealOrder,i=l.tail;l=l.children;var o=Be.current,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,$(Be,o),Ie(e,t,l,a),l=ye?fn:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&qf(e,a,t);else if(e.tag===19)qf(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(a=t.child,s=null;a!==null;)e=a.alternate,e!==null&&Ms(e)===null&&(s=a),a=a.sibling;a=s,a===null?(s=t.child,t.child=null):(s=a.sibling,a.sibling=null),Ir(t,!1,s,a,i,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Ms(e)===null){t.child=s;break}e=s.sibling,s.sibling=a,a=s,s=e}Ir(t,!0,a,null,i,l);break;case"together":Ir(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function ea(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ca|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Nl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,a=Kt(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Kt(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function ec(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&bs(e)))}function Bx(e,t,a){switch(t.tag){case 3:Ve(t,t.stateNode.containerInfo),pa(t,Ye,e.memoizedState.cache),Ka();break;case 27:case 5:Jl(t);break;case 4:Ve(t,t.stateNode.containerInfo);break;case 10:pa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Tr(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Na(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Bf(e,t,a):(Na(t),e=ea(e,t,a),e!==null?e.sibling:null);Na(t);break;case 19:var s=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Nl(e,t,a,!1),l=(a&t.childLanes)!==0),s){if(l)return Yf(e,t,a);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),$(Be,Be.current),l)break;return null;case 22:return t.lanes=0,_f(e,t,a,t.pendingProps);case 24:pa(t,Ye,e.memoizedState.cache)}return ea(e,t,a)}function Gf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Xe=!0;else{if(!ec(e,a)&&(t.flags&128)===0)return Xe=!1,Bx(e,t,a);Xe=(e.flags&131072)!==0}else Xe=!1,ye&&(t.flags&1048576)!==0&&po(t,fn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Pa(t.elementType),t.type=e,typeof e=="function")sr(e)?(l=al(e,l),t.tag=1,t=Lf(null,t,e,l,a)):(t.tag=0,t=kr(null,t,e,l,a));else{if(e!=null){var s=e.$$typeof;if(s===se){t.tag=11,t=Rf(null,t,e,l,a);break e}else if(s===Z){t.tag=14,t=zf(null,t,e,l,a);break e}}throw t=Ze(e)||e,Error(c(306,t,""))}}return t;case 0:return kr(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,s=al(l,t.pendingProps),Lf(e,t,l,s,a);case 3:e:{if(Ve(t,t.stateNode.containerInfo),e===null)throw Error(c(387));l=t.pendingProps;var i=t.memoizedState;s=i.element,br(e,t),vn(t,l,null,a);var o=t.memoizedState;if(l=o.cache,pa(t,Ye,l),l!==i.cache&&xr(t,[Ye],a,!0),pn(),l=o.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Hf(e,t,l,a);break e}else if(l!==s){s=Mt(Error(c(424)),t),dn(s),t=Hf(e,t,l,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Re=Dt(e.firstChild),Fe=t,ye=!0,ga=null,wt=!0,a=wo(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Ka(),l===s){t=ea(e,t,a);break e}Ie(e,t,l,a)}t=t.child}return t;case 26:return qs(e,t),e===null?(a=Pd(t.type,null,t.pendingProps,null))?t.memoizedState=a:ye||(a=t.type,e=t.pendingProps,l=ai(fe.current).createElement(a),l[We]=t,l[nt]=e,et(l,a,e),ke(l),t.stateNode=l):t.memoizedState=Pd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Jl(t),e===null&&ye&&(l=t.stateNode=Jd(t.type,t.pendingProps,fe.current),Fe=t,wt=!0,s=Re,wa(t.type)?(Dc=s,Re=Dt(l.firstChild)):Re=s),Ie(e,t,t.pendingProps.children,a),qs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ye&&((s=l=Re)&&(l=xh(l,t.type,t.pendingProps,wt),l!==null?(t.stateNode=l,Fe=t,Re=Dt(l.firstChild),wt=!1,s=!0):s=!1),s||ya(t)),Jl(t),s=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Mc(s,i)?l=null:o!==null&&Mc(s,o)&&(t.flags|=32),t.memoizedState!==null&&(s=Ar(e,t,Rx,null,null,a),qn._currentValue=s),qs(e,t),Ie(e,t,l,a),t.child;case 6:return e===null&&ye&&((e=a=Re)&&(a=hh(a,t.pendingProps,wt),a!==null?(t.stateNode=a,Fe=t,Re=null,e=!0):e=!1),e||ya(t)),null;case 13:return Bf(e,t,a);case 4:return Ve(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=el(t,null,l,a):Ie(e,t,l,a),t.child;case 11:return Rf(e,t,t.type,t.pendingProps,a);case 7:return Ie(e,t,t.pendingProps,a),t.child;case 8:return Ie(e,t,t.pendingProps.children,a),t.child;case 12:return Ie(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,pa(t,t.type,l.value),Ie(e,t,l.children,a),t.child;case 9:return s=t.type._context,l=t.pendingProps.children,Wa(t),s=Pe(s),l=l(s),t.flags|=1,Ie(e,t,l,a),t.child;case 14:return zf(e,t,t.type,t.pendingProps,a);case 15:return wf(e,t,t.type,t.pendingProps,a);case 19:return Yf(e,t,a);case 31:return Hx(e,t,a);case 22:return _f(e,t,a,t.pendingProps);case 24:return Wa(t),l=Pe(Ye),e===null?(s=yr(),s===null&&(s=Me,i=hr(),s.pooledCache=i,i.refCount++,i!==null&&(s.pooledCacheLanes|=a),s=i),t.memoizedState={parent:l,cache:s},vr(t),pa(t,Ye,s)):((e.lanes&a)!==0&&(br(e,t),vn(t,null,null,a),pn()),s=e.memoizedState,i=t.memoizedState,s.parent!==l?(s={parent:l,cache:l},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),pa(t,Ye,l)):(l=i.cache,pa(t,Ye,l),l!==s.cache&&xr(t,[Ye],a,!0))),Ie(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function ta(e){e.flags|=4}function tc(e,t,a,l,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(xd())e.flags|=8192;else throw Ia=Es,pr}else e.flags&=-16777217}function Xf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!l0(t))if(xd())e.flags|=8192;else throw Ia=Es,pr}function Gs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?vu():536870912,e.lanes|=t,Ol|=t)}function Tn(e,t){if(!ye)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var s=e.child;s!==null;)a|=s.lanes|s.childLanes,l|=s.subtreeFlags&65011712,l|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)a|=s.lanes|s.childLanes,l|=s.subtreeFlags,l|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function qx(e,t,a){var l=t.pendingProps;switch(ur(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return ze(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ft(Ye),He(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(jl(t)?ta(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,fr())),ze(t),null;case 26:var s=t.type,i=t.memoizedState;return e===null?(ta(t),i!==null?(ze(t),Xf(t,i)):(ze(t),tc(t,s,null,l,a))):i?i!==e.memoizedState?(ta(t),ze(t),Xf(t,i)):(ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ta(t),ze(t),tc(t,s,e,l,a)),null;case 27:if(Pn(t),a=fe.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ta(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return ze(t),null}e=W.current,jl(t)?bo(t):(e=Jd(s,l,a),t.stateNode=e,ta(t))}return ze(t),null;case 5:if(Pn(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ta(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return ze(t),null}if(i=W.current,jl(t))bo(t);else{var o=ai(fe.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?o.createElement("select",{is:l.is}):o.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?o.createElement(s,{is:l.is}):o.createElement(s)}}i[We]=t,i[nt]=l;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(et(i,s,l),s){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ta(t)}}return ze(t),tc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ta(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(c(166));if(e=fe.current,jl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,s=Fe,s!==null)switch(s.tag){case 27:case 5:l=s.memoizedProps}e[We]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Bd(e.nodeValue,a)),e||ya(t,!0)}else e=ai(e).createTextNode(l),e[We]=t,t.stateNode=e}return ze(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=jl(t),a!==null){if(e===null){if(!l)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[We]=t}else Ka(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),e=!1}else a=fr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(vt(t),t):(vt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return ze(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=jl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!s)throw Error(c(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(c(317));s[We]=t}else Ka(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),s=!1}else s=fr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(vt(t),t):(vt(t),null)}return vt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,s=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(s=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==s&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Gs(t,t.updateQueue),ze(t),null);case 4:return He(),e===null&&Sc(t.stateNode.containerInfo),ze(t),null;case 10:return Ft(t.type),ze(t),null;case 19:if(Y(Be),l=t.memoizedState,l===null)return ze(t),null;if(s=(t.flags&128)!==0,i=l.rendering,i===null)if(s)Tn(l,!1);else{if(Ue!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Ms(e),i!==null){for(t.flags|=128,Tn(l,!1),e=i.updateQueue,t.updateQueue=e,Gs(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)ho(a,e),a=a.sibling;return $(Be,Be.current&1|2),ye&&Jt(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&mt()>Zs&&(t.flags|=128,s=!0,Tn(l,!1),t.lanes=4194304)}else{if(!s)if(e=Ms(i),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Gs(t,e),Tn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!ye)return ze(t),null}else 2*mt()-l.renderingStartTime>Zs&&a!==536870912&&(t.flags|=128,s=!0,Tn(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=mt(),e.sibling=null,a=Be.current,$(Be,s?a&1|2:a&1),ye&&Jt(t,l.treeForkCount),e):(ze(t),null);case 22:case 23:return vt(t),Er(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),a=t.updateQueue,a!==null&&Gs(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&Y(Fa),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ft(Ye),ze(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Yx(e,t){switch(ur(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ft(Ye),He(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Pn(t),null;case 31:if(t.memoizedState!==null){if(vt(t),t.alternate===null)throw Error(c(340));Ka()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(vt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Ka()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(Be),null;case 4:return He(),null;case 10:return Ft(t.type),null;case 22:case 23:return vt(t),Er(),e!==null&&Y(Fa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ft(Ye),null;case 25:return null;default:return null}}function Qf(e,t){switch(ur(t),t.tag){case 3:Ft(Ye),He();break;case 26:case 27:case 5:Pn(t);break;case 4:He();break;case 31:t.memoizedState!==null&&vt(t);break;case 13:vt(t);break;case 19:Y(Be);break;case 10:Ft(t.type);break;case 22:case 23:vt(t),Er(),e!==null&&Y(Fa);break;case 24:Ft(Ye)}}function Cn(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var s=l.next;a=s;do{if((a.tag&e)===e){l=void 0;var i=a.create,o=a.inst;l=i(),o.destroy=l}a=a.next}while(a!==s)}}catch(h){Ee(t,t.return,h)}}function Ea(e,t,a){try{var l=t.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var i=s.next;l=i;do{if((l.tag&e)===e){var o=l.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,s=t;var b=a,R=h;try{R()}catch(U){Ee(s,b,U)}}}l=l.next}while(l!==i)}}catch(U){Ee(t,t.return,U)}}function Vf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Do(t,a)}catch(l){Ee(e,e.return,l)}}}function $f(e,t,a){a.props=al(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Ee(e,t,l)}}function An(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(s){Ee(e,t,s)}}function Xt(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(s){Ee(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(s){Ee(e,t,s)}else a.current=null}function Zf(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(s){Ee(e,e.return,s)}}function ac(e,t,a){try{var l=e.stateNode;ch(l,e.type,a,t),l[nt]=t}catch(s){Ee(e,e.return,s)}}function kf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wa(e.type)||e.tag===4}function lc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kf(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&&wa(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 nc(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Zt));else if(l!==4&&(l===27&&wa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(nc(e,t,a),e=e.sibling;e!==null;)nc(e,t,a),e=e.sibling}function Xs(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&wa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Xs(e,t,a),e=e.sibling;e!==null;)Xs(e,t,a),e=e.sibling}function Kf(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);et(t,l,a),t[We]=e,t[nt]=a}catch(i){Ee(e,e.return,i)}}var aa=!1,Qe=!1,sc=!1,Jf=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function Gx(e,t){if(e=e.containerInfo,Cc=ui,e=so(e),Pi(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var s=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var o=0,h=-1,b=-1,R=0,U=0,q=e,z=null;t:for(;;){for(var _;q!==a||s!==0&&q.nodeType!==3||(h=o+s),q!==i||l!==0&&q.nodeType!==3||(b=o+l),q.nodeType===3&&(o+=q.nodeValue.length),(_=q.firstChild)!==null;)z=q,q=_;for(;;){if(q===e)break t;if(z===a&&++R===s&&(h=o),z===i&&++U===l&&(b=o),(_=q.nextSibling)!==null)break;q=z,z=q.parentNode}q=_}a=h===-1||b===-1?null:{start:h,end:b}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ac={focusedElem:e,selectionRange:a},ui=!1,Ke=t;Ke!==null;)if(t=Ke,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ke=e;else for(;Ke!==null;){switch(t=Ke,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)s=e[a],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,a=t,s=i.memoizedProps,i=i.memoizedState,l=a.stateNode;try{var J=al(a.type,s);e=l.getSnapshotBeforeUpdate(J,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(le){Ee(a,a.return,le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)zc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":zc(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(c(163))}if(e=t.sibling,e!==null){e.return=t.return,Ke=e;break}Ke=t.return}}function Wf(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:na(e,a),l&4&&Cn(5,a);break;case 1:if(na(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(o){Ee(a,a.return,o)}else{var s=al(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Ee(a,a.return,o)}}l&64&&Vf(a),l&512&&An(a,a.return);break;case 3:if(na(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Do(e,t)}catch(o){Ee(a,a.return,o)}}break;case 27:t===null&&l&4&&Kf(a);case 26:case 5:na(e,a),t===null&&l&4&&Zf(a),l&512&&An(a,a.return);break;case 12:na(e,a);break;case 31:na(e,a),l&4&&If(e,a);break;case 13:na(e,a),l&4&&ed(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Wx.bind(null,a),gh(e,a))));break;case 22:if(l=a.memoizedState!==null||aa,!l){t=t!==null&&t.memoizedState!==null||Qe,s=aa;var i=Qe;aa=l,(Qe=t)&&!i?sa(e,a,(a.subtreeFlags&8772)!==0):na(e,a),aa=s,Qe=i}break;case 30:break;default:na(e,a)}}function Ff(e){var t=e.alternate;t!==null&&(e.alternate=null,Ff(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ui(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 we=null,it=!1;function la(e,t,a){for(a=a.child;a!==null;)Pf(e,t,a),a=a.sibling}function Pf(e,t,a){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(Wl,a)}catch{}switch(a.tag){case 26:Qe||Xt(a,t),la(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Qe||Xt(a,t);var l=we,s=it;wa(a.type)&&(we=a.stateNode,it=!1),la(e,t,a),Ln(a.stateNode),we=l,it=s;break;case 5:Qe||Xt(a,t);case 6:if(l=we,s=it,we=null,la(e,t,a),we=l,it=s,we!==null)if(it)try{(we.nodeType===9?we.body:we.nodeName==="HTML"?we.ownerDocument.body:we).removeChild(a.stateNode)}catch(i){Ee(a,t,i)}else try{we.removeChild(a.stateNode)}catch(i){Ee(a,t,i)}break;case 18:we!==null&&(it?(e=we,Vd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Xl(e)):Vd(we,a.stateNode));break;case 4:l=we,s=it,we=a.stateNode.containerInfo,it=!0,la(e,t,a),we=l,it=s;break;case 0:case 11:case 14:case 15:Ea(2,a,t),Qe||Ea(4,a,t),la(e,t,a);break;case 1:Qe||(Xt(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&$f(a,t,l)),la(e,t,a);break;case 21:la(e,t,a);break;case 22:Qe=(l=Qe)||a.memoizedState!==null,la(e,t,a),Qe=l;break;default:la(e,t,a)}}function If(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Xl(e)}catch(a){Ee(t,t.return,a)}}}function ed(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Xl(e)}catch(a){Ee(t,t.return,a)}}function Xx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Jf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Jf),t;default:throw Error(c(435,e.tag))}}function Qs(e,t){var a=Xx(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var s=Fx.bind(null,e,l);l.then(s,s)}})}function rt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var s=a[l],i=e,o=t,h=o;e:for(;h!==null;){switch(h.tag){case 27:if(wa(h.type)){we=h.stateNode,it=!1;break e}break;case 5:we=h.stateNode,it=!1;break e;case 3:case 4:we=h.stateNode.containerInfo,it=!0;break e}h=h.return}if(we===null)throw Error(c(160));Pf(i,o,s),we=null,it=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)td(t,e),t=t.sibling}var Ht=null;function td(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:rt(t,e),ct(e),l&4&&(Ea(3,e,e.return),Cn(3,e),Ea(5,e,e.return));break;case 1:rt(t,e),ct(e),l&512&&(Qe||a===null||Xt(a,a.return)),l&64&&aa&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var s=Ht;if(rt(t,e),ct(e),l&512&&(Qe||a===null||Xt(a,a.return)),l&4){var i=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,s=s.ownerDocument||s;t:switch(l){case"title":i=s.getElementsByTagName("title")[0],(!i||i[Il]||i[We]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=s.createElement(l),s.head.insertBefore(i,s.querySelector("head > title"))),et(i,l,a),i[We]=e,ke(i),l=i;break e;case"link":var o=t0("link","href",s).get(l+(a.href||""));if(o){for(var h=0;h<o.length;h++)if(i=o[h],i.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&i.getAttribute("rel")===(a.rel==null?null:a.rel)&&i.getAttribute("title")===(a.title==null?null:a.title)&&i.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){o.splice(h,1);break t}}i=s.createElement(l),et(i,l,a),s.head.appendChild(i);break;case"meta":if(o=t0("meta","content",s).get(l+(a.content||""))){for(h=0;h<o.length;h++)if(i=o[h],i.getAttribute("content")===(a.content==null?null:""+a.content)&&i.getAttribute("name")===(a.name==null?null:a.name)&&i.getAttribute("property")===(a.property==null?null:a.property)&&i.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&i.getAttribute("charset")===(a.charSet==null?null:a.charSet)){o.splice(h,1);break t}}i=s.createElement(l),et(i,l,a),s.head.appendChild(i);break;default:throw Error(c(468,l))}i[We]=e,ke(i),l=i}e.stateNode=l}else a0(s,e.type,e.stateNode);else e.stateNode=e0(s,l,e.memoizedProps);else i!==l?(i===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):i.count--,l===null?a0(s,e.type,e.stateNode):e0(s,l,e.memoizedProps)):l===null&&e.stateNode!==null&&ac(e,e.memoizedProps,a.memoizedProps)}break;case 27:rt(t,e),ct(e),l&512&&(Qe||a===null||Xt(a,a.return)),a!==null&&l&4&&ac(e,e.memoizedProps,a.memoizedProps);break;case 5:if(rt(t,e),ct(e),l&512&&(Qe||a===null||Xt(a,a.return)),e.flags&32){s=e.stateNode;try{fl(s,"")}catch(J){Ee(e,e.return,J)}}l&4&&e.stateNode!=null&&(s=e.memoizedProps,ac(e,s,a!==null?a.memoizedProps:s)),l&1024&&(sc=!0);break;case 6:if(rt(t,e),ct(e),l&4){if(e.stateNode===null)throw Error(c(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(J){Ee(e,e.return,J)}}break;case 3:if(si=null,s=Ht,Ht=li(t.containerInfo),rt(t,e),Ht=s,ct(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Xl(t.containerInfo)}catch(J){Ee(e,e.return,J)}sc&&(sc=!1,ad(e));break;case 4:l=Ht,Ht=li(e.stateNode.containerInfo),rt(t,e),ct(e),Ht=l;break;case 12:rt(t,e),ct(e);break;case 31:rt(t,e),ct(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Qs(e,l)));break;case 13:rt(t,e),ct(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&($s=mt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Qs(e,l)));break;case 22:s=e.memoizedState!==null;var b=a!==null&&a.memoizedState!==null,R=aa,U=Qe;if(aa=R||s,Qe=U||b,rt(t,e),Qe=U,aa=R,ct(e),l&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(a===null||b||aa||Qe||ll(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){b=a=t;try{if(i=b.stateNode,s)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=b.stateNode;var q=b.memoizedProps.style,z=q!=null&&q.hasOwnProperty("display")?q.display:null;h.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(J){Ee(b,b.return,J)}}}else if(t.tag===6){if(a===null){b=t;try{b.stateNode.nodeValue=s?"":b.memoizedProps}catch(J){Ee(b,b.return,J)}}}else if(t.tag===18){if(a===null){b=t;try{var _=b.stateNode;s?$d(_,!0):$d(b.stateNode,!1)}catch(J){Ee(b,b.return,J)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Qs(e,a))));break;case 19:rt(t,e),ct(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Qs(e,l)));break;case 30:break;case 21:break;default:rt(t,e),ct(e)}}function ct(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(kf(l)){a=l;break}l=l.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var s=a.stateNode,i=lc(e);Xs(e,i,s);break;case 5:var o=a.stateNode;a.flags&32&&(fl(o,""),a.flags&=-33);var h=lc(e);Xs(e,h,o);break;case 3:case 4:var b=a.stateNode.containerInfo,R=lc(e);nc(e,R,b);break;default:throw Error(c(161))}}catch(U){Ee(e,e.return,U)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ad(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ad(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function na(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Wf(e,t.alternate,t),t=t.sibling}function ll(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ea(4,t,t.return),ll(t);break;case 1:Xt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&$f(t,t.return,a),ll(t);break;case 27:Ln(t.stateNode);case 26:case 5:Xt(t,t.return),ll(t);break;case 22:t.memoizedState===null&&ll(t);break;case 30:ll(t);break;default:ll(t)}e=e.sibling}}function sa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,s=e,i=t,o=i.flags;switch(i.tag){case 0:case 11:case 15:sa(s,i,a),Cn(4,i);break;case 1:if(sa(s,i,a),l=i,s=l.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(R){Ee(l,l.return,R)}if(l=i,s=l.updateQueue,s!==null){var h=l.stateNode;try{var b=s.shared.hiddenCallbacks;if(b!==null)for(s.shared.hiddenCallbacks=null,s=0;s<b.length;s++)_o(b[s],h)}catch(R){Ee(l,l.return,R)}}a&&o&64&&Vf(i),An(i,i.return);break;case 27:Kf(i);case 26:case 5:sa(s,i,a),a&&l===null&&o&4&&Zf(i),An(i,i.return);break;case 12:sa(s,i,a);break;case 31:sa(s,i,a),a&&o&4&&If(s,i);break;case 13:sa(s,i,a),a&&o&4&&ed(s,i);break;case 22:i.memoizedState===null&&sa(s,i,a),An(i,i.return);break;case 30:break;default:sa(s,i,a)}t=t.sibling}}function ic(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&mn(a))}function rc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&mn(e))}function Bt(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ld(e,t,a,l),t=t.sibling}function ld(e,t,a,l){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Bt(e,t,a,l),s&2048&&Cn(9,t);break;case 1:Bt(e,t,a,l);break;case 3:Bt(e,t,a,l),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&mn(e)));break;case 12:if(s&2048){Bt(e,t,a,l),e=t.stateNode;try{var i=t.memoizedProps,o=i.id,h=i.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){Ee(t,t.return,b)}}else Bt(e,t,a,l);break;case 31:Bt(e,t,a,l);break;case 13:Bt(e,t,a,l);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?Bt(e,t,a,l):Mn(e,t):i._visibility&2?Bt(e,t,a,l):(i._visibility|=2,wl(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),s&2048&&ic(o,t);break;case 24:Bt(e,t,a,l),s&2048&&rc(t.alternate,t);break;default:Bt(e,t,a,l)}}function wl(e,t,a,l,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,o=t,h=a,b=l,R=o.flags;switch(o.tag){case 0:case 11:case 15:wl(i,o,h,b,s),Cn(8,o);break;case 23:break;case 22:var U=o.stateNode;o.memoizedState!==null?U._visibility&2?wl(i,o,h,b,s):Mn(i,o):(U._visibility|=2,wl(i,o,h,b,s)),s&&R&2048&&ic(o.alternate,o);break;case 24:wl(i,o,h,b,s),s&&R&2048&&rc(o.alternate,o);break;default:wl(i,o,h,b,s)}t=t.sibling}}function Mn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,s=l.flags;switch(l.tag){case 22:Mn(a,l),s&2048&&ic(l.alternate,l);break;case 24:Mn(a,l),s&2048&&rc(l.alternate,l);break;default:Mn(a,l)}t=t.sibling}}var Rn=8192;function _l(e,t,a){if(e.subtreeFlags&Rn)for(e=e.child;e!==null;)nd(e,t,a),e=e.sibling}function nd(e,t,a){switch(e.tag){case 26:_l(e,t,a),e.flags&Rn&&e.memoizedState!==null&&Mh(a,Ht,e.memoizedState,e.memoizedProps);break;case 5:_l(e,t,a);break;case 3:case 4:var l=Ht;Ht=li(e.stateNode.containerInfo),_l(e,t,a),Ht=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Rn,Rn=16777216,_l(e,t,a),Rn=l):_l(e,t,a));break;default:_l(e,t,a)}}function sd(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 zn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Ke=l,rd(l,e)}sd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)id(e),e=e.sibling}function id(e){switch(e.tag){case 0:case 11:case 15:zn(e),e.flags&2048&&Ea(9,e,e.return);break;case 3:zn(e);break;case 12:zn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Vs(e)):zn(e);break;default:zn(e)}}function Vs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Ke=l,rd(l,e)}sd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ea(8,t,t.return),Vs(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Vs(t));break;default:Vs(t)}e=e.sibling}}function rd(e,t){for(;Ke!==null;){var a=Ke;switch(a.tag){case 0:case 11:case 15:Ea(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:mn(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,Ke=l;else e:for(a=e;Ke!==null;){l=Ke;var s=l.sibling,i=l.return;if(Ff(l),l===a){Ke=null;break e}if(s!==null){s.return=i,Ke=s;break e}Ke=i}}}var Qx={getCacheForType:function(e){var t=Pe(Ye),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Pe(Ye).controller.signal}},Vx=typeof WeakMap=="function"?WeakMap:Map,be=0,Me=null,me=null,he=0,Se=0,bt=null,Ta=!1,Dl=!1,cc=!1,ia=0,Ue=0,Ca=0,nl=0,uc=0,jt=0,Ol=0,wn=null,ut=null,oc=!1,$s=0,cd=0,Zs=1/0,ks=null,Aa=null,$e=0,Ma=null,Ul=null,ra=0,fc=0,dc=null,ud=null,_n=0,mc=null;function Nt(){return(be&2)!==0&&he!==0?he&-he:O.T!==null?vc():Su()}function od(){if(jt===0)if((he&536870912)===0||ye){var e=ts;ts<<=1,(ts&3932160)===0&&(ts=262144),jt=e}else jt=536870912;return e=pt.current,e!==null&&(e.flags|=32),jt}function ot(e,t,a){(e===Me&&(Se===2||Se===9)||e.cancelPendingCommit!==null)&&(Ll(e,0),Ra(e,he,jt,!1)),Pl(e,a),((be&2)===0||e!==Me)&&(e===Me&&((be&2)===0&&(nl|=a),Ue===4&&Ra(e,he,jt,!1)),Qt(e))}function fd(e,t,a){if((be&6)!==0)throw Error(c(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Fl(e,t),s=l?kx(e,t):hc(e,t,!0),i=l;do{if(s===0){Dl&&!l&&Ra(e,t,0,!1);break}else{if(a=e.current.alternate,i&&!$x(a)){s=hc(e,t,!1),i=!1;continue}if(s===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;s=wn;var b=h.current.memoizedState.isDehydrated;if(b&&(Ll(h,o).flags|=256),o=hc(h,o,!1),o!==2){if(cc&&!b){h.errorRecoveryDisabledLanes|=i,nl|=i,s=4;break e}i=ut,ut=s,i!==null&&(ut===null?ut=i:ut.push.apply(ut,i))}s=o}if(i=!1,s!==2)continue}}if(s===1){Ll(e,0),Ra(e,t,0,!0);break}e:{switch(l=e,i=s,i){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Ra(l,t,jt,!Ta);break e;case 2:ut=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(s=$s+300-mt(),10<s)){if(Ra(l,t,jt,!Ta),ls(l,0,!0)!==0)break e;ra=t,l.timeoutHandle=Xd(dd.bind(null,l,a,ut,ks,oc,t,jt,nl,Ol,Ta,i,"Throttled",-0,0),s);break e}dd(l,a,ut,ks,oc,t,jt,nl,Ol,Ta,i,null,-0,0)}}break}while(!0);Qt(e)}function dd(e,t,a,l,s,i,o,h,b,R,U,q,z,_){if(e.timeoutHandle=-1,q=t.subtreeFlags,q&8192||(q&16785408)===16785408){q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zt},nd(t,i,q);var J=(i&62914560)===i?$s-mt():(i&4194048)===i?cd-mt():0;if(J=Rh(q,J),J!==null){ra=i,e.cancelPendingCommit=J(bd.bind(null,e,t,i,a,l,s,o,h,b,U,q,null,z,_)),Ra(e,i,o,!R);return}}bd(e,t,i,a,l,s,o,h,b)}function $x(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var s=a[l],i=s.getSnapshot;s=s.value;try{if(!gt(i(),s))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ra(e,t,a,l){t&=~uc,t&=~nl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var s=t;0<s;){var i=31-ht(s),o=1<<i;l[i]=-1,s&=~o}a!==0&&bu(e,a,t)}function Ks(){return(be&6)===0?(Dn(0),!1):!0}function xc(){if(me!==null){if(Se===0)var e=me.return;else e=me,Wt=Ja=null,zr(e),Cl=null,hn=0,e=me;for(;e!==null;)Qf(e.alternate,e),e=e.return;me=null}}function Ll(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,fh(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ra=0,xc(),Me=e,me=a=Kt(e.current,null),he=t,Se=0,bt=null,Ta=!1,Dl=Fl(e,t),cc=!1,Ol=jt=uc=nl=Ca=Ue=0,ut=wn=null,oc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var s=31-ht(l),i=1<<s;t|=e[s],l&=~i}return ia=t,hs(),a}function md(e,t){ue=null,O.H=Sn,t===Tl||t===Ss?(t=Mo(),Se=3):t===pr?(t=Mo(),Se=4):Se=t===Zr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,bt=t,me===null&&(Ue=1,Hs(e,Mt(t,e.current)))}function xd(){var e=pt.current;return e===null?!0:(he&4194048)===he?_t===null:(he&62914560)===he||(he&536870912)!==0?e===_t:!1}function hd(){var e=O.H;return O.H=Sn,e===null?Sn:e}function gd(){var e=O.A;return O.A=Qx,e}function Js(){Ue=4,Ta||(he&4194048)!==he&&pt.current!==null||(Dl=!0),(Ca&134217727)===0&&(nl&134217727)===0||Me===null||Ra(Me,he,jt,!1)}function hc(e,t,a){var l=be;be|=2;var s=hd(),i=gd();(Me!==e||he!==t)&&(ks=null,Ll(e,t)),t=!1;var o=Ue;e:do try{if(Se!==0&&me!==null){var h=me,b=bt;switch(Se){case 8:xc(),o=6;break e;case 3:case 2:case 9:case 6:pt.current===null&&(t=!0);var R=Se;if(Se=0,bt=null,Hl(e,h,b,R),a&&Dl){o=0;break e}break;default:R=Se,Se=0,bt=null,Hl(e,h,b,R)}}Zx(),o=Ue;break}catch(U){md(e,U)}while(!0);return t&&e.shellSuspendCounter++,Wt=Ja=null,be=l,O.H=s,O.A=i,me===null&&(Me=null,he=0,hs()),o}function Zx(){for(;me!==null;)yd(me)}function kx(e,t){var a=be;be|=2;var l=hd(),s=gd();Me!==e||he!==t?(ks=null,Zs=mt()+500,Ll(e,t)):Dl=Fl(e,t);e:do try{if(Se!==0&&me!==null){t=me;var i=bt;t:switch(Se){case 1:Se=0,bt=null,Hl(e,t,i,1);break;case 2:case 9:if(Co(i)){Se=0,bt=null,pd(t);break}t=function(){Se!==2&&Se!==9||Me!==e||(Se=7),Qt(e)},i.then(t,t);break e;case 3:Se=7;break e;case 4:Se=5;break e;case 7:Co(i)?(Se=0,bt=null,pd(t)):(Se=0,bt=null,Hl(e,t,i,7));break;case 5:var o=null;switch(me.tag){case 26:o=me.memoizedState;case 5:case 27:var h=me;if(o?l0(o):h.stateNode.complete){Se=0,bt=null;var b=h.sibling;if(b!==null)me=b;else{var R=h.return;R!==null?(me=R,Ws(R)):me=null}break t}}Se=0,bt=null,Hl(e,t,i,5);break;case 6:Se=0,bt=null,Hl(e,t,i,6);break;case 8:xc(),Ue=6;break e;default:throw Error(c(462))}}Kx();break}catch(U){md(e,U)}while(!0);return Wt=Ja=null,O.H=l,O.A=s,be=a,me!==null?0:(Me=null,he=0,hs(),Ue)}function Kx(){for(;me!==null&&!ym();)yd(me)}function yd(e){var t=Gf(e.alternate,e,ia);e.memoizedProps=e.pendingProps,t===null?Ws(e):me=t}function pd(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Uf(a,t,t.pendingProps,t.type,void 0,he);break;case 11:t=Uf(a,t,t.pendingProps,t.type.render,t.ref,he);break;case 5:zr(t);default:Qf(a,t),t=me=ho(t,ia),t=Gf(a,t,ia)}e.memoizedProps=e.pendingProps,t===null?Ws(e):me=t}function Hl(e,t,a,l){Wt=Ja=null,zr(t),Cl=null,hn=0;var s=t.return;try{if(Lx(e,s,t,a,he)){Ue=1,Hs(e,Mt(a,e.current)),me=null;return}}catch(i){if(s!==null)throw me=s,i;Ue=1,Hs(e,Mt(a,e.current)),me=null;return}t.flags&32768?(ye||l===1?e=!0:Dl||(he&536870912)!==0?e=!1:(Ta=e=!0,(l===2||l===9||l===3||l===6)&&(l=pt.current,l!==null&&l.tag===13&&(l.flags|=16384))),vd(t,e)):Ws(t)}function Ws(e){var t=e;do{if((t.flags&32768)!==0){vd(t,Ta);return}e=t.return;var a=qx(t.alternate,t,ia);if(a!==null){me=a;return}if(t=t.sibling,t!==null){me=t;return}me=t=e}while(t!==null);Ue===0&&(Ue=5)}function vd(e,t){do{var a=Yx(e.alternate,e);if(a!==null){a.flags&=32767,me=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){me=e;return}me=e=a}while(e!==null);Ue=6,me=null}function bd(e,t,a,l,s,i,o,h,b){e.cancelPendingCommit=null;do Fs();while($e!==0);if((be&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(i=t.lanes|t.childLanes,i|=lr,Am(e,a,i,o,h,b),e===Me&&(me=Me=null,he=0),Ul=t,Ma=e,ra=a,fc=i,dc=s,ud=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Px(In,function(){return Td(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=O.T,O.T=null,s=V.p,V.p=2,o=be,be|=4;try{Gx(e,t,a)}finally{be=o,V.p=s,O.T=l}}$e=1,jd(),Nd(),Sd()}}function jd(){if($e===1){$e=0;var e=Ma,t=Ul,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=O.T,O.T=null;var l=V.p;V.p=2;var s=be;be|=4;try{td(t,e);var i=Ac,o=so(e.containerInfo),h=i.focusedElem,b=i.selectionRange;if(o!==h&&h&&h.ownerDocument&&no(h.ownerDocument.documentElement,h)){if(b!==null&&Pi(h)){var R=b.start,U=b.end;if(U===void 0&&(U=R),"selectionStart"in h)h.selectionStart=R,h.selectionEnd=Math.min(U,h.value.length);else{var q=h.ownerDocument||document,z=q&&q.defaultView||window;if(z.getSelection){var _=z.getSelection(),J=h.textContent.length,le=Math.min(b.start,J),Ae=b.end===void 0?le:Math.min(b.end,J);!_.extend&&le>Ae&&(o=Ae,Ae=le,le=o);var T=lo(h,le),S=lo(h,Ae);if(T&&S&&(_.rangeCount!==1||_.anchorNode!==T.node||_.anchorOffset!==T.offset||_.focusNode!==S.node||_.focusOffset!==S.offset)){var A=q.createRange();A.setStart(T.node,T.offset),_.removeAllRanges(),le>Ae?(_.addRange(A),_.extend(S.node,S.offset)):(A.setEnd(S.node,S.offset),_.addRange(A))}}}}for(q=[],_=h;_=_.parentNode;)_.nodeType===1&&q.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<q.length;h++){var H=q[h];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}ui=!!Cc,Ac=Cc=null}finally{be=s,V.p=l,O.T=a}}e.current=t,$e=2}}function Nd(){if($e===2){$e=0;var e=Ma,t=Ul,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=O.T,O.T=null;var l=V.p;V.p=2;var s=be;be|=4;try{Wf(e,t.alternate,t)}finally{be=s,V.p=l,O.T=a}}$e=3}}function Sd(){if($e===4||$e===3){$e=0,pm();var e=Ma,t=Ul,a=ra,l=ud;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?$e=5:($e=0,Ul=Ma=null,Ed(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Aa=null),Di(a),t=t.stateNode,xt&&typeof xt.onCommitFiberRoot=="function")try{xt.onCommitFiberRoot(Wl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=O.T,s=V.p,V.p=2,O.T=null;try{for(var i=e.onRecoverableError,o=0;o<l.length;o++){var h=l[o];i(h.value,{componentStack:h.stack})}}finally{O.T=t,V.p=s}}(ra&3)!==0&&Fs(),Qt(e),s=e.pendingLanes,(a&261930)!==0&&(s&42)!==0?e===mc?_n++:(_n=0,mc=e):_n=0,Dn(0)}}function Ed(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,mn(t)))}function Fs(){return jd(),Nd(),Sd(),Td()}function Td(){if($e!==5)return!1;var e=Ma,t=fc;fc=0;var a=Di(ra),l=O.T,s=V.p;try{V.p=32>a?32:a,O.T=null,a=dc,dc=null;var i=Ma,o=ra;if($e=0,Ul=Ma=null,ra=0,(be&6)!==0)throw Error(c(331));var h=be;if(be|=4,id(i.current),ld(i,i.current,o,a),be=h,Dn(0,!1),xt&&typeof xt.onPostCommitFiberRoot=="function")try{xt.onPostCommitFiberRoot(Wl,i)}catch{}return!0}finally{V.p=s,O.T=l,Ed(e,t)}}function Cd(e,t,a){t=Mt(a,t),t=$r(e.stateNode,t,2),e=ja(e,t,2),e!==null&&(Pl(e,2),Qt(e))}function Ee(e,t,a){if(e.tag===3)Cd(e,e,a);else for(;t!==null;){if(t.tag===3){Cd(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Aa===null||!Aa.has(l))){e=Mt(a,e),a=Af(2),l=ja(t,a,2),l!==null&&(Mf(a,l,t,e),Pl(l,2),Qt(l));break}}t=t.return}}function gc(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Vx;var s=new Set;l.set(t,s)}else s=l.get(t),s===void 0&&(s=new Set,l.set(t,s));s.has(a)||(cc=!0,s.add(a),e=Jx.bind(null,e,t,a),t.then(e,e))}function Jx(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Me===e&&(he&a)===a&&(Ue===4||Ue===3&&(he&62914560)===he&&300>mt()-$s?(be&2)===0&&Ll(e,0):uc|=a,Ol===he&&(Ol=0)),Qt(e)}function Ad(e,t){t===0&&(t=vu()),e=Za(e,t),e!==null&&(Pl(e,t),Qt(e))}function Wx(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Ad(e,a)}function Fx(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,s=e.memoizedState;s!==null&&(a=s.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(c(314))}l!==null&&l.delete(t),Ad(e,a)}function Px(e,t){return Ri(e,t)}var Ps=null,Bl=null,yc=!1,Is=!1,pc=!1,za=0;function Qt(e){e!==Bl&&e.next===null&&(Bl===null?Ps=Bl=e:Bl=Bl.next=e),Is=!0,yc||(yc=!0,eh())}function Dn(e,t){if(!pc&&Is){pc=!0;do for(var a=!1,l=Ps;l!==null;){if(e!==0){var s=l.pendingLanes;if(s===0)var i=0;else{var o=l.suspendedLanes,h=l.pingedLanes;i=(1<<31-ht(42|e)+1)-1,i&=s&~(o&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,wd(l,i))}else i=he,i=ls(l,l===Me?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||Fl(l,i)||(a=!0,wd(l,i));l=l.next}while(a);pc=!1}}function Ix(){Md()}function Md(){Is=yc=!1;var e=0;za!==0&&oh()&&(e=za);for(var t=mt(),a=null,l=Ps;l!==null;){var s=l.next,i=Rd(l,t);i===0?(l.next=null,a===null?Ps=s:a.next=s,s===null&&(Bl=a)):(a=l,(e!==0||(i&3)!==0)&&(Is=!0)),l=s}$e!==0&&$e!==5||Dn(e),za!==0&&(za=0)}function Rd(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-ht(i),h=1<<o,b=s[o];b===-1?((h&a)===0||(h&l)!==0)&&(s[o]=Cm(h,t)):b<=t&&(e.expiredLanes|=h),i&=~h}if(t=Me,a=he,a=ls(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Se===2||Se===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&zi(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Fl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&zi(l),Di(a)){case 2:case 8:a=yu;break;case 32:a=In;break;case 268435456:a=pu;break;default:a=In}return l=zd.bind(null,e),a=Ri(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&zi(l),e.callbackPriority=2,e.callbackNode=null,2}function zd(e,t){if($e!==0&&$e!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Fs()&&e.callbackNode!==a)return null;var l=he;return l=ls(e,e===Me?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(fd(e,l,t),Rd(e,mt()),e.callbackNode!=null&&e.callbackNode===a?zd.bind(null,e):null)}function wd(e,t){if(Fs())return null;fd(e,t,!0)}function eh(){dh(function(){(be&6)!==0?Ri(gu,Ix):Md()})}function vc(){if(za===0){var e=Sl;e===0&&(e=es,es<<=1,(es&261888)===0&&(es=256)),za=e}return za}function _d(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:rs(""+e)}function Dd(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function th(e,t,a,l,s){if(t==="submit"&&a&&a.stateNode===s){var i=_d((s[nt]||null).action),o=l.submitter;o&&(t=(t=o[nt]||null)?_d(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var h=new fs("action","action",null,l,s);e.push({event:h,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(za!==0){var b=o?Dd(s,o):new FormData(s);qr(a,{pending:!0,data:b,method:s.method,action:i},null,b)}}else typeof i=="function"&&(h.preventDefault(),b=o?Dd(s,o):new FormData(s),qr(a,{pending:!0,data:b,method:s.method,action:i},i,b))},currentTarget:s}]})}}for(var bc=0;bc<ar.length;bc++){var jc=ar[bc],ah=jc.toLowerCase(),lh=jc[0].toUpperCase()+jc.slice(1);Lt(ah,"on"+lh)}Lt(co,"onAnimationEnd"),Lt(uo,"onAnimationIteration"),Lt(oo,"onAnimationStart"),Lt("dblclick","onDoubleClick"),Lt("focusin","onFocus"),Lt("focusout","onBlur"),Lt(vx,"onTransitionRun"),Lt(bx,"onTransitionStart"),Lt(jx,"onTransitionCancel"),Lt(fo,"onTransitionEnd"),ul("onMouseEnter",["mouseout","mouseover"]),ul("onMouseLeave",["mouseout","mouseover"]),ul("onPointerEnter",["pointerout","pointerover"]),ul("onPointerLeave",["pointerout","pointerover"]),Xa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var On="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(" "),nh=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(On));function Od(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],s=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var o=l.length-1;0<=o;o--){var h=l[o],b=h.instance,R=h.currentTarget;if(h=h.listener,b!==i&&s.isPropagationStopped())break e;i=h,s.currentTarget=R;try{i(s)}catch(U){xs(U)}s.currentTarget=null,i=b}else for(o=0;o<l.length;o++){if(h=l[o],b=h.instance,R=h.currentTarget,h=h.listener,b!==i&&s.isPropagationStopped())break e;i=h,s.currentTarget=R;try{i(s)}catch(U){xs(U)}s.currentTarget=null,i=b}}}}function xe(e,t){var a=t[Oi];a===void 0&&(a=t[Oi]=new Set);var l=e+"__bubble";a.has(l)||(Ud(t,e,2,!1),a.add(l))}function Nc(e,t,a){var l=0;t&&(l|=4),Ud(a,e,l,t)}var ei="_reactListening"+Math.random().toString(36).slice(2);function Sc(e){if(!e[ei]){e[ei]=!0,Cu.forEach(function(a){a!=="selectionchange"&&(nh.has(a)||Nc(a,!1,e),Nc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ei]||(t[ei]=!0,Nc("selectionchange",!1,t))}}function Ud(e,t,a,l){switch(o0(t)){case 2:var s=_h;break;case 8:s=Dh;break;default:s=Bc}a=s.bind(null,t,a,e),s=void 0,!Qi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),l?s!==void 0?e.addEventListener(t,a,{capture:!0,passive:s}):e.addEventListener(t,a,!0):s!==void 0?e.addEventListener(t,a,{passive:s}):e.addEventListener(t,a,!1)}function Ec(e,t,a,l,s){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var o=l.tag;if(o===3||o===4){var h=l.stateNode.containerInfo;if(h===s)break;if(o===4)for(o=l.return;o!==null;){var b=o.tag;if((b===3||b===4)&&o.stateNode.containerInfo===s)return;o=o.return}for(;h!==null;){if(o=il(h),o===null)return;if(b=o.tag,b===5||b===6||b===26||b===27){l=i=o;continue e}h=h.parentNode}}l=l.return}Bu(function(){var R=i,U=Gi(a),q=[];e:{var z=mo.get(e);if(z!==void 0){var _=fs,J=e;switch(e){case"keypress":if(us(a)===0)break e;case"keydown":case"keyup":_=Fm;break;case"focusin":J="focus",_=ki;break;case"focusout":J="blur",_=ki;break;case"beforeblur":case"afterblur":_=ki;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_=Gu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=qm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=ex;break;case co:case uo:case oo:_=Xm;break;case fo:_=ax;break;case"scroll":case"scrollend":_=Hm;break;case"wheel":_=nx;break;case"copy":case"cut":case"paste":_=Vm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=Qu;break;case"toggle":case"beforetoggle":_=ix}var le=(t&4)!==0,Ae=!le&&(e==="scroll"||e==="scrollend"),T=le?z!==null?z+"Capture":null:z;le=[];for(var S=R,A;S!==null;){var H=S;if(A=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||A===null||T===null||(H=tn(S,T),H!=null&&le.push(Un(S,H,A))),Ae)break;S=S.return}0<le.length&&(z=new _(z,J,null,a,U),q.push({event:z,listeners:le}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",_=e==="mouseout"||e==="pointerout",z&&a!==Yi&&(J=a.relatedTarget||a.fromElement)&&(il(J)||J[sl]))break e;if((_||z)&&(z=U.window===U?U:(z=U.ownerDocument)?z.defaultView||z.parentWindow:window,_?(J=a.relatedTarget||a.toElement,_=R,J=J?il(J):null,J!==null&&(Ae=x(J),le=J.tag,J!==Ae||le!==5&&le!==27&&le!==6)&&(J=null)):(_=null,J=R),_!==J)){if(le=Gu,H="onMouseLeave",T="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(le=Qu,H="onPointerLeave",T="onPointerEnter",S="pointer"),Ae=_==null?z:en(_),A=J==null?z:en(J),z=new le(H,S+"leave",_,a,U),z.target=Ae,z.relatedTarget=A,H=null,il(U)===R&&(le=new le(T,S+"enter",J,a,U),le.target=A,le.relatedTarget=Ae,H=le),Ae=H,_&&J)t:{for(le=sh,T=_,S=J,A=0,H=T;H;H=le(H))A++;H=0;for(var ee=S;ee;ee=le(ee))H++;for(;0<A-H;)T=le(T),A--;for(;0<H-A;)S=le(S),H--;for(;A--;){if(T===S||S!==null&&T===S.alternate){le=T;break t}T=le(T),S=le(S)}le=null}else le=null;_!==null&&Ld(q,z,_,le,!1),J!==null&&Ae!==null&&Ld(q,Ae,J,le,!0)}}e:{if(z=R?en(R):window,_=z.nodeName&&z.nodeName.toLowerCase(),_==="select"||_==="input"&&z.type==="file")var pe=Fu;else if(Ju(z))if(Pu)pe=gx;else{pe=xx;var P=mx}else _=z.nodeName,!_||_.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?R&&qi(R.elementType)&&(pe=Fu):pe=hx;if(pe&&(pe=pe(e,R))){Wu(q,pe,a,U);break e}P&&P(e,z,R),e==="focusout"&&R&&z.type==="number"&&R.memoizedProps.value!=null&&Bi(z,"number",z.value)}switch(P=R?en(R):window,e){case"focusin":(Ju(P)||P.contentEditable==="true")&&(hl=P,Ii=R,on=null);break;case"focusout":on=Ii=hl=null;break;case"mousedown":er=!0;break;case"contextmenu":case"mouseup":case"dragend":er=!1,io(q,a,U);break;case"selectionchange":if(px)break;case"keydown":case"keyup":io(q,a,U)}var oe;if(Ji)e:{switch(e){case"compositionstart":var ge="onCompositionStart";break e;case"compositionend":ge="onCompositionEnd";break e;case"compositionupdate":ge="onCompositionUpdate";break e}ge=void 0}else xl?ku(e,a)&&(ge="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ge="onCompositionStart");ge&&(Vu&&a.locale!=="ko"&&(xl||ge!=="onCompositionStart"?ge==="onCompositionEnd"&&xl&&(oe=qu()):(xa=U,Vi="value"in xa?xa.value:xa.textContent,xl=!0)),P=ti(R,ge),0<P.length&&(ge=new Xu(ge,e,null,a,U),q.push({event:ge,listeners:P}),oe?ge.data=oe:(oe=Ku(a),oe!==null&&(ge.data=oe)))),(oe=cx?ux(e,a):ox(e,a))&&(ge=ti(R,"onBeforeInput"),0<ge.length&&(P=new Xu("onBeforeInput","beforeinput",null,a,U),q.push({event:P,listeners:ge}),P.data=oe)),th(q,e,R,a,U)}Od(q,t)})}function Un(e,t,a){return{instance:e,listener:t,currentTarget:a}}function ti(e,t){for(var a=t+"Capture",l=[];e!==null;){var s=e,i=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||i===null||(s=tn(e,a),s!=null&&l.unshift(Un(e,s,i)),s=tn(e,t),s!=null&&l.push(Un(e,s,i))),e.tag===3)return l;e=e.return}return[]}function sh(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ld(e,t,a,l,s){for(var i=t._reactName,o=[];a!==null&&a!==l;){var h=a,b=h.alternate,R=h.stateNode;if(h=h.tag,b!==null&&b===l)break;h!==5&&h!==26&&h!==27||R===null||(b=R,s?(R=tn(a,i),R!=null&&o.unshift(Un(a,R,b))):s||(R=tn(a,i),R!=null&&o.push(Un(a,R,b)))),a=a.return}o.length!==0&&e.push({event:t,listeners:o})}var ih=/\r\n?/g,rh=/\u0000|\uFFFD/g;function Hd(e){return(typeof e=="string"?e:""+e).replace(ih,`
|
|
9
|
+
`).replace(rh,"")}function Bd(e,t){return t=Hd(t),Hd(e)===t}function Ce(e,t,a,l,s,i){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||fl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&fl(e,""+l);break;case"className":ss(e,"class",l);break;case"tabIndex":ss(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ss(e,a,l);break;case"style":Lu(e,l,i);break;case"data":if(t!=="object"){ss(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=rs(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(a==="formAction"?(t!=="input"&&Ce(e,t,"name",s.name,s,null),Ce(e,t,"formEncType",s.formEncType,s,null),Ce(e,t,"formMethod",s.formMethod,s,null),Ce(e,t,"formTarget",s.formTarget,s,null)):(Ce(e,t,"encType",s.encType,s,null),Ce(e,t,"method",s.method,s,null),Ce(e,t,"target",s.target,s,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=rs(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Zt);break;case"onScroll":l!=null&&xe("scroll",e);break;case"onScrollEnd":l!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(c(61));if(a=l.__html,a!=null){if(s.children!=null)throw Error(c(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=rs(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":xe("beforetoggle",e),xe("toggle",e),ns(e,"popover",l);break;case"xlinkActuate":$t(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":$t(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":$t(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":$t(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":$t(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":$t(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":$t(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":$t(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":$t(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ns(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Um.get(a)||a,ns(e,a,l))}}function Tc(e,t,a,l,s,i){switch(a){case"style":Lu(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(c(61));if(a=l.__html,a!=null){if(s.children!=null)throw Error(c(60));e.innerHTML=a}}break;case"children":typeof l=="string"?fl(e,l):(typeof l=="number"||typeof l=="bigint")&&fl(e,""+l);break;case"onScroll":l!=null&&xe("scroll",e);break;case"onScrollEnd":l!=null&&xe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Zt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Au.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(s=a.endsWith("Capture"),t=a.slice(2,s?a.length-7:void 0),i=e[nt]||null,i=i!=null?i[a]:null,typeof i=="function"&&e.removeEventListener(t,i,s),typeof l=="function")){typeof i!="function"&&i!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,s);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):ns(e,a,l)}}}function et(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var l=!1,s=!1,i;for(i in a)if(a.hasOwnProperty(i)){var o=a[i];if(o!=null)switch(i){case"src":l=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Ce(e,t,i,o,a,null)}}s&&Ce(e,t,"srcSet",a.srcSet,a,null),l&&Ce(e,t,"src",a.src,a,null);return;case"input":xe("invalid",e);var h=i=o=s=null,b=null,R=null;for(l in a)if(a.hasOwnProperty(l)){var U=a[l];if(U!=null)switch(l){case"name":s=U;break;case"type":o=U;break;case"checked":b=U;break;case"defaultChecked":R=U;break;case"value":i=U;break;case"defaultValue":h=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(c(137,t));break;default:Ce(e,t,l,U,a,null)}}_u(e,i,h,b,R,o,s,!1);return;case"select":xe("invalid",e),l=o=i=null;for(s in a)if(a.hasOwnProperty(s)&&(h=a[s],h!=null))switch(s){case"value":i=h;break;case"defaultValue":o=h;break;case"multiple":l=h;default:Ce(e,t,s,h,a,null)}t=i,a=o,e.multiple=!!l,t!=null?ol(e,!!l,t,!1):a!=null&&ol(e,!!l,a,!0);return;case"textarea":xe("invalid",e),i=s=l=null;for(o in a)if(a.hasOwnProperty(o)&&(h=a[o],h!=null))switch(o){case"value":l=h;break;case"defaultValue":s=h;break;case"children":i=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(c(91));break;default:Ce(e,t,o,h,a,null)}Ou(e,l,s,i);return;case"option":for(b in a)a.hasOwnProperty(b)&&(l=a[b],l!=null)&&(b==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Ce(e,t,b,l,a,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(l=0;l<On.length;l++)xe(On[l],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(R in a)if(a.hasOwnProperty(R)&&(l=a[R],l!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Ce(e,t,R,l,a,null)}return;default:if(qi(t)){for(U in a)a.hasOwnProperty(U)&&(l=a[U],l!==void 0&&Tc(e,t,U,l,a,void 0));return}}for(h in a)a.hasOwnProperty(h)&&(l=a[h],l!=null&&Ce(e,t,h,l,a,null))}function ch(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,i=null,o=null,h=null,b=null,R=null,U=null;for(_ in a){var q=a[_];if(a.hasOwnProperty(_)&&q!=null)switch(_){case"checked":break;case"value":break;case"defaultValue":b=q;default:l.hasOwnProperty(_)||Ce(e,t,_,null,l,q)}}for(var z in l){var _=l[z];if(q=a[z],l.hasOwnProperty(z)&&(_!=null||q!=null))switch(z){case"type":i=_;break;case"name":s=_;break;case"checked":R=_;break;case"defaultChecked":U=_;break;case"value":o=_;break;case"defaultValue":h=_;break;case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(c(137,t));break;default:_!==q&&Ce(e,t,z,_,l,q)}}Hi(e,o,h,b,R,U,i,s);return;case"select":_=o=h=z=null;for(i in a)if(b=a[i],a.hasOwnProperty(i)&&b!=null)switch(i){case"value":break;case"multiple":_=b;default:l.hasOwnProperty(i)||Ce(e,t,i,null,l,b)}for(s in l)if(i=l[s],b=a[s],l.hasOwnProperty(s)&&(i!=null||b!=null))switch(s){case"value":z=i;break;case"defaultValue":h=i;break;case"multiple":o=i;default:i!==b&&Ce(e,t,s,i,l,b)}t=h,a=o,l=_,z!=null?ol(e,!!a,z,!1):!!l!=!!a&&(t!=null?ol(e,!!a,t,!0):ol(e,!!a,a?[]:"",!1));return;case"textarea":_=z=null;for(h in a)if(s=a[h],a.hasOwnProperty(h)&&s!=null&&!l.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:Ce(e,t,h,null,l,s)}for(o in l)if(s=l[o],i=a[o],l.hasOwnProperty(o)&&(s!=null||i!=null))switch(o){case"value":z=s;break;case"defaultValue":_=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(c(91));break;default:s!==i&&Ce(e,t,o,s,l,i)}Du(e,z,_);return;case"option":for(var J in a)z=a[J],a.hasOwnProperty(J)&&z!=null&&!l.hasOwnProperty(J)&&(J==="selected"?e.selected=!1:Ce(e,t,J,null,l,z));for(b in l)z=l[b],_=a[b],l.hasOwnProperty(b)&&z!==_&&(z!=null||_!=null)&&(b==="selected"?e.selected=z&&typeof z!="function"&&typeof z!="symbol":Ce(e,t,b,z,l,_));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var le in a)z=a[le],a.hasOwnProperty(le)&&z!=null&&!l.hasOwnProperty(le)&&Ce(e,t,le,null,l,z);for(R in l)if(z=l[R],_=a[R],l.hasOwnProperty(R)&&z!==_&&(z!=null||_!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(c(137,t));break;default:Ce(e,t,R,z,l,_)}return;default:if(qi(t)){for(var Ae in a)z=a[Ae],a.hasOwnProperty(Ae)&&z!==void 0&&!l.hasOwnProperty(Ae)&&Tc(e,t,Ae,void 0,l,z);for(U in l)z=l[U],_=a[U],!l.hasOwnProperty(U)||z===_||z===void 0&&_===void 0||Tc(e,t,U,z,l,_);return}}for(var T in a)z=a[T],a.hasOwnProperty(T)&&z!=null&&!l.hasOwnProperty(T)&&Ce(e,t,T,null,l,z);for(q in l)z=l[q],_=a[q],!l.hasOwnProperty(q)||z===_||z==null&&_==null||Ce(e,t,q,z,l,_)}function qd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function uh(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var s=a[l],i=s.transferSize,o=s.initiatorType,h=s.duration;if(i&&h&&qd(o)){for(o=0,h=s.responseEnd,l+=1;l<a.length;l++){var b=a[l],R=b.startTime;if(R>h)break;var U=b.transferSize,q=b.initiatorType;U&&qd(q)&&(b=b.responseEnd,o+=U*(b<h?1:(h-R)/(b-R)))}if(--l,t+=8*(i+o)/(s.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 Cc=null,Ac=null;function ai(e){return e.nodeType===9?e:e.ownerDocument}function Yd(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 Gd(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 Mc(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 Rc=null;function oh(){var e=window.event;return e&&e.type==="popstate"?e===Rc?!1:(Rc=e,!0):(Rc=null,!1)}var Xd=typeof setTimeout=="function"?setTimeout:void 0,fh=typeof clearTimeout=="function"?clearTimeout:void 0,Qd=typeof Promise=="function"?Promise:void 0,dh=typeof queueMicrotask=="function"?queueMicrotask:typeof Qd<"u"?function(e){return Qd.resolve(null).then(e).catch(mh)}:Xd;function mh(e){setTimeout(function(){throw e})}function wa(e){return e==="head"}function Vd(e,t){var a=t,l=0;do{var s=a.nextSibling;if(e.removeChild(a),s&&s.nodeType===8)if(a=s.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(s),Xl(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Ln(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ln(a);for(var i=a.firstChild;i;){var o=i.nextSibling,h=i.nodeName;i[Il]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||a.removeChild(i),i=o}}else a==="body"&&Ln(e.ownerDocument.body);a=s}while(a);Xl(t)}function $d(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function zc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":zc(a),Ui(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function xh(e,t,a,l){for(;e.nodeType===1;){var s=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Il])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Dt(e.nextSibling),e===null)break}return null}function hh(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Dt(e.nextSibling),e===null))return null;return e}function Zd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Dt(e.nextSibling),e===null))return null;return e}function wc(e){return e.data==="$?"||e.data==="$~"}function _c(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function gh(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Dt(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 Dc=null;function kd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Dt(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Kd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Jd(e,t,a){switch(t=ai(a),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function Ln(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ui(e)}var Ot=new Map,Wd=new Set;function li(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ca=V.d;V.d={f:yh,r:ph,D:vh,C:bh,L:jh,m:Nh,X:Eh,S:Sh,M:Th};function yh(){var e=ca.f(),t=Ks();return e||t}function ph(e){var t=rl(e);t!==null&&t.tag===5&&t.type==="form"?mf(t):ca.r(e)}var ql=typeof document>"u"?null:document;function Fd(e,t,a){var l=ql;if(l&&typeof t=="string"&&t){var s=Ct(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof a=="string"&&(s+='[crossorigin="'+a+'"]'),Wd.has(s)||(Wd.add(s),e={rel:e,crossOrigin:a,href:t},l.querySelector(s)===null&&(t=l.createElement("link"),et(t,"link",e),ke(t),l.head.appendChild(t)))}}function vh(e){ca.D(e),Fd("dns-prefetch",e,null)}function bh(e,t){ca.C(e,t),Fd("preconnect",e,t)}function jh(e,t,a){ca.L(e,t,a);var l=ql;if(l&&e&&t){var s='link[rel="preload"][as="'+Ct(t)+'"]';t==="image"&&a&&a.imageSrcSet?(s+='[imagesrcset="'+Ct(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(s+='[imagesizes="'+Ct(a.imageSizes)+'"]')):s+='[href="'+Ct(e)+'"]';var i=s;switch(t){case"style":i=Yl(e);break;case"script":i=Gl(e)}Ot.has(i)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ot.set(i,e),l.querySelector(s)!==null||t==="style"&&l.querySelector(Hn(i))||t==="script"&&l.querySelector(Bn(i))||(t=l.createElement("link"),et(t,"link",e),ke(t),l.head.appendChild(t)))}}function Nh(e,t){ca.m(e,t);var a=ql;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Ct(l)+'"][href="'+Ct(e)+'"]',i=s;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Gl(e)}if(!Ot.has(i)&&(e=y({rel:"modulepreload",href:e},t),Ot.set(i,e),a.querySelector(s)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Bn(i)))return}l=a.createElement("link"),et(l,"link",e),ke(l),a.head.appendChild(l)}}}function Sh(e,t,a){ca.S(e,t,a);var l=ql;if(l&&e){var s=cl(l).hoistableStyles,i=Yl(e);t=t||"default";var o=s.get(i);if(!o){var h={loading:0,preload:null};if(o=l.querySelector(Hn(i)))h.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ot.get(i))&&Oc(e,a);var b=o=l.createElement("link");ke(b),et(b,"link",e),b._p=new Promise(function(R,U){b.onload=R,b.onerror=U}),b.addEventListener("load",function(){h.loading|=1}),b.addEventListener("error",function(){h.loading|=2}),h.loading|=4,ni(o,t,l)}o={type:"stylesheet",instance:o,count:1,state:h},s.set(i,o)}}}function Eh(e,t){ca.X(e,t);var a=ql;if(a&&e){var l=cl(a).hoistableScripts,s=Gl(e),i=l.get(s);i||(i=a.querySelector(Bn(s)),i||(e=y({src:e,async:!0},t),(t=Ot.get(s))&&Uc(e,t),i=a.createElement("script"),ke(i),et(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(s,i))}}function Th(e,t){ca.M(e,t);var a=ql;if(a&&e){var l=cl(a).hoistableScripts,s=Gl(e),i=l.get(s);i||(i=a.querySelector(Bn(s)),i||(e=y({src:e,async:!0,type:"module"},t),(t=Ot.get(s))&&Uc(e,t),i=a.createElement("script"),ke(i),et(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(s,i))}}function Pd(e,t,a,l){var s=(s=fe.current)?li(s):null;if(!s)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Yl(a.href),a=cl(s).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Yl(a.href);var i=cl(s).hoistableStyles,o=i.get(e);if(o||(s=s.ownerDocument||s,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=s.querySelector(Hn(e)))&&!i._p&&(o.instance=i,o.state.loading=5),Ot.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Ot.set(e,a),i||Ch(s,e,a,o.state))),t&&l===null)throw Error(c(528,""));return o}if(t&&l!==null)throw Error(c(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Gl(a),a=cl(s).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Yl(e){return'href="'+Ct(e)+'"'}function Hn(e){return'link[rel="stylesheet"]['+e+"]"}function Id(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Ch(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),et(t,"link",a),ke(t),e.head.appendChild(t))}function Gl(e){return'[src="'+Ct(e)+'"]'}function Bn(e){return"script[async]"+e}function e0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Ct(a.href)+'"]');if(l)return t.instance=l,ke(l),l;var s=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),ke(l),et(l,"style",s),ni(l,a.precedence,e),t.instance=l;case"stylesheet":s=Yl(a.href);var i=e.querySelector(Hn(s));if(i)return t.state.loading|=4,t.instance=i,ke(i),i;l=Id(a),(s=Ot.get(s))&&Oc(l,s),i=(e.ownerDocument||e).createElement("link"),ke(i);var o=i;return o._p=new Promise(function(h,b){o.onload=h,o.onerror=b}),et(i,"link",l),t.state.loading|=4,ni(i,a.precedence,e),t.instance=i;case"script":return i=Gl(a.src),(s=e.querySelector(Bn(i)))?(t.instance=s,ke(s),s):(l=a,(s=Ot.get(i))&&(l=y({},a),Uc(l,s)),e=e.ownerDocument||e,s=e.createElement("script"),ke(s),et(s,"link",l),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ni(l,a.precedence,e));return t.instance}function ni(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=l.length?l[l.length-1]:null,i=s,o=0;o<l.length;o++){var h=l[o];if(h.dataset.precedence===t)i=h;else if(i!==s)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Oc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Uc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var si=null;function t0(e,t,a){if(si===null){var l=new Map,s=si=new Map;s.set(a,l)}else s=si,l=s.get(a),l||(l=new Map,s.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),s=0;s<a.length;s++){var i=a[s];if(!(i[Il]||i[We]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var h=l.get(o);h?h.push(i):l.set(o,[i])}}return l}function a0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Ah(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function l0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Mh(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var s=Yl(l.href),i=t.querySelector(Hn(s));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ii.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,ke(i);return}i=t.ownerDocument||t,l=Id(l),(s=Ot.get(s))&&Oc(l,s),i=i.createElement("link"),ke(i);var o=i;o._p=new Promise(function(h,b){o.onload=h,o.onerror=b}),et(i,"link",l),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ii.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Lc=0;function Rh(e,t){return e.stylesheets&&e.count===0&&ci(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&ci(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Lc===0&&(Lc=62500*uh());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ci(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Lc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(s)}}:null}function ii(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ci(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ri=null;function ci(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ri=new Map,t.forEach(zh,e),ri=null,ii.call(e))}function zh(e,t){if(!(t.state.loading&4)){var a=ri.get(e);if(a)var l=a.get(null);else{a=new Map,ri.set(e,a);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<s.length;i++){var o=s[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(a.set(o.dataset.precedence,o),l=o)}l&&a.set(null,l)}s=t.instance,o=s.getAttribute("data-precedence"),i=a.get(o)||l,i===l&&a.set(null,s),a.set(o,s),this.count++,l=ii.bind(this),s.addEventListener("load",l),s.addEventListener("error",l),i?i.parentNode.insertBefore(s,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var qn={$$typeof:Q,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function wh(e,t,a,l,s,i,o,h,b){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=wi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wi(0),this.hiddenUpdates=wi(null),this.identifierPrefix=l,this.onUncaughtError=s,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function n0(e,t,a,l,s,i,o,h,b,R,U,q){return e=new wh(e,t,a,o,b,R,U,q,h),t=1,i===!0&&(t|=24),i=yt(3,null,null,t),e.current=i,i.stateNode=e,t=hr(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:a,cache:t},vr(i),e}function s0(e){return e?(e=pl,e):pl}function i0(e,t,a,l,s,i){s=s0(s),l.context===null?l.context=s:l.pendingContext=s,l=ba(t),l.payload={element:a},i=i===void 0?null:i,i!==null&&(l.callback=i),a=ja(e,l,t),a!==null&&(ot(a,e,t),yn(a,e,t))}function r0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Hc(e,t){r0(e,t),(e=e.alternate)&&r0(e,t)}function c0(e){if(e.tag===13||e.tag===31){var t=Za(e,67108864);t!==null&&ot(t,e,67108864),Hc(e,67108864)}}function u0(e){if(e.tag===13||e.tag===31){var t=Nt();t=_i(t);var a=Za(e,t);a!==null&&ot(a,e,t),Hc(e,t)}}var ui=!0;function _h(e,t,a,l){var s=O.T;O.T=null;var i=V.p;try{V.p=2,Bc(e,t,a,l)}finally{V.p=i,O.T=s}}function Dh(e,t,a,l){var s=O.T;O.T=null;var i=V.p;try{V.p=8,Bc(e,t,a,l)}finally{V.p=i,O.T=s}}function Bc(e,t,a,l){if(ui){var s=qc(l);if(s===null)Ec(e,t,l,oi,a),f0(e,l);else if(Uh(s,e,t,a,l))l.stopPropagation();else if(f0(e,l),t&4&&-1<Oh.indexOf(e)){for(;s!==null;){var i=rl(s);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Ga(i.pendingLanes);if(o!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var b=1<<31-ht(o);h.entanglements[1]|=b,o&=~b}Qt(i),(be&6)===0&&(Zs=mt()+500,Dn(0))}}break;case 31:case 13:h=Za(i,2),h!==null&&ot(h,i,2),Ks(),Hc(i,2)}if(i=qc(l),i===null&&Ec(e,t,l,oi,a),i===s)break;s=i}s!==null&&l.stopPropagation()}else Ec(e,t,l,null,a)}}function qc(e){return e=Gi(e),Yc(e)}var oi=null;function Yc(e){if(oi=null,e=il(e),e!==null){var t=x(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=g(t),e!==null)return e;e=null}else if(a===31){if(e=j(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return oi=e,null}function o0(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(vm()){case gu:return 2;case yu:return 8;case In:case bm:return 32;case pu:return 268435456;default:return 32}default:return 32}}var Gc=!1,_a=null,Da=null,Oa=null,Yn=new Map,Gn=new Map,Ua=[],Oh="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 f0(e,t){switch(e){case"focusin":case"focusout":_a=null;break;case"dragenter":case"dragleave":Da=null;break;case"mouseover":case"mouseout":Oa=null;break;case"pointerover":case"pointerout":Yn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gn.delete(t.pointerId)}}function Xn(e,t,a,l,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:i,targetContainers:[s]},t!==null&&(t=rl(t),t!==null&&c0(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Uh(e,t,a,l,s){switch(t){case"focusin":return _a=Xn(_a,e,t,a,l,s),!0;case"dragenter":return Da=Xn(Da,e,t,a,l,s),!0;case"mouseover":return Oa=Xn(Oa,e,t,a,l,s),!0;case"pointerover":var i=s.pointerId;return Yn.set(i,Xn(Yn.get(i)||null,e,t,a,l,s)),!0;case"gotpointercapture":return i=s.pointerId,Gn.set(i,Xn(Gn.get(i)||null,e,t,a,l,s)),!0}return!1}function d0(e){var t=il(e.target);if(t!==null){var a=x(t);if(a!==null){if(t=a.tag,t===13){if(t=g(a),t!==null){e.blockedOn=t,Eu(e.priority,function(){u0(a)});return}}else if(t===31){if(t=j(a),t!==null){e.blockedOn=t,Eu(e.priority,function(){u0(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function fi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=qc(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Yi=l,a.target.dispatchEvent(l),Yi=null}else return t=rl(a),t!==null&&c0(t),e.blockedOn=a,!1;t.shift()}return!0}function m0(e,t,a){fi(e)&&a.delete(t)}function Lh(){Gc=!1,_a!==null&&fi(_a)&&(_a=null),Da!==null&&fi(Da)&&(Da=null),Oa!==null&&fi(Oa)&&(Oa=null),Yn.forEach(m0),Gn.forEach(m0)}function di(e,t){e.blockedOn===t&&(e.blockedOn=null,Gc||(Gc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Lh)))}var mi=null;function x0(e){mi!==e&&(mi=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){mi===e&&(mi=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],s=e[t+2];if(typeof l!="function"){if(Yc(l||a)===null)continue;break}var i=rl(a);i!==null&&(e.splice(t,3),t-=3,qr(i,{pending:!0,data:s,method:a.method,action:l},l,s))}}))}function Xl(e){function t(b){return di(b,e)}_a!==null&&di(_a,e),Da!==null&&di(Da,e),Oa!==null&&di(Oa,e),Yn.forEach(t),Gn.forEach(t);for(var a=0;a<Ua.length;a++){var l=Ua[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ua.length&&(a=Ua[0],a.blockedOn===null);)d0(a),a.blockedOn===null&&Ua.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var s=a[l],i=a[l+1],o=s[nt]||null;if(typeof i=="function")o||x0(a);else if(o){var h=null;if(i&&i.hasAttribute("formAction")){if(s=i,o=i[nt]||null)h=o.formAction;else if(Yc(s)!==null)continue}else h=o.action;typeof h=="function"?a[l+1]=h:(a.splice(l,3),l-=3),x0(a)}}}function h0(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return s=o})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Xc(e){this._internalRoot=e}xi.prototype.render=Xc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,l=Nt();i0(a,l,e,t,null,null)},xi.prototype.unmount=Xc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;i0(e.current,2,null,e,null,null),Ks(),t[sl]=null}};function xi(e){this._internalRoot=e}xi.prototype.unstable_scheduleHydration=function(e){if(e){var t=Su();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ua.length&&t!==0&&t<Ua[a].priority;a++);Ua.splice(a,0,e),a===0&&d0(e)}};var g0=f.version;if(g0!=="19.2.4")throw Error(c(527,g0,"19.2.4"));V.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=m(t),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var Hh={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hi.isDisabled&&hi.supportsFiber)try{Wl=hi.inject(Hh),xt=hi}catch{}}return Vn.createRoot=function(e,t){if(!d(e))throw Error(c(299));var a=!1,l="",s=Sf,i=Ef,o=Tf;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=n0(e,1,!1,null,null,a,l,null,s,i,o,h0),e[sl]=t.current,Sc(e),new Xc(t)},Vn.hydrateRoot=function(e,t,a){if(!d(e))throw Error(c(299));var l=!1,s="",i=Sf,o=Ef,h=Tf,b=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(i=a.onUncaughtError),a.onCaughtError!==void 0&&(o=a.onCaughtError),a.onRecoverableError!==void 0&&(h=a.onRecoverableError),a.formState!==void 0&&(b=a.formState)),t=n0(e,1,!0,t,a??null,l,s,b,i,o,h,h0),t.context=s0(null),a=t.current,l=Nt(),l=_i(l),s=ba(l),s.callback=null,ja(a,s,l),a=l,t.current.lanes=a,Pl(t,a),Qt(t),e[sl]=t.current,Sc(e),new xi(t)},Vn.version="19.2.4",Vn}var C0;function kh(){if(C0)return $c.exports;C0=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(f){console.error(f)}}return r(),$c.exports=Zh(),$c.exports}var Kh=kh();var A0="popstate";function Jh(r={}){function f(c,d){let{pathname:x,search:g,hash:j}=c.location;return eu("",{pathname:x,search:g,hash:j},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function u(c,d){return typeof d=="string"?d:kn(d)}return Fh(f,u,null,r)}function _e(r,f){if(r===!1||r===null||typeof r>"u")throw new Error(f)}function qt(r,f){if(!r){typeof console<"u"&&console.warn(f);try{throw new Error(f)}catch{}}}function Wh(){return Math.random().toString(36).substring(2,10)}function M0(r,f){return{usr:r.state,key:r.key,idx:f}}function eu(r,f,u=null,c){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof f=="string"?Zl(f):f,state:u,key:f&&f.key||c||Wh()}}function kn({pathname:r="/",search:f="",hash:u=""}){return f&&f!=="?"&&(r+=f.charAt(0)==="?"?f:"?"+f),u&&u!=="#"&&(r+=u.charAt(0)==="#"?u:"#"+u),r}function Zl(r){let f={};if(r){let u=r.indexOf("#");u>=0&&(f.hash=r.substring(u),r=r.substring(0,u));let c=r.indexOf("?");c>=0&&(f.search=r.substring(c),r=r.substring(0,c)),r&&(f.pathname=r)}return f}function Fh(r,f,u,c={}){let{window:d=document.defaultView,v5Compat:x=!1}=c,g=d.history,j="POP",v=null,m=p();m==null&&(m=0,g.replaceState({...g.state,idx:m},""));function p(){return(g.state||{idx:null}).idx}function y(){j="POP";let w=p(),G=w==null?null:w-m;m=w,v&&v({action:j,location:X.location,delta:G})}function C(w,G){j="PUSH";let M=eu(X.location,w,G);m=p()+1;let Q=M0(M,m),se=X.createHref(M);try{g.pushState(Q,"",se)}catch(te){if(te instanceof DOMException&&te.name==="DataCloneError")throw te;d.location.assign(se)}x&&v&&v({action:j,location:X.location,delta:1})}function L(w,G){j="REPLACE";let M=eu(X.location,w,G);m=p();let Q=M0(M,m),se=X.createHref(M);g.replaceState(Q,"",se),x&&v&&v({action:j,location:X.location,delta:0})}function D(w){return Ph(w)}let X={get action(){return j},get location(){return r(d,g)},listen(w){if(v)throw new Error("A history only accepts one active listener");return d.addEventListener(A0,y),v=w,()=>{d.removeEventListener(A0,y),v=null}},createHref(w){return f(d,w)},createURL:D,encodeLocation(w){let G=D(w);return{pathname:G.pathname,search:G.search,hash:G.hash}},push:C,replace:L,go(w){return g.go(w)}};return X}function Ph(r,f=!1){let u="http://localhost";typeof window<"u"&&(u=window.location.origin!=="null"?window.location.origin:window.location.href),_e(u,"No window.location.(origin|href) available to create URL");let c=typeof r=="string"?r:kn(r);return c=c.replace(/ $/,"%20"),!f&&c.startsWith("//")&&(c=u+c),new URL(c,u)}function G0(r,f,u="/"){return Ih(r,f,u,!1)}function Ih(r,f,u,c){let d=typeof f=="string"?Zl(f):f,x=oa(d.pathname||"/",u);if(x==null)return null;let g=X0(r);eg(g);let j=null;for(let v=0;j==null&&v<g.length;++v){let m=fg(x);j=ug(g[v],m,c)}return j}function X0(r,f=[],u=[],c="",d=!1){let x=(g,j,v=d,m)=>{let p={relativePath:m===void 0?g.path||"":m,caseSensitive:g.caseSensitive===!0,childrenIndex:j,route:g};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(c)&&v)return;_e(p.relativePath.startsWith(c),`Absolute route path "${p.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(c.length)}let y=ua([c,p.relativePath]),C=u.concat(p);g.children&&g.children.length>0&&(_e(g.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),X0(g.children,f,C,y,v)),!(g.path==null&&!g.index)&&f.push({path:y,score:rg(y,g.index),routesMeta:C})};return r.forEach((g,j)=>{if(g.path===""||!g.path?.includes("?"))x(g,j);else for(let v of Q0(g.path))x(g,j,!0,v)}),f}function Q0(r){let f=r.split("/");if(f.length===0)return[];let[u,...c]=f,d=u.endsWith("?"),x=u.replace(/\?$/,"");if(c.length===0)return d?[x,""]:[x];let g=Q0(c.join("/")),j=[];return j.push(...g.map(v=>v===""?x:[x,v].join("/"))),d&&j.push(...g),j.map(v=>r.startsWith("/")&&v===""?"/":v)}function eg(r){r.sort((f,u)=>f.score!==u.score?u.score-f.score:cg(f.routesMeta.map(c=>c.childrenIndex),u.routesMeta.map(c=>c.childrenIndex)))}var tg=/^:[\w-]+$/,ag=3,lg=2,ng=1,sg=10,ig=-2,R0=r=>r==="*";function rg(r,f){let u=r.split("/"),c=u.length;return u.some(R0)&&(c+=ig),f&&(c+=lg),u.filter(d=>!R0(d)).reduce((d,x)=>d+(tg.test(x)?ag:x===""?ng:sg),c)}function cg(r,f){return r.length===f.length&&r.slice(0,-1).every((c,d)=>c===f[d])?r[r.length-1]-f[f.length-1]:0}function ug(r,f,u=!1){let{routesMeta:c}=r,d={},x="/",g=[];for(let j=0;j<c.length;++j){let v=c[j],m=j===c.length-1,p=x==="/"?f:f.slice(x.length)||"/",y=ji({path:v.relativePath,caseSensitive:v.caseSensitive,end:m},p),C=v.route;if(!y&&m&&u&&!c[c.length-1].route.index&&(y=ji({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},p)),!y)return null;Object.assign(d,y.params),g.push({params:d,pathname:ua([x,y.pathname]),pathnameBase:hg(ua([x,y.pathnameBase])),route:C}),y.pathnameBase!=="/"&&(x=ua([x,y.pathnameBase]))}return g}function ji(r,f){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[u,c]=og(r.path,r.caseSensitive,r.end),d=f.match(u);if(!d)return null;let x=d[0],g=x.replace(/(.)\/+$/,"$1"),j=d.slice(1);return{params:c.reduce((m,{paramName:p,isOptional:y},C)=>{if(p==="*"){let D=j[C]||"";g=x.slice(0,x.length-D.length).replace(/(.)\/+$/,"$1")}const L=j[C];return y&&!L?m[p]=void 0:m[p]=(L||"").replace(/%2F/g,"/"),m},{}),pathname:x,pathnameBase:g,pattern:r}}function og(r,f=!1,u=!0){qt(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let c=[],d="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(g,j,v)=>(c.push({paramName:j,isOptional:v!=null}),v?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(c.push({paramName:"*"}),d+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):u?d+="\\/*$":r!==""&&r!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,f?void 0:"i"),c]}function fg(r){try{return r.split("/").map(f=>decodeURIComponent(f).replace(/\//g,"%2F")).join("/")}catch(f){return qt(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${f}).`),r}}function oa(r,f){if(f==="/")return r;if(!r.toLowerCase().startsWith(f.toLowerCase()))return null;let u=f.endsWith("/")?f.length-1:f.length,c=r.charAt(u);return c&&c!=="/"?null:r.slice(u)||"/"}var dg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function mg(r,f="/"){let{pathname:u,search:c="",hash:d=""}=typeof r=="string"?Zl(r):r,x;return u?(u=u.replace(/\/\/+/g,"/"),u.startsWith("/")?x=z0(u.substring(1),"/"):x=z0(u,f)):x=f,{pathname:x,search:gg(c),hash:yg(d)}}function z0(r,f){let u=f.replace(/\/+$/,"").split("/");return r.split("/").forEach(d=>{d===".."?u.length>1&&u.pop():d!=="."&&u.push(d)}),u.length>1?u.join("/"):"/"}function Jc(r,f,u,c){return`Cannot include a '${r}' character in a manually specified \`to.${f}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${u}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function xg(r){return r.filter((f,u)=>u===0||f.route.path&&f.route.path.length>0)}function V0(r){let f=xg(r);return f.map((u,c)=>c===f.length-1?u.pathname:u.pathnameBase)}function $0(r,f,u,c=!1){let d;typeof r=="string"?d=Zl(r):(d={...r},_e(!d.pathname||!d.pathname.includes("?"),Jc("?","pathname","search",d)),_e(!d.pathname||!d.pathname.includes("#"),Jc("#","pathname","hash",d)),_e(!d.search||!d.search.includes("#"),Jc("#","search","hash",d)));let x=r===""||d.pathname==="",g=x?"/":d.pathname,j;if(g==null)j=u;else{let y=f.length-1;if(!c&&g.startsWith("..")){let C=g.split("/");for(;C[0]==="..";)C.shift(),y-=1;d.pathname=C.join("/")}j=y>=0?f[y]:"/"}let v=mg(d,j),m=g&&g!=="/"&&g.endsWith("/"),p=(x||g===".")&&u.endsWith("/");return!v.pathname.endsWith("/")&&(m||p)&&(v.pathname+="/"),v}var ua=r=>r.join("/").replace(/\/\/+/g,"/"),hg=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),gg=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,yg=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,pg=class{constructor(r,f,u,c=!1){this.status=r,this.statusText=f||"",this.internal=c,u instanceof Error?(this.data=u.toString(),this.error=u):this.data=u}};function vg(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function bg(r){return r.map(f=>f.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Z0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function k0(r,f){let u=r;if(typeof u!="string"||!dg.test(u))return{absoluteURL:void 0,isExternal:!1,to:u};let c=u,d=!1;if(Z0)try{let x=new URL(window.location.href),g=u.startsWith("//")?new URL(x.protocol+u):new URL(u),j=oa(g.pathname,f);g.origin===x.origin&&j!=null?u=j+g.search+g.hash:d=!0}catch{qt(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:d,to:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var K0=["POST","PUT","PATCH","DELETE"];new Set(K0);var jg=["GET",...K0];new Set(jg);var kl=N.createContext(null);kl.displayName="DataRouter";var Ni=N.createContext(null);Ni.displayName="DataRouterState";var Ng=N.createContext(!1),J0=N.createContext({isTransitioning:!1});J0.displayName="ViewTransition";var Sg=N.createContext(new Map);Sg.displayName="Fetchers";var Eg=N.createContext(null);Eg.displayName="Await";var Ut=N.createContext(null);Ut.displayName="Navigation";var Kn=N.createContext(null);Kn.displayName="Location";var Vt=N.createContext({outlet:null,matches:[],isDataRoute:!1});Vt.displayName="Route";var nu=N.createContext(null);nu.displayName="RouteError";var W0="REACT_ROUTER_ERROR",Tg="REDIRECT",Cg="ROUTE_ERROR_RESPONSE";function Ag(r){if(r.startsWith(`${W0}:${Tg}:{`))try{let f=JSON.parse(r.slice(28));if(typeof f=="object"&&f&&typeof f.status=="number"&&typeof f.statusText=="string"&&typeof f.location=="string"&&typeof f.reloadDocument=="boolean"&&typeof f.replace=="boolean")return f}catch{}}function Mg(r){if(r.startsWith(`${W0}:${Cg}:{`))try{let f=JSON.parse(r.slice(40));if(typeof f=="object"&&f&&typeof f.status=="number"&&typeof f.statusText=="string")return new pg(f.status,f.statusText,f.data)}catch{}}function Rg(r,{relative:f}={}){_e(Jn(),"useHref() may be used only in the context of a <Router> component.");let{basename:u,navigator:c}=N.useContext(Ut),{hash:d,pathname:x,search:g}=Wn(r,{relative:f}),j=x;return u!=="/"&&(j=x==="/"?u:ua([u,x])),c.createHref({pathname:j,search:g,hash:d})}function Jn(){return N.useContext(Kn)!=null}function qa(){return _e(Jn(),"useLocation() may be used only in the context of a <Router> component."),N.useContext(Kn).location}var F0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function P0(r){N.useContext(Ut).static||N.useLayoutEffect(r)}function su(){let{isDataRoute:r}=N.useContext(Vt);return r?Qg():zg()}function zg(){_e(Jn(),"useNavigate() may be used only in the context of a <Router> component.");let r=N.useContext(kl),{basename:f,navigator:u}=N.useContext(Ut),{matches:c}=N.useContext(Vt),{pathname:d}=qa(),x=JSON.stringify(V0(c)),g=N.useRef(!1);return P0(()=>{g.current=!0}),N.useCallback((v,m={})=>{if(qt(g.current,F0),!g.current)return;if(typeof v=="number"){u.go(v);return}let p=$0(v,JSON.parse(x),d,m.relative==="path");r==null&&f!=="/"&&(p.pathname=p.pathname==="/"?f:ua([f,p.pathname])),(m.replace?u.replace:u.push)(p,m.state,m)},[f,u,x,d,r])}N.createContext(null);function wg(){let{matches:r}=N.useContext(Vt),f=r[r.length-1];return f?f.params:{}}function Wn(r,{relative:f}={}){let{matches:u}=N.useContext(Vt),{pathname:c}=qa(),d=JSON.stringify(V0(u));return N.useMemo(()=>$0(r,JSON.parse(d),c,f==="path"),[r,d,c,f])}function _g(r,f){return I0(r,f)}function I0(r,f,u,c,d){_e(Jn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:x}=N.useContext(Ut),{matches:g}=N.useContext(Vt),j=g[g.length-1],v=j?j.params:{},m=j?j.pathname:"/",p=j?j.pathnameBase:"/",y=j&&j.route;{let M=y&&y.path||"";tm(m,!y||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${M}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
10
|
+
|
|
11
|
+
Please change the parent <Route path="${M}"> to <Route path="${M==="/"?"*":`${M}/*`}">.`)}let C=qa(),L;if(f){let M=typeof f=="string"?Zl(f):f;_e(p==="/"||M.pathname?.startsWith(p),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${M.pathname}" was given in the \`location\` prop.`),L=M}else L=C;let D=L.pathname||"/",X=D;if(p!=="/"){let M=p.replace(/^\//,"").split("/");X="/"+D.replace(/^\//,"").split("/").slice(M.length).join("/")}let w=G0(r,{pathname:X});qt(y||w!=null,`No routes matched location "${L.pathname}${L.search}${L.hash}" `),qt(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${L.pathname}${L.search}${L.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let G=Hg(w&&w.map(M=>Object.assign({},M,{params:Object.assign({},v,M.params),pathname:ua([p,x.encodeLocation?x.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?p:ua([p,x.encodeLocation?x.encodeLocation(M.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),g,u,c,d);return f&&G?N.createElement(Kn.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...L},navigationType:"POP"}},G):G}function Dg(){let r=Xg(),f=vg(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),u=r instanceof Error?r.stack:null,c="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:c},x={padding:"2px 4px",backgroundColor:c},g=null;return console.error("Error handled by React Router default ErrorBoundary:",r),g=N.createElement(N.Fragment,null,N.createElement("p",null,"💿 Hey developer 👋"),N.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",N.createElement("code",{style:x},"ErrorBoundary")," or"," ",N.createElement("code",{style:x},"errorElement")," prop on your route.")),N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},f),u?N.createElement("pre",{style:d},u):null,g)}var Og=N.createElement(Dg,null),em=class extends N.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,f){return f.location!==r.location||f.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:f.error,location:f.location,revalidation:r.revalidation||f.revalidation}}componentDidCatch(r,f){this.props.onError?this.props.onError(r,f):console.error("React Router caught the following error during render",r)}render(){let r=this.state.error;if(this.context&&typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){const u=Mg(r.digest);u&&(r=u)}let f=r!==void 0?N.createElement(Vt.Provider,{value:this.props.routeContext},N.createElement(nu.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?N.createElement(Ug,{error:r},f):f}};em.contextType=Ng;var Wc=new WeakMap;function Ug({children:r,error:f}){let{basename:u}=N.useContext(Ut);if(typeof f=="object"&&f&&"digest"in f&&typeof f.digest=="string"){let c=Ag(f.digest);if(c){let d=Wc.get(f);if(d)throw d;let x=k0(c.location,u);if(Z0&&!Wc.get(f))if(x.isExternal||c.reloadDocument)window.location.href=x.absoluteURL||x.to;else{const g=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(x.to,{replace:c.replace}));throw Wc.set(f,g),g}return N.createElement("meta",{httpEquiv:"refresh",content:`0;url=${x.absoluteURL||x.to}`})}}return r}function Lg({routeContext:r,match:f,children:u}){let c=N.useContext(kl);return c&&c.static&&c.staticContext&&(f.route.errorElement||f.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=f.route.id),N.createElement(Vt.Provider,{value:r},u)}function Hg(r,f=[],u=null,c=null,d=null){if(r==null){if(!u)return null;if(u.errors)r=u.matches;else if(f.length===0&&!u.initialized&&u.matches.length>0)r=u.matches;else return null}let x=r,g=u?.errors;if(g!=null){let p=x.findIndex(y=>y.route.id&&g?.[y.route.id]!==void 0);_e(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(g).join(",")}`),x=x.slice(0,Math.min(x.length,p+1))}let j=!1,v=-1;if(u)for(let p=0;p<x.length;p++){let y=x[p];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(v=p),y.route.id){let{loaderData:C,errors:L}=u,D=y.route.loader&&!C.hasOwnProperty(y.route.id)&&(!L||L[y.route.id]===void 0);if(y.route.lazy||D){j=!0,v>=0?x=x.slice(0,v+1):x=[x[0]];break}}}let m=u&&c?(p,y)=>{c(p,{location:u.location,params:u.matches?.[0]?.params??{},unstable_pattern:bg(u.matches),errorInfo:y})}:void 0;return x.reduceRight((p,y,C)=>{let L,D=!1,X=null,w=null;u&&(L=g&&y.route.id?g[y.route.id]:void 0,X=y.route.errorElement||Og,j&&(v<0&&C===0?(tm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),D=!0,w=null):v===C&&(D=!0,w=y.route.hydrateFallbackElement||null)));let G=f.concat(x.slice(0,C+1)),M=()=>{let Q;return L?Q=X:D?Q=w:y.route.Component?Q=N.createElement(y.route.Component,null):y.route.element?Q=y.route.element:Q=p,N.createElement(Lg,{match:y,routeContext:{outlet:p,matches:G,isDataRoute:u!=null},children:Q})};return u&&(y.route.ErrorBoundary||y.route.errorElement||C===0)?N.createElement(em,{location:u.location,revalidation:u.revalidation,component:X,error:L,children:M(),routeContext:{outlet:null,matches:G,isDataRoute:!0},onError:m}):M()},null)}function iu(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Bg(r){let f=N.useContext(kl);return _e(f,iu(r)),f}function qg(r){let f=N.useContext(Ni);return _e(f,iu(r)),f}function Yg(r){let f=N.useContext(Vt);return _e(f,iu(r)),f}function ru(r){let f=Yg(r),u=f.matches[f.matches.length-1];return _e(u.route.id,`${r} can only be used on routes that contain a unique "id"`),u.route.id}function Gg(){return ru("useRouteId")}function Xg(){let r=N.useContext(nu),f=qg("useRouteError"),u=ru("useRouteError");return r!==void 0?r:f.errors?.[u]}function Qg(){let{router:r}=Bg("useNavigate"),f=ru("useNavigate"),u=N.useRef(!1);return P0(()=>{u.current=!0}),N.useCallback(async(d,x={})=>{qt(u.current,F0),u.current&&(typeof d=="number"?await r.navigate(d):await r.navigate(d,{fromRouteId:f,...x}))},[r,f])}var w0={};function tm(r,f,u){!f&&!w0[r]&&(w0[r]=!0,qt(!1,u))}N.memo(Vg);function Vg({routes:r,future:f,state:u,onError:c}){return I0(r,void 0,u,c,f)}function lt(r){_e(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function $g({basename:r="/",children:f=null,location:u,navigationType:c="POP",navigator:d,static:x=!1,unstable_useTransitions:g}){_e(!Jn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let j=r.replace(/^\/*/,"/"),v=N.useMemo(()=>({basename:j,navigator:d,static:x,unstable_useTransitions:g,future:{}}),[j,d,x,g]);typeof u=="string"&&(u=Zl(u));let{pathname:m="/",search:p="",hash:y="",state:C=null,key:L="default"}=u,D=N.useMemo(()=>{let X=oa(m,j);return X==null?null:{location:{pathname:X,search:p,hash:y,state:C,key:L},navigationType:c}},[j,m,p,y,C,L,c]);return qt(D!=null,`<Router basename="${j}"> is not able to match the URL "${m}${p}${y}" because it does not start with the basename, so the <Router> won't render anything.`),D==null?null:N.createElement(Ut.Provider,{value:v},N.createElement(Kn.Provider,{children:f,value:D}))}function Zg({children:r,location:f}){return _g(tu(r),f)}function tu(r,f=[]){let u=[];return N.Children.forEach(r,(c,d)=>{if(!N.isValidElement(c))return;let x=[...f,d];if(c.type===N.Fragment){u.push.apply(u,tu(c.props.children,x));return}_e(c.type===lt,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),_e(!c.props.index||!c.props.children,"An index route cannot have child routes.");let g={id:c.props.id||x.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(g.children=tu(c.props.children,x)),u.push(g)}),u}var vi="get",bi="application/x-www-form-urlencoded";function Si(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function kg(r){return Si(r)&&r.tagName.toLowerCase()==="button"}function Kg(r){return Si(r)&&r.tagName.toLowerCase()==="form"}function Jg(r){return Si(r)&&r.tagName.toLowerCase()==="input"}function Wg(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function Fg(r,f){return r.button===0&&(!f||f==="_self")&&!Wg(r)}function au(r=""){return new URLSearchParams(typeof r=="string"||Array.isArray(r)||r instanceof URLSearchParams?r:Object.keys(r).reduce((f,u)=>{let c=r[u];return f.concat(Array.isArray(c)?c.map(d=>[u,d]):[[u,c]])},[]))}function Pg(r,f){let u=au(r);return f&&f.forEach((c,d)=>{u.has(d)||f.getAll(d).forEach(x=>{u.append(d,x)})}),u}var gi=null;function Ig(){if(gi===null)try{new FormData(document.createElement("form"),0),gi=!1}catch{gi=!0}return gi}var ey=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fc(r){return r!=null&&!ey.has(r)?(qt(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${bi}"`),null):r}function ty(r,f){let u,c,d,x,g;if(Kg(r)){let j=r.getAttribute("action");c=j?oa(j,f):null,u=r.getAttribute("method")||vi,d=Fc(r.getAttribute("enctype"))||bi,x=new FormData(r)}else if(kg(r)||Jg(r)&&(r.type==="submit"||r.type==="image")){let j=r.form;if(j==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let v=r.getAttribute("formaction")||j.getAttribute("action");if(c=v?oa(v,f):null,u=r.getAttribute("formmethod")||j.getAttribute("method")||vi,d=Fc(r.getAttribute("formenctype"))||Fc(j.getAttribute("enctype"))||bi,x=new FormData(j,r),!Ig()){let{name:m,type:p,value:y}=r;if(p==="image"){let C=m?`${m}.`:"";x.append(`${C}x`,"0"),x.append(`${C}y`,"0")}else m&&x.append(m,y)}}else{if(Si(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');u=vi,c=null,d=bi,g=r}return x&&d==="text/plain"&&(g=x,x=void 0),{action:c,method:u.toLowerCase(),encType:d,formData:x,body:g}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function cu(r,f){if(r===!1||r===null||typeof r>"u")throw new Error(f)}function ay(r,f,u,c){let d=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return u?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${c}`:d.pathname=`${d.pathname}.${c}`:d.pathname==="/"?d.pathname=`_root.${c}`:f&&oa(d.pathname,f)==="/"?d.pathname=`${f.replace(/\/$/,"")}/_root.${c}`:d.pathname=`${d.pathname.replace(/\/$/,"")}.${c}`,d}async function ly(r,f){if(r.id in f)return f[r.id];try{let u=await import(r.module);return f[r.id]=u,u}catch(u){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(u),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ny(r){return r==null?!1:r.href==null?r.rel==="preload"&&typeof r.imageSrcSet=="string"&&typeof r.imageSizes=="string":typeof r.rel=="string"&&typeof r.href=="string"}async function sy(r,f,u){let c=await Promise.all(r.map(async d=>{let x=f.routes[d.route.id];if(x){let g=await ly(x,u);return g.links?g.links():[]}return[]}));return uy(c.flat(1).filter(ny).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function _0(r,f,u,c,d,x){let g=(v,m)=>u[m]?v.route.id!==u[m].route.id:!0,j=(v,m)=>u[m].pathname!==v.pathname||u[m].route.path?.endsWith("*")&&u[m].params["*"]!==v.params["*"];return x==="assets"?f.filter((v,m)=>g(v,m)||j(v,m)):x==="data"?f.filter((v,m)=>{let p=c.routes[v.route.id];if(!p||!p.hasLoader)return!1;if(g(v,m)||j(v,m))return!0;if(v.route.shouldRevalidate){let y=v.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:u[0]?.params||{},nextUrl:new URL(r,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function iy(r,f,{includeHydrateFallback:u}={}){return ry(r.map(c=>{let d=f.routes[c.route.id];if(!d)return[];let x=[d.module];return d.clientActionModule&&(x=x.concat(d.clientActionModule)),d.clientLoaderModule&&(x=x.concat(d.clientLoaderModule)),u&&d.hydrateFallbackModule&&(x=x.concat(d.hydrateFallbackModule)),d.imports&&(x=x.concat(d.imports)),x}).flat(1))}function ry(r){return[...new Set(r)]}function cy(r){let f={},u=Object.keys(r).sort();for(let c of u)f[c]=r[c];return f}function uy(r,f){let u=new Set;return new Set(f),r.reduce((c,d)=>{let x=JSON.stringify(cy(d));return u.has(x)||(u.add(x),c.push({key:x,link:d})),c},[])}function am(){let r=N.useContext(kl);return cu(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function oy(){let r=N.useContext(Ni);return cu(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var uu=N.createContext(void 0);uu.displayName="FrameworkContext";function lm(){let r=N.useContext(uu);return cu(r,"You must render this element inside a <HydratedRouter> element"),r}function fy(r,f){let u=N.useContext(uu),[c,d]=N.useState(!1),[x,g]=N.useState(!1),{onFocus:j,onBlur:v,onMouseEnter:m,onMouseLeave:p,onTouchStart:y}=f,C=N.useRef(null);N.useEffect(()=>{if(r==="render"&&g(!0),r==="viewport"){let X=G=>{G.forEach(M=>{g(M.isIntersecting)})},w=new IntersectionObserver(X,{threshold:.5});return C.current&&w.observe(C.current),()=>{w.disconnect()}}},[r]),N.useEffect(()=>{if(c){let X=setTimeout(()=>{g(!0)},100);return()=>{clearTimeout(X)}}},[c]);let L=()=>{d(!0)},D=()=>{d(!1),g(!1)};return u?r!=="intent"?[x,C,{}]:[x,C,{onFocus:$n(j,L),onBlur:$n(v,D),onMouseEnter:$n(m,L),onMouseLeave:$n(p,D),onTouchStart:$n(y,L)}]:[!1,C,{}]}function $n(r,f){return u=>{r&&r(u),u.defaultPrevented||f(u)}}function dy({page:r,...f}){let{router:u}=am(),c=N.useMemo(()=>G0(u.routes,r,u.basename),[u.routes,r,u.basename]);return c?N.createElement(xy,{page:r,matches:c,...f}):null}function my(r){let{manifest:f,routeModules:u}=lm(),[c,d]=N.useState([]);return N.useEffect(()=>{let x=!1;return sy(r,f,u).then(g=>{x||d(g)}),()=>{x=!0}},[r,f,u]),c}function xy({page:r,matches:f,...u}){let c=qa(),{future:d,manifest:x,routeModules:g}=lm(),{basename:j}=am(),{loaderData:v,matches:m}=oy(),p=N.useMemo(()=>_0(r,f,m,x,c,"data"),[r,f,m,x,c]),y=N.useMemo(()=>_0(r,f,m,x,c,"assets"),[r,f,m,x,c]),C=N.useMemo(()=>{if(r===c.pathname+c.search+c.hash)return[];let X=new Set,w=!1;if(f.forEach(M=>{let Q=x.routes[M.route.id];!Q||!Q.hasLoader||(!p.some(se=>se.route.id===M.route.id)&&M.route.id in v&&g[M.route.id]?.shouldRevalidate||Q.hasClientLoader?w=!0:X.add(M.route.id))}),X.size===0)return[];let G=ay(r,j,d.unstable_trailingSlashAwareDataRequests,"data");return w&&X.size>0&&G.searchParams.set("_routes",f.filter(M=>X.has(M.route.id)).map(M=>M.route.id).join(",")),[G.pathname+G.search]},[j,d.unstable_trailingSlashAwareDataRequests,v,c,x,p,f,r,g]),L=N.useMemo(()=>iy(y,x),[y,x]),D=my(y);return N.createElement(N.Fragment,null,C.map(X=>N.createElement("link",{key:X,rel:"prefetch",as:"fetch",href:X,...u})),L.map(X=>N.createElement("link",{key:X,rel:"modulepreload",href:X,...u})),D.map(({key:X,link:w})=>N.createElement("link",{key:X,nonce:u.nonce,...w,crossOrigin:w.crossOrigin??u.crossOrigin})))}function hy(...r){return f=>{r.forEach(u=>{typeof u=="function"?u(f):u!=null&&(u.current=f)})}}var gy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{gy&&(window.__reactRouterVersion="7.13.0")}catch{}function yy({basename:r,children:f,unstable_useTransitions:u,window:c}){let d=N.useRef();d.current==null&&(d.current=Jh({window:c,v5Compat:!0}));let x=d.current,[g,j]=N.useState({action:x.action,location:x.location}),v=N.useCallback(m=>{u===!1?j(m):N.startTransition(()=>j(m))},[u]);return N.useLayoutEffect(()=>x.listen(v),[x,v]),N.createElement($g,{basename:r,children:f,location:g.location,navigationType:g.action,navigator:x,unstable_useTransitions:u})}var nm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ft=N.forwardRef(function({onClick:f,discover:u="render",prefetch:c="none",relative:d,reloadDocument:x,replace:g,state:j,target:v,to:m,preventScrollReset:p,viewTransition:y,unstable_defaultShouldRevalidate:C,...L},D){let{basename:X,unstable_useTransitions:w}=N.useContext(Ut),G=typeof m=="string"&&nm.test(m),M=k0(m,X);m=M.to;let Q=Rg(m,{relative:d}),[se,te,K]=fy(c,L),Z=by(m,{replace:g,state:j,target:v,preventScrollReset:p,relative:d,viewTransition:y,unstable_defaultShouldRevalidate:C,unstable_useTransitions:w});function k(I){f&&f(I),I.defaultPrevented||Z(I)}let B=N.createElement("a",{...L,...K,href:M.absoluteURL||Q,onClick:M.isExternal||x?f:k,ref:hy(D,te),target:v,"data-discover":!G&&u==="render"?"true":void 0});return se&&!G?N.createElement(N.Fragment,null,B,N.createElement(dy,{page:Q})):B});ft.displayName="Link";var sm=N.forwardRef(function({"aria-current":f="page",caseSensitive:u=!1,className:c="",end:d=!1,style:x,to:g,viewTransition:j,children:v,...m},p){let y=Wn(g,{relative:m.relative}),C=qa(),L=N.useContext(Ni),{navigator:D,basename:X}=N.useContext(Ut),w=L!=null&&Ty(y)&&j===!0,G=D.encodeLocation?D.encodeLocation(y).pathname:y.pathname,M=C.pathname,Q=L&&L.navigation&&L.navigation.location?L.navigation.location.pathname:null;u||(M=M.toLowerCase(),Q=Q?Q.toLowerCase():null,G=G.toLowerCase()),Q&&X&&(Q=oa(Q,X)||Q);const se=G!=="/"&&G.endsWith("/")?G.length-1:G.length;let te=M===G||!d&&M.startsWith(G)&&M.charAt(se)==="/",K=Q!=null&&(Q===G||!d&&Q.startsWith(G)&&Q.charAt(G.length)==="/"),Z={isActive:te,isPending:K,isTransitioning:w},k=te?f:void 0,B;typeof c=="function"?B=c(Z):B=[c,te?"active":null,K?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let I=typeof x=="function"?x(Z):x;return N.createElement(ft,{...m,"aria-current":k,className:B,ref:p,style:I,to:g,viewTransition:j},typeof v=="function"?v(Z):v)});sm.displayName="NavLink";var py=N.forwardRef(({discover:r="render",fetcherKey:f,navigate:u,reloadDocument:c,replace:d,state:x,method:g=vi,action:j,onSubmit:v,relative:m,preventScrollReset:p,viewTransition:y,unstable_defaultShouldRevalidate:C,...L},D)=>{let{unstable_useTransitions:X}=N.useContext(Ut),w=Sy(),G=Ey(j,{relative:m}),M=g.toLowerCase()==="get"?"get":"post",Q=typeof j=="string"&&nm.test(j),se=te=>{if(v&&v(te),te.defaultPrevented)return;te.preventDefault();let K=te.nativeEvent.submitter,Z=K?.getAttribute("formmethod")||g,k=()=>w(K||te.currentTarget,{fetcherKey:f,method:Z,navigate:u,replace:d,state:x,relative:m,preventScrollReset:p,viewTransition:y,unstable_defaultShouldRevalidate:C});X&&u!==!1?N.startTransition(()=>k()):k()};return N.createElement("form",{ref:D,method:M,action:G,onSubmit:c?v:se,...L,"data-discover":!Q&&r==="render"?"true":void 0})});py.displayName="Form";function vy(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function im(r){let f=N.useContext(kl);return _e(f,vy(r)),f}function by(r,{target:f,replace:u,state:c,preventScrollReset:d,relative:x,viewTransition:g,unstable_defaultShouldRevalidate:j,unstable_useTransitions:v}={}){let m=su(),p=qa(),y=Wn(r,{relative:x});return N.useCallback(C=>{if(Fg(C,f)){C.preventDefault();let L=u!==void 0?u:kn(p)===kn(y),D=()=>m(r,{replace:L,state:c,preventScrollReset:d,relative:x,viewTransition:g,unstable_defaultShouldRevalidate:j});v?N.startTransition(()=>D()):D()}},[p,m,y,u,c,f,r,d,x,g,j,v])}function ou(r){qt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let f=N.useRef(au(r)),u=N.useRef(!1),c=qa(),d=N.useMemo(()=>Pg(c.search,u.current?null:f.current),[c.search]),x=su(),g=N.useCallback((j,v)=>{const m=au(typeof j=="function"?j(new URLSearchParams(d)):j);u.current=!0,x("?"+m,v)},[x,d]);return[d,g]}var jy=0,Ny=()=>`__${String(++jy)}__`;function Sy(){let{router:r}=im("useSubmit"),{basename:f}=N.useContext(Ut),u=Gg(),c=r.fetch,d=r.navigate;return N.useCallback(async(x,g={})=>{let{action:j,method:v,encType:m,formData:p,body:y}=ty(x,f);if(g.navigate===!1){let C=g.fetcherKey||Ny();await c(C,u,g.action||j,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:p,body:y,formMethod:g.method||v,formEncType:g.encType||m,flushSync:g.flushSync})}else await d(g.action||j,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:p,body:y,formMethod:g.method||v,formEncType:g.encType||m,replace:g.replace,state:g.state,fromRouteId:u,flushSync:g.flushSync,viewTransition:g.viewTransition})},[c,d,f,u])}function Ey(r,{relative:f}={}){let{basename:u}=N.useContext(Ut),c=N.useContext(Vt);_e(c,"useFormAction must be used inside a RouteContext");let[d]=c.matches.slice(-1),x={...Wn(r||".",{relative:f})},g=qa();if(r==null){x.search=g.search;let j=new URLSearchParams(x.search),v=j.getAll("index");if(v.some(p=>p==="")){j.delete("index"),v.filter(y=>y).forEach(y=>j.append("index",y));let p=j.toString();x.search=p?`?${p}`:""}}return(!r||r===".")&&d.route.index&&(x.search=x.search?x.search.replace(/^\?/,"?index&"):"?index"),u!=="/"&&(x.pathname=x.pathname==="/"?u:ua([u,x.pathname])),kn(x)}function Ty(r,{relative:f}={}){let u=N.useContext(J0);_e(u!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=im("useViewTransitionState"),d=Wn(r,{relative:f});if(!u.isTransitioning)return!1;let x=oa(u.currentLocation.pathname,c)||u.currentLocation.pathname,g=oa(u.nextLocation.pathname,c)||u.nextLocation.pathname;return ji(d.pathname,g)!=null||ji(d.pathname,x)!=null}const rm=N.createContext({projects:[],activeProject:null,setActiveProject:()=>{},refreshProjects:()=>{}});function Kl(){return N.useContext(rm)}function Cy(){const[r,f]=N.useState([]),[u,c]=ou(),d=N.useCallback(async()=>{try{const m=await(await fetch("/api/projects")).json();m.ok&&f(m.data||[])}catch{}},[]);N.useEffect(()=>{d()},[d]);const x=u.get("project"),g=x?r.find(v=>v.id===x)||r[0]||null:r[0]||null,j=N.useCallback(v=>{c(m=>(m.set("project",v),m))},[c]);return{projects:r,activeProject:g,setActiveProject:j,refreshProjects:d}}function cm(r,f){const{timeout:u=3e4,retries:c=1,retryDelay:d=2e3}={},[x,g]=N.useState(null),[j,v]=N.useState(!0),[m,p]=N.useState(null),[y,C]=N.useState(0),[L,D]=N.useState(null),X=N.useCallback(()=>C(w=>w+1),[]);return N.useEffect(()=>{if(!r){v(!1),g(null);return}let w=!1;v(!0),p(null);async function G(M){const Q=new AbortController,se=setTimeout(()=>Q.abort(),u);try{const te=await fetch(r,{signal:Q.signal});if(clearTimeout(se),!te.ok)throw new Error(`HTTP ${te.status}`);const K=await te.json();w||(g(K.data??K),p(null),D(new Date),v(!1))}catch(te){if(clearTimeout(se),w)return;if(M>0&&te.name!=="AbortError")return await new Promise(K=>setTimeout(K,d)),w?void 0:G(M-1);te.name==="AbortError"?p(`Request timed out (${Math.round(u/1e3)}s)`):p(String(te.message||te)),v(!1)}}return G(c),()=>{w=!0}},[r,y,u,c,d]),{data:x,loading:j,error:m,refetch:X,fetchedAt:L}}function Le(r,f){const{activeProject:u}=Kl(),c=r.includes("?")?"&":"?",d=u?`${r}${c}project=${u.id}`:r;return cm(d)}const fu=N.createContext(null),Ay=["heartbeat","increment-update","analytics-event","cost-update","notification","sync-update","sync-audit","error-detected","config-changed","activity","command-output","command-complete","job-progress"];function My({url:r="/api/events",children:f}){const[u,c]=N.useState("connecting"),d=N.useRef(null),x=N.useRef(null),g=N.useRef(new Map),j=N.useCallback(()=>{d.current&&d.current.close(),c("connecting");const m=new EventSource(r);d.current=m;for(const p of Ay)m.addEventListener(p,y=>{try{const C=JSON.parse(y.data),L=g.current.get(p);if(L)for(const D of L)D(C)}catch{}});m.onopen=()=>c("connected"),m.onerror=()=>{m.close(),c("disconnected"),x.current=setTimeout(()=>{d.current===m&&j()},3e3)}},[r]);N.useEffect(()=>(j(),()=>{x.current&&(clearTimeout(x.current),x.current=null),d.current?.close(),d.current=null}),[j]);const v=N.useCallback((m,p)=>(g.current.has(m)||g.current.set(m,new Set),g.current.get(m).add(p),()=>{const y=g.current.get(m);y&&(y.delete(p),y.size===0&&g.current.delete(m))}),[]);return n.jsx(fu.Provider,{value:{status:u,subscribe:v},children:f})}function St(r,f){const u=N.useContext(fu),c=N.useRef(f);c.current=f,N.useEffect(()=>{if(!u)return;const d=x=>c.current(x);return u.subscribe(r,d)},[u,r])}function Ry(){return N.useContext(fu)?.status??"disconnected"}const zy=[{path:"/",label:"Overview",icon:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-4 0a1 1 0 01-1-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 01-1 1"},{path:"/increments",label:"Increments",icon:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"},{path:"/analytics",label:"Analytics",icon:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"},{path:"/costs",label:"Costs",icon:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},{path:"/sync",label:"Sync",icon:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},{path:"/errors",label:"Errors",icon:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4.5c-.77-.833-2.694-.833-3.464 0L3.34 16.5c-.77.833.192 2.5 1.732 2.5z"},{path:"/activity",label:"Activity",icon:"M13 10V3L4 14h7v7l9-11h-7z"},{path:"/notifications",label:"Notifications",icon:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",badge:!0},{path:"/config",label:"Config",icon:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z"},{path:"/plugins",label:"Plugins",icon:"M17 14v6m-3-3h6M6 10h2a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2zm10 0h2a2 2 0 002-2V6a2 2 0 00-2-2h-2a2 2 0 00-2 2v2a2 2 0 002 2zM6 20h2a2 2 0 002-2v-2a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2z"},{path:"/repos",label:"Repos",icon:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},{path:"/services",label:"Services",icon:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"}];function wy({d:r}){return n.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:r})})}function _y(){const{projects:r,activeProject:f,setActiveProject:u}=Kl(),[c]=ou(),{data:d}=Le("/api/overview"),[x,g]=N.useState(null),j=N.useCallback(C=>{const L=C;L?.pendingCount!=null&&g(L.pendingCount)},[]);St("notification",j);const v=Ry(),m=x??d?.notifications?.pendingCount??0,p=c.get("project"),y=C=>p?`${C}?project=${p}`:C;return n.jsxs("aside",{className:"w-56 bg-gray-900 border-r border-gray-800 flex flex-col h-screen sticky top-0",children:[n.jsx("div",{className:"px-4 py-5 border-b border-gray-800",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-8 h-8 bg-indigo-500 rounded-lg flex items-center justify-center",children:n.jsx("span",{className:"text-white font-bold text-sm",children:"SW"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-semibold text-sm",children:"SpecWeave"}),n.jsx("div",{className:"text-gray-500 text-xs",children:"Dashboard"})]})]})}),(r.length>0||p)&&n.jsxs("div",{className:"px-3 py-3 border-b border-gray-800",children:[n.jsx("label",{className:"text-[10px] text-gray-500 uppercase tracking-wider mb-1 block",children:"Project"}),n.jsxs("select",{value:f?.id||p||"",onChange:C=>{C.target.value==="__add__"?window.location.href=y("/config"):u(C.target.value)},className:"w-full bg-gray-800 border border-gray-700 text-gray-300 text-xs rounded-lg px-2 py-1.5 focus:ring-indigo-500 focus:border-indigo-500",children:[r.map(C=>n.jsx("option",{value:C.id,children:C.name},C.id)),p&&!r.find(C=>C.id===p)&&n.jsxs("option",{value:p,children:[decodeURIComponent(p).split(/[-/]/).pop()||p," (not registered)"]}),n.jsx("option",{value:"__add__",children:"+ Add project..."})]})]}),n.jsx("nav",{className:"flex-1 overflow-y-auto py-3 px-2",children:zy.map(C=>n.jsxs(sm,{to:y(C.path),end:C.path==="/",className:({isActive:L})=>`flex items-center gap-3 px-3 py-2 rounded-lg text-sm mb-0.5 transition-colors ${L?"bg-indigo-500/10 text-indigo-400":"text-gray-400 hover:bg-gray-800 hover:text-gray-200"}`,children:[n.jsx(wy,{d:C.icon}),n.jsx("span",{className:"flex-1",children:C.label}),C.badge&&m>0&&n.jsx("span",{className:"min-w-[18px] h-[18px] px-1 bg-rose-500 text-white text-[10px] font-bold rounded-full flex items-center justify-center",children:m>99?"99+":m})]},C.path))}),n.jsx("div",{className:"px-4 py-3 border-t border-gray-800",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${v==="connected"?"bg-emerald-400 pulse-dot":v==="connecting"?"bg-amber-400 pulse-dot":"bg-gray-500"}`}),n.jsx("span",{className:"text-xs text-gray-500",children:v==="connected"?"Connected":v==="connecting"?"Connecting...":"Disconnected"})]}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:[r.length," project",r.length!==1?"s":""]})]})})]})}function Dy(){const{data:r}=cm("/api/health"),{activeProject:f}=Kl(),u=f?.name||"Project",c=r?.uptime?Oy(r.uptime):"...";return n.jsxs("header",{className:"h-14 bg-gray-900/50 backdrop-blur border-b border-gray-800 flex items-center justify-between px-6",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("h1",{className:"text-gray-200 font-medium text-sm",children:u}),n.jsx("span",{className:"text-gray-600 text-xs",children:"|"}),n.jsxs("span",{className:"text-gray-500 text-xs",children:["Uptime: ",c]})]}),n.jsx("div",{className:"flex items-center gap-4",children:n.jsxs("span",{className:"text-gray-500 text-xs",children:[r?.connections??0," client",(r?.connections??0)!==1?"s":""]})})]})}function Oy(r){if(r<60)return`${Math.floor(r)}s`;if(r<3600)return`${Math.floor(r/60)}m`;const f=Math.floor(r/3600),u=Math.floor(r%3600/60);return`${f}h ${u}m`}const Uy={indigo:"from-indigo-500/10 to-indigo-500/5 border-indigo-500/20",emerald:"from-emerald-500/10 to-emerald-500/5 border-emerald-500/20",amber:"from-amber-500/10 to-amber-500/5 border-amber-500/20",rose:"from-rose-500/10 to-rose-500/5 border-rose-500/20",cyan:"from-cyan-500/10 to-cyan-500/5 border-cyan-500/20"},Ly={indigo:"text-indigo-400",emerald:"text-emerald-400",amber:"text-amber-400",rose:"text-rose-400",cyan:"text-cyan-400"};function ce({title:r,value:f,subtitle:u,tooltip:c,color:d="indigo"}){return n.jsxs("div",{className:`bg-gradient-to-br ${Uy[d]} border rounded-xl p-4 relative group`,title:c,children:[n.jsx("div",{className:"text-gray-400 text-xs font-medium uppercase tracking-wider mb-2",children:r}),n.jsx("div",{className:`text-2xl font-bold ${Ly[d]}`,children:f}),u&&n.jsx("div",{className:"text-gray-500 text-xs mt-1",children:u}),c&&n.jsxs("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2.5 py-1.5 bg-gray-800 border border-gray-700 rounded-lg text-[10px] text-gray-300 whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none z-10 shadow-lg",children:[c,n.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 -mt-px border-4 border-transparent border-t-gray-800"})]})]})}const Hy={active:"#6366f1",completed:"#10b981",paused:"#f59e0b",planning:"#06b6d4",abandoned:"#ef4444",backlog:"#6b7280",ready_for_review:"#8b5cf6"};function By(r){return Hy[r]||"#6b7280"}function qy({segments:r,size:f=160,centerLabel:u,centerValue:c}){const d=r.reduce((v,m)=>v+m.value,0);if(d===0)return n.jsx("div",{className:"flex items-center justify-center",style:{width:f,height:f},children:n.jsx("span",{className:"text-gray-600 text-xs",children:"No data"})});const x=52,g=2*Math.PI*x;let j=0;return n.jsxs("div",{className:"relative inline-flex items-center justify-center",style:{width:f,height:f},children:[n.jsx("svg",{viewBox:"0 0 128 128",className:"w-full h-full -rotate-90",children:r.map((v,m)=>{const y=v.value/d*g,C=j;return j+=y,n.jsx("circle",{cx:"64",cy:"64",r:x,fill:"none",stroke:v.color,strokeWidth:"12",strokeDasharray:`${y} ${g-y}`,strokeDashoffset:-C,className:"transition-all duration-500"},m)})}),n.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[c!=null&&n.jsx("span",{className:"text-xl font-bold text-white",children:c}),u&&n.jsx("span",{className:"text-[10px] text-gray-500 uppercase tracking-wider",children:u})]})]})}function Yy(r){return Object.entries(r).filter(([f,u])=>u>0).map(([f,u])=>({label:f,value:u,color:By(f)}))}const Gy={default:"bg-gray-800 text-gray-300",success:"bg-emerald-500/15 text-emerald-400",warning:"bg-amber-500/15 text-amber-400",error:"bg-rose-500/15 text-rose-400",info:"bg-cyan-500/15 text-cyan-400"};function de({label:r,variant:f="default"}){return n.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-md text-xs font-medium ${Gy[f]}`,children:r})}function Ei(r){switch(r){case"active":case"running":return"info";case"completed":case"success":return"success";case"paused":case"pending":case"planning":return"warning";case"failed":case"abandoned":case"error":return"error";default:return"default"}}function Xy({size:r="md"}){const f={sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8"};return n.jsxs("svg",{className:`${f[r]} animate-spin text-indigo-400`,viewBox:"0 0 24 24",fill:"none",children:[n.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),n.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})}function Et(){return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsx(Xy,{size:"lg"})})}function fa({message:r,onRetry:f,title:u="Something went wrong"}){const c=r.toLowerCase().includes("timed out");return n.jsx("div",{className:"p-6",children:n.jsxs("div",{className:"bg-rose-900/30 border border-rose-700 rounded-lg px-5 py-4 space-y-3",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-medium text-rose-300",children:u}),n.jsx("p",{className:"text-xs text-rose-400/80 mt-1",children:r})]}),f&&n.jsx("button",{onClick:f,className:"text-xs text-rose-400 hover:text-rose-200 px-3 py-1.5 border border-rose-700 rounded transition-colors flex-shrink-0",children:"Retry"})]}),c&&n.jsx("p",{className:"text-[10px] text-rose-400/60",children:"The server may be processing a large number of session logs. Try again in a moment."})]})})}function D0(r){switch(r){case"connected":return"success";case"sync_failed":return"warning";case"configured_never_synced":return"info";default:return"default"}}function Qy(r){switch(r){case"connected":return"Connected";case"sync_failed":return"Sync Failed";case"configured_never_synced":return"Ready";case"not_configured":return"Not Configured";default:return r||"Unknown"}}const Pc=r=>r.billingContext?.planType==="subscription";function Vy(){const{data:r,loading:f,error:u,refetch:c}=Le("/api/overview"),[d,x]=N.useState([]),{activeProject:g}=Kl(),j=N.useRef(null);N.useEffect(()=>{if(!g||j.current===g.id)return;j.current=g.id;const p=`project=${g.id}`;fetch(`/api/activity/stream?limit=20&${p}`).then(y=>y.json()).then(y=>{y.ok&&Array.isArray(y.data)&&x(y.data)}).catch(()=>{})},[g]);const v=N.useCallback(p=>{x(y=>[p,...y].slice(0,20))},[]);if(St("activity",v),f)return n.jsx(Et,{});if(u)return n.jsx(fa,{message:u,onRetry:c});if(!r)return null;const m=Yy(r.project.statusBreakdown);return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("h2",{className:"text-lg font-semibold text-gray-200",children:[r.project.name||"Project"," Overview"]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ft,{to:"/increments?status=active",className:"group",children:n.jsx(ce,{title:"Active Increments",value:r.project.activeIncrements,subtitle:`${r.project.totalIncrements} total`,color:"indigo"})}),n.jsx(ft,{to:"/increments?status=completed",className:"group",children:n.jsx(ce,{title:"Completed",value:r.project.completedIncrements,subtitle:`${Math.round(r.project.completedIncrements/Math.max(r.project.totalIncrements,1)*100)}% done`,color:"emerald"})}),n.jsx(ft,{to:"/costs",className:"group",children:n.jsx(ce,{title:Pc(r.costs)?"Usage Value":"Total Cost",value:`$${r.costs.totalCost.toFixed(2)}`,subtitle:Pc(r.costs)?`$${r.costs.billingContext?.monthlyAmount??"?"}/mo plan`:`${r.costs.sessionCount.toLocaleString()} sessions`,color:"amber"})}),n.jsx(ft,{to:"/analytics",className:"group",children:n.jsx(ce,{title:"Events Today",value:r.analytics.last24hEvents,subtitle:`${r.analytics.totalEvents.toLocaleString()} total`,color:"cyan"})})]}),n.jsx($y,{}),Pc(r.costs)&&n.jsxs("div",{className:"bg-indigo-500/10 border border-indigo-500/20 rounded-xl px-4 py-3 flex items-center gap-3",children:[n.jsx(de,{label:"Subscription",variant:"info"}),n.jsx("span",{className:"text-xs text-gray-300",children:"Costs shown as API-equivalent usage value."})]}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Increment Status"}),n.jsx("div",{className:"flex items-center justify-center",children:n.jsx(qy,{segments:m,centerValue:r.project.totalIncrements,centerLabel:"total"})}),n.jsx("div",{className:"flex flex-wrap gap-2 mt-4 justify-center",children:m.map(p=>n.jsxs(ft,{to:`/increments?status=${p.label.toLowerCase()}`,className:"flex items-center gap-1.5 hover:opacity-80 transition-opacity",children:[n.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:p.color}}),n.jsxs("span",{className:"text-xs text-gray-500 hover:text-gray-300",children:[p.label," (",p.value,")"]})]},p.label))})]}),n.jsxs(ft,{to:"/sync",className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5 hover:border-gray-700 transition-colors block",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Sync Health"}),n.jsx("div",{className:"space-y-3",children:Object.entries(r.sync.platforms).length===0?n.jsx("p",{className:"text-gray-600 text-xs",children:"No sync platforms configured"}):Object.entries(r.sync.platforms).map(([p,y])=>n.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-800/50 rounded-lg",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-sm text-gray-300 capitalize",children:p}),y.configDetail&&n.jsx("div",{className:"text-[10px] text-gray-600 mt-0.5",children:y.configDetail}),!y.configDetail&&y.lastImport&&n.jsxs("div",{className:"text-xs text-gray-600 mt-0.5",children:["Last: ",new Date(y.lastImport).toLocaleDateString()]})]}),n.jsx(de,{label:Qy(y.connectionStatus||y.lastSyncResult),variant:D0(y.connectionStatus)!=="default"?D0(y.connectionStatus):Ei(y.lastSyncResult||"")})]},p))}),n.jsx("div",{className:"mt-4 pt-4 border-t border-gray-800",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500",children:"Notifications"}),n.jsxs("div",{className:"flex gap-2",children:[r.notifications.criticalCount>0&&n.jsx(ft,{to:"/notifications",onClick:p=>p.stopPropagation(),children:n.jsx(de,{label:`${r.notifications.criticalCount} critical`,variant:"error"})}),n.jsx(ft,{to:"/notifications",onClick:p=>p.stopPropagation(),children:n.jsx(de,{label:`${r.notifications.pendingCount} pending`,variant:r.notifications.pendingCount>0?"warning":"default"})})]})]})})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Live Activity"}),n.jsx(ft,{to:"/activity",className:"text-[10px] text-indigo-400 hover:text-indigo-300",children:"View all"})]}),n.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto custom-scrollbar",children:d.length===0?n.jsx("p",{className:"text-gray-600 text-xs",children:"No recent activity"}):d.map((p,y)=>n.jsxs("div",{className:"flex items-start gap-2 py-1 slide-in",children:[n.jsx("div",{className:`w-1.5 h-1.5 rounded-full mt-1.5 ${p.severity==="error"?"bg-rose-400":p.severity==="warning"?"bg-amber-400":"bg-gray-600"}`}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-xs text-gray-400 truncate",children:p.title}),n.jsxs("div",{className:"text-[10px] text-gray-600",children:[p.category,p.timestamp&&` · ${Zy(p.timestamp)}`]})]})]},y))})]})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Increment Types"}),n.jsx("div",{className:"flex gap-4 flex-wrap",children:Object.entries(r.project.typeBreakdown).map(([p,y])=>n.jsxs(ft,{to:`/increments?type=${p}`,className:"flex items-center gap-2 px-3 py-2 bg-gray-800/50 rounded-lg hover:bg-gray-800/80 transition-colors",children:[n.jsx("span",{className:"text-sm text-gray-300 capitalize",children:p}),n.jsx("span",{className:"text-xs text-gray-500 bg-gray-800 px-2 py-0.5 rounded",children:y})]},p))})]})]})}function $y(){const{data:r}=Le("/api/prompt-health");if(!r?.health||r.health.warningLevel==="normal")return null;const{health:f,alert:u}=r,c=u?.level==="emergency",d=f.warningLevel==="critical"||c,x=d?"border-rose-500/30":"border-amber-500/20",g=d?"bg-rose-500/10":"bg-amber-500/10",j=d?"text-rose-400":"text-amber-400",v=Math.round(f.baseline/1e3),m=Math.min(Math.round(f.baseline/2e5*100),100),p=d?"bg-rose-500":"bg-amber-500";return n.jsxs("div",{className:`${g} border ${x} rounded-xl px-4 py-3 space-y-2`,children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(de,{label:d?"Critical":"Warning",variant:d?"error":"warning"}),n.jsxs("span",{className:`text-xs ${j}`,children:["Prompt baseline: ",v,"KB (",m,"% of context window)"]})]}),n.jsx(ft,{to:"/errors",className:"text-[10px] text-gray-500 hover:text-gray-300",children:"Details"})]}),n.jsx("div",{className:"w-full bg-gray-800 rounded-full h-1.5",children:n.jsx("div",{className:`${p} h-1.5 rounded-full`,style:{width:`${m}%`}})}),n.jsxs("div",{className:"flex gap-4 text-[10px] text-gray-500",children:[n.jsxs("span",{children:["CLAUDE.md: ",Math.round(f.claudeMdSize/1e3),"KB"]}),n.jsxs("span",{children:["MEMORY.md: ",Math.round(f.memoryMdSize/1e3),"KB"]}),n.jsxs("span",{children:["Skills: ",Math.round(f.skillBudget/1e3),"KB"]}),u&&n.jsxs("span",{className:j,children:["Compactions: ",u.compactionCount]})]})]})}function Zy(r){try{const f=Date.now()-new Date(r).getTime(),u=Math.floor(f/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}catch{return""}}function Ba(r,f=""){const[u,c]=ou(),d=u.get(r)??f,x=N.useCallback(g=>{c(j=>{const v=new URLSearchParams(j);return g&&g!==f?v.set(r,g):v.delete(r),v})},[r,f,c]);return[d,x]}function du({title:r,description:f}){return n.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[n.jsx("div",{className:"w-12 h-12 rounded-full bg-gray-800 flex items-center justify-center mb-4",children:n.jsx("svg",{className:"w-6 h-6 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"})})}),n.jsx("h3",{className:"text-gray-400 text-sm font-medium",children:r}),f&&n.jsx("p",{className:"text-gray-600 text-xs mt-1 max-w-xs",children:f})]})}function ky(){const[r,f]=N.useState(0);St("increment-update",()=>f(D=>D+1));const{data:u,loading:c,error:d,refetch:x}=Le(`/api/increments?_r=${r}`),[g,j]=Ba("status","all"),[v,m]=Ba("type","all"),p=su();if(c)return n.jsx(Et,{});if(d)return n.jsx(fa,{message:d,onRetry:x});if(!u)return null;const y=u.increments.filter(D=>!(g!=="all"&&D.status!==g||v!=="all"&&D.type!==v)),C=[...new Set(u.increments.map(D=>D.status))],L=[...new Set(u.increments.map(D=>D.type))];return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Increments"}),n.jsxs("span",{className:"text-sm text-gray-500",children:[u.increments.length," total"]})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsx("span",{className:"text-xs text-gray-500 w-14",children:"Status:"}),n.jsxs("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:[n.jsx(yi,{label:"All",active:g==="all",onClick:()=>j("all")}),C.map(D=>n.jsx(yi,{label:D,active:g===D,onClick:()=>j(D),count:u.increments.filter(X=>X.status===D).length},D))]})]}),n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsx("span",{className:"text-xs text-gray-500 w-14",children:"Type:"}),n.jsxs("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:[n.jsx(yi,{label:"All",active:v==="all",onClick:()=>m("all")}),L.map(D=>n.jsx(yi,{label:D,active:v===D,onClick:()=>m(D),count:u.increments.filter(X=>X.type===D).length},D))]})]}),n.jsxs("span",{className:"text-xs text-gray-500",children:[y.length," matching"]})]}),y.length===0?n.jsx(du,{title:"No increments match filters",description:"Try adjusting your filters"}):n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"ID"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Title"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Status"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Type"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Priority"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Tasks"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"ACs"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Last Activity"})]})}),n.jsx("tbody",{children:y.map(D=>n.jsxs("tr",{onClick:()=>p(`/increments/${D.id}`),className:"border-b border-gray-800/50 hover:bg-gray-800/30 transition-colors cursor-pointer",children:[n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-xs text-indigo-400 font-mono",children:D.id})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-sm text-gray-300",children:D.title})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(de,{label:D.status,variant:Ei(D.status)})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-xs text-gray-400 capitalize",children:D.type})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(Ky,{priority:D.priority})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(O0,{completed:D.tasks.completed,total:D.tasks.total})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(O0,{completed:D.acs.completed,total:D.acs.total})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-xs text-gray-500",children:D.lastActivity?Jy(D.lastActivity):"-"})})]},D.id))})]})})]})}function yi({label:r,active:f,onClick:u,count:c}){return n.jsxs("button",{onClick:u,className:`px-3 py-1 text-xs rounded-md transition-colors capitalize ${f?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:[r,c!==void 0&&n.jsx("span",{className:"ml-1 text-[10px] text-gray-500",children:c})]})}function O0({completed:r,total:f}){const u=f>0?Math.round(r/f*100):0;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-16 h-1.5 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full bg-indigo-500 rounded-full transition-all",style:{width:`${u}%`}})}),n.jsxs("span",{className:"text-xs text-gray-500",children:[r,"/",f]})]})}function Ky({priority:r}){const f={P0:"text-rose-400 bg-rose-500/10",P1:"text-amber-400 bg-amber-500/10",P2:"text-cyan-400 bg-cyan-500/10",P3:"text-gray-400 bg-gray-500/10"};return n.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${f[r]||f.P2}`,children:r})}function Jy(r){try{const f=new Date(r),c=new Date().getTime()-f.getTime(),d=Math.floor(c/6e4);if(d<1)return"Just now";if(d<60)return`${d}m ago`;const x=Math.floor(d/60);if(x<24)return`${x}h ago`;const g=Math.floor(x/24);return g<7?`${g}d ago`:f.toLocaleDateString()}catch{return r}}function Wy(){const[r,f]=N.useState("commands"),[u,c]=N.useState(!1),[d,x]=N.useState(0);St("analytics-event",()=>x(G=>G+1));const{data:g,loading:j,error:v,refetch:m,fetchedAt:p}=Le(`/api/analytics/summary?_r=${d}`),{data:y,loading:C,refetch:L}=Le(`/api/analytics/skills?_r=${d}`);if(j||C)return n.jsx(Et,{});if(v)return n.jsx(fa,{message:v,onRetry:m});if(!g)return null;const D=g.topCommands?.reduce((G,M)=>G+M.count,0)||0,X=g.topSkills?.reduce((G,M)=>G+M.count,0)||0,w=g.topAgents?.reduce((G,M)=>G+M.count,0)||0;return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Analytics"}),n.jsxs("div",{className:"flex items-center gap-3",children:[p&&n.jsxs("span",{className:"text-[10px] text-gray-600",children:["Updated ",p.toLocaleTimeString()]}),n.jsxs("span",{className:"text-sm text-gray-500",children:[g.totalEvents.toLocaleString()," total events"]}),n.jsx("button",{onClick:()=>{c(!0),m(),L(),setTimeout(()=>c(!1),600)},disabled:u,className:"p-1.5 text-gray-500 hover:text-gray-300 hover:bg-gray-800 rounded-lg transition-colors disabled:opacity-50",title:"Refresh analytics",children:n.jsx("svg",{className:`w-4 h-4 ${u?"animate-spin":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:"Total Events",value:g.totalEvents.toLocaleString(),subtitle:`${g.successRate}% success rate`,color:"indigo",tooltip:`${g.totalEvents} events tracked from analytics JSONL`}),n.jsx(ce,{title:"Commands",value:D.toLocaleString(),subtitle:`${g.topCommands?.length||0} unique`,color:"cyan",tooltip:`${D} total command invocations across ${g.topCommands?.length||0} distinct commands`}),n.jsx(ce,{title:"Skills",value:X.toLocaleString(),subtitle:`${g.topSkills?.length||0} unique`,color:"emerald",tooltip:`${X} total skill activations across ${g.topSkills?.length||0} distinct skills`}),n.jsx(ce,{title:"Agents",value:w.toLocaleString(),subtitle:`${g.topAgents?.length||0} unique`,color:"amber",tooltip:`${w} agent spawns across ${g.topAgents?.length||0} distinct agent types`})]}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:[{key:"commands",label:"Commands"},{key:"skills",label:"Skills"},{key:"agents",label:"Agents"},{key:"daily",label:"Daily Trends"}].map(G=>n.jsx("button",{onClick:()=>f(G.key),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===G.key?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:G.label},G.key))}),r==="commands"&&n.jsx(Fy,{commands:g.topCommands||[]}),r==="skills"&&n.jsx(Py,{skills:y||[]}),r==="agents"&&n.jsx(Iy,{agents:g.topAgents||[]}),r==="daily"&&n.jsx(ep,{days:g.dailySummaries||[]})]})}function Fy({commands:r}){if(r.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No command data available"})});const f=[...r].sort((c,d)=>d.count-c.count),u=f[0]?.count||1;return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Top Commands"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500 w-12",children:"Rank"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Command"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Usage"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Count"})]})}),n.jsx("tbody",{children:f.map((c,d)=>{const x=Math.max(2,c.count/u*100);return n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsxs("td",{className:"px-4 py-2.5 text-xs text-gray-600",children:["#",d+1]}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("span",{className:"text-sm text-gray-300 font-mono",children:c.name})}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("div",{className:"w-full h-1.5 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-indigo-500/60 transition-all",style:{width:`${x}%`}})})}),n.jsx("td",{className:"px-4 py-2.5 text-sm font-mono text-gray-400 text-right",children:c.count.toLocaleString()})]},c.name)})})]})]})}function Py({skills:r}){const f=[...r].sort((u,c)=>c.count-u.count);return f.length===0?n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No skill usage data available"})}):n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Skill Usage Leaderboard"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500 w-12",children:"Rank"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Skill Name"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Plugin"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Invocations"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Success Rate"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Last Used"})]})}),n.jsx("tbody",{children:f.map((u,c)=>{const d=u.count>0?Math.round(u.successCount/u.count*100):100,x=d>=90?"success":d>=70?"warning":"error";return n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsxs("td",{className:"px-4 py-2.5 text-xs text-gray-600",children:["#",c+1]}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("span",{className:"text-sm text-gray-300 font-mono",children:u.name})}),n.jsx("td",{className:"px-4 py-2.5",children:u.plugin&&n.jsx("span",{className:"text-[10px] text-gray-600 bg-gray-800 px-1.5 py-0.5 rounded",children:u.plugin})}),n.jsx("td",{className:"px-4 py-2.5 text-sm font-mono text-gray-400 text-right",children:u.count.toLocaleString()}),n.jsx("td",{className:"px-4 py-2.5 text-right",children:n.jsx(de,{label:`${d}%`,variant:x})}),n.jsx("td",{className:"px-4 py-2.5 text-xs text-gray-600 text-right whitespace-nowrap",children:u.lastUsed?tp(u.lastUsed):"-"})]},u.name)})})]})]})}function Iy({agents:r}){if(r.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No agent data available"})});const f=[...r].sort((c,d)=>d.count-c.count),u=f[0]?.count||1;return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Top Agents"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500 w-12",children:"Rank"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Agent"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Usage"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Count"})]})}),n.jsx("tbody",{children:f.map((c,d)=>{const x=Math.max(2,c.count/u*100);return n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsxs("td",{className:"px-4 py-2.5 text-xs text-gray-600",children:["#",d+1]}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("span",{className:"text-sm text-gray-300",children:c.name})}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("div",{className:"w-full h-1.5 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-cyan-500/60 transition-all",style:{width:`${x}%`}})})}),n.jsx("td",{className:"px-4 py-2.5 text-sm font-mono text-gray-400 text-right",children:c.count.toLocaleString()})]},c.name)})})]})]})}function ep({days:r}){const f=r.slice(-14);if(f.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No daily data available"})});const u=Math.max(...f.map(x=>x.totalEvents),1),c=f.reduce((x,g)=>x+g.totalEvents,0),d=Math.round(c/f.length);return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[n.jsx(ce,{title:"Period Total",value:c.toLocaleString(),subtitle:`Last ${f.length} days`,color:"indigo"}),n.jsx(ce,{title:"Daily Average",value:d.toLocaleString(),color:"cyan"}),n.jsx(ce,{title:"Peak Day",value:u.toLocaleString(),subtitle:f.find(x=>x.totalEvents===u)?.date||"",color:"emerald"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:["Daily Events (Last ",f.length," Days)"]}),n.jsx("div",{className:"flex items-end gap-1.5 h-40",children:f.map(x=>{const g=Math.max(2,x.totalEvents/u*100),j=x.date.slice(5);return n.jsxs("div",{className:"flex-1 flex flex-col items-center gap-1",children:[n.jsx("span",{className:"text-[9px] text-gray-500",children:x.totalEvents}),n.jsx("div",{className:"w-full bg-indigo-500/40 rounded-t hover:bg-indigo-500/60 transition-colors cursor-default",style:{height:`${g}%`},title:`${x.date}: ${x.totalEvents} events`}),n.jsx("span",{className:"text-[8px] text-gray-700",children:j})]},x.date)})})]})]})}function tp(r){if(!r)return"";try{const f=Date.now()-new Date(r).getTime(),u=Math.floor(f/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}catch{return""}}function um({items:r,maxBars:f=10}){const u=[...r].sort((d,x)=>x.value-d.value).slice(0,f),c=Math.max(...u.map(d=>d.value),1);return n.jsx("div",{className:"space-y-2",children:u.map((d,x)=>n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"text-xs text-gray-400 w-28 truncate text-right",title:d.label,children:d.label}),n.jsx("div",{className:"flex-1 h-5 bg-gray-800 rounded overflow-hidden",children:n.jsx("div",{className:"h-full rounded transition-all duration-500",style:{width:`${d.value/c*100}%`,backgroundColor:d.color||"#6366f1"}})}),n.jsx("span",{className:"text-xs text-gray-500 w-10 text-right",children:d.value})]},x))})}function ap(){const[r,f]=N.useState("overview"),[u,c]=N.useState(null),[d,x]=N.useState(0);St("cost-update",()=>x(M=>M+1));const{data:g,loading:j,error:v,refetch:m}=Le(`/api/costs/summary?_r=${d}`);if(j)return n.jsx(Et,{});if(v)return n.jsx(fa,{message:v,onRetry:m});if(!g)return null;const p=g.sessions||[],y=g.billingContext?.planType==="subscription",C=g.modelBreakdown?Object.entries(g.modelBreakdown).map(([M,Q])=>({model:M,...Q})).sort((M,Q)=>Q.cost-M.cost):np(p),L=p.reduce((M,Q)=>M+(Q.inputTokens||0),0),D=p.reduce((M,Q)=>M+(Q.outputTokens||0),0),X=p.reduce((M,Q)=>M+(Q.cacheReadTokens||0),0),w=p.reduce((M,Q)=>M+(Q.cacheWriteTokens||0),0),G=L+D+X+w;return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Token Usage & Costs"}),y&&n.jsxs("div",{className:"bg-indigo-500/10 border border-indigo-500/20 rounded-xl px-4 py-3 flex items-center gap-3",children:[n.jsx(de,{label:"Subscription",variant:"info"}),n.jsxs("span",{className:"text-xs text-gray-300",children:[g.billingContext?.monthlyAmount?`$${g.billingContext.monthlyAmount}/mo plan. `:"","Costs shown as API-equivalent value for usage analytics."]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:y?"API-Equivalent Value":"Total Cost",value:`$${g.totalCost.toFixed(2)}`,subtitle:y&&g.billingContext?.monthlyAmount?`Your plan: $${g.billingContext.monthlyAmount}/mo`:void 0,color:"amber"}),n.jsx(ce,{title:y?"Cache Efficiency":"Cache Savings",value:`$${g.totalSavings.toFixed(2)}`,subtitle:y?"API-equivalent savings from cache":void 0,color:"emerald"}),n.jsx(ce,{title:"Total Tokens",value:Vl(g.totalTokens),subtitle:sp(g.totalTokens),color:"indigo"}),n.jsx(ce,{title:"Sessions",value:g.sessionCount.toLocaleString(),color:"cyan"})]}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:["overview","sessions"].map(M=>n.jsx("button",{onClick:()=>f(M),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===M?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:M==="overview"?"Breakdown":`Sessions (${p.length})`},M))}),r==="overview"&&n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:y?"Usage Value by Model":"Cost by Model"}),C.length>0?n.jsx(um,{items:C.map(M=>({label:M.model,value:parseFloat(M.cost.toFixed(2)),color:"#f59e0b"}))}):n.jsx("p",{className:"text-gray-600 text-xs",children:"No model data"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Token Breakdown"}),n.jsxs("div",{className:"space-y-3",children:[n.jsx(pi,{label:"Input",value:L,total:G,color:"bg-indigo-500"}),n.jsx(pi,{label:"Output",value:D,total:G,color:"bg-cyan-500"}),X>0&&n.jsx(pi,{label:"Cache Read",value:X,total:G,color:"bg-emerald-500"}),w>0&&n.jsx(pi,{label:"Cache Write",value:w,total:G,color:"bg-amber-500"})]})]}),C.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden lg:col-span-2",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Model Details"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Model"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Sessions"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Tokens"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Cost"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Avg/Session"})]})}),n.jsx("tbody",{children:C.map(M=>n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsx("td",{className:"px-4 py-2 text-sm text-gray-300",children:M.model}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:M.sessions.toLocaleString()}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Vl(M.tokens)}),n.jsxs("td",{className:"px-4 py-2 text-xs text-amber-400 text-right",children:["$",M.cost.toFixed(2)]}),n.jsxs("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:["$",M.sessions>0?(M.cost/M.sessions).toFixed(4):"0"]})]},M.model))})]})]})]}),r==="sessions"&&n.jsx(lp,{sessions:p,expandedSession:u,onToggle:M=>c(u===M?null:M)})]})}const Ic=30;function lp({sessions:r,expandedSession:f,onToggle:u}){const[c,d]=N.useState(0);if(r.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No session data available"})});const x=Math.ceil(r.length/Ic),g=c*Ic,j=g+Ic,v=r.slice(g,j);return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsxs("div",{className:"px-5 py-3 border-b border-gray-800 flex items-center justify-between",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Recent Sessions"}),n.jsxs("span",{className:"text-xs text-gray-500",children:[g+1,"-",Math.min(j,r.length)," of ",r.length]})]}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500 w-8"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Session"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Model"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Input"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Output"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Cache"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Cost"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Duration"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"When"})]})}),n.jsx("tbody",{children:v.map(m=>{const p=m.sessionId||"-",y=f===p,C=(m.cacheReadTokens||0)+(m.cacheWriteTokens||0);return n.jsxs(N.Fragment,{children:[n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30 cursor-pointer",onClick:()=>u(p),children:[n.jsx("td",{className:"px-4 py-2 text-xs text-gray-600",children:n.jsx("span",{className:`inline-block transition-transform ${y?"rotate-90":""}`,children:"▸"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-400 font-mono",children:p.slice(0,8)}),n.jsx("td",{className:"px-4 py-2",children:n.jsx(de,{label:m.model||"unknown",variant:"default"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Vl(m.inputTokens)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Vl(m.outputTokens)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:C>0?Vl(C):"-"}),n.jsxs("td",{className:"px-4 py-2 text-xs text-amber-400 text-right",children:["$",m.cost?.toFixed(4)||"0.0000"]}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:m.duration?U0(m.duration):"-"}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:ip(m.timestamp)})]}),y&&n.jsx("tr",{className:"border-b border-gray-800/50",children:n.jsx("td",{colSpan:9,className:"px-6 py-3 bg-gray-800/20",children:n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-xs",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Input Tokens"}),n.jsx("span",{className:"text-gray-300 font-mono",children:m.inputTokens.toLocaleString()})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Output Tokens"}),n.jsx("span",{className:"text-gray-300 font-mono",children:m.outputTokens.toLocaleString()})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Cache Write"}),n.jsx("span",{className:"text-gray-300 font-mono",children:(m.cacheWriteTokens||0).toLocaleString()})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Cache Read"}),n.jsx("span",{className:"text-gray-300 font-mono",children:(m.cacheReadTokens||0).toLocaleString()})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Cost"}),n.jsxs("span",{className:"text-amber-400 font-mono",children:["$",m.cost?.toFixed(6)||"0"]})]}),m.savings!=null&&m.savings>0&&n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Cache Savings"}),n.jsxs("span",{className:"text-emerald-400 font-mono",children:["$",m.savings.toFixed(6)]})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Duration"}),n.jsx("span",{className:"text-gray-300",children:m.duration?U0(m.duration):"-"})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Session ID"}),n.jsx("span",{className:"text-gray-400 font-mono text-[10px]",children:m.sessionId})]})]})})})]},p)})})]}),x>1&&n.jsxs("div",{className:"px-5 py-3 border-t border-gray-800 flex items-center justify-between",children:[n.jsx("button",{onClick:()=>d(m=>Math.max(0,m-1)),disabled:c===0,className:"px-3 py-1 text-xs text-gray-400 hover:text-gray-200 border border-gray-700 rounded disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:"Previous"}),n.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:Math.min(x,7)},(m,p)=>{let y;return x<=7||c<3?y=p:c>x-4?y=x-7+p:y=c-3+p,n.jsx("button",{onClick:()=>d(y),className:`w-7 h-7 text-xs rounded transition-colors ${c===y?"bg-indigo-600 text-white":"text-gray-500 hover:text-gray-300 hover:bg-gray-800"}`,children:y+1},y)})}),n.jsx("button",{onClick:()=>d(m=>Math.min(x-1,m+1)),disabled:c>=x-1,className:"px-3 py-1 text-xs text-gray-400 hover:text-gray-200 border border-gray-700 rounded disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:"Next"})]})]})}function pi({label:r,value:f,total:u,color:c}){const d=u>0?f/u*100:0,x={"bg-indigo-500":"rgb(99 102 241 / 0.6)","bg-cyan-500":"rgb(6 182 212 / 0.6)","bg-emerald-500":"rgb(16 185 129 / 0.6)","bg-amber-500":"rgb(245 158 11 / 0.6)"};return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-1",children:[n.jsx("span",{className:"text-xs text-gray-400",children:r}),n.jsxs("span",{className:"text-xs text-gray-500",children:[Vl(f)," (",d.toFixed(1),"%)"]})]}),n.jsx("div",{className:"h-2 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full",style:{width:`${d}%`,backgroundColor:x[c]||c}})})]})}function np(r){const f=new Map;for(const u of r){const c=u.model||"unknown",d=f.get(c)||{cost:0,tokens:0,sessions:0};d.cost+=u.cost||0,d.tokens+=(u.inputTokens||0)+(u.outputTokens||0),d.sessions++,f.set(c,d)}return Array.from(f.entries()).map(([u,c])=>({model:u,...c})).sort((u,c)=>c.cost-u.cost)}function Vl(r){return r?r>=1e6?`${(r/1e6).toFixed(1)}M`:r>=1e3?`${(r/1e3).toFixed(1)}K`:String(r):"0"}function sp(r){return r?r.toLocaleString():"0"}function U0(r){const f=Math.round(r);if(f<60)return`${f}s`;const u=Math.floor(f/60),c=f%60;return u<60?`${u}m ${c}s`:`${Math.floor(u/60)}h ${u%60}m`}function ip(r){if(!r)return"-";try{const f=Date.now()-new Date(r).getTime(),u=Math.floor(f/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}catch{return"-"}}function mu(){const[r,f]=N.useState(!1),[u,c]=N.useState(null),[d,x]=N.useState(null),[g,j]=N.useState([]),[v,m]=N.useState("idle"),p=N.useRef(null),y=N.useRef(null);St("command-output",D=>{const X=D;y.current&&X.executionId===y.current&&X.line&&j(w=>[...w,X.line])}),St("command-complete",D=>{const X=D;if(y.current&&X.executionId===y.current){if(p.current&&(clearTimeout(p.current),p.current=null),f(!1),X.exitCode===0)m("success"),j(w=>[...w,"Command completed successfully."]);else{m("error");const w=`Command failed (exit code ${X.exitCode??"unknown"})`;x(w),j(G=>[...G,w])}y.current=null}}),N.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const C=N.useCallback(async D=>{f(!0),x(null),j([`> specweave ${D}`]),m("running");try{const w=await(await fetch(`/api/commands/${D}`,{method:"POST"})).json();return w.ok?(c(w.data),y.current=w.data?.id||null,p.current=setTimeout(()=>{y.current&&(y.current=null,f(!1),m("error"),x("Command timed out after 60 seconds"),j(G=>[...G,"Timed out after 60 seconds."]))},6e4),w.data):(x(w.error||"Command failed"),m("error"),j(G=>[...G,`Error: ${w.error||"Command failed"}`]),f(!1),null)}catch(X){return x(String(X)),m("error"),j(w=>[...w,`Error: ${String(X)}`]),f(!1),null}},[]),L=N.useCallback(()=>{f(!1),c(null),x(null),j([]),m("idle"),y.current=null,p.current&&(clearTimeout(p.current),p.current=null)},[]);return{execute:C,running:r,result:u,error:d,output:g,status:v,reset:L}}function rp(r){switch(r){case"connected":return"success";case"sync_failed":return"warning";case"configured_never_synced":return"info";default:return"default"}}function cp(r){switch(r){case"connected":return"Connected";case"sync_failed":return"Sync Failed";case"configured_never_synced":return"Ready";case"not_configured":return"Not Configured";default:return r||"Unknown"}}function up(){const[r,f]=N.useState("health"),[u,c]=N.useState(null),[d,x]=N.useState(0);St("sync-update",()=>x(K=>K+1));const{data:g,loading:j,error:v,refetch:m}=Le(`/api/sync/status?_r=${d}`),{data:p,loading:y}=Le(`/api/sync/audit?limit=100&_r=${d}`),{data:C,loading:L}=Le(`/api/sync/audit/summary?_r=${d}`),{execute:D,running:X}=mu(),w=async K=>{c(K);try{const Z=new URLSearchParams(window.location.search).get("project")||"",k=Z?`?platform=${K}&project=${Z}`:`?platform=${K}`;await fetch(`/api/sync/verify${k}`,{method:"POST"}),m()}catch{}c(null)};if(j||y||L)return n.jsx(Et,{});if(v)return n.jsx(fa,{message:v,onRetry:m});if(!g)return null;const G=Object.entries(g.platforms).filter(([K])=>["github","jira","ado"].includes(K)),M=p?.length||0,Q=p?.filter(K=>K.result==="error").length||0,se=p?.filter(K=>K.conflict)||[],te=G.filter(([,K])=>K.connectionStatus==="connected").length;return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Sync Health"}),n.jsx("button",{onClick:()=>D("sync-push"),disabled:X,className:"px-3 py-1.5 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white text-xs rounded-lg transition-colors",children:X?"Syncing...":"Sync Now"})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:"Platforms",value:G.length,subtitle:`${te} connected`,color:"indigo"}),n.jsx(ce,{title:"Audit Entries",value:M,color:"cyan"}),n.jsx(ce,{title:"Errors",value:Q,color:"rose"}),n.jsx(ce,{title:"Conflicts",value:se.length,color:"amber"})]}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:["health","audit","conflicts"].map(K=>n.jsx("button",{onClick:()=>f(K),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===K?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:K==="health"?"Platform Health":K==="audit"?"Audit Log":`Conflicts (${se.length})`},K))}),r==="health"&&n.jsx(n.Fragment,{children:G.length===0?n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:[n.jsx("p",{className:"text-gray-500 text-sm",children:"No sync platforms configured"}),n.jsx("p",{className:"text-gray-600 text-xs mt-1",children:"Configure GitHub, JIRA, or ADO in your config"})]}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:G.map(([K,Z])=>{const k=C?.[K],B=Z.connectionStatus||"unknown";return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(om,{platform:K}),n.jsxs("div",{children:[n.jsx("span",{className:"text-sm font-medium text-gray-300 capitalize",children:K}),Z.configDetail&&n.jsx("div",{className:"text-[10px] text-gray-600 mt-0.5",children:Z.configDetail})]})]}),n.jsx(de,{label:cp(B),variant:rp(B)})]}),Z.diagnosticMessage&&n.jsx("div",{className:"text-xs text-gray-500 mb-3 p-2 bg-gray-800/30 rounded-lg",children:Z.diagnosticMessage}),B==="not_configured"&&n.jsx(ft,{to:"/config",className:"block text-center text-xs text-indigo-400 hover:text-indigo-300 py-2 border border-gray-800 rounded-lg hover:border-indigo-500/30 transition-colors",children:"Configure in Settings"}),B==="configured_never_synced"&&n.jsx("button",{onClick:()=>w(K),disabled:u===K,className:"w-full text-xs text-indigo-400 hover:text-indigo-300 py-2 border border-gray-800 rounded-lg hover:border-indigo-500/30 transition-colors disabled:opacity-50",children:u===K?"Verifying...":"Verify Connection"}),B==="sync_failed"&&n.jsx("button",{onClick:()=>w(K),disabled:u===K,className:"w-full text-xs text-amber-400 hover:text-amber-300 py-2 border border-amber-500/20 rounded-lg hover:border-amber-500/40 transition-colors disabled:opacity-50",children:u===K?"Verifying...":"Retry Sync"}),n.jsxs("div",{className:"space-y-2 mt-3",children:[Z.lastImport&&n.jsx(Ql,{label:"Last Import",value:new Date(Z.lastImport).toLocaleString()}),B==="connected"&&!Z.lastImport&&n.jsx(Ql,{label:"Status",value:"Connected, no imports yet"}),Z.lastImportCount!=null&&n.jsx(Ql,{label:"Items Imported",value:Z.lastImportCount.toLocaleString()}),Z.lastSkippedCount!=null&&Z.lastSkippedCount>0&&n.jsx(Ql,{label:"Skipped",value:Z.lastSkippedCount.toLocaleString()}),k&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"border-t border-gray-800 my-2"}),n.jsx(Ql,{label:"Total Ops",value:k.total.toLocaleString()}),n.jsx(Ql,{label:"Success",value:k.success.toLocaleString()}),k.errors>0&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500",children:"Errors"}),n.jsx(de,{label:String(k.errors),variant:"error"})]})]})]})]},K)})})}),r==="audit"&&n.jsx(L0,{entries:p||[]}),r==="conflicts"&&n.jsx(L0,{entries:se}),g.lastUpdated&&n.jsxs("p",{className:"text-xs text-gray-600",children:["Last metadata update: ",new Date(g.lastUpdated).toLocaleString()]})]})}function L0({entries:r}){if(r.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No audit entries"})});const f={success:"success",error:"error",denied:"warning",skipped:"default"};return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Time"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Platform"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Operation"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Item"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Direction"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Result"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Duration"})]})}),n.jsx("tbody",{children:r.map((u,c)=>n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:op(u.timestamp)}),n.jsx("td",{className:"px-4 py-2",children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(om,{platform:u.platform}),n.jsx("span",{className:"text-xs text-gray-400 capitalize",children:u.platform})]})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-400",children:u.operation}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 font-mono max-w-[120px] truncate",children:u.itemId||"-"}),n.jsx("td",{className:"px-4 py-2",children:n.jsx(de,{label:u.direction,variant:u.direction==="push"?"info":"default"})}),n.jsx("td",{className:"px-4 py-2",children:n.jsx(de,{label:u.result,variant:f[u.result]||"default"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-600 text-right",children:u.duration?`${u.duration}ms`:"-"})]},c))})]})})}function Ql({label:r,value:f}){return n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500",children:r}),n.jsx("span",{className:"text-xs text-gray-400",children:f})]})}function om({platform:r}){const f={github:"bg-gray-700",jira:"bg-blue-700",ado:"bg-blue-600"};return n.jsx("div",{className:`w-5 h-5 rounded ${f[r]||"bg-gray-700"} flex items-center justify-center`,children:n.jsx("span",{className:"text-[9px] text-white font-bold",children:r[0]?.toUpperCase()})})}function op(r){if(!r)return"-";try{const f=Date.now()-new Date(r).getTime(),u=Math.floor(f/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}catch{return"-"}}const fm={prompt_too_long:"error",api_error:"warning",tool_failure:"info",hook_error:"default",rate_limit:"warning",unknown:"default"},Zn=50;function fp(){const[r,f]=Ba("tab","groups"),[u,c]=Ba("type",""),[d,x]=Ba("q",""),[g,j]=Ba("session",""),[v,m]=N.useState(0),[p,y]=N.useState(d),C=v*Zn,L=u?`&type=${encodeURIComponent(u)}`:"",D=d?`&search=${encodeURIComponent(d)}`:"",[X,w]=N.useState(0);St("error-detected",()=>w(F=>F+1));const{data:G,loading:M,error:Q}=Le(r==="groups"?`/api/errors/groups?_r=${X}`:""),{data:se,loading:te,error:K}=Le(r==="errors"||r==="groups"?`/api/errors/recent?limit=${Zn}&offset=${C}${L}${D}&_r=${X}`:""),{data:Z,loading:k,error:B}=Le(r==="sessions"||g?`/api/errors/sessions?limit=50&_r=${X}`:""),{data:I,loading:ae,error:De}=Le(r==="timeline"?`/api/errors/timeline?bucket=60&_r=${X}`:""),dt=N.useCallback(()=>{x(p.trim()),m(0),p.trim()&&f("errors")},[p,x,f]);N.useEffect(()=>{g&&Z&&!Z.find(F=>F.sessionId===g)&&j("")},[g,Z,j]);const Ze=r==="groups"&&M||r==="errors"&&te||r==="timeline"&&ae||r==="sessions"&&k,Je=Q||K||B||De,O=se?.total||0,V=se?.errors||[],ne=G?.length||0,je=G?.reduce((F,Ve)=>F+Ve.sessions,0)||0,Ne=G?.[0]?.type||"-",E=g?Z?.find(F=>F.sessionId===g):null,Y=u?(Z||[]).filter(F=>F.errors.some(Ve=>Ve.type===u)):Z||[],$=Math.ceil(O/Zn),W=F=>{c(F),f("errors"),j(""),m(0)},ie=F=>{f(F),j(""),F!=="errors"&&m(0)},fe=()=>{c(""),x(""),y(""),m(0)};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Error Tracing"}),n.jsx("span",{className:"text-xs text-gray-500",children:"Observability for Claude Code sessions"})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx("input",{type:"text",value:p,onChange:F=>y(F.target.value),onKeyDown:F=>F.key==="Enter"&&dt(),placeholder:"Search errors by message, tool name, or context...",className:"w-full px-3 py-2 text-sm bg-gray-900/50 border border-gray-700 rounded-lg text-gray-300 placeholder-gray-600 focus:outline-none focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500/30"}),d&&n.jsx("button",{onClick:()=>{x(""),y(""),m(0)},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-300 text-xs",children:"clear"})]}),n.jsx("button",{onClick:dt,className:"px-4 py-2 text-sm bg-indigo-600 hover:bg-indigo-500 text-white rounded-lg transition-colors",children:"Search"})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:"Total Errors",value:O,color:"rose"}),n.jsx(ce,{title:"Error Types",value:ne,color:"amber"}),n.jsx(ce,{title:"Affected Sessions",value:je,color:"indigo"}),n.jsx(ce,{title:"Most Common",value:Ne,color:"cyan"})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:["groups","errors","timeline","sessions"].map(F=>n.jsx("button",{onClick:()=>ie(F),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===F?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:F==="groups"?"Error Groups":F==="errors"?"All Errors":F==="timeline"?"Timeline":"Sessions"},F))}),(u||d)&&n.jsxs("div",{className:"flex items-center gap-2",children:[u&&n.jsx(de,{label:`type: ${u.replace(/_/g," ")}`,variant:"info"}),d&&n.jsx(de,{label:`search: ${d.slice(0,20)}`,variant:"default"}),n.jsx("button",{onClick:fe,className:"text-xs text-gray-500 hover:text-gray-300 transition-colors",children:"clear all"})]})]}),Je&&n.jsxs("div",{className:"bg-rose-900/30 border border-rose-700 rounded-lg px-4 py-3 flex items-center justify-between",children:[n.jsx("div",{className:"text-sm text-rose-300",children:Je}),n.jsx("button",{onClick:()=>window.location.reload(),className:"text-xs text-rose-400 hover:text-rose-200 px-2 py-1 border border-rose-700 rounded transition-colors",children:"Retry"})]}),g&&E&&n.jsx(gp,{session:E,onClose:()=>j("")}),Ze&&!g&&n.jsx(Et,{}),!g&&!Ze&&r==="groups"&&n.jsx(dp,{groups:G||[],onGroupClick:W}),!g&&!Ze&&r==="errors"&&n.jsx(mp,{errors:V,total:O,page:v,totalPages:$,onPageChange:m,onSessionClick:F=>{j(F),f("sessions")}}),!g&&!Ze&&r==="timeline"&&n.jsx(xp,{buckets:I||[],errors:V,onSessionClick:F=>j(F)}),!g&&!Ze&&r==="sessions"&&n.jsx(hp,{sessions:Y,onSelect:F=>j(F)}),!Ze&&!Je&&O===0&&!g&&n.jsx(du,{title:"No errors detected",description:"Claude Code session logs are clean"})]})}function dp({groups:r,onGroupClick:f}){return r.length===0?null:n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Error Groups"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Type"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Count"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Sessions"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Last Seen"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Sample Message"})]})}),n.jsx("tbody",{children:r.map(u=>n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsx("td",{className:"px-4 py-2",children:n.jsx(de,{label:u.type.replace(/_/g," "),variant:fm[u.type]||"default"})}),n.jsx("td",{className:"px-4 py-2 text-right",children:n.jsx("button",{onClick:()=>f(u.type),className:"text-sm text-indigo-400 hover:text-indigo-300 font-mono transition-colors",title:`View all ${u.count} errors of this type`,children:u.count})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:u.sessions}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-300 font-mono",title:$l(u.lastSeen),children:Fn(u.lastSeen)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 max-w-xs truncate",children:u.recentMessages[0]||"-"})]},u.type))})]})]})}function mp({errors:r,total:f,page:u,totalPages:c,onPageChange:d,onSessionClick:x}){const[g,j]=N.useState(new Set),v=N.useCallback(y=>{j(C=>{const L=new Set(C);return L.has(y)?L.delete(y):L.add(y),L})},[]);if(r.length===0)return n.jsx(du,{title:"No errors",description:"No errors match the current filter"});const m=u*Zn+1,p=Math.min(u*Zn+r.length,f);return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsxs("div",{className:"px-5 py-3 border-b border-gray-800 flex items-center justify-between",children:[n.jsxs("h3",{className:"text-sm font-medium text-gray-300",children:["Errors ",m,"–",p," of ",f]}),c>1&&n.jsx(H0,{page:u,totalPages:c,onChange:d})]}),n.jsx("div",{className:"divide-y divide-gray-800/50",children:r.map((y,C)=>{const L=g.has(C),D=y.message.length>120;return n.jsx("div",{className:"px-4 py-3 hover:bg-gray-800/20 transition-colors",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx("div",{className:"flex-shrink-0 mt-0.5",children:n.jsx(de,{label:y.type.replace(/_/g," "),variant:fm[y.type]||"default"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:`text-xs text-gray-300 ${L?"whitespace-pre-wrap break-words":"truncate"} ${D?"cursor-pointer":""}`,onClick:()=>D&&v(C),title:D?L?"Click to collapse":"Click to expand details":void 0,children:[D&&n.jsx("span",{className:"text-indigo-400 mr-1 text-[10px] inline-block w-3",children:L?"▼":"▶"}),L?y.message:y.message.slice(0,200),!L&&D&&n.jsx("span",{className:"text-indigo-400 ml-1",children:"...more"})]}),y.context?.toolName&&n.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[n.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.5 bg-gray-800 border border-gray-700 rounded text-amber-400",children:y.context.toolName}),y.context.toolInput&&n.jsx("span",{className:"text-[10px] text-gray-500 font-mono truncate max-w-md",children:y.context.toolInput})]}),L&&n.jsx(dm,{context:y.context})]}),n.jsxs("div",{className:"flex-shrink-0 text-right",children:[n.jsx("div",{className:"text-[10px] text-gray-300 font-mono",title:$l(y.timestamp),children:Fn(y.timestamp)}),n.jsx("div",{className:"text-[10px] text-gray-600",children:$l(y.timestamp)}),n.jsx("button",{onClick:()=>x(y.sessionId),className:"text-[10px] text-indigo-400 hover:text-indigo-300 font-mono mt-0.5 transition-colors",title:"View full session",children:y.sessionId.slice(0,8)}),y.context?.messageIndex!=null&&n.jsxs("div",{className:"text-[10px] text-gray-600",children:["msg #",y.context.messageIndex]})]})]})},`${y.sessionId}-${y.timestamp}-${C}`)})}),c>1&&n.jsx("div",{className:"px-5 py-3 border-t border-gray-800 flex justify-end",children:n.jsx(H0,{page:u,totalPages:c,onChange:d})})]})}function dm({context:r}){if(!r)return null;const{precedingAction:f,recentTools:u}=r;return!f&&(!u||u.length===0)?null:n.jsxs("div",{className:"mt-2 p-2 bg-gray-900/60 border border-gray-800 rounded-lg space-y-1.5",children:[f&&n.jsxs("div",{children:[n.jsx("span",{className:"text-[10px] text-gray-500 uppercase tracking-wider",children:"What preceded this error:"}),n.jsx("div",{className:"text-[11px] text-gray-400 font-mono mt-0.5",children:f})]}),u&&u.length>0&&n.jsxs("div",{children:[n.jsx("span",{className:"text-[10px] text-gray-500 uppercase tracking-wider",children:"Recent tool chain:"}),n.jsx("div",{className:"flex flex-col gap-0.5 mt-0.5",children:u.map((c,d)=>n.jsxs("div",{className:"flex items-center gap-1.5 text-[10px]",children:[n.jsxs("span",{className:"text-gray-600",children:[u.length-d,"."]}),n.jsx("span",{className:"font-mono text-amber-400/80",children:c.name}),c.input&&n.jsx("span",{className:"text-gray-600 font-mono truncate max-w-sm",children:c.input})]},d))})]})]})}function H0({page:r,totalPages:f,onChange:u}){return n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("button",{onClick:()=>u(Math.max(0,r-1)),disabled:r===0,className:"px-2 py-1 text-xs rounded transition-colors disabled:text-gray-700 text-gray-400 hover:text-white hover:bg-gray-700",children:"Prev"}),n.jsxs("span",{className:"text-[10px] text-gray-500 px-2",children:[r+1," / ",f]}),n.jsx("button",{onClick:()=>u(Math.min(f-1,r+1)),disabled:r>=f-1,className:"px-2 py-1 text-xs rounded transition-colors disabled:text-gray-700 text-gray-400 hover:text-white hover:bg-gray-700",children:"Next"})]})}function xp({buckets:r,errors:f,onSessionClick:u}){const[c,d]=N.useState(null),x=Math.max(...r.map(m=>m.count),1),g={tool_failure:"bg-blue-500",prompt_too_long:"bg-rose-500",api_error:"bg-amber-500",hook_error:"bg-gray-500",rate_limit:"bg-amber-400",unknown:"bg-gray-600"},j=c?f.filter(m=>{const p=new Date(m.timestamp).getTime();return p>=new Date(c.start).getTime()&&p<new Date(c.end).getTime()}):f,v=m=>{try{return new Date(m).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return m}};return n.jsxs("div",{className:"space-y-4",children:[r.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Error Density (per hour)"}),c&&n.jsx("button",{onClick:()=>d(null),className:"text-[10px] text-indigo-400 hover:text-indigo-300",children:"Clear filter"})]}),n.jsx("div",{className:"flex items-end gap-px h-24",children:r.map((m,p)=>{const y=m.count/x*100,C=c?.start===m.start;return n.jsx("div",{className:"flex-1 flex flex-col items-center justify-end cursor-pointer group relative",onClick:()=>d(C?null:m),title:`${v(m.start)}: ${m.count} errors`,children:n.jsx("div",{className:`w-full min-h-[2px] rounded-t transition-all ${C?"bg-indigo-400":"bg-rose-500/70 group-hover:bg-rose-400"}`,style:{height:`${Math.max(y,2)}%`}})},p)})}),n.jsxs("div",{className:"flex justify-between mt-1",children:[n.jsx("span",{className:"text-[9px] text-gray-600",children:r.length>0?v(r[0].start):""}),n.jsx("span",{className:"text-[9px] text-gray-600",children:r.length>0?v(r[r.length-1].start):""})]}),n.jsx("div",{className:"flex gap-3 mt-2",children:Object.entries(g).map(([m,p])=>n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${p}`}),n.jsx("span",{className:"text-[9px] text-gray-600",children:m.replace(/_/g," ")})]},m))})]}),c&&n.jsxs("div",{className:"text-xs text-gray-400 px-1",children:["Showing ",j.length," errors from ",v(c.start)]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:c?"Filtered Errors":"Recent Errors"}),n.jsxs("div",{className:"space-y-1 max-h-[400px] overflow-y-auto custom-scrollbar",children:[j.length===0&&n.jsx("p",{className:"text-xs text-gray-600",children:"No errors in this time range"}),j.slice(0,100).map((m,p)=>n.jsxs("div",{className:"flex items-start gap-3 py-2 px-2 hover:bg-gray-800/30 rounded cursor-pointer",onClick:()=>u(m.sessionId),children:[n.jsx("div",{className:`w-2 h-2 rounded-full mt-1.5 flex-shrink-0 ${g[m.type]||"bg-gray-500"}`}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-xs text-gray-400 font-mono",children:m.type.replace(/_/g," ")}),m.context?.toolName&&n.jsx("span",{className:"text-[10px] font-mono px-1 py-0.5 bg-gray-800 border border-gray-700 rounded text-amber-400",children:m.context.toolName}),n.jsx("span",{className:"text-[10px] text-gray-300 font-mono",children:Fn(m.timestamp)}),n.jsx("span",{className:"text-[10px] text-gray-600",children:$l(m.timestamp)})]}),n.jsx("div",{className:"text-xs text-gray-500 truncate mt-0.5",children:m.message}),m.context?.precedingAction&&n.jsxs("div",{className:"text-[10px] text-gray-600 mt-0.5 truncate",children:["After: ",m.context.precedingAction]})]})]},p))]})]})]})}function hp({sessions:r,onSelect:f}){return r.length===0?null:n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Recent Sessions"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Session"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Branch"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Messages"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Tool Calls"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Errors"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Started"})]})}),n.jsx("tbody",{children:r.map(u=>n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30 cursor-pointer",onClick:()=>f(u.sessionId),children:[n.jsx("td",{className:"px-4 py-2 text-xs text-gray-400 font-mono",children:u.sessionId.slice(0,8)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:u.gitBranch||"-"}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:u.messageCount}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:u.toolCallCount}),n.jsx("td",{className:"px-4 py-2 text-right",children:u.errors.length>0?n.jsx(de,{label:String(u.errors.length),variant:"error"}):n.jsx("span",{className:"text-xs text-gray-600",children:"0"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-300 font-mono",title:$l(u.startTime),children:Fn(u.startTime)})]},u.sessionId))})]})]})}function gp({session:r,onClose:f}){const[u,c]=N.useState(new Set),d=x=>{c(g=>{const j=new Set(g);return j.has(x)?j.delete(x):j.add(x),j})};return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{children:[n.jsxs("h3",{className:"text-sm font-medium text-gray-300",children:["Session: ",n.jsx("span",{className:"font-mono",children:r.sessionId.slice(0,12)})]}),n.jsxs("div",{className:"text-[10px] text-gray-600 mt-0.5",children:["v",r.version," | ",r.gitBranch," | ",r.messageCount," messages | ",r.toolCallCount," tool calls"]})]}),n.jsx("button",{onClick:f,className:"px-2 py-1 text-xs text-gray-400 hover:text-white hover:bg-gray-700 rounded transition-colors",children:"Back"})]}),n.jsxs("div",{className:"flex gap-3 mb-4",children:[n.jsxs("div",{className:"text-xs text-gray-500",children:["Started: ",new Date(r.startTime).toLocaleString()]}),r.endTime&&n.jsxs("div",{className:"text-xs text-gray-500",children:["Ended: ",new Date(r.endTime).toLocaleString()]})]}),r.errors.length===0?n.jsx("p",{className:"text-gray-600 text-xs",children:"No errors in this session"}):n.jsx("div",{className:"space-y-2",children:r.errors.map((x,g)=>{const j=u.has(g),v=x.message.length>150;return n.jsxs("div",{className:"p-3 bg-gray-800/50 rounded-lg border-l-2 border-rose-500/50",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx(de,{label:x.type.replace(/_/g," "),variant:"error"}),x.context?.toolName&&n.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.5 bg-gray-800 border border-gray-700 rounded text-amber-400",children:x.context.toolName}),n.jsx("span",{className:"text-[10px] text-gray-300 font-mono",children:Fn(x.timestamp)}),n.jsx("span",{className:"text-[10px] text-gray-600",children:$l(x.timestamp)})]}),n.jsxs("div",{className:`text-xs text-gray-400 ${j?"whitespace-pre-wrap break-words":""} ${v?"cursor-pointer":""}`,onClick:()=>v&&d(g),title:v?j?"Click to collapse":"Click to expand":void 0,children:[v&&n.jsx("span",{className:"text-indigo-400 mr-1 text-[10px] inline-block w-3",children:j?"▼":"▶"}),j?x.message:x.message.slice(0,300),!j&&v&&n.jsx("span",{className:"text-indigo-400 ml-1",children:"...more"})]}),x.context?.toolInput&&n.jsx("div",{className:"text-[10px] text-gray-500 font-mono mt-1.5 bg-gray-900/50 px-2 py-1 rounded",children:x.context.toolInput}),x.context?.messageIndex!=null&&n.jsxs("div",{className:"text-[10px] text-gray-600 mt-1",children:["At message #",x.context.messageIndex]}),j&&n.jsx(dm,{context:x.context})]},g)})})]})}function $l(r){if(!r)return"-";const f=Date.now()-new Date(r).getTime(),u=Math.floor(f/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function Fn(r){if(!r)return"-";try{return new Date(r).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return r}}const yp=[{value:"all",label:"All"},{value:"command",label:"Commands"},{value:"hook",label:"Hooks"},{value:"notification",label:"Notifications"},{value:"cost",label:"Cost"}],pp=[{value:"all",label:"All Levels"},{value:"error",label:"Errors"},{value:"warning",label:"Warnings"},{value:"info",label:"Info"}];function vp(){const[r,f]=Ba("category","all"),[u,c]=Ba("severity","all"),d=r||"all",x=u||"all",[g,j]=N.useState([]),[v,m]=N.useState(200),[p,y]=N.useState(null),C=new URLSearchParams;C.set("limit",String(v)),d!=="all"&&C.set("categories",d),x!=="all"&&C.set("severity",x);const{data:L,loading:D}=Le(`/api/activity/stream?${C.toString()}`),X=N.useCallback(B=>{j(I=>[B,...I].slice(0,50))},[]);if(St("activity",X),D)return n.jsx(Et,{});const w=[...g,...L||[]],G=new Set,M=[];for(const B of w){const I=`${B.timestamp}:${B.title}`;G.has(I)||(G.add(I),M.push(B))}const Q=M.filter(B=>!(d!=="all"&&B.category!==d||x!=="all"&&B.severity!==x)),se=M.filter(B=>B.severity==="error").length,te=M.filter(B=>B.severity==="warning").length,K=new Set(M.map(B=>B.source)),Z=B=>{y(I=>I===B?null:B)},k=()=>{m(B=>B+200)};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Activity Stream"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-400 pulse-dot"}),n.jsx("span",{className:"text-xs text-gray-500",children:"Live"})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:"Total Events",value:M.length,color:"indigo"}),n.jsx(ce,{title:"Errors",value:se,color:"rose"}),n.jsx(ce,{title:"Warnings",value:te,color:"amber"}),n.jsx(ce,{title:"Sources",value:K.size,color:"cyan"})]}),n.jsxs("div",{className:"flex flex-wrap gap-4",children:[n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:yp.map(B=>n.jsx("button",{onClick:()=>f(B.value),className:`px-3 py-1 text-xs rounded-md transition-colors ${d===B.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:B.label},B.value))}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:pp.map(B=>n.jsx("button",{onClick:()=>c(B.value),className:`px-3 py-1 text-xs rounded-md transition-colors ${x===B.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:B.label},B.value))}),n.jsxs("span",{className:"text-xs text-gray-500 self-center",children:[Q.length," events"]})]}),n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl divide-y divide-gray-800/50",children:Q.length===0?n.jsxs("div",{className:"p-8 text-center",children:[n.jsx("p",{className:"text-gray-500 text-sm",children:"No events match filters"}),n.jsx("p",{className:"text-gray-600 text-xs mt-1",children:"Try adjusting category or severity filters"})]}):n.jsxs(n.Fragment,{children:[Q.slice(0,v).map((B,I)=>{const ae=`${B.timestamp}-${I}`,De=p===ae;return n.jsx(bp,{event:B,isExpanded:De,onToggle:()=>Z(ae)},ae)}),Q.length>=v&&n.jsx("div",{className:"p-4 text-center",children:n.jsx("button",{onClick:k,className:"px-4 py-2 text-xs text-indigo-400 hover:text-indigo-300 border border-indigo-500/30 rounded-lg transition-colors",children:"Load more events"})})]})})]})}function bp({event:r,isExpanded:f,onToggle:u}){const c=r.severity==="error"?"bg-rose-400":r.severity==="warning"?"bg-amber-400":"bg-gray-600",d={command:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",hook:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101",notification:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",cost:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1",sync:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581"},x=r.detail||r.metadata&&Object.keys(r.metadata).length>0;return n.jsxs("div",{children:[n.jsxs("div",{className:`px-4 py-3 flex items-start gap-3 transition-colors ${x?"cursor-pointer hover:bg-gray-800/20":""}`,onClick:x?u:void 0,children:[n.jsx("div",{className:`w-1.5 h-1.5 rounded-full mt-2 flex-shrink-0 ${c}`}),n.jsx("div",{className:"w-5 h-5 flex-shrink-0 mt-0.5 text-gray-500",children:n.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:d[r.category]||d.command})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-sm text-gray-300",children:r.title}),n.jsx(de,{label:r.category,variant:Ei(r.severity)})]}),r.detail&&!f&&n.jsx("p",{className:"text-xs text-gray-500 mt-0.5 truncate",children:r.detail}),r.source&&n.jsxs("span",{className:"text-[10px] text-gray-600 mt-0.5 block",children:["via ",r.source]})]}),n.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[r.timestamp&&n.jsx("span",{className:"text-[10px] text-gray-600 whitespace-nowrap",children:jp(r.timestamp)}),x&&n.jsx("svg",{className:`w-4 h-4 text-gray-600 transition-transform duration-200 ${f?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),f&&n.jsxs("div",{className:"px-4 pb-3 ml-10 space-y-2",children:[r.detail&&n.jsxs("div",{className:"bg-gray-800/50 rounded p-3",children:[n.jsx("span",{className:"text-[10px] text-gray-500 uppercase block mb-1",children:"Detail"}),n.jsx("p",{className:"text-xs text-gray-300 whitespace-pre-wrap",children:r.detail})]}),r.metadata&&Object.keys(r.metadata).length>0&&n.jsxs("div",{className:"bg-gray-800/50 rounded p-3",children:[n.jsx("span",{className:"text-[10px] text-gray-500 uppercase block mb-1",children:"Metadata"}),n.jsx("pre",{className:"text-xs text-gray-400 font-mono whitespace-pre-wrap overflow-x-auto",children:JSON.stringify(r.metadata,null,2)})]})]})]})}function jp(r){if(!r)return"-";const f=Date.now()-new Date(r).getTime(),u=Math.floor(f/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function Np(){const[r,f]=N.useState(0);St("config-changed",()=>f(k=>k+1));const{data:u,loading:c,error:d,refetch:x}=Le(`/api/config?_r=${r}`),{activeProject:g}=Kl(),[j,v]=N.useState(new Set),[m,p]=N.useState({}),[y,C]=N.useState(!1),[L,D]=N.useState(null),[X,w]=N.useState([]);if(c)return n.jsx(Et,{});if(d)return n.jsx(fa,{message:d,onRetry:x});if(!u)return null;const G=k=>{v(B=>{const I=new Set(B);return I.has(k)?I.delete(k):I.add(k),I})},M=Object.keys(m).length>0,Q=(k,B)=>{p(I=>({...I,[k]:B})),w(I=>I.filter(ae=>ae.path!==k))},se=async()=>{if(M){C(!0),D(null),w([]);try{const k={};for(const[Ze,Je]of Object.entries(m))Ep(k,Ze,Je);const B=g?`?project=${g.id}`:"",ae=await(await fetch(`/api/config/validate${B}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})).json();if(ae.errors&&ae.errors.length>0){w(ae.errors),D("Validation failed. Fix errors before saving."),C(!1);return}const dt=await(await fetch(`/api/config${B}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})).json();dt.ok?(D("Saved successfully"),p({}),w([]),x(),setTimeout(()=>D(null),3e3)):D(`Error: ${dt.error}`)}catch(k){D(`Error: ${k}`)}finally{C(!1)}}},te=()=>{p({}),D(null),w([])},K=Object.entries(u).filter(([k,B])=>typeof B=="object"&&B!==null),Z=Object.entries(u).filter(([k,B])=>typeof B!="object"||B===null);return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Configuration"}),n.jsx("span",{className:"text-xs text-gray-500",children:".specweave/config.json"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[L&&n.jsx("span",{className:`text-xs ${L.startsWith("Error")||L.startsWith("Validation")?"text-rose-400":"text-emerald-400"}`,children:L}),M&&n.jsxs(n.Fragment,{children:[n.jsx(de,{label:`${Object.keys(m).length} changes`,variant:"warning"}),n.jsx("button",{onClick:te,className:"px-3 py-1.5 text-xs text-gray-400 hover:text-gray-200 border border-gray-700 rounded-lg transition-colors",children:"Discard"}),n.jsx("button",{onClick:se,disabled:y,className:"px-3 py-1.5 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white text-xs rounded-lg transition-colors",children:y?"Saving...":"Save Changes"})]})]})]}),L&&!M&&L==="Saved successfully"&&n.jsxs("div",{className:"bg-emerald-500/10 border border-emerald-500/30 rounded-lg px-4 py-2 flex items-center gap-2",children:[n.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-400"}),n.jsx("span",{className:"text-xs text-emerald-400",children:"Configuration saved successfully"})]}),X.length>0&&n.jsxs("div",{className:"bg-rose-500/10 border border-rose-500/30 rounded-lg px-4 py-3 space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("div",{className:"w-2 h-2 rounded-full bg-rose-400"}),n.jsx("span",{className:"text-xs text-rose-400 font-medium",children:"Validation errors"})]}),X.map((k,B)=>n.jsxs("div",{className:"text-xs text-rose-300 pl-4",children:[n.jsx("span",{className:"font-mono text-rose-400",children:k.path}),": ",k.message]},B))]}),Z.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-3",children:"General"}),n.jsx("div",{className:"space-y-3",children:Z.map(([k,B])=>n.jsx(xm,{path:k,label:k,value:m[k]!==void 0?m[k]:B,original:B,onChange:I=>Q(k,I),edited:m[k]!==void 0,validationError:X.find(I=>I.path===k)?.message},k))})]}),K.map(([k,B])=>n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsxs("button",{onClick:()=>G(k),className:"w-full px-5 py-3 flex items-center justify-between hover:bg-gray-800/30 transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 capitalize",children:k}),B0(m,k)>0&&n.jsx(de,{label:`${B0(m,k)} edited`,variant:"warning"}),X.some(I=>I.path.startsWith(k+"."))&&n.jsx(de,{label:"errors",variant:"error"})]}),n.jsx("svg",{className:`w-4 h-4 text-gray-500 transition-transform duration-200 ${j.has(k)?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),j.has(k)&&n.jsx("div",{className:"px-5 py-3 border-t border-gray-800",children:n.jsx(mm,{data:B,path:k,edits:m,onChange:Q,validationErrors:X,depth:0})})]},k))]})}function mm({data:r,path:f,edits:u,onChange:c,validationErrors:d,depth:x}){return x>4?n.jsx("span",{className:"text-xs text-gray-600",children:"..."}):n.jsx("div",{className:"space-y-3",style:{marginLeft:x>0?16:0},children:Object.entries(r).map(([g,j])=>{const v=`${f}.${g}`;return j&&typeof j=="object"&&!Array.isArray(j)?n.jsxs("div",{children:[n.jsx("span",{className:"text-xs text-gray-400 font-mono font-medium",children:g}),n.jsx(mm,{data:j,path:v,edits:u,onChange:c,validationErrors:d,depth:x+1})]},g):n.jsx(xm,{path:v,label:g,value:u[v]!==void 0?u[v]:j,original:j,onChange:m=>c(v,m),edited:u[v]!==void 0,validationError:d.find(m=>m.path===v)?.message},g)})})}function xm({path:r,label:f,value:u,original:c,onChange:d,edited:x,validationError:g}){return typeof c=="boolean"||typeof u=="boolean"?n.jsxs("div",{className:"py-1",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:f}),n.jsx("button",{onClick:()=>d(!u),className:`relative w-9 h-5 rounded-full transition-colors ${u?"bg-indigo-600":"bg-gray-700"} ${x?"ring-1 ring-amber-500/50":""}`,children:n.jsx("div",{className:`absolute top-0.5 w-4 h-4 bg-white rounded-full transition-transform ${u?"left-[18px]":"left-0.5"}`})})]}),g&&n.jsx("p",{className:"text-[10px] text-rose-400 mt-0.5",children:g})]}):typeof c=="number"||typeof u=="number"?n.jsxs("div",{className:"py-1",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:f}),n.jsx("input",{type:"number",value:String(u??""),onChange:j=>d(j.target.value?Number(j.target.value):0),className:`bg-gray-800 border text-xs text-amber-400 font-mono rounded px-2 py-1 w-24 text-right ${g?"border-rose-500":x?"border-amber-500/50":"border-gray-700"} focus:ring-indigo-500 focus:border-indigo-500`})]}),g&&n.jsx("p",{className:"text-[10px] text-rose-400 mt-0.5 text-right",children:g})]}):Array.isArray(c)||Array.isArray(u)?n.jsx(Sp,{path:r,label:f,value:Array.isArray(u)?u:Array.isArray(c)?c:[],edited:x,onChange:d,validationError:g}):n.jsxs("div",{className:"py-1",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:f}),n.jsx("input",{type:"text",value:String(u??""),onChange:j=>d(j.target.value),className:`bg-gray-800 border text-xs text-gray-300 rounded px-2 py-1 w-48 text-right ${g?"border-rose-500":x?"border-amber-500/50":"border-gray-700"} focus:ring-indigo-500 focus:border-indigo-500`})]}),g&&n.jsx("p",{className:"text-[10px] text-rose-400 mt-0.5 text-right",children:g})]})}function Sp({path:r,label:f,value:u,edited:c,onChange:d,validationError:x}){const[g,j]=N.useState(!1),[v,m]=N.useState(""),p=L=>{const D=[...u];D.splice(L,1),d(D)},y=()=>{const L=v.trim();L&&(d([...u,L]),m(""))},C=L=>{L.key==="Enter"&&(L.preventDefault(),y())};return n.jsxs("div",{className:"py-1",children:[n.jsxs("button",{onClick:()=>j(L=>!L),className:"flex items-center justify-between w-full group",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:f}),n.jsxs("div",{className:"flex items-center gap-2",children:[c&&n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-amber-500"}),n.jsxs("span",{className:"text-xs text-gray-400 font-mono",children:["[",u.length," items]"]}),n.jsx("svg",{className:`w-3 h-3 text-gray-500 transition-transform duration-200 ${g?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),g&&n.jsxs("div",{className:"mt-2 ml-4 space-y-1",children:[u.length===0&&n.jsx("p",{className:"text-[10px] text-gray-600",children:"No items"}),u.map((L,D)=>n.jsxs("div",{className:"flex items-center gap-2 group/item",children:[n.jsx("span",{className:"text-xs text-gray-300 font-mono flex-1 truncate",children:String(L)}),n.jsx("button",{onClick:()=>p(D),className:"text-[10px] text-gray-600 hover:text-rose-400 opacity-0 group-hover/item:opacity-100 transition-opacity",children:"remove"})]},D)),n.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[n.jsx("input",{type:"text",value:v,onChange:L=>m(L.target.value),onKeyDown:C,placeholder:"Add item...",className:"bg-gray-800 border border-gray-700 text-xs text-gray-300 rounded px-2 py-1 flex-1 focus:ring-indigo-500 focus:border-indigo-500"}),n.jsx("button",{onClick:y,disabled:!v.trim(),className:"px-2 py-1 text-[10px] text-indigo-400 hover:text-indigo-300 border border-indigo-500/30 rounded disabled:opacity-50 transition-colors",children:"Add"})]})]}),x&&n.jsx("p",{className:"text-[10px] text-rose-400 mt-0.5",children:x})]})}function B0(r,f){return Object.keys(r).filter(u=>u.startsWith(f+".")).length}function Ep(r,f,u){const c=f.split(".");let d=r;for(let x=0;x<c.length-1;x++)(!d[c[x]]||typeof d[c[x]]!="object")&&(d[c[x]]={}),d=d[c[x]];d[c[c.length-1]]=u}function hm({lines:r,status:f,onDismiss:u}){const c=N.useRef(null);return N.useEffect(()=>{c.current?.scrollIntoView({behavior:"smooth"})},[r]),r.length===0&&f==="idle"?null:n.jsxs("div",{className:"mt-4 rounded-lg bg-gray-950 border border-gray-700 overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-gray-900 border-b border-gray-700",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${f==="running"?"bg-yellow-400 animate-pulse":f==="success"?"bg-green-400":f==="error"?"bg-red-400":"bg-gray-500"}`}),n.jsx("span",{className:"text-xs text-gray-400 font-mono",children:f==="running"?"Running...":f==="success"?"Completed":f==="error"?"Failed":"Output"})]}),f!=="running"&&u&&n.jsx("button",{onClick:u,className:"text-gray-500 hover:text-gray-300 text-xs",children:"Dismiss"})]}),n.jsxs("div",{className:"p-3 max-h-48 overflow-y-auto font-mono text-xs text-gray-300 whitespace-pre-wrap",children:[r.map((d,x)=>n.jsx("div",{children:d},x)),n.jsx("div",{ref:c})]})]})}function Tp(){const{data:r,loading:f}=Le("/api/plugins/full"),{execute:u,running:c,output:d,status:x,reset:g}=mu(),[j,v]=N.useState(null);if(f)return n.jsx(Et,{});const m=r?.plugins||[],p=r?.skills||[],y=r?.lsp,C=r?.warmup,L=r?.triggerCount||0,D=m.reduce((M,Q)=>M+Q.skillCount,0),X=m.reduce((M,Q)=>M+Q.commandCount,0),w=M=>p.filter(Q=>Q.plugin===M).sort((Q,se)=>se.count-Q.count),G=M=>{v(Q=>Q===M?null:M)};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Plugins & LSP"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{onClick:()=>u("lsp-status"),disabled:c,className:"px-3 py-1.5 bg-gray-700 hover:bg-gray-600 disabled:opacity-50 text-white text-xs rounded-lg transition-colors",children:"Check LSP"}),n.jsx("button",{onClick:()=>u("refresh-marketplace"),disabled:c,className:"px-3 py-1.5 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white text-xs rounded-lg transition-colors",children:c?"Running...":"Refresh Marketplace"})]})]}),n.jsx(hm,{lines:d,status:x,onDismiss:g}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[n.jsx(Ha,{label:"Plugins",value:m.length}),n.jsx(Ha,{label:"Total Skills",value:D}),n.jsx(Ha,{label:"Total Commands",value:X}),n.jsx(Ha,{label:"Trigger Keywords",value:L})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Installed Plugins"})}),m.length===0?n.jsx("div",{className:"p-5 text-gray-500 text-xs",children:"No plugins installed"}):n.jsx("div",{className:"divide-y divide-gray-800/50",children:m.map(M=>{const Q=j===M.name,se=w(M.name);return n.jsxs("div",{children:[n.jsxs("button",{onClick:()=>G(M.name),className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-800/30 transition-colors text-left",children:[n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("span",{className:"text-sm text-gray-300",children:M.name}),n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:M.version})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(de,{label:`${M.skillCount} skills`,variant:"info"}),n.jsx(de,{label:`${M.commandCount} cmds`,variant:"default"}),n.jsx("svg",{className:`w-4 h-4 text-gray-500 transition-transform duration-200 ${Q?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),Q&&n.jsx("div",{className:"px-4 pb-4 bg-gray-800/20",children:se.length===0?n.jsx("p",{className:"text-xs text-gray-600 py-2",children:"No skill usage data for this plugin"}):n.jsxs("div",{className:"space-y-1 mt-1",children:[n.jsxs("div",{className:"grid grid-cols-[1fr,80px,80px,120px] gap-2 px-2 py-1",children:[n.jsx("span",{className:"text-[10px] text-gray-600 uppercase",children:"Skill"}),n.jsx("span",{className:"text-[10px] text-gray-600 uppercase text-right",children:"Invocations"}),n.jsx("span",{className:"text-[10px] text-gray-600 uppercase text-right",children:"Success"}),n.jsx("span",{className:"text-[10px] text-gray-600 uppercase text-right",children:"Last Used"})]}),se.map(te=>n.jsxs("div",{className:"grid grid-cols-[1fr,80px,80px,120px] gap-2 px-2 py-1.5 bg-gray-800/40 rounded",children:[n.jsx("span",{className:"text-xs text-gray-300 font-mono truncate",children:te.name}),n.jsx("span",{className:"text-xs text-gray-400 text-right font-mono",children:te.count}),n.jsxs("span",{className:"text-xs text-right font-mono",children:[n.jsx("span",{className:"text-emerald-400",children:te.successCount}),te.failureCount>0&&n.jsxs("span",{className:"text-rose-400",children:["/",te.failureCount]})]}),n.jsx("span",{className:"text-[10px] text-gray-500 text-right",children:te.lastUsed?Cp(te.lastUsed):"-"})]},te.name))]})})]},M.name)})})]}),p.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Skill Usage Leaderboard"}),n.jsx(um,{items:p.sort((M,Q)=>Q.count-M.count).slice(0,20).map(M=>({label:M.name,value:M.count,color:"#10b981"})),maxBars:20})]}),y&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"LSP Status"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(de,{label:y.status,variant:y.status==="ok"?"success":"warning"}),y.checked&&n.jsxs("span",{className:"text-[10px] text-gray-600",children:["Checked: ",new Date(y.checked).toLocaleDateString()]})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-4",children:[n.jsx(Ha,{label:"Total Languages",value:y.stats.totalLanguages}),n.jsx(Ha,{label:"Checked",value:y.stats.checkedLanguages}),n.jsx(Ha,{label:"Binary Missing",value:y.stats.binaryMissing}),n.jsx(Ha,{label:"Plugin Missing",value:y.stats.pluginMissing})]}),y.missing.length>0&&n.jsxs("div",{className:"space-y-2",children:[n.jsx("h4",{className:"text-xs text-gray-500",children:"Missing Languages"}),y.missing.map((M,Q)=>n.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-800/50 rounded",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(de,{label:M.type,variant:M.type==="binary"?"warning":"default"}),n.jsx("span",{className:"text-xs text-gray-300",children:M.language})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("code",{className:"text-[10px] text-gray-500",children:M.binaryInstall}),M.message&&n.jsx("span",{className:"text-[10px] text-gray-600 max-w-[200px] truncate",children:M.message})]})]},Q))]})]}),C&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"LSP Warmup Status"}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:[C.elapsed?`${(C.elapsed/1e3).toFixed(1)}s`:""," |"," ",C.timestamp?new Date(C.timestamp).toLocaleString():""]})]}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[C.warmedUp.map(M=>n.jsx(de,{label:M,variant:"success"},M)),C.failed.map(M=>n.jsx(de,{label:M,variant:"error"},M))]}),C.warmedUp.length===0&&C.failed.length===0&&n.jsx("p",{className:"text-gray-600 text-xs",children:"No warmup data"})]})]})}function Ha({label:r,value:f}){return n.jsxs("div",{className:"bg-gray-800/50 rounded-lg p-3 text-center",children:[n.jsx("div",{className:"text-lg font-bold text-gray-300",children:f}),n.jsx("div",{className:"text-[10px] text-gray-500",children:r})]})}function Cp(r){if(!r)return"-";const f=Date.now()-new Date(r).getTime(),u=Math.floor(f/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function Ap(){const{data:r,loading:f}=Le("/api/links"),{data:u,loading:c,refetch:d}=Le("/api/services"),{execute:x,running:g,output:j,status:v,reset:m}=mu();if(f||c)return n.jsx(Et,{});const p=(u||[]).filter(w=>w.status==="running").length,y=(u||[]).length,C=new Map;for(const w of u||[])if(w.port>0&&w.status==="running"){const G=C.get(w.port)||[];G.push(w.name),C.set(w.port,G)}const L=Array.from(C.entries()).filter(([,w])=>w.length>1),D=async w=>{await x(w),setTimeout(()=>d(),3e3)},X=async w=>{await x(w),setTimeout(()=>d(),2e3)};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Services & Links"}),n.jsx(hm,{lines:j,status:v,onDismiss:m}),L.length>0&&n.jsxs("div",{className:"bg-amber-500/10 border border-amber-500/30 rounded-xl p-4 flex items-start gap-3",children:[n.jsx("svg",{className:"w-5 h-5 text-amber-400 flex-shrink-0 mt-0.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4.5c-.77-.833-2.694-.833-3.464 0L3.34 16.5c-.77.833.192 2.5 1.732 2.5z"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm font-medium text-amber-300",children:"Port Conflict Detected"}),n.jsx("div",{className:"text-xs text-amber-400/80 mt-1",children:L.map(([w,G])=>n.jsxs("span",{className:"block",children:["Port ",w," is used by: ",G.join(", ")]},w))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:"Services",value:y,color:"indigo",tooltip:`${y} managed services`}),n.jsx(ce,{title:"Running",value:p,color:"emerald",tooltip:`${p} services currently active`}),n.jsx(ce,{title:"External Links",value:(r||[]).length,color:"cyan",tooltip:"Configured external links (docs, repos, etc.)"}),n.jsx(ce,{title:"Stopped",value:y-p,color:"rose",tooltip:`${y-p} services not running`})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Service Status"}),n.jsx("div",{className:"space-y-3",children:(u||[]).map((w,G)=>n.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-800/50 rounded-lg",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${w.status==="running"?"bg-emerald-400":"bg-gray-600"}`}),n.jsxs("div",{children:[n.jsx("span",{className:"text-sm text-gray-300",children:w.name}),n.jsx("div",{className:"text-[10px] text-gray-600",children:w.status==="running"&&w.detail?n.jsx("a",{href:w.detail,target:"_blank",rel:"noopener noreferrer",className:"text-indigo-400 hover:text-indigo-300 underline transition-colors",children:w.detail}):w.detail})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[w.status==="running"&&w.port>0&&n.jsx(de,{label:`Port ${w.port}`,variant:"info"}),w.status==="running"?n.jsx(de,{label:"Running",variant:"success"}):n.jsx(de,{label:"Stopped",variant:"default"}),w.name==="Docs Preview"&&(w.status==="running"?n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("a",{href:w.detail,target:"_blank",rel:"noopener noreferrer",className:"px-2 py-1 text-[10px] text-indigo-400 hover:text-indigo-300 border border-indigo-500/30 rounded transition-colors",children:"Open"}),n.jsx("button",{onClick:()=>X("docs-preview-stop"),disabled:g,className:"px-2 py-1 text-[10px] text-rose-400 hover:text-rose-300 border border-rose-500/30 rounded transition-colors disabled:opacity-50",children:"Stop"})]}):n.jsx("button",{onClick:()=>D("docs-preview-start"),disabled:g,className:"px-2 py-1 text-[10px] text-emerald-400 hover:text-emerald-300 border border-emerald-500/30 rounded transition-colors disabled:opacity-50",children:g?"Starting...":"Start"})),w.status==="running"&&w.name!=="Docs Preview"&&n.jsx("a",{href:w.detail,target:"_blank",rel:"noopener noreferrer",className:"px-2 py-1 text-[10px] text-indigo-400 hover:text-indigo-300 border border-indigo-500/30 rounded transition-colors",children:"Open"})]})]},G))})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"External Links"}),(r||[]).length===0?n.jsx("p",{className:"text-xs text-gray-500",children:"No external links configured"}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:(r||[]).map((w,G)=>n.jsxs("a",{href:w.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between p-3 bg-gray-800/50 rounded-lg hover:bg-gray-800 transition-colors group",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(Mp,{type:w.type}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-gray-300 group-hover:text-white transition-colors",children:w.name}),n.jsx("div",{className:"text-[10px] text-gray-600 truncate max-w-[200px]",children:w.url})]})]}),n.jsx("svg",{className:"w-4 h-4 text-gray-600 group-hover:text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]},G))})]})]})}function Mp({type:r}){const f={docs:"bg-indigo-600",github:"bg-gray-700",jira:"bg-blue-700",ado:"bg-blue-600"};return n.jsx("div",{className:`w-8 h-8 rounded-lg ${f[r]||"bg-gray-700"} flex items-center justify-center`,children:n.jsx("span",{className:"text-xs text-white font-bold",children:r[0]?.toUpperCase()})})}const q0={critical:0,warning:1,info:2};function Rp(){const[r,f]=N.useState("pending"),[u,c]=N.useState(null),[d,x]=N.useState(0);St("notification",()=>x(B=>B+1));const{activeProject:g}=Kl(),{data:j,loading:v,error:m,refetch:p}=Le(`/api/notifications?_r=${d}`);if(v)return n.jsx(Et,{});if(m)return n.jsx(fa,{message:m,onRetry:p});const y=j||[],C=y.filter(B=>!B.dismissedAt),L=y.filter(B=>!!B.dismissedAt),D=C.filter(B=>B.severity==="critical"),X=C.filter(B=>B.severity==="warning"),G=[...r==="pending"?C:r==="dismissed"?L:y].sort((B,I)=>{const ae=q0[B.severity]??3,De=q0[I.severity]??3;return ae!==De?ae-De:new Date(I.createdAt).getTime()-new Date(B.createdAt).getTime()}),M=async B=>{c(B);try{const I=g?`?project=${g.id}`:"";(await fetch(`/api/notifications/${B}/dismiss${I}`,{method:"POST"})).ok&&p()}finally{c(null)}},Q=async()=>{c("__all__");try{const B=g?`?project=${g.id}`:"";for(const I of C)await fetch(`/api/notifications/${I.id}/dismiss${B}`,{method:"POST"});p()}finally{c(null)}},se=B=>B==="critical"?"error":B==="warning"?"warning":"info",te=B=>B==="critical"?"border-l-rose-500":B==="warning"?"border-l-amber-500":"border-l-blue-500",Z=(B=>{const I={};for(const ae of B)I[ae.severity]||(I[ae.severity]=[]),I[ae.severity].push(ae);return I})(G),k={critical:"Critical",warning:"Warnings",info:"Informational"};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Notifications"}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:"Pending",value:C.length,color:"indigo"}),n.jsx(ce,{title:"Critical",value:D.length,color:"rose"}),n.jsx(ce,{title:"Warnings",value:X.length,color:"amber"}),n.jsx(ce,{title:"Dismissed",value:L.length,color:"cyan"})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:[{value:"pending",label:`Pending (${C.length})`},{value:"dismissed",label:`Dismissed (${L.length})`},{value:"all",label:`All (${y.length})`}].map(B=>n.jsx("button",{onClick:()=>f(B.value),className:`px-3 py-1.5 text-xs rounded-md transition-colors ${r===B.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:B.label},B.value))}),C.length>0&&n.jsx("button",{onClick:Q,disabled:u==="__all__",className:"px-3 py-1.5 text-xs text-gray-400 hover:text-gray-200 border border-gray-700 rounded-lg transition-colors disabled:opacity-50",children:u==="__all__"?"Dismissing...":"Dismiss All"})]}),G.length===0?n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:[n.jsx("div",{className:"w-12 h-12 rounded-full bg-gray-800 flex items-center justify-center mx-auto mb-4",children:n.jsx("svg",{className:"w-6 h-6 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"})})}),n.jsx("p",{className:"text-gray-400 text-sm font-medium",children:r==="pending"?"No pending notifications":"No notifications"}),n.jsx("p",{className:"text-gray-600 text-xs mt-1 max-w-xs mx-auto",children:"Notifications appear here when imports complete, discrepancies are found, or syncs fail"})]}):n.jsx("div",{className:"space-y-4",children:["critical","warning","info"].map(B=>{const I=Z[B];return!I||I.length===0?null:n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[n.jsx("h3",{className:"text-xs font-medium text-gray-400 uppercase",children:k[B]||B}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:["(",I.length,")"]})]}),n.jsx("div",{className:"space-y-2",children:I.map(ae=>n.jsxs("div",{className:`bg-gray-900/50 border border-gray-800 border-l-4 ${te(ae.severity)} rounded-xl p-4 flex items-start gap-4 ${ae.dismissedAt?"opacity-60":""}`,children:[n.jsx(zp,{severity:ae.severity}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("span",{className:"text-sm font-medium text-gray-200",children:ae.title}),n.jsx(de,{label:ae.severity,variant:se(ae.severity)}),ae.type&&n.jsx(de,{label:ae.type,variant:"default"})]}),ae.message&&n.jsx("p",{className:"text-xs text-gray-400 mb-2",children:ae.message}),n.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-gray-600",children:[n.jsx("span",{children:new Date(ae.createdAt).toLocaleString()}),ae.source&&n.jsxs("span",{children:["via ",ae.source]}),ae.dismissedAt&&n.jsxs("span",{children:["Dismissed ",new Date(ae.dismissedAt).toLocaleString()]})]})]}),!ae.dismissedAt&&n.jsx("button",{onClick:()=>M(ae.id),disabled:u===ae.id,className:"px-2 py-1 text-xs text-gray-500 hover:text-gray-300 hover:bg-gray-800 rounded transition-colors disabled:opacity-50 flex-shrink-0",children:u===ae.id?"...":"Dismiss"})]},ae.id))})]},B)})})]})}function zp({severity:r}){return r==="critical"?n.jsx("div",{className:"w-8 h-8 rounded-full bg-rose-500/10 flex items-center justify-center flex-shrink-0",children:n.jsx("svg",{className:"w-4 h-4 text-rose-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4.5c-.77-.833-2.694-.833-3.464 0L3.34 16.5c-.77.833.192 2.5 1.732 2.5z"})})}):r==="warning"?n.jsx("div",{className:"w-8 h-8 rounded-full bg-amber-500/10 flex items-center justify-center flex-shrink-0",children:n.jsx("svg",{className:"w-4 h-4 text-amber-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}):n.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-500/10 flex items-center justify-center flex-shrink-0",children:n.jsx("svg",{className:"w-4 h-4 text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})}function wp(r){if(!r)return null;if(r.startsWith("https://"))return r.replace(/\.git$/,"");const f=r.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(f)return`https://${f[1]}/${f[2]}`;const u=r.match(/^ssh:\/\/git@([^/]+)\/(.+?)(?:\.git)?$/);return u?`https://${u[1]}/${u[2]}`:null}function _p(){const{data:r,loading:f,error:u,refetch:c}=Le("/api/repos");if(f)return n.jsx(Et,{});if(u)return n.jsx(fa,{message:u,onRetry:c});const d=r||[],x=[...new Set(d.map(v=>v.org))],g=d.filter(v=>v.hasSpecweave).length,j=d.find(v=>v.isCurrent);return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Repositories"}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:"Repositories",value:d.length,color:"indigo"}),n.jsx(ce,{title:"Organizations",value:x.length,color:"cyan"}),n.jsx(ce,{title:"With SpecWeave",value:g,color:"emerald"}),n.jsx(ce,{title:"Current",value:j?j.name:"-",subtitle:j?`${j.org}/${j.name}`:"No current project",color:"amber"})]}),d.length===0?n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:[n.jsx("p",{className:"text-gray-500 text-sm",children:"No repositories found"}),n.jsx("p",{className:"text-gray-600 text-xs mt-1",children:"This project doesn't use multi-repo mode, or the repositories/ directory hasn't been set up yet"})]}):n.jsx(n.Fragment,{children:x.map(v=>{const m=d.filter(p=>p.org===v);return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsx(Dp,{}),n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:v}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:[m.length," ",m.length===1?"repo":"repos"]})]}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:m.map(p=>{const y=wp(p.remote);return n.jsxs("div",{className:`bg-gray-900/50 border rounded-xl p-4 ${p.isCurrent?"border-indigo-500/30":"border-gray-800"}`,children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Op,{}),n.jsx("span",{className:"text-sm font-medium text-gray-300",children:p.name})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[p.isCurrent&&n.jsx(de,{label:"Current Project",variant:"info"}),n.jsx(de,{label:p.hasSpecweave?"SpecWeave":"No SpecWeave",variant:p.hasSpecweave?"success":"default"})]})]}),n.jsxs("div",{className:"space-y-1.5 mt-3",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Organization"}),n.jsx("span",{className:"text-[10px] text-gray-400",children:p.org})]}),p.branch&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Branch"}),n.jsx(de,{label:p.branch,variant:"default"})]}),y&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Remote"}),n.jsx("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-indigo-400 hover:text-indigo-300 hover:underline truncate max-w-[180px]",title:y,children:y.replace("https://","")})]}),!y&&p.remote&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Remote"}),n.jsx("span",{className:"text-[10px] text-gray-600 font-mono truncate max-w-[180px]",title:p.remote,children:p.remote})]}),p.path&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Path"}),n.jsx("span",{className:"text-[10px] text-gray-600 font-mono truncate max-w-[180px]",title:p.path,children:p.path.split("/").slice(-3).join("/")})]}),p.lastModified&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Last Modified"}),n.jsx("span",{className:"text-[10px] text-gray-400",children:Lp(p.lastModified)})]})]}),y&&n.jsxs("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:"mt-3 flex items-center justify-center gap-1.5 text-xs text-gray-400 hover:text-gray-200 py-2 border border-gray-800 rounded-lg hover:border-gray-700 transition-colors",children:[n.jsx(Up,{}),"Open on GitHub"]})]},p.path||`${p.org}/${p.name}`)})})]},v)})})]})}function Dp(){return n.jsx("div",{className:"w-6 h-6 rounded bg-gray-700 flex items-center justify-center",children:n.jsx("svg",{className:"w-3.5 h-3.5 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"})})})}function Op(){return n.jsx("svg",{className:"w-4 h-4 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})})}function Up(){return n.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}function Lp(r){if(!r)return"-";try{const f=Date.now()-new Date(r).getTime(),u=Math.floor(f/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}catch{return"-"}}function Hp(){const{id:r}=wg(),[f,u]=N.useState(0);St("increment-update",()=>u(m=>m+1));const{data:c,loading:d,error:x,refetch:g}=Le(`/api/increments/${r||"_none"}?_r=${f}`);if(!r)return n.jsx("div",{className:"p-6 text-gray-500 text-sm",children:"No increment ID specified"});if(d)return n.jsx(Et,{});if(x)return n.jsx(fa,{message:x,onRetry:g});if(!c)return n.jsx("div",{className:"p-6 text-gray-500 text-sm",children:"Increment not found"});const j=c.taskSummary.total>0?Math.round(c.taskSummary.completed/c.taskSummary.total*100):0,v=c.acSummary.total>0?Math.round(c.acSummary.completed/c.acSummary.total*100):0;return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[n.jsx("span",{className:"text-xs text-indigo-400 font-mono",children:c.dirName}),n.jsx(de,{label:c.metadata.status||"unknown",variant:Ei(c.metadata.status||"")}),c.metadata.type&&n.jsx("span",{className:"text-xs text-gray-400 capitalize",children:c.metadata.type}),c.metadata.priority&&n.jsx(Bp,{priority:c.metadata.priority})]}),n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:c.metadata.title||c.id}),c.metadata.project&&n.jsxs("span",{className:"text-xs text-gray-500",children:["Project: ",c.metadata.project]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:"Tasks",value:`${c.taskSummary.completed}/${c.taskSummary.total}`,color:"indigo"}),n.jsx(ce,{title:"Task Progress",value:`${j}%`,color:"cyan"}),n.jsx(ce,{title:"ACs",value:`${c.acSummary.completed}/${c.acSummary.total}`,color:"emerald"}),n.jsx(ce,{title:"AC Progress",value:`${v}%`,color:"amber"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5 space-y-4",children:[n.jsx(Y0,{label:"Tasks",completed:c.taskSummary.completed,total:c.taskSummary.total,color:"indigo"}),n.jsx(Y0,{label:"Acceptance Criteria",completed:c.acSummary.completed,total:c.acSummary.total,color:"emerald"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsxs("h3",{className:"text-sm font-medium text-gray-300",children:["Tasks (",c.tasks.length,")"]})}),c.tasks.length===0?n.jsx("div",{className:"p-5 text-center text-gray-500 text-xs",children:"No tasks found in tasks.md"}):n.jsx("div",{className:"divide-y divide-gray-800/50",children:c.tasks.map(m=>n.jsxs("div",{className:"px-5 py-3 flex items-center gap-3",children:[n.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center flex-shrink-0 ${m.status==="completed"?"bg-indigo-500/20 border-indigo-500 text-indigo-400":"border-gray-600"}`,children:m.status==="completed"&&n.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:m.id}),n.jsx("span",{className:`text-sm ${m.status==="completed"?"text-gray-500 line-through":"text-gray-300"}`,children:m.title})]}),(m.userStory||m.acs)&&n.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[m.userStory&&n.jsx("span",{className:"text-[10px] text-indigo-400",children:m.userStory}),m.acs?.map(p=>n.jsx("span",{className:"text-[10px] text-emerald-500",children:p},p))]})]})]},m.id))})]}),c.acs.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsxs("h3",{className:"text-sm font-medium text-gray-300",children:["Acceptance Criteria (",c.acs.length,")"]})}),n.jsx("div",{className:"divide-y divide-gray-800/50",children:c.acs.map(m=>n.jsxs("div",{className:"px-5 py-3 flex items-start gap-3",children:[n.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center flex-shrink-0 mt-0.5 ${m.completed?"bg-emerald-500/20 border-emerald-500 text-emerald-400":"border-gray-600"}`,children:m.completed&&n.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),n.jsxs("div",{children:[n.jsx("span",{className:"text-xs text-emerald-500 font-mono",children:m.id}),n.jsx("span",{className:`text-sm ml-2 ${m.completed?"text-gray-500 line-through":"text-gray-300"}`,children:m.text})]})]},m.id))})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-3",children:"Metadata"}),n.jsx("div",{className:"space-y-1.5",children:Object.entries(c.metadata).filter(([m])=>!["title"].includes(m)).map(([m,p])=>n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:m}),n.jsx("span",{className:"text-xs text-gray-400",children:typeof p=="object"?JSON.stringify(p):String(p??"")})]},m))})]})]})}function Y0({label:r,completed:f,total:u,color:c}){const d=u>0?Math.round(f/u*100):0,x=c==="emerald"?"bg-emerald-500":"bg-indigo-500";return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[n.jsx("span",{className:"text-xs text-gray-400",children:r}),n.jsxs("span",{className:"text-xs text-gray-500",children:[f,"/",u," (",d,"%)"]})]}),n.jsx("div",{className:"w-full h-2 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:`h-full ${x} rounded-full transition-all`,style:{width:`${d}%`}})})]})}function Bp({priority:r}){const f={P0:"text-rose-400 bg-rose-500/10",P1:"text-amber-400 bg-amber-500/10",P2:"text-cyan-400 bg-cyan-500/10",P3:"text-gray-400 bg-gray-500/10"};return n.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${f[r]||f.P2}`,children:r})}function qp(){const r=Cy();return n.jsx(rm.Provider,{value:r,children:n.jsx(My,{children:n.jsxs("div",{className:"flex min-h-screen bg-gray-950 text-gray-100",children:[n.jsx(_y,{}),n.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[n.jsx(Dy,{}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsxs(Zg,{children:[n.jsx(lt,{path:"/",element:n.jsx(Vy,{})}),n.jsx(lt,{path:"/increments",element:n.jsx(ky,{})}),n.jsx(lt,{path:"/increments/:id",element:n.jsx(Hp,{})}),n.jsx(lt,{path:"/analytics",element:n.jsx(Wy,{})}),n.jsx(lt,{path:"/costs",element:n.jsx(ap,{})}),n.jsx(lt,{path:"/sync",element:n.jsx(up,{})}),n.jsx(lt,{path:"/errors",element:n.jsx(fp,{})}),n.jsx(lt,{path:"/activity",element:n.jsx(vp,{})}),n.jsx(lt,{path:"/config",element:n.jsx(Np,{})}),n.jsx(lt,{path:"/plugins",element:n.jsx(Tp,{})}),n.jsx(lt,{path:"/services",element:n.jsx(Ap,{})}),n.jsx(lt,{path:"/notifications",element:n.jsx(Rp,{})}),n.jsx(lt,{path:"/repos",element:n.jsx(_p,{})}),n.jsx(lt,{path:"*",element:n.jsxs("div",{className:"p-6 text-center",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200 mb-2",children:"Page Not Found"}),n.jsx("p",{className:"text-sm text-gray-500",children:"The page you're looking for doesn't exist."})]})})]})})]})]})})})}Kh.createRoot(document.getElementById("root")).render(n.jsx(N.StrictMode,{children:n.jsx(yy,{children:n.jsx(qp,{})})}));
|