@jonit-dev/night-watch-cli 1.7.36 → 1.7.38
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/dist/cli.js +4004 -2205
- package/dist/commands/board.d.ts.map +1 -1
- package/dist/commands/board.js +10 -0
- package/dist/commands/board.js.map +1 -1
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +5 -5
- package/dist/commands/install.js.map +1 -1
- package/dist/scripts/night-watch-cron.sh +4 -1
- package/dist/scripts/night-watch-helpers.sh +6 -3
- package/dist/scripts/night-watch-pr-reviewer-cron.sh +2 -1
- package/dist/templates/night-watch-audit.md +87 -0
- package/dist/templates/night-watch-pr-reviewer.md +174 -0
- package/dist/templates/night-watch-qa.md +157 -0
- package/dist/templates/night-watch-slicer.md +219 -0
- package/dist/templates/night-watch.config.json +30 -0
- package/dist/templates/night-watch.md +94 -0
- package/dist/templates/prd-executor.md +235 -0
- package/dist/templates/prd.md +26 -0
- package/dist/web/assets/index-FwIKfHPL.css +1 -0
- package/dist/web/assets/index-tuNH9gmb.js +448 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/index-BiJf9LFT.js +0 -458
- package/dist/web/assets/index-OpSgvsYu.css +0 -1
|
@@ -1,458 +0,0 @@
|
|
|
1
|
-
(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const x of document.querySelectorAll('link[rel="modulepreload"]'))r(x);new MutationObserver(x=>{for(const f of x)if(f.type==="childList")for(const m of f.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&r(m)}).observe(document,{childList:!0,subtree:!0});function d(x){const f={};return x.integrity&&(f.integrity=x.integrity),x.referrerPolicy&&(f.referrerPolicy=x.referrerPolicy),x.crossOrigin==="use-credentials"?f.credentials="include":x.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(x){if(x.ep)return;x.ep=!0;const f=d(x);fetch(x.href,f)}})();function p0(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var lu={exports:{}},es={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Lm;function Np(){if(Lm)return es;Lm=1;var c=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function d(r,x,f){var m=null;if(f!==void 0&&(m=""+f),x.key!==void 0&&(m=""+x.key),"key"in x){f={};for(var v in x)v!=="key"&&(f[v]=x[v])}else f=x;return x=f.ref,{$$typeof:c,type:r,key:m,ref:x!==void 0?x:null,props:f}}return es.Fragment=o,es.jsx=d,es.jsxs=d,es}var qm;function Sp(){return qm||(qm=1,lu.exports=Np()),lu.exports}var n=Sp(),au={exports:{}},de={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Ym;function wp(){if(Ym)return de;Ym=1;var c=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),m=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),z=Symbol.iterator;function O(w){return w===null||typeof w!="object"?null:(w=z&&w[z]||w["@@iterator"],typeof w=="function"?w:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,A={};function G(w,X,W){this.props=w,this.context=X,this.refs=A,this.updater=W||U}G.prototype.isReactComponent={},G.prototype.setState=function(w,X){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,X,"setState")},G.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function B(){}B.prototype=G.prototype;function H(w,X,W){this.props=w,this.context=X,this.refs=A,this.updater=W||U}var K=H.prototype=new B;K.constructor=H,T(K,G.prototype),K.isPureReactComponent=!0;var L=Array.isArray;function C(){}var Y={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function I(w,X,W){var ee=W.ref;return{$$typeof:c,type:w,key:X,ref:ee!==void 0?ee:null,props:W}}function Z(w,X){return I(w.type,X,w.props)}function fe(w){return typeof w=="object"&&w!==null&&w.$$typeof===c}function J(w){var X={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(W){return X[W]})}var ue=/\/+/g;function Ue(w,X){return typeof w=="object"&&w!==null&&w.key!=null?J(""+w.key):X.toString(36)}function ae(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(C,C):(w.status="pending",w.then(function(X){w.status==="pending"&&(w.status="fulfilled",w.value=X)},function(X){w.status==="pending"&&(w.status="rejected",w.reason=X)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function k(w,X,W,ee,re){var he=typeof w;(he==="undefined"||he==="boolean")&&(w=null);var xe=!1;if(w===null)xe=!0;else switch(he){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(w.$$typeof){case c:case o:xe=!0;break;case j:return xe=w._init,k(xe(w._payload),X,W,ee,re)}}if(xe)return re=re(w),xe=ee===""?"."+Ue(w,0):ee,L(re)?(W="",xe!=null&&(W=xe.replace(ue,"$&/")+"/"),k(re,X,W,"",function(cn){return cn})):re!=null&&(fe(re)&&(re=Z(re,W+(re.key==null||w&&w.key===re.key?"":(""+re.key).replace(ue,"$&/")+"/")+xe)),X.push(re)),1;xe=0;var Le=ee===""?".":ee+":";if(L(w))for(var qe=0;qe<w.length;qe++)ee=w[qe],he=Le+Ue(ee,qe),xe+=k(ee,X,W,he,re);else if(qe=O(w),typeof qe=="function")for(w=qe.call(w),qe=0;!(ee=w.next()).done;)ee=ee.value,he=Le+Ue(ee,qe++),xe+=k(ee,X,W,he,re);else if(he==="object"){if(typeof w.then=="function")return k(ae(w),X,W,ee,re);throw X=String(w),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return xe}function F(w,X,W){if(w==null)return w;var ee=[],re=0;return k(w,ee,"","",function(he){return X.call(W,he,re++)}),ee}function ne(w){if(w._status===-1){var X=w._result;X=X(),X.then(function(W){(w._status===0||w._status===-1)&&(w._status=1,w._result=W)},function(W){(w._status===0||w._status===-1)&&(w._status=2,w._result=W)}),w._status===-1&&(w._status=0,w._result=X)}if(w._status===1)return w._result.default;throw w._result}var $=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},me={map:F,forEach:function(w,X,W){F(w,function(){X.apply(this,arguments)},W)},count:function(w){var X=0;return F(w,function(){X++}),X},toArray:function(w){return F(w,function(X){return X})||[]},only:function(w){if(!fe(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return de.Activity=N,de.Children=me,de.Component=G,de.Fragment=d,de.Profiler=x,de.PureComponent=H,de.StrictMode=r,de.Suspense=g,de.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,de.__COMPILER_RUNTIME={__proto__:null,c:function(w){return Y.H.useMemoCache(w)}},de.cache=function(w){return function(){return w.apply(null,arguments)}},de.cacheSignal=function(){return null},de.cloneElement=function(w,X,W){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var ee=T({},w.props),re=w.key;if(X!=null)for(he in X.key!==void 0&&(re=""+X.key),X)!P.call(X,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&X.ref===void 0||(ee[he]=X[he]);var he=arguments.length-2;if(he===1)ee.children=W;else if(1<he){for(var xe=Array(he),Le=0;Le<he;Le++)xe[Le]=arguments[Le+2];ee.children=xe}return I(w.type,re,ee)},de.createContext=function(w){return w={$$typeof:m,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:f,_context:w},w},de.createElement=function(w,X,W){var ee,re={},he=null;if(X!=null)for(ee in X.key!==void 0&&(he=""+X.key),X)P.call(X,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(re[ee]=X[ee]);var xe=arguments.length-2;if(xe===1)re.children=W;else if(1<xe){for(var Le=Array(xe),qe=0;qe<xe;qe++)Le[qe]=arguments[qe+2];re.children=Le}if(w&&w.defaultProps)for(ee in xe=w.defaultProps,xe)re[ee]===void 0&&(re[ee]=xe[ee]);return I(w,he,re)},de.createRef=function(){return{current:null}},de.forwardRef=function(w){return{$$typeof:v,render:w}},de.isValidElement=fe,de.lazy=function(w){return{$$typeof:j,_payload:{_status:-1,_result:w},_init:ne}},de.memo=function(w,X){return{$$typeof:p,type:w,compare:X===void 0?null:X}},de.startTransition=function(w){var X=Y.T,W={};Y.T=W;try{var ee=w(),re=Y.S;re!==null&&re(W,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(C,$)}catch(he){$(he)}finally{X!==null&&W.types!==null&&(X.types=W.types),Y.T=X}},de.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},de.use=function(w){return Y.H.use(w)},de.useActionState=function(w,X,W){return Y.H.useActionState(w,X,W)},de.useCallback=function(w,X){return Y.H.useCallback(w,X)},de.useContext=function(w){return Y.H.useContext(w)},de.useDebugValue=function(){},de.useDeferredValue=function(w,X){return Y.H.useDeferredValue(w,X)},de.useEffect=function(w,X){return Y.H.useEffect(w,X)},de.useEffectEvent=function(w){return Y.H.useEffectEvent(w)},de.useId=function(){return Y.H.useId()},de.useImperativeHandle=function(w,X,W){return Y.H.useImperativeHandle(w,X,W)},de.useInsertionEffect=function(w,X){return Y.H.useInsertionEffect(w,X)},de.useLayoutEffect=function(w,X){return Y.H.useLayoutEffect(w,X)},de.useMemo=function(w,X){return Y.H.useMemo(w,X)},de.useOptimistic=function(w,X){return Y.H.useOptimistic(w,X)},de.useReducer=function(w,X,W){return Y.H.useReducer(w,X,W)},de.useRef=function(w){return Y.H.useRef(w)},de.useState=function(w){return Y.H.useState(w)},de.useSyncExternalStore=function(w,X,W){return Y.H.useSyncExternalStore(w,X,W)},de.useTransition=function(){return Y.H.useTransition()},de.version="19.2.4",de}var Gm;function yu(){return Gm||(Gm=1,au.exports=wp()),au.exports}var y=yu();const Ve=p0(y);var nu={exports:{}},ts={},su={exports:{}},iu={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Qm;function Cp(){return Qm||(Qm=1,(function(c){function o(k,F){var ne=k.length;k.push(F);e:for(;0<ne;){var $=ne-1>>>1,me=k[$];if(0<x(me,F))k[$]=F,k[ne]=me,ne=$;else break e}}function d(k){return k.length===0?null:k[0]}function r(k){if(k.length===0)return null;var F=k[0],ne=k.pop();if(ne!==F){k[0]=ne;e:for(var $=0,me=k.length,w=me>>>1;$<w;){var X=2*($+1)-1,W=k[X],ee=X+1,re=k[ee];if(0>x(W,ne))ee<me&&0>x(re,W)?(k[$]=re,k[ee]=ne,$=ee):(k[$]=W,k[X]=ne,$=X);else if(ee<me&&0>x(re,ne))k[$]=re,k[ee]=ne,$=ee;else break e}}return F}function x(k,F){var ne=k.sortIndex-F.sortIndex;return ne!==0?ne:k.id-F.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;c.unstable_now=function(){return f.now()}}else{var m=Date,v=m.now();c.unstable_now=function(){return m.now()-v}}var g=[],p=[],j=1,N=null,z=3,O=!1,U=!1,T=!1,A=!1,G=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function K(k){for(var F=d(p);F!==null;){if(F.callback===null)r(p);else if(F.startTime<=k)r(p),F.sortIndex=F.expirationTime,o(g,F);else break;F=d(p)}}function L(k){if(T=!1,K(k),!U)if(d(g)!==null)U=!0,C||(C=!0,J());else{var F=d(p);F!==null&&ae(L,F.startTime-k)}}var C=!1,Y=-1,P=5,I=-1;function Z(){return A?!0:!(c.unstable_now()-I<P)}function fe(){if(A=!1,C){var k=c.unstable_now();I=k;var F=!0;try{e:{U=!1,T&&(T=!1,B(Y),Y=-1),O=!0;var ne=z;try{t:{for(K(k),N=d(g);N!==null&&!(N.expirationTime>k&&Z());){var $=N.callback;if(typeof $=="function"){N.callback=null,z=N.priorityLevel;var me=$(N.expirationTime<=k);if(k=c.unstable_now(),typeof me=="function"){N.callback=me,K(k),F=!0;break t}N===d(g)&&r(g),K(k)}else r(g);N=d(g)}if(N!==null)F=!0;else{var w=d(p);w!==null&&ae(L,w.startTime-k),F=!1}}break e}finally{N=null,z=ne,O=!1}F=void 0}}finally{F?J():C=!1}}}var J;if(typeof H=="function")J=function(){H(fe)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,Ue=ue.port2;ue.port1.onmessage=fe,J=function(){Ue.postMessage(null)}}else J=function(){G(fe,0)};function ae(k,F){Y=G(function(){k(c.unstable_now())},F)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(k){k.callback=null},c.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<k?Math.floor(1e3/k):5},c.unstable_getCurrentPriorityLevel=function(){return z},c.unstable_next=function(k){switch(z){case 1:case 2:case 3:var F=3;break;default:F=z}var ne=z;z=F;try{return k()}finally{z=ne}},c.unstable_requestPaint=function(){A=!0},c.unstable_runWithPriority=function(k,F){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var ne=z;z=k;try{return F()}finally{z=ne}},c.unstable_scheduleCallback=function(k,F,ne){var $=c.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?$+ne:$):ne=$,k){case 1:var me=-1;break;case 2:me=250;break;case 5:me=1073741823;break;case 4:me=1e4;break;default:me=5e3}return me=ne+me,k={id:j++,callback:F,priorityLevel:k,startTime:ne,expirationTime:me,sortIndex:-1},ne>$?(k.sortIndex=ne,o(p,k),d(g)===null&&k===d(p)&&(T?(B(Y),Y=-1):T=!0,ae(L,ne-$))):(k.sortIndex=me,o(g,k),U||O||(U=!0,C||(C=!0,J()))),k},c.unstable_shouldYield=Z,c.unstable_wrapCallback=function(k){var F=z;return function(){var ne=z;z=F;try{return k.apply(this,arguments)}finally{z=ne}}}})(iu)),iu}var Xm;function Ep(){return Xm||(Xm=1,su.exports=Cp()),su.exports}var cu={exports:{}},it={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Vm;function Tp(){if(Vm)return it;Vm=1;var c=yu();function o(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var j=2;j<arguments.length;j++)p+="&args[]="+encodeURIComponent(arguments[j])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var r={d:{f:d,r:function(){throw Error(o(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},x=Symbol.for("react.portal");function f(g,p,j){var N=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:x,key:N==null?null:""+N,children:g,containerInfo:p,implementation:j}}var m=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return it.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,it.createPortal=function(g,p){var j=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(o(299));return f(g,p,null,j)},it.flushSync=function(g){var p=m.T,j=r.p;try{if(m.T=null,r.p=2,g)return g()}finally{m.T=p,r.p=j,r.d.f()}},it.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(g,p))},it.prefetchDNS=function(g){typeof g=="string"&&r.d.D(g)},it.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var j=p.as,N=v(j,p.crossOrigin),z=typeof p.integrity=="string"?p.integrity:void 0,O=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;j==="style"?r.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:N,integrity:z,fetchPriority:O}):j==="script"&&r.d.X(g,{crossOrigin:N,integrity:z,fetchPriority:O,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},it.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var j=v(p.as,p.crossOrigin);r.d.M(g,{crossOrigin:j,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(g)},it.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var j=p.as,N=v(j,p.crossOrigin);r.d.L(g,j,{crossOrigin:N,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},it.preloadModule=function(g,p){if(typeof g=="string")if(p){var j=v(p.as,p.crossOrigin);r.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:j,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(g)},it.requestFormReset=function(g){r.d.r(g)},it.unstable_batchedUpdates=function(g,p){return g(p)},it.useFormState=function(g,p,j){return m.H.useFormState(g,p,j)},it.useFormStatus=function(){return m.H.useHostTransitionStatus()},it.version="19.2.4",it}var Zm;function Ap(){if(Zm)return cu.exports;Zm=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(o){console.error(o)}}return c(),cu.exports=Tp(),cu.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var $m;function Rp(){if($m)return ts;$m=1;var c=Ep(),o=yu(),d=Ap();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function x(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(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 g(e){if(f(e)!==e)throw Error(r(188))}function p(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,a=t;;){var s=l.return;if(s===null)break;var i=s.alternate;if(i===null){if(a=s.return,a!==null){l=a;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===l)return g(s),e;if(i===a)return g(s),t;i=i.sibling}throw Error(r(188))}if(l.return!==a.return)l=s,a=i;else{for(var u=!1,h=s.child;h;){if(h===l){u=!0,l=s,a=i;break}if(h===a){u=!0,a=s,l=i;break}h=h.sibling}if(!u){for(h=i.child;h;){if(h===l){u=!0,l=i,a=s;break}if(h===a){u=!0,a=i,l=s;break}h=h.sibling}if(!u)throw Error(r(189))}}if(l.alternate!==a)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}var N=Object.assign,z=Symbol.for("react.element"),O=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),H=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),fe=Symbol.iterator;function J(e){return e===null||typeof e!="object"?null:(e=fe&&e[fe]||e["@@iterator"],typeof e=="function"?e:null)}var ue=Symbol.for("react.client.reference");function Ue(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case G:return"Profiler";case A:return"StrictMode";case L:return"Suspense";case C:return"SuspenseList";case I:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case U:return"Portal";case H:return e.displayName||"Context";case B:return(e._context.displayName||"Context")+".Consumer";case K:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Y:return t=e.displayName||null,t!==null?t:Ue(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return Ue(e(t))}catch{}}return null}var ae=Array.isArray,k=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},$=[],me=-1;function w(e){return{current:e}}function X(e){0>me||(e.current=$[me],$[me]=null,me--)}function W(e,t){me++,$[me]=e.current,e.current=t}var ee=w(null),re=w(null),he=w(null),xe=w(null);function Le(e,t){switch(W(he,t),W(re,e),W(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?rm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=rm(t),e=um(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}X(ee),W(ee,e)}function qe(){X(ee),X(re),X(he)}function cn(e){e.memoizedState!==null&&W(xe,e);var t=ee.current,l=um(t,e.type);t!==l&&(W(re,e),W(ee,l))}function rs(e){re.current===e&&(X(ee),X(re)),xe.current===e&&(X(xe),Fn._currentValue=ne)}var Bi,Uu;function $l(e){if(Bi===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Bi=t&&t[1]||"",Uu=-1<l.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Bi+e+Uu}var Li=!1;function qi(e,t){if(!e||Li)return"";Li=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(D){var M=D}Reflect.construct(e,[],V)}else{try{V.call()}catch(D){M=D}e.call(V.prototype)}}else{try{throw Error()}catch(D){M=D}(V=e())&&typeof V.catch=="function"&&V.catch(function(){})}}catch(D){if(D&&M&&typeof D.stack=="string")return[D.stack,M.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),u=i[0],h=i[1];if(u&&h){var b=u.split(`
|
|
44
|
-
`),_=h.split(`
|
|
45
|
-
`);for(s=a=0;a<b.length&&!b[a].includes("DetermineComponentFrameRoot");)a++;for(;s<_.length&&!_[s].includes("DetermineComponentFrameRoot");)s++;if(a===b.length||s===_.length)for(a=b.length-1,s=_.length-1;1<=a&&0<=s&&b[a]!==_[s];)s--;for(;1<=a&&0<=s;a--,s--)if(b[a]!==_[s]){if(a!==1||s!==1)do if(a--,s--,0>s||b[a]!==_[s]){var q=`
|
|
46
|
-
`+b[a].replace(" at new "," at ");return e.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",e.displayName)),q}while(1<=a&&0<=s);break}}}finally{Li=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?$l(l):""}function I0(e,t){switch(e.tag){case 26:case 27:case 5:return $l(e.type);case 16:return $l("Lazy");case 13:return e.child!==t&&t!==null?$l("Suspense Fallback"):$l("Suspense");case 19:return $l("SuspenseList");case 0:case 15:return qi(e.type,!1);case 11:return qi(e.type.render,!1);case 1:return qi(e.type,!0);case 31:return $l("Activity");default:return""}}function Hu(e){try{var t="",l=null;do t+=I0(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
-
Error generating stack: `+a.message+`
|
|
48
|
-
`+a.stack}}var Yi=Object.prototype.hasOwnProperty,Gi=c.unstable_scheduleCallback,Qi=c.unstable_cancelCallback,eh=c.unstable_shouldYield,th=c.unstable_requestPaint,gt=c.unstable_now,lh=c.unstable_getCurrentPriorityLevel,Bu=c.unstable_ImmediatePriority,Lu=c.unstable_UserBlockingPriority,us=c.unstable_NormalPriority,ah=c.unstable_LowPriority,qu=c.unstable_IdlePriority,nh=c.log,sh=c.unstable_setDisableYieldValue,rn=null,vt=null;function vl(e){if(typeof nh=="function"&&sh(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(rn,e)}catch{}}var bt=Math.clz32?Math.clz32:rh,ih=Math.log,ch=Math.LN2;function rh(e){return e>>>=0,e===0?32:31-(ih(e)/ch|0)|0}var os=256,ds=262144,fs=4194304;function Kl(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 ms(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var s=0,i=e.suspendedLanes,u=e.pingedLanes;e=e.warmLanes;var h=a&134217727;return h!==0?(a=h&~i,a!==0?s=Kl(a):(u&=h,u!==0?s=Kl(u):l||(l=h&~e,l!==0&&(s=Kl(l))))):(h=a&~i,h!==0?s=Kl(h):u!==0?s=Kl(u):l||(l=a&~e,l!==0&&(s=Kl(l)))),s===0?0:t!==0&&t!==s&&(t&i)===0&&(i=s&-s,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:s}function un(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function uh(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 Yu(){var e=fs;return fs<<=1,(fs&62914560)===0&&(fs=4194304),e}function Xi(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function on(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function oh(e,t,l,a,s,i){var u=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var h=e.entanglements,b=e.expirationTimes,_=e.hiddenUpdates;for(l=u&~l;0<l;){var q=31-bt(l),V=1<<q;h[q]=0,b[q]=-1;var M=_[q];if(M!==null)for(_[q]=null,q=0;q<M.length;q++){var D=M[q];D!==null&&(D.lane&=-536870913)}l&=~V}a!==0&&Gu(e,a,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(u&~t))}function Gu(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-bt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Qu(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-bt(l),s=1<<a;s&t|e[a]&t&&(e[a]|=t),l&=~s}}function Xu(e,t){var l=t&-t;return l=(l&42)!==0?1:Vi(l),(l&(e.suspendedLanes|t))!==0?0:l}function Vi(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 Zi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vu(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:zm(e.type))}function Zu(e,t){var l=F.p;try{return F.p=e,t()}finally{F.p=l}}var bl=Math.random().toString(36).slice(2),tt="__reactFiber$"+bl,ot="__reactProps$"+bl,ga="__reactContainer$"+bl,$i="__reactEvents$"+bl,dh="__reactListeners$"+bl,fh="__reactHandles$"+bl,$u="__reactResources$"+bl,dn="__reactMarker$"+bl;function Ki(e){delete e[tt],delete e[ot],delete e[$i],delete e[dh],delete e[fh]}function va(e){var t=e[tt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[ga]||l[tt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=pm(e);e!==null;){if(l=e[tt])return l;e=pm(e)}return t}e=l,l=e.parentNode}return null}function ba(e){if(e=e[tt]||e[ga]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function fn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function ya(e){var t=e[$u];return t||(t=e[$u]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ie(e){e[dn]=!0}var Ku=new Set,Ju={};function Jl(e,t){ja(e,t),ja(e+"Capture",t)}function ja(e,t){for(Ju[e]=t,e=0;e<t.length;e++)Ku.add(t[e])}var mh=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]*$"),Fu={},Wu={};function hh(e){return Yi.call(Wu,e)?!0:Yi.call(Fu,e)?!1:mh.test(e)?Wu[e]=!0:(Fu[e]=!0,!1)}function hs(e,t,l){if(hh(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function xs(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Ft(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function At(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xh(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var s=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(u){l=""+u,i.call(this,u)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(u){l=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ji(e){if(!e._valueTracker){var t=Pu(e)?"checked":"value";e._valueTracker=xh(e,t,""+e[t])}}function Iu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Pu(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function ps(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 ph=/[\n"\\]/g;function Rt(e){return e.replace(ph,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Fi(e,t,l,a,s,i,u,h){e.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.type=u:e.removeAttribute("type"),t!=null?u==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+At(t)):e.value!==""+At(t)&&(e.value=""+At(t)):u!=="submit"&&u!=="reset"||e.removeAttribute("value"),t!=null?Wi(e,u,At(t)):l!=null?Wi(e,u,At(l)):a!=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=""+At(h):e.removeAttribute("name")}function eo(e,t,l,a,s,i,u,h){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Ji(e);return}l=l!=null?""+At(l):"",t=t!=null?""+At(t):l,h||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=h?e.checked:!!a,e.defaultChecked=!!a,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.name=u),Ji(e)}function Wi(e,t,l){t==="number"&&ps(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Na(e,t,l,a){if(e=e.options,t){t={};for(var s=0;s<l.length;s++)t["$"+l[s]]=!0;for(l=0;l<e.length;l++)s=t.hasOwnProperty("$"+e[l].value),e[l].selected!==s&&(e[l].selected=s),s&&a&&(e[l].defaultSelected=!0)}else{for(l=""+At(l),t=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function to(e,t,l){if(t!=null&&(t=""+At(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+At(l):""}function lo(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(ae(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=At(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Ji(e)}function Sa(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var gh=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 ao(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||gh.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function no(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&l[s]!==a&&ao(e,s,a)}else for(var i in t)t.hasOwnProperty(i)&&ao(e,i,t[i])}function Pi(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 vh=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"]]),bh=/^[\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 gs(e){return bh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Wt(){}var Ii=null;function ec(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wa=null,Ca=null;function so(e){var t=ba(e);if(t&&(e=t.stateNode)){var l=e[ot]||null;e:switch(e=t.stateNode,t.type){case"input":if(Fi(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Rt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var s=a[ot]||null;if(!s)throw Error(r(90));Fi(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Iu(a)}break e;case"textarea":to(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Na(e,!!l.multiple,t,!1)}}}var tc=!1;function io(e,t,l){if(tc)return e(t,l);tc=!0;try{var a=e(t);return a}finally{if(tc=!1,(wa!==null||Ca!==null)&&(ni(),wa&&(t=wa,e=Ca,Ca=wa=null,so(t),e)))for(t=0;t<e.length;t++)so(e[t])}}function mn(e,t){var l=e.stateNode;if(l===null)return null;var a=l[ot]||null;if(a===null)return null;l=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var Pt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lc=!1;if(Pt)try{var hn={};Object.defineProperty(hn,"passive",{get:function(){lc=!0}}),window.addEventListener("test",hn,hn),window.removeEventListener("test",hn,hn)}catch{lc=!1}var yl=null,ac=null,vs=null;function co(){if(vs)return vs;var e,t=ac,l=t.length,a,s="value"in yl?yl.value:yl.textContent,i=s.length;for(e=0;e<l&&t[e]===s[e];e++);var u=l-e;for(a=1;a<=u&&t[l-a]===s[i-a];a++);return vs=s.slice(e,1<a?1-a:void 0)}function bs(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 ys(){return!0}function ro(){return!1}function dt(e){function t(l,a,s,i,u){this._reactName=l,this._targetInst=s,this.type=a,this.nativeEvent=i,this.target=u,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(l=e[h],this[h]=l?l(i):i[h]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ys:ro,this.isPropagationStopped=ro,this}return N(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ys)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ys)},persist:function(){},isPersistent:ys}),t}var Fl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},js=dt(Fl),xn=N({},Fl,{view:0,detail:0}),yh=dt(xn),nc,sc,pn,Ns=N({},xn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cc,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!==pn&&(pn&&e.type==="mousemove"?(nc=e.screenX-pn.screenX,sc=e.screenY-pn.screenY):sc=nc=0,pn=e),nc)},movementY:function(e){return"movementY"in e?e.movementY:sc}}),uo=dt(Ns),jh=N({},Ns,{dataTransfer:0}),Nh=dt(jh),Sh=N({},xn,{relatedTarget:0}),ic=dt(Sh),wh=N({},Fl,{animationName:0,elapsedTime:0,pseudoElement:0}),Ch=dt(wh),Eh=N({},Fl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Th=dt(Eh),Ah=N({},Fl,{data:0}),oo=dt(Ah),Rh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_h={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"},Mh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Mh[e])?!!t[e]:!1}function cc(){return zh}var Dh=N({},xn,{key:function(e){if(e.key){var t=Rh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?_h[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cc,charCode:function(e){return e.type==="keypress"?bs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Oh=dt(Dh),kh=N({},Ns,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fo=dt(kh),Uh=N({},xn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cc}),Hh=dt(Uh),Bh=N({},Fl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Lh=dt(Bh),qh=N({},Ns,{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}),Yh=dt(qh),Gh=N({},Fl,{newState:0,oldState:0}),Qh=dt(Gh),Xh=[9,13,27,32],rc=Pt&&"CompositionEvent"in window,gn=null;Pt&&"documentMode"in document&&(gn=document.documentMode);var Vh=Pt&&"TextEvent"in window&&!gn,mo=Pt&&(!rc||gn&&8<gn&&11>=gn),ho=" ",xo=!1;function po(e,t){switch(e){case"keyup":return Xh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function go(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ea=!1;function Zh(e,t){switch(e){case"compositionend":return go(t);case"keypress":return t.which!==32?null:(xo=!0,ho);case"textInput":return e=t.data,e===ho&&xo?null:e;default:return null}}function $h(e,t){if(Ea)return e==="compositionend"||!rc&&po(e,t)?(e=co(),vs=ac=yl=null,Ea=!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 mo&&t.locale!=="ko"?null:t.data;default:return null}}var Kh={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 vo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Kh[e.type]:t==="textarea"}function bo(e,t,l,a){wa?Ca?Ca.push(a):Ca=[a]:wa=a,t=di(t,"onChange"),0<t.length&&(l=new js("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var vn=null,bn=null;function Jh(e){lm(e,0)}function Ss(e){var t=fn(e);if(Iu(t))return e}function yo(e,t){if(e==="change")return t}var jo=!1;if(Pt){var uc;if(Pt){var oc="oninput"in document;if(!oc){var No=document.createElement("div");No.setAttribute("oninput","return;"),oc=typeof No.oninput=="function"}uc=oc}else uc=!1;jo=uc&&(!document.documentMode||9<document.documentMode)}function So(){vn&&(vn.detachEvent("onpropertychange",wo),bn=vn=null)}function wo(e){if(e.propertyName==="value"&&Ss(bn)){var t=[];bo(t,bn,e,ec(e)),io(Jh,t)}}function Fh(e,t,l){e==="focusin"?(So(),vn=t,bn=l,vn.attachEvent("onpropertychange",wo)):e==="focusout"&&So()}function Wh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ss(bn)}function Ph(e,t){if(e==="click")return Ss(t)}function Ih(e,t){if(e==="input"||e==="change")return Ss(t)}function ex(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:ex;function yn(e,t){if(yt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var s=l[a];if(!Yi.call(t,s)||!yt(e[s],t[s]))return!1}return!0}function Co(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Eo(e,t){var l=Co(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Co(l)}}function To(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?To(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ao(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ps(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=ps(e.document)}return t}function dc(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 tx=Pt&&"documentMode"in document&&11>=document.documentMode,Ta=null,fc=null,jn=null,mc=!1;function Ro(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;mc||Ta==null||Ta!==ps(a)||(a=Ta,"selectionStart"in a&&dc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),jn&&yn(jn,a)||(jn=a,a=di(fc,"onSelect"),0<a.length&&(t=new js("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Ta)))}function Wl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Aa={animationend:Wl("Animation","AnimationEnd"),animationiteration:Wl("Animation","AnimationIteration"),animationstart:Wl("Animation","AnimationStart"),transitionrun:Wl("Transition","TransitionRun"),transitionstart:Wl("Transition","TransitionStart"),transitioncancel:Wl("Transition","TransitionCancel"),transitionend:Wl("Transition","TransitionEnd")},hc={},_o={};Pt&&(_o=document.createElement("div").style,"AnimationEvent"in window||(delete Aa.animationend.animation,delete Aa.animationiteration.animation,delete Aa.animationstart.animation),"TransitionEvent"in window||delete Aa.transitionend.transition);function Pl(e){if(hc[e])return hc[e];if(!Aa[e])return e;var t=Aa[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in _o)return hc[e]=t[l];return e}var Mo=Pl("animationend"),zo=Pl("animationiteration"),Do=Pl("animationstart"),lx=Pl("transitionrun"),ax=Pl("transitionstart"),nx=Pl("transitioncancel"),Oo=Pl("transitionend"),ko=new Map,xc="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(" ");xc.push("scrollEnd");function Yt(e,t){ko.set(e,t),Jl(t,[e])}var ws=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)},_t=[],Ra=0,pc=0;function Cs(){for(var e=Ra,t=pc=Ra=0;t<e;){var l=_t[t];_t[t++]=null;var a=_t[t];_t[t++]=null;var s=_t[t];_t[t++]=null;var i=_t[t];if(_t[t++]=null,a!==null&&s!==null){var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}i!==0&&Uo(l,s,i)}}function Es(e,t,l,a){_t[Ra++]=e,_t[Ra++]=t,_t[Ra++]=l,_t[Ra++]=a,pc|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function gc(e,t,l,a){return Es(e,t,l,a),Ts(e)}function Il(e,t){return Es(e,null,null,t),Ts(e)}function Uo(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var s=!1,i=e.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),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-bt(l),e=i.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=l|536870912),i):null}function Ts(e){if(50<Qn)throw Qn=0,Er=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var _a={};function sx(e,t,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jt(e,t,l,a){return new sx(e,t,l,a)}function vc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function It(e,t){var l=e.alternate;return l===null?(l=jt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Ho(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function As(e,t,l,a,s,i){var u=0;if(a=e,typeof e=="function")vc(e)&&(u=1);else if(typeof e=="string")u=op(e,l,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case I:return e=jt(31,l,t,s),e.elementType=I,e.lanes=i,e;case T:return ea(l.children,s,i,t);case A:u=8,s|=24;break;case G:return e=jt(12,l,t,s|2),e.elementType=G,e.lanes=i,e;case L:return e=jt(13,l,t,s),e.elementType=L,e.lanes=i,e;case C:return e=jt(19,l,t,s),e.elementType=C,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case H:u=10;break e;case B:u=9;break e;case K:u=11;break e;case Y:u=14;break e;case P:u=16,a=null;break e}u=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=jt(u,l,t,s),t.elementType=e,t.type=a,t.lanes=i,t}function ea(e,t,l,a){return e=jt(7,e,a,t),e.lanes=l,e}function bc(e,t,l){return e=jt(6,e,null,t),e.lanes=l,e}function Bo(e){var t=jt(18,null,null,0);return t.stateNode=e,t}function yc(e,t,l){return t=jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Lo=new WeakMap;function Mt(e,t){if(typeof e=="object"&&e!==null){var l=Lo.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Hu(t)},Lo.set(e,t),t)}return{value:e,source:t,stack:Hu(t)}}var Ma=[],za=0,Rs=null,Nn=0,zt=[],Dt=0,jl=null,Vt=1,Zt="";function el(e,t){Ma[za++]=Nn,Ma[za++]=Rs,Rs=e,Nn=t}function qo(e,t,l){zt[Dt++]=Vt,zt[Dt++]=Zt,zt[Dt++]=jl,jl=e;var a=Vt;e=Zt;var s=32-bt(a)-1;a&=~(1<<s),l+=1;var i=32-bt(t)+s;if(30<i){var u=s-s%5;i=(a&(1<<u)-1).toString(32),a>>=u,s-=u,Vt=1<<32-bt(t)+s|l<<s|a,Zt=i+e}else Vt=1<<i|l<<s|a,Zt=e}function jc(e){e.return!==null&&(el(e,1),qo(e,1,0))}function Nc(e){for(;e===Rs;)Rs=Ma[--za],Ma[za]=null,Nn=Ma[--za],Ma[za]=null;for(;e===jl;)jl=zt[--Dt],zt[Dt]=null,Zt=zt[--Dt],zt[Dt]=null,Vt=zt[--Dt],zt[Dt]=null}function Yo(e,t){zt[Dt++]=Vt,zt[Dt++]=Zt,zt[Dt++]=jl,Vt=t.id,Zt=t.overflow,jl=e}var lt=null,He=null,Se=!1,Nl=null,Ot=!1,Sc=Error(r(519));function Sl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Sn(Mt(t,e)),Sc}function Go(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[tt]=e,t[ot]=a,l){case"dialog":be("cancel",t),be("close",t);break;case"iframe":case"object":case"embed":be("load",t);break;case"video":case"audio":for(l=0;l<Vn.length;l++)be(Vn[l],t);break;case"source":be("error",t);break;case"img":case"image":case"link":be("error",t),be("load",t);break;case"details":be("toggle",t);break;case"input":be("invalid",t),eo(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":be("invalid",t);break;case"textarea":be("invalid",t),lo(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||im(t.textContent,l)?(a.popover!=null&&(be("beforetoggle",t),be("toggle",t)),a.onScroll!=null&&be("scroll",t),a.onScrollEnd!=null&&be("scrollend",t),a.onClick!=null&&(t.onclick=Wt),t=!0):t=!1,t||Sl(e,!0)}function Qo(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Ot=!1;return;case 27:case 3:Ot=!0;return;default:lt=lt.return}}function Da(e){if(e!==lt)return!1;if(!Se)return Qo(e),Se=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Yr(e.type,e.memoizedProps)),l=!l),l&&He&&Sl(e),Qo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));He=xm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));He=xm(e)}else t===27?(t=He,Hl(e.type)?(e=Zr,Zr=null,He=e):He=t):He=lt?Ut(e.stateNode.nextSibling):null;return!0}function ta(){He=lt=null,Se=!1}function wc(){var e=Nl;return e!==null&&(xt===null?xt=e:xt.push.apply(xt,e),Nl=null),e}function Sn(e){Nl===null?Nl=[e]:Nl.push(e)}var Cc=w(null),la=null,tl=null;function wl(e,t,l){W(Cc,t._currentValue),t._currentValue=l}function ll(e){e._currentValue=Cc.current,X(Cc)}function Ec(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Tc(e,t,l,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var i=s.dependencies;if(i!==null){var u=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|=l,h=i.alternate,h!==null&&(h.lanes|=l),Ec(i.return,l,e),a||(u=null);break e}i=h.next}}else if(s.tag===18){if(u=s.return,u===null)throw Error(r(341));u.lanes|=l,i=u.alternate,i!==null&&(i.lanes|=l),Ec(u,l,e),u=null}else u=s.child;if(u!==null)u.return=s;else for(u=s;u!==null;){if(u===e){u=null;break}if(s=u.sibling,s!==null){s.return=u.return,u=s;break}u=u.return}s=u}}function Oa(e,t,l,a){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 u=s.alternate;if(u===null)throw Error(r(387));if(u=u.memoizedProps,u!==null){var h=s.type;yt(s.pendingProps.value,u.value)||(e!==null?e.push(h):e=[h])}}else if(s===xe.current){if(u=s.alternate,u===null)throw Error(r(387));u.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Fn):e=[Fn])}s=s.return}e!==null&&Tc(t,e,l,a),t.flags|=262144}function _s(e){for(e=e.firstContext;e!==null;){if(!yt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function aa(e){la=e,tl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function at(e){return Xo(la,e)}function Ms(e,t){return la===null&&aa(e),Xo(e,t)}function Xo(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},tl===null){if(e===null)throw Error(r(308));tl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else tl=tl.next=t;return l}var ix=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},cx=c.unstable_scheduleCallback,rx=c.unstable_NormalPriority,Ke={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ac(){return{controller:new ix,data:new Map,refCount:0}}function wn(e){e.refCount--,e.refCount===0&&cx(rx,function(){e.controller.abort()})}var Cn=null,Rc=0,ka=0,Ua=null;function ux(e,t){if(Cn===null){var l=Cn=[];Rc=0,ka=zr(),Ua={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Rc++,t.then(Vo,Vo),t}function Vo(){if(--Rc===0&&Cn!==null){Ua!==null&&(Ua.status="fulfilled");var e=Cn;Cn=null,ka=0,Ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ox(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var s=0;s<l.length;s++)(0,l[s])(t)},function(s){for(a.status="rejected",a.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),a}var Zo=k.S;k.S=function(e,t){_f=gt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ux(e,t),Zo!==null&&Zo(e,t)};var na=w(null);function _c(){var e=na.current;return e!==null?e:ke.pooledCache}function zs(e,t){t===null?W(na,na.current):W(na,t.pool)}function $o(){var e=_c();return e===null?null:{parent:Ke._currentValue,pool:e}}var Ha=Error(r(460)),Mc=Error(r(474)),Ds=Error(r(542)),Os={then:function(){}};function Ko(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Jo(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Wt,Wt),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Wo(e),e;default:if(typeof t.status=="string")t.then(Wt,Wt);else{if(e=ke,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=a}},function(a){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Wo(e),e}throw ia=t,Ha}}function sa(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ia=l,Ha):l}}var ia=null;function Fo(){if(ia===null)throw Error(r(459));var e=ia;return ia=null,e}function Wo(e){if(e===Ha||e===Ds)throw Error(r(483))}var Ba=null,En=0;function ks(e){var t=En;return En+=1,Ba===null&&(Ba=[]),Jo(Ba,e,t)}function Tn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Us(e,t){throw t.$$typeof===z?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Po(e){function t(E,S){if(e){var R=E.deletions;R===null?(E.deletions=[S],E.flags|=16):R.push(S)}}function l(E,S){if(!e)return null;for(;S!==null;)t(E,S),S=S.sibling;return null}function a(E){for(var S=new Map;E!==null;)E.key!==null?S.set(E.key,E):S.set(E.index,E),E=E.sibling;return S}function s(E,S){return E=It(E,S),E.index=0,E.sibling=null,E}function i(E,S,R){return E.index=R,e?(R=E.alternate,R!==null?(R=R.index,R<S?(E.flags|=67108866,S):R):(E.flags|=67108866,S)):(E.flags|=1048576,S)}function u(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function h(E,S,R,Q){return S===null||S.tag!==6?(S=bc(R,E.mode,Q),S.return=E,S):(S=s(S,R),S.return=E,S)}function b(E,S,R,Q){var se=R.type;return se===T?q(E,S,R.props.children,Q,R.key):S!==null&&(S.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===P&&sa(se)===S.type)?(S=s(S,R.props),Tn(S,R),S.return=E,S):(S=As(R.type,R.key,R.props,null,E.mode,Q),Tn(S,R),S.return=E,S)}function _(E,S,R,Q){return S===null||S.tag!==4||S.stateNode.containerInfo!==R.containerInfo||S.stateNode.implementation!==R.implementation?(S=yc(R,E.mode,Q),S.return=E,S):(S=s(S,R.children||[]),S.return=E,S)}function q(E,S,R,Q,se){return S===null||S.tag!==7?(S=ea(R,E.mode,Q,se),S.return=E,S):(S=s(S,R),S.return=E,S)}function V(E,S,R){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=bc(""+S,E.mode,R),S.return=E,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case O:return R=As(S.type,S.key,S.props,null,E.mode,R),Tn(R,S),R.return=E,R;case U:return S=yc(S,E.mode,R),S.return=E,S;case P:return S=sa(S),V(E,S,R)}if(ae(S)||J(S))return S=ea(S,E.mode,R,null),S.return=E,S;if(typeof S.then=="function")return V(E,ks(S),R);if(S.$$typeof===H)return V(E,Ms(E,S),R);Us(E,S)}return null}function M(E,S,R,Q){var se=S!==null?S.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return se!==null?null:h(E,S,""+R,Q);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case O:return R.key===se?b(E,S,R,Q):null;case U:return R.key===se?_(E,S,R,Q):null;case P:return R=sa(R),M(E,S,R,Q)}if(ae(R)||J(R))return se!==null?null:q(E,S,R,Q,null);if(typeof R.then=="function")return M(E,S,ks(R),Q);if(R.$$typeof===H)return M(E,S,Ms(E,R),Q);Us(E,R)}return null}function D(E,S,R,Q,se){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return E=E.get(R)||null,h(S,E,""+Q,se);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case O:return E=E.get(Q.key===null?R:Q.key)||null,b(S,E,Q,se);case U:return E=E.get(Q.key===null?R:Q.key)||null,_(S,E,Q,se);case P:return Q=sa(Q),D(E,S,R,Q,se)}if(ae(Q)||J(Q))return E=E.get(R)||null,q(S,E,Q,se,null);if(typeof Q.then=="function")return D(E,S,R,ks(Q),se);if(Q.$$typeof===H)return D(E,S,R,Ms(S,Q),se);Us(S,Q)}return null}function te(E,S,R,Q){for(var se=null,we=null,le=S,ge=S=0,Ne=null;le!==null&&ge<R.length;ge++){le.index>ge?(Ne=le,le=null):Ne=le.sibling;var Ce=M(E,le,R[ge],Q);if(Ce===null){le===null&&(le=Ne);break}e&&le&&Ce.alternate===null&&t(E,le),S=i(Ce,S,ge),we===null?se=Ce:we.sibling=Ce,we=Ce,le=Ne}if(ge===R.length)return l(E,le),Se&&el(E,ge),se;if(le===null){for(;ge<R.length;ge++)le=V(E,R[ge],Q),le!==null&&(S=i(le,S,ge),we===null?se=le:we.sibling=le,we=le);return Se&&el(E,ge),se}for(le=a(le);ge<R.length;ge++)Ne=D(le,E,ge,R[ge],Q),Ne!==null&&(e&&Ne.alternate!==null&&le.delete(Ne.key===null?ge:Ne.key),S=i(Ne,S,ge),we===null?se=Ne:we.sibling=Ne,we=Ne);return e&&le.forEach(function(Gl){return t(E,Gl)}),Se&&el(E,ge),se}function ce(E,S,R,Q){if(R==null)throw Error(r(151));for(var se=null,we=null,le=S,ge=S=0,Ne=null,Ce=R.next();le!==null&&!Ce.done;ge++,Ce=R.next()){le.index>ge?(Ne=le,le=null):Ne=le.sibling;var Gl=M(E,le,Ce.value,Q);if(Gl===null){le===null&&(le=Ne);break}e&&le&&Gl.alternate===null&&t(E,le),S=i(Gl,S,ge),we===null?se=Gl:we.sibling=Gl,we=Gl,le=Ne}if(Ce.done)return l(E,le),Se&&el(E,ge),se;if(le===null){for(;!Ce.done;ge++,Ce=R.next())Ce=V(E,Ce.value,Q),Ce!==null&&(S=i(Ce,S,ge),we===null?se=Ce:we.sibling=Ce,we=Ce);return Se&&el(E,ge),se}for(le=a(le);!Ce.done;ge++,Ce=R.next())Ce=D(le,E,ge,Ce.value,Q),Ce!==null&&(e&&Ce.alternate!==null&&le.delete(Ce.key===null?ge:Ce.key),S=i(Ce,S,ge),we===null?se=Ce:we.sibling=Ce,we=Ce);return e&&le.forEach(function(jp){return t(E,jp)}),Se&&el(E,ge),se}function Oe(E,S,R,Q){if(typeof R=="object"&&R!==null&&R.type===T&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case O:e:{for(var se=R.key;S!==null;){if(S.key===se){if(se=R.type,se===T){if(S.tag===7){l(E,S.sibling),Q=s(S,R.props.children),Q.return=E,E=Q;break e}}else if(S.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===P&&sa(se)===S.type){l(E,S.sibling),Q=s(S,R.props),Tn(Q,R),Q.return=E,E=Q;break e}l(E,S);break}else t(E,S);S=S.sibling}R.type===T?(Q=ea(R.props.children,E.mode,Q,R.key),Q.return=E,E=Q):(Q=As(R.type,R.key,R.props,null,E.mode,Q),Tn(Q,R),Q.return=E,E=Q)}return u(E);case U:e:{for(se=R.key;S!==null;){if(S.key===se)if(S.tag===4&&S.stateNode.containerInfo===R.containerInfo&&S.stateNode.implementation===R.implementation){l(E,S.sibling),Q=s(S,R.children||[]),Q.return=E,E=Q;break e}else{l(E,S);break}else t(E,S);S=S.sibling}Q=yc(R,E.mode,Q),Q.return=E,E=Q}return u(E);case P:return R=sa(R),Oe(E,S,R,Q)}if(ae(R))return te(E,S,R,Q);if(J(R)){if(se=J(R),typeof se!="function")throw Error(r(150));return R=se.call(R),ce(E,S,R,Q)}if(typeof R.then=="function")return Oe(E,S,ks(R),Q);if(R.$$typeof===H)return Oe(E,S,Ms(E,R),Q);Us(E,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,S!==null&&S.tag===6?(l(E,S.sibling),Q=s(S,R),Q.return=E,E=Q):(l(E,S),Q=bc(R,E.mode,Q),Q.return=E,E=Q),u(E)):l(E,S)}return function(E,S,R,Q){try{En=0;var se=Oe(E,S,R,Q);return Ba=null,se}catch(le){if(le===Ha||le===Ds)throw le;var we=jt(29,le,null,E.mode);return we.lanes=Q,we.return=E,we}finally{}}}var ca=Po(!0),Io=Po(!1),Cl=!1;function zc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Dc(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 El(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Tl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Ee&2)!==0){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=Ts(e),Uo(e,null,l),t}return Es(e,a,t,l),Ts(e)}function An(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Qu(e,l)}}function Oc(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var s=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var u={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?s=i=u:i=i.next=u,l=l.next}while(l!==null);i===null?s=i=t:i=i.next=t}else s=i=t;l={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var kc=!1;function Rn(){if(kc){var e=Ua;if(e!==null)throw e}}function _n(e,t,l,a){kc=!1;var s=e.updateQueue;Cl=!1;var i=s.firstBaseUpdate,u=s.lastBaseUpdate,h=s.shared.pending;if(h!==null){s.shared.pending=null;var b=h,_=b.next;b.next=null,u===null?i=_:u.next=_,u=b;var q=e.alternate;q!==null&&(q=q.updateQueue,h=q.lastBaseUpdate,h!==u&&(h===null?q.firstBaseUpdate=_:h.next=_,q.lastBaseUpdate=b))}if(i!==null){var V=s.baseState;u=0,q=_=b=null,h=i;do{var M=h.lane&-536870913,D=M!==h.lane;if(D?(je&M)===M:(a&M)===M){M!==0&&M===ka&&(kc=!0),q!==null&&(q=q.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var te=e,ce=h;M=t;var Oe=l;switch(ce.tag){case 1:if(te=ce.payload,typeof te=="function"){V=te.call(Oe,V,M);break e}V=te;break e;case 3:te.flags=te.flags&-65537|128;case 0:if(te=ce.payload,M=typeof te=="function"?te.call(Oe,V,M):te,M==null)break e;V=N({},V,M);break e;case 2:Cl=!0}}M=h.callback,M!==null&&(e.flags|=64,D&&(e.flags|=8192),D=s.callbacks,D===null?s.callbacks=[M]:D.push(M))}else D={lane:M,tag:h.tag,payload:h.payload,callback:h.callback,next:null},q===null?(_=q=D,b=V):q=q.next=D,u|=M;if(h=h.next,h===null){if(h=s.shared.pending,h===null)break;D=h,h=D.next,D.next=null,s.lastBaseUpdate=D,s.shared.pending=null}}while(!0);q===null&&(b=V),s.baseState=b,s.firstBaseUpdate=_,s.lastBaseUpdate=q,i===null&&(s.shared.lanes=0),zl|=u,e.lanes=u,e.memoizedState=V}}function ed(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function td(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)ed(l[e],t)}var La=w(null),Hs=w(0);function ld(e,t){e=dl,W(Hs,e),W(La,t),dl=e|t.baseLanes}function Uc(){W(Hs,dl),W(La,La.current)}function Hc(){dl=Hs.current,X(La),X(Hs)}var Nt=w(null),kt=null;function Al(e){var t=e.alternate;W(Ze,Ze.current&1),W(Nt,e),kt===null&&(t===null||La.current!==null||t.memoizedState!==null)&&(kt=e)}function Bc(e){W(Ze,Ze.current),W(Nt,e),kt===null&&(kt=e)}function ad(e){e.tag===22?(W(Ze,Ze.current),W(Nt,e),kt===null&&(kt=e)):Rl()}function Rl(){W(Ze,Ze.current),W(Nt,Nt.current)}function St(e){X(Nt),kt===e&&(kt=null),X(Ze)}var Ze=w(0);function Bs(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Xr(l)||Vr(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var al=0,pe=null,ze=null,Je=null,Ls=!1,qa=!1,ra=!1,qs=0,Mn=0,Ya=null,dx=0;function Qe(){throw Error(r(321))}function Lc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!yt(e[l],t[l]))return!1;return!0}function qc(e,t,l,a,s,i){return al=i,pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?qd:tr,ra=!1,i=l(a,s),ra=!1,qa&&(i=sd(t,l,a,s)),nd(e),i}function nd(e){k.H=On;var t=ze!==null&&ze.next!==null;if(al=0,Je=ze=pe=null,Ls=!1,Mn=0,Ya=null,t)throw Error(r(300));e===null||Fe||(e=e.dependencies,e!==null&&_s(e)&&(Fe=!0))}function sd(e,t,l,a){pe=e;var s=0;do{if(qa&&(Ya=null),Mn=0,qa=!1,25<=s)throw Error(r(301));if(s+=1,Je=ze=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}k.H=Yd,i=t(l,a)}while(qa);return i}function fx(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?zn(t):t,e=e.useState()[0],(ze!==null?ze.memoizedState:null)!==e&&(pe.flags|=1024),t}function Yc(){var e=qs!==0;return qs=0,e}function Gc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Qc(e){if(Ls){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ls=!1}al=0,Je=ze=pe=null,qa=!1,Mn=qs=0,Ya=null}function rt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Je===null?pe.memoizedState=Je=e:Je=Je.next=e,Je}function $e(){if(ze===null){var e=pe.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=Je===null?pe.memoizedState:Je.next;if(t!==null)Je=t,ze=e;else{if(e===null)throw pe.alternate===null?Error(r(467)):Error(r(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},Je===null?pe.memoizedState=Je=e:Je=Je.next=e}return Je}function Ys(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function zn(e){var t=Mn;return Mn+=1,Ya===null&&(Ya=[]),e=Jo(Ya,e,t),t=pe,(Je===null?t.memoizedState:Je.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?qd:tr),e}function Gs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return zn(e);if(e.$$typeof===H)return at(e)}throw Error(r(438,String(e)))}function Xc(e){var t=null,l=pe.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=pe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Ys(),pe.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=Z;return t.index++,l}function nl(e,t){return typeof t=="function"?t(e):t}function Qs(e){var t=$e();return Vc(t,ze,e)}function Vc(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var s=e.baseQueue,i=a.pending;if(i!==null){if(s!==null){var u=s.next;s.next=i.next,i.next=u}t.baseQueue=s=i,a.pending=null}if(i=e.baseState,s===null)e.memoizedState=i;else{t=s.next;var h=u=null,b=null,_=t,q=!1;do{var V=_.lane&-536870913;if(V!==_.lane?(je&V)===V:(al&V)===V){var M=_.revertLane;if(M===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),V===ka&&(q=!0);else if((al&M)===M){_=_.next,M===ka&&(q=!0);continue}else V={lane:0,revertLane:_.revertLane,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},b===null?(h=b=V,u=i):b=b.next=V,pe.lanes|=M,zl|=M;V=_.action,ra&&l(i,V),i=_.hasEagerState?_.eagerState:l(i,V)}else M={lane:V,revertLane:_.revertLane,gesture:_.gesture,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},b===null?(h=b=M,u=i):b=b.next=M,pe.lanes|=V,zl|=V;_=_.next}while(_!==null&&_!==t);if(b===null?u=i:b.next=h,!yt(i,e.memoizedState)&&(Fe=!0,q&&(l=Ua,l!==null)))throw l;e.memoizedState=i,e.baseState=u,e.baseQueue=b,a.lastRenderedState=i}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Zc(e){var t=$e(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,s=l.pending,i=t.memoizedState;if(s!==null){l.pending=null;var u=s=s.next;do i=e(i,u.action),u=u.next;while(u!==s);yt(i,t.memoizedState)||(Fe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function id(e,t,l){var a=pe,s=$e(),i=Se;if(i){if(l===void 0)throw Error(r(407));l=l()}else l=t();var u=!yt((ze||s).memoizedState,l);if(u&&(s.memoizedState=l,Fe=!0),s=s.queue,Jc(ud.bind(null,a,s,e),[e]),s.getSnapshot!==t||u||Je!==null&&Je.memoizedState.tag&1){if(a.flags|=2048,Ga(9,{destroy:void 0},rd.bind(null,a,s,l,t),null),ke===null)throw Error(r(349));i||(al&127)!==0||cd(a,t,l)}return l}function cd(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=pe.updateQueue,t===null?(t=Ys(),pe.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function rd(e,t,l,a){t.value=l,t.getSnapshot=a,od(t)&&dd(e)}function ud(e,t,l){return l(function(){od(t)&&dd(e)})}function od(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!yt(e,l)}catch{return!0}}function dd(e){var t=Il(e,2);t!==null&&pt(t,e,2)}function $c(e){var t=rt();if(typeof e=="function"){var l=e;if(e=l(),ra){vl(!0);try{l()}finally{vl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:nl,lastRenderedState:e},t}function fd(e,t,l,a){return e.baseState=l,Vc(e,ze,typeof a=="function"?a:nl)}function mx(e,t,l,a,s){if(Zs(e))throw Error(r(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(u){i.listeners.push(u)}};k.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,md(t,i)):(i.next=l.next,t.pending=l.next=i)}}function md(e,t){var l=t.action,a=t.payload,s=e.state;if(t.isTransition){var i=k.T,u={};k.T=u;try{var h=l(s,a),b=k.S;b!==null&&b(u,h),hd(e,t,h)}catch(_){Kc(e,t,_)}finally{i!==null&&u.types!==null&&(i.types=u.types),k.T=i}}else try{i=l(s,a),hd(e,t,i)}catch(_){Kc(e,t,_)}}function hd(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){xd(e,t,a)},function(a){return Kc(e,t,a)}):xd(e,t,l)}function xd(e,t,l){t.status="fulfilled",t.value=l,pd(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,md(e,l)))}function Kc(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,pd(t),t=t.next;while(t!==a)}e.action=null}function pd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function gd(e,t){return t}function vd(e,t){if(Se){var l=ke.formState;if(l!==null){e:{var a=pe;if(Se){if(He){t:{for(var s=He,i=Ot;s.nodeType!==8;){if(!i){s=null;break t}if(s=Ut(s.nextSibling),s===null){s=null;break t}}i=s.data,s=i==="F!"||i==="F"?s:null}if(s){He=Ut(s.nextSibling),a=s.data==="F!";break e}}Sl(a)}a=!1}a&&(t=l[0])}}return l=rt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gd,lastRenderedState:t},l.queue=a,l=Hd.bind(null,pe,a),a.dispatch=l,a=$c(!1),i=er.bind(null,pe,!1,a.queue),a=rt(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,l=mx.bind(null,pe,s,i,l),s.dispatch=l,a.memoizedState=e,[t,l,!1]}function bd(e){var t=$e();return yd(t,ze,e)}function yd(e,t,l){if(t=Vc(e,t,gd)[0],e=Qs(nl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=zn(t)}catch(u){throw u===Ha?Ds:u}else a=t;t=$e();var s=t.queue,i=s.dispatch;return l!==t.memoizedState&&(pe.flags|=2048,Ga(9,{destroy:void 0},hx.bind(null,s,l),null)),[a,i,e]}function hx(e,t){e.action=t}function jd(e){var t=$e(),l=ze;if(l!==null)return yd(t,l,e);$e(),t=t.memoizedState,l=$e();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Ga(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=pe.updateQueue,t===null&&(t=Ys(),pe.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function Nd(){return $e().memoizedState}function Xs(e,t,l,a){var s=rt();pe.flags|=e,s.memoizedState=Ga(1|t,{destroy:void 0},l,a===void 0?null:a)}function Vs(e,t,l,a){var s=$e();a=a===void 0?null:a;var i=s.memoizedState.inst;ze!==null&&a!==null&&Lc(a,ze.memoizedState.deps)?s.memoizedState=Ga(t,i,l,a):(pe.flags|=e,s.memoizedState=Ga(1|t,i,l,a))}function Sd(e,t){Xs(8390656,8,e,t)}function Jc(e,t){Vs(2048,8,e,t)}function xx(e){pe.flags|=4;var t=pe.updateQueue;if(t===null)t=Ys(),pe.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function wd(e){var t=$e().memoizedState;return xx({ref:t,nextImpl:e}),function(){if((Ee&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Cd(e,t){return Vs(4,2,e,t)}function Ed(e,t){return Vs(4,4,e,t)}function Td(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ad(e,t,l){l=l!=null?l.concat([e]):null,Vs(4,4,Td.bind(null,t,e),l)}function Fc(){}function Rd(e,t){var l=$e();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Lc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function _d(e,t){var l=$e();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Lc(t,a[1]))return a[0];if(a=e(),ra){vl(!0);try{e()}finally{vl(!1)}}return l.memoizedState=[a,t],a}function Wc(e,t,l){return l===void 0||(al&1073741824)!==0&&(je&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=zf(),pe.lanes|=e,zl|=e,l)}function Md(e,t,l,a){return yt(l,t)?l:La.current!==null?(e=Wc(e,l,a),yt(e,t)||(Fe=!0),e):(al&42)===0||(al&1073741824)!==0&&(je&261930)===0?(Fe=!0,e.memoizedState=l):(e=zf(),pe.lanes|=e,zl|=e,t)}function zd(e,t,l,a,s){var i=F.p;F.p=i!==0&&8>i?i:8;var u=k.T,h={};k.T=h,er(e,!1,t,l);try{var b=s(),_=k.S;if(_!==null&&_(h,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var q=ox(b,a);Dn(e,t,q,Et(e))}else Dn(e,t,a,Et(e))}catch(V){Dn(e,t,{then:function(){},status:"rejected",reason:V},Et())}finally{F.p=i,u!==null&&h.types!==null&&(u.types=h.types),k.T=u}}function px(){}function Pc(e,t,l,a){if(e.tag!==5)throw Error(r(476));var s=Dd(e).queue;zd(e,s,t,ne,l===null?px:function(){return Od(e),l(a)})}function Dd(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:nl,lastRenderedState:ne},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:nl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Od(e){var t=Dd(e);t.next===null&&(t=e.alternate.memoizedState),Dn(e,t.next.queue,{},Et())}function Ic(){return at(Fn)}function kd(){return $e().memoizedState}function Ud(){return $e().memoizedState}function gx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Et();e=El(l);var a=Tl(t,e,l);a!==null&&(pt(a,t,l),An(a,t,l)),t={cache:Ac()},e.payload=t;return}t=t.return}}function vx(e,t,l){var a=Et();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Zs(e)?Bd(t,l):(l=gc(e,t,l,a),l!==null&&(pt(l,e,a),Ld(l,t,a)))}function Hd(e,t,l){var a=Et();Dn(e,t,l,a)}function Dn(e,t,l,a){var s={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Zs(e))Bd(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var u=t.lastRenderedState,h=i(u,l);if(s.hasEagerState=!0,s.eagerState=h,yt(h,u))return Es(e,t,s,0),ke===null&&Cs(),!1}catch{}finally{}if(l=gc(e,t,s,a),l!==null)return pt(l,e,a),Ld(l,t,a),!0}return!1}function er(e,t,l,a){if(a={lane:2,revertLane:zr(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Zs(e)){if(t)throw Error(r(479))}else t=gc(e,l,a,2),t!==null&&pt(t,e,2)}function Zs(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function Bd(e,t){qa=Ls=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Ld(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Qu(e,l)}}var On={readContext:at,use:Gs,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useLayoutEffect:Qe,useInsertionEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useSyncExternalStore:Qe,useId:Qe,useHostTransitionStatus:Qe,useFormState:Qe,useActionState:Qe,useOptimistic:Qe,useMemoCache:Qe,useCacheRefresh:Qe};On.useEffectEvent=Qe;var qd={readContext:at,use:Gs,useCallback:function(e,t){return rt().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:Sd,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Xs(4194308,4,Td.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Xs(4194308,4,e,t)},useInsertionEffect:function(e,t){Xs(4,2,e,t)},useMemo:function(e,t){var l=rt();t=t===void 0?null:t;var a=e();if(ra){vl(!0);try{e()}finally{vl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=rt();if(l!==void 0){var s=l(t);if(ra){vl(!0);try{l(t)}finally{vl(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=vx.bind(null,pe,e),[a.memoizedState,e]},useRef:function(e){var t=rt();return e={current:e},t.memoizedState=e},useState:function(e){e=$c(e);var t=e.queue,l=Hd.bind(null,pe,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Fc,useDeferredValue:function(e,t){var l=rt();return Wc(l,e,t)},useTransition:function(){var e=$c(!1);return e=zd.bind(null,pe,e.queue,!0,!1),rt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=pe,s=rt();if(Se){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),ke===null)throw Error(r(349));(je&127)!==0||cd(a,t,l)}s.memoizedState=l;var i={value:l,getSnapshot:t};return s.queue=i,Sd(ud.bind(null,a,i,e),[e]),a.flags|=2048,Ga(9,{destroy:void 0},rd.bind(null,a,i,l,t),null),l},useId:function(){var e=rt(),t=ke.identifierPrefix;if(Se){var l=Zt,a=Vt;l=(a&~(1<<32-bt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=qs++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=dx++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ic,useFormState:vd,useActionState:vd,useOptimistic:function(e){var t=rt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=er.bind(null,pe,!0,l),l.dispatch=t,[e,t]},useMemoCache:Xc,useCacheRefresh:function(){return rt().memoizedState=gx.bind(null,pe)},useEffectEvent:function(e){var t=rt(),l={impl:e};return t.memoizedState=l,function(){if((Ee&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},tr={readContext:at,use:Gs,useCallback:Rd,useContext:at,useEffect:Jc,useImperativeHandle:Ad,useInsertionEffect:Cd,useLayoutEffect:Ed,useMemo:_d,useReducer:Qs,useRef:Nd,useState:function(){return Qs(nl)},useDebugValue:Fc,useDeferredValue:function(e,t){var l=$e();return Md(l,ze.memoizedState,e,t)},useTransition:function(){var e=Qs(nl)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:zn(e),t]},useSyncExternalStore:id,useId:kd,useHostTransitionStatus:Ic,useFormState:bd,useActionState:bd,useOptimistic:function(e,t){var l=$e();return fd(l,ze,e,t)},useMemoCache:Xc,useCacheRefresh:Ud};tr.useEffectEvent=wd;var Yd={readContext:at,use:Gs,useCallback:Rd,useContext:at,useEffect:Jc,useImperativeHandle:Ad,useInsertionEffect:Cd,useLayoutEffect:Ed,useMemo:_d,useReducer:Zc,useRef:Nd,useState:function(){return Zc(nl)},useDebugValue:Fc,useDeferredValue:function(e,t){var l=$e();return ze===null?Wc(l,e,t):Md(l,ze.memoizedState,e,t)},useTransition:function(){var e=Zc(nl)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:zn(e),t]},useSyncExternalStore:id,useId:kd,useHostTransitionStatus:Ic,useFormState:jd,useActionState:jd,useOptimistic:function(e,t){var l=$e();return ze!==null?fd(l,ze,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Xc,useCacheRefresh:Ud};Yd.useEffectEvent=wd;function lr(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:N({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var ar={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Et(),s=El(a);s.payload=t,l!=null&&(s.callback=l),t=Tl(e,s,a),t!==null&&(pt(t,e,a),An(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Et(),s=El(a);s.tag=1,s.payload=t,l!=null&&(s.callback=l),t=Tl(e,s,a),t!==null&&(pt(t,e,a),An(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Et(),a=El(l);a.tag=2,t!=null&&(a.callback=t),t=Tl(e,a,l),t!==null&&(pt(t,e,l),An(t,e,l))}};function Gd(e,t,l,a,s,i,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,u):t.prototype&&t.prototype.isPureReactComponent?!yn(l,a)||!yn(s,i):!0}function Qd(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&ar.enqueueReplaceState(t,t.state,null)}function ua(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=N({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function Xd(e){ws(e)}function Vd(e){console.error(e)}function Zd(e){ws(e)}function $s(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function $d(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function nr(e,t,l){return l=El(l),l.tag=3,l.payload={element:null},l.callback=function(){$s(e,t)},l}function Kd(e){return e=El(e),e.tag=3,e}function Jd(e,t,l,a){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var i=a.value;e.payload=function(){return s(i)},e.callback=function(){$d(t,l,a)}}var u=l.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(e.callback=function(){$d(t,l,a),typeof s!="function"&&(Dl===null?Dl=new Set([this]):Dl.add(this));var h=a.stack;this.componentDidCatch(a.value,{componentStack:h!==null?h:""})})}function bx(e,t,l,a,s){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Oa(t,l,s,!0),l=Nt.current,l!==null){switch(l.tag){case 31:case 13:return kt===null?si():l.alternate===null&&Xe===0&&(Xe=3),l.flags&=-257,l.flags|=65536,l.lanes=s,a===Os?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Rr(e,a,s)),!1;case 22:return l.flags|=65536,a===Os?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Rr(e,a,s)),!1}throw Error(r(435,l.tag))}return Rr(e,a,s),si(),!1}if(Se)return t=Nt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==Sc&&(e=Error(r(422),{cause:a}),Sn(Mt(e,l)))):(a!==Sc&&(t=Error(r(423),{cause:a}),Sn(Mt(t,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=Mt(a,l),s=nr(e.stateNode,a,s),Oc(e,s),Xe!==4&&(Xe=2)),!1;var i=Error(r(520),{cause:a});if(i=Mt(i,l),Gn===null?Gn=[i]:Gn.push(i),Xe!==4&&(Xe=2),t===null)return!0;a=Mt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=nr(l.stateNode,a,e),Oc(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Dl===null||!Dl.has(i))))return l.flags|=65536,s&=-s,l.lanes|=s,s=Kd(s),Jd(s,e,l,a),Oc(l,s),!1}l=l.return}while(l!==null);return!1}var sr=Error(r(461)),Fe=!1;function nt(e,t,l,a){t.child=e===null?Io(t,null,l,a):ca(t,e.child,l,a)}function Fd(e,t,l,a,s){l=l.render;var i=t.ref;if("ref"in a){var u={};for(var h in a)h!=="ref"&&(u[h]=a[h])}else u=a;return aa(t),a=qc(e,t,l,u,i,s),h=Yc(),e!==null&&!Fe?(Gc(e,t,s),sl(e,t,s)):(Se&&h&&jc(t),t.flags|=1,nt(e,t,a,s),t.child)}function Wd(e,t,l,a,s){if(e===null){var i=l.type;return typeof i=="function"&&!vc(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,Pd(e,t,i,a,s)):(e=As(l.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!mr(e,s)){var u=i.memoizedProps;if(l=l.compare,l=l!==null?l:yn,l(u,a)&&e.ref===t.ref)return sl(e,t,s)}return t.flags|=1,e=It(i,a),e.ref=t.ref,e.return=t,t.child=e}function Pd(e,t,l,a,s){if(e!==null){var i=e.memoizedProps;if(yn(i,a)&&e.ref===t.ref)if(Fe=!1,t.pendingProps=a=i,mr(e,s))(e.flags&131072)!==0&&(Fe=!0);else return t.lanes=e.lanes,sl(e,t,s)}return ir(e,t,l,a,s)}function Id(e,t,l,a){var s=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,e!==null){for(a=t.child=e.child,s=0;a!==null;)s=s|a.lanes|a.childLanes,a=a.sibling;a=s&~i}else a=0,t.child=null;return ef(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&zs(t,i!==null?i.cachePool:null),i!==null?ld(t,i):Uc(),ad(t);else return a=t.lanes=536870912,ef(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(zs(t,i.cachePool),ld(t,i),Rl(),t.memoizedState=null):(e!==null&&zs(t,null),Uc(),Rl());return nt(e,t,s,l),t.child}function kn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ef(e,t,l,a,s){var i=_c();return i=i===null?null:{parent:Ke._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&zs(t,null),Uc(),ad(t),e!==null&&Oa(e,t,a,!0),t.childLanes=s,null}function Ks(e,t){return t=Fs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function tf(e,t,l){return ca(t,e.child,null,l),e=Ks(t,t.pendingProps),e.flags|=2,St(t),t.memoizedState=null,e}function yx(e,t,l){var a=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Se){if(a.mode==="hidden")return e=Ks(t,a),t.lanes=536870912,kn(null,e);if(Bc(t),(e=He)?(e=hm(e,Ot),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:jl!==null?{id:Vt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},l=Bo(e),l.return=t,t.child=l,lt=t,He=null)):e=null,e===null)throw Sl(t);return t.lanes=536870912,null}return Ks(t,a)}var i=e.memoizedState;if(i!==null){var u=i.dehydrated;if(Bc(t),s)if(t.flags&256)t.flags&=-257,t=tf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(Fe||Oa(e,t,l,!1),s=(l&e.childLanes)!==0,Fe||s){if(a=ke,a!==null&&(u=Xu(a,l),u!==0&&u!==i.retryLane))throw i.retryLane=u,Il(e,u),pt(a,e,u),sr;si(),t=tf(e,t,l)}else e=i.treeContext,He=Ut(u.nextSibling),lt=t,Se=!0,Nl=null,Ot=!1,e!==null&&Yo(t,e),t=Ks(t,a),t.flags|=4096;return t}return e=It(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Js(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function ir(e,t,l,a,s){return aa(t),l=qc(e,t,l,a,void 0,s),a=Yc(),e!==null&&!Fe?(Gc(e,t,s),sl(e,t,s)):(Se&&a&&jc(t),t.flags|=1,nt(e,t,l,s),t.child)}function lf(e,t,l,a,s,i){return aa(t),t.updateQueue=null,l=sd(t,a,l,s),nd(e),a=Yc(),e!==null&&!Fe?(Gc(e,t,i),sl(e,t,i)):(Se&&a&&jc(t),t.flags|=1,nt(e,t,l,i),t.child)}function af(e,t,l,a,s){if(aa(t),t.stateNode===null){var i=_a,u=l.contextType;typeof u=="object"&&u!==null&&(i=at(u)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=ar,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},zc(t),u=l.contextType,i.context=typeof u=="object"&&u!==null?at(u):_a,i.state=t.memoizedState,u=l.getDerivedStateFromProps,typeof u=="function"&&(lr(t,l,u,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(u=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),u!==i.state&&ar.enqueueReplaceState(i,i.state,null),_n(t,a,i,s),Rn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var h=t.memoizedProps,b=ua(l,h);i.props=b;var _=i.context,q=l.contextType;u=_a,typeof q=="object"&&q!==null&&(u=at(q));var V=l.getDerivedStateFromProps;q=typeof V=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,q||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||_!==u)&&Qd(t,i,a,u),Cl=!1;var M=t.memoizedState;i.state=M,_n(t,a,i,s),Rn(),_=t.memoizedState,h||M!==_||Cl?(typeof V=="function"&&(lr(t,l,V,a),_=t.memoizedState),(b=Cl||Gd(t,l,b,a,M,_,u))?(q||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=a,t.memoizedState=_),i.props=a,i.state=_,i.context=u,a=b):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Dc(e,t),u=t.memoizedProps,q=ua(l,u),i.props=q,V=t.pendingProps,M=i.context,_=l.contextType,b=_a,typeof _=="object"&&_!==null&&(b=at(_)),h=l.getDerivedStateFromProps,(_=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==V||M!==b)&&Qd(t,i,a,b),Cl=!1,M=t.memoizedState,i.state=M,_n(t,a,i,s),Rn();var D=t.memoizedState;u!==V||M!==D||Cl||e!==null&&e.dependencies!==null&&_s(e.dependencies)?(typeof h=="function"&&(lr(t,l,h,a),D=t.memoizedState),(q=Cl||Gd(t,l,q,a,M,D,b)||e!==null&&e.dependencies!==null&&_s(e.dependencies))?(_||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,D,b),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,D,b)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=D),i.props=a,i.state=D,i.context=b,a=q):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,Js(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=ca(t,e.child,null,s),t.child=ca(t,null,l,s)):nt(e,t,l,s),t.memoizedState=i.state,e=t.child):e=sl(e,t,s),e}function nf(e,t,l,a){return ta(),t.flags|=256,nt(e,t,l,a),t.child}var cr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rr(e){return{baseLanes:e,cachePool:$o()}}function ur(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ct),e}function sf(e,t,l){var a=t.pendingProps,s=!1,i=(t.flags&128)!==0,u;if((u=i)||(u=e!==null&&e.memoizedState===null?!1:(Ze.current&2)!==0),u&&(s=!0,t.flags&=-129),u=(t.flags&32)!==0,t.flags&=-33,e===null){if(Se){if(s?Al(t):Rl(),(e=He)?(e=hm(e,Ot),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:jl!==null?{id:Vt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},l=Bo(e),l.return=t,t.child=l,lt=t,He=null)):e=null,e===null)throw Sl(t);return Vr(e)?t.lanes=32:t.lanes=536870912,null}var h=a.children;return a=a.fallback,s?(Rl(),s=t.mode,h=Fs({mode:"hidden",children:h},s),a=ea(a,s,l,null),h.return=t,a.return=t,h.sibling=a,t.child=h,a=t.child,a.memoizedState=rr(l),a.childLanes=ur(e,u,l),t.memoizedState=cr,kn(null,a)):(Al(t),or(t,h))}var b=e.memoizedState;if(b!==null&&(h=b.dehydrated,h!==null)){if(i)t.flags&256?(Al(t),t.flags&=-257,t=dr(e,t,l)):t.memoizedState!==null?(Rl(),t.child=e.child,t.flags|=128,t=null):(Rl(),h=a.fallback,s=t.mode,a=Fs({mode:"visible",children:a.children},s),h=ea(h,s,l,null),h.flags|=2,a.return=t,h.return=t,a.sibling=h,t.child=a,ca(t,e.child,null,l),a=t.child,a.memoizedState=rr(l),a.childLanes=ur(e,u,l),t.memoizedState=cr,t=kn(null,a));else if(Al(t),Vr(h)){if(u=h.nextSibling&&h.nextSibling.dataset,u)var _=u.dgst;u=_,a=Error(r(419)),a.stack="",a.digest=u,Sn({value:a,source:null,stack:null}),t=dr(e,t,l)}else if(Fe||Oa(e,t,l,!1),u=(l&e.childLanes)!==0,Fe||u){if(u=ke,u!==null&&(a=Xu(u,l),a!==0&&a!==b.retryLane))throw b.retryLane=a,Il(e,a),pt(u,e,a),sr;Xr(h)||si(),t=dr(e,t,l)}else Xr(h)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,He=Ut(h.nextSibling),lt=t,Se=!0,Nl=null,Ot=!1,e!==null&&Yo(t,e),t=or(t,a.children),t.flags|=4096);return t}return s?(Rl(),h=a.fallback,s=t.mode,b=e.child,_=b.sibling,a=It(b,{mode:"hidden",children:a.children}),a.subtreeFlags=b.subtreeFlags&65011712,_!==null?h=It(_,h):(h=ea(h,s,l,null),h.flags|=2),h.return=t,a.return=t,a.sibling=h,t.child=a,kn(null,a),a=t.child,h=e.child.memoizedState,h===null?h=rr(l):(s=h.cachePool,s!==null?(b=Ke._currentValue,s=s.parent!==b?{parent:b,pool:b}:s):s=$o(),h={baseLanes:h.baseLanes|l,cachePool:s}),a.memoizedState=h,a.childLanes=ur(e,u,l),t.memoizedState=cr,kn(e.child,a)):(Al(t),l=e.child,e=l.sibling,l=It(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(u=t.deletions,u===null?(t.deletions=[e],t.flags|=16):u.push(e)),t.child=l,t.memoizedState=null,l)}function or(e,t){return t=Fs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Fs(e,t){return e=jt(22,e,null,t),e.lanes=0,e}function dr(e,t,l){return ca(t,e.child,null,l),e=or(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function cf(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Ec(e.return,t,l)}function fr(e,t,l,a,s,i){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:s,treeForkCount:i}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=a,u.tail=l,u.tailMode=s,u.treeForkCount=i)}function rf(e,t,l){var a=t.pendingProps,s=a.revealOrder,i=a.tail;a=a.children;var u=Ze.current,h=(u&2)!==0;if(h?(u=u&1|2,t.flags|=128):u&=1,W(Ze,u),nt(e,t,a,l),a=Se?Nn:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&cf(e,l,t);else if(e.tag===19)cf(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(l=t.child,s=null;l!==null;)e=l.alternate,e!==null&&Bs(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=t.child,t.child=null):(s=l.sibling,l.sibling=null),fr(t,!1,s,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Bs(e)===null){t.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}fr(t,!0,l,null,i,a);break;case"together":fr(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function sl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),zl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Oa(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=It(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=It(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function mr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&_s(e)))}function jx(e,t,l){switch(t.tag){case 3:Le(t,t.stateNode.containerInfo),wl(t,Ke,e.memoizedState.cache),ta();break;case 27:case 5:cn(t);break;case 4:Le(t,t.stateNode.containerInfo);break;case 10:wl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Bc(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Al(t),t.flags|=128,null):(l&t.child.childLanes)!==0?sf(e,t,l):(Al(t),e=sl(e,t,l),e!==null?e.sibling:null);Al(t);break;case 19:var s=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(Oa(e,t,l,!1),a=(l&t.childLanes)!==0),s){if(a)return rf(e,t,l);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),W(Ze,Ze.current),a)break;return null;case 22:return t.lanes=0,Id(e,t,l,t.pendingProps);case 24:wl(t,Ke,e.memoizedState.cache)}return sl(e,t,l)}function uf(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Fe=!0;else{if(!mr(e,l)&&(t.flags&128)===0)return Fe=!1,jx(e,t,l);Fe=(e.flags&131072)!==0}else Fe=!1,Se&&(t.flags&1048576)!==0&&qo(t,Nn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=sa(t.elementType),t.type=e,typeof e=="function")vc(e)?(a=ua(e,a),t.tag=1,t=af(null,t,e,a,l)):(t.tag=0,t=ir(null,t,e,a,l));else{if(e!=null){var s=e.$$typeof;if(s===K){t.tag=11,t=Fd(null,t,e,a,l);break e}else if(s===Y){t.tag=14,t=Wd(null,t,e,a,l);break e}}throw t=Ue(e)||e,Error(r(306,t,""))}}return t;case 0:return ir(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,s=ua(a,t.pendingProps),af(e,t,a,s,l);case 3:e:{if(Le(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var i=t.memoizedState;s=i.element,Dc(e,t),_n(t,a,null,l);var u=t.memoizedState;if(a=u.cache,wl(t,Ke,a),a!==i.cache&&Tc(t,[Ke],l,!0),Rn(),a=u.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:u.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=nf(e,t,a,l);break e}else if(a!==s){s=Mt(Error(r(424)),t),Sn(s),t=nf(e,t,a,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(He=Ut(e.firstChild),lt=t,Se=!0,Nl=null,Ot=!0,l=Io(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ta(),a===s){t=sl(e,t,l);break e}nt(e,t,a,l)}t=t.child}return t;case 26:return Js(e,t),e===null?(l=ym(t.type,null,t.pendingProps,null))?t.memoizedState=l:Se||(l=t.type,e=t.pendingProps,a=fi(he.current).createElement(l),a[tt]=t,a[ot]=e,st(a,l,e),Ie(a),t.stateNode=a):t.memoizedState=ym(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return cn(t),e===null&&Se&&(a=t.stateNode=gm(t.type,t.pendingProps,he.current),lt=t,Ot=!0,s=He,Hl(t.type)?(Zr=s,He=Ut(a.firstChild)):He=s),nt(e,t,t.pendingProps.children,l),Js(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Se&&((s=a=He)&&(a=Wx(a,t.type,t.pendingProps,Ot),a!==null?(t.stateNode=a,lt=t,He=Ut(a.firstChild),Ot=!1,s=!0):s=!1),s||Sl(t)),cn(t),s=t.type,i=t.pendingProps,u=e!==null?e.memoizedProps:null,a=i.children,Yr(s,i)?a=null:u!==null&&Yr(s,u)&&(t.flags|=32),t.memoizedState!==null&&(s=qc(e,t,fx,null,null,l),Fn._currentValue=s),Js(e,t),nt(e,t,a,l),t.child;case 6:return e===null&&Se&&((e=l=He)&&(l=Px(l,t.pendingProps,Ot),l!==null?(t.stateNode=l,lt=t,He=null,e=!0):e=!1),e||Sl(t)),null;case 13:return sf(e,t,l);case 4:return Le(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ca(t,null,a,l):nt(e,t,a,l),t.child;case 11:return Fd(e,t,t.type,t.pendingProps,l);case 7:return nt(e,t,t.pendingProps,l),t.child;case 8:return nt(e,t,t.pendingProps.children,l),t.child;case 12:return nt(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,wl(t,t.type,a.value),nt(e,t,a.children,l),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,aa(t),s=at(s),a=a(s),t.flags|=1,nt(e,t,a,l),t.child;case 14:return Wd(e,t,t.type,t.pendingProps,l);case 15:return Pd(e,t,t.type,t.pendingProps,l);case 19:return rf(e,t,l);case 31:return yx(e,t,l);case 22:return Id(e,t,l,t.pendingProps);case 24:return aa(t),a=at(Ke),e===null?(s=_c(),s===null&&(s=ke,i=Ac(),s.pooledCache=i,i.refCount++,i!==null&&(s.pooledCacheLanes|=l),s=i),t.memoizedState={parent:a,cache:s},zc(t),wl(t,Ke,s)):((e.lanes&l)!==0&&(Dc(e,t),_n(t,null,null,l),Rn()),s=e.memoizedState,i=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),wl(t,Ke,a)):(a=i.cache,wl(t,Ke,a),a!==s.cache&&Tc(t,[Ke],l,!0))),nt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function il(e){e.flags|=4}function hr(e,t,l,a,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(Uf())e.flags|=8192;else throw ia=Os,Mc}else e.flags&=-16777217}function of(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Cm(t))if(Uf())e.flags|=8192;else throw ia=Os,Mc}function Ws(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Yu():536870912,e.lanes|=t,Za|=t)}function Un(e,t){if(!Se)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Be(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Nx(e,t,l){var a=t.pendingProps;switch(Nc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(t),null;case 1:return Be(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ll(Ke),qe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Da(t)?il(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,wc())),Be(t),null;case 26:var s=t.type,i=t.memoizedState;return e===null?(il(t),i!==null?(Be(t),of(t,i)):(Be(t),hr(t,s,null,a,l))):i?i!==e.memoizedState?(il(t),Be(t),of(t,i)):(Be(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&il(t),Be(t),hr(t,s,e,a,l)),null;case 27:if(rs(t),l=he.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&il(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Be(t),null}e=ee.current,Da(t)?Go(t):(e=gm(s,a,l),t.stateNode=e,il(t))}return Be(t),null;case 5:if(rs(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&il(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Be(t),null}if(i=ee.current,Da(t))Go(t);else{var u=fi(he.current);switch(i){case 1:i=u.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:i=u.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":i=u.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":i=u.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":i=u.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?u.createElement("select",{is:a.is}):u.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?u.createElement(s,{is:a.is}):u.createElement(s)}}i[tt]=t,i[ot]=a;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)i.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=i;e:switch(st(i,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&il(t)}}return Be(t),hr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&il(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=he.current,Da(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,s=lt,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[tt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||im(e.nodeValue,l)),e||Sl(t,!0)}else e=fi(e).createTextNode(a),e[tt]=t,t.stateNode=e}return Be(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Da(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[tt]=t}else ta(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),e=!1}else l=wc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(St(t),t):(St(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Be(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Da(t),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));s[tt]=t}else ta(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),s=!1}else s=wc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(St(t),t):(St(t),null)}return St(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==s&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Ws(t,t.updateQueue),Be(t),null);case 4:return qe(),e===null&&Ur(t.stateNode.containerInfo),Be(t),null;case 10:return ll(t.type),Be(t),null;case 19:if(X(Ze),a=t.memoizedState,a===null)return Be(t),null;if(s=(t.flags&128)!==0,i=a.rendering,i===null)if(s)Un(a,!1);else{if(Xe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Bs(e),i!==null){for(t.flags|=128,Un(a,!1),e=i.updateQueue,t.updateQueue=e,Ws(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Ho(l,e),l=l.sibling;return W(Ze,Ze.current&1|2),Se&&el(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&>()>li&&(t.flags|=128,s=!0,Un(a,!1),t.lanes=4194304)}else{if(!s)if(e=Bs(i),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Ws(t,e),Un(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!Se)return Be(t),null}else 2*gt()-a.renderingStartTime>li&&l!==536870912&&(t.flags|=128,s=!0,Un(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=gt(),e.sibling=null,l=Ze.current,W(Ze,s?l&1|2:l&1),Se&&el(t,a.treeForkCount),e):(Be(t),null);case 22:case 23:return St(t),Hc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Be(t),t.subtreeFlags&6&&(t.flags|=8192)):Be(t),l=t.updateQueue,l!==null&&Ws(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&X(na),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ll(Ke),Be(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Sx(e,t){switch(Nc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ll(Ke),qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return rs(t),null;case 31:if(t.memoizedState!==null){if(St(t),t.alternate===null)throw Error(r(340));ta()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(St(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ta()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return X(Ze),null;case 4:return qe(),null;case 10:return ll(t.type),null;case 22:case 23:return St(t),Hc(),e!==null&&X(na),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ll(Ke),null;case 25:return null;default:return null}}function df(e,t){switch(Nc(t),t.tag){case 3:ll(Ke),qe();break;case 26:case 27:case 5:rs(t);break;case 4:qe();break;case 31:t.memoizedState!==null&&St(t);break;case 13:St(t);break;case 19:X(Ze);break;case 10:ll(t.type);break;case 22:case 23:St(t),Hc(),e!==null&&X(na);break;case 24:ll(Ke)}}function Hn(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){a=void 0;var i=l.create,u=l.inst;a=i(),u.destroy=a}l=l.next}while(l!==s)}}catch(h){_e(t,t.return,h)}}function _l(e,t,l){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var i=s.next;a=i;do{if((a.tag&e)===e){var u=a.inst,h=u.destroy;if(h!==void 0){u.destroy=void 0,s=t;var b=l,_=h;try{_()}catch(q){_e(s,b,q)}}}a=a.next}while(a!==i)}}catch(q){_e(t,t.return,q)}}function ff(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{td(t,l)}catch(a){_e(e,e.return,a)}}}function mf(e,t,l){l.props=ua(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){_e(e,t,a)}}function Bn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(s){_e(e,t,s)}}function $t(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(s){_e(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){_e(e,t,s)}else l.current=null}function hf(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(s){_e(e,e.return,s)}}function xr(e,t,l){try{var a=e.stateNode;Vx(a,e.type,l,t),a[ot]=t}catch(s){_e(e,e.return,s)}}function xf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Hl(e.type)||e.tag===4}function pr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xf(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&&Hl(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 gr(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Wt));else if(a!==4&&(a===27&&Hl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(gr(e,t,l),e=e.sibling;e!==null;)gr(e,t,l),e=e.sibling}function Ps(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&Hl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Ps(e,t,l),e=e.sibling;e!==null;)Ps(e,t,l),e=e.sibling}function pf(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);st(t,a,l),t[tt]=e,t[ot]=l}catch(i){_e(e,e.return,i)}}var cl=!1,We=!1,vr=!1,gf=typeof WeakSet=="function"?WeakSet:Set,et=null;function wx(e,t){if(e=e.containerInfo,Lr=bi,e=Ao(e),dc(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var s=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var u=0,h=-1,b=-1,_=0,q=0,V=e,M=null;t:for(;;){for(var D;V!==l||s!==0&&V.nodeType!==3||(h=u+s),V!==i||a!==0&&V.nodeType!==3||(b=u+a),V.nodeType===3&&(u+=V.nodeValue.length),(D=V.firstChild)!==null;)M=V,V=D;for(;;){if(V===e)break t;if(M===l&&++_===s&&(h=u),M===i&&++q===a&&(b=u),(D=V.nextSibling)!==null)break;V=M,M=V.parentNode}V=D}l=h===-1||b===-1?null:{start:h,end:b}}else l=null}l=l||{start:0,end:0}}else l=null;for(qr={focusedElem:e,selectionRange:l},bi=!1,et=t;et!==null;)if(t=et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,et=e;else for(;et!==null;){switch(t=et,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(l=0;l<e.length;l++)s=e[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,l=t,s=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var te=ua(l.type,s);e=a.getSnapshotBeforeUpdate(te,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(ce){_e(l,l.return,ce)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Qr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qr(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,et=e;break}et=t.return}}function vf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:ul(e,l),a&4&&Hn(5,l);break;case 1:if(ul(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(u){_e(l,l.return,u)}else{var s=ua(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(u){_e(l,l.return,u)}}a&64&&ff(l),a&512&&Bn(l,l.return);break;case 3:if(ul(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{td(e,t)}catch(u){_e(l,l.return,u)}}break;case 27:t===null&&a&4&&pf(l);case 26:case 5:ul(e,l),t===null&&a&4&&hf(l),a&512&&Bn(l,l.return);break;case 12:ul(e,l);break;case 31:ul(e,l),a&4&&jf(e,l);break;case 13:ul(e,l),a&4&&Nf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Dx.bind(null,l),Ix(e,l))));break;case 22:if(a=l.memoizedState!==null||cl,!a){t=t!==null&&t.memoizedState!==null||We,s=cl;var i=We;cl=a,(We=t)&&!i?ol(e,l,(l.subtreeFlags&8772)!==0):ul(e,l),cl=s,We=i}break;case 30:break;default:ul(e,l)}}function bf(e){var t=e.alternate;t!==null&&(e.alternate=null,bf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ki(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 Ye=null,ft=!1;function rl(e,t,l){for(l=l.child;l!==null;)yf(e,t,l),l=l.sibling}function yf(e,t,l){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(rn,l)}catch{}switch(l.tag){case 26:We||$t(l,t),rl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:We||$t(l,t);var a=Ye,s=ft;Hl(l.type)&&(Ye=l.stateNode,ft=!1),rl(e,t,l),$n(l.stateNode),Ye=a,ft=s;break;case 5:We||$t(l,t);case 6:if(a=Ye,s=ft,Ye=null,rl(e,t,l),Ye=a,ft=s,Ye!==null)if(ft)try{(Ye.nodeType===9?Ye.body:Ye.nodeName==="HTML"?Ye.ownerDocument.body:Ye).removeChild(l.stateNode)}catch(i){_e(l,t,i)}else try{Ye.removeChild(l.stateNode)}catch(i){_e(l,t,i)}break;case 18:Ye!==null&&(ft?(e=Ye,fm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),en(e)):fm(Ye,l.stateNode));break;case 4:a=Ye,s=ft,Ye=l.stateNode.containerInfo,ft=!0,rl(e,t,l),Ye=a,ft=s;break;case 0:case 11:case 14:case 15:_l(2,l,t),We||_l(4,l,t),rl(e,t,l);break;case 1:We||($t(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&mf(l,t,a)),rl(e,t,l);break;case 21:rl(e,t,l);break;case 22:We=(a=We)||l.memoizedState!==null,rl(e,t,l),We=a;break;default:rl(e,t,l)}}function jf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{en(e)}catch(l){_e(t,t.return,l)}}}function Nf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{en(e)}catch(l){_e(t,t.return,l)}}function Cx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new gf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new gf),t;default:throw Error(r(435,e.tag))}}function Is(e,t){var l=Cx(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var s=Ox.bind(null,e,a);a.then(s,s)}})}function mt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var s=l[a],i=e,u=t,h=u;e:for(;h!==null;){switch(h.tag){case 27:if(Hl(h.type)){Ye=h.stateNode,ft=!1;break e}break;case 5:Ye=h.stateNode,ft=!1;break e;case 3:case 4:Ye=h.stateNode.containerInfo,ft=!0;break e}h=h.return}if(Ye===null)throw Error(r(160));yf(i,u,s),Ye=null,ft=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Sf(t,e),t=t.sibling}var Gt=null;function Sf(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:mt(t,e),ht(e),a&4&&(_l(3,e,e.return),Hn(3,e),_l(5,e,e.return));break;case 1:mt(t,e),ht(e),a&512&&(We||l===null||$t(l,l.return)),a&64&&cl&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var s=Gt;if(mt(t,e),ht(e),a&512&&(We||l===null||$t(l,l.return)),a&4){var i=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":i=s.getElementsByTagName("title")[0],(!i||i[dn]||i[tt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=s.createElement(a),s.head.insertBefore(i,s.querySelector("head > title"))),st(i,a,l),i[tt]=e,Ie(i),a=i;break e;case"link":var u=Sm("link","href",s).get(a+(l.href||""));if(u){for(var h=0;h<u.length;h++)if(i=u[h],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){u.splice(h,1);break t}}i=s.createElement(a),st(i,a,l),s.head.appendChild(i);break;case"meta":if(u=Sm("meta","content",s).get(a+(l.content||""))){for(h=0;h<u.length;h++)if(i=u[h],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){u.splice(h,1);break t}}i=s.createElement(a),st(i,a,l),s.head.appendChild(i);break;default:throw Error(r(468,a))}i[tt]=e,Ie(i),a=i}e.stateNode=a}else wm(s,e.type,e.stateNode);else e.stateNode=Nm(s,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?wm(s,e.type,e.stateNode):Nm(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&xr(e,e.memoizedProps,l.memoizedProps)}break;case 27:mt(t,e),ht(e),a&512&&(We||l===null||$t(l,l.return)),l!==null&&a&4&&xr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(mt(t,e),ht(e),a&512&&(We||l===null||$t(l,l.return)),e.flags&32){s=e.stateNode;try{Sa(s,"")}catch(te){_e(e,e.return,te)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,xr(e,s,l!==null?l.memoizedProps:s)),a&1024&&(vr=!0);break;case 6:if(mt(t,e),ht(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(te){_e(e,e.return,te)}}break;case 3:if(xi=null,s=Gt,Gt=mi(t.containerInfo),mt(t,e),Gt=s,ht(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{en(t.containerInfo)}catch(te){_e(e,e.return,te)}vr&&(vr=!1,wf(e));break;case 4:a=Gt,Gt=mi(e.stateNode.containerInfo),mt(t,e),ht(e),Gt=a;break;case 12:mt(t,e),ht(e);break;case 31:mt(t,e),ht(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Is(e,a)));break;case 13:mt(t,e),ht(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(ti=gt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Is(e,a)));break;case 22:s=e.memoizedState!==null;var b=l!==null&&l.memoizedState!==null,_=cl,q=We;if(cl=_||s,We=q||b,mt(t,e),We=q,cl=_,ht(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||b||cl||We||oa(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){b=l=t;try{if(i=b.stateNode,s)u=i.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none";else{h=b.stateNode;var V=b.memoizedProps.style,M=V!=null&&V.hasOwnProperty("display")?V.display:null;h.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(te){_e(b,b.return,te)}}}else if(t.tag===6){if(l===null){b=t;try{b.stateNode.nodeValue=s?"":b.memoizedProps}catch(te){_e(b,b.return,te)}}}else if(t.tag===18){if(l===null){b=t;try{var D=b.stateNode;s?mm(D,!0):mm(b.stateNode,!1)}catch(te){_e(b,b.return,te)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Is(e,l))));break;case 19:mt(t,e),ht(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Is(e,a)));break;case 30:break;case 21:break;default:mt(t,e),ht(e)}}function ht(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(xf(a)){l=a;break}a=a.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var s=l.stateNode,i=pr(e);Ps(e,i,s);break;case 5:var u=l.stateNode;l.flags&32&&(Sa(u,""),l.flags&=-33);var h=pr(e);Ps(e,h,u);break;case 3:case 4:var b=l.stateNode.containerInfo,_=pr(e);gr(e,_,b);break;default:throw Error(r(161))}}catch(q){_e(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;wf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ul(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)vf(e,t.alternate,t),t=t.sibling}function oa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:_l(4,t,t.return),oa(t);break;case 1:$t(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&mf(t,t.return,l),oa(t);break;case 27:$n(t.stateNode);case 26:case 5:$t(t,t.return),oa(t);break;case 22:t.memoizedState===null&&oa(t);break;case 30:oa(t);break;default:oa(t)}e=e.sibling}}function ol(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,i=t,u=i.flags;switch(i.tag){case 0:case 11:case 15:ol(s,i,l),Hn(4,i);break;case 1:if(ol(s,i,l),a=i,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(_){_e(a,a.return,_)}if(a=i,s=a.updateQueue,s!==null){var h=a.stateNode;try{var b=s.shared.hiddenCallbacks;if(b!==null)for(s.shared.hiddenCallbacks=null,s=0;s<b.length;s++)ed(b[s],h)}catch(_){_e(a,a.return,_)}}l&&u&64&&ff(i),Bn(i,i.return);break;case 27:pf(i);case 26:case 5:ol(s,i,l),l&&a===null&&u&4&&hf(i),Bn(i,i.return);break;case 12:ol(s,i,l);break;case 31:ol(s,i,l),l&&u&4&&jf(s,i);break;case 13:ol(s,i,l),l&&u&4&&Nf(s,i);break;case 22:i.memoizedState===null&&ol(s,i,l),Bn(i,i.return);break;case 30:break;default:ol(s,i,l)}t=t.sibling}}function br(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&wn(l))}function yr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wn(e))}function Qt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cf(e,t,l,a),t=t.sibling}function Cf(e,t,l,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Qt(e,t,l,a),s&2048&&Hn(9,t);break;case 1:Qt(e,t,l,a);break;case 3:Qt(e,t,l,a),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wn(e)));break;case 12:if(s&2048){Qt(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,u=i.id,h=i.onPostCommit;typeof h=="function"&&h(u,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){_e(t,t.return,b)}}else Qt(e,t,l,a);break;case 31:Qt(e,t,l,a);break;case 13:Qt(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,u=t.alternate,t.memoizedState!==null?i._visibility&2?Qt(e,t,l,a):Ln(e,t):i._visibility&2?Qt(e,t,l,a):(i._visibility|=2,Qa(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),s&2048&&br(u,t);break;case 24:Qt(e,t,l,a),s&2048&&yr(t.alternate,t);break;default:Qt(e,t,l,a)}}function Qa(e,t,l,a,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,u=t,h=l,b=a,_=u.flags;switch(u.tag){case 0:case 11:case 15:Qa(i,u,h,b,s),Hn(8,u);break;case 23:break;case 22:var q=u.stateNode;u.memoizedState!==null?q._visibility&2?Qa(i,u,h,b,s):Ln(i,u):(q._visibility|=2,Qa(i,u,h,b,s)),s&&_&2048&&br(u.alternate,u);break;case 24:Qa(i,u,h,b,s),s&&_&2048&&yr(u.alternate,u);break;default:Qa(i,u,h,b,s)}t=t.sibling}}function Ln(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,s=a.flags;switch(a.tag){case 22:Ln(l,a),s&2048&&br(a.alternate,a);break;case 24:Ln(l,a),s&2048&&yr(a.alternate,a);break;default:Ln(l,a)}t=t.sibling}}var qn=8192;function Xa(e,t,l){if(e.subtreeFlags&qn)for(e=e.child;e!==null;)Ef(e,t,l),e=e.sibling}function Ef(e,t,l){switch(e.tag){case 26:Xa(e,t,l),e.flags&qn&&e.memoizedState!==null&&dp(l,Gt,e.memoizedState,e.memoizedProps);break;case 5:Xa(e,t,l);break;case 3:case 4:var a=Gt;Gt=mi(e.stateNode.containerInfo),Xa(e,t,l),Gt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=qn,qn=16777216,Xa(e,t,l),qn=a):Xa(e,t,l));break;default:Xa(e,t,l)}}function Tf(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 Yn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];et=a,Rf(a,e)}Tf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Af(e),e=e.sibling}function Af(e){switch(e.tag){case 0:case 11:case 15:Yn(e),e.flags&2048&&_l(9,e,e.return);break;case 3:Yn(e);break;case 12:Yn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ei(e)):Yn(e);break;default:Yn(e)}}function ei(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];et=a,Rf(a,e)}Tf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:_l(8,t,t.return),ei(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,ei(t));break;default:ei(t)}e=e.sibling}}function Rf(e,t){for(;et!==null;){var l=et;switch(l.tag){case 0:case 11:case 15:_l(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:wn(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,et=a;else e:for(l=e;et!==null;){a=et;var s=a.sibling,i=a.return;if(bf(a),a===l){et=null;break e}if(s!==null){s.return=i,et=s;break e}et=i}}}var Ex={getCacheForType:function(e){var t=at(Ke),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return at(Ke).controller.signal}},Tx=typeof WeakMap=="function"?WeakMap:Map,Ee=0,ke=null,ve=null,je=0,Re=0,wt=null,Ml=!1,Va=!1,jr=!1,dl=0,Xe=0,zl=0,da=0,Nr=0,Ct=0,Za=0,Gn=null,xt=null,Sr=!1,ti=0,_f=0,li=1/0,ai=null,Dl=null,Pe=0,Ol=null,$a=null,fl=0,wr=0,Cr=null,Mf=null,Qn=0,Er=null;function Et(){return(Ee&2)!==0&&je!==0?je&-je:k.T!==null?zr():Vu()}function zf(){if(Ct===0)if((je&536870912)===0||Se){var e=ds;ds<<=1,(ds&3932160)===0&&(ds=262144),Ct=e}else Ct=536870912;return e=Nt.current,e!==null&&(e.flags|=32),Ct}function pt(e,t,l){(e===ke&&(Re===2||Re===9)||e.cancelPendingCommit!==null)&&(Ka(e,0),kl(e,je,Ct,!1)),on(e,l),((Ee&2)===0||e!==ke)&&(e===ke&&((Ee&2)===0&&(da|=l),Xe===4&&kl(e,je,Ct,!1)),Kt(e))}function Df(e,t,l){if((Ee&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||un(e,t),s=a?_x(e,t):Ar(e,t,!0),i=a;do{if(s===0){Va&&!a&&kl(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Ax(l)){s=Ar(e,t,!1),i=!1;continue}if(s===2){if(i=t,e.errorRecoveryDisabledLanes&i)var u=0;else u=e.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){t=u;e:{var h=e;s=Gn;var b=h.current.memoizedState.isDehydrated;if(b&&(Ka(h,u).flags|=256),u=Ar(h,u,!1),u!==2){if(jr&&!b){h.errorRecoveryDisabledLanes|=i,da|=i,s=4;break e}i=xt,xt=s,i!==null&&(xt===null?xt=i:xt.push.apply(xt,i))}s=u}if(i=!1,s!==2)continue}}if(s===1){Ka(e,0),kl(e,t,0,!0);break}e:{switch(a=e,i=s,i){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:kl(a,t,Ct,!Ml);break e;case 2:xt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(s=ti+300-gt(),10<s)){if(kl(a,t,Ct,!Ml),ms(a,0,!0)!==0)break e;fl=t,a.timeoutHandle=om(Of.bind(null,a,l,xt,ai,Sr,t,Ct,da,Za,Ml,i,"Throttled",-0,0),s);break e}Of(a,l,xt,ai,Sr,t,Ct,da,Za,Ml,i,null,-0,0)}}break}while(!0);Kt(e)}function Of(e,t,l,a,s,i,u,h,b,_,q,V,M,D){if(e.timeoutHandle=-1,V=t.subtreeFlags,V&8192||(V&16785408)===16785408){V={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Wt},Ef(t,i,V);var te=(i&62914560)===i?ti-gt():(i&4194048)===i?_f-gt():0;if(te=fp(V,te),te!==null){fl=i,e.cancelPendingCommit=te(Gf.bind(null,e,t,i,l,a,s,u,h,b,q,V,null,M,D)),kl(e,i,u,!_);return}}Gf(e,t,i,l,a,s,u,h,b)}function Ax(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var s=l[a],i=s.getSnapshot;s=s.value;try{if(!yt(i(),s))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function kl(e,t,l,a){t&=~Nr,t&=~da,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var i=31-bt(s),u=1<<i;a[i]=-1,s&=~u}l!==0&&Gu(e,l,t)}function ni(){return(Ee&6)===0?(Xn(0),!1):!0}function Tr(){if(ve!==null){if(Re===0)var e=ve.return;else e=ve,tl=la=null,Qc(e),Ba=null,En=0,e=ve;for(;e!==null;)df(e.alternate,e),e=e.return;ve=null}}function Ka(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Kx(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),fl=0,Tr(),ke=e,ve=l=It(e.current,null),je=t,Re=0,wt=null,Ml=!1,Va=un(e,t),jr=!1,Za=Ct=Nr=da=zl=Xe=0,xt=Gn=null,Sr=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-bt(a),i=1<<s;t|=e[s],a&=~i}return dl=t,Cs(),l}function kf(e,t){pe=null,k.H=On,t===Ha||t===Ds?(t=Fo(),Re=3):t===Mc?(t=Fo(),Re=4):Re=t===sr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,wt=t,ve===null&&(Xe=1,$s(e,Mt(t,e.current)))}function Uf(){var e=Nt.current;return e===null?!0:(je&4194048)===je?kt===null:(je&62914560)===je||(je&536870912)!==0?e===kt:!1}function Hf(){var e=k.H;return k.H=On,e===null?On:e}function Bf(){var e=k.A;return k.A=Ex,e}function si(){Xe=4,Ml||(je&4194048)!==je&&Nt.current!==null||(Va=!0),(zl&134217727)===0&&(da&134217727)===0||ke===null||kl(ke,je,Ct,!1)}function Ar(e,t,l){var a=Ee;Ee|=2;var s=Hf(),i=Bf();(ke!==e||je!==t)&&(ai=null,Ka(e,t)),t=!1;var u=Xe;e:do try{if(Re!==0&&ve!==null){var h=ve,b=wt;switch(Re){case 8:Tr(),u=6;break e;case 3:case 2:case 9:case 6:Nt.current===null&&(t=!0);var _=Re;if(Re=0,wt=null,Ja(e,h,b,_),l&&Va){u=0;break e}break;default:_=Re,Re=0,wt=null,Ja(e,h,b,_)}}Rx(),u=Xe;break}catch(q){kf(e,q)}while(!0);return t&&e.shellSuspendCounter++,tl=la=null,Ee=a,k.H=s,k.A=i,ve===null&&(ke=null,je=0,Cs()),u}function Rx(){for(;ve!==null;)Lf(ve)}function _x(e,t){var l=Ee;Ee|=2;var a=Hf(),s=Bf();ke!==e||je!==t?(ai=null,li=gt()+500,Ka(e,t)):Va=un(e,t);e:do try{if(Re!==0&&ve!==null){t=ve;var i=wt;t:switch(Re){case 1:Re=0,wt=null,Ja(e,t,i,1);break;case 2:case 9:if(Ko(i)){Re=0,wt=null,qf(t);break}t=function(){Re!==2&&Re!==9||ke!==e||(Re=7),Kt(e)},i.then(t,t);break e;case 3:Re=7;break e;case 4:Re=5;break e;case 7:Ko(i)?(Re=0,wt=null,qf(t)):(Re=0,wt=null,Ja(e,t,i,7));break;case 5:var u=null;switch(ve.tag){case 26:u=ve.memoizedState;case 5:case 27:var h=ve;if(u?Cm(u):h.stateNode.complete){Re=0,wt=null;var b=h.sibling;if(b!==null)ve=b;else{var _=h.return;_!==null?(ve=_,ii(_)):ve=null}break t}}Re=0,wt=null,Ja(e,t,i,5);break;case 6:Re=0,wt=null,Ja(e,t,i,6);break;case 8:Tr(),Xe=6;break e;default:throw Error(r(462))}}Mx();break}catch(q){kf(e,q)}while(!0);return tl=la=null,k.H=a,k.A=s,Ee=l,ve!==null?0:(ke=null,je=0,Cs(),Xe)}function Mx(){for(;ve!==null&&!eh();)Lf(ve)}function Lf(e){var t=uf(e.alternate,e,dl);e.memoizedProps=e.pendingProps,t===null?ii(e):ve=t}function qf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=lf(l,t,t.pendingProps,t.type,void 0,je);break;case 11:t=lf(l,t,t.pendingProps,t.type.render,t.ref,je);break;case 5:Qc(t);default:df(l,t),t=ve=Ho(t,dl),t=uf(l,t,dl)}e.memoizedProps=e.pendingProps,t===null?ii(e):ve=t}function Ja(e,t,l,a){tl=la=null,Qc(t),Ba=null,En=0;var s=t.return;try{if(bx(e,s,t,l,je)){Xe=1,$s(e,Mt(l,e.current)),ve=null;return}}catch(i){if(s!==null)throw ve=s,i;Xe=1,$s(e,Mt(l,e.current)),ve=null;return}t.flags&32768?(Se||a===1?e=!0:Va||(je&536870912)!==0?e=!1:(Ml=e=!0,(a===2||a===9||a===3||a===6)&&(a=Nt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Yf(t,e)):ii(t)}function ii(e){var t=e;do{if((t.flags&32768)!==0){Yf(t,Ml);return}e=t.return;var l=Nx(t.alternate,t,dl);if(l!==null){ve=l;return}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);Xe===0&&(Xe=5)}function Yf(e,t){do{var l=Sx(e.alternate,e);if(l!==null){l.flags&=32767,ve=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ve=e;return}ve=e=l}while(e!==null);Xe=6,ve=null}function Gf(e,t,l,a,s,i,u,h,b){e.cancelPendingCommit=null;do ci();while(Pe!==0);if((Ee&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(i=t.lanes|t.childLanes,i|=pc,oh(e,l,i,u,h,b),e===ke&&(ve=ke=null,je=0),$a=t,Ol=e,fl=l,wr=i,Cr=s,Mf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,kx(us,function(){return $f(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=k.T,k.T=null,s=F.p,F.p=2,u=Ee,Ee|=4;try{wx(e,t,l)}finally{Ee=u,F.p=s,k.T=a}}Pe=1,Qf(),Xf(),Vf()}}function Qf(){if(Pe===1){Pe=0;var e=Ol,t=$a,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=k.T,k.T=null;var a=F.p;F.p=2;var s=Ee;Ee|=4;try{Sf(t,e);var i=qr,u=Ao(e.containerInfo),h=i.focusedElem,b=i.selectionRange;if(u!==h&&h&&h.ownerDocument&&To(h.ownerDocument.documentElement,h)){if(b!==null&&dc(h)){var _=b.start,q=b.end;if(q===void 0&&(q=_),"selectionStart"in h)h.selectionStart=_,h.selectionEnd=Math.min(q,h.value.length);else{var V=h.ownerDocument||document,M=V&&V.defaultView||window;if(M.getSelection){var D=M.getSelection(),te=h.textContent.length,ce=Math.min(b.start,te),Oe=b.end===void 0?ce:Math.min(b.end,te);!D.extend&&ce>Oe&&(u=Oe,Oe=ce,ce=u);var E=Eo(h,ce),S=Eo(h,Oe);if(E&&S&&(D.rangeCount!==1||D.anchorNode!==E.node||D.anchorOffset!==E.offset||D.focusNode!==S.node||D.focusOffset!==S.offset)){var R=V.createRange();R.setStart(E.node,E.offset),D.removeAllRanges(),ce>Oe?(D.addRange(R),D.extend(S.node,S.offset)):(R.setEnd(S.node,S.offset),D.addRange(R))}}}}for(V=[],D=h;D=D.parentNode;)D.nodeType===1&&V.push({element:D,left:D.scrollLeft,top:D.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<V.length;h++){var Q=V[h];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}bi=!!Lr,qr=Lr=null}finally{Ee=s,F.p=a,k.T=l}}e.current=t,Pe=2}}function Xf(){if(Pe===2){Pe=0;var e=Ol,t=$a,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=k.T,k.T=null;var a=F.p;F.p=2;var s=Ee;Ee|=4;try{vf(e,t.alternate,t)}finally{Ee=s,F.p=a,k.T=l}}Pe=3}}function Vf(){if(Pe===4||Pe===3){Pe=0,th();var e=Ol,t=$a,l=fl,a=Mf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Pe=5:(Pe=0,$a=Ol=null,Zf(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Dl=null),Zi(l),t=t.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(rn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=k.T,s=F.p,F.p=2,k.T=null;try{for(var i=e.onRecoverableError,u=0;u<a.length;u++){var h=a[u];i(h.value,{componentStack:h.stack})}}finally{k.T=t,F.p=s}}(fl&3)!==0&&ci(),Kt(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===Er?Qn++:(Qn=0,Er=e):Qn=0,Xn(0)}}function Zf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,wn(t)))}function ci(){return Qf(),Xf(),Vf(),$f()}function $f(){if(Pe!==5)return!1;var e=Ol,t=wr;wr=0;var l=Zi(fl),a=k.T,s=F.p;try{F.p=32>l?32:l,k.T=null,l=Cr,Cr=null;var i=Ol,u=fl;if(Pe=0,$a=Ol=null,fl=0,(Ee&6)!==0)throw Error(r(331));var h=Ee;if(Ee|=4,Af(i.current),Cf(i,i.current,u,l),Ee=h,Xn(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(rn,i)}catch{}return!0}finally{F.p=s,k.T=a,Zf(e,t)}}function Kf(e,t,l){t=Mt(l,t),t=nr(e.stateNode,t,2),e=Tl(e,t,2),e!==null&&(on(e,2),Kt(e))}function _e(e,t,l){if(e.tag===3)Kf(e,e,l);else for(;t!==null;){if(t.tag===3){Kf(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Dl===null||!Dl.has(a))){e=Mt(l,e),l=Kd(2),a=Tl(t,l,2),a!==null&&(Jd(l,a,t,e),on(a,2),Kt(a));break}}t=t.return}}function Rr(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Tx;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(l)||(jr=!0,s.add(l),e=zx.bind(null,e,t,l),t.then(e,e))}function zx(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,ke===e&&(je&l)===l&&(Xe===4||Xe===3&&(je&62914560)===je&&300>gt()-ti?(Ee&2)===0&&Ka(e,0):Nr|=l,Za===je&&(Za=0)),Kt(e)}function Jf(e,t){t===0&&(t=Yu()),e=Il(e,t),e!==null&&(on(e,t),Kt(e))}function Dx(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Jf(e,l)}function Ox(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),Jf(e,l)}function kx(e,t){return Gi(e,t)}var ri=null,Fa=null,_r=!1,ui=!1,Mr=!1,Ul=0;function Kt(e){e!==Fa&&e.next===null&&(Fa===null?ri=Fa=e:Fa=Fa.next=e),ui=!0,_r||(_r=!0,Hx())}function Xn(e,t){if(!Mr&&ui){Mr=!0;do for(var l=!1,a=ri;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var i=0;else{var u=a.suspendedLanes,h=a.pingedLanes;i=(1<<31-bt(42|e)+1)-1,i&=s&~(u&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,If(a,i))}else i=je,i=ms(a,a===ke?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||un(a,i)||(l=!0,If(a,i));a=a.next}while(l);Mr=!1}}function Ux(){Ff()}function Ff(){ui=_r=!1;var e=0;Ul!==0&&$x()&&(e=Ul);for(var t=gt(),l=null,a=ri;a!==null;){var s=a.next,i=Wf(a,t);i===0?(a.next=null,l===null?ri=s:l.next=s,s===null&&(Fa=l)):(l=a,(e!==0||(i&3)!==0)&&(ui=!0)),a=s}Pe!==0&&Pe!==5||Xn(e),Ul!==0&&(Ul=0)}function Wf(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var u=31-bt(i),h=1<<u,b=s[u];b===-1?((h&l)===0||(h&a)!==0)&&(s[u]=uh(h,t)):b<=t&&(e.expiredLanes|=h),i&=~h}if(t=ke,l=je,l=ms(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Re===2||Re===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Qi(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||un(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Qi(a),Zi(l)){case 2:case 8:l=Lu;break;case 32:l=us;break;case 268435456:l=qu;break;default:l=us}return a=Pf.bind(null,e),l=Gi(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Qi(a),e.callbackPriority=2,e.callbackNode=null,2}function Pf(e,t){if(Pe!==0&&Pe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(ci()&&e.callbackNode!==l)return null;var a=je;return a=ms(e,e===ke?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Df(e,a,t),Wf(e,gt()),e.callbackNode!=null&&e.callbackNode===l?Pf.bind(null,e):null)}function If(e,t){if(ci())return null;Df(e,t,!0)}function Hx(){Jx(function(){(Ee&6)!==0?Gi(Bu,Ux):Ff()})}function zr(){if(Ul===0){var e=ka;e===0&&(e=os,os<<=1,(os&261888)===0&&(os=256)),Ul=e}return Ul}function em(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:gs(""+e)}function tm(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function Bx(e,t,l,a,s){if(t==="submit"&&l&&l.stateNode===s){var i=em((s[ot]||null).action),u=a.submitter;u&&(t=(t=u[ot]||null)?em(t.formAction):u.getAttribute("formAction"),t!==null&&(i=t,u=null));var h=new js("action","action",null,a,s);e.push({event:h,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ul!==0){var b=u?tm(s,u):new FormData(s);Pc(l,{pending:!0,data:b,method:s.method,action:i},null,b)}}else typeof i=="function"&&(h.preventDefault(),b=u?tm(s,u):new FormData(s),Pc(l,{pending:!0,data:b,method:s.method,action:i},i,b))},currentTarget:s}]})}}for(var Dr=0;Dr<xc.length;Dr++){var Or=xc[Dr],Lx=Or.toLowerCase(),qx=Or[0].toUpperCase()+Or.slice(1);Yt(Lx,"on"+qx)}Yt(Mo,"onAnimationEnd"),Yt(zo,"onAnimationIteration"),Yt(Do,"onAnimationStart"),Yt("dblclick","onDoubleClick"),Yt("focusin","onFocus"),Yt("focusout","onBlur"),Yt(lx,"onTransitionRun"),Yt(ax,"onTransitionStart"),Yt(nx,"onTransitionCancel"),Yt(Oo,"onTransitionEnd"),ja("onMouseEnter",["mouseout","mouseover"]),ja("onMouseLeave",["mouseout","mouseover"]),ja("onPointerEnter",["pointerout","pointerover"]),ja("onPointerLeave",["pointerout","pointerover"]),Jl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vn="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(" "),Yx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vn));function lm(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],s=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var u=a.length-1;0<=u;u--){var h=a[u],b=h.instance,_=h.currentTarget;if(h=h.listener,b!==i&&s.isPropagationStopped())break e;i=h,s.currentTarget=_;try{i(s)}catch(q){ws(q)}s.currentTarget=null,i=b}else for(u=0;u<a.length;u++){if(h=a[u],b=h.instance,_=h.currentTarget,h=h.listener,b!==i&&s.isPropagationStopped())break e;i=h,s.currentTarget=_;try{i(s)}catch(q){ws(q)}s.currentTarget=null,i=b}}}}function be(e,t){var l=t[$i];l===void 0&&(l=t[$i]=new Set);var a=e+"__bubble";l.has(a)||(am(t,e,2,!1),l.add(a))}function kr(e,t,l){var a=0;t&&(a|=4),am(l,e,a,t)}var oi="_reactListening"+Math.random().toString(36).slice(2);function Ur(e){if(!e[oi]){e[oi]=!0,Ku.forEach(function(l){l!=="selectionchange"&&(Yx.has(l)||kr(l,!1,e),kr(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[oi]||(t[oi]=!0,kr("selectionchange",!1,t))}}function am(e,t,l,a){switch(zm(t)){case 2:var s=xp;break;case 8:s=pp;break;default:s=Wr}l=s.bind(null,t,l,e),s=void 0,!lc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(t,l,{capture:!0,passive:s}):e.addEventListener(t,l,!0):s!==void 0?e.addEventListener(t,l,{passive:s}):e.addEventListener(t,l,!1)}function Hr(e,t,l,a,s){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var u=a.tag;if(u===3||u===4){var h=a.stateNode.containerInfo;if(h===s)break;if(u===4)for(u=a.return;u!==null;){var b=u.tag;if((b===3||b===4)&&u.stateNode.containerInfo===s)return;u=u.return}for(;h!==null;){if(u=va(h),u===null)return;if(b=u.tag,b===5||b===6||b===26||b===27){a=i=u;continue e}h=h.parentNode}}a=a.return}io(function(){var _=i,q=ec(l),V=[];e:{var M=ko.get(e);if(M!==void 0){var D=js,te=e;switch(e){case"keypress":if(bs(l)===0)break e;case"keydown":case"keyup":D=Oh;break;case"focusin":te="focus",D=ic;break;case"focusout":te="blur",D=ic;break;case"beforeblur":case"afterblur":D=ic;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":D=uo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":D=Nh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":D=Hh;break;case Mo:case zo:case Do:D=Ch;break;case Oo:D=Lh;break;case"scroll":case"scrollend":D=yh;break;case"wheel":D=Yh;break;case"copy":case"cut":case"paste":D=Th;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":D=fo;break;case"toggle":case"beforetoggle":D=Qh}var ce=(t&4)!==0,Oe=!ce&&(e==="scroll"||e==="scrollend"),E=ce?M!==null?M+"Capture":null:M;ce=[];for(var S=_,R;S!==null;){var Q=S;if(R=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||R===null||E===null||(Q=mn(S,E),Q!=null&&ce.push(Zn(S,Q,R))),Oe)break;S=S.return}0<ce.length&&(M=new D(M,te,null,l,q),V.push({event:M,listeners:ce}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",M&&l!==Ii&&(te=l.relatedTarget||l.fromElement)&&(va(te)||te[ga]))break e;if((D||M)&&(M=q.window===q?q:(M=q.ownerDocument)?M.defaultView||M.parentWindow:window,D?(te=l.relatedTarget||l.toElement,D=_,te=te?va(te):null,te!==null&&(Oe=f(te),ce=te.tag,te!==Oe||ce!==5&&ce!==27&&ce!==6)&&(te=null)):(D=null,te=_),D!==te)){if(ce=uo,Q="onMouseLeave",E="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(ce=fo,Q="onPointerLeave",E="onPointerEnter",S="pointer"),Oe=D==null?M:fn(D),R=te==null?M:fn(te),M=new ce(Q,S+"leave",D,l,q),M.target=Oe,M.relatedTarget=R,Q=null,va(q)===_&&(ce=new ce(E,S+"enter",te,l,q),ce.target=R,ce.relatedTarget=Oe,Q=ce),Oe=Q,D&&te)t:{for(ce=Gx,E=D,S=te,R=0,Q=E;Q;Q=ce(Q))R++;Q=0;for(var se=S;se;se=ce(se))Q++;for(;0<R-Q;)E=ce(E),R--;for(;0<Q-R;)S=ce(S),Q--;for(;R--;){if(E===S||S!==null&&E===S.alternate){ce=E;break t}E=ce(E),S=ce(S)}ce=null}else ce=null;D!==null&&nm(V,M,D,ce,!1),te!==null&&Oe!==null&&nm(V,Oe,te,ce,!0)}}e:{if(M=_?fn(_):window,D=M.nodeName&&M.nodeName.toLowerCase(),D==="select"||D==="input"&&M.type==="file")var we=yo;else if(vo(M))if(jo)we=Ih;else{we=Wh;var le=Fh}else D=M.nodeName,!D||D.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?_&&Pi(_.elementType)&&(we=yo):we=Ph;if(we&&(we=we(e,_))){bo(V,we,l,q);break e}le&&le(e,M,_),e==="focusout"&&_&&M.type==="number"&&_.memoizedProps.value!=null&&Wi(M,"number",M.value)}switch(le=_?fn(_):window,e){case"focusin":(vo(le)||le.contentEditable==="true")&&(Ta=le,fc=_,jn=null);break;case"focusout":jn=fc=Ta=null;break;case"mousedown":mc=!0;break;case"contextmenu":case"mouseup":case"dragend":mc=!1,Ro(V,l,q);break;case"selectionchange":if(tx)break;case"keydown":case"keyup":Ro(V,l,q)}var ge;if(rc)e:{switch(e){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else Ea?po(e,l)&&(Ne="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Ne="onCompositionStart");Ne&&(mo&&l.locale!=="ko"&&(Ea||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&Ea&&(ge=co()):(yl=q,ac="value"in yl?yl.value:yl.textContent,Ea=!0)),le=di(_,Ne),0<le.length&&(Ne=new oo(Ne,e,null,l,q),V.push({event:Ne,listeners:le}),ge?Ne.data=ge:(ge=go(l),ge!==null&&(Ne.data=ge)))),(ge=Vh?Zh(e,l):$h(e,l))&&(Ne=di(_,"onBeforeInput"),0<Ne.length&&(le=new oo("onBeforeInput","beforeinput",null,l,q),V.push({event:le,listeners:Ne}),le.data=ge)),Bx(V,e,_,l,q)}lm(V,t)})}function Zn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function di(e,t){for(var l=t+"Capture",a=[];e!==null;){var s=e,i=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||i===null||(s=mn(e,l),s!=null&&a.unshift(Zn(e,s,i)),s=mn(e,t),s!=null&&a.push(Zn(e,s,i))),e.tag===3)return a;e=e.return}return[]}function Gx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function nm(e,t,l,a,s){for(var i=t._reactName,u=[];l!==null&&l!==a;){var h=l,b=h.alternate,_=h.stateNode;if(h=h.tag,b!==null&&b===a)break;h!==5&&h!==26&&h!==27||_===null||(b=_,s?(_=mn(l,i),_!=null&&u.unshift(Zn(l,_,b))):s||(_=mn(l,i),_!=null&&u.push(Zn(l,_,b)))),l=l.return}u.length!==0&&e.push({event:t,listeners:u})}var Qx=/\r\n?/g,Xx=/\u0000|\uFFFD/g;function sm(e){return(typeof e=="string"?e:""+e).replace(Qx,`
|
|
49
|
-
`).replace(Xx,"")}function im(e,t){return t=sm(t),sm(e)===t}function De(e,t,l,a,s,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Sa(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Sa(e,""+a);break;case"className":xs(e,"class",a);break;case"tabIndex":xs(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":xs(e,l,a);break;case"style":no(e,a,i);break;case"data":if(t!=="object"){xs(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=gs(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(l==="formAction"?(t!=="input"&&De(e,t,"name",s.name,s,null),De(e,t,"formEncType",s.formEncType,s,null),De(e,t,"formMethod",s.formMethod,s,null),De(e,t,"formTarget",s.formTarget,s,null)):(De(e,t,"encType",s.encType,s,null),De(e,t,"method",s.method,s,null),De(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=gs(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Wt);break;case"onScroll":a!=null&&be("scroll",e);break;case"onScrollEnd":a!=null&&be("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=gs(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":be("beforetoggle",e),be("toggle",e),hs(e,"popover",a);break;case"xlinkActuate":Ft(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Ft(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Ft(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Ft(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Ft(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Ft(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Ft(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Ft(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Ft(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":hs(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=vh.get(l)||l,hs(e,l,a))}}function Br(e,t,l,a,s,i){switch(l){case"style":no(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof a=="string"?Sa(e,a):(typeof a=="number"||typeof a=="bigint")&&Sa(e,""+a);break;case"onScroll":a!=null&&be("scroll",e);break;case"onScrollEnd":a!=null&&be("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Wt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ju.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),t=l.slice(2,s?l.length-7:void 0),i=e[ot]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,s),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,s);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):hs(e,l,a)}}}function st(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":be("error",e),be("load",e);var a=!1,s=!1,i;for(i in l)if(l.hasOwnProperty(i)){var u=l[i];if(u!=null)switch(i){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:De(e,t,i,u,l,null)}}s&&De(e,t,"srcSet",l.srcSet,l,null),a&&De(e,t,"src",l.src,l,null);return;case"input":be("invalid",e);var h=i=u=s=null,b=null,_=null;for(a in l)if(l.hasOwnProperty(a)){var q=l[a];if(q!=null)switch(a){case"name":s=q;break;case"type":u=q;break;case"checked":b=q;break;case"defaultChecked":_=q;break;case"value":i=q;break;case"defaultValue":h=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,t));break;default:De(e,t,a,q,l,null)}}eo(e,i,h,b,_,u,s,!1);return;case"select":be("invalid",e),a=u=i=null;for(s in l)if(l.hasOwnProperty(s)&&(h=l[s],h!=null))switch(s){case"value":i=h;break;case"defaultValue":u=h;break;case"multiple":a=h;default:De(e,t,s,h,l,null)}t=i,l=u,e.multiple=!!a,t!=null?Na(e,!!a,t,!1):l!=null&&Na(e,!!a,l,!0);return;case"textarea":be("invalid",e),i=s=a=null;for(u in l)if(l.hasOwnProperty(u)&&(h=l[u],h!=null))switch(u){case"value":a=h;break;case"defaultValue":s=h;break;case"children":i=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(r(91));break;default:De(e,t,u,h,l,null)}lo(e,a,s,i);return;case"option":for(b in l)if(l.hasOwnProperty(b)&&(a=l[b],a!=null))switch(b){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:De(e,t,b,a,l,null)}return;case"dialog":be("beforetoggle",e),be("toggle",e),be("cancel",e),be("close",e);break;case"iframe":case"object":be("load",e);break;case"video":case"audio":for(a=0;a<Vn.length;a++)be(Vn[a],e);break;case"image":be("error",e),be("load",e);break;case"details":be("toggle",e);break;case"embed":case"source":case"link":be("error",e),be("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(_ in l)if(l.hasOwnProperty(_)&&(a=l[_],a!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:De(e,t,_,a,l,null)}return;default:if(Pi(t)){for(q in l)l.hasOwnProperty(q)&&(a=l[q],a!==void 0&&Br(e,t,q,a,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(a=l[h],a!=null&&De(e,t,h,a,l,null))}function Vx(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,i=null,u=null,h=null,b=null,_=null,q=null;for(D in l){var V=l[D];if(l.hasOwnProperty(D)&&V!=null)switch(D){case"checked":break;case"value":break;case"defaultValue":b=V;default:a.hasOwnProperty(D)||De(e,t,D,null,a,V)}}for(var M in a){var D=a[M];if(V=l[M],a.hasOwnProperty(M)&&(D!=null||V!=null))switch(M){case"type":i=D;break;case"name":s=D;break;case"checked":_=D;break;case"defaultChecked":q=D;break;case"value":u=D;break;case"defaultValue":h=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(137,t));break;default:D!==V&&De(e,t,M,D,a,V)}}Fi(e,u,h,b,_,q,i,s);return;case"select":D=u=h=M=null;for(i in l)if(b=l[i],l.hasOwnProperty(i)&&b!=null)switch(i){case"value":break;case"multiple":D=b;default:a.hasOwnProperty(i)||De(e,t,i,null,a,b)}for(s in a)if(i=a[s],b=l[s],a.hasOwnProperty(s)&&(i!=null||b!=null))switch(s){case"value":M=i;break;case"defaultValue":h=i;break;case"multiple":u=i;default:i!==b&&De(e,t,s,i,a,b)}t=h,l=u,a=D,M!=null?Na(e,!!l,M,!1):!!a!=!!l&&(t!=null?Na(e,!!l,t,!0):Na(e,!!l,l?[]:"",!1));return;case"textarea":D=M=null;for(h in l)if(s=l[h],l.hasOwnProperty(h)&&s!=null&&!a.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:De(e,t,h,null,a,s)}for(u in a)if(s=a[u],i=l[u],a.hasOwnProperty(u)&&(s!=null||i!=null))switch(u){case"value":M=s;break;case"defaultValue":D=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(r(91));break;default:s!==i&&De(e,t,u,s,a,i)}to(e,M,D);return;case"option":for(var te in l)if(M=l[te],l.hasOwnProperty(te)&&M!=null&&!a.hasOwnProperty(te))switch(te){case"selected":e.selected=!1;break;default:De(e,t,te,null,a,M)}for(b in a)if(M=a[b],D=l[b],a.hasOwnProperty(b)&&M!==D&&(M!=null||D!=null))switch(b){case"selected":e.selected=M&&typeof M!="function"&&typeof M!="symbol";break;default:De(e,t,b,M,a,D)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ce in l)M=l[ce],l.hasOwnProperty(ce)&&M!=null&&!a.hasOwnProperty(ce)&&De(e,t,ce,null,a,M);for(_ in a)if(M=a[_],D=l[_],a.hasOwnProperty(_)&&M!==D&&(M!=null||D!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,t));break;default:De(e,t,_,M,a,D)}return;default:if(Pi(t)){for(var Oe in l)M=l[Oe],l.hasOwnProperty(Oe)&&M!==void 0&&!a.hasOwnProperty(Oe)&&Br(e,t,Oe,void 0,a,M);for(q in a)M=a[q],D=l[q],!a.hasOwnProperty(q)||M===D||M===void 0&&D===void 0||Br(e,t,q,M,a,D);return}}for(var E in l)M=l[E],l.hasOwnProperty(E)&&M!=null&&!a.hasOwnProperty(E)&&De(e,t,E,null,a,M);for(V in a)M=a[V],D=l[V],!a.hasOwnProperty(V)||M===D||M==null&&D==null||De(e,t,V,M,a,D)}function cm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Zx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var s=l[a],i=s.transferSize,u=s.initiatorType,h=s.duration;if(i&&h&&cm(u)){for(u=0,h=s.responseEnd,a+=1;a<l.length;a++){var b=l[a],_=b.startTime;if(_>h)break;var q=b.transferSize,V=b.initiatorType;q&&cm(V)&&(b=b.responseEnd,u+=q*(b<h?1:(h-_)/(b-_)))}if(--a,t+=8*(i+u)/(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 Lr=null,qr=null;function fi(e){return e.nodeType===9?e:e.ownerDocument}function rm(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 um(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 Yr(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 Gr=null;function $x(){var e=window.event;return e&&e.type==="popstate"?e===Gr?!1:(Gr=e,!0):(Gr=null,!1)}var om=typeof setTimeout=="function"?setTimeout:void 0,Kx=typeof clearTimeout=="function"?clearTimeout:void 0,dm=typeof Promise=="function"?Promise:void 0,Jx=typeof queueMicrotask=="function"?queueMicrotask:typeof dm<"u"?function(e){return dm.resolve(null).then(e).catch(Fx)}:om;function Fx(e){setTimeout(function(){throw e})}function Hl(e){return e==="head"}function fm(e,t){var l=t,a=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(s),en(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")$n(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,$n(l);for(var i=l.firstChild;i;){var u=i.nextSibling,h=i.nodeName;i[dn]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=u}}else l==="body"&&$n(e.ownerDocument.body);l=s}while(l);en(t)}function mm(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function Qr(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Qr(l),Ki(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Wx(e,t,l,a){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[dn])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=Ut(e.nextSibling),e===null)break}return null}function Px(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Ut(e.nextSibling),e===null))return null;return e}function hm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ut(e.nextSibling),e===null))return null;return e}function Xr(e){return e.data==="$?"||e.data==="$~"}function Vr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ix(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Ut(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 Zr=null;function xm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Ut(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function pm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function gm(e,t,l){switch(t=fi(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function $n(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ki(e)}var Ht=new Map,vm=new Set;function mi(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ml=F.d;F.d={f:ep,r:tp,D:lp,C:ap,L:np,m:sp,X:cp,S:ip,M:rp};function ep(){var e=ml.f(),t=ni();return e||t}function tp(e){var t=ba(e);t!==null&&t.tag===5&&t.type==="form"?Od(t):ml.r(e)}var Wa=typeof document>"u"?null:document;function bm(e,t,l){var a=Wa;if(a&&typeof t=="string"&&t){var s=Rt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),vm.has(s)||(vm.add(s),e={rel:e,crossOrigin:l,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),st(t,"link",e),Ie(t),a.head.appendChild(t)))}}function lp(e){ml.D(e),bm("dns-prefetch",e,null)}function ap(e,t){ml.C(e,t),bm("preconnect",e,t)}function np(e,t,l){ml.L(e,t,l);var a=Wa;if(a&&e&&t){var s='link[rel="preload"][as="'+Rt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+Rt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+Rt(l.imageSizes)+'"]')):s+='[href="'+Rt(e)+'"]';var i=s;switch(t){case"style":i=Pa(e);break;case"script":i=Ia(e)}Ht.has(i)||(e=N({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Ht.set(i,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(Kn(i))||t==="script"&&a.querySelector(Jn(i))||(t=a.createElement("link"),st(t,"link",e),Ie(t),a.head.appendChild(t)))}}function sp(e,t){ml.m(e,t);var l=Wa;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Rt(a)+'"][href="'+Rt(e)+'"]',i=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ia(e)}if(!Ht.has(i)&&(e=N({rel:"modulepreload",href:e},t),Ht.set(i,e),l.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Jn(i)))return}a=l.createElement("link"),st(a,"link",e),Ie(a),l.head.appendChild(a)}}}function ip(e,t,l){ml.S(e,t,l);var a=Wa;if(a&&e){var s=ya(a).hoistableStyles,i=Pa(e);t=t||"default";var u=s.get(i);if(!u){var h={loading:0,preload:null};if(u=a.querySelector(Kn(i)))h.loading=5;else{e=N({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Ht.get(i))&&$r(e,l);var b=u=a.createElement("link");Ie(b),st(b,"link",e),b._p=new Promise(function(_,q){b.onload=_,b.onerror=q}),b.addEventListener("load",function(){h.loading|=1}),b.addEventListener("error",function(){h.loading|=2}),h.loading|=4,hi(u,t,a)}u={type:"stylesheet",instance:u,count:1,state:h},s.set(i,u)}}}function cp(e,t){ml.X(e,t);var l=Wa;if(l&&e){var a=ya(l).hoistableScripts,s=Ia(e),i=a.get(s);i||(i=l.querySelector(Jn(s)),i||(e=N({src:e,async:!0},t),(t=Ht.get(s))&&Kr(e,t),i=l.createElement("script"),Ie(i),st(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function rp(e,t){ml.M(e,t);var l=Wa;if(l&&e){var a=ya(l).hoistableScripts,s=Ia(e),i=a.get(s);i||(i=l.querySelector(Jn(s)),i||(e=N({src:e,async:!0,type:"module"},t),(t=Ht.get(s))&&Kr(e,t),i=l.createElement("script"),Ie(i),st(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function ym(e,t,l,a){var s=(s=he.current)?mi(s):null;if(!s)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Pa(l.href),l=ya(s).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Pa(l.href);var i=ya(s).hoistableStyles,u=i.get(e);if(u||(s=s.ownerDocument||s,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,u),(i=s.querySelector(Kn(e)))&&!i._p&&(u.instance=i,u.state.loading=5),Ht.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ht.set(e,l),i||up(s,e,l,u.state))),t&&a===null)throw Error(r(528,""));return u}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ia(l),l=ya(s).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Pa(e){return'href="'+Rt(e)+'"'}function Kn(e){return'link[rel="stylesheet"]['+e+"]"}function jm(e){return N({},e,{"data-precedence":e.precedence,precedence:null})}function up(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),st(t,"link",l),Ie(t),e.head.appendChild(t))}function Ia(e){return'[src="'+Rt(e)+'"]'}function Jn(e){return"script[async]"+e}function Nm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Rt(l.href)+'"]');if(a)return t.instance=a,Ie(a),a;var s=N({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ie(a),st(a,"style",s),hi(a,l.precedence,e),t.instance=a;case"stylesheet":s=Pa(l.href);var i=e.querySelector(Kn(s));if(i)return t.state.loading|=4,t.instance=i,Ie(i),i;a=jm(l),(s=Ht.get(s))&&$r(a,s),i=(e.ownerDocument||e).createElement("link"),Ie(i);var u=i;return u._p=new Promise(function(h,b){u.onload=h,u.onerror=b}),st(i,"link",a),t.state.loading|=4,hi(i,l.precedence,e),t.instance=i;case"script":return i=Ia(l.src),(s=e.querySelector(Jn(i)))?(t.instance=s,Ie(s),s):(a=l,(s=Ht.get(i))&&(a=N({},l),Kr(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),Ie(s),st(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,hi(a,l.precedence,e));return t.instance}function hi(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,i=s,u=0;u<a.length;u++){var h=a[u];if(h.dataset.precedence===t)i=h;else if(i!==s)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function $r(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Kr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var xi=null;function Sm(e,t,l){if(xi===null){var a=new Map,s=xi=new Map;s.set(l,a)}else s=xi,a=s.get(l),a||(a=new Map,s.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var i=l[s];if(!(i[dn]||i[tt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var u=i.getAttribute(t)||"";u=e+u;var h=a.get(u);h?h.push(i):a.set(u,[i])}}return a}function wm(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function op(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Cm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function dp(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=Pa(a.href),i=t.querySelector(Kn(s));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=pi.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,Ie(i);return}i=t.ownerDocument||t,a=jm(a),(s=Ht.get(s))&&$r(a,s),i=i.createElement("link"),Ie(i);var u=i;u._p=new Promise(function(h,b){u.onload=h,u.onerror=b}),st(i,"link",a),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=pi.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Jr=0;function fp(e,t){return e.stylesheets&&e.count===0&&vi(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&vi(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Jr===0&&(Jr=62500*Zx());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&vi(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Jr?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function pi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)vi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var gi=null;function vi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,gi=new Map,t.forEach(mp,e),gi=null,pi.call(e))}function mp(e,t){if(!(t.state.loading&4)){var l=gi.get(e);if(l)var a=l.get(null);else{l=new Map,gi.set(e,l);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<s.length;i++){var u=s[i];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(l.set(u.dataset.precedence,u),a=u)}a&&l.set(null,a)}s=t.instance,u=s.getAttribute("data-precedence"),i=l.get(u)||a,i===a&&l.set(null,s),l.set(u,s),this.count++,a=pi.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),i?i.parentNode.insertBefore(s,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Fn={$$typeof:H,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function hp(e,t,l,a,s,i,u,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=Xi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xi(0),this.hiddenUpdates=Xi(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=i,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function Em(e,t,l,a,s,i,u,h,b,_,q,V){return e=new hp(e,t,l,u,b,_,q,V,h),t=1,i===!0&&(t|=24),i=jt(3,null,null,t),e.current=i,i.stateNode=e,t=Ac(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},zc(i),e}function Tm(e){return e?(e=_a,e):_a}function Am(e,t,l,a,s,i){s=Tm(s),a.context===null?a.context=s:a.pendingContext=s,a=El(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=Tl(e,a,t),l!==null&&(pt(l,e,t),An(l,e,t))}function Rm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Fr(e,t){Rm(e,t),(e=e.alternate)&&Rm(e,t)}function _m(e){if(e.tag===13||e.tag===31){var t=Il(e,67108864);t!==null&&pt(t,e,67108864),Fr(e,67108864)}}function Mm(e){if(e.tag===13||e.tag===31){var t=Et();t=Vi(t);var l=Il(e,t);l!==null&&pt(l,e,t),Fr(e,t)}}var bi=!0;function xp(e,t,l,a){var s=k.T;k.T=null;var i=F.p;try{F.p=2,Wr(e,t,l,a)}finally{F.p=i,k.T=s}}function pp(e,t,l,a){var s=k.T;k.T=null;var i=F.p;try{F.p=8,Wr(e,t,l,a)}finally{F.p=i,k.T=s}}function Wr(e,t,l,a){if(bi){var s=Pr(a);if(s===null)Hr(e,t,a,yi,l),Dm(e,a);else if(vp(s,e,t,l,a))a.stopPropagation();else if(Dm(e,a),t&4&&-1<gp.indexOf(e)){for(;s!==null;){var i=ba(s);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var u=Kl(i.pendingLanes);if(u!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;u;){var b=1<<31-bt(u);h.entanglements[1]|=b,u&=~b}Kt(i),(Ee&6)===0&&(li=gt()+500,Xn(0))}}break;case 31:case 13:h=Il(i,2),h!==null&&pt(h,i,2),ni(),Fr(i,2)}if(i=Pr(a),i===null&&Hr(e,t,a,yi,l),i===s)break;s=i}s!==null&&a.stopPropagation()}else Hr(e,t,a,null,l)}}function Pr(e){return e=ec(e),Ir(e)}var yi=null;function Ir(e){if(yi=null,e=va(e),e!==null){var t=f(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=m(t),e!==null)return e;e=null}else if(l===31){if(e=v(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return yi=e,null}function zm(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(lh()){case Bu:return 2;case Lu:return 8;case us:case ah:return 32;case qu:return 268435456;default:return 32}default:return 32}}var eu=!1,Bl=null,Ll=null,ql=null,Wn=new Map,Pn=new Map,Yl=[],gp="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 Dm(e,t){switch(e){case"focusin":case"focusout":Bl=null;break;case"dragenter":case"dragleave":Ll=null;break;case"mouseover":case"mouseout":ql=null;break;case"pointerover":case"pointerout":Wn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pn.delete(t.pointerId)}}function In(e,t,l,a,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[s]},t!==null&&(t=ba(t),t!==null&&_m(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function vp(e,t,l,a,s){switch(t){case"focusin":return Bl=In(Bl,e,t,l,a,s),!0;case"dragenter":return Ll=In(Ll,e,t,l,a,s),!0;case"mouseover":return ql=In(ql,e,t,l,a,s),!0;case"pointerover":var i=s.pointerId;return Wn.set(i,In(Wn.get(i)||null,e,t,l,a,s)),!0;case"gotpointercapture":return i=s.pointerId,Pn.set(i,In(Pn.get(i)||null,e,t,l,a,s)),!0}return!1}function Om(e){var t=va(e.target);if(t!==null){var l=f(t);if(l!==null){if(t=l.tag,t===13){if(t=m(l),t!==null){e.blockedOn=t,Zu(e.priority,function(){Mm(l)});return}}else if(t===31){if(t=v(l),t!==null){e.blockedOn=t,Zu(e.priority,function(){Mm(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ji(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Pr(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);Ii=a,l.target.dispatchEvent(a),Ii=null}else return t=ba(l),t!==null&&_m(t),e.blockedOn=l,!1;t.shift()}return!0}function km(e,t,l){ji(e)&&l.delete(t)}function bp(){eu=!1,Bl!==null&&ji(Bl)&&(Bl=null),Ll!==null&&ji(Ll)&&(Ll=null),ql!==null&&ji(ql)&&(ql=null),Wn.forEach(km),Pn.forEach(km)}function Ni(e,t){e.blockedOn===t&&(e.blockedOn=null,eu||(eu=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,bp)))}var Si=null;function Um(e){Si!==e&&(Si=e,c.unstable_scheduleCallback(c.unstable_NormalPriority,function(){Si===e&&(Si=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if(Ir(a||l)===null)continue;break}var i=ba(l);i!==null&&(e.splice(t,3),t-=3,Pc(i,{pending:!0,data:s,method:l.method,action:a},a,s))}}))}function en(e){function t(b){return Ni(b,e)}Bl!==null&&Ni(Bl,e),Ll!==null&&Ni(Ll,e),ql!==null&&Ni(ql,e),Wn.forEach(t),Pn.forEach(t);for(var l=0;l<Yl.length;l++){var a=Yl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Yl.length&&(l=Yl[0],l.blockedOn===null);)Om(l),l.blockedOn===null&&Yl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var s=l[a],i=l[a+1],u=s[ot]||null;if(typeof i=="function")u||Um(l);else if(u){var h=null;if(i&&i.hasAttribute("formAction")){if(s=i,u=i[ot]||null)h=u.formAction;else if(Ir(s)!==null)continue}else h=u.action;typeof h=="function"?l[a+1]=h:(l.splice(a,3),a-=3),Um(l)}}}function Hm(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(u){return s=u})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),a||setTimeout(l,20)}function l(){if(!a&&!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 a=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function tu(e){this._internalRoot=e}wi.prototype.render=tu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=Et();Am(l,a,e,t,null,null)},wi.prototype.unmount=tu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Am(e.current,2,null,e,null,null),ni(),t[ga]=null}};function wi(e){this._internalRoot=e}wi.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vu();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Yl.length&&t!==0&&t<Yl[l].priority;l++);Yl.splice(l,0,e),l===0&&Om(e)}};var Bm=o.version;if(Bm!=="19.2.4")throw Error(r(527,Bm,"19.2.4"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var yp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ci=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ci.isDisabled&&Ci.supportsFiber)try{rn=Ci.inject(yp),vt=Ci}catch{}}return ts.createRoot=function(e,t){if(!x(e))throw Error(r(299));var l=!1,a="",s=Xd,i=Vd,u=Zd;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=Em(e,1,!1,null,null,l,a,null,s,i,u,Hm),e[ga]=t.current,Ur(e),new tu(t)},ts.hydrateRoot=function(e,t,l){if(!x(e))throw Error(r(299));var a=!1,s="",i=Xd,u=Vd,h=Zd,b=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(u=l.onCaughtError),l.onRecoverableError!==void 0&&(h=l.onRecoverableError),l.formState!==void 0&&(b=l.formState)),t=Em(e,1,!0,t,l??null,a,s,b,i,u,h,Hm),t.context=Tm(null),l=t.current,a=Et(),a=Vi(a),s=El(a),s.callback=null,Tl(l,s,a),l=a,t.current.lanes=l,on(t,l),Kt(t),e[ga]=t.current,Ur(e),new wi(t)},ts.version="19.2.4",ts}var Km;function _p(){if(Km)return nu.exports;Km=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(o){console.error(o)}}return c(),nu.exports=Rp(),nu.exports}var Mp=_p();const zp=p0(Mp);/**
|
|
50
|
-
* react-router v7.13.0
|
|
51
|
-
*
|
|
52
|
-
* Copyright (c) Remix Software Inc.
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the MIT license found in the
|
|
55
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
-
*
|
|
57
|
-
* @license MIT
|
|
58
|
-
*/var Jm="popstate";function Dp(c={}){function o(x,f){let{pathname:m="/",search:v="",hash:g=""}=pa(x.location.hash.substring(1));return!m.startsWith("/")&&!m.startsWith(".")&&(m="/"+m),hu("",{pathname:m,search:v,hash:g},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function d(x,f){let m=x.document.querySelector("base"),v="";if(m&&m.getAttribute("href")){let g=x.location.href,p=g.indexOf("#");v=p===-1?g:g.slice(0,p)}return v+"#"+(typeof f=="string"?f:ns(f))}function r(x,f){qt(x.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return kp(o,d,r,c)}function Ge(c,o){if(c===!1||c===null||typeof c>"u")throw new Error(o)}function qt(c,o){if(!c){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function Op(){return Math.random().toString(36).substring(2,10)}function Fm(c,o){return{usr:c.state,key:c.key,idx:o}}function hu(c,o,d=null,r){return{pathname:typeof c=="string"?c:c.pathname,search:"",hash:"",...typeof o=="string"?pa(o):o,state:d,key:o&&o.key||r||Op()}}function ns({pathname:c="/",search:o="",hash:d=""}){return o&&o!=="?"&&(c+=o.charAt(0)==="?"?o:"?"+o),d&&d!=="#"&&(c+=d.charAt(0)==="#"?d:"#"+d),c}function pa(c){let o={};if(c){let d=c.indexOf("#");d>=0&&(o.hash=c.substring(d),c=c.substring(0,d));let r=c.indexOf("?");r>=0&&(o.search=c.substring(r),c=c.substring(0,r)),c&&(o.pathname=c)}return o}function kp(c,o,d,r={}){let{window:x=document.defaultView,v5Compat:f=!1}=r,m=x.history,v="POP",g=null,p=j();p==null&&(p=0,m.replaceState({...m.state,idx:p},""));function j(){return(m.state||{idx:null}).idx}function N(){v="POP";let A=j(),G=A==null?null:A-p;p=A,g&&g({action:v,location:T.location,delta:G})}function z(A,G){v="PUSH";let B=hu(T.location,A,G);d&&d(B,A),p=j()+1;let H=Fm(B,p),K=T.createHref(B);try{m.pushState(H,"",K)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;x.location.assign(K)}f&&g&&g({action:v,location:T.location,delta:1})}function O(A,G){v="REPLACE";let B=hu(T.location,A,G);d&&d(B,A),p=j();let H=Fm(B,p),K=T.createHref(B);m.replaceState(H,"",K),f&&g&&g({action:v,location:T.location,delta:0})}function U(A){return Up(A)}let T={get action(){return v},get location(){return c(x,m)},listen(A){if(g)throw new Error("A history only accepts one active listener");return x.addEventListener(Jm,N),g=A,()=>{x.removeEventListener(Jm,N),g=null}},createHref(A){return o(x,A)},createURL:U,encodeLocation(A){let G=U(A);return{pathname:G.pathname,search:G.search,hash:G.hash}},push:z,replace:O,go(A){return m.go(A)}};return T}function Up(c,o=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),Ge(d,"No window.location.(origin|href) available to create URL");let r=typeof c=="string"?c:ns(c);return r=r.replace(/ $/,"%20"),!o&&r.startsWith("//")&&(r=d+r),new URL(r,d)}function g0(c,o,d="/"){return Hp(c,o,d,!1)}function Hp(c,o,d,r){let x=typeof o=="string"?pa(o):o,f=pl(x.pathname||"/",d);if(f==null)return null;let m=v0(c);Bp(m);let v=null;for(let g=0;v==null&&g<m.length;++g){let p=Jp(f);v=$p(m[g],p,r)}return v}function v0(c,o=[],d=[],r="",x=!1){let f=(m,v,g=x,p)=>{let j={relativePath:p===void 0?m.path||"":p,caseSensitive:m.caseSensitive===!0,childrenIndex:v,route:m};if(j.relativePath.startsWith("/")){if(!j.relativePath.startsWith(r)&&g)return;Ge(j.relativePath.startsWith(r),`Absolute route path "${j.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),j.relativePath=j.relativePath.slice(r.length)}let N=xl([r,j.relativePath]),z=d.concat(j);m.children&&m.children.length>0&&(Ge(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${N}".`),v0(m.children,o,z,N,g)),!(m.path==null&&!m.index)&&o.push({path:N,score:Vp(N,m.index),routesMeta:z})};return c.forEach((m,v)=>{var g;if(m.path===""||!((g=m.path)!=null&&g.includes("?")))f(m,v);else for(let p of b0(m.path))f(m,v,!0,p)}),o}function b0(c){let o=c.split("/");if(o.length===0)return[];let[d,...r]=o,x=d.endsWith("?"),f=d.replace(/\?$/,"");if(r.length===0)return x?[f,""]:[f];let m=b0(r.join("/")),v=[];return v.push(...m.map(g=>g===""?f:[f,g].join("/"))),x&&v.push(...m),v.map(g=>c.startsWith("/")&&g===""?"/":g)}function Bp(c){c.sort((o,d)=>o.score!==d.score?d.score-o.score:Zp(o.routesMeta.map(r=>r.childrenIndex),d.routesMeta.map(r=>r.childrenIndex)))}var Lp=/^:[\w-]+$/,qp=3,Yp=2,Gp=1,Qp=10,Xp=-2,Wm=c=>c==="*";function Vp(c,o){let d=c.split("/"),r=d.length;return d.some(Wm)&&(r+=Xp),o&&(r+=Yp),d.filter(x=>!Wm(x)).reduce((x,f)=>x+(Lp.test(f)?qp:f===""?Gp:Qp),r)}function Zp(c,o){return c.length===o.length&&c.slice(0,-1).every((r,x)=>r===o[x])?c[c.length-1]-o[o.length-1]:0}function $p(c,o,d=!1){let{routesMeta:r}=c,x={},f="/",m=[];for(let v=0;v<r.length;++v){let g=r[v],p=v===r.length-1,j=f==="/"?o:o.slice(f.length)||"/",N=Ri({path:g.relativePath,caseSensitive:g.caseSensitive,end:p},j),z=g.route;if(!N&&p&&d&&!r[r.length-1].route.index&&(N=Ri({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},j)),!N)return null;Object.assign(x,N.params),m.push({params:x,pathname:xl([f,N.pathname]),pathnameBase:Ip(xl([f,N.pathnameBase])),route:z}),N.pathnameBase!=="/"&&(f=xl([f,N.pathnameBase]))}return m}function Ri(c,o){typeof c=="string"&&(c={path:c,caseSensitive:!1,end:!0});let[d,r]=Kp(c.path,c.caseSensitive,c.end),x=o.match(d);if(!x)return null;let f=x[0],m=f.replace(/(.)\/+$/,"$1"),v=x.slice(1);return{params:r.reduce((p,{paramName:j,isOptional:N},z)=>{if(j==="*"){let U=v[z]||"";m=f.slice(0,f.length-U.length).replace(/(.)\/+$/,"$1")}const O=v[z];return N&&!O?p[j]=void 0:p[j]=(O||"").replace(/%2F/g,"/"),p},{}),pathname:f,pathnameBase:m,pattern:c}}function Kp(c,o=!1,d=!0){qt(c==="*"||!c.endsWith("*")||c.endsWith("/*"),`Route path "${c}" will be treated as if it were "${c.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${c.replace(/\*$/,"/*")}".`);let r=[],x="^"+c.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,v,g)=>(r.push({paramName:v,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return c.endsWith("*")?(r.push({paramName:"*"}),x+=c==="*"||c==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?x+="\\/*$":c!==""&&c!=="/"&&(x+="(?:(?=\\/|$))"),[new RegExp(x,o?void 0:"i"),r]}function Jp(c){try{return c.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return qt(!1,`The URL path "${c}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${o}).`),c}}function pl(c,o){if(o==="/")return c;if(!c.toLowerCase().startsWith(o.toLowerCase()))return null;let d=o.endsWith("/")?o.length-1:o.length,r=c.charAt(d);return r&&r!=="/"?null:c.slice(d)||"/"}var Fp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Wp(c,o="/"){let{pathname:d,search:r="",hash:x=""}=typeof c=="string"?pa(c):c,f;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?f=Pm(d.substring(1),"/"):f=Pm(d,o)):f=o,{pathname:f,search:eg(r),hash:tg(x)}}function Pm(c,o){let d=o.replace(/\/+$/,"").split("/");return c.split("/").forEach(x=>{x===".."?d.length>1&&d.pop():x!=="."&&d.push(x)}),d.length>1?d.join("/"):"/"}function ru(c,o,d,r){return`Cannot include a '${c}' character in a manually specified \`to.${o}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${d}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Pp(c){return c.filter((o,d)=>d===0||o.route.path&&o.route.path.length>0)}function ju(c){let o=Pp(c);return o.map((d,r)=>r===o.length-1?d.pathname:d.pathnameBase)}function Nu(c,o,d,r=!1){let x;typeof c=="string"?x=pa(c):(x={...c},Ge(!x.pathname||!x.pathname.includes("?"),ru("?","pathname","search",x)),Ge(!x.pathname||!x.pathname.includes("#"),ru("#","pathname","hash",x)),Ge(!x.search||!x.search.includes("#"),ru("#","search","hash",x)));let f=c===""||x.pathname==="",m=f?"/":x.pathname,v;if(m==null)v=d;else{let N=o.length-1;if(!r&&m.startsWith("..")){let z=m.split("/");for(;z[0]==="..";)z.shift(),N-=1;x.pathname=z.join("/")}v=N>=0?o[N]:"/"}let g=Wp(x,v),p=m&&m!=="/"&&m.endsWith("/"),j=(f||m===".")&&d.endsWith("/");return!g.pathname.endsWith("/")&&(p||j)&&(g.pathname+="/"),g}var xl=c=>c.join("/").replace(/\/\/+/g,"/"),Ip=c=>c.replace(/\/+$/,"").replace(/^\/*/,"/"),eg=c=>!c||c==="?"?"":c.startsWith("?")?c:"?"+c,tg=c=>!c||c==="#"?"":c.startsWith("#")?c:"#"+c,lg=class{constructor(c,o,d,r=!1){this.status=c,this.statusText=o||"",this.internal=r,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function ag(c){return c!=null&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.internal=="boolean"&&"data"in c}function ng(c){return c.map(o=>o.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var y0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function j0(c,o){let d=c;if(typeof d!="string"||!Fp.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let r=d,x=!1;if(y0)try{let f=new URL(window.location.href),m=d.startsWith("//")?new URL(f.protocol+d):new URL(d),v=pl(m.pathname,o);m.origin===f.origin&&v!=null?d=v+m.search+m.hash:x=!0}catch{qt(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:x,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var N0=["POST","PUT","PATCH","DELETE"];new Set(N0);var sg=["GET",...N0];new Set(sg);var nn=y.createContext(null);nn.displayName="DataRouter";var ki=y.createContext(null);ki.displayName="DataRouterState";var ig=y.createContext(!1),S0=y.createContext({isTransitioning:!1});S0.displayName="ViewTransition";var cg=y.createContext(new Map);cg.displayName="Fetchers";var rg=y.createContext(null);rg.displayName="Await";var Tt=y.createContext(null);Tt.displayName="Navigation";var ss=y.createContext(null);ss.displayName="Location";var Jt=y.createContext({outlet:null,matches:[],isDataRoute:!1});Jt.displayName="Route";var Su=y.createContext(null);Su.displayName="RouteError";var w0="REACT_ROUTER_ERROR",ug="REDIRECT",og="ROUTE_ERROR_RESPONSE";function dg(c){if(c.startsWith(`${w0}:${ug}:{`))try{let o=JSON.parse(c.slice(28));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string"&&typeof o.location=="string"&&typeof o.reloadDocument=="boolean"&&typeof o.replace=="boolean")return o}catch{}}function fg(c){if(c.startsWith(`${w0}:${og}:{`))try{let o=JSON.parse(c.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new lg(o.status,o.statusText,o.data)}catch{}}function mg(c,{relative:o}={}){Ge(sn(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:r}=y.useContext(Tt),{hash:x,pathname:f,search:m}=is(c,{relative:o}),v=f;return d!=="/"&&(v=f==="/"?d:xl([d,f])),r.createHref({pathname:v,search:m,hash:x})}function sn(){return y.useContext(ss)!=null}function Zl(){return Ge(sn(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(ss).location}var C0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function E0(c){y.useContext(Tt).static||y.useLayoutEffect(c)}function wu(){let{isDataRoute:c}=y.useContext(Jt);return c?Eg():hg()}function hg(){Ge(sn(),"useNavigate() may be used only in the context of a <Router> component.");let c=y.useContext(nn),{basename:o,navigator:d}=y.useContext(Tt),{matches:r}=y.useContext(Jt),{pathname:x}=Zl(),f=JSON.stringify(ju(r)),m=y.useRef(!1);return E0(()=>{m.current=!0}),y.useCallback((g,p={})=>{if(qt(m.current,C0),!m.current)return;if(typeof g=="number"){d.go(g);return}let j=Nu(g,JSON.parse(f),x,p.relative==="path");c==null&&o!=="/"&&(j.pathname=j.pathname==="/"?o:xl([o,j.pathname])),(p.replace?d.replace:d.push)(j,p.state,p)},[o,d,f,x,c])}y.createContext(null);function is(c,{relative:o}={}){let{matches:d}=y.useContext(Jt),{pathname:r}=Zl(),x=JSON.stringify(ju(d));return y.useMemo(()=>Nu(c,JSON.parse(x),r,o==="path"),[c,x,r,o])}function xg(c,o){return T0(c,o)}function T0(c,o,d,r,x){var B;Ge(sn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=y.useContext(Tt),{matches:m}=y.useContext(Jt),v=m[m.length-1],g=v?v.params:{},p=v?v.pathname:"/",j=v?v.pathnameBase:"/",N=v&&v.route;{let H=N&&N.path||"";R0(p,!N||H.endsWith("*")||H.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${H}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
-
|
|
60
|
-
Please change the parent <Route path="${H}"> to <Route path="${H==="/"?"*":`${H}/*`}">.`)}let z=Zl(),O;if(o){let H=typeof o=="string"?pa(o):o;Ge(j==="/"||((B=H.pathname)==null?void 0:B.startsWith(j)),`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 "${j}" but pathname "${H.pathname}" was given in the \`location\` prop.`),O=H}else O=z;let U=O.pathname||"/",T=U;if(j!=="/"){let H=j.replace(/^\//,"").split("/");T="/"+U.replace(/^\//,"").split("/").slice(H.length).join("/")}let A=g0(c,{pathname:T});qt(N||A!=null,`No routes matched location "${O.pathname}${O.search}${O.hash}" `),qt(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${O.pathname}${O.search}${O.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=yg(A&&A.map(H=>Object.assign({},H,{params:Object.assign({},g,H.params),pathname:xl([j,f.encodeLocation?f.encodeLocation(H.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:H.pathname]),pathnameBase:H.pathnameBase==="/"?j:xl([j,f.encodeLocation?f.encodeLocation(H.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:H.pathnameBase])})),m,d,r,x);return o&&G?y.createElement(ss.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...O},navigationType:"POP"}},G):G}function pg(){let c=Cg(),o=ag(c)?`${c.status} ${c.statusText}`:c instanceof Error?c.message:JSON.stringify(c),d=c instanceof Error?c.stack:null,r="rgba(200,200,200, 0.5)",x={padding:"0.5rem",backgroundColor:r},f={padding:"2px 4px",backgroundColor:r},m=null;return console.error("Error handled by React Router default ErrorBoundary:",c),m=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:f},"ErrorBoundary")," or"," ",y.createElement("code",{style:f},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},o),d?y.createElement("pre",{style:x},d):null,m)}var gg=y.createElement(pg,null),A0=class extends y.Component{constructor(c){super(c),this.state={location:c.location,revalidation:c.revalidation,error:c.error}}static getDerivedStateFromError(c){return{error:c}}static getDerivedStateFromProps(c,o){return o.location!==c.location||o.revalidation!=="idle"&&c.revalidation==="idle"?{error:c.error,location:c.location,revalidation:c.revalidation}:{error:c.error!==void 0?c.error:o.error,location:o.location,revalidation:c.revalidation||o.revalidation}}componentDidCatch(c,o){this.props.onError?this.props.onError(c,o):console.error("React Router caught the following error during render",c)}render(){let c=this.state.error;if(this.context&&typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){const d=fg(c.digest);d&&(c=d)}let o=c!==void 0?y.createElement(Jt.Provider,{value:this.props.routeContext},y.createElement(Su.Provider,{value:c,children:this.props.component})):this.props.children;return this.context?y.createElement(vg,{error:c},o):o}};A0.contextType=ig;var uu=new WeakMap;function vg({children:c,error:o}){let{basename:d}=y.useContext(Tt);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let r=dg(o.digest);if(r){let x=uu.get(o);if(x)throw x;let f=j0(r.location,d);if(y0&&!uu.get(o))if(f.isExternal||r.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const m=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:r.replace}));throw uu.set(o,m),m}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return c}function bg({routeContext:c,match:o,children:d}){let r=y.useContext(nn);return r&&r.static&&r.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=o.route.id),y.createElement(Jt.Provider,{value:c},d)}function yg(c,o=[],d=null,r=null,x=null){if(c==null){if(!d)return null;if(d.errors)c=d.matches;else if(o.length===0&&!d.initialized&&d.matches.length>0)c=d.matches;else return null}let f=c,m=d==null?void 0:d.errors;if(m!=null){let j=f.findIndex(N=>N.route.id&&(m==null?void 0:m[N.route.id])!==void 0);Ge(j>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),f=f.slice(0,Math.min(f.length,j+1))}let v=!1,g=-1;if(d)for(let j=0;j<f.length;j++){let N=f[j];if((N.route.HydrateFallback||N.route.hydrateFallbackElement)&&(g=j),N.route.id){let{loaderData:z,errors:O}=d,U=N.route.loader&&!z.hasOwnProperty(N.route.id)&&(!O||O[N.route.id]===void 0);if(N.route.lazy||U){v=!0,g>=0?f=f.slice(0,g+1):f=[f[0]];break}}}let p=d&&r?(j,N)=>{var z,O;r(j,{location:d.location,params:((O=(z=d.matches)==null?void 0:z[0])==null?void 0:O.params)??{},unstable_pattern:ng(d.matches),errorInfo:N})}:void 0;return f.reduceRight((j,N,z)=>{let O,U=!1,T=null,A=null;d&&(O=m&&N.route.id?m[N.route.id]:void 0,T=N.route.errorElement||gg,v&&(g<0&&z===0?(R0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),U=!0,A=null):g===z&&(U=!0,A=N.route.hydrateFallbackElement||null)));let G=o.concat(f.slice(0,z+1)),B=()=>{let H;return O?H=T:U?H=A:N.route.Component?H=y.createElement(N.route.Component,null):N.route.element?H=N.route.element:H=j,y.createElement(bg,{match:N,routeContext:{outlet:j,matches:G,isDataRoute:d!=null},children:H})};return d&&(N.route.ErrorBoundary||N.route.errorElement||z===0)?y.createElement(A0,{location:d.location,revalidation:d.revalidation,component:T,error:O,children:B(),routeContext:{outlet:null,matches:G,isDataRoute:!0},onError:p}):B()},null)}function Cu(c){return`${c} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jg(c){let o=y.useContext(nn);return Ge(o,Cu(c)),o}function Ng(c){let o=y.useContext(ki);return Ge(o,Cu(c)),o}function Sg(c){let o=y.useContext(Jt);return Ge(o,Cu(c)),o}function Eu(c){let o=Sg(c),d=o.matches[o.matches.length-1];return Ge(d.route.id,`${c} can only be used on routes that contain a unique "id"`),d.route.id}function wg(){return Eu("useRouteId")}function Cg(){var r;let c=y.useContext(Su),o=Ng("useRouteError"),d=Eu("useRouteError");return c!==void 0?c:(r=o.errors)==null?void 0:r[d]}function Eg(){let{router:c}=jg("useNavigate"),o=Eu("useNavigate"),d=y.useRef(!1);return E0(()=>{d.current=!0}),y.useCallback(async(x,f={})=>{qt(d.current,C0),d.current&&(typeof x=="number"?await c.navigate(x):await c.navigate(x,{fromRouteId:o,...f}))},[c,o])}var Im={};function R0(c,o,d){!o&&!Im[c]&&(Im[c]=!0,qt(!1,d))}y.memo(Tg);function Tg({routes:c,future:o,state:d,onError:r}){return T0(c,void 0,d,r,o)}function Ag({to:c,replace:o,state:d,relative:r}){Ge(sn(),"<Navigate> may be used only in the context of a <Router> component.");let{static:x}=y.useContext(Tt);qt(!x,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=y.useContext(Jt),{pathname:m}=Zl(),v=wu(),g=Nu(c,ju(f),m,r==="path"),p=JSON.stringify(g);return y.useEffect(()=>{v(JSON.parse(p),{replace:o,state:d,relative:r})},[v,p,r,o,d]),null}function Lt(c){Ge(!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 Rg({basename:c="/",children:o=null,location:d,navigationType:r="POP",navigator:x,static:f=!1,unstable_useTransitions:m}){Ge(!sn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let v=c.replace(/^\/*/,"/"),g=y.useMemo(()=>({basename:v,navigator:x,static:f,unstable_useTransitions:m,future:{}}),[v,x,f,m]);typeof d=="string"&&(d=pa(d));let{pathname:p="/",search:j="",hash:N="",state:z=null,key:O="default"}=d,U=y.useMemo(()=>{let T=pl(p,v);return T==null?null:{location:{pathname:T,search:j,hash:N,state:z,key:O},navigationType:r}},[v,p,j,N,z,O,r]);return qt(U!=null,`<Router basename="${v}"> is not able to match the URL "${p}${j}${N}" because it does not start with the basename, so the <Router> won't render anything.`),U==null?null:y.createElement(Tt.Provider,{value:g},y.createElement(ss.Provider,{children:o,value:U}))}function _g({children:c,location:o}){return xg(xu(c),o)}function xu(c,o=[]){let d=[];return y.Children.forEach(c,(r,x)=>{if(!y.isValidElement(r))return;let f=[...o,x];if(r.type===y.Fragment){d.push.apply(d,xu(r.props.children,f));return}Ge(r.type===Lt,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ge(!r.props.index||!r.props.children,"An index route cannot have child routes.");let m={id:r.props.id||f.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(m.children=xu(r.props.children,f)),d.push(m)}),d}var Ti="get",Ai="application/x-www-form-urlencoded";function Ui(c){return typeof HTMLElement<"u"&&c instanceof HTMLElement}function Mg(c){return Ui(c)&&c.tagName.toLowerCase()==="button"}function zg(c){return Ui(c)&&c.tagName.toLowerCase()==="form"}function Dg(c){return Ui(c)&&c.tagName.toLowerCase()==="input"}function Og(c){return!!(c.metaKey||c.altKey||c.ctrlKey||c.shiftKey)}function kg(c,o){return c.button===0&&(!o||o==="_self")&&!Og(c)}var Ei=null;function Ug(){if(Ei===null)try{new FormData(document.createElement("form"),0),Ei=!1}catch{Ei=!0}return Ei}var Hg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ou(c){return c!=null&&!Hg.has(c)?(qt(!1,`"${c}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ai}"`),null):c}function Bg(c,o){let d,r,x,f,m;if(zg(c)){let v=c.getAttribute("action");r=v?pl(v,o):null,d=c.getAttribute("method")||Ti,x=ou(c.getAttribute("enctype"))||Ai,f=new FormData(c)}else if(Mg(c)||Dg(c)&&(c.type==="submit"||c.type==="image")){let v=c.form;if(v==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=c.getAttribute("formaction")||v.getAttribute("action");if(r=g?pl(g,o):null,d=c.getAttribute("formmethod")||v.getAttribute("method")||Ti,x=ou(c.getAttribute("formenctype"))||ou(v.getAttribute("enctype"))||Ai,f=new FormData(v,c),!Ug()){let{name:p,type:j,value:N}=c;if(j==="image"){let z=p?`${p}.`:"";f.append(`${z}x`,"0"),f.append(`${z}y`,"0")}else p&&f.append(p,N)}}else{if(Ui(c))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Ti,r=null,x=Ai,m=c}return f&&x==="text/plain"&&(m=f,f=void 0),{action:r,method:d.toLowerCase(),encType:x,formData:f,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Tu(c,o){if(c===!1||c===null||typeof c>"u")throw new Error(o)}function Lg(c,o,d,r){let x=typeof c=="string"?new URL(c,typeof window>"u"?"server://singlefetch/":window.location.origin):c;return d?x.pathname.endsWith("/")?x.pathname=`${x.pathname}_.${r}`:x.pathname=`${x.pathname}.${r}`:x.pathname==="/"?x.pathname=`_root.${r}`:o&&pl(x.pathname,o)==="/"?x.pathname=`${o.replace(/\/$/,"")}/_root.${r}`:x.pathname=`${x.pathname.replace(/\/$/,"")}.${r}`,x}async function qg(c,o){if(c.id in o)return o[c.id];try{let d=await import(c.module);return o[c.id]=d,d}catch(d){return console.error(`Error loading route module \`${c.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Yg(c){return c==null?!1:c.href==null?c.rel==="preload"&&typeof c.imageSrcSet=="string"&&typeof c.imageSizes=="string":typeof c.rel=="string"&&typeof c.href=="string"}async function Gg(c,o,d){let r=await Promise.all(c.map(async x=>{let f=o.routes[x.route.id];if(f){let m=await qg(f,d);return m.links?m.links():[]}return[]}));return Zg(r.flat(1).filter(Yg).filter(x=>x.rel==="stylesheet"||x.rel==="preload").map(x=>x.rel==="stylesheet"?{...x,rel:"prefetch",as:"style"}:{...x,rel:"prefetch"}))}function e0(c,o,d,r,x,f){let m=(g,p)=>d[p]?g.route.id!==d[p].route.id:!0,v=(g,p)=>{var j;return d[p].pathname!==g.pathname||((j=d[p].route.path)==null?void 0:j.endsWith("*"))&&d[p].params["*"]!==g.params["*"]};return f==="assets"?o.filter((g,p)=>m(g,p)||v(g,p)):f==="data"?o.filter((g,p)=>{var N;let j=r.routes[g.route.id];if(!j||!j.hasLoader)return!1;if(m(g,p)||v(g,p))return!0;if(g.route.shouldRevalidate){let z=g.route.shouldRevalidate({currentUrl:new URL(x.pathname+x.search+x.hash,window.origin),currentParams:((N=d[0])==null?void 0:N.params)||{},nextUrl:new URL(c,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof z=="boolean")return z}return!0}):[]}function Qg(c,o,{includeHydrateFallback:d}={}){return Xg(c.map(r=>{let x=o.routes[r.route.id];if(!x)return[];let f=[x.module];return x.clientActionModule&&(f=f.concat(x.clientActionModule)),x.clientLoaderModule&&(f=f.concat(x.clientLoaderModule)),d&&x.hydrateFallbackModule&&(f=f.concat(x.hydrateFallbackModule)),x.imports&&(f=f.concat(x.imports)),f}).flat(1))}function Xg(c){return[...new Set(c)]}function Vg(c){let o={},d=Object.keys(c).sort();for(let r of d)o[r]=c[r];return o}function Zg(c,o){let d=new Set;return new Set(o),c.reduce((r,x)=>{let f=JSON.stringify(Vg(x));return d.has(f)||(d.add(f),r.push({key:f,link:x})),r},[])}function _0(){let c=y.useContext(nn);return Tu(c,"You must render this element inside a <DataRouterContext.Provider> element"),c}function $g(){let c=y.useContext(ki);return Tu(c,"You must render this element inside a <DataRouterStateContext.Provider> element"),c}var Au=y.createContext(void 0);Au.displayName="FrameworkContext";function M0(){let c=y.useContext(Au);return Tu(c,"You must render this element inside a <HydratedRouter> element"),c}function Kg(c,o){let d=y.useContext(Au),[r,x]=y.useState(!1),[f,m]=y.useState(!1),{onFocus:v,onBlur:g,onMouseEnter:p,onMouseLeave:j,onTouchStart:N}=o,z=y.useRef(null);y.useEffect(()=>{if(c==="render"&&m(!0),c==="viewport"){let T=G=>{G.forEach(B=>{m(B.isIntersecting)})},A=new IntersectionObserver(T,{threshold:.5});return z.current&&A.observe(z.current),()=>{A.disconnect()}}},[c]),y.useEffect(()=>{if(r){let T=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(T)}}},[r]);let O=()=>{x(!0)},U=()=>{x(!1),m(!1)};return d?c!=="intent"?[f,z,{}]:[f,z,{onFocus:ls(v,O),onBlur:ls(g,U),onMouseEnter:ls(p,O),onMouseLeave:ls(j,U),onTouchStart:ls(N,O)}]:[!1,z,{}]}function ls(c,o){return d=>{c&&c(d),d.defaultPrevented||o(d)}}function Jg({page:c,...o}){let{router:d}=_0(),r=y.useMemo(()=>g0(d.routes,c,d.basename),[d.routes,c,d.basename]);return r?y.createElement(Wg,{page:c,matches:r,...o}):null}function Fg(c){let{manifest:o,routeModules:d}=M0(),[r,x]=y.useState([]);return y.useEffect(()=>{let f=!1;return Gg(c,o,d).then(m=>{f||x(m)}),()=>{f=!0}},[c,o,d]),r}function Wg({page:c,matches:o,...d}){let r=Zl(),{future:x,manifest:f,routeModules:m}=M0(),{basename:v}=_0(),{loaderData:g,matches:p}=$g(),j=y.useMemo(()=>e0(c,o,p,f,r,"data"),[c,o,p,f,r]),N=y.useMemo(()=>e0(c,o,p,f,r,"assets"),[c,o,p,f,r]),z=y.useMemo(()=>{if(c===r.pathname+r.search+r.hash)return[];let T=new Set,A=!1;if(o.forEach(B=>{var K;let H=f.routes[B.route.id];!H||!H.hasLoader||(!j.some(L=>L.route.id===B.route.id)&&B.route.id in g&&((K=m[B.route.id])!=null&&K.shouldRevalidate)||H.hasClientLoader?A=!0:T.add(B.route.id))}),T.size===0)return[];let G=Lg(c,v,x.unstable_trailingSlashAwareDataRequests,"data");return A&&T.size>0&&G.searchParams.set("_routes",o.filter(B=>T.has(B.route.id)).map(B=>B.route.id).join(",")),[G.pathname+G.search]},[v,x.unstable_trailingSlashAwareDataRequests,g,r,f,j,o,c,m]),O=y.useMemo(()=>Qg(N,f),[N,f]),U=Fg(N);return y.createElement(y.Fragment,null,z.map(T=>y.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...d})),O.map(T=>y.createElement("link",{key:T,rel:"modulepreload",href:T,...d})),U.map(({key:T,link:A})=>y.createElement("link",{key:T,nonce:d.nonce,...A,crossOrigin:A.crossOrigin??d.crossOrigin})))}function Pg(...c){return o=>{c.forEach(d=>{typeof d=="function"?d(o):d!=null&&(d.current=o)})}}var Ig=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ig&&(window.__reactRouterVersion="7.13.0")}catch{}function ev({basename:c,children:o,unstable_useTransitions:d,window:r}){let x=y.useRef();x.current==null&&(x.current=Dp({window:r,v5Compat:!0}));let f=x.current,[m,v]=y.useState({action:f.action,location:f.location}),g=y.useCallback(p=>{d===!1?v(p):y.startTransition(()=>v(p))},[d]);return y.useLayoutEffect(()=>f.listen(g),[f,g]),y.createElement(Rg,{basename:c,children:o,location:m.location,navigationType:m.action,navigator:f,unstable_useTransitions:d})}var z0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,D0=y.forwardRef(function({onClick:o,discover:d="render",prefetch:r="none",relative:x,reloadDocument:f,replace:m,state:v,target:g,to:p,preventScrollReset:j,viewTransition:N,unstable_defaultShouldRevalidate:z,...O},U){let{basename:T,unstable_useTransitions:A}=y.useContext(Tt),G=typeof p=="string"&&z0.test(p),B=j0(p,T);p=B.to;let H=mg(p,{relative:x}),[K,L,C]=Kg(r,O),Y=av(p,{replace:m,state:v,target:g,preventScrollReset:j,relative:x,viewTransition:N,unstable_defaultShouldRevalidate:z,unstable_useTransitions:A});function P(Z){o&&o(Z),Z.defaultPrevented||Y(Z)}let I=y.createElement("a",{...O,...C,href:B.absoluteURL||H,onClick:B.isExternal||f?o:P,ref:Pg(U,L),target:g,"data-discover":!G&&d==="render"?"true":void 0});return K&&!G?y.createElement(y.Fragment,null,I,y.createElement(Jg,{page:H})):I});D0.displayName="Link";var O0=y.forwardRef(function({"aria-current":o="page",caseSensitive:d=!1,className:r="",end:x=!1,style:f,to:m,viewTransition:v,children:g,...p},j){let N=is(m,{relative:p.relative}),z=Zl(),O=y.useContext(ki),{navigator:U,basename:T}=y.useContext(Tt),A=O!=null&&rv(N)&&v===!0,G=U.encodeLocation?U.encodeLocation(N).pathname:N.pathname,B=z.pathname,H=O&&O.navigation&&O.navigation.location?O.navigation.location.pathname:null;d||(B=B.toLowerCase(),H=H?H.toLowerCase():null,G=G.toLowerCase()),H&&T&&(H=pl(H,T)||H);const K=G!=="/"&&G.endsWith("/")?G.length-1:G.length;let L=B===G||!x&&B.startsWith(G)&&B.charAt(K)==="/",C=H!=null&&(H===G||!x&&H.startsWith(G)&&H.charAt(G.length)==="/"),Y={isActive:L,isPending:C,isTransitioning:A},P=L?o:void 0,I;typeof r=="function"?I=r(Y):I=[r,L?"active":null,C?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let Z=typeof f=="function"?f(Y):f;return y.createElement(D0,{...p,"aria-current":P,className:I,ref:j,style:Z,to:m,viewTransition:v},typeof g=="function"?g(Y):g)});O0.displayName="NavLink";var tv=y.forwardRef(({discover:c="render",fetcherKey:o,navigate:d,reloadDocument:r,replace:x,state:f,method:m=Ti,action:v,onSubmit:g,relative:p,preventScrollReset:j,viewTransition:N,unstable_defaultShouldRevalidate:z,...O},U)=>{let{unstable_useTransitions:T}=y.useContext(Tt),A=iv(),G=cv(v,{relative:p}),B=m.toLowerCase()==="get"?"get":"post",H=typeof v=="string"&&z0.test(v),K=L=>{if(g&&g(L),L.defaultPrevented)return;L.preventDefault();let C=L.nativeEvent.submitter,Y=(C==null?void 0:C.getAttribute("formmethod"))||m,P=()=>A(C||L.currentTarget,{fetcherKey:o,method:Y,navigate:d,replace:x,state:f,relative:p,preventScrollReset:j,viewTransition:N,unstable_defaultShouldRevalidate:z});T&&d!==!1?y.startTransition(()=>P()):P()};return y.createElement("form",{ref:U,method:B,action:G,onSubmit:r?g:K,...O,"data-discover":!H&&c==="render"?"true":void 0})});tv.displayName="Form";function lv(c){return`${c} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function k0(c){let o=y.useContext(nn);return Ge(o,lv(c)),o}function av(c,{target:o,replace:d,state:r,preventScrollReset:x,relative:f,viewTransition:m,unstable_defaultShouldRevalidate:v,unstable_useTransitions:g}={}){let p=wu(),j=Zl(),N=is(c,{relative:f});return y.useCallback(z=>{if(kg(z,o)){z.preventDefault();let O=d!==void 0?d:ns(j)===ns(N),U=()=>p(c,{replace:O,state:r,preventScrollReset:x,relative:f,viewTransition:m,unstable_defaultShouldRevalidate:v});g?y.startTransition(()=>U()):U()}},[j,p,N,d,r,o,c,x,f,m,v,g])}var nv=0,sv=()=>`__${String(++nv)}__`;function iv(){let{router:c}=k0("useSubmit"),{basename:o}=y.useContext(Tt),d=wg(),r=c.fetch,x=c.navigate;return y.useCallback(async(f,m={})=>{let{action:v,method:g,encType:p,formData:j,body:N}=Bg(f,o);if(m.navigate===!1){let z=m.fetcherKey||sv();await r(z,d,m.action||v,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:j,body:N,formMethod:m.method||g,formEncType:m.encType||p,flushSync:m.flushSync})}else await x(m.action||v,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:j,body:N,formMethod:m.method||g,formEncType:m.encType||p,replace:m.replace,state:m.state,fromRouteId:d,flushSync:m.flushSync,viewTransition:m.viewTransition})},[r,x,o,d])}function cv(c,{relative:o}={}){let{basename:d}=y.useContext(Tt),r=y.useContext(Jt);Ge(r,"useFormAction must be used inside a RouteContext");let[x]=r.matches.slice(-1),f={...is(c||".",{relative:o})},m=Zl();if(c==null){f.search=m.search;let v=new URLSearchParams(f.search),g=v.getAll("index");if(g.some(j=>j==="")){v.delete("index"),g.filter(N=>N).forEach(N=>v.append("index",N));let j=v.toString();f.search=j?`?${j}`:""}}return(!c||c===".")&&x.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(f.pathname=f.pathname==="/"?d:xl([d,f.pathname])),ns(f)}function rv(c,{relative:o}={}){let d=y.useContext(S0);Ge(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=k0("useViewTransitionState"),x=is(c,{relative:o});if(!d.isTransitioning)return!1;let f=pl(d.currentLocation.pathname,r)||d.currentLocation.pathname,m=pl(d.nextLocation.pathname,r)||d.nextLocation.pathname;return Ri(x.pathname,m)!=null||Ri(x.pathname,f)!=null}/**
|
|
61
|
-
* @license lucide-react v0.564.0 - ISC
|
|
62
|
-
*
|
|
63
|
-
* This source code is licensed under the ISC license.
|
|
64
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/const U0=(...c)=>c.filter((o,d,r)=>!!o&&o.trim()!==""&&r.indexOf(o)===d).join(" ").trim();/**
|
|
66
|
-
* @license lucide-react v0.564.0 - ISC
|
|
67
|
-
*
|
|
68
|
-
* This source code is licensed under the ISC license.
|
|
69
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/const uv=c=>c.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
71
|
-
* @license lucide-react v0.564.0 - ISC
|
|
72
|
-
*
|
|
73
|
-
* This source code is licensed under the ISC license.
|
|
74
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const ov=c=>c.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,d,r)=>r?r.toUpperCase():d.toLowerCase());/**
|
|
76
|
-
* @license lucide-react v0.564.0 - ISC
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the ISC license.
|
|
79
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const t0=c=>{const o=ov(c);return o.charAt(0).toUpperCase()+o.slice(1)};/**
|
|
81
|
-
* @license lucide-react v0.564.0 - ISC
|
|
82
|
-
*
|
|
83
|
-
* This source code is licensed under the ISC license.
|
|
84
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/var dv={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
86
|
-
* @license lucide-react v0.564.0 - ISC
|
|
87
|
-
*
|
|
88
|
-
* This source code is licensed under the ISC license.
|
|
89
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const fv=c=>{for(const o in c)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1};/**
|
|
91
|
-
* @license lucide-react v0.564.0 - ISC
|
|
92
|
-
*
|
|
93
|
-
* This source code is licensed under the ISC license.
|
|
94
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const mv=y.forwardRef(({color:c="currentColor",size:o=24,strokeWidth:d=2,absoluteStrokeWidth:r,className:x="",children:f,iconNode:m,...v},g)=>y.createElement("svg",{ref:g,...dv,width:o,height:o,stroke:c,strokeWidth:r?Number(d)*24/Number(o):d,className:U0("lucide",x),...!f&&!fv(v)&&{"aria-hidden":"true"},...v},[...m.map(([p,j])=>y.createElement(p,j)),...Array.isArray(f)?f:[f]]));/**
|
|
96
|
-
* @license lucide-react v0.564.0 - ISC
|
|
97
|
-
*
|
|
98
|
-
* This source code is licensed under the ISC license.
|
|
99
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const ie=(c,o)=>{const d=y.forwardRef(({className:r,...x},f)=>y.createElement(mv,{ref:f,iconNode:o,className:U0(`lucide-${uv(t0(c))}`,`lucide-${c}`,r),...x}));return d.displayName=t0(c),d};/**
|
|
101
|
-
* @license lucide-react v0.564.0 - ISC
|
|
102
|
-
*
|
|
103
|
-
* This source code is licensed under the ISC license.
|
|
104
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const hv=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],H0=ie("activity",hv);/**
|
|
106
|
-
* @license lucide-react v0.564.0 - ISC
|
|
107
|
-
*
|
|
108
|
-
* This source code is licensed under the ISC license.
|
|
109
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const xv=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],B0=ie("arrow-down",xv);/**
|
|
111
|
-
* @license lucide-react v0.564.0 - ISC
|
|
112
|
-
*
|
|
113
|
-
* This source code is licensed under the ISC license.
|
|
114
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const pv=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],l0=ie("arrow-right",pv);/**
|
|
116
|
-
* @license lucide-react v0.564.0 - ISC
|
|
117
|
-
*
|
|
118
|
-
* This source code is licensed under the ISC license.
|
|
119
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/const gv=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],L0=ie("arrow-up-down",gv);/**
|
|
121
|
-
* @license lucide-react v0.564.0 - ISC
|
|
122
|
-
*
|
|
123
|
-
* This source code is licensed under the ISC license.
|
|
124
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/const vv=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],q0=ie("arrow-up",vv);/**
|
|
126
|
-
* @license lucide-react v0.564.0 - ISC
|
|
127
|
-
*
|
|
128
|
-
* This source code is licensed under the ISC license.
|
|
129
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/const bv=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],yv=ie("bell",bv);/**
|
|
131
|
-
* @license lucide-react v0.564.0 - ISC
|
|
132
|
-
*
|
|
133
|
-
* This source code is licensed under the ISC license.
|
|
134
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const jv=[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]],Nv=ie("blocks",jv);/**
|
|
136
|
-
* @license lucide-react v0.564.0 - ISC
|
|
137
|
-
*
|
|
138
|
-
* This source code is licensed under the ISC license.
|
|
139
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
-
*/const Sv=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],wv=ie("bot",Sv);/**
|
|
141
|
-
* @license lucide-react v0.564.0 - ISC
|
|
142
|
-
*
|
|
143
|
-
* This source code is licensed under the ISC license.
|
|
144
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/const Cv=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],a0=ie("briefcase",Cv);/**
|
|
146
|
-
* @license lucide-react v0.564.0 - ISC
|
|
147
|
-
*
|
|
148
|
-
* This source code is licensed under the ISC license.
|
|
149
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
-
*/const Ev=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],_i=ie("calendar",Ev);/**
|
|
151
|
-
* @license lucide-react v0.564.0 - ISC
|
|
152
|
-
*
|
|
153
|
-
* This source code is licensed under the ISC license.
|
|
154
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
-
*/const Tv=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ln=ie("check",Tv);/**
|
|
156
|
-
* @license lucide-react v0.564.0 - ISC
|
|
157
|
-
*
|
|
158
|
-
* This source code is licensed under the ISC license.
|
|
159
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
-
*/const Av=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Rv=ie("chevron-down",Av);/**
|
|
161
|
-
* @license lucide-react v0.564.0 - ISC
|
|
162
|
-
*
|
|
163
|
-
* This source code is licensed under the ISC license.
|
|
164
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
-
*/const _v=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Mv=ie("chevron-left",_v);/**
|
|
166
|
-
* @license lucide-react v0.564.0 - ISC
|
|
167
|
-
*
|
|
168
|
-
* This source code is licensed under the ISC license.
|
|
169
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
-
*/const zv=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Mi=ie("chevron-right",zv);/**
|
|
171
|
-
* @license lucide-react v0.564.0 - ISC
|
|
172
|
-
*
|
|
173
|
-
* This source code is licensed under the ISC license.
|
|
174
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
-
*/const Dv=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Ov=ie("chevrons-up-down",Dv);/**
|
|
176
|
-
* @license lucide-react v0.564.0 - ISC
|
|
177
|
-
*
|
|
178
|
-
* This source code is licensed under the ISC license.
|
|
179
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
-
*/const kv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Xt=ie("circle-alert",kv);/**
|
|
181
|
-
* @license lucide-react v0.564.0 - ISC
|
|
182
|
-
*
|
|
183
|
-
* This source code is licensed under the ISC license.
|
|
184
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
-
*/const Uv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"m8 12 4 4 4-4",key:"k98ssh"}]],n0=ie("circle-arrow-down",Uv);/**
|
|
186
|
-
* @license lucide-react v0.564.0 - ISC
|
|
187
|
-
*
|
|
188
|
-
* This source code is licensed under the ISC license.
|
|
189
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
-
*/const Hv=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],cs=ie("circle-check-big",Hv);/**
|
|
191
|
-
* @license lucide-react v0.564.0 - ISC
|
|
192
|
-
*
|
|
193
|
-
* This source code is licensed under the ISC license.
|
|
194
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
-
*/const Bv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],pu=ie("circle-x",Bv);/**
|
|
196
|
-
* @license lucide-react v0.564.0 - ISC
|
|
197
|
-
*
|
|
198
|
-
* This source code is licensed under the ISC license.
|
|
199
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
-
*/const Lv=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],zi=ie("clock",Lv);/**
|
|
201
|
-
* @license lucide-react v0.564.0 - ISC
|
|
202
|
-
*
|
|
203
|
-
* This source code is licensed under the ISC license.
|
|
204
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
-
*/const qv=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Yv=ie("code",qv);/**
|
|
206
|
-
* @license lucide-react v0.564.0 - ISC
|
|
207
|
-
*
|
|
208
|
-
* This source code is licensed under the ISC license.
|
|
209
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
-
*/const Gv=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ru=ie("external-link",Gv);/**
|
|
211
|
-
* @license lucide-react v0.564.0 - ISC
|
|
212
|
-
*
|
|
213
|
-
* This source code is licensed under the ISC license.
|
|
214
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
-
*/const Qv=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],gu=ie("eye-off",Qv);/**
|
|
216
|
-
* @license lucide-react v0.564.0 - ISC
|
|
217
|
-
*
|
|
218
|
-
* This source code is licensed under the ISC license.
|
|
219
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
-
*/const Xv=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Di=ie("eye",Xv);/**
|
|
221
|
-
* @license lucide-react v0.564.0 - ISC
|
|
222
|
-
*
|
|
223
|
-
* This source code is licensed under the ISC license.
|
|
224
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
-
*/const Vv=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Zv=ie("file-text",Vv);/**
|
|
226
|
-
* @license lucide-react v0.564.0 - ISC
|
|
227
|
-
*
|
|
228
|
-
* This source code is licensed under the ISC license.
|
|
229
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
-
*/const $v=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],Kv=ie("git-pull-request",$v);/**
|
|
231
|
-
* @license lucide-react v0.564.0 - ISC
|
|
232
|
-
*
|
|
233
|
-
* This source code is licensed under the ISC license.
|
|
234
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
-
*/const Jv=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],hl=ie("hash",Jv);/**
|
|
236
|
-
* @license lucide-react v0.564.0 - ISC
|
|
237
|
-
*
|
|
238
|
-
* This source code is licensed under the ISC license.
|
|
239
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
-
*/const Fv=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],Wv=ie("house",Fv);/**
|
|
241
|
-
* @license lucide-react v0.564.0 - ISC
|
|
242
|
-
*
|
|
243
|
-
* This source code is licensed under the ISC license.
|
|
244
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
-
*/const Pv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Iv=ie("info",Pv);/**
|
|
246
|
-
* @license lucide-react v0.564.0 - ISC
|
|
247
|
-
*
|
|
248
|
-
* This source code is licensed under the ISC license.
|
|
249
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
-
*/const eb=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],tb=ie("kanban",eb);/**
|
|
251
|
-
* @license lucide-react v0.564.0 - ISC
|
|
252
|
-
*
|
|
253
|
-
* This source code is licensed under the ISC license.
|
|
254
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
-
*/const lb=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],ab=ie("layout-grid",lb);/**
|
|
256
|
-
* @license lucide-react v0.564.0 - ISC
|
|
257
|
-
*
|
|
258
|
-
* This source code is licensed under the ISC license.
|
|
259
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
-
*/const nb=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]],s0=ie("layout-list",nb);/**
|
|
261
|
-
* @license lucide-react v0.564.0 - ISC
|
|
262
|
-
*
|
|
263
|
-
* This source code is licensed under the ISC license.
|
|
264
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
-
*/const sb=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],fa=ie("loader-circle",sb);/**
|
|
266
|
-
* @license lucide-react v0.564.0 - ISC
|
|
267
|
-
*
|
|
268
|
-
* This source code is licensed under the ISC license.
|
|
269
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
-
*/const ib=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],Y0=ie("map",ib);/**
|
|
271
|
-
* @license lucide-react v0.564.0 - ISC
|
|
272
|
-
*
|
|
273
|
-
* This source code is licensed under the ISC license.
|
|
274
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
-
*/const cb=[["path",{d:"M5 12h14",key:"1ays0h"}]],rb=ie("minus",cb);/**
|
|
276
|
-
* @license lucide-react v0.564.0 - ISC
|
|
277
|
-
*
|
|
278
|
-
* This source code is licensed under the ISC license.
|
|
279
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
-
*/const ub=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],G0=ie("pause",ub);/**
|
|
281
|
-
* @license lucide-react v0.564.0 - ISC
|
|
282
|
-
*
|
|
283
|
-
* This source code is licensed under the ISC license.
|
|
284
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
-
*/const ob=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],_u=ie("pen",ob);/**
|
|
286
|
-
* @license lucide-react v0.564.0 - ISC
|
|
287
|
-
*
|
|
288
|
-
* This source code is licensed under the ISC license.
|
|
289
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
-
*/const db=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],ha=ie("play",db);/**
|
|
291
|
-
* @license lucide-react v0.564.0 - ISC
|
|
292
|
-
*
|
|
293
|
-
* This source code is licensed under the ISC license.
|
|
294
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
-
*/const fb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Vl=ie("plus",fb);/**
|
|
296
|
-
* @license lucide-react v0.564.0 - ISC
|
|
297
|
-
*
|
|
298
|
-
* This source code is licensed under the ISC license.
|
|
299
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
-
*/const mb=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],an=ie("rotate-ccw",mb);/**
|
|
301
|
-
* @license lucide-react v0.564.0 - ISC
|
|
302
|
-
*
|
|
303
|
-
* This source code is licensed under the ISC license.
|
|
304
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
-
*/const hb=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],xb=ie("save",hb);/**
|
|
306
|
-
* @license lucide-react v0.564.0 - ISC
|
|
307
|
-
*
|
|
308
|
-
* This source code is licensed under the ISC license.
|
|
309
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
-
*/const pb=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Mu=ie("search",pb);/**
|
|
311
|
-
* @license lucide-react v0.564.0 - ISC
|
|
312
|
-
*
|
|
313
|
-
* This source code is licensed under the ISC license.
|
|
314
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
-
*/const gb=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Q0=ie("settings",gb);/**
|
|
316
|
-
* @license lucide-react v0.564.0 - ISC
|
|
317
|
-
*
|
|
318
|
-
* This source code is licensed under the ISC license.
|
|
319
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
-
*/const vb=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],X0=ie("shield",vb);/**
|
|
321
|
-
* @license lucide-react v0.564.0 - ISC
|
|
322
|
-
*
|
|
323
|
-
* This source code is licensed under the ISC license.
|
|
324
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
-
*/const bb=[["rect",{width:"3",height:"8",x:"13",y:"2",rx:"1.5",key:"diqz80"}],["path",{d:"M19 8.5V10h1.5A1.5 1.5 0 1 0 19 8.5",key:"183iwg"}],["rect",{width:"3",height:"8",x:"8",y:"14",rx:"1.5",key:"hqg7r1"}],["path",{d:"M5 15.5V14H3.5A1.5 1.5 0 1 0 5 15.5",key:"76g71w"}],["rect",{width:"8",height:"3",x:"14",y:"13",rx:"1.5",key:"1kmz0a"}],["path",{d:"M15.5 19H14v1.5a1.5 1.5 0 1 0 1.5-1.5",key:"jc4sz0"}],["rect",{width:"8",height:"3",x:"2",y:"8",rx:"1.5",key:"1omvl4"}],["path",{d:"M8.5 5H10V3.5A1.5 1.5 0 1 0 8.5 5",key:"16f3cl"}]],i0=ie("slack",bb);/**
|
|
326
|
-
* @license lucide-react v0.564.0 - ISC
|
|
327
|
-
*
|
|
328
|
-
* This source code is licensed under the ISC license.
|
|
329
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
-
*/const yb=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],jb=ie("square-pen",yb);/**
|
|
331
|
-
* @license lucide-react v0.564.0 - ISC
|
|
332
|
-
*
|
|
333
|
-
* This source code is licensed under the ISC license.
|
|
334
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
-
*/const Nb=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Sb=ie("terminal",Nb);/**
|
|
336
|
-
* @license lucide-react v0.564.0 - ISC
|
|
337
|
-
*
|
|
338
|
-
* This source code is licensed under the ISC license.
|
|
339
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
-
*/const wb=[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]],Cb=ie("test-tube-diagonal",wb);/**
|
|
341
|
-
* @license lucide-react v0.564.0 - ISC
|
|
342
|
-
*
|
|
343
|
-
* This source code is licensed under the ISC license.
|
|
344
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
-
*/const Eb=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]],Tb=ie("test-tube",Eb);/**
|
|
346
|
-
* @license lucide-react v0.564.0 - ISC
|
|
347
|
-
*
|
|
348
|
-
* This source code is licensed under the ISC license.
|
|
349
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
-
*/const Ab=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],zu=ie("trash-2",Ab);/**
|
|
351
|
-
* @license lucide-react v0.564.0 - ISC
|
|
352
|
-
*
|
|
353
|
-
* This source code is licensed under the ISC license.
|
|
354
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
-
*/const Rb=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],_b=ie("triangle-alert",Rb);/**
|
|
356
|
-
* @license lucide-react v0.564.0 - ISC
|
|
357
|
-
*
|
|
358
|
-
* This source code is licensed under the ISC license.
|
|
359
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
-
*/const Mb=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],vu=ie("users",Mb);/**
|
|
361
|
-
* @license lucide-react v0.564.0 - ISC
|
|
362
|
-
*
|
|
363
|
-
* This source code is licensed under the ISC license.
|
|
364
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
-
*/const zb=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],Db=ie("wifi",zb);/**
|
|
366
|
-
* @license lucide-react v0.564.0 - ISC
|
|
367
|
-
*
|
|
368
|
-
* This source code is licensed under the ISC license.
|
|
369
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
-
*/const Ob=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gl=ie("x",Ob);/**
|
|
371
|
-
* @license lucide-react v0.564.0 - ISC
|
|
372
|
-
*
|
|
373
|
-
* This source code is licensed under the ISC license.
|
|
374
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
-
*/const kb=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Ub=ie("zap",kb),c0=c=>{let o;const d=new Set,r=(p,j)=>{const N=typeof p=="function"?p(o):p;if(!Object.is(N,o)){const z=o;o=j??(typeof N!="object"||N===null)?N:Object.assign({},o,N),d.forEach(O=>O(o,z))}},x=()=>o,v={setState:r,getState:x,getInitialState:()=>g,subscribe:p=>(d.add(p),()=>d.delete(p))},g=o=c(r,x,v);return v},Hb=c=>c?c0(c):c0,Bb=c=>c;function Lb(c,o=Bb){const d=Ve.useSyncExternalStore(c.subscribe,()=>o(c.getState()),()=>o(c.getInitialState()));return Ve.useDebugValue(d),d}const r0=c=>{const o=Hb(c),d=r=>Lb(o,r);return Object.assign(d,o),d},qb=c=>c?r0(c):r0,Hi="";let V0=!1,bu=null;function Yb(c){V0=c}function Gb(c){bu=c}function Qb(c){return encodeURIComponent(c.replace(/\//g,"~"))}function Te(c){return V0&&bu?c.replace("/api/",`/api/projects/${Qb(bu)}/`):c}function Xb(){return Me("/api/projects")}async function Me(c,o){const d=`${Hi}${c}`,r=await fetch(d,{headers:{"Content-Type":"application/json",...o==null?void 0:o.headers},...o});if(!r.ok){const x=await r.json().catch(()=>({error:"Unknown error"}));throw new Error(x.error||`HTTP ${r.status}: ${r.statusText}`)}return r.json()}function Z0(){return Me(Te("/api/status"))}function Vb(){return Me(Te("/api/prds"))}function Zb(){return Me(Te("/api/prs"))}function $b(c,o){const d=`?lines=${encodeURIComponent(o)}`;return Me(Te(`/api/logs/${encodeURIComponent(c)}${d}`))}function Du(){return Me(Te("/api/config"))}function Oi(c){return Me(Te("/api/config"),{method:"PUT",body:JSON.stringify(c)})}function Kb(){return Me(Te("/api/doctor"))}function $0(){return Me(Te("/api/schedule-info"))}function Jb(){return Me(Te("/api/actions/run"),{method:"POST"})}function Fb(){return Me(Te("/api/actions/review"),{method:"POST"})}function u0(){return Me(Te("/api/actions/install-cron"),{method:"POST"})}function Wb(){return Me(Te("/api/actions/uninstall-cron"),{method:"POST"})}function Pb(c="all"){return Me(Te("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:c})})}function Ib(c){return Me(Te("/api/actions/retry"),{method:"POST",body:JSON.stringify({prdName:c})})}function ey(){return Me(Te("/api/agents"))}function ty(c){return Me(Te("/api/agents"),{method:"POST",body:JSON.stringify(c)})}function o0(c,o){return Me(Te(`/api/agents/${encodeURIComponent(c)}`),{method:"PUT",body:JSON.stringify(o)})}function ly(c){return Me(Te(`/api/agents/${encodeURIComponent(c)}/prompt`))}function ay(){return Me(Te("/api/agents/seed-defaults"),{method:"POST"})}async function ny(c){const o=`${Hi}${Te(`/api/agents/${encodeURIComponent(c)}`)}`,d=await fetch(o,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!d.ok){const r=await d.json().catch(()=>({error:"Unknown error"}));throw new Error(r.error||`HTTP ${d.status}: ${d.statusText}`)}}function sy(c){return Me(Te("/api/slack/channels"),{method:"POST",body:JSON.stringify({botToken:c})})}function iy(c,o){return Me(Te("/api/slack/channels/create"),{method:"POST",body:JSON.stringify({botToken:c,name:o})})}const Ql=["Draft","Ready","In Progress","Review","Done"];function K0(){return Me(Te("/api/board/status"))}function cy(c){return Me(Te("/api/board/issues"),{method:"POST",body:JSON.stringify(c)})}function J0(c,o){return Me(Te(`/api/board/issues/${c}/move`),{method:"PATCH",body:JSON.stringify({column:o})})}async function ry(c){const o=`${Hi}${Te(`/api/board/issues/${c}`)}`,d=await fetch(o,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!d.ok){const r=await d.json().catch(()=>({error:"Unknown error"}));throw new Error(r.error||`HTTP ${d.status}: ${d.statusText}`)}}function uy(){return Me(Te("/api/actions/clear-lock"),{method:"POST"})}function oy(c,o=[],d){const r=(d==null?void 0:d.enabled)??!0,x=y.useRef(c);x.current=c,y.useEffect(()=>{if(!r)return;const f=`${Hi}${Te("/api/status/events")}`,m=new EventSource(f);return m.addEventListener("status_changed",v=>{try{const g=JSON.parse(v.data);x.current(g)}catch{}}),()=>{m.close()}},[r,...o])}function dy(){return Me(Te("/api/roadmap"))}function fy(){return Me(Te("/api/roadmap/scan"),{method:"POST"})}function F0(c){return Me(Te("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:c})})}function ut(c,o=[],d){const r=(d==null?void 0:d.enabled)??!0,[x,f]=y.useState(null),[m,v]=y.useState(!0),[g,p]=y.useState(null),j=y.useRef(c);j.current=c;const N=y.useRef(()=>{(async()=>{p(null);try{const O=await j.current();f(O)}catch(O){p(O instanceof Error?O:new Error("Unknown error"))}})()});return N.current=N.current.bind(N),y.useEffect(()=>{if(!r)return;let z=!1;return v(!0),p(null),(async()=>{try{const U=await j.current();z||f(U)}catch(U){z||p(U instanceof Error?U:new Error("Unknown error"))}finally{z||v(!1)}})(),()=>{z=!0}},[...o,r]),{data:x,loading:m,error:g,refetch:N.current}}const my=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,ct=qb(c=>({projectName:"Night Watch",setProjectName:o=>c({projectName:o}),toasts:[],addToast:o=>{const d=Math.random().toString(36).substring(7);c(r=>({toasts:[...r.toasts,{...o,id:d}]})),setTimeout(()=>{c(r=>({toasts:r.toasts.filter(x=>x.id!==d)}))},5e3)},removeToast:o=>c(d=>({toasts:d.toasts.filter(r=>r.id!==o)})),globalModeLoading:!0,setGlobalModeLoading:o=>c({globalModeLoading:o}),isGlobalMode:!1,setGlobalMode:o=>{Yb(o),c({isGlobalMode:o})},projects:[],setProjects:o=>c({projects:o}),selectedProjectId:my,selectProject:o=>{Gb(o),o?localStorage.setItem("nw-selected-project",o):localStorage.removeItem("nw-selected-project"),c(d=>{const r=d.projects.find(x=>x.name===o);return{selectedProjectId:o,...r?{projectName:r.name}:{}}})}})),hy=()=>{const[c,o]=y.useState(!1),{projectName:d,isGlobalMode:r,projects:x,selectedProjectId:f,selectProject:m}=ct(),v=[{icon:Wv,label:"Dashboard",path:"/"},{icon:tb,label:"Board",path:"/board"},{icon:Kv,label:"Pull Requests",path:"/prs",badge:1},{icon:Y0,label:"Roadmap",path:"/roadmap"},{icon:_i,label:"Scheduling",path:"/scheduling"},{icon:Sb,label:"Logs",path:"/logs"},{icon:Nv,label:"Integrations",path:"/integrations"},{icon:vu,label:"Agents",path:"/agents"},{icon:Q0,label:"Settings",path:"/settings"}];return n.jsxs("aside",{className:`
|
|
376
|
-
relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
|
|
377
|
-
${c?"w-20":"w-72"} h-screen flex-shrink-0 z-50
|
|
378
|
-
bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
|
|
379
|
-
`,children:[n.jsx("div",{className:`p-6 border-b border-white/5 ${c?"items-center justify-center flex":""}`,children:c?n.jsx("div",{className:"relative group",children:n.jsx("div",{className:"h-10 w-10 bg-indigo-600 rounded-xl flex items-center justify-center text-white font-bold cursor-pointer shadow-lg shadow-indigo-500/20 group-hover:bg-indigo-500 transition-colors bg-gradient-to-br from-indigo-500 to-indigo-700",title:"Switch Project",children:"NW"})}):n.jsxs("div",{className:"relative w-full",children:[n.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:r?"Projects":"Workspace"}),r?n.jsxs("div",{className:"relative",children:[n.jsx(a0,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-indigo-400 pointer-events-none"}),n.jsx("select",{value:f||"",onChange:g=>m(g.target.value),className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 pl-10 pr-8 text-sm font-medium shadow-sm appearance-none cursor-pointer hover:border-white/20 transition-colors focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20",children:x.filter(g=>g.valid).map(g=>n.jsx("option",{value:g.name,children:g.name},g.name))}),n.jsx(Ov,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-slate-500 pointer-events-none"})]}):n.jsxs("div",{className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 px-3.5 text-sm font-medium shadow-sm flex items-center",children:[n.jsx(a0,{className:"h-4 w-4 text-indigo-400 mr-3"}),n.jsx("span",{className:"truncate",children:d})]})]})}),n.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:n.jsx("ul",{className:"space-y-1.5 px-4",children:v.map(g=>n.jsxs(Ve.Fragment,{children:[g.path==="/agents"&&!c&&n.jsx("li",{className:"pt-3 pb-1 px-3.5",children:n.jsx("span",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest",children:"Team"})}),n.jsx("li",{children:n.jsx(O0,{to:g.path,className:({isActive:p})=>`
|
|
380
|
-
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
381
|
-
${p?"bg-indigo-500/10 text-indigo-300 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.05)]":"text-slate-400 hover:bg-white/5 hover:text-slate-200"}
|
|
382
|
-
${c?"justify-center":""}
|
|
383
|
-
`,children:({isActive:p})=>n.jsxs(n.Fragment,{children:[n.jsx(g.icon,{className:`h-5 w-5 transition-colors ${p?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${c?"":"mr-3.5"}`}),!c&&n.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:g.label}),g.badge&&(c?n.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):n.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${p?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:g.badge})),p&&!c&&n.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-indigo-500 rounded-r-full shadow-[0_0_10px_rgba(99,102,241,0.4)]"}),c&&n.jsx("div",{className:"absolute left-full ml-4 px-3 py-1.5 bg-[#111827] text-white text-xs font-medium rounded-md border border-white/10 shadow-xl opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50 transition-opacity translate-x-2 group-hover:translate-x-0",children:g.label})]})})})]},g.path))})}),n.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:n.jsx("button",{onClick:()=>o(!c),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:c?n.jsx(Mi,{className:"h-5 w-5"}):n.jsx(Mv,{className:"h-5 w-5"})})})]})},xy=()=>{const{projectName:c}=ct();return n.jsxs("header",{className:"h-20 flex items-center justify-between px-8 z-40 sticky top-0 bg-[#030712]/80 backdrop-blur-md border-b border-white/5",children:[n.jsxs("div",{className:"flex items-center space-x-6",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-xs font-mono text-indigo-400 mb-0.5 tracking-tight",children:"Active Project"}),n.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight leading-none",children:c})]}),n.jsx("div",{className:"h-8 w-px bg-white/10 mx-2"}),n.jsxs("div",{className:"flex items-center space-x-2 text-xs font-medium px-3 py-1.5 rounded-full border transition-colors bg-emerald-500/5 text-emerald-400 border-emerald-500/20 shadow-[0_0_10px_-4px_rgba(16,185,129,0.3)]",children:[n.jsx(Db,{className:"h-3.5 w-3.5"}),n.jsx("span",{className:"uppercase tracking-wider text-[10px]",children:"Online"})]})]}),n.jsxs("div",{className:"flex items-center space-x-5",children:[n.jsxs("div",{className:"relative hidden md:block group",children:[n.jsx("input",{type:"text",placeholder:"Search ( / )",className:"w-72 pl-10 pr-4 py-2 rounded-lg border border-white/5 bg-white/5 text-sm text-slate-200 focus:outline-none focus:ring-1 focus:ring-indigo-500/50 focus:border-indigo-500/50 transition-all placeholder:text-slate-600 focus:bg-[#0b101b]"}),n.jsx(Mu,{className:"absolute left-3.5 top-2.5 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400 transition-colors"})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full relative transition-all",children:[n.jsx(yv,{className:"h-5 w-5"}),n.jsx("span",{className:"absolute top-2.5 right-2.5 h-2 w-2 bg-red-500 rounded-full ring-2 ring-[#030712]"})]}),n.jsx("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full transition-all",children:n.jsx(Q0,{className:"h-5 w-5"})})]}),n.jsx("div",{className:"h-9 w-9 rounded-full bg-gradient-to-tr from-indigo-600 to-purple-600 ring-2 ring-white/10 flex items-center justify-center text-white font-bold text-xs shadow-lg",children:"AD"})]})]})},py=({toast:c,onDismiss:o})=>{const d={success:n.jsx(cs,{className:"h-5 w-5 text-green-400"}),error:n.jsx(Xt,{className:"h-5 w-5 text-red-400"}),info:n.jsx(Iv,{className:"h-5 w-5 text-blue-400"}),warning:n.jsx(_b,{className:"h-5 w-5 text-amber-400"})},r={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return n.jsx("div",{className:`
|
|
384
|
-
pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
|
|
385
|
-
bg-slate-900 border border-slate-800 border-l-4 ${r[c.type]}
|
|
386
|
-
shadow-lg ring-1 ring-black ring-opacity-5 transition-all
|
|
387
|
-
animate-in slide-in-from-right-full fade-in duration-300
|
|
388
|
-
`,children:n.jsx("div",{className:"p-4",children:n.jsxs("div",{className:"flex items-start",children:[n.jsx("div",{className:"flex-shrink-0",children:d[c.type]}),n.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[n.jsx("p",{className:"text-sm font-medium text-slate-200",children:c.title}),c.message&&n.jsx("p",{className:"mt-1 text-sm text-slate-400",children:c.message})]}),n.jsx("div",{className:"ml-4 flex flex-shrink-0",children:n.jsxs("button",{type:"button",className:"inline-flex rounded-md text-slate-400 hover:text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:()=>o(c.id),children:[n.jsx("span",{className:"sr-only",children:"Close"}),n.jsx(gl,{className:"h-5 w-5"})]})})]})})})},gy=()=>{const{toasts:c,removeToast:o}=ct();return n.jsx("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 flex flex-col items-end px-4 py-6 sm:items-end sm:p-6 z-[100] gap-4",children:c.map(d=>n.jsx(py,{toast:d,onDismiss:o},d.id))})};function vy(){const{setGlobalMode:c,setGlobalModeLoading:o,setProjects:d,selectProject:r,selectedProjectId:x}=ct();y.useEffect(()=>{o(!0),Xb().then(f=>{c(!0),d(f);const m=f.filter(v=>v.valid);x&&m.some(v=>v.name===x)?r(x):m.length>0&&r(m[0].name)}).catch(()=>{c(!1)}).finally(()=>{o(!1)})},[])}const Ou=({persona:c,size:o="sm"})=>{const d=o==="lg"?"w-20 h-20 text-2xl":"w-12 h-12 text-base",x={"Security Reviewer":"bg-red-500/20 text-red-300 border-red-500/30","Tech Lead / Architect":"bg-indigo-500/20 text-indigo-300 border-indigo-500/30","QA Engineer":"bg-green-500/20 text-green-300 border-green-500/30",Implementer:"bg-amber-500/20 text-amber-300 border-amber-500/30"}[c.role]??"bg-slate-700/40 text-slate-300 border-white/10";return c.avatarUrl?n.jsx("img",{src:c.avatarUrl,alt:c.name,className:`${d} rounded-full object-cover border border-white/10`}):n.jsx("div",{className:`${d} rounded-full border flex items-center justify-center font-bold ${x}`,children:c.name.charAt(0)})},by=({role:c})=>c.toLowerCase().includes("security")?n.jsx(X0,{className:"h-3 w-3"}):c.toLowerCase().includes("tech")||c.toLowerCase().includes("architect")?n.jsx(Ub,{className:"h-3 w-3"}):c.toLowerCase().includes("qa")?n.jsx(Tb,{className:"h-3 w-3"}):n.jsx(Yv,{className:"h-3 w-3"}),yy=({persona:c,onEdit:o,onDelete:d,onToggleActive:r})=>{const x=c.soul.expertise.slice(0,3),f=c.soul.worldview[0]??"";return n.jsxs("div",{onClick:()=>o(c),role:"button",tabIndex:0,onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),o(c))},className:`relative rounded-xl border p-5 flex flex-col gap-4 transition-all duration-200
|
|
389
|
-
${c.isActive?"bg-[#0d1117] border-white/10 hover:border-white/20":"bg-[#0d1117]/60 border-white/5 opacity-60"}`,children:[n.jsxs("div",{className:"flex items-start justify-between gap-3",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(Ou,{persona:c}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-semibold text-slate-100",children:c.name}),n.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[n.jsx(by,{role:c.role}),n.jsx("span",{className:"text-xs text-slate-400",children:c.role})]})]})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("button",{onClick:m=>{m.stopPropagation(),r(c)},title:c.isActive?"Deactivate":"Activate",className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none ${c.isActive?"bg-indigo-600":"bg-slate-700"}`,children:n.jsx("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform ${c.isActive?"translate-x-4":"translate-x-0.5"}`})}),n.jsx("button",{onClick:m=>{m.stopPropagation(),o(c)},className:"p-1.5 rounded-lg text-slate-500 hover:text-slate-200 hover:bg-white/5 transition-colors",title:"Edit",children:n.jsx(_u,{className:"h-3.5 w-3.5"})}),n.jsx("button",{onClick:m=>{m.stopPropagation(),d(c)},className:"p-1.5 rounded-lg text-slate-500 hover:text-red-400 hover:bg-red-500/10 transition-colors",title:"Delete",children:n.jsx(zu,{className:"h-3.5 w-3.5"})})]})]}),f&&n.jsxs("p",{className:"text-xs text-slate-500 italic leading-relaxed line-clamp-2",children:["“",f,"”"]}),x.length>0&&n.jsx("div",{className:"flex flex-wrap gap-1.5",children:x.map(m=>n.jsx("span",{className:"px-2 py-0.5 rounded-md text-[10px] font-medium bg-indigo-500/10 text-indigo-300 border border-indigo-500/20",children:m},m))}),c.modelConfig&&n.jsxs("div",{className:"text-[10px] text-slate-600 font-mono",children:[c.modelConfig.provider,"/",c.modelConfig.model]})]})},jy=({tabs:c,active:o,onChange:d})=>n.jsx("div",{className:"flex border-b border-white/10 mb-6",children:c.map(r=>n.jsx("button",{onClick:()=>d(r),className:`px-4 py-2.5 text-sm font-medium transition-colors border-b-2 -mb-px ${o===r?"text-indigo-300 border-indigo-500":"text-slate-500 border-transparent hover:text-slate-300"}`,children:r},r))}),Bt=({label:c,tags:o,onChange:d,placeholder:r})=>{const[x,f]=y.useState(""),m=()=>{const v=x.trim();!v||o.includes(v)||(d([...o,v]),f(""))};return n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:c}),n.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2",children:o.map(v=>n.jsxs("span",{className:"flex items-center gap-1 px-2 py-0.5 rounded-md text-xs bg-slate-800 text-slate-300 border border-white/10",children:[v,n.jsx("button",{onClick:()=>d(o.filter(g=>g!==v)),className:"text-slate-500 hover:text-red-400",children:n.jsx(gl,{className:"h-3 w-3"})})]},v))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{value:x,onChange:v=>f(v.target.value),onKeyDown:v=>v.key==="Enter"&&(v.preventDefault(),m()),placeholder:r??"Add item...",className:"flex-1 bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsx("button",{onClick:m,className:"px-3 py-2 rounded-lg bg-white/5 text-slate-400 hover:text-slate-200 text-sm",children:"Add"})]})]})},d0=({label:c,items:o,onChange:d})=>{const[r,x]=y.useState(""),[f,m]=y.useState(""),v=()=>{r.trim()&&(d({...o,[r.trim()]:f.trim()}),x(""),m(""))};return n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:c}),n.jsx("div",{className:"space-y-1.5 mb-2",children:Object.entries(o).map(([g,p])=>n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-xs font-mono text-indigo-400 w-32 truncate",children:g}),n.jsx("span",{className:"text-xs text-slate-400 flex-1 truncate",children:p}),n.jsx("button",{onClick:()=>{const j={...o};delete j[g],d(j)},className:"text-slate-600 hover:text-red-400",children:n.jsx(gl,{className:"h-3 w-3"})})]},g))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{value:r,onChange:g=>x(g.target.value),placeholder:"key",className:"w-32 bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsx("input",{value:f,onChange:g=>m(g.target.value),onKeyDown:g=>g.key==="Enter"&&(g.preventDefault(),v()),placeholder:"value",className:"flex-1 bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsx("button",{onClick:v,className:"px-3 py-2 rounded-lg bg-white/5 text-slate-400 hover:text-slate-200 text-sm",children:"Add"})]})]})},f0=({label:c,items:o,onChange:d,examplePlaceholder:r,whyPlaceholder:x})=>{const f=(m,v)=>{const g=[...o];g[m]={...g[m],...v},d(g)};return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400",children:c}),n.jsx("button",{onClick:()=>d([...o,{example:"",why:""}]),className:"text-xs text-indigo-400 hover:text-indigo-300",children:"+ Add"})]}),n.jsx("div",{className:"space-y-2",children:o.map((m,v)=>n.jsxs("div",{className:"rounded-lg border border-white/10 bg-[#111827] p-2 space-y-2",children:[n.jsx("input",{value:m.example,onChange:g=>f(v,{example:g.target.value}),placeholder:r??"Example...",className:"w-full bg-black/20 border border-white/10 rounded-md px-2 py-1.5 text-xs text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{value:m.why,onChange:g=>f(v,{why:g.target.value}),placeholder:x??"Why this misses the voice...",className:"flex-1 bg-black/20 border border-white/10 rounded-md px-2 py-1.5 text-xs text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsx("button",{onClick:()=>d(o.filter((g,p)=>p!==v)),className:"text-slate-500 hover:text-red-400 px-1",title:"Remove",children:n.jsx(gl,{className:"h-3.5 w-3.5"})})]})]},v))})]})},as=({label:c,value:o,onChange:d,rows:r=3,placeholder:x})=>n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:c}),n.jsx("textarea",{value:o,onChange:f=>d(f.target.value),rows:r,placeholder:x,className:"w-full bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 resize-none"})]}),tn=({label:c,value:o,onChange:d,placeholder:r,type:x="text"})=>n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:c}),n.jsx("input",{type:x,value:o,onChange:f=>d(f.target.value),placeholder:r,className:"w-full bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"})]});function Ny(){return{name:"",role:"",avatarUrl:"",soul:{whoIAm:"",worldview:[],opinions:{},expertise:[],interests:[],tensions:[],boundaries:[],petPeeves:[]},style:{voicePrinciples:"",sentenceStructure:"",tone:"",wordsUsed:[],wordsAvoided:[],emojiUsage:{frequency:"moderate",favorites:[],contextRules:""},quickReactions:{},rhetoricalMoves:[],antiPatterns:[],goodExamples:[],badExamples:[]},skill:{modes:{},interpolationRules:"",additionalInstructions:[]},modelConfig:{provider:"anthropic",model:"claude-sonnet-4-6"},systemPromptOverride:""}}function Sy(c){return{name:c.name,role:c.role,avatarUrl:c.avatarUrl??"",soul:{...c.soul},style:{...c.style},skill:{...c.skill},modelConfig:c.modelConfig??{provider:"anthropic",model:"claude-sonnet-4-6"},systemPromptOverride:c.systemPromptOverride??""}}const wy=["Identity","Soul","Style","Calibration","Advanced"],Cy=({persona:c,onClose:o,onSave:d})=>{var L;const[r,x]=y.useState("Identity"),[f,m]=y.useState(c?Sy(c):Ny()),[v,g]=y.useState(!1),[p,j]=y.useState(null),[N,z]=y.useState(null),[O,U]=y.useState(!1),T=C=>m(Y=>({...Y,soul:{...Y.soul,...C}})),A=C=>m(Y=>({...Y,style:{...Y.style,...C}})),G=C=>m(Y=>({...Y,skill:{...Y.skill,...C}})),B=C=>m(Y=>({...Y,modelConfig:Y.modelConfig?{...Y.modelConfig,...C}:{provider:"anthropic",model:"claude-sonnet-4-6",...C}})),H=async()=>{if(!f.name.trim()||!f.role.trim()){j("Name and role are required.");return}g(!0),j(null);const C=f.modelConfig===null?null:f.modelConfig.model?f.modelConfig:void 0,Y={name:f.name.trim(),role:f.role.trim(),avatarUrl:f.avatarUrl.trim()||void 0,soul:f.soul,style:f.style,skill:f.skill,modelConfig:C,systemPromptOverride:f.systemPromptOverride.trim()||void 0};try{await d((c==null?void 0:c.id)??null,Y),o()}catch(P){j(P.message)}finally{g(!1)}},K=async()=>{if(c){U(!0);try{const C=await ly(c.id);z(C.prompt)}catch(C){z(`Error: ${C.message}`)}finally{U(!1)}}};return n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[n.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:o}),n.jsxs("div",{className:"relative bg-[#0d1117] border border-white/10 rounded-2xl shadow-2xl w-full max-w-3xl max-h-[90vh] flex flex-col",children:[n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-white/10",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[c&&n.jsx(Ou,{persona:c}),n.jsxs("div",{children:[n.jsx("h2",{className:"text-base font-semibold text-slate-100",children:c?`Edit ${c.name}`:"Hire Agent"}),n.jsx("p",{className:"text-xs text-slate-500",children:"Define their soul, style, and skills"})]})]}),n.jsx("button",{onClick:o,className:"p-2 rounded-lg text-slate-500 hover:text-slate-200 hover:bg-white/5",children:n.jsx(gl,{className:"h-5 w-5"})})]}),n.jsx("div",{className:"px-6 pt-4",children:n.jsx(jy,{tabs:wy,active:r,onChange:x})}),n.jsxs("div",{className:"flex-1 overflow-y-auto px-6 pb-6 space-y-5",children:[r==="Identity"&&n.jsxs(n.Fragment,{children:[n.jsx(tn,{label:"Name",value:f.name,onChange:C=>m(Y=>({...Y,name:C})),placeholder:"e.g. Maya"}),n.jsx(tn,{label:"Role",value:f.role,onChange:C=>m(Y=>({...Y,role:C})),placeholder:"e.g. Security Reviewer"}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 uppercase tracking-wider mb-2",children:"Avatar"}),n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:"h-16 w-16 rounded-full bg-indigo-600/20 border border-indigo-500/30 flex items-center justify-center overflow-hidden flex-shrink-0",children:f.avatarUrl?n.jsx("img",{src:f.avatarUrl,alt:"avatar",className:"h-full w-full object-cover"}):n.jsx("span",{className:"text-xl font-bold text-indigo-400",children:(L=(f.name||"?")[0])==null?void 0:L.toUpperCase()})}),n.jsxs("div",{className:"flex-1",children:[n.jsxs("label",{className:"cursor-pointer inline-flex items-center gap-2 px-3 py-2 rounded-lg border border-white/10 bg-white/5 text-xs text-slate-300 hover:bg-white/10 transition-colors",children:[n.jsx("span",{children:"Upload image"}),n.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:C=>{var I;const Y=(I=C.target.files)==null?void 0:I[0];if(!Y)return;const P=new FileReader;P.onload=Z=>{var J;const fe=(J=Z.target)==null?void 0:J.result;m(ue=>({...ue,avatarUrl:fe}))},P.readAsDataURL(Y)}})]}),f.avatarUrl&&n.jsx("button",{onClick:()=>m(C=>({...C,avatarUrl:""})),className:"ml-2 text-xs text-slate-500 hover:text-red-400",children:"Remove"})]})]})]}),n.jsx(as,{label:"Who I Am",value:f.soul.whoIAm,onChange:C=>T({whoIAm:C}),rows:4,placeholder:"A concise self-description in first person..."}),n.jsx(Bt,{label:"Expertise",tags:f.soul.expertise,onChange:C=>T({expertise:C}),placeholder:"e.g. security, cryptography..."}),n.jsx(Bt,{label:"Interests",tags:f.soul.interests,onChange:C=>T({interests:C}),placeholder:"e.g. OWASP, threat modeling..."})]}),r==="Soul"&&n.jsxs(n.Fragment,{children:[n.jsx(Bt,{label:"Worldview (beliefs)",tags:f.soul.worldview,onChange:C=>T({worldview:C}),placeholder:"Add a core belief..."}),n.jsx(Bt,{label:"Tensions (internal conflicts)",tags:f.soul.tensions,onChange:C=>T({tensions:C}),placeholder:"Add a tension..."}),n.jsx(Bt,{label:"Boundaries (won't do)",tags:f.soul.boundaries,onChange:C=>T({boundaries:C}),placeholder:"Add a boundary..."}),n.jsx(Bt,{label:"Pet Peeves",tags:f.soul.petPeeves,onChange:C=>T({petPeeves:C}),placeholder:"Add a pet peeve..."}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Opinions"}),n.jsx("button",{onClick:()=>{const C=prompt("Domain name (e.g., security, architecture):");C!=null&&C.trim()&&T({opinions:{...f.soul.opinions??{},[C.trim()]:[]}})},className:"text-xs text-indigo-400 hover:text-indigo-300",children:"+ Add Domain"})]}),Object.entries(f.soul.opinions??{}).map(([C,Y])=>n.jsxs("div",{className:"mb-3 p-3 bg-white/5 rounded-lg border border-white/10",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("span",{className:"text-sm font-medium text-slate-300",children:C}),n.jsx("button",{onClick:()=>{const{[C]:P,...I}=f.soul.opinions??{};T({opinions:I})},className:"text-xs text-red-400 hover:text-red-300",children:"Remove domain"})]}),n.jsx("div",{className:"space-y-1 mb-2",children:Y.map((P,I)=>n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{value:P,onChange:Z=>{const fe=[...Y];fe[I]=Z.target.value,T({opinions:{...f.soul.opinions??{},[C]:fe}})},className:"flex-1 bg-white/5 border border-white/10 rounded px-2 py-1 text-xs text-slate-300 focus:outline-none focus:border-indigo-500/50",placeholder:"Add a take..."}),n.jsx("button",{onClick:()=>{const Z=Y.filter((fe,J)=>J!==I);T({opinions:{...f.soul.opinions??{},[C]:Z}})},className:"text-slate-500 hover:text-red-400 text-xs",children:"×"})]},I))}),n.jsx("button",{onClick:()=>{T({opinions:{...f.soul.opinions??{},[C]:[...Y,""]}})},className:"text-xs text-indigo-400 hover:text-indigo-300",children:"+ Add take"})]},C))]})]}),r==="Style"&&n.jsxs(n.Fragment,{children:[n.jsx(as,{label:"Voice Principles",value:f.style.voicePrinciples,onChange:C=>A({voicePrinciples:C}),placeholder:"Describe the voice in 1-2 sentences..."}),n.jsx(tn,{label:"Tone",value:f.style.tone,onChange:C=>A({tone:C}),placeholder:"e.g. Vigilant but not paranoid. Matter-of-fact."}),n.jsx(tn,{label:"Sentence Structure",value:f.style.sentenceStructure,onChange:C=>A({sentenceStructure:C}),placeholder:"e.g. Short and punchy. One risk, one fix per message."}),n.jsx(Bt,{label:"Words I Use",tags:f.style.wordsUsed,onChange:C=>A({wordsUsed:C}),placeholder:"Add a word or phrase..."}),n.jsx(Bt,{label:"Words I Never Use",tags:f.style.wordsAvoided,onChange:C=>A({wordsAvoided:C}),placeholder:"Add a word to avoid..."}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:"Emoji Frequency"}),n.jsxs("select",{value:f.style.emojiUsage.frequency,onChange:C=>A({emojiUsage:{...f.style.emojiUsage,frequency:C.target.value}}),className:"w-full bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 focus:outline-none focus:border-indigo-500/50",children:[n.jsx("option",{value:"never",children:"Never"}),n.jsx("option",{value:"rare",children:"Rare"}),n.jsx("option",{value:"moderate",children:"Moderate"}),n.jsx("option",{value:"heavy",children:"Heavy"})]})]}),n.jsx(Bt,{label:"Favorite Emojis",tags:f.style.emojiUsage.favorites,onChange:C=>A({emojiUsage:{...f.style.emojiUsage,favorites:C}}),placeholder:"Add an emoji..."}),n.jsx(as,{label:"Emoji Context Rules",value:f.style.emojiUsage.contextRules,onChange:C=>A({emojiUsage:{...f.style.emojiUsage,contextRules:C}}),rows:2,placeholder:"e.g. 🔒 for concerns, ✅ for resolved issues"}),n.jsx(d0,{label:"Quick Reactions",items:f.style.quickReactions,onChange:C=>A({quickReactions:C})})]}),r==="Calibration"&&n.jsxs(n.Fragment,{children:[n.jsx(Bt,{label:"Good Examples (what I sound like)",tags:f.style.goodExamples,onChange:C=>A({goodExamples:C}),placeholder:"Add a good example message..."}),n.jsx(Bt,{label:"Rhetorical Moves",tags:f.style.rhetoricalMoves,onChange:C=>A({rhetoricalMoves:C}),placeholder:"Add a rhetorical pattern..."}),n.jsx(Bt,{label:"Additional Instructions",tags:f.skill.additionalInstructions,onChange:C=>G({additionalInstructions:C}),placeholder:"Add an instruction..."}),n.jsx(f0,{label:"Anti-Patterns (Never Sound Like This)",items:f.style.antiPatterns,onChange:C=>A({antiPatterns:C}),examplePlaceholder:"What should be avoided...",whyPlaceholder:"Why this is off-voice..."}),n.jsx(f0,{label:"Bad Examples",items:f.style.badExamples,onChange:C=>A({badExamples:C}),examplePlaceholder:"Bad output example...",whyPlaceholder:"Why it misses..."})]}),r==="Advanced"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-300",children:"Use Global Config"}),n.jsx("p",{className:"text-xs text-slate-500",children:"When on, this persona uses the global Night Watch AI model settings"})]}),n.jsx("button",{onClick:()=>m(C=>({...C,modelConfig:C.modelConfig?null:{provider:"anthropic",model:"claude-sonnet-4-6"}})),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${f.modelConfig?"bg-white/10":"bg-indigo-500"}`,children:n.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white shadow transition-transform ${f.modelConfig?"translate-x-1":"translate-x-6"}`})})]}),f.modelConfig&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:"Provider"}),n.jsxs("select",{value:f.modelConfig.provider,onChange:C=>B({provider:C.target.value}),className:"w-full bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 focus:outline-none focus:border-indigo-500/50",children:[n.jsx("option",{value:"anthropic",children:"Anthropic"}),n.jsx("option",{value:"openai",children:"OpenAI"}),n.jsx("option",{value:"custom",children:"Custom"})]})]}),n.jsx(tn,{label:"Model",value:f.modelConfig.model,onChange:C=>B({model:C}),placeholder:"e.g. claude-sonnet-4-6"}),f.modelConfig.provider==="custom"&&n.jsx(tn,{label:"Base URL",value:f.modelConfig.baseUrl??"",onChange:C=>B({baseUrl:C}),placeholder:"https://api.example.com/v1"}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:["Temperature:"," ",n.jsx("span",{className:"text-slate-300",children:f.modelConfig.temperature??.7})]}),n.jsx("input",{type:"range",min:"0",max:"1",step:"0.05",value:f.modelConfig.temperature??.7,onChange:C=>B({temperature:parseFloat(C.target.value)}),className:"w-full accent-indigo-500"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 uppercase tracking-wider mb-1",children:"Max Tokens (optional)"}),n.jsx("input",{type:"number",min:1,max:32768,value:f.modelConfig.maxTokens??"",onChange:C=>B({maxTokens:C.target.value?parseInt(C.target.value):void 0}),placeholder:"Default from provider",className:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-300 focus:outline-none focus:border-indigo-500/50"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 uppercase tracking-wider mb-2",children:"Custom Env Vars"}),n.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"API keys injected at call time for this persona only. Values are masked after save."}),Object.entries(f.modelConfig.envVars??{}).map(([C,Y])=>n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("input",{value:C,readOnly:!0,className:"w-1/3 bg-white/5 border border-white/10 rounded px-2 py-1 text-xs text-slate-300"}),n.jsx("input",{value:Y==="***"?"":Y,placeholder:Y==="***"?"(masked)":"value",onChange:P=>{var I;return B({envVars:{...((I=f.modelConfig)==null?void 0:I.envVars)??{},[C]:P.target.value}})},type:"password",className:"flex-1 bg-white/5 border border-white/10 rounded px-2 py-1 text-xs text-slate-300"}),n.jsx("button",{onClick:()=>{var Z;const{[C]:P,...I}=((Z=f.modelConfig)==null?void 0:Z.envVars)??{};B({envVars:I})},className:"text-slate-500 hover:text-red-400 text-xs",children:"×"})]},C)),n.jsx("button",{onClick:()=>{var Y;const C=prompt("Environment variable name (e.g., ANTHROPIC_API_KEY):");C!=null&&C.trim()&&B({envVars:{...((Y=f.modelConfig)==null?void 0:Y.envVars)??{},[C.trim()]:""}})},className:"text-xs text-indigo-400 hover:text-indigo-300 mt-1",children:"+ Add Env Var"})]})]}),n.jsx(d0,{label:"Operating Modes",items:f.skill.modes,onChange:C=>G({modes:C})}),n.jsx(as,{label:"Interpolation Rules",value:f.skill.interpolationRules,onChange:C=>G({interpolationRules:C}),rows:3,placeholder:"How this persona should reason when explicit opinions are missing..."}),n.jsx(as,{label:"System Prompt Override (leave empty to compile from soul)",value:f.systemPromptOverride,onChange:C=>m(Y=>({...Y,systemPromptOverride:C})),rows:6,placeholder:"Optionally paste a raw system prompt here to bypass soul compilation..."}),c&&n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("label",{className:"text-xs font-medium text-slate-400",children:"Compiled System Prompt Preview"}),n.jsxs("button",{onClick:K,disabled:O,className:"flex items-center gap-1.5 text-xs text-indigo-400 hover:text-indigo-300 disabled:opacity-50",children:[n.jsx(Di,{className:"h-3.5 w-3.5"}),O?"Loading...":"Preview"]})]}),N&&n.jsx("pre",{className:"bg-[#060d17] border border-white/10 rounded-lg p-4 text-xs text-slate-400 whitespace-pre-wrap font-mono max-h-60 overflow-y-auto",children:N})]})]})]}),n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-t border-white/10",children:[p&&n.jsx("p",{className:"text-sm text-red-400",children:p}),!p&&n.jsx("span",{}),n.jsxs("div",{className:"flex gap-3",children:[n.jsx("button",{onClick:o,className:"px-4 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-200 hover:bg-white/5 transition-colors",children:"Cancel"}),n.jsx("button",{onClick:H,disabled:v,className:"px-5 py-2 rounded-lg text-sm font-medium bg-indigo-600 hover:bg-indigo-500 text-white transition-colors disabled:opacity-50",children:v?"Saving...":c?"Save Changes":"Hire Agent"})]})]})]})]})},Ey=({persona:c,onConfirm:o,onCancel:d})=>{const[r,x]=y.useState(!1),f=async()=>{x(!0),await o(),x(!1)};return n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[n.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:d}),n.jsxs("div",{className:"relative bg-[#0d1117] border border-white/10 rounded-2xl shadow-2xl w-full max-w-sm p-6",children:[n.jsxs("h3",{className:"text-base font-semibold text-slate-100 mb-2",children:["Delete ",c.name,"?"]}),n.jsxs("p",{className:"text-sm text-slate-400 mb-6",children:["This will permanently remove ",c.name,"'s soul from the team. This action cannot be undone."]}),n.jsxs("div",{className:"flex justify-end gap-3",children:[n.jsx("button",{onClick:d,className:"px-4 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-200 hover:bg-white/5",children:"Cancel"}),n.jsx("button",{onClick:f,disabled:r,className:"px-4 py-2 rounded-lg text-sm font-medium bg-red-600 hover:bg-red-500 text-white disabled:opacity-50",children:r?"Deleting...":"Delete"})]})]})]})},Ty=()=>{const{selectedProjectId:c,globalModeLoading:o}=ct(),{data:d,loading:r,error:x,refetch:f}=ut(()=>ey(),[c],{enabled:!o}),[m,v]=y.useState(void 0),[g,p]=y.useState(null),[j,N]=y.useState(!1),[z,O]=y.useState(null),U=y.useCallback(async(K,L)=>{K?await o0(K,L):await ty(L),f()},[f]),T=y.useCallback(async K=>{await ny(K.id),p(null),f()},[f]),A=y.useCallback(async K=>{await o0(K.id,{isActive:!K.isActive}),f()},[f]),G=async()=>{N(!0),O(null);try{await ay(),f()}catch(K){O(K.message)}finally{N(!1)}},B=(d==null?void 0:d.filter(K=>K.isActive).length)??0,H=(d==null?void 0:d.length)??0;return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-start justify-between",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[n.jsx("div",{className:"p-2 rounded-lg bg-indigo-500/10 border border-indigo-500/20",children:n.jsx(vu,{className:"h-5 w-5 text-indigo-400"})}),n.jsx("h1",{className:"text-xl font-semibold text-slate-100",children:"Team"})]}),n.jsxs("p",{className:"text-sm text-slate-500 ml-11",children:[H," agent",H!==1?"s":""," ·"," ",B," active"]})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("button",{onClick:G,disabled:j,className:"flex items-center gap-2 px-3 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-200 hover:bg-white/5 border border-white/10 transition-colors disabled:opacity-50",children:[n.jsx(an,{className:`h-4 w-4 ${j?"animate-spin":""}`}),"Restore Defaults"]}),n.jsxs("button",{onClick:()=>v(null),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium bg-indigo-600 hover:bg-indigo-500 text-white transition-colors",children:[n.jsx(Vl,{className:"h-4 w-4"}),"Hire Agent"]})]})]}),z&&n.jsx("div",{className:"p-3 rounded-lg bg-red-500/10 border border-red-500/20 text-sm text-red-400",children:z}),r&&n.jsx("div",{className:"flex items-center justify-center py-20",children:n.jsx("div",{className:"h-8 w-8 border-2 border-indigo-500 border-t-transparent rounded-full animate-spin"})}),x&&n.jsxs("div",{className:"p-4 rounded-xl bg-red-500/10 border border-red-500/20 text-sm text-red-400",children:["Failed to load agents: ",x.message]}),!r&&!x&&d&&d.length===0&&n.jsxs("div",{className:"text-center py-20",children:[n.jsx(vu,{className:"h-12 w-12 text-slate-700 mx-auto mb-4"}),n.jsx("p",{className:"text-slate-500 mb-2",children:"No agents yet"}),n.jsx("p",{className:"text-sm text-slate-600 mb-6",children:"Hire your first agent or restore the defaults to meet the team."}),n.jsxs("div",{className:"flex justify-center gap-3",children:[n.jsxs("button",{onClick:G,className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-200 border border-white/10 hover:bg-white/5 transition-colors",children:[n.jsx(an,{className:"h-4 w-4"}),"Restore Defaults"]}),n.jsxs("button",{onClick:()=>v(null),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium bg-indigo-600 hover:bg-indigo-500 text-white",children:[n.jsx(Vl,{className:"h-4 w-4"}),"Hire Agent"]})]})]}),!r&&!x&&d&&d.length>0&&n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[d.map(K=>n.jsx(yy,{persona:K,onEdit:v,onDelete:p,onToggleActive:A},K.id)),n.jsxs("button",{onClick:()=>v(null),className:"rounded-xl border border-dashed border-white/10 p-5 flex flex-col items-center justify-center gap-3 text-slate-600 hover:text-slate-400 hover:border-white/20 hover:bg-white/5 transition-all duration-200 min-h-[200px]",children:[n.jsx(Vl,{className:"h-8 w-8"}),n.jsx("span",{className:"text-sm font-medium",children:"Hire Agent"})]})]}),!r&&!x&&d&&d.length>0&&n.jsx("div",{className:"mt-2",children:n.jsxs("details",{className:"group",children:[n.jsxs("summary",{className:"flex items-center gap-2 text-xs text-slate-600 cursor-pointer hover:text-slate-400 select-none",children:[n.jsx(Mi,{className:"h-3.5 w-3.5 group-open:rotate-90 transition-transform"}),"View soul documents"]}),n.jsx("div",{className:"mt-4 space-y-3",children:d.map(K=>n.jsxs("div",{className:"rounded-xl border border-white/5 bg-[#0d1117]/60 p-4",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsx(Ou,{persona:K,size:"sm"}),n.jsxs("div",{children:[n.jsx("span",{className:"text-sm font-medium text-slate-200",children:K.name}),n.jsx("span",{className:"text-xs text-slate-500 ml-2",children:K.role})]})]}),K.soul.whoIAm&&n.jsx("p",{className:"text-xs text-slate-500 leading-relaxed mb-2",children:K.soul.whoIAm}),K.soul.worldview.length>0&&n.jsx("ul",{className:"space-y-1",children:K.soul.worldview.slice(0,3).map((L,C)=>n.jsx("li",{className:"text-xs text-slate-600 pl-3 border-l border-white/5",children:L},C))})]},K.id))})]})}),m!==void 0&&n.jsx(Cy,{persona:m,onClose:()=>v(void 0),onSave:U}),g&&n.jsx(Ey,{persona:g,onConfirm:()=>T(g),onCancel:()=>p(null)})]})},ye=({children:c,className:o="",onClick:d})=>n.jsxs("div",{className:`
|
|
390
|
-
relative bg-[#0b101b] rounded-xl border border-white/5
|
|
391
|
-
shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
|
|
392
|
-
transition-all duration-300
|
|
393
|
-
${d?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
|
|
394
|
-
${o}
|
|
395
|
-
`,onClick:d,children:[d&&n.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),n.jsx("div",{className:"relative z-10",children:c})]}),oe=({children:c,variant:o="primary",size:d="md",loading:r=!1,className:x="",disabled:f,...m})=>{const v="inline-flex items-center justify-center rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-offset-[#030712] disabled:opacity-50 disabled:pointer-events-none active:scale-[0.98]",g={primary:"bg-indigo-600 text-white hover:bg-indigo-500 focus:ring-indigo-500 shadow-[0_0_15px_-3px_rgba(79,70,229,0.4)] border border-indigo-500/50 hover:shadow-[0_0_20px_-3px_rgba(79,70,229,0.5)]",secondary:"bg-[#1f2937] text-slate-200 hover:bg-[#374151] focus:ring-slate-500 border border-white/5",danger:"bg-red-600/10 text-red-400 hover:bg-red-600/20 focus:ring-red-500 border border-red-900/50 hover:border-red-500/50",ghost:"bg-transparent text-slate-400 hover:bg-white/5 hover:text-slate-200 focus:ring-slate-400",outline:"border border-slate-700/50 bg-transparent text-slate-300 hover:bg-white/5 hover:border-slate-500 focus:ring-slate-400"},p={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return n.jsxs("button",{className:`${v} ${g[o]} ${p[d]} ${x}`,disabled:f||r,...m,children:[r&&n.jsx(fa,{className:"mr-2 h-4 w-4 animate-spin"}),c]})},xa=({children:c,variant:o="default",className:d=""})=>{const r={default:"bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20",success:"bg-emerald-500/10 text-emerald-400 ring-1 ring-inset ring-emerald-500/20",warning:"bg-amber-500/10 text-amber-400 ring-1 ring-inset ring-amber-500/20",error:"bg-red-500/10 text-red-400 ring-1 ring-inset ring-red-500/20",neutral:"bg-slate-500/10 text-slate-400 ring-1 ring-inset ring-slate-500/20",info:"bg-blue-500/10 text-blue-400 ring-1 ring-inset ring-blue-500/20"};return n.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${r[o]} ${d}`,children:c})},W0={Draft:{dot:"bg-slate-500",badge:"neutral"},Ready:{dot:"bg-green-500",badge:"success"},"In Progress":{dot:"bg-blue-500",badge:"info"},Review:{dot:"bg-amber-500",badge:"warning"},Done:{dot:"bg-slate-600",badge:"neutral"}},Ay=({defaultColumn:c,onClose:o,onCreated:d})=>{const[r,x]=y.useState(""),[f,m]=y.useState(""),[v,g]=y.useState(c),[p,j]=y.useState(!1),[N,z]=y.useState(null),{addToast:O}=ct(),U=async T=>{if(T.preventDefault(),!!r.trim()){j(!0),z(null);try{await cy({title:r.trim(),body:f,column:v}),O({title:"Issue created",message:`"${r.trim()}" added to ${v}`,type:"success"}),d(),o()}catch(A){z(A instanceof Error?A.message:"Failed to create issue")}finally{j(!1)}}};return n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[n.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:o}),n.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[n.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[n.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),n.jsx("button",{onClick:o,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:n.jsx(gl,{className:"h-5 w-5"})})]}),n.jsxs("form",{onSubmit:U,className:"p-6 space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),n.jsx("input",{type:"text",value:r,onChange:T=>x(T.target.value),placeholder:"Issue title...",required:!0,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),n.jsx("select",{value:v,onChange:T=>g(T.target.value),className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-indigo-500/50 appearance-none cursor-pointer",children:Ql.map(T=>n.jsx("option",{value:T,children:T},T))})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),n.jsx("textarea",{value:f,onChange:T=>m(T.target.value),placeholder:"Issue description...",rows:5,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-none font-mono"})]}),N&&n.jsx("p",{className:"text-sm text-red-400",children:N}),n.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[n.jsx(oe,{variant:"ghost",type:"button",onClick:o,children:"Cancel"}),n.jsx(oe,{type:"submit",disabled:p||!r.trim(),children:p?"Creating...":"Create Issue"})]})]})]})]})},Ry=({issue:c,onClose:o,onMoved:d,onClosed:r})=>{const[x,f]=y.useState(!1),[m,v]=y.useState(!1),{addToast:g}=ct(),p=async z=>{if(z!==c.column){f(!0);try{await J0(c.number,z),g({title:"Issue moved",message:`#${c.number} moved to ${z}`,type:"success"}),d(),o()}catch(O){g({title:"Move failed",message:O instanceof Error?O.message:"Failed to move issue",type:"error"})}finally{f(!1)}}},j=async()=>{if(confirm(`Close issue #${c.number}: "${c.title}"?`)){v(!0);try{await ry(c.number),g({title:"Issue closed",message:`#${c.number} closed on GitHub`,type:"success"}),r(),o()}catch(z){g({title:"Close failed",message:z instanceof Error?z.message:"Failed to close issue",type:"error"})}finally{v(!1)}}},N=c.column??"Draft";return n.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[n.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:o}),n.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[n.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[n.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[n.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[n.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",c.number]}),n.jsx(xa,{variant:W0[N].badge,children:N})]}),n.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:c.title}),c.assignees.length>0&&n.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",c.assignees.join(", ")]})]}),n.jsx("button",{onClick:o,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:n.jsx(gl,{className:"h-5 w-5"})})]}),n.jsxs("div",{className:"flex items-center space-x-3 px-6 py-3 border-b border-white/5 flex-shrink-0 flex-wrap gap-y-2",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:"text-xs text-slate-500",children:"Move to:"}),Ql.filter(z=>z!==c.column).map(z=>n.jsx("button",{onClick:()=>p(z),disabled:x,className:"text-xs px-2.5 py-1 rounded-md bg-slate-800 text-slate-300 hover:bg-slate-700 hover:text-slate-100 border border-slate-700 transition-colors disabled:opacity-50",children:z},z))]}),n.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[n.jsxs("a",{href:c.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-1 text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:[n.jsx(Ru,{className:"h-3.5 w-3.5"}),n.jsx("span",{children:"GitHub"})]}),n.jsx("button",{onClick:j,disabled:m,className:"text-xs px-2.5 py-1 rounded-md bg-red-500/10 text-red-400 hover:bg-red-500/20 border border-red-500/20 transition-colors disabled:opacity-50",children:m?"Closing...":"Close Issue"})]})]}),n.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c.body?n.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:c.body}):n.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},_y=({issue:c,onClick:o,onDragStart:d})=>{const[r,x]=y.useState(!1);return n.jsx("div",{className:"relative",draggable:!0,onDragStart:f=>{f.dataTransfer.setData("issueNumber",String(c.number)),f.dataTransfer.effectAllowed="move",x(!0),d(c)},onDragEnd:()=>x(!1),children:n.jsxs(ye,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${r?"opacity-30":""}`,onClick:o,children:[n.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",c.number]}),n.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:c.title}),c.assignees.length>0&&n.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:c.assignees.join(", ")})]})})},My=({name:c,issues:o,draggingIssue:d,onIssueClick:r,onNewIssue:x,onMoveIssue:f,onDragStart:m})=>{const v=W0[c],[g,p]=y.useState(!1),j=d!==null&&d.column!==c;return n.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${g&&j?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:N=>{j&&(N.preventDefault(),N.dataTransfer.dropEffect="move",p(!0))},onDragLeave:()=>p(!1),onDrop:N=>{N.preventDefault(),p(!1),d&&d.column!==c&&f(d,c)},children:[n.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${v.dot}`}),n.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:c}),n.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:o.length})]}),n.jsx("button",{onClick:()=>x(c),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${c}`,children:n.jsx(Vl,{className:"h-3.5 w-3.5"})})]}),n.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:o.length===0?n.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${g&&j?"border-indigo-500/40":"border-slate-800"}`,children:n.jsx("span",{className:"text-xs text-slate-700",children:g&&j?"Drop here":"No issues"})}):o.map(N=>n.jsx(_y,{issue:N,onClick:()=>r(N),onDragStart:m},N.id))})]})},zy=()=>{const[c,o]=y.useState(null),[d,r]=y.useState(null),[x,f]=y.useState(null),[m,v]=y.useState(null),g=y.useRef(!1),{addToast:p,selectedProjectId:j,globalModeLoading:N}=ct(),{data:z,loading:O,error:U,refetch:T}=ut(K0,[j],{enabled:!N});y.useEffect(()=>{const B=setInterval(()=>{g.current||T()},3e4);return()=>clearInterval(B)},[T]);const A=y.useCallback(async(B,H)=>{f(null);const K=m??(z==null?void 0:z.columns);if(!K)return;const L=K,C={};for(const P of Ql)C[P]=(K[P]??[]).filter(I=>I.number!==B.number);const Y={...B,column:H};C[H]=[...C[H]??[],Y],v(C),o(P=>(P==null?void 0:P.number)===B.number?Y:P),g.current=!0;try{await J0(B.number,H),T(),setTimeout(()=>{v(null),g.current=!1},800)}catch(P){v(L),o(I=>(I==null?void 0:I.number)===B.number?B:I),g.current=!1,p({title:"Move failed",message:P instanceof Error?P.message:"Failed to move issue",type:"error"})}},[p,T,m,z]);if(N||O)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(U&&U.message.includes("Board not configured"))return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx("div",{className:"text-4xl",children:"📋"}),n.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"Board not configured"}),n.jsxs("p",{className:"text-slate-500 text-sm max-w-sm text-center",children:["Run ",n.jsx("code",{className:"font-mono bg-slate-800 px-2 py-0.5 rounded text-indigo-300",children:"night-watch board setup"})," in your project to create a GitHub Projects board."]})]});if(U)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx("div",{className:"text-slate-300",children:"Failed to load board"}),n.jsx("div",{className:"text-sm text-slate-500",children:U.message}),n.jsx(oe,{onClick:()=>T(),children:"Retry"})]});if(!z)return null;const G=m??z.columns;return n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsxs("div",{className:"flex items-center justify-between mb-6 flex-shrink-0",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Board"}),n.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[Ql.reduce((B,H)=>{var K;return B+(((K=G[H])==null?void 0:K.length)??0)},0)," issues across ",Ql.length," columns"]})]}),n.jsxs(oe,{onClick:()=>r("Ready"),children:[n.jsx(Vl,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),n.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>f(null),children:n.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Ql.length*236}px`},children:Ql.map(B=>n.jsx(My,{name:B,issues:G[B]??[],draggingIssue:x,onIssueClick:o,onNewIssue:r,onMoveIssue:A,onDragStart:f},B))})}),c&&n.jsx(Ry,{issue:c,onClose:()=>o(null),onMoved:()=>T(),onClosed:()=>T()}),d&&n.jsx(Ay,{defaultColumn:d,onClose:()=>r(null),onCreated:()=>T()})]})},Dy={Draft:"text-slate-400 bg-slate-500/10 ring-slate-500/20",Ready:"text-green-400 bg-green-500/10 ring-green-500/20","In Progress":"text-blue-400 bg-blue-500/10 ring-blue-500/20",Review:"text-amber-400 bg-amber-500/10 ring-amber-500/20",Done:"text-slate-500 bg-slate-600/10 ring-slate-600/20"},Oy=()=>{var J,ue,Ue;const c=wu(),[o,d]=y.useState(null),[r,x]=y.useState(!1),[f,m]=y.useState(null),{setProjectName:v,addToast:g,selectedProjectId:p,globalModeLoading:j}=ct(),{data:N,loading:z,error:O,refetch:U}=ut(Z0,[p],{enabled:!j}),{data:T}=ut($0,[p],{enabled:!j}),{data:A}=ut(()=>K0().catch(()=>null),[p],{enabled:!j});oy(ae=>{m(ae)},[p,j],{enabled:!j});const G=f||N;if(Ve.useEffect(()=>{G!=null&&G.projectName&&v(G.projectName)},[G,v]),y.useEffect(()=>{const ae=setInterval(()=>{U()},3e4);return()=>clearInterval(ae)},[U]),y.useEffect(()=>{const ae=()=>U();return window.addEventListener("focus",ae),()=>window.removeEventListener("focus",ae)},[U]),j||z)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(O)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Xt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load dashboard data"}),n.jsx("div",{className:"text-sm text-slate-500",children:O.message}),n.jsx(oe,{onClick:()=>U(),children:"Retry"})]});if(!G)return null;const B=G.prds.filter(ae=>ae.status==="ready").length,H=G.prds.filter(ae=>ae.status==="in-progress"),K=G.prs.length,L=G.prs.filter(ae=>ae.reviewScore!==null&&ae.reviewScore<70).length,C=G.processes.find(ae=>ae.name==="executor"),Y=G.processes.find(ae=>ae.name==="reviewer"),P=G.processes.find(ae=>ae.name==="qa"),I=async ae=>{d(ae);try{const k=await Pb(ae),F=k.results.every(ne=>ne.success);g({title:F?"Process Cancelled":"Cancel Failed",message:k.results.map(ne=>ne.message).join("; "),type:F?"success":"error"})}catch(k){g({title:"Cancel Failed",message:k instanceof Error?k.message:"Failed to cancel process",type:"error"})}finally{d(null),U()}},Z=async()=>{x(!0);try{await uy(),g({title:"Lock Cleared",message:"Stale executor state removed",type:"success"}),U()}catch(ae){g({title:"Clear Failed",message:ae instanceof Error?ae.message:"Failed to clear lock",type:"error"})}finally{x(!1)}},fe=ae=>{if(!ae)return"Not scheduled";try{const k=new Date(ae),F=new Date,ne=k.getTime()-F.getTime(),$=Math.floor(ne/6e4);return $<0?"Running now...":$<60?`In ${$} min`:$<1440?`In ${Math.floor($/60)} hr${$>=120?"s":""}`:`In ${Math.floor($/1440)} day${$>=2880?"s":""}`}catch{return"Unknown"}};return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsxs(ye,{className:"p-5",onClick:()=>c("/prds"),children:[n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-500",children:"PRDs Ready"}),n.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:B})]}),n.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:n.jsx(cs,{className:"h-5 w-5"})})]}),n.jsxs("p",{className:"text-xs text-slate-500 mt-4",children:["of ",G.prds.length," total"]})]}),n.jsxs(ye,{className:"p-5",onClick:()=>c("/prds"),children:[n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),n.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:H.length})]}),n.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:n.jsx(H0,{className:"h-5 w-5"})})]}),n.jsx("p",{className:"text-xs text-slate-500 mt-4 truncate",children:H.length===1?H[0].name:`${H.length} active`})]}),n.jsxs(ye,{className:"p-5",onClick:()=>c("/prs"),children:[n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),n.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:K})]}),n.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:n.jsx(zi,{className:"h-5 w-5"})})]}),n.jsx("p",{className:`text-xs mt-4 ${L>0?"text-red-400 font-medium":"text-slate-500"}`,children:L>0?`${L} need work`:"All passing"})]}),n.jsxs(ye,{className:"p-5",children:[n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Cron Status"}),n.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:G.crontab.installed?"Active":"Inactive"})]}),n.jsx("div",{className:`p-2 rounded-lg ${G.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:n.jsx(_i,{className:"h-5 w-5"})})]}),n.jsx("p",{className:"text-xs text-slate-500 mt-4",children:G.crontab.installed?`${G.crontab.entries.length} entr${G.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),n.jsxs(ye,{className:"p-6",children:[n.jsx("h2",{className:"text-base font-semibold text-slate-200 mb-4",children:"System Status"}),n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Project"}),n.jsx("p",{className:"text-sm text-slate-200",children:G.projectName})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Provider"}),n.jsx("p",{className:"text-sm text-slate-200 capitalize",children:G.config.provider})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"PRD Directory"}),n.jsx("p",{className:"text-sm text-slate-200",children:G.config.prdDir})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Last Updated"}),n.jsx("p",{className:"text-sm text-slate-200",children:new Date(G.timestamp).toLocaleString()})]})]})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs(ye,{className:"p-6",children:[n.jsx("h3",{className:"text-base font-semibold text-slate-200 mb-4",children:"Process Status"}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${C!=null&&C.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),n.jsxs("div",{children:[n.jsx("div",{className:`font-medium ${C!=null&&C.running?"text-slate-200":"text-slate-400"}`,children:"Executor"}),n.jsx("div",{className:"text-xs text-slate-500",children:C!=null&&C.running?`PID: ${C.pid} • ${G.activePrd??"Running"}`:"Idle"})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[(C==null?void 0:C.running)&&n.jsxs(oe,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300",onClick:()=>I("run"),disabled:o==="run",children:[n.jsx(pu,{className:"h-4 w-4 mr-1"}),o==="run"?"Stopping...":"Stop"]}),!(C!=null&&C.running)&&H.length>0&&n.jsx(oe,{size:"sm",variant:"ghost",className:"text-amber-400 hover:text-amber-300",onClick:Z,disabled:r,children:r?"Clearing...":"Force Clear"}),n.jsx(oe,{size:"sm",variant:"ghost",onClick:()=>c("/logs"),children:"View Log"})]})]}),n.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${Y!=null&&Y.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),n.jsxs("div",{children:[n.jsx("div",{className:`font-medium ${Y!=null&&Y.running?"text-slate-200":"text-slate-400"}`,children:"Reviewer"}),n.jsx("div",{className:"text-xs text-slate-500",children:Y!=null&&Y.running?`PID: ${Y.pid} • Running`:"Idle"})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[(Y==null?void 0:Y.running)&&n.jsxs(oe,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300",onClick:()=>I("review"),disabled:o==="review",children:[n.jsx(pu,{className:"h-4 w-4 mr-1"}),o==="review"?"Stopping...":"Stop"]}),n.jsx(oe,{size:"sm",variant:"ghost",onClick:()=>c("/logs"),disabled:!(Y!=null&&Y.running),children:"View Log"})]})]}),n.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${P!=null&&P.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),n.jsxs("div",{children:[n.jsx("div",{className:`font-medium ${P!=null&&P.running?"text-slate-200":"text-slate-400"}`,children:"QA"}),n.jsx("div",{className:"text-xs text-slate-500",children:P!=null&&P.running?`PID: ${P.pid} • Running`:"Idle"})]})]}),n.jsx("div",{className:"flex items-center space-x-2",children:n.jsx(oe,{size:"sm",variant:"ghost",onClick:()=>c("/logs"),children:"View Log"})})]})]})]}),n.jsxs(ye,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-base font-semibold text-slate-200",children:"Scheduling"}),n.jsxs("button",{onClick:()=>c("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",n.jsx(l0,{className:"ml-1 h-3 w-3"})]})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`p-1.5 rounded-md ${T!=null&&T.executor.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-800 text-slate-500"}`,children:n.jsx(_i,{className:"h-4 w-4"})}),n.jsxs("div",{children:[n.jsx("div",{className:`text-sm font-medium ${T!=null&&T.executor.installed?"text-slate-200":"text-slate-500"}`,children:"Executor"}),n.jsx("div",{className:"text-xs text-slate-500",children:T!=null&&T.paused?"Paused":fe(T==null?void 0:T.executor.nextRun)})]})]})}),n.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`p-1.5 rounded-md ${T!=null&&T.reviewer.installed?"bg-purple-500/10 text-purple-400":"bg-slate-800 text-slate-500"}`,children:n.jsx(zi,{className:"h-4 w-4"})}),n.jsxs("div",{children:[n.jsx("div",{className:`text-sm font-medium ${T!=null&&T.reviewer.installed?"text-slate-200":"text-slate-500"}`,children:"Reviewer"}),n.jsx("div",{className:"text-xs text-slate-500",children:T!=null&&T.paused?"Paused":fe(T==null?void 0:T.reviewer.nextRun)})]})]})}),n.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`p-1.5 rounded-md ${(J=T==null?void 0:T.qa)!=null&&J.installed?"bg-green-500/10 text-green-400":"bg-slate-800 text-slate-500"}`,children:n.jsx(Cb,{className:"h-4 w-4"})}),n.jsxs("div",{children:[n.jsx("div",{className:`text-sm font-medium ${(ue=T==null?void 0:T.qa)!=null&&ue.installed?"text-slate-200":"text-slate-500"}`,children:"QA"}),n.jsx("div",{className:"text-xs text-slate-500",children:T!=null&&T.paused?"Paused":fe((Ue=T==null?void 0:T.qa)==null?void 0:Ue.nextRun)})]})]})})]})]})]}),n.jsxs("div",{className:"mt-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:"GitHub Board"}),n.jsxs("button",{onClick:()=>c("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",n.jsx(l0,{className:"ml-1 h-3 w-3"})]})]}),n.jsx(ye,{className:"p-4",children:A?n.jsx("div",{className:"flex flex-wrap gap-3",children:Ql.map(ae=>{var F;const k=((F=A.columns[ae])==null?void 0:F.length)??0;return n.jsxs("button",{onClick:()=>c("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${Dy[ae]}`,children:[n.jsx("span",{className:"text-xs font-medium",children:ae}),n.jsx("span",{className:"text-xs font-bold",children:k})]},ae)})}):n.jsxs("p",{className:"text-sm text-slate-500 italic",children:["Board not configured — run ",n.jsx("code",{className:"font-mono bg-slate-800 px-1.5 py-0.5 rounded text-indigo-300 text-xs",children:"night-watch board setup"})," to enable."]})})]})]})},Ae=Ve.forwardRef(({className:c="",label:o,error:d,helperText:r,rightIcon:x,...f},m)=>n.jsxs("div",{className:"w-full",children:[o&&n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:o}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{ref:m,className:`
|
|
396
|
-
w-full rounded-lg bg-slate-950 border border-slate-800
|
|
397
|
-
px-3 py-2 text-sm text-slate-200
|
|
398
|
-
placeholder:text-slate-600
|
|
399
|
-
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
400
|
-
disabled:opacity-50 disabled:cursor-not-allowed
|
|
401
|
-
transition-all duration-200
|
|
402
|
-
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
403
|
-
${x?"pr-10":""}
|
|
404
|
-
${c}
|
|
405
|
-
`,...f}),x&&n.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:x})]}),d?n.jsx("p",{className:"mt-1.5 text-xs text-red-400",children:d}):r?n.jsx("p",{className:"mt-1.5 text-xs text-slate-500",children:r}):null]}));Ae.displayName="Input";const Xl=Ve.forwardRef(({className:c="",label:o,error:d,helperText:r,options:x,value:f,onChange:m,children:v,...g},p)=>{const j=N=>{m&&m(N.target.value)};return n.jsxs("div",{className:"w-full",children:[o&&n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:o}),n.jsxs("div",{className:"relative",children:[n.jsx("select",{ref:p,className:`
|
|
406
|
-
w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
|
|
407
|
-
px-3 py-2 pr-10 text-sm text-slate-200
|
|
408
|
-
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
409
|
-
disabled:opacity-50 disabled:cursor-not-allowed
|
|
410
|
-
transition-all duration-200
|
|
411
|
-
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
412
|
-
${c}
|
|
413
|
-
`,value:f,onChange:j,...g,children:x?x.map(N=>n.jsx("option",{value:N.value,children:N.label},N.value)):v}),n.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:n.jsx(Rv,{className:"h-4 w-4"})})]}),d?n.jsx("p",{className:"mt-1.5 text-xs text-red-400",children:d}):r?n.jsx("p",{className:"mt-1.5 text-xs text-slate-500",children:r}):null]})});Xl.displayName="Select";function ky(){var F,ne;const{data:c,refetch:o}=ut(Du),{addToast:d}=ct(),[r,x]=y.useState(1),[f,m]=y.useState(!1),[v,g]=y.useState(!1),[p,j]=y.useState([]),[N,z]=y.useState(!1),[O,U]=y.useState(""),[T,A]=y.useState(""),[G,B]=y.useState(""),[H,K]=y.useState(""),[L,C]=y.useState(""),[Y,P]=y.useState("");Ve.useEffect(()=>{var $,me,w,X;c!=null&&c.slack&&(U(c.slack.botToken||""),A(c.slack.appToken||""),B((($=c.slack.channels)==null?void 0:$.eng)||""),K(((me=c.slack.channels)==null?void 0:me.prs)||""),C(((w=c.slack.channels)==null?void 0:w.incidents)||""),P(((X=c.slack.channels)==null?void 0:X.releases)||""))},[c]);const I=async()=>{try{m(!0),await Oi({slack:{enabled:!1,botToken:"",appToken:"",channels:{eng:"",prs:"",incidents:"",releases:""},autoCreateProjectChannels:!1,discussionEnabled:!0}}),U(""),A(""),B(""),K(""),C(""),P(""),x(1),o(),d({title:"Disconnected",message:"Slack integration removed.",type:"success"})}catch($){d({title:"Error",message:$.message||"Failed to disconnect",type:"error"})}finally{m(!1)}},Z=async($=!1)=>{try{m(!0),await Oi({slack:{enabled:!0,botToken:O,appToken:T,channels:{eng:G,prs:H,incidents:L,releases:Y},autoCreateProjectChannels:!0,discussionEnabled:!0}}),d({title:"Success",message:"Slack configuration saved successfully.",type:"success"}),o(),x($?1:r+1)}catch(me){d({title:"Error",message:me.message||"Failed to save configuration",type:"error"})}finally{m(!1)}},fe=async()=>{if(x(3),!!O.startsWith("xoxb-"))try{z(!0);const $=await sy(O);j($);const me=he=>{var xe;return(xe=$.find(Le=>Le.name.toLowerCase()===he))==null?void 0:xe.id},w=G||me("eng"),X=H||me("prs"),W=L||me("incidents"),ee=Y||me("releases"),re=[];if(w||re.push({name:"eng",setter:B}),X||re.push({name:"prs",setter:K}),W||re.push({name:"incidents",setter:C}),ee||re.push({name:"releases",setter:P}),re.length>0){d({title:"Creating Channels",message:`Auto-creating missing channels: ${re.map(xe=>"#"+xe.name).join(", ")}`,type:"info"});const he=[...$];for(const xe of re)try{const Le=await iy(O,xe.name),qe=Le.channelId;xe.setter(qe),he.push({id:qe,name:xe.name}),Le.inviteWarning?d({title:"Channel Created with Warning",message:`#${xe.name}: ${Le.inviteWarning}`,type:"warning"}):Le.welcomeMessagePosted||d({title:"Channel Created",message:`#${xe.name} was created, but welcome message failed to post.`,type:"warning"})}catch(Le){console.error("Failed to create channel:",xe.name,Le)}j(he)}else w&&B(w),X&&K(X),W&&C(W),ee&&P(ee)}catch{d({title:"Warning",message:"Could not fetch channels automatically. Please verify your token.",type:"warning"})}finally{z(!1)}},J="https://api.slack.com/apps?new_app=1",ue=`{
|
|
414
|
-
"display_information": {
|
|
415
|
-
"name": "Night Watch AI",
|
|
416
|
-
"description": "AI-driven startup team",
|
|
417
|
-
"background_color": "#0d1117"
|
|
418
|
-
},
|
|
419
|
-
"features": {
|
|
420
|
-
"bot_user": {
|
|
421
|
-
"display_name": "Night Watch AI",
|
|
422
|
-
"always_online": true
|
|
423
|
-
}
|
|
424
|
-
},
|
|
425
|
-
"oauth_config": {
|
|
426
|
-
"scopes": {
|
|
427
|
-
"bot": [
|
|
428
|
-
"chat:write",
|
|
429
|
-
"chat:write.customize",
|
|
430
|
-
"channels:manage",
|
|
431
|
-
"channels:read",
|
|
432
|
-
"channels:join",
|
|
433
|
-
"reactions:write",
|
|
434
|
-
"reactions:read",
|
|
435
|
-
"app_mentions:read",
|
|
436
|
-
"channels:history",
|
|
437
|
-
"users:read"
|
|
438
|
-
]
|
|
439
|
-
}
|
|
440
|
-
},
|
|
441
|
-
"settings": {
|
|
442
|
-
"event_subscriptions": {
|
|
443
|
-
"bot_events": [
|
|
444
|
-
"app_mention",
|
|
445
|
-
"message.channels"
|
|
446
|
-
]
|
|
447
|
-
},
|
|
448
|
-
"socket_mode_enabled": true,
|
|
449
|
-
"token_rotation_enabled": false,
|
|
450
|
-
"org_deploy_enabled": false
|
|
451
|
-
}
|
|
452
|
-
} `;if(!c)return n.jsx("div",{className:"animate-pulse flex space-x-4",children:"Loading..."});const Ue=((F=c.slack)==null?void 0:F.enabled)&&((ne=c.slack)==null?void 0:ne.botToken),ae=()=>n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsxs("h2",{className:"text-xl font-bold flex items-center gap-3",children:[n.jsx(i0,{className:"w-6 h-6 text-indigo-400"}),"Slack Bot Configuration"]}),n.jsx("p",{className:"text-slate-400 mt-1",children:"Manage your connected Slack workspace."})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-400 bg-green-400/10 px-3 py-1.5 rounded-full border border-green-500/20",children:[n.jsx(ln,{className:"w-4 h-4"})," Connected"]}),n.jsx(oe,{variant:"ghost",onClick:I,loading:f,className:"text-red-400 hover:text-red-300 hover:bg-red-500/10 border border-red-500/20 text-sm px-3 py-1.5",children:"Disconnect"})]})]}),n.jsxs(ye,{className:"p-6 space-y-4",children:[n.jsx("h3",{className:"font-medium text-slate-200 border-b border-white/10 pb-2 mb-4",children:"API Token"}),n.jsx("div",{className:"flex gap-4",children:n.jsx(Ae,{label:"Bot User OAuth Token",type:v?"text":"password",value:O,onChange:$=>U($.target.value),className:"flex-1",rightIcon:n.jsx("button",{type:"button",onClick:()=>g(!v),className:"hover:text-slate-300 pointer-events-auto transition-colors",children:v?n.jsx(gu,{className:"w-4 h-4"}):n.jsx(Di,{className:"w-4 h-4"})})})}),n.jsxs("div",{className:"mt-4",children:[n.jsx(Ae,{label:"App-Level Token (Socket Mode)",type:v?"text":"password",value:T,onChange:$=>A($.target.value),placeholder:"xapp-..."}),n.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Required for real-time agent mentions like ",n.jsx("code",{children:"@maya"}),"."]})]}),n.jsxs("div",{className:"flex items-center justify-between border-b border-white/10 pb-2 mb-4 mt-8",children:[n.jsx("h3",{className:"font-medium text-slate-200",children:"Channels"}),n.jsx("span",{className:"text-[10px] uppercase tracking-wider text-slate-500 font-bold",children:"Public & Visible"})]}),n.jsx("div",{className:"grid grid-cols-2 gap-6",children:[{label:"eng",id:G},{label:"prs",id:H},{label:"incidents",id:L},{label:"releases",id:Y}].map($=>n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("label",{className:"text-xs font-medium text-slate-400 capitalize",children:["#",$.label," Channel"]}),$.id&&n.jsxs("button",{onClick:()=>window.open(`https://slack.com/app_redirect?channel=${$.id}`,"_blank"),className:"text-[10px] text-indigo-400 hover:text-indigo-300 flex items-center gap-1 transition-colors",children:["Open ",n.jsx(Ru,{className:"w-2.5 h-2.5"})]})]}),n.jsx(Ae,{value:$.id,onChange:me=>{$.label==="eng"&&B(me.target.value),$.label==="prs"&&K(me.target.value),$.label==="incidents"&&C(me.target.value),$.label==="releases"&&P(me.target.value)},placeholder:"C1234567890"})]},$.label))}),n.jsx("div",{className:"mt-6 p-3 bg-indigo-500/5 border border-indigo-500/10 rounded-lg",children:n.jsxs("p",{className:"text-xs text-slate-400 leading-relaxed",children:[n.jsx("strong",{className:"text-indigo-300",children:"Pro Tip:"})," Channels are created as ",n.jsx("strong",{children:"Public"}),". If you don't see them in your sidebar, click ",n.jsx("b",{children:'"Add Channels" > "Browse all channels"'})," in Slack to join them for the first time."]})}),n.jsx("div",{className:"pt-6 border-t border-white/10 flex justify-end",children:n.jsx(oe,{onClick:()=>Z(!0),loading:f,children:"Save Changes"})})]})]}),k=[{number:1,title:"Create App",icon:wv},{number:2,title:"Tokens & Scopes",icon:X0},{number:3,title:"Channels",icon:hl}];return n.jsxs("div",{className:"max-w-4xl mx-auto space-y-8 animate-in fade-in slide-in-from-bottom-4 duration-500",children:[n.jsxs("div",{className:"flex flex-col gap-2",children:[n.jsx("h1",{className:"text-3xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-indigo-400 to-cyan-400 tracking-tight",children:"Integrations"}),n.jsx("p",{className:"text-slate-400",children:"Connect Night Watch to your tools for a seamless agentic workflow."})]}),Ue&&r===1?ae():n.jsxs(ye,{className:"p-8",children:[n.jsxs("div",{className:"mb-8",children:[n.jsxs("h2",{className:"text-2xl font-bold flex items-center gap-3",children:[n.jsx(i0,{className:"w-7 h-7 text-indigo-400"}),"Connect Slack"]}),n.jsx("p",{className:"text-slate-400 mt-2",children:"Night Watch operates natively in Slack, allowing agents to discuss PRs, triage errors, and collaborate."})]}),n.jsxs("div",{className:"flex items-center justify-between mb-8 relative",children:[n.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-full h-0.5 bg-slate-800 z-0"}),n.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 h-0.5 bg-indigo-500 z-0 transition-all duration-300",style:{width:`${(r-1)/(k.length-1)*100}%`}}),k.map($=>n.jsxs("div",{className:`relative z-10 flex flex-col items-center gap-2 ${r>=$.number?"text-indigo-400":"text-slate-500"}`,children:[n.jsx("div",{className:`w-12 h-12 rounded-full flex items-center justify-center font-bold text-lg border-2 transition-all duration-300 bg-[#0b101b]
|
|
453
|
-
${r>=$.number?"border-indigo-500 glow-indigo":"border-slate-800"}
|
|
454
|
-
${r===$.number?"ring-4 ring-indigo-500/20":""}
|
|
455
|
-
`,children:r>$.number?n.jsx(ln,{className:"w-6 h-6"}):n.jsx($.icon,{className:"w-5 h-5"})}),n.jsx("span",{className:"text-xs font-medium tracking-wide",children:$.title})]},$.number))]}),n.jsxs("div",{className:"min-h-[300px]",children:[r===1&&n.jsxs("div",{className:"space-y-6 animate-in fade-in slide-in-from-right-4",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"1. Create a Slack App via Manifest"}),n.jsx("p",{className:"text-sm text-slate-400",children:"We've made it easy. Copy the JSON manifest below and paste it into the Slack API dashboard to create your app instantly with the correct scopes."}),n.jsxs("div",{className:"bg-[#1e293b] rounded-lg p-4 border border-white/5 relative group",children:[n.jsx("pre",{className:"text-xs text-slate-300 overflow-x-auto",children:n.jsx("code",{children:ue})}),n.jsx(oe,{size:"sm",className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>{navigator.clipboard.writeText(ue),d({title:"Copied",message:"Manifest copied to clipboard",type:"info"})},children:"Copy JSON"})]})]}),n.jsxs("div",{className:"flex justify-between items-center pt-4",children:[n.jsx(oe,{variant:"outline",onClick:()=>window.open(J,"_blank"),children:"Open Slack API Console"}),n.jsxs(oe,{onClick:()=>x(2),children:["Next Step ",n.jsx(Mi,{className:"w-4 h-4 ml-1"})]})]})]}),r===2&&n.jsxs("div",{className:"space-y-6 animate-in fade-in slide-in-from-right-4",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"2. Install App & Get Token"}),n.jsxs("p",{className:"text-sm text-slate-400",children:["After creating the app, navigate to ",n.jsx("strong",{children:"Features > OAuth & Permissions"})," in the left sidebar of the Slack API dashboard. Click ",n.jsx("strong",{children:"Install to Workspace"}),". Once installed, copy the ",n.jsx("strong",{children:"Bot User OAuth Token"})," (starts with ",n.jsx("code",{children:"xoxb-"}),") and paste it below. Then create an ",n.jsx("strong",{children:"App-Level Token"})," with ",n.jsx("code",{children:"connections:write"})," (starts with ",n.jsx("code",{children:"xapp-"}),") and paste it as well. Ignore the Client ID and secrets on the Basic Information page."]}),n.jsxs("div",{className:"max-w-md mt-6",children:[n.jsx(Ae,{label:"Slack Bot Token",placeholder:"xoxb-...",value:O,onChange:$=>U($.target.value),type:v?"text":"password",rightIcon:n.jsx("button",{type:"button",onClick:()=>g(!v),className:"hover:text-slate-300 pointer-events-auto transition-colors",children:v?n.jsx(gu,{className:"w-4 h-4"}):n.jsx(Di,{className:"w-4 h-4"})})}),n.jsxs("div",{className:"mt-4",children:[n.jsx(Ae,{label:"Slack App Token (Socket Mode)",placeholder:"xapp-...",value:T,onChange:$=>A($.target.value),type:v?"text":"password"}),n.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Needed for real-time ",n.jsx("code",{children:"@agent"})," replies (Socket Mode + ",n.jsx("code",{children:"connections:write"}),")."]})]})]})]}),n.jsxs("div",{className:"flex justify-between pt-8",children:[n.jsx(oe,{variant:"ghost",onClick:()=>x(1),children:"Back"}),n.jsxs(oe,{onClick:fe,disabled:!O.startsWith("xoxb-")||N,children:["Next Step ",n.jsx(Mi,{className:"w-4 h-4 ml-1"})]})]})]}),r===3&&n.jsxs("div",{className:"space-y-6 animate-in fade-in slide-in-from-right-4",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"3. Map Channels"}),n.jsx("p",{className:"text-sm text-slate-400",children:`Provide the Slack channel IDs where the agents should operate. You can find the Channel ID at the bottom of the channel's "About" modal in Slack.`}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-8",children:p.length>0?n.jsxs(n.Fragment,{children:[n.jsxs(ye,{className:"p-4 border border-indigo-500/20 bg-indigo-500/5",children:[n.jsxs("div",{className:"mb-3",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-indigo-300",children:[n.jsx(hl,{className:"w-4 h-4"})," eng"]}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"General engineering chat and agent banter."})]}),n.jsx(Xl,{options:[{label:"Select a channel...",value:""},...p.map($=>({label:"#"+$.name,value:$.id}))],value:G,onChange:B})]}),n.jsxs(ye,{className:"p-4 border border-blue-500/20 bg-blue-500/5",children:[n.jsxs("div",{className:"mb-3",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-blue-300",children:[n.jsx(hl,{className:"w-4 h-4"})," prs"]}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Pull Request reviews and agent deliberation."})]}),n.jsx(Xl,{options:[{label:"Select a channel...",value:""},...p.map($=>({label:"#"+$.name,value:$.id}))],value:H,onChange:K})]}),n.jsxs(ye,{className:"p-4 border border-red-500/20 bg-red-500/5",children:[n.jsxs("div",{className:"mb-3",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-red-300",children:[n.jsx(hl,{className:"w-4 h-4"})," incidents"]}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"CI/CD failures and production alerts."})]}),n.jsx(Xl,{options:[{label:"Select a channel...",value:""},...p.map($=>({label:"#"+$.name,value:$.id}))],value:L,onChange:C})]}),n.jsxs(ye,{className:"p-4 border border-emerald-500/20 bg-emerald-500/5",children:[n.jsxs("div",{className:"mb-3",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-emerald-300",children:[n.jsx(hl,{className:"w-4 h-4"})," releases"]}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Ship announcements and merged PRs."})]}),n.jsx(Xl,{options:[{label:"Select a channel...",value:""},...p.map($=>({label:"#"+$.name,value:$.id}))],value:Y,onChange:P})]})]}):n.jsxs(n.Fragment,{children:[n.jsxs(ye,{className:"p-4 border border-indigo-500/20 bg-indigo-500/5",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-indigo-300 mb-2",children:[n.jsx(hl,{className:"w-4 h-4"})," eng"]}),n.jsx(Ae,{placeholder:"C1234567890",value:G,onChange:$=>B($.target.value)})]}),n.jsxs(ye,{className:"p-4 border border-blue-500/20 bg-blue-500/5",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-blue-300 mb-2",children:[n.jsx(hl,{className:"w-4 h-4"})," prs"]}),n.jsx(Ae,{placeholder:"C1234567890",value:H,onChange:$=>K($.target.value)})]}),n.jsxs(ye,{className:"p-4 border border-red-500/20 bg-red-500/5",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-red-300 mb-2",children:[n.jsx(hl,{className:"w-4 h-4"})," incidents"]}),n.jsx(Ae,{placeholder:"C1234567890",value:L,onChange:$=>C($.target.value)})]}),n.jsxs(ye,{className:"p-4 border border-emerald-500/20 bg-emerald-500/5",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-emerald-300 mb-2",children:[n.jsx(hl,{className:"w-4 h-4"})," releases"]}),n.jsx(Ae,{placeholder:"C1234567890",value:Y,onChange:$=>P($.target.value)})]})]})})]}),n.jsxs("div",{className:"flex justify-between pt-8",children:[n.jsx(oe,{variant:"ghost",onClick:()=>x(2),children:"Back"}),n.jsx(oe,{onClick:()=>Z(!0),loading:f,disabled:!G||!H||!L,children:"Complete Setup"})]})]})]})]})]})}const Uy=()=>{const[c,o]=y.useState(!0),[d,r]=y.useState(""),[x,f]=y.useState("executor"),m=y.useRef(null),{selectedProjectId:v,globalModeLoading:g}=ct(),{data:p,loading:j,error:N,refetch:z}=ut(()=>$b(x,500),[x,v],{enabled:!g}),{data:O}=ut(Z0,[v],{enabled:!g}),U=(p==null?void 0:p.lines)||[];y.useEffect(()=>{c&&m.current&&(m.current.scrollTop=m.current.scrollHeight)},[U,c]),y.useEffect(()=>{if(!c)return;const B=window.setInterval(()=>{z()},3e3);return()=>window.clearInterval(B)},[c,x,z]);const T=U.filter(B=>B.toLowerCase().includes(d.toLowerCase())),A=B=>{f(B),r("")},G=B=>{if(!(O!=null&&O.processes))return!1;const H=O.processes.find(K=>K.name===B);return(H==null?void 0:H.running)??!1};return N?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Xt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load logs"}),n.jsx("div",{className:"text-sm text-slate-500",children:N.message}),n.jsx(oe,{onClick:()=>z(),children:"Retry"})]}):n.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsxs("div",{className:"relative group",children:[n.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:d,onChange:B=>r(B.target.value)}),n.jsx(Mu,{className:"absolute left-2.5 top-2 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400"})]}),n.jsx("div",{className:"h-6 w-px bg-slate-700 mx-2"}),n.jsxs("div",{className:"flex space-x-1",children:[n.jsx("button",{onClick:()=>A("executor"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${x==="executor"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{children:"Executor"}),G("executor")&&n.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),n.jsx("button",{onClick:()=>A("reviewer"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${x==="reviewer"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{children:"Reviewer"}),G("reviewer")&&n.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),n.jsx("button",{onClick:()=>A("qa"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${x==="qa"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{children:"QA"}),G("qa")&&n.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsxs(oe,{size:"sm",variant:"ghost",onClick:()=>z(),children:[n.jsx(n0,{className:"h-4 w-4 mr-2"}),"Refresh"]}),n.jsxs(oe,{size:"sm",variant:"ghost",onClick:()=>o(!c),children:[c?n.jsx(G0,{className:"h-4 w-4 mr-2"}):n.jsx(ha,{className:"h-4 w-4 mr-2"}),c?"Pause":"Resume"]})]})]}),n.jsxs("div",{className:"flex-1 bg-slate-900 rounded-xl overflow-hidden shadow-inner border border-slate-800 flex flex-col relative",children:[n.jsxs("div",{className:"bg-slate-950/50 backdrop-blur text-xs text-slate-500 px-4 py-1.5 flex justify-between border-b border-slate-800",children:[n.jsxs("span",{children:["File: ",x,".log"]}),n.jsxs("span",{children:[T.length," lines"]})]}),n.jsxs("div",{ref:m,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[j?n.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):T.length===0?n.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:d?"No logs match your filter":"No logs yet — logs will appear after the first run"}):T.map((B,H)=>{const K=B.includes("[ERROR]"),L=B.includes("[WARN]");return n.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${K?"text-red-400":L?"text-amber-400":"text-slate-300"}`,children:[n.jsx("span",{className:"text-slate-600 select-none w-10 inline-block text-right mr-4 text-xs opacity-50",children:H+1}),B]},H)}),c&&n.jsx("div",{className:"h-4"})," "]}),!c&&n.jsxs("div",{className:"absolute bottom-4 right-4 bg-indigo-600 text-white px-3 py-1.5 rounded-full shadow-lg shadow-indigo-900/40 text-xs font-medium flex items-center cursor-pointer hover:bg-indigo-500 transition-colors",onClick:()=>o(!0),children:[n.jsx(n0,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},du={ready:"Ready","in-progress":"In Progress",blocked:"Blocked","pending-review":"Pending Review",done:"Done"},fu={ready:"success","in-progress":"info",blocked:"error","pending-review":"warning",done:"neutral"},Hy=()=>{const[c,o]=y.useState("list"),[d,r]=y.useState(null),[x,f]=y.useState(!1),[m,v]=y.useState(!1),[g,p]=y.useState("ready"),[j,N]=y.useState("name"),[z,O]=y.useState("asc"),{addToast:U,selectedProjectId:T,globalModeLoading:A}=ct(),{data:G,loading:B,error:H,refetch:K}=ut(Vb,[T],{enabled:!A}),L=G??[],C=y.useMemo(()=>L.filter(J=>g==="all"?!0:J.status===g),[L,g]),Y=y.useMemo(()=>[...C].sort((ue,Ue)=>{let ae=0;switch(j){case"name":ae=ue.name.localeCompare(Ue.name);break;case"status":ae=ue.status.localeCompare(Ue.status);break;case"dependencies":ae=ue.dependencies.length-Ue.dependencies.length;break}return z==="asc"?ae:-ae}),[C,j,z]),P=J=>{j===J?O(z==="asc"?"desc":"asc"):(N(J),O("asc"))},I=J=>j!==J?n.jsx(L0,{className:"h-3 w-3 text-slate-600"}):z==="asc"?n.jsx(q0,{className:"h-3 w-3 text-indigo-400"}):n.jsx(B0,{className:"h-3 w-3 text-indigo-400"}),Z=async J=>{v(!0);try{const ue=await Ib(J);U({title:"PRD Queued",message:ue.message,type:"success"}),K()}catch(ue){U({title:"Retry Failed",message:ue instanceof Error?ue.message:"Failed to retry PRD",type:"error"})}finally{v(!1)}},fe=async()=>{f(!0);try{const J=await Jb();U({title:"Executor Started",message:J.pid?`Started with PID ${J.pid}`:"Executor started",type:"success"})}catch(J){U({title:"Executor Failed",message:J instanceof Error?J.message:"Failed to start executor",type:"error"})}finally{f(!1)}};return B?n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading PRDs..."})}):H?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Xt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load PRDs"}),n.jsx("div",{className:"text-sm text-slate-500",children:H.message}),n.jsx(oe,{onClick:()=>K(),children:"Retry"})]}):n.jsxs("div",{className:"space-y-6 h-[calc(100vh-8rem)] flex flex-col",children:[n.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(oe,{variant:c==="list"?"secondary":"ghost",size:"icon",onClick:()=>o("list"),children:n.jsx(s0,{className:"h-4 w-4"})}),n.jsx(oe,{variant:c==="card"?"secondary":"ghost",size:"icon",onClick:()=>o("card"),children:n.jsx(ab,{className:"h-4 w-4"})}),n.jsx("div",{className:"h-6 w-px bg-slate-800 mx-2"}),n.jsxs("div",{className:"flex space-x-1",children:[n.jsx("button",{onClick:()=>p("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${g==="all"?"bg-slate-800 text-slate-200 border-slate-700":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"All"}),n.jsx("button",{onClick:()=>p("ready"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${g==="ready"?"bg-green-900/50 text-green-300 border-green-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Ready"}),n.jsx("button",{onClick:()=>p("in-progress"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${g==="in-progress"?"bg-blue-900/50 text-blue-300 border-blue-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"In Progress"}),n.jsx("button",{onClick:()=>p("blocked"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${g==="blocked"?"bg-red-900/50 text-red-300 border-red-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Blocked"}),n.jsx("button",{onClick:()=>p("pending-review"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${g==="pending-review"?"bg-amber-900/50 text-amber-300 border-amber-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Pending Review"}),n.jsx("button",{onClick:()=>p("done"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${g==="done"?"bg-slate-700 text-slate-300 border-slate-600":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Done"})]})]})}),n.jsx("div",{className:"flex-1 overflow-y-auto pr-1 pb-10",children:c==="list"?n.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:n.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[n.jsx("thead",{className:"bg-slate-950/50",children:n.jsxs("tr",{children:[n.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>P("name"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Name"}),I("name")]})}),n.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>P("status"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Status"}),I("status")]})}),n.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>P("dependencies"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Dependencies"}),I("dependencies")]})}),n.jsx("th",{scope:"col",className:"relative px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),n.jsxs("tbody",{className:"divide-y divide-slate-800",children:[Y.map(J=>n.jsxs("tr",{className:"hover:bg-slate-800/50 group cursor-pointer transition-colors",onClick:()=>r(J),children:[n.jsxs("td",{className:"px-6 py-4",children:[n.jsx("div",{className:"text-sm font-medium text-slate-200",children:J.name}),J.unmetDependencies.length>0&&n.jsxs("div",{className:"text-xs text-amber-400 mt-1",children:["Blocked by: ",J.unmetDependencies.join(", ")]})]}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsx(xa,{variant:fu[J.status],children:du[J.status]})}),n.jsx("td",{className:"px-6 py-4",children:J.dependencies.length>0?n.jsx("div",{className:"flex flex-wrap gap-1",children:J.dependencies.map(ue=>n.jsx("span",{className:"px-2 py-0.5 bg-slate-800 text-slate-400 text-xs rounded border border-slate-700",children:ue},ue))}):n.jsx("span",{className:"text-sm text-slate-600",children:"None"})}),n.jsxs("td",{className:"px-6 py-4 whitespace-nowrap text-right",children:[J.status==="ready"&&n.jsx("button",{className:"text-slate-500 hover:text-green-400 transition-colors",onClick:ue=>{ue.stopPropagation(),fe()},"aria-label":"Execute PRD",disabled:x,children:x?n.jsx(fa,{className:"h-4 w-4 animate-spin"}):n.jsx(ha,{className:"h-4 w-4"})}),J.status==="in-progress"&&n.jsx("span",{className:"text-slate-600",children:n.jsx(fa,{className:"h-4 w-4 animate-spin inline"})}),J.status==="done"&&n.jsx("button",{className:"text-slate-500 hover:text-indigo-400 transition-colors",onClick:ue=>{ue.stopPropagation(),Z(J.name)},"aria-label":"Retry PRD",disabled:m,children:m?n.jsx(fa,{className:"h-4 w-4 animate-spin"}):n.jsx(an,{className:"h-4 w-4"})}),(J.status==="blocked"||J.status==="pending-review")&&n.jsx("span",{className:"text-slate-600",children:"—"})]})]},J.name)),Y.length===0&&n.jsx("tr",{children:n.jsx("td",{colSpan:4,className:"px-6 py-12 text-center text-slate-500",children:L.length===0?"No PRDs found.":`No PRDs match the "${g}" filter.`})})]})]})}):n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[Y.map(J=>n.jsxs(ye,{className:"p-5 flex flex-col h-full hover:border-indigo-500/50 transition-colors",onClick:()=>r(J),children:[n.jsxs("div",{className:"flex justify-between items-start mb-4",children:[n.jsx(xa,{variant:fu[J.status],children:du[J.status]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[J.status==="ready"&&n.jsx("button",{className:"text-slate-500 hover:text-green-400 transition-colors",onClick:ue=>{ue.stopPropagation(),fe()},"aria-label":"Execute PRD",disabled:x,children:x?n.jsx(fa,{className:"h-4 w-4 animate-spin"}):n.jsx(ha,{className:"h-4 w-4"})}),J.status==="done"&&n.jsx("button",{className:"text-slate-500 hover:text-indigo-400 transition-colors",onClick:ue=>{ue.stopPropagation(),Z(J.name)},"aria-label":"Retry PRD",disabled:m,children:m?n.jsx(fa,{className:"h-4 w-4 animate-spin"}):n.jsx(an,{className:"h-4 w-4"})}),J.status==="in-progress"&&n.jsx("div",{className:"h-2 w-2 bg-blue-500 rounded-full animate-pulse"}),J.status==="pending-review"&&n.jsx("div",{className:"h-2 w-2 bg-yellow-500 rounded-full animate-pulse"})]})]}),n.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-2",children:J.name}),J.content&&n.jsx("p",{className:"text-sm text-slate-400 flex-1 line-clamp-3",children:J.content.replace(/^#.*\n/,"")}),n.jsxs("div",{className:"mt-4 pt-4 border-t border-slate-800",children:[J.dependencies.length>0&&n.jsx("div",{className:"flex flex-wrap gap-1 mb-2",children:J.dependencies.map(ue=>n.jsx("span",{className:"px-2 py-0.5 bg-slate-800 text-slate-400 text-xs rounded border border-slate-700",children:ue},ue))}),J.unmetDependencies.length>0&&n.jsxs("div",{className:"text-xs text-amber-400",children:["Blocked by: ",J.unmetDependencies.join(", ")]})]})]},J.name)),Y.length===0&&n.jsx("div",{className:"col-span-full text-center py-12 text-slate-500",children:L.length===0?"No PRDs found.":`No PRDs match the "${g}" filter.`})]})}),d&&n.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[n.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:()=>r(null)}),n.jsxs("div",{className:"relative w-full max-w-xl bg-slate-900 h-full shadow-2xl flex flex-col transform transition-transform animate-in slide-in-from-right duration-300 border-l border-slate-800",children:[n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-slate-800",children:[n.jsx("h2",{className:"text-lg font-bold text-slate-100 line-clamp-1",children:d.name}),n.jsx("button",{onClick:()=>r(null),className:"p-2 hover:bg-slate-800 rounded-full",children:n.jsx(s0,{className:"h-5 w-5 text-slate-500"})})]}),n.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-6 space-y-6",children:[n.jsx("div",{className:"flex items-center space-x-4",children:n.jsx(xa,{variant:fu[d.status],className:"text-sm px-3 py-1",children:du[d.status]})}),d.content&&n.jsxs("div",{className:"prose prose-sm prose-invert max-w-none",children:[n.jsx("h3",{className:"uppercase text-xs font-bold text-slate-500 tracking-wider mb-2",children:"Description"}),n.jsx("div",{className:"whitespace-pre-wrap text-slate-300 bg-slate-950/50 p-4 rounded-lg border border-slate-800 font-mono text-sm",children:d.content})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("h3",{className:"uppercase text-xs font-bold text-slate-500 tracking-wider",children:"Dependencies"}),d.dependencies.length?n.jsx("div",{className:"flex flex-wrap gap-2",children:d.dependencies.map(J=>n.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-300 text-xs rounded border border-slate-700",children:J},J))}):n.jsx("p",{className:"text-sm text-slate-500 italic",children:"No dependencies."}),d.unmetDependencies.length>0&&n.jsx("div",{className:"mt-2",children:n.jsxs("p",{className:"text-sm text-amber-400",children:["Unmet dependencies: ",d.unmetDependencies.join(", ")]})})]})]}),n.jsx("div",{className:"p-4 border-t border-slate-800 bg-slate-900 flex space-x-3",children:d.status==="done"?n.jsxs(oe,{className:"flex-1",onClick:()=>Z(d.name),disabled:m,children:[n.jsx(an,{className:"h-4 w-4 mr-2"}),m?"Moving...":"Retry"]}):n.jsxs(oe,{className:"flex-1",onClick:fe,disabled:x||d.status==="in-progress",children:[n.jsx(ha,{className:"h-4 w-4 mr-2"}),x?"Executing...":"Execute Now"]})})]})]})]})},By=()=>{const[c,o]=y.useState(null),[d,r]=y.useState(!1),[x,f]=y.useState("all"),[m,v]=y.useState("number"),[g,p]=y.useState("desc"),{addToast:j,selectedProjectId:N,globalModeLoading:z}=ct(),{data:O,loading:U,error:T,refetch:A}=ut(Zb,[N],{enabled:!z}),G=O??[],B=Z=>{switch(Z){case"pass":return n.jsx(cs,{className:"h-4 w-4 text-green-500"});case"fail":return n.jsx(pu,{className:"h-4 w-4 text-red-500"});case"pending":return n.jsx(fa,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return n.jsx(Xt,{className:"h-4 w-4 text-slate-500"})}},H=Z=>{switch(Z){case"pass":return"All CI checks passed";case"fail":return"One or more CI checks failed";case"pending":return"CI checks are still running";default:return"No CI data available"}},K=Z=>Z===null?"No review decision yet":Z===100?"PR has been approved":Z===0?"Changes have been requested":`Review score: ${Z}`,L=y.useMemo(()=>G.filter(Z=>{switch(x){case"needs-work":return Z.ciStatus==="fail"||Z.reviewScore===0;case"pending":return Z.ciStatus==="pending"||Z.ciStatus==="unknown"||Z.reviewScore===null;case"passed":return Z.ciStatus==="pass"&&Z.reviewScore===100;case"all":default:return!0}}),[G,x]),C=y.useMemo(()=>[...L].sort((fe,J)=>{let ue=0;switch(m){case"number":ue=fe.number-J.number;break;case"title":ue=fe.title.localeCompare(J.title);break;case"branch":ue=fe.branch.localeCompare(J.branch);break;case"ciStatus":{const Ue={fail:0,pending:1,unknown:2,pass:3};ue=(Ue[fe.ciStatus]??2)-(Ue[J.ciStatus]??2);break}case"reviewScore":{const Ue=fe.reviewScore??-1,ae=J.reviewScore??-1;ue=Ue-ae;break}}return g==="asc"?ue:-ue}),[L,m,g]),Y=Z=>{m===Z?p(g==="asc"?"desc":"asc"):(v(Z),p("desc"))},P=Z=>m!==Z?n.jsx(L0,{className:"h-3 w-3 text-slate-600"}):g==="asc"?n.jsx(q0,{className:"h-3 w-3 text-indigo-400"}):n.jsx(B0,{className:"h-3 w-3 text-indigo-400"});if(U)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(T)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Xt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),n.jsx("div",{className:"text-sm text-slate-500",children:T.message}),n.jsx(oe,{onClick:()=>A(),children:"Retry"})]});const I=async()=>{r(!0);try{const Z=await Fb();j({title:"Reviewer Started",message:Z.pid?`Started with PID ${Z.pid}`:"Reviewer started",type:"success"})}catch(Z){j({title:"Reviewer Failed",message:Z instanceof Error?Z.message:"Failed to start reviewer",type:"error"})}finally{r(!1)}};return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex space-x-1",children:[n.jsx("button",{onClick:()=>f("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${x==="all"?"bg-slate-800 text-slate-200 border-slate-700":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"All"}),n.jsx("button",{onClick:()=>f("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${x==="needs-work"?"bg-red-900/50 text-red-300 border-red-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Needs Work"}),n.jsx("button",{onClick:()=>f("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${x==="pending"?"bg-amber-900/50 text-amber-300 border-amber-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Pending"}),n.jsx("button",{onClick:()=>f("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${x==="passed"?"bg-green-900/50 text-green-300 border-green-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Passed"})]}),n.jsxs(oe,{size:"sm",onClick:I,disabled:d,children:[n.jsx(Mu,{className:"h-4 w-4 mr-2"}),d?"Starting...":"Run Reviewer Now"]})]}),n.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:n.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[n.jsx("thead",{className:"bg-slate-950/50",children:n.jsxs("tr",{children:[n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>Y("number"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Title"}),P("number")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>Y("branch"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Branch"}),P("branch")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>Y("ciStatus"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"CI Status"}),P("ciStatus")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>Y("reviewScore"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Review Score"}),P("reviewScore")]})}),n.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),n.jsxs("tbody",{className:"divide-y divide-slate-800",children:[C.map(Z=>n.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>o(c===Z.number?null:Z.number),children:[n.jsx("td",{className:"px-6 py-4",children:n.jsxs("div",{className:"flex items-center",children:[n.jsxs("span",{className:"text-slate-500 font-mono mr-2",children:["#",Z.number]}),n.jsx("span",{className:"font-medium text-slate-200",children:Z.title})]})}),n.jsx("td",{className:"px-6 py-4",children:n.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-400 border border-slate-700 rounded text-xs font-mono",children:Z.branch})}),n.jsx("td",{className:"px-6 py-4",children:n.jsxs("div",{className:"flex items-center space-x-2",title:H(Z.ciStatus),children:[B(Z.ciStatus),n.jsx("span",{className:"text-sm capitalize text-slate-400",children:Z.ciStatus})]})}),n.jsx("td",{className:"px-6 py-4",children:Z.reviewScore!==null?n.jsxs("div",{className:"flex items-center space-x-2",title:K(Z.reviewScore),children:[n.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:n.jsx("div",{className:`h-full ${Z.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${Z.reviewScore}%`}})}),n.jsx("span",{className:`text-sm font-bold ${Z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:Z.reviewScore})]}):n.jsx("span",{className:"text-slate-600 text-sm",title:"No review decision yet",children:"—"})}),n.jsx("td",{className:"px-6 py-4 text-right",children:n.jsx("a",{href:Z.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:fe=>fe.stopPropagation(),children:n.jsx(Ru,{className:"h-4 w-4"})})})]},Z.number)),C.length===0&&n.jsx("tr",{children:n.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:G.length===0?"No open PRs found.":`No PRs match the "${x}" filter.`})})]})]})}),c&&n.jsx(ye,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const Z=G.find(fe=>fe.number===c);return Z?n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"font-bold text-slate-200",children:Z.title}),n.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",n.jsx("span",{className:"font-mono",children:Z.branch})]})]}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsxs("div",{className:"text-center",title:H(Z.ciStatus),children:[n.jsx("div",{className:"text-xs text-slate-500",children:"CI Status"}),n.jsxs("div",{className:"flex items-center space-x-1 mt-1",children:[B(Z.ciStatus),n.jsx("span",{className:"text-sm capitalize text-slate-300",children:Z.ciStatus})]})]}),Z.reviewScore!==null&&n.jsxs("div",{className:"text-center",title:K(Z.reviewScore),children:[n.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),n.jsx("div",{className:`text-xl font-bold mt-1 ${Z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:Z.reviewScore})]})]})]}):null})()})]})},ma=Ve.forwardRef(({className:c="",label:o,checked:d,onChange:r,...x},f)=>{const m=v=>{r&&r(v.target.checked)};return n.jsxs("label",{className:`inline-flex items-center cursor-pointer ${c}`,children:[n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:"checkbox",className:"sr-only peer",ref:f,checked:d,onChange:m,...x}),n.jsx("div",{className:"w-11 h-6 bg-slate-800 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500/50 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-slate-400 after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600 peer-checked:after:bg-white peer-disabled:opacity-50 peer-disabled:cursor-not-allowed"})]}),o&&n.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:o})]})});ma.displayName="Switch";const Ly=()=>{const{addToast:c,selectedProjectId:o,globalModeLoading:d}=ct(),[r,x]=y.useState(!1),[f,m]=y.useState(!1),{data:v,loading:g,error:p,refetch:j}=ut(dy,[o],{enabled:!d});y.useEffect(()=>{if(!(v!=null&&v.enabled))return;const B=setInterval(()=>{j()},1e4);return()=>clearInterval(B)},[v==null?void 0:v.enabled,j]);const N=async B=>{m(!0);try{await F0(B),c({title:B?"Scanner Enabled":"Scanner Disabled",message:B?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:B?"success":"info"}),j()}catch(H){c({title:"Toggle Failed",message:H instanceof Error?H.message:"Failed to toggle scanner",type:"error"})}finally{m(!1)}},z=async()=>{x(!0);try{const B=await fy();B.created.length>0?c({title:"Scan Complete",message:`Created ${B.created.length} PRD(s): ${B.created.join(", ")}`,type:"success"}):c({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),B.errors.length>0&&c({title:"Scan Errors",message:B.errors.join("; "),type:"warning"}),j()}catch(B){c({title:"Scan Failed",message:B instanceof Error?B.message:"Failed to scan roadmap",type:"error"})}finally{x(!1)}};if(g)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(p)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Xt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),n.jsx("div",{className:"text-sm text-slate-500",children:p.message}),n.jsx(oe,{onClick:()=>j(),children:"Retry"})]});if(!v)return null;if(v.status==="no-roadmap")return n.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),n.jsx(ye,{className:"p-12",children:n.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[n.jsx("div",{className:"p-4 bg-slate-800 rounded-full",children:n.jsx(Y0,{className:"h-10 w-10 text-slate-500"})}),n.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"No ROADMAP.md Found"}),n.jsxs("p",{className:"text-slate-400 max-w-md",children:["Create a ",n.jsx("code",{className:"text-indigo-400 bg-indigo-500/10 px-1.5 py-0.5 rounded text-sm",children:"ROADMAP.md"})," in your project root with checklist items (",n.jsx("code",{className:"text-slate-300 text-sm",children:"- [ ] Feature"}),") or heading-based items (",n.jsx("code",{className:"text-slate-300 text-sm",children:"### Feature"}),") to get started."]})]})})]});const O=v.totalItems>0?Math.round(v.processedItems/v.totalItems*100):0,U=Yy(v.status),T=Gy(v.items),A=v.lastScan?Qy(v.lastScan):"Never",G=v.autoScanInterval?Math.round(v.autoScanInterval/60):5;return n.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx(ma,{label:v.enabled?"Enabled":"Disabled",checked:v.enabled,onChange:N,disabled:f}),n.jsxs(oe,{onClick:z,loading:r,disabled:!v.enabled||v.status==="complete",children:[n.jsx(ha,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),n.jsx(ye,{className:`p-6 border-2 ${U.borderColor}`,children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx(U.icon,{className:`h-8 w-8 ${U.textColor}`}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400",children:"Scanner Status"}),n.jsx("div",{className:`text-2xl font-bold ${U.textColor}`,children:U.label})]})]}),n.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[n.jsxs("div",{children:["Last scan: ",n.jsx("span",{className:"text-slate-300",children:A})]}),v.enabled&&v.status!=="complete"&&n.jsxs("div",{children:["Auto-scan: ",n.jsxs("span",{className:"text-slate-300",children:["every ",G," min"]})]}),v.enabled&&v.status==="complete"&&n.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),n.jsxs(ye,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),n.jsxs("span",{className:"text-sm text-slate-400",children:[v.processedItems," / ",v.totalItems," items (",O,"%)"]})]}),n.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:n.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${O===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${O}%`}})})]}),Object.entries(T).map(([B,H])=>n.jsxs(ye,{className:"p-6",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:B}),n.jsx("div",{className:"space-y-2",children:H.map(K=>n.jsx(qy,{item:K},K.hash))})]},B))]})};function qy({item:c}){const o=c.checked,d=c.processed;return n.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${o?"bg-slate-950/30 border-slate-800/50":d?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[n.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[o?n.jsx(rb,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?n.jsx(cs,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):n.jsx(Zv,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("div",{className:`text-sm font-medium truncate ${o?"line-through text-slate-600":"text-slate-200"}`,children:c.title}),c.description&&n.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:c.description})]})]}),n.jsx("div",{className:"flex-shrink-0 ml-3",children:o?n.jsx(xa,{variant:"neutral",children:"Skipped"}):d?n.jsx(xa,{variant:"success",children:c.prdFile||"Processed"}):n.jsx(xa,{variant:"warning",children:"Pending"})})]})}function Yy(c){switch(c){case"complete":return{label:"Complete",icon:cs,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:zi,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:ha,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:Xt,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:Xt,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function Gy(c){const o={};for(const d of c){const r=d.section||"General";o[r]||(o[r]=[]),o[r].push(d)}return o}function Qy(c){try{const o=new Date(c),r=new Date().getTime()-o.getTime(),x=Math.floor(r/6e4);if(x<1)return"Just now";if(x<60)return`${x} min ago`;const f=Math.floor(x/60);return f<24?`${f} hr ago`:`${Math.floor(f/24)} day(s) ago`}catch{return"Unknown"}}const ku=[{label:"Every 30 minutes",value:"*/30 * * * *"},{label:"Every hour",value:"0 * * * *"},{label:"Every 3 hours",value:"0 */3 * * *"},{label:"Every 6 hours",value:"0 */6 * * *"},{label:"Every 12 hours",value:"0 */12 * * *"},{label:"Daily at midnight",value:"0 0 * * *"},{label:"Daily at 9 AM",value:"0 9 * * *"},{label:"Weekdays at 9 AM",value:"0 9 * * 1-5"},{label:"Custom",value:"__custom__"}];function mu(c){const o=c.trim().split(/\s+/);if(o.length!==5)return c;const[d,r,x,f,m]=o,v=ku.find(g=>g.value===c);return v?v.label:d==="*/30"&&r==="*"?"Every 30 minutes":d==="0"&&r==="*"?"Every hour":d.startsWith("*/")?`Every ${parseInt(d.replace("*/",""),10)} minutes`:d==="0"&&r.startsWith("*/")?`Every ${parseInt(r.replace("*/",""),10)} hours`:d==="0"&&r!=="*"&&x==="*"&&f==="*"&&m==="*"?`Daily at ${m0(r)}`:d==="0"&&r!=="*"&&x==="*"&&f==="*"&&m==="1-5"?`Weekdays at ${m0(r)}`:c}function m0(c){const o=parseInt(c,10);return o===0?"12 AM":o<12?`${o} AM`:o===12?"12 PM":`${o-12} PM`}function Xy(c){const o=ku.find(d=>d.value===c);return(o==null?void 0:o.value)??"__custom__"}function Vy(c){const o=new Date,d=c.getTime()-o.getTime(),r=Math.floor(d/6e4),x=Math.floor(r/60),f=Math.floor(x/24);return r<1?"less than a minute":r<60?`in ${r} minute${r>1?"s":""}`:x<24?`in ${x} hour${x>1?"s":""}`:`in ${f} day${f>1?"s":""}`}function Zy(c){const o={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return c.toLocaleDateString("en-US",o)}function $y(c){const o=new Date,d=c.getTime()-o.getTime(),r=Math.floor(d/6e4);return r>=0&&r<30}const Ky=()=>{const{addToast:c,selectedProjectId:o,globalModeLoading:d}=ct(),[r,x]=y.useState(!1),[f,m]=y.useState(!1),[v,g]=y.useState({executorSchedule:"",reviewerSchedule:"",isEditing:!1}),{data:p,loading:j,error:N,refetch:z}=ut($0,[o],{enabled:!d}),{data:O,loading:U,refetch:T}=ut(Du,[o],{enabled:!d});y.useEffect(()=>{const I=setInterval(()=>{z()},3e4);return()=>clearInterval(I)},[z]),y.useEffect(()=>{O&&!v.isEditing&&g({executorSchedule:O.cronSchedule,reviewerSchedule:O.reviewerSchedule,isEditing:!1})},[O,v.isEditing]);const A=async()=>{if(p){x(!0);try{p.paused?(await u0(),c({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await Wb(),c({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),z()}catch(I){c({title:"Action Failed",message:I instanceof Error?I.message:"Failed to toggle schedule state",type:"error"})}finally{x(!1)}}},G=()=>{O&&g({executorSchedule:O.cronSchedule,reviewerSchedule:O.reviewerSchedule,isEditing:!0})},B=()=>{O&&g({executorSchedule:O.cronSchedule,reviewerSchedule:O.reviewerSchedule,isEditing:!1})},H=async()=>{if(O){m(!0);try{await Oi({cronSchedule:v.executorSchedule,reviewerSchedule:v.reviewerSchedule}),await u0(),c({title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"}),g(I=>({...I,isEditing:!1})),T(),z()}catch(I){c({title:"Save Failed",message:I instanceof Error?I.message:"Failed to save schedules",type:"error"})}finally{m(!1)}}},K=(I,Z)=>{if(!I)return n.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const fe=new Date(I),J=$y(fe);return n.jsxs("div",{className:"flex items-center space-x-2",children:[J&&n.jsxs("span",{className:"relative flex h-3 w-3",children:[n.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),n.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-green-500"})]}),n.jsxs("div",{className:"text-sm",children:[n.jsx("span",{className:"text-slate-200 font-medium",children:Vy(fe)}),n.jsxs("span",{className:"text-slate-500 ml-2",children:["(",Zy(fe),")"]})]})]})},L=(I,Z,fe,J)=>{const ue=Xy(Z),Ue=ue==="__custom__";return n.jsxs("div",{className:`space-y-3 ${J?"opacity-50 pointer-events-none":""}`,children:[n.jsx("div",{className:"flex items-center space-x-3",children:n.jsx(Xl,{label:`${I} Preset`,options:ku,value:ue,onChange:ae=>{ae!=="__custom__"&&fe(ae)},className:"flex-1"})}),Ue&&n.jsx(Ae,{label:"Custom Cron Expression",value:Z,onChange:ae=>fe(ae.target.value),placeholder:"* * * * *",helperText:"Format: minute hour day month weekday (e.g., 0 */2 * * * for every 2 hours)"}),n.jsxs("div",{className:"text-sm text-slate-400",children:["Human-readable: ",n.jsx("span",{className:"text-slate-200",children:mu(Z)})]})]})};if(j||U)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading scheduling information..."})});if(N||!p||!O)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Xt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load schedule information"}),n.jsx("div",{className:"text-sm text-slate-500",children:(N==null?void 0:N.message)||"Unknown error"}),n.jsx(oe,{onClick:()=>{z(),T()},children:"Retry"})]});const C=p.paused,Y=C?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",P=C?"Paused":"Active";return n.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Scheduling"})}),n.jsx(ye,{className:`p-6 border-2 ${Y}`,children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx(zi,{className:"h-8 w-8"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400",children:"Cron Status"}),n.jsx("div",{className:"text-2xl font-bold",children:P})]})]}),n.jsx(oe,{variant:C?"primary":"outline",size:"lg",onClick:A,loading:r,children:C?n.jsxs(n.Fragment,{children:[n.jsx(ha,{className:"h-5 w-5 mr-2"}),"Resume"]}):n.jsxs(n.Fragment,{children:[n.jsx(G0,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs(ye,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Executor Schedule"}),!v.isEditing&&n.jsxs(oe,{variant:"ghost",size:"sm",onClick:G,children:[n.jsx(jb,{className:"h-4 w-4 mr-1"}),"Edit"]})]}),v.isEditing?L("Executor",v.executorSchedule,I=>g(Z=>({...Z,executorSchedule:I}))):n.jsx(n.Fragment,{children:n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),n.jsx("div",{className:"text-lg text-slate-200 font-medium",children:mu(O.cronSchedule)}),n.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:O.cronSchedule})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),K(p.executor.nextRun,O.cronSchedule)]}),n.jsxs("div",{className:`flex items-center space-x-2 text-sm ${p.executor.installed?"text-green-400":"text-amber-400"}`,children:[n.jsx(ln,{className:"h-4 w-4"}),n.jsx("span",{children:p.executor.installed?"Installed":"Not installed"})]})]})})]}),n.jsxs(ye,{className:`p-6 ${O.reviewerEnabled?"":"opacity-50"}`,children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Reviewer Schedule"}),!O.reviewerEnabled&&n.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"})]}),v.isEditing?L("Reviewer",v.reviewerSchedule,I=>g(Z=>({...Z,reviewerSchedule:I})),!O.reviewerEnabled):n.jsx(n.Fragment,{children:n.jsx("div",{className:"space-y-4",children:O.reviewerEnabled?n.jsxs(n.Fragment,{children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),n.jsx("div",{className:"text-lg text-slate-200 font-medium",children:mu(O.reviewerSchedule)}),n.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:O.reviewerSchedule})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),K(p.reviewer.nextRun,O.reviewerSchedule)]}),n.jsxs("div",{className:`flex items-center space-x-2 text-sm ${p.reviewer.installed?"text-green-400":"text-amber-400"}`,children:[n.jsx(ln,{className:"h-4 w-4"}),n.jsx("span",{children:p.reviewer.installed?"Installed":"Not installed"})]})]}):n.jsx("div",{className:"text-slate-500 text-sm",children:"Automated reviews are disabled. Enable them in Settings to configure the reviewer schedule."})})})]})]}),n.jsxs(ye,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[n.jsx(_i,{className:"h-5 w-5 text-slate-400"}),n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),p.entries.length===0?n.jsx("div",{className:"text-slate-500 text-sm",children:"No crontab entries found."}):n.jsx("div",{className:"space-y-2",children:p.entries.map((I,Z)=>n.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:I},Z))})]}),v.isEditing&&n.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-4 border-t border-slate-800",children:[n.jsx(oe,{variant:"ghost",onClick:B,children:"Cancel"}),n.jsxs(oe,{onClick:H,loading:f,children:[n.jsx(ln,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},Jy=({tabs:c,activeTab:o,onChange:d,className:r=""})=>{var g,p;const[x,f]=Ve.useState((g=c[0])==null?void 0:g.id),m=o||x,v=j=>{d?d(j):f(j)};return n.jsxs("div",{className:`flex flex-col ${r}`,children:[n.jsx("div",{className:"border-b border-slate-800 mb-6",children:n.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:c.map(j=>n.jsx("button",{onClick:()=>v(j.id),className:`
|
|
456
|
-
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
457
|
-
${m===j.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
458
|
-
`,children:j.label},j.id))})}),n.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(p=c.find(j=>j.id===m))==null?void 0:p.content})]})},Fy={enabled:!1,botToken:"",channels:{eng:"",prs:"",incidents:"",releases:""},autoCreateProjectChannels:!1,discussionEnabled:!1},h0=c=>({provider:c.provider,defaultBranch:c.defaultBranch,branchPrefix:c.branchPrefix,branchPatterns:c.branchPatterns||[],reviewerEnabled:c.reviewerEnabled,minReviewScore:c.minReviewScore,maxRuntime:c.maxRuntime,reviewerMaxRuntime:c.reviewerMaxRuntime,maxLogSize:c.maxLogSize,cronScheduleOffset:c.cronScheduleOffset??0,maxRetries:c.maxRetries??3,providerEnv:c.providerEnv||{},notifications:c.notifications||{webhooks:[]},prdPriority:c.prdPriority||[],roadmapScanner:c.roadmapScanner||{enabled:!1,roadmapPath:"ROADMAP.md",autoScanInterval:300},templatesDir:c.templatesDir||".night-watch/templates",slack:c.slack??Fy}),Wy=c=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>c.toUpperCase().includes(d)),Py=({value:c,isSensitive:o})=>{const[d,r]=Ve.useState(!1);return o?n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-sm text-slate-300 font-mono",children:d?c:"••••••••••••"}),n.jsx("button",{type:"button",onClick:()=>r(!d),className:"text-slate-500 hover:text-slate-300",children:d?n.jsx(gu,{className:"h-4 w-4"}):n.jsx(Di,{className:"h-4 w-4"})})]}):n.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:c})},Iy=({envVars:c,onChange:o})=>{const[d,r]=Ve.useState(""),[x,f]=Ve.useState(""),[m,v]=Ve.useState(null),[g,p]=Ve.useState(""),j=()=>{if(d.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(d)){alert("Key must be uppercase with underscores (e.g., API_KEY)");return}o({...c,[d]:x}),r(""),f("")}},N=A=>{const G={...c};delete G[A],o(G)},z=A=>{v(A),p(c[A])},O=()=>{m&&(o({...c,[m]:g}),v(null),p(""))},U=()=>{v(null),p("")},T=Object.entries(c);return n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),n.jsx("div",{className:"space-y-2",children:T.length===0?n.jsx("p",{className:"text-slate-500 text-sm italic",children:"No provider environment variables configured."}):T.map(([A,G])=>n.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[n.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[n.jsx("span",{className:"text-sm font-mono text-indigo-400 w-48 truncate",children:A}),m===A?n.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[n.jsx("input",{type:"text",value:g,onChange:B=>p(B.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),n.jsx("button",{type:"button",onClick:O,className:"p-1 text-green-400 hover:text-green-300",children:n.jsx(ln,{className:"h-4 w-4"})}),n.jsx("button",{type:"button",onClick:U,className:"p-1 text-slate-400 hover:text-slate-300",children:n.jsx(gl,{className:"h-4 w-4"})})]}):n.jsx(Py,{value:G,isSensitive:Wy(A)})]}),m!==A&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("button",{type:"button",onClick:()=>z(A),className:"p-1 text-slate-400 hover:text-slate-200",children:n.jsx(_u,{className:"h-4 w-4"})}),n.jsx("button",{type:"button",onClick:()=>N(A),className:"p-1 text-red-400 hover:text-red-300",children:n.jsx(zu,{className:"h-4 w-4"})})]})]},A))}),n.jsxs("div",{className:"flex items-end gap-3 pt-4 border-t border-slate-800",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),n.jsx("input",{type:"text",value:d,onChange:A=>r(A.target.value.toUpperCase()),placeholder:"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),n.jsx("input",{type:"text",value:x,onChange:A=>f(A.target.value),placeholder:"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),n.jsxs(oe,{onClick:j,disabled:!d.trim(),children:[n.jsx(Vl,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})},e1=({notifications:c,onChange:o})=>{const[d,r]=Ve.useState(null),[x,f]=Ve.useState(!1),[m,v]=Ve.useState({type:"slack",url:"",events:[]}),g=[{label:"Run Started",value:"run_started"},{label:"Run Succeeded",value:"run_succeeded"},{label:"Run Failed",value:"run_failed"},{label:"Run Timeout",value:"run_timeout"},{label:"Review Completed",value:"review_completed"},{label:"PR Auto-Merged",value:"pr_auto_merged"},{label:"Rate Limit Fallback",value:"rate_limit_fallback"},{label:"QA Completed",value:"qa_completed"}],p=()=>{o({webhooks:[...c.webhooks,m]}),v({type:"slack",url:"",events:[]}),f(!1)},j=(U,T)=>{const A=[...c.webhooks];A[U]=T,o({webhooks:A})},N=U=>{o({webhooks:c.webhooks.filter((T,A)=>A!==U)})},z=(U,T)=>U.includes(T)?U.filter(A=>A!==T):[...U,T],O=({webhook:U,onChange:T,onSave:A,onCancel:G,isNew:B})=>n.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[n.jsx(Xl,{label:"Type",value:U.type,onChange:H=>{const K=H;T(K==="telegram"?{type:K,botToken:"",chatId:"",events:U.events}:{type:K,url:"",events:U.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),U.type==="telegram"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"relative",children:n.jsx(Ae,{label:"Bot Token",type:"password",value:U.botToken||"",onChange:H=>T({...U,botToken:H.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),n.jsx(Ae,{label:"Chat ID",value:U.chatId||"",onChange:H=>T({...U,chatId:H.target.value}),placeholder:"123456789"})]}):n.jsx("div",{className:"md:col-span-2",children:n.jsx(Ae,{label:"Webhook URL",type:"password",value:U.url||"",onChange:H=>T({...U,url:H.target.value}),placeholder:"https://hooks.slack.com/services/..."})})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Events"}),n.jsx("div",{className:"flex flex-wrap gap-2",children:g.map(H=>n.jsx("button",{type:"button",onClick:()=>T({...U,events:z(U.events,H.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${U.events.includes(H.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:H.label},H.value))})]}),n.jsxs("div",{className:"flex justify-end gap-2",children:[n.jsx(oe,{variant:"ghost",onClick:G,children:"Cancel"}),n.jsx(oe,{onClick:A,disabled:U.events.length===0||(U.type==="telegram"?!U.botToken||!U.chatId:!U.url),children:B?"Add Webhook":"Save Changes"})]})]});return n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),n.jsx("div",{className:"space-y-3",children:c.webhooks.length===0?n.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):c.webhooks.map((U,T)=>n.jsx("div",{children:d===T?n.jsx(O,{webhook:U,onChange:A=>j(T,A),onSave:()=>r(null),onCancel:()=>r(null)}):n.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-slate-800 bg-slate-950/40",children:[n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("span",{className:"text-sm font-medium text-slate-200 capitalize",children:U.type}),U.type==="telegram"&&n.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",U.chatId]})]}),n.jsx("div",{className:"flex flex-wrap gap-1",children:U.events.map(A=>n.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:A.replace("_"," ")},A))})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("button",{type:"button",onClick:()=>r(T),className:"p-2 text-slate-400 hover:text-slate-200",children:n.jsx(_u,{className:"h-4 w-4"})}),n.jsx("button",{type:"button",onClick:()=>N(T),className:"p-2 text-red-400 hover:text-red-300",children:n.jsx(zu,{className:"h-4 w-4"})})]})]})},T))}),x?n.jsx(O,{webhook:m,onChange:v,onSave:p,onCancel:()=>f(!1),isNew:!0}):n.jsxs(oe,{variant:"ghost",onClick:()=>f(!0),children:[n.jsx(Vl,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},x0=({label:c,value:o,onChange:d,placeholder:r,helpText:x})=>{const[f,m]=Ve.useState(""),v=()=>{f.trim()&&!o.includes(f.trim())&&(d([...o,f.trim()]),m(""))},g=j=>{d(o.filter(N=>N!==j))},p=j=>{j.key==="Enter"&&(j.preventDefault(),v())};return n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:c}),n.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:o.map(j=>n.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[j,n.jsx("button",{type:"button",onClick:()=>g(j),className:"text-slate-500 hover:text-red-400",children:n.jsx(gl,{className:"h-3 w-3"})})]},j))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{type:"text",value:f,onChange:j=>m(j.target.value),onKeyDown:p,placeholder:r,className:"flex-1 bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"}),n.jsx(oe,{onClick:v,disabled:!f.trim(),children:n.jsx(Vl,{className:"h-4 w-4"})})]}),x&&n.jsx("p",{className:"text-xs text-slate-500 mt-1",children:x})]})},t1=()=>{const{addToast:c,projectName:o,selectedProjectId:d,globalModeLoading:r}=ct(),[x,f]=Ve.useState(!1),[m,v]=Ve.useState(null),{data:g,loading:p,error:j,refetch:N}=ut(Du,[d],{enabled:!r}),{data:z,loading:O,refetch:U}=ut(Kb,[d],{enabled:!r}),T=z??[];Ve.useEffect(()=>{g&&v(h0(g))},[g]);const A=(L,C)=>{v(Y=>Y&&{...Y,[L]:C})},G=async()=>{if(m){f(!0);try{await Oi({provider:m.provider,defaultBranch:m.defaultBranch,branchPrefix:m.branchPrefix,branchPatterns:m.branchPatterns,reviewerEnabled:m.reviewerEnabled,minReviewScore:m.minReviewScore,maxRuntime:m.maxRuntime,reviewerMaxRuntime:m.reviewerMaxRuntime,maxLogSize:m.maxLogSize,cronScheduleOffset:m.cronScheduleOffset,maxRetries:m.maxRetries,providerEnv:m.providerEnv,notifications:m.notifications,prdPriority:m.prdPriority,roadmapScanner:m.roadmapScanner,templatesDir:m.templatesDir,slack:m.slack}),c({title:"Settings Saved",message:"Configuration updated successfully.",type:"success"}),N(),U()}catch(L){c({title:"Save Failed",message:L instanceof Error?L.message:"Failed to save configuration",type:"error"})}finally{f(!1)}}},B=()=>{g&&(v(h0(g)),c({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"}))},H=async L=>{try{const C=await F0(L);A("roadmapScanner",C.roadmapScanner),c({title:L?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${L?"enabled":"disabled"}.`,type:"success"})}catch(C){c({title:"Toggle Failed",message:C instanceof Error?C.message:"Failed to toggle roadmap scanner",type:"error"})}};if(p||!m)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(j)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Xt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load settings"}),n.jsx("div",{className:"text-sm text-slate-500",children:j.message}),n.jsx(oe,{onClick:()=>N(),children:"Retry"})]});const K=[{id:"general",label:"General",content:n.jsxs(ye,{className:"p-6 space-y-4",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsx(Ae,{label:"Project Name",value:o,disabled:!0}),n.jsx(Xl,{label:"Provider",value:m.provider,onChange:L=>A("provider",L),options:[{label:"Anthropic (Claude)",value:"claude"},{label:"OpenAI (Codex)",value:"codex"}]}),n.jsx(Ae,{label:"Default Branch",value:m.defaultBranch,onChange:L=>A("defaultBranch",L.target.value)}),n.jsx(Ae,{label:"Branch Prefix",value:m.branchPrefix,onChange:L=>A("branchPrefix",L.target.value)}),n.jsx("div",{className:"md:col-span-2",children:n.jsx(ma,{label:"Enable Automated Reviews",checked:m.reviewerEnabled,onChange:L=>A("reviewerEnabled",L)})})]})]})},{id:"runtime",label:"Runtime",content:n.jsxs(ye,{className:"p-6 space-y-6",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx("input",{type:"range",min:"0",max:"100",value:m.minReviewScore,onChange:L=>A("minReviewScore",Number(L.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),n.jsx("span",{className:"text-sm font-bold text-slate-200 w-10",children:m.minReviewScore})]}),n.jsx("p",{className:"text-xs text-slate-500 mt-1",children:'PRs below this score will be marked as "Needs Work".'})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsx(Ae,{label:"Max Runtime (Executor)",type:"number",value:String(m.maxRuntime),onChange:L=>A("maxRuntime",Number(L.target.value||0)),rightIcon:n.jsx("span",{className:"text-xs",children:"sec"})}),n.jsx(Ae,{label:"Max Runtime (Reviewer)",type:"number",value:String(m.reviewerMaxRuntime),onChange:L=>A("reviewerMaxRuntime",Number(L.target.value||0)),rightIcon:n.jsx("span",{className:"text-xs",children:"sec"})}),n.jsx(Ae,{label:"Max Log Size",type:"number",value:String(m.maxLogSize),onChange:L=>A("maxLogSize",Number(L.target.value||0)),rightIcon:n.jsx("span",{className:"text-xs",children:"bytes"})})]})]})},{id:"env",label:"Provider Env",content:n.jsxs(ye,{className:"p-6",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Provider Environment Variables"}),n.jsx(Iy,{envVars:m.providerEnv,onChange:L=>A("providerEnv",L)})]})},{id:"notifications",label:"Notifications",content:n.jsxs(ye,{className:"p-6",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),n.jsx(e1,{notifications:m.notifications,onChange:L=>A("notifications",L)})]})},{id:"slack",label:"Slack Bot",content:n.jsxs(ye,{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Slack Bot Integration"}),n.jsx("p",{className:"text-sm text-slate-400",children:"Post notifications as agent personas using the Slack Bot API"})]}),n.jsx(ma,{checked:m.slack.enabled,onChange:L=>A("slack",{...m.slack,enabled:L})})]}),n.jsx("div",{className:"grid grid-cols-1 gap-6 pt-4 border-t border-slate-800",children:n.jsx("div",{className:"relative",children:n.jsx(Ae,{label:"Bot Token (xoxb-...)",type:"password",value:m.slack.botToken,onChange:L=>A("slack",{...m.slack,botToken:L.target.value}),placeholder:"xoxb-...",helperText:"OAuth Bot Token from your Slack App settings"})})}),n.jsxs("div",{className:"space-y-4 pt-4 border-t border-slate-800",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("h4",{className:"text-sm font-medium text-slate-300",children:"Channel IDs"}),n.jsx("button",{type:"button",className:"px-3 py-1.5 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 hover:text-slate-200 transition-colors",onClick:()=>{alert("Coming soon: will list workspace channels")},children:"Detect Channels"})]}),n.jsx("p",{className:"text-xs text-slate-500",children:"Enter the Slack channel IDs (e.g. C01ABCDEF) where agent messages will be posted."}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[n.jsx(Ae,{label:"#eng Channel ID",value:m.slack.channels.eng,onChange:L=>A("slack",{...m.slack,channels:{...m.slack.channels,eng:L.target.value}}),placeholder:"C01ABCDEF"}),n.jsx(Ae,{label:"#prs Channel ID",value:m.slack.channels.prs,onChange:L=>A("slack",{...m.slack,channels:{...m.slack.channels,prs:L.target.value}}),placeholder:"C01ABCDEF"}),n.jsx(Ae,{label:"#incidents Channel ID",value:m.slack.channels.incidents,onChange:L=>A("slack",{...m.slack,channels:{...m.slack.channels,incidents:L.target.value}}),placeholder:"C01ABCDEF"}),n.jsx(Ae,{label:"#releases Channel ID",value:m.slack.channels.releases,onChange:L=>A("slack",{...m.slack,channels:{...m.slack.channels,releases:L.target.value}}),placeholder:"C01ABCDEF"})]})]}),n.jsxs("div",{className:"space-y-4 pt-4 border-t border-slate-800",children:[n.jsx("h4",{className:"text-sm font-medium text-slate-300",children:"Options"}),n.jsx(ma,{label:"Auto-create project channels",checked:m.slack.autoCreateProjectChannels,onChange:L=>A("slack",{...m.slack,autoCreateProjectChannels:L})}),n.jsx(ma,{label:"Enable agent deliberation",checked:m.slack.discussionEnabled,onChange:L=>A("slack",{...m.slack,discussionEnabled:L})})]})]})},{id:"roadmap",label:"Roadmap",content:n.jsxs(ye,{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Roadmap Scanner"}),n.jsx("p",{className:"text-sm text-slate-400",children:"Automatically scan ROADMAP.md and generate PRDs for unchecked items"})]}),n.jsx(ma,{checked:m.roadmapScanner.enabled,onChange:H})]}),m.roadmapScanner.enabled&&n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[n.jsx(Ae,{label:"Roadmap Path",value:m.roadmapScanner.roadmapPath,onChange:L=>A("roadmapScanner",{...m.roadmapScanner,roadmapPath:L.target.value})}),n.jsx(Ae,{label:"Auto Scan Interval",type:"number",value:String(m.roadmapScanner.autoScanInterval),onChange:L=>A("roadmapScanner",{...m.roadmapScanner,autoScanInterval:Math.max(30,Number(L.target.value||30))}),rightIcon:n.jsx("span",{className:"text-xs",children:"sec (min 30)"})})]})]})},{id:"advanced",label:"Advanced",content:n.jsxs(ye,{className:"p-6 space-y-6",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Advanced Settings"}),n.jsx("p",{className:"text-sm text-slate-400",children:"Less commonly used configuration options"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsx(Ae,{label:"Templates Directory",value:m.templatesDir,onChange:L=>A("templatesDir",L.target.value),helperText:"Directory for custom template overrides"}),n.jsx(Ae,{label:"Cron Schedule Offset",type:"number",min:"0",max:"59",value:String(m.cronScheduleOffset),onChange:L=>{const C=Math.min(59,Math.max(0,Number(L.target.value||0)));A("cronScheduleOffset",C)},helperText:"Minutes offset (0-59) for cron schedules"}),n.jsx(Ae,{label:"Max Retries",type:"number",min:"1",value:String(m.maxRetries),onChange:L=>{const C=Math.max(1,Number(L.target.value||1));A("maxRetries",C)},helperText:"Retry attempts for rate-limited API calls"})]}),n.jsxs("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:[n.jsx(x0,{label:"Branch Patterns",value:m.branchPatterns,onChange:L=>A("branchPatterns",L),placeholder:"e.g., feat/",helpText:"Patterns to match for PR reviews"}),n.jsx(x0,{label:"PRD Priority",value:m.prdPriority,onChange:L=>A("prdPriority",L),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})]})]})}];return n.jsxs("div",{className:"max-w-4xl mx-auto pb-10",children:[n.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-6",children:"Settings"}),n.jsx(Jy,{tabs:K}),n.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[n.jsxs(oe,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:B,children:[n.jsx(an,{className:"h-4 w-4 mr-2"}),"Reset"]}),n.jsxs(oe,{onClick:G,loading:x,children:[n.jsx(xb,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),n.jsxs("div",{className:"mt-12",children:[n.jsxs("h3",{className:"text-lg font-bold text-slate-200 mb-4 flex items-center",children:[n.jsx(H0,{className:"h-5 w-5 mr-2 text-indigo-500"}),"System Health"]}),n.jsx(ye,{className:"divide-y divide-slate-800",children:O?n.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):T.map((L,C)=>{const Y=L.status==="pass",P=L.status==="warn",I=Y?"bg-green-500/10 text-green-400 border-green-500/20":P?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return n.jsxs("div",{className:"p-4 flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-200",children:L.name}),n.jsx("p",{className:"text-xs text-slate-500",children:L.detail})]}),n.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${I}`,children:L.status.toUpperCase()})]},`${L.name}-${C}`)})})]})]})},l1=()=>(vy(),n.jsx(ev,{children:n.jsxs("div",{className:"flex h-screen bg-[#030712] text-slate-300 overflow-hidden relative",children:[n.jsx("div",{className:"absolute top-0 left-0 w-full h-96 bg-indigo-900/10 rounded-full blur-[120px] -translate-y-1/2 pointer-events-none z-0"}),n.jsx(hy,{}),n.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[n.jsx(xy,{}),n.jsx("main",{className:"flex-1 overflow-auto p-6 scroll-smooth relative",children:n.jsx("div",{className:"max-w-7xl mx-auto w-full",children:n.jsxs(_g,{children:[n.jsx(Lt,{path:"/",element:n.jsx(Oy,{})}),n.jsx(Lt,{path:"/prds",element:n.jsx(Hy,{})}),n.jsx(Lt,{path:"/prs",element:n.jsx(By,{})}),n.jsx(Lt,{path:"/board",element:n.jsx(zy,{})}),n.jsx(Lt,{path:"/scheduling",element:n.jsx(Ky,{})}),n.jsx(Lt,{path:"/logs",element:n.jsx(Uy,{})}),n.jsx(Lt,{path:"/roadmap",element:n.jsx(Ly,{})}),n.jsx(Lt,{path:"/integrations",element:n.jsx(ky,{})}),n.jsx(Lt,{path:"/agents",element:n.jsx(Ty,{})}),n.jsx(Lt,{path:"/settings",element:n.jsx(t1,{})}),n.jsx(Lt,{path:"*",element:n.jsx(Ag,{to:"/",replace:!0})})]})})})]}),n.jsx(gy,{})]})})),P0=document.getElementById("root");if(!P0)throw new Error("Could not find root element to mount to");const a1=zp.createRoot(P0);a1.render(n.jsx(Ve.StrictMode,{children:n.jsx(l1,{})}));
|